According to my calculations, if we win the last 3 games we guarantee qualification UNLESS Porto beats Marseille and Besictas at home (then it will be down to us beating Marseille by two goals). Here is the breakdown:
Current table: Mar 7, Porto 5, Bes 3, Liv 1
If in the next round we beat Besictas then:
If Porto draws with Mar, the table becomes: 1) Mar 8, Por 6, Liv 4, Bes 3
If Porto wins, then 2) Por 8, Mar 7, Liv 4, Bes 3
If Porto loses then 3) Mar 10, Por 5, Liv 4, Bes 3
If we then beat Porto at home:
If Besictas draws with Mar, the possible tables are: 4) Mar 9, Liv 7, Por 6, Bes 4
or 5) Por 8, Mar 8, Liv 7, Bes 4
or 6) Mar 11, Liv 7, Por 5, Bes 4
If Beşiktaş beats Mar, the possible tables are: 7) Mar 8, Liv 7, Por 6, Bes 6
or 8. Por 8, Mar 7, Liv 7, Bes 6
or 9) Mar 10, Liv 7, Bes 6, Por 5
If Beşiktaş loses we have: 10) Mar 11, Liv 7, Por 6, Bes 3
or 11) Mar 10, Por 8, Liv 7, Bes 3
or 12) Mar 13, Liv 7, Por 5, Bes 3
So, no matter what happens in the last game (Porto-Beşiktaş), as long as we win all 3 games we are through as 1st or 2nd in the group, apart from table 11, when we would need to beat Mar by more than one goal so we can go through on goal difference between out games.