Dual stopwatch help

I'm not even going to try to work out what a program full of unnamed pins and uncommented single character variables is trying to do. If you know what is connected to pins 8, 9 and 10 and what the values of a, b1, b2 etc mean then you're the only one who can sort it out.

Steve