This one is quite complicated so I will start from easier part - if she already gave birth -> check is simple flags.KOHAKU_FED >= 8 (and you increment this by one with every food you gave her and it is only present if she is in stage 1 or higher).
During pregnancy itself there is conditional check that depends on her stage of pregnancy:
stage 1 KOHAKU_FED >= 2,
stage 2 KOHAKU_FED >= 4,
stage 3 KOHAKU_FED >= 6,
stage 4 KOHAKU_FED >= 8.
I do not see anything preventing pushing the flag above 8 in first stage.