[entry: main] [enable: logical_registers] // Sums 5 + 4 + 3 + 2 + 1 = 15 with a named countdown loop, returns it as the // exit status. Shows three-operand arithmetic (r1 = r1 + r2 -> add x0, x0, x1). const SYS_EXIT = 93 proc main { r1 = 0 r2 = 5 while .countdown r2 > 0 { r1 = r1 + r2 r2 = r2 - 1 } r9 = SYS_EXIT syscall }