The whole sketch is several pages A4. I don't think this will help.
The array Sw[i] holds the boolean value of 9 buttons after a ReadButtons: true if pressed, false if not.
The if statement works for the Sw-values but I doubt if the third or-condition is evaluated by the statement.
Of course I can try by splitting the statement in two but thought you would know.