If Portugal beat Brazil, then Portugal top the group and Brazil finish second.
If Brazil and Portugal draw, then Brazil top the group and Portugal finish second.
If Brazil beat Portugal, then Brazil top the group and second place goes to Portugal or the Ivory Coast, depending on goal difference. The Ivory Coast would need to overturn a nine goal gap as things currently stand.
Another complicated one.
If Chile beat Spain and Switzerland win or draw against Honduras, Chile top the group and Switzerland are second.
If Chile beat Spain and Honduras beat Switzerland, Chile top the group and the team with the best goal difference from the other three are second.
If Spain beat Chile and Honduras win or draw against Switzerland, Spain top the group and Chile are second.
If Spain beat Chile and Switzerland beat Honduras, Honduras are eliminated and the other three nations are placed according to goal difference. Spain are guaranteed a place, while Switzerland get a place if they beat Honduras by two goals or more, or Chile lose by two goals or more.
If Spain and Chile draw, Chile top the group, while Spain are second unless Switzerland beat Honduras, in which case Switzerland are second.