← Back to archive

Stdle #59 · arithmetic · 2026-08-04

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, #-32]!
mov w8, #23
mov w9, #7
sdiv w10, w8, w9
msub w11, w10, w9, w8
sub sp, sp, #16
str x10, [sp]
str x11, [sp, #8]
adrp x0, fmt@PAGE
add x0, x0, fmt@PAGEOFF
bl _printf
add sp, sp, #16
ldp x29, x30, [sp], #32
mov w0, #0
ret
.section __TEXT,__cstring
fmt: .asciz "%d %d\n"
Arithmetic
4 attempts left

Answer & explanation