← Back to archive

Stdle #101 · stack · 2026-09-15

What does this Assembly snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

.global _main
.align 2
_main:
stp x29, x30, [sp, #-48]!
mov w8, #55
mov w9, #66
stp w8, w9, [sp, #16]
ldp w10, w11, [sp, #16]
add w10, w10, w11
sub sp, sp, #16
str x10, [sp]
adrp x0, fmt@PAGE
add x0, x0, fmt@PAGEOFF
bl _printf
add sp, sp, #16
ldp x29, x30, [sp], #48
mov w0, #0
ret
.section __TEXT,__cstring
fmt: .asciz "%d\n"
Stack
4 attempts left

Answer & explanation