Complex sentence: When Hwang Jin saw this he realized he could not open the gates, if he did the Japanese would swarm in and capture the fort.
Split into simpler sentences: When Hwang Jin saw this he realized he could not open the gates. If he did, the Japanese would swarm in and capture the fort.