Here is the annotated x86 build:
pushl %ebp ; save the old stack movl %esp, %ebp ; set up your local, new stack movl 8(%ebp), %eax ; take the first function argument and store it into eax cmpl 12(%ebp), %eax ; compare the 2nd function arg with the 1st (in eax)
After that, there is jge , which jge means "jumping if greater than or equal to", which you can do after cmp .
This means that it jumps if the first argument is greater than the second argument and therefore x >= y .
However, this jump (before L2) actually negates z, and then returns z. What you really want is a transition to L3, which will happen if x <y, which should be the end result.
source share