HW23
COP-3402

Write x86 64 assembly code that has equivalent branching behavior as the following SimpleIR program:

function main
localVariables a b x y
a := 5
b := 1
x := 0
head:
if a <= 0 goto a1
x := x + a
a := a - 1
goto head
a1:
x := x + b
return x
end function

Author: Paul Gazzillo

Created: 2025-04-09 Wed 11:02

Validate