So, for example, if Torque is facing East and an enemy is detected on his x-axis, then the "same_x_ 2:" routine gets called. If the enemy is north of Torque and facing south, then it is facing toward Torque. Conversely, if the enemy is south of Torque and facing north, then it is still facing toward him. In this case, Torque checks that the enemy is not facing north or south before deciding to turn toward it.
All in all, this is about the best example of a cybug deciding when it is safe to attack and when to retreat with dignity. No-one else seems to have a better method.