In terms of who needs to do what to move on:
The morning matches are easy: Brazil has clinched a place in the knock-out rounds, and will win the group if they win or draw.
Portugal will win the group with a win, finish second if they draw, and probably finish second if they lose.
To finish second, Cote D’Ivoire needs to win, have Portugal lose, and either
(a) have the total goal difference by which they and Brazil win be 9 or more
(b) score at least 7 goals more than Portugal and have the total goal difference be exactly 8
(c) score exactly 6 goals more than Portugal, have the goal difference be exactly 8, and win a coin-flip.
North Korea cannot go through to the knock-out rounds.
This one’s quite a bit more complicated.
Chile wins the group with a win or a draw.
At the other end, Honduras can go through if they beat Switzerland by 2 goals AND Chile beats Spain by 3 goals. (Also, for every extra goal they beat Switzerland by, the Spanish loss can be 1 goal smaller. But Spain needs to lose for Honduras to go through).
Spain wins the group with any victory over Chile coupled with a Switzerland loss or tie.
If both Spain and Switzerland tie, Spain will move on to the knock-out round. Likewise if Spain ties and Switzerland loses.
If Switzerland wins and Spain loses or ties, Switzerland finishes second.
If both Spain and Switzerland win, things become complicated.
(a) If Spain and Switzerland both win 1-0 (or any other identical 1-goal victories), Spain wins the group on goal differential, and Chile finishes second based on its head-to-head vs. Switzerland
(b) If Switzerland wins by 1 goal more than Spain beats Chile by, and scores at least one more than Spain scores in their match with Chile, OR Switzerland wins by 2 or more goals more than Spain wins by over Chile, Switzerland wins the group, Spain finishes second, and Chile is eliminated.
(c) If Spain beats Chile by more than one goal, and Switzerland does not fulfill the conditions in (b) above, OR if Spain beats Chile by one goal, and Switzerland wins by one goal, but the Swiss-Honduran game is higher scoring, Spain wins the group and Switzerland finishes second, with Chile eliminated due to goal differential or total goals.
Clear as mud?