Brazil is at the top of Group E and will advance to the knockout stage with a win or a draw against Serbia Wednesday.
Brazil's four points and +2 goal differential has it just ahead of Switzerland, who also has four points, but just a +1 goal differential. Serbia sits behind the two squads with three points.
If Brazil were to lose to Serbia however, that means Serbia will advance, and Brazil would need some help from Costa Rica to still get past the group stage.
If Switzerland either wins or gets a draw against Costa Rica, it will advance. If Switzerland were to lose however, the door would still be open for Brazil, if it maintains the advantage in goal differential. So, Brazil would need to make sure it doesn't lose by two more goals than Switzerland loses by, or else it would still be eliminated despite both teams losing and Brazil entering the day ahead in the group. If Brazil and Switzerland lose by the same margin Brazil advances. If Brazil loses by one more goal than Switzerland loses by, other tiebreakers would come into play.
The winner of Group E will face Mexico in the Round of 16 and the runner-up will face Sweden.