program NotTest {
section module {
}
section data {
int rax = 0
int rbx = 0
string str_0 = "x is false"
string str_1 = "x is true"
string str_2 = "not (x and y) is true"
string str_3 = "(not x) or y evaluated"
string fmt_str = "%s "
string newline = "\n"
int x = 0
int y = 0
}
section code {
start:
mov x, 1
mov y, 0
not x
cmp x, 0
je ELSE_0
print fmt_str, str_0
print newline
jmp ENDIF_1
ELSE_0:
print fmt_str, str_1
print newline
ENDIF_1:
cmp x, 0
je AND_ZERO_4
cmp y, 0
je AND_ZERO_4
mov rbx, 1
jmp AND_END_5
AND_ZERO_4:
mov rbx, 0
AND_END_5:
not rbx
cmp rbx, 0
je ELSE_2
print fmt_str, str_2
print newline
ELSE_2:
not x
cmp x, 0
jne OR_ONE_8
cmp y, 0
je ELSE_6
OR_ONE_8:
print fmt_str, str_3
print newline
ELSE_6:
done
}
}