00:01
Let's step through the instructions.
00:03
C equals a plus b.
00:05
You need r1 equal to a, r2 equal to b.
00:07
You store c somewhere.
00:08
You can stay in a register.
00:11
D equals c times a.
00:13
You need c and a, and it can fit in two registers.
00:18
Then e equals c plus a, you need c and a, and that can fit into two registers.
00:25
X equals c times c, you need c, and that may need to spill another variable to free a register.
00:31
Spill 1 could temporarily move d or e to memory to compute x.
00:38
And if x is greater than a, then you compare, that's going to use x and a, no extra spill...