It isn't as complicated as you say.
France will either be the 49th match or the 51st match, if it's the 49th they'll play the runners up of Group D or if it is the 51st they'll play the winners of Group D.
Then they would play the winners of Uruguay v [insert name here] if they're the 49th match and the victor of Runner up Group A/Winner of Group B if they're the 51st match.
49 plays 50.
51 plays 52.
We'll probably lose to Senegal anyway.
Spain 1-2 Morocco!
FOR ALL OF MOROCCO AFRICA THE WORLD
Great header from the Emissary of Morocco or whatever his name is.