	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waitForReload
_waitForReload:                         ## @waitForReload
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_PAD_Init
	movq	_reload_timer@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.1:
	movl	%eax, %eax
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	shrq	$36, %rsi
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_kprintf
LBB0_2:
	movq	_PAD_TRIGGER_Z@GOTPCREL(%rip), %r13
	leaq	L_.str.1(%rip), %r15
	movq	_PAD_BUTTON_A@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_PAD_ScanPads
	xorl	%edi, %edi
	callq	_PAD_ButtonsDown
	movl	%eax, %ebx
	testl	%eax, (%r13)
	je	LBB0_4
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_kprintf
	callq	__CPU_ISR_Disable
	xorl	%eax, %eax
	callq	___reload
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%ebx, (%r14)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	xorl	%eax, %eax
	callq	___reload
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$20000, %edi                    ## imm = 0x4E20
	callq	_udelay
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	decl	%eax
	movl	%eax, (%r12)
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_SYS_ResetButtonDown
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_7
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_reload_timer,4,2               ## @reload_timer
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n\tReloading in %d seconds\n"

	.comm	_PAD_TRIGGER_Z,4,2              ## @PAD_TRIGGER_Z
L_.str.1:                               ## @.str.1
	.asciz	"\n\tReload\n\n\n"

	.comm	_PAD_BUTTON_A,4,2               ## @PAD_BUTTON_A
L_.str.2:                               ## @.str.2
	.asciz	"\n\tReset\n\n\n"

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_SYS_HOTRESET,4,2               ## @SYS_HOTRESET
	.no_dead_strip	_waitForReload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waitForReload
_waitForReload:                         ; @waitForReload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	bl	_PAD_Init
Lloh0:
	adrp	x22, _reload_timer@GOTPAGE
Lloh1:
	ldr	x22, [x22, _reload_timer@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.1:
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	umull	x8, w8, w9
	lsr	x8, x8, #36
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kprintf
LBB0_2:
Lloh4:
	adrp	x23, _PAD_TRIGGER_Z@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PAD_TRIGGER_Z@GOTPAGEOFF]
Lloh6:
	adrp	x19, l_.str.1@PAGE
Lloh7:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh8:
	adrp	x24, _PAD_BUTTON_A@GOTPAGE
Lloh9:
	ldr	x24, [x24, _PAD_BUTTON_A@GOTPAGEOFF]
Lloh10:
	adrp	x20, l_.str.2@PAGE
Lloh11:
	add	x20, x20, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_PAD_ScanPads
	mov	w0, #0
	bl	_PAD_ButtonsDown
	mov	x21, x0
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_9
LBB0_4:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_kprintf
	bl	__CPU_ISR_Disable
	bl	___reload
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_kprintf
	bl	___reload
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #20000
	bl	_udelay
	ldr	w8, [x22]
	subs	w8, w8, #1
	b.lt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	str	w8, [x22]
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_SYS_ResetButtonDown
	cbnz	x0, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	cbnz	w8, LBB0_5
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_reload_timer,4,2               ; @reload_timer
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n\tReloading in %d seconds\n"

	.comm	_PAD_TRIGGER_Z,4,2              ; @PAD_TRIGGER_Z
l_.str.1:                               ; @.str.1
	.asciz	"\n\tReload\n\n\n"

	.comm	_PAD_BUTTON_A,4,2               ; @PAD_BUTTON_A
l_.str.2:                               ; @.str.2
	.asciz	"\n\tReset\n\n\n"

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_SYS_HOTRESET,4,2               ; @SYS_HOTRESET
	.no_dead_strip	_waitForReload
.subsections_via_symbols
