Program: hanoi

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	movl	$0, -12(%rbp)
	leaq	L_.str(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	leaq	L_.str.1(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	movl	$0, -8(%rbp)
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	$0, _num(%rip)
	movl	-8(%rbp), %eax
	movl	%eax, _num+4(%rip)
	movl	$0, _num+8(%rip)
	movl	$0, _num+12(%rip)
	movq	$0, _count(%rip)
	movl	-8(%rbp), %edi
	movl	$1, %esi
	movl	$3, %edx
	callq	_mov
	movl	-12(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	-8(%rbp), %esi
	movq	_count(%rip), %rdx
	leaq	L_.str.2(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	cmpl	$10, -8(%rbp)
	jne	LBB0_3
## %bb.2:
	jmp	LBB0_4
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	jmp	LBB0_1
LBB0_4:
	callq	_libmin_success
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function mov
_mov:                                   ## @mov
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movl	%edi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	%edx, -16(%rbp)
	cmpl	$1, -8(%rbp)
	jne	LBB1_2
## %bb.1:
	movslq	-12(%rbp), %rcx
	leaq	_num(%rip), %rax
	movl	(%rax,%rcx,4), %edx
	addl	$-1, %edx
	leaq	_num(%rip), %rax
	movl	%edx, (%rax,%rcx,4)
	movslq	-16(%rbp), %rcx
	leaq	_num(%rip), %rax
	movl	(%rax,%rcx,4), %edx
	addl	$1, %edx
	leaq	_num(%rip), %rax
	movl	%edx, (%rax,%rcx,4)
	movq	_count(%rip), %rax
	addq	$1, %rax
	movq	%rax, _count(%rip)
	movl	$0, -4(%rbp)
	jmp	LBB1_3
LBB1_2:
	movl	-12(%rbp), %ecx
	addl	-16(%rbp), %ecx
	movl	$6, %eax
	subl	%ecx, %eax
	movl	%eax, -20(%rbp)
	movl	-8(%rbp), %edi
	subl	$1, %edi
	movl	-12(%rbp), %esi
	movl	-20(%rbp), %edx
	callq	_mov
	movl	-12(%rbp), %esi
	movl	-16(%rbp), %edx
	movl	$1, %edi
	callq	_mov
	movl	-8(%rbp), %edi
	subl	$1, %edi
	movl	-20(%rbp), %esi
	movl	-16(%rbp), %edx
	callq	_mov
	movl	$0, -4(%rbp)
LBB1_3:
	movl	-4(%rbp), %eax
	addq	$32, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Towers of Hanoi Puzzle Test Program\n"

L_.str.1:                               ## @.str.1
	.asciz	"Disks     Moves\n"

.zerofill __DATA,__bss,_num,16,4        ## @num
.zerofill __DATA,__bss,_count,8,3       ## @count
L_.str.2:                               ## @.str.2
	.asciz	"%3d  %10ld\n"

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	adrp	x8, _num@PAGE
	add	x8, x8, _num@PAGEOFF
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	stur	wzr, [x29, #-4]
	stur	wzr, [x29, #-12]
	adrp	x0, l_.str@PAGE
	add	x0, x0, l_.str@PAGEOFF
	bl	_libmin_printf
	adrp	x0, l_.str.1@PAGE
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libmin_printf
	stur	wzr, [x29, #-8]
	b	LBB0_1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldur	w9, [x29, #-8]
	mov	w1, #1
	add	w9, w9, #1
	stur	w9, [x29, #-8]
	adrp	x9, _num@PAGE
	str	wzr, [x9, _num@PAGEOFF]
	ldur	w9, [x29, #-8]
	str	w9, [x8, #4]
	str	wzr, [x8, #8]
	str	wzr, [x8, #12]
	adrp	x8, _count@PAGE
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	str	xzr, [x8, _count@PAGEOFF]
	ldur	w0, [x29, #-8]
	mov	w2, #3
	bl	_mov
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	ldur	w9, [x29, #-12]
	add	w9, w9, #1
	stur	w9, [x29, #-12]
	ldur	w9, [x29, #-8]
                                        ; implicit-def: $x10
	mov	x10, x9
	ldr	x8, [x8, _count@PAGEOFF]
	mov	x9, sp
	str	x10, [x9]
	str	x8, [x9, #8]
	adrp	x0, l_.str.2@PAGE
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libmin_printf
	ldur	w8, [x29, #-8]
	subs	w8, w8, #10
	cset	w8, ne
	tbnz	w8, #0, LBB0_3
	b	LBB0_2
LBB0_2:
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	b	LBB0_1
LBB0_4:
	bl	_libmin_success
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function mov
_mov:                                   ; @mov
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	stur	w0, [x29, #-8]
	stur	w1, [x29, #-12]
	str	w2, [sp, #16]
	ldur	w8, [x29, #-8]
	subs	w8, w8, #1
	cset	w8, ne
	tbnz	w8, #0, LBB1_2
	b	LBB1_1
LBB1_1:
	ldursw	x10, [x29, #-12]
	adrp	x8, _num@PAGE
	add	x8, x8, _num@PAGEOFF
	mov	x9, x8
	add	x10, x9, x10, lsl #2
	ldr	w9, [x10]
	subs	w9, w9, #1
	str	w9, [x10]
	ldrsw	x9, [sp, #16]
	add	x9, x8, x9, lsl #2
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
	adrp	x9, _count@PAGE
	ldr	x8, [x9, _count@PAGEOFF]
	add	x8, x8, #1
	str	x8, [x9, _count@PAGEOFF]
	stur	wzr, [x29, #-4]
	b	LBB1_3
LBB1_2:
	ldur	w8, [x29, #-12]
	ldr	w9, [sp, #16]
	add	w9, w8, w9
	mov	w8, #6
	subs	w8, w8, w9
	str	w8, [sp, #12]
	ldur	w8, [x29, #-8]
	mov	w9, #1
	str	w9, [sp, #8]                    ; 4-byte Folded Spill
	subs	w0, w8, #1
	ldur	w1, [x29, #-12]
	ldr	w2, [sp, #12]
	bl	_mov
	ldr	w0, [sp, #8]                    ; 4-byte Folded Reload
	ldur	w1, [x29, #-12]
	ldr	w2, [sp, #16]
	bl	_mov
	ldur	w8, [x29, #-8]
	subs	w0, w8, #1
	ldr	w1, [sp, #12]
	ldr	w2, [sp, #16]
	bl	_mov
	stur	wzr, [x29, #-4]
	b	LBB1_3
LBB1_3:
	ldur	w0, [x29, #-4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Towers of Hanoi Puzzle Test Program\n"

l_.str.1:                               ; @.str.1
	.asciz	"Disks     Moves\n"

.zerofill __DATA,__bss,_num,16,2        ; @num
.zerofill __DATA,__bss,_count,8,3       ; @count
l_.str.2:                               ; @.str.2
	.asciz	"%3d  %10ld\n"

.subsections_via_symbols