	.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_trigger_pad
_menu_input_key_bind_poll_find_trigger_pad: ## @menu_input_key_bind_poll_find_trigger_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r12d
	movq	8(%rdi), %rbx
	movq	_MENU_MAX_MBUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rcx,%r12,4), %rdi
	xorl	%ecx, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdi,%rcx,8)
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%rbx,%r12,4), %rsi
	cmpq	$0, (%rsi,%rcx,8)
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	-128(%rcx), %esi
	cmpl	$8, %esi
	ja	LBB0_2
## %bb.6:
	movl	%ecx, (%rdx)
	jmp	LBB0_35
LBB0_7:
	movq	_MENU_MAX_BUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx,%r12,4), %rdi
	xorl	%ecx, %ecx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdi,%rcx,8)
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	16(%rbx,%r12,4), %rsi
	cmpq	$0, (%rsi,%rcx,8)
	jne	LBB0_9
## %bb.12:
	movl	%ecx, 4(%rdx)
	movq	_AXIS_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rdx)
	jmp	LBB0_35
LBB0_13:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	_MENU_MAX_AXES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_21
## %bb.14:
	xorl	%ebx, %ebx
	movq	%r12, %rax
	shlq	$4, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%rbx
	movq	_MENU_MAX_AXES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	%rax, %rbx
	jae	LBB0_21
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%r12,4), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rax
	movq	(%rax,%r15), %rax
	movslq	(%rax,%rbx,4), %rax
	subq	%rax, %rdi
	callq	_abs
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	(%r14,%r12,4), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	(%r13), %rax
	movq	8(%rax,%r15), %rax
	subq	(%rax,%rbx,8), %rdi
	callq	_abs
	movl	%eax, %r13d
	movq	(%r14,%r12,4), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_abs
	cmpl	$20000, %eax                    ## imm = 0x4E20
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	jl	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$20000, %eax                    ## imm = 0x4E20
	jl	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$20000, %r13d                   ## imm = 0x4E20
	jge	LBB0_30
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$20000, %eax                    ## imm = 0x4E20
	jl	LBB0_15
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx), %rax
	movl	$0, (%rax,%rbx,4)
	jmp	LBB0_15
LBB0_21:
	movq	_MENU_MAX_HATS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%rax, %rax
	je	LBB0_29
## %bb.22:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx,%r12,4), %r11
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx,%r12,4), %rdx
	movq	_HAT_UP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_HAT_DOWN_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_HAT_LEFT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_HAT_RIGHT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rdi,4), %ecx
	notl	%ecx
	andl	(%r11,%rdi,4), %ecx
	movl	%ebx, %esi
	testl	%ebx, %ecx
	jne	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movl	%r8d, %esi
	testl	%ecx, %r8d
	jne	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_23 Depth=1
	movl	%r9d, %esi
	testl	%ecx, %r9d
	jne	LBB0_27
## %bb.26:                              ##   in Loop: Header=BB0_23 Depth=1
	movl	%r10d, %esi
	testl	%ecx, %r10d
	je	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_23 Depth=1
	testl	%esi, %esi
	jne	LBB0_32
LBB0_28:                                ##   in Loop: Header=BB0_23 Depth=1
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_23
LBB0_29:
	xorl	%eax, %eax
	jmp	LBB0_36
LBB0_30:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r12,4), %rax
	cmpq	$0, (%rax,%rbx,8)
	jle	LBB0_33
## %bb.31:
	movl	%ebx, %edi
	callq	_AXIS_POS
	jmp	LBB0_34
LBB0_32:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_HAT_MAP
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movq	_AXIS_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rcx)
	jmp	LBB0_35
LBB0_33:
	movl	%ebx, %edi
	callq	_AXIS_NEG
LBB0_34:
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
	movq	_NO_BTN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r12,4), %rax
	cmpq	$0, (%rax,%rbx,8)
	movl	$32767, %eax                    ## imm = 0x7FFF
	movl	$-32767, %ecx                   ## imm = 0x8001
	cmovgl	%eax, %ecx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rax,%rdx), %rax
	movl	%ecx, (%rax,%rbx,4)
LBB0_35:
	movl	$1, %eax
LBB0_36:
	addq	$56, %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_trigger_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_trigger_pad
_menu_input_key_bind_poll_find_trigger_pad: ; @menu_input_key_bind_poll_find_trigger_pad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	ldr	x9, [x1, #8]
	mov	w8, w3
	lsl	x10, x8, #2
	add	x24, x9, x10
	ldr	x9, [x0, #8]
	add	x25, x9, x10
Lloh0:
	adrp	x9, _MENU_MAX_MBUTTONS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MENU_MAX_MBUTTONS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cbz	w9, LBB0_6
; %bb.1:
	mov	x10, #0
	ldr	x11, [x24, #24]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11, x10, lsl #3]
	cbz	x12, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x12, [x25, #24]
	ldr	x12, [x12, x10, lsl #3]
	sub	w13, w10, #128
	cmp	x12, #0
	ccmp	w13, #8, #2, eq
	b.hi	LBB0_2
; %bb.5:
	str	w10, [x2]
	b	LBB0_32
LBB0_6:
Lloh3:
	adrp	x9, _MENU_MAX_BUTTONS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MENU_MAX_BUTTONS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cbz	w9, LBB0_12
; %bb.7:
	mov	x10, #0
	ldr	x11, [x24, #16]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.eq	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11, x10, lsl #3]
	cbz	x12, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x12, [x25, #16]
	ldr	x12, [x12, x10, lsl #3]
	cbnz	x12, LBB0_8
; %bb.11:
	str	w10, [x2, #4]
Lloh6:
	adrp	x8, _AXIS_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AXIS_NONE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x2, #8]
	b	LBB0_32
LBB0_12:
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
Lloh9:
	adrp	x27, _MENU_MAX_AXES@GOTPAGE
Lloh10:
	ldr	x27, [x27, _MENU_MAX_AXES@GOTPAGEOFF]
	ldr	w9, [x27]
	cbz	w9, LBB0_18
; %bb.13:
	mov	x21, #0
	lsl	x26, x8, #4
	mov	w28, #20000
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x21, x21, #1
	ldr	w8, [x27]
	cmp	x21, x8
	b.hs	LBB0_18
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	lsl	x19, x21, #3
	ldr	x8, [x8, x19]
	ldr	x9, [x20]
	ldr	x9, [x9, x26]
	ldrsw	x9, [x9, x21, lsl #2]
	sub	x0, x8, x9
	bl	_abs
	mov	x22, x0
	ldr	x8, [x24]
	ldr	x8, [x8, x19]
	ldr	x9, [x20]
	add	x9, x9, x26
	ldr	x9, [x9, #8]
	ldr	x9, [x9, x19]
	sub	x0, x8, x9
	bl	_abs
	mov	x23, x0
	ldr	x8, [x24]
	ldr	x0, [x8, x19]
	bl	_abs
	cmp	w0, w28
	ccmp	w22, w28, #8, ge
	ccmp	w23, w28, #8, ge
	b.ge	LBB0_27
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w22, w28
	b.lt	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x26]
	str	wzr, [x8, x21, lsl #2]
	b	LBB0_14
LBB0_18:
Lloh11:
	adrp	x8, _MENU_MAX_HATS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MENU_MAX_HATS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbz	w8, LBB0_26
; %bb.19:
	mov	x0, #0
	ldr	x9, [x24, #8]
	ldr	x10, [x25, #8]
Lloh14:
	adrp	x11, _HAT_UP_MASK@GOTPAGE
Lloh15:
	ldr	x11, [x11, _HAT_UP_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
Lloh17:
	adrp	x12, _HAT_DOWN_MASK@GOTPAGE
Lloh18:
	ldr	x12, [x12, _HAT_DOWN_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w12, [x12]
Lloh20:
	adrp	x13, _HAT_LEFT_MASK@GOTPAGE
Lloh21:
	ldr	x13, [x13, _HAT_LEFT_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w13, [x13]
Lloh23:
	adrp	x14, _HAT_RIGHT_MASK@GOTPAGE
Lloh24:
	ldr	x14, [x14, _HAT_RIGHT_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w14, [x14]
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	lsl	x15, x0, #2
	ldr	w16, [x9, x15]
	ldr	w15, [x10, x15]
	bic	w15, w16, w15
	mov	x1, x11
	tst	w15, w11
	b.ne	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x1, x12
	tst	w12, w15
	b.ne	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x1, x13
	tst	w13, w15
	b.ne	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x1, x14
	tst	w14, w15
	b.eq	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_20 Depth=1
	cbnz	w1, LBB0_29
LBB0_25:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x0, x0, #1
	cmp	x8, x0
	b.ne	LBB0_20
LBB0_26:
	mov	w0, #0
	b	LBB0_33
LBB0_27:
	ldr	x8, [x24]
	ldr	x8, [x8, x21, lsl #3]
	mov	x0, x21
	cmp	x8, #1
	b.lt	LBB0_30
; %bb.28:
	bl	_AXIS_POS
	b	LBB0_31
LBB0_29:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_HAT_MAP
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	w0, [x9, #4]
Lloh26:
	adrp	x8, _AXIS_NONE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AXIS_NONE@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	str	x8, [x9, #8]
	b	LBB0_32
LBB0_30:
	bl	_AXIS_NEG
LBB0_31:
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	x0, [x9, #8]
Lloh29:
	adrp	x8, _NO_BTN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _NO_BTN@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x9, #4]
	ldr	x8, [x24]
	ldr	x8, [x8, x21, lsl #3]
	cmp	x8, #0
	mov	w8, #32767
	cneg	w8, w8, le
	ldr	x9, [x20]
	ldr	x9, [x9, x26]
	str	w8, [x9, x21, lsl #2]
LBB0_32:
	mov	w0, #1
LBB0_33:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.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_trigger_pad
.subsections_via_symbols
