	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_in_menu_wait                   ## -- Begin function in_menu_wait
	.p2align	4, 0x90
_in_menu_wait:                          ## @in_menu_wait
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, _in_menu_wait.repeats(%rip)
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movl	$450, %esi                      ## imm = 0x1C2
	cmovnel	%edx, %esi
	movq	%rbx, %rdi
	callq	_in_menu_wait_any
	movl	%eax, %r14d
	movl	_in_menu_wait.inp_prev(%rip), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_2
## %bb.1:
	incl	_in_menu_wait.repeats(%rip)
LBB0_2:
	movl	%r14d, %eax
	testl	%r15d, %r14d
	je	LBB0_3
## %bb.5:
	testl	%r15d, %r14d
	jne	LBB0_6
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_in_menu_wait_any
	testl	%r15d, %eax
	je	LBB0_3
## %bb.4:
	movl	_in_menu_wait.inp_prev(%rip), %ecx
	testl	%r15d, %r14d
	je	LBB0_7
LBB0_6:
	cmpl	%ecx, %eax
	je	LBB0_8
LBB0_7:
	movl	$0, _in_menu_wait.repeats(%rip)
LBB0_8:
	movl	%eax, _in_menu_wait.inp_prev(%rip)
	movq	_PBTN_UP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_13
## %bb.9:
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, %edx
	je	LBB0_11
## %bb.10:
	notl	%edx
	andl	%edx, %eax
	testl	%ecx, %eax
	je	LBB0_13
LBB0_11:
	movq	_PBTN_RIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_13
## %bb.12:
	notl	%ecx
	andl	%ecx, %eax
LBB0_13:
	movq	_PBTN_DOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_18
## %bb.14:
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%eax, %edx
	je	LBB0_16
## %bb.15:
	notl	%edx
	andl	%edx, %eax
	testl	%ecx, %eax
	je	LBB0_18
LBB0_16:
	movq	_PBTN_RIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_18
## %bb.17:
	notl	%ecx
	andl	%ecx, %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_in_menu_wait.inp_prev,4,2 ## @in_menu_wait.inp_prev
.zerofill __DATA,__bss,_in_menu_wait.repeats,4,2 ## @in_menu_wait.repeats
	.comm	_PBTN_UP,4,2                    ## @PBTN_UP
	.comm	_PBTN_LEFT,4,2                  ## @PBTN_LEFT
	.comm	_PBTN_RIGHT,4,2                 ## @PBTN_RIGHT
	.comm	_PBTN_DOWN,4,2                  ## @PBTN_DOWN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_in_menu_wait                   ; -- Begin function in_menu_wait
	.p2align	2
_in_menu_wait:                          ; @in_menu_wait
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	adrp	x21, _in_menu_wait.repeats@PAGE
	ldr	w8, [x21, _in_menu_wait.repeats@PAGEOFF]
	mov	w9, #450
	cmp	w8, #0
	csel	w1, w9, w2, eq
	mov	x0, x19
	bl	_in_menu_wait_any
	adrp	x22, _in_menu_wait.inp_prev@PAGE
	ldr	w8, [x22, _in_menu_wait.inp_prev@PAGEOFF]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.1:
	ands	w23, w0, w20
	b.eq	LBB0_4
LBB0_2:
	cbnz	w23, LBB0_6
	b	LBB0_7
LBB0_3:
	ldr	w9, [x21, _in_menu_wait.repeats@PAGEOFF]
	add	w9, w9, #1
	str	w9, [x21, _in_menu_wait.repeats@PAGEOFF]
	ands	w23, w0, w20
	b.ne	LBB0_2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #-1
	bl	_in_menu_wait_any
	tst	w0, w20
	b.eq	LBB0_4
; %bb.5:
	ldr	w8, [x22, _in_menu_wait.inp_prev@PAGEOFF]
	cbz	w23, LBB0_7
LBB0_6:
	cmp	w0, w8
	b.eq	LBB0_8
LBB0_7:
	str	wzr, [x21, _in_menu_wait.repeats@PAGEOFF]
LBB0_8:
	str	w0, [x22, _in_menu_wait.inp_prev@PAGEOFF]
Lloh0:
	adrp	x8, _PBTN_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PBTN_UP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _PBTN_LEFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PBTN_LEFT@GOTPAGEOFF]
	tst	w9, w0
	b.eq	LBB0_12
; %bb.9:
	ldr	w10, [x8]
	tst	w10, w0
	b.eq	LBB0_11
; %bb.10:
	bic	w0, w0, w10
	tst	w0, w9
	b.eq	LBB0_12
LBB0_11:
Lloh5:
	adrp	x9, _PBTN_RIGHT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PBTN_RIGHT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w0
	bic	w9, w0, w9
	csel	w0, w0, w9, eq
LBB0_12:
Lloh8:
	adrp	x9, _PBTN_DOWN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PBTN_DOWN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_17
; %bb.13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.14:
	bic	w0, w0, w8
	tst	w0, w9
	b.eq	LBB0_17
LBB0_15:
Lloh11:
	adrp	x8, _PBTN_RIGHT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PBTN_RIGHT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_17
; %bb.16:
	bic	w0, w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_in_menu_wait.inp_prev,4,2 ; @in_menu_wait.inp_prev
.zerofill __DATA,__bss,_in_menu_wait.repeats,4,2 ; @in_menu_wait.repeats
	.comm	_PBTN_UP,4,2                    ; @PBTN_UP
	.comm	_PBTN_LEFT,4,2                  ; @PBTN_LEFT
	.comm	_PBTN_RIGHT,4,2                 ; @PBTN_RIGHT
	.comm	_PBTN_DOWN,4,2                  ; @PBTN_DOWN
.subsections_via_symbols
