	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function menu_input_key_bind_poll_find_hold_pad
_menu_input_key_bind_poll_find_hold_pad: ## @menu_input_key_bind_poll_find_hold_pad
	.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
	movq	%rsi, %r14
	movq	(%rdi), %r15
	movl	%edx, %r12d
	movq	_MENU_MAX_MBUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	(%r15,%r12,4), %rdx
	xorl	%ecx, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ecx
	cmpl	%ecx, %eax
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %esi
	cmpl	$0, (%rdx,%rsi,4)
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-128(%rcx), %esi
	cmpl	$8, %esi
	ja	LBB0_2
## %bb.5:
	movl	%ecx, (%r14)
	jmp	LBB0_30
LBB0_6:
	movq	_MENU_MAX_BUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	8(%r15,%r12,4), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdx,%rcx,4)
	jne	LBB0_23
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_8
LBB0_10:
	movq	_MENU_MAX_AXES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_14
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15,%r12,4), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_abs
	cmpl	$20000, %eax                    ## imm = 0x4E20
	jge	LBB0_24
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_12
LBB0_14:
	movq	_MENU_MAX_HATS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_22
## %bb.15:
	movq	24(%r15,%r12,4), %rcx
	movq	_HAT_UP_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_HAT_DOWN_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	movq	_HAT_LEFT_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	_HAT_RIGHT_MASK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdi,4), %ebx
	movl	%edx, %esi
	testl	%ebx, %edx
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r10d, %esi
	testl	%ebx, %r10d
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r8d, %esi
	testl	%ebx, %r8d
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r9d, %esi
	testl	%ebx, %r9d
	je	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	testl	%esi, %esi
	jne	LBB0_26
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_16
LBB0_22:
	xorl	%eax, %eax
	jmp	LBB0_31
LBB0_23:
	movl	%ecx, 4(%r14)
	jmp	LBB0_27
LBB0_24:
	movq	16(%r15,%r12,4), %rax
	cmpq	$0, (%rax,%rbx,8)
	jle	LBB0_28
## %bb.25:
	movl	%ebx, %edi
	callq	_AXIS_POS
	jmp	LBB0_29
LBB0_26:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_HAT_MAP
	movl	%eax, 4(%r14)
LBB0_27:
	movq	_AXIS_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	jmp	LBB0_30
LBB0_28:
	movl	%ebx, %edi
	callq	_AXIS_NEG
LBB0_29:
	movq	%rax, 8(%r14)
	movq	_NO_BTN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
LBB0_30:
	movl	$1, %eax
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MENU_MAX_MBUTTONS,4,2          ## @MENU_MAX_MBUTTONS
	.comm	_MENU_MAX_BUTTONS,4,2           ## @MENU_MAX_BUTTONS
	.comm	_AXIS_NONE,8,3                  ## @AXIS_NONE
	.comm	_MENU_MAX_AXES,4,2              ## @MENU_MAX_AXES
	.comm	_NO_BTN,4,2                     ## @NO_BTN
	.comm	_MENU_MAX_HATS,4,2              ## @MENU_MAX_HATS
	.comm	_HAT_UP_MASK,4,2                ## @HAT_UP_MASK
	.comm	_HAT_DOWN_MASK,4,2              ## @HAT_DOWN_MASK
	.comm	_HAT_LEFT_MASK,4,2              ## @HAT_LEFT_MASK
	.comm	_HAT_RIGHT_MASK,4,2             ## @HAT_RIGHT_MASK
	.no_dead_strip	_menu_input_key_bind_poll_find_hold_pad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function menu_input_key_bind_poll_find_hold_pad
_menu_input_key_bind_poll_find_hold_pad: ; @menu_input_key_bind_poll_find_hold_pad
	.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
	ldr	x8, [x0]
	add	x21, x8, w2, uxtw #2
Lloh0:
	adrp	x8, _MENU_MAX_MBUTTONS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MENU_MAX_MBUTTONS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	w9, #0
	ldr	x10, [x21]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, w9, uxtw #2]
	sub	w12, w9, #128
	cmp	w11, #0
	ccmp	w12, #8, #2, ne
	b.ls	LBB0_21
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_2
LBB0_4:
Lloh3:
	adrp	x8, _MENU_MAX_BUTTONS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MENU_MAX_BUTTONS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.5:
	mov	x9, #0
	ldr	x10, [x21, #8]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9, lsl #2]
	cbnz	w11, LBB0_22
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_6
LBB0_8:
Lloh6:
	adrp	x22, _MENU_MAX_AXES@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MENU_MAX_AXES@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_12
; %bb.9:
	mov	x20, #0
	mov	w23, #20000
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	ldr	x0, [x8, x20, lsl #3]
	bl	_abs
	cmp	w0, w23
	b.ge	LBB0_23
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x20, x20, #1
	ldr	w8, [x22]
	cmp	x20, x8
	b.lo	LBB0_10
LBB0_12:
Lloh8:
	adrp	x8, _MENU_MAX_HATS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MENU_MAX_HATS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cbz	w8, LBB0_20
; %bb.13:
	mov	x0, #0
	ldr	x9, [x21, #24]
Lloh11:
	adrp	x10, _HAT_UP_MASK@GOTPAGE
Lloh12:
	ldr	x10, [x10, _HAT_UP_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _HAT_DOWN_MASK@GOTPAGE
Lloh15:
	ldr	x11, [x11, _HAT_DOWN_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
Lloh17:
	adrp	x12, _HAT_LEFT_MASK@GOTPAGE
Lloh18:
	ldr	x12, [x12, _HAT_LEFT_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w12, [x12]
Lloh20:
	adrp	x13, _HAT_RIGHT_MASK@GOTPAGE
Lloh21:
	ldr	x13, [x13, _HAT_RIGHT_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w13, [x13]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x9, x0, lsl #2]
	mov	x1, x10
	tst	w10, w14
	b.ne	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x11
	tst	w11, w14
	b.ne	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x12
	tst	w12, w14
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x13
	tst	w13, w14
	b.eq	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=1
	cbnz	w1, LBB0_25
LBB0_19:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x0, x0, #1
	cmp	x8, x0
	b.ne	LBB0_14
LBB0_20:
	mov	w0, #0
	b	LBB0_30
LBB0_21:
	str	w9, [x19]
	b	LBB0_29
LBB0_22:
	str	w9, [x19, #4]
	b	LBB0_26
LBB0_23:
	ldr	x8, [x21, #16]
	ldr	x8, [x8, x20, lsl #3]
	mov	x0, x20
	cmp	x8, #1
	b.lt	LBB0_27
; %bb.24:
	bl	_AXIS_POS
	b	LBB0_28
LBB0_25:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_HAT_MAP
	str	w0, [x19, #4]
LBB0_26:
Lloh23:
	adrp	x8, _AXIS_NONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AXIS_NONE@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_29
LBB0_27:
	bl	_AXIS_NEG
LBB0_28:
	str	x0, [x19, #8]
Lloh26:
	adrp	x8, _NO_BTN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NO_BTN@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x19, #4]
LBB0_29:
	mov	w0, #1
LBB0_30:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MENU_MAX_MBUTTONS,4,2          ; @MENU_MAX_MBUTTONS
	.comm	_MENU_MAX_BUTTONS,4,2           ; @MENU_MAX_BUTTONS
	.comm	_AXIS_NONE,8,3                  ; @AXIS_NONE
	.comm	_MENU_MAX_AXES,4,2              ; @MENU_MAX_AXES
	.comm	_NO_BTN,4,2                     ; @NO_BTN
	.comm	_MENU_MAX_HATS,4,2              ; @MENU_MAX_HATS
	.comm	_HAT_UP_MASK,4,2                ; @HAT_UP_MASK
	.comm	_HAT_DOWN_MASK,4,2              ; @HAT_DOWN_MASK
	.comm	_HAT_LEFT_MASK,4,2              ; @HAT_LEFT_MASK
	.comm	_HAT_RIGHT_MASK,4,2             ; @HAT_RIGHT_MASK
	.no_dead_strip	_menu_input_key_bind_poll_find_hold_pad
.subsections_via_symbols
