	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gx_input_UpdateMenu            ## -- Begin function gx_input_UpdateMenu
	.p2align	4, 0x90
_gx_input_UpdateMenu:                   ## @gx_input_UpdateMenu
	.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
	movq	_inputs_disabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_13
## %bb.1:
	xorl	%eax, %eax
	callq	_PAD_ScanPads
	xorl	%edi, %edi
	callq	_PAD_ButtonsDown
	movl	%eax, %r14d
	xorl	%edi, %edi
	callq	_PAD_ButtonsHeld
	movl	%eax, %r15d
	movq	_PAD_BUTTONS_HELD@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	xorl	%edi, %edi
	callq	_PAD_StickX
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_PAD_StickY
	movq	_ANALOG_SENSITIVITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %ebx
	jle	LBB0_3
## %bb.2:
	movq	_PAD_BUTTON_RIGHT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_3:
	movl	%ecx, %edx
	negl	%edx
	cmpl	%edx, %ebx
	jge	LBB0_5
## %bb.4:
	movq	_PAD_BUTTON_LEFT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	cmpl	%ecx, %eax
	jle	LBB0_7
## %bb.6:
	movq	_PAD_BUTTON_UP@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	cmpl	%edx, %eax
	jge	LBB0_10
## %bb.8:
	movq	_PAD_BUTTON_DOWN@GOTPCREL(%rip), %rax
LBB0_9:
	orl	(%rax), %r15d
LBB0_10:
	movq	_held_cnt@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	incq	%rcx
	xorl	%edx, %edx
	testl	%r15d, %r15d
	cmoveq	%rdx, %rcx
	testl	%r14d, %r14d
	cmovneq	%rdx, %rcx
	movq	%rcx, (%rax)
	movq	_HELD_DELAY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jle	LBB0_12
## %bb.11:
	orl	%r15d, %r14d
	movq	_HELD_SPEED@GOTPCREL(%rip), %rdx
	subq	(%rdx), %rcx
	movq	%rcx, (%rax)
LBB0_12:
	movq	_m_input@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_inputs_disabled,8,3            ## @inputs_disabled
	.comm	_PAD_BUTTONS_HELD,4,2           ## @PAD_BUTTONS_HELD
	.comm	_ANALOG_SENSITIVITY,4,2         ## @ANALOG_SENSITIVITY
	.comm	_PAD_BUTTON_RIGHT,4,2           ## @PAD_BUTTON_RIGHT
	.comm	_PAD_BUTTON_LEFT,4,2            ## @PAD_BUTTON_LEFT
	.comm	_PAD_BUTTON_UP,4,2              ## @PAD_BUTTON_UP
	.comm	_PAD_BUTTON_DOWN,4,2            ## @PAD_BUTTON_DOWN
	.comm	_held_cnt,8,3                   ## @held_cnt
	.comm	_HELD_DELAY,8,3                 ## @HELD_DELAY
	.comm	_HELD_SPEED,8,3                 ## @HELD_SPEED
	.comm	_m_input,16,3                   ## @m_input
	.comm	_PAD_BUTTON_A,4,2               ## @PAD_BUTTON_A
	.comm	_PAD_BUTTON_B,4,2               ## @PAD_BUTTON_B
	.comm	_PAD_TRIGGER_L,4,2              ## @PAD_TRIGGER_L
	.comm	_PAD_TRIGGER_R,4,2              ## @PAD_TRIGGER_R
	.comm	_PAD_TRIGGER_Z,4,2              ## @PAD_TRIGGER_Z
	.comm	_WPAD_BUTTONS_HELD,4,2          ## @WPAD_BUTTONS_HELD
	.comm	_WPAD_BUTTON_1,4,2              ## @WPAD_BUTTON_1
	.comm	_WPAD_BUTTON_2,4,2              ## @WPAD_BUTTON_2
	.comm	_WPAD_BUTTON_A,4,2              ## @WPAD_BUTTON_A
	.comm	_WPAD_BUTTON_B,4,2              ## @WPAD_BUTTON_B
	.comm	_WPAD_BUTTON_DOWN,4,2           ## @WPAD_BUTTON_DOWN
	.comm	_WPAD_BUTTON_HOME,4,2           ## @WPAD_BUTTON_HOME
	.comm	_WPAD_BUTTON_LEFT,4,2           ## @WPAD_BUTTON_LEFT
	.comm	_WPAD_BUTTON_MINUS,4,2          ## @WPAD_BUTTON_MINUS
	.comm	_WPAD_BUTTON_PLUS,4,2           ## @WPAD_BUTTON_PLUS
	.comm	_WPAD_BUTTON_RIGHT,4,2          ## @WPAD_BUTTON_RIGHT
	.comm	_WPAD_BUTTON_UP,4,2             ## @WPAD_BUTTON_UP
	.comm	_WPAD_CLASSIC_BUTTON_A,4,2      ## @WPAD_CLASSIC_BUTTON_A
	.comm	_WPAD_CLASSIC_BUTTON_B,4,2      ## @WPAD_CLASSIC_BUTTON_B
	.comm	_WPAD_CLASSIC_BUTTON_DOWN,4,2   ## @WPAD_CLASSIC_BUTTON_DOWN
	.comm	_WPAD_CLASSIC_BUTTON_FULL_L,4,2 ## @WPAD_CLASSIC_BUTTON_FULL_L
	.comm	_WPAD_CLASSIC_BUTTON_FULL_R,4,2 ## @WPAD_CLASSIC_BUTTON_FULL_R
	.comm	_WPAD_CLASSIC_BUTTON_HOME,4,2   ## @WPAD_CLASSIC_BUTTON_HOME
	.comm	_WPAD_CLASSIC_BUTTON_LEFT,4,2   ## @WPAD_CLASSIC_BUTTON_LEFT
	.comm	_WPAD_CLASSIC_BUTTON_RIGHT,4,2  ## @WPAD_CLASSIC_BUTTON_RIGHT
	.comm	_WPAD_CLASSIC_BUTTON_UP,4,2     ## @WPAD_CLASSIC_BUTTON_UP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gx_input_UpdateMenu            ; -- Begin function gx_input_UpdateMenu
	.p2align	2
_gx_input_UpdateMenu:                   ; @gx_input_UpdateMenu
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _inputs_disabled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _inputs_disabled@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbnz	x8, LBB0_13
; %bb.1:
	bl	_PAD_ScanPads
	mov	w0, #0
	bl	_PAD_ButtonsDown
	mov	x19, x0
	mov	w0, #0
	bl	_PAD_ButtonsHeld
Lloh3:
	adrp	x8, _PAD_BUTTONS_HELD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAD_BUTTONS_HELD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w21, w8, w0
	mov	w0, #0
	bl	_PAD_StickX
	mov	x20, x0
	mov	w0, #0
	bl	_PAD_StickY
Lloh6:
	adrp	x8, _ANALOG_SENSITIVITY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ANALOG_SENSITIVITY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w20, w8
	b.le	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _PAD_BUTTON_RIGHT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAD_BUTTON_RIGHT@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
	neg	w9, w8
	cmp	w20, w9
	b.ge	LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _PAD_BUTTON_LEFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAD_BUTTON_LEFT@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	cmp	w0, w8
	b.le	LBB0_7
; %bb.6:
Lloh13:
	adrp	x8, _PAD_BUTTON_UP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PAD_BUTTON_UP@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	cmp	w0, w9
	b.ge	LBB0_10
; %bb.8:
Lloh15:
	adrp	x8, _PAD_BUTTON_DOWN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PAD_BUTTON_DOWN@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	orr	w21, w8, w21
LBB0_10:
	cmp	w21, #0
	ccmp	w19, #0, #0, ne
Lloh17:
	adrp	x8, _held_cnt@GOTPAGE
Lloh18:
	ldr	x8, [x8, _held_cnt@GOTPAGEOFF]
	ldr	x9, [x8]
	csinc	x9, xzr, x9, ne
	str	x9, [x8]
Lloh19:
	adrp	x10, _HELD_DELAY@GOTPAGE
Lloh20:
	ldr	x10, [x10, _HELD_DELAY@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	cmp	x9, x10
	b.le	LBB0_12
; %bb.11:
	orr	w19, w21, w19
Lloh22:
	adrp	x10, _HELD_SPEED@GOTPAGE
Lloh23:
	ldr	x10, [x10, _HELD_SPEED@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	sub	x9, x9, x10
	str	x9, [x8]
LBB0_12:
Lloh25:
	adrp	x8, _m_input@GOTPAGE
Lloh26:
	ldr	x8, [x8, _m_input@GOTPAGEOFF]
Lloh27:
	str	w19, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_inputs_disabled,8,3            ; @inputs_disabled
	.comm	_PAD_BUTTONS_HELD,4,2           ; @PAD_BUTTONS_HELD
	.comm	_ANALOG_SENSITIVITY,4,2         ; @ANALOG_SENSITIVITY
	.comm	_PAD_BUTTON_RIGHT,4,2           ; @PAD_BUTTON_RIGHT
	.comm	_PAD_BUTTON_LEFT,4,2            ; @PAD_BUTTON_LEFT
	.comm	_PAD_BUTTON_UP,4,2              ; @PAD_BUTTON_UP
	.comm	_PAD_BUTTON_DOWN,4,2            ; @PAD_BUTTON_DOWN
	.comm	_held_cnt,8,3                   ; @held_cnt
	.comm	_HELD_DELAY,8,3                 ; @HELD_DELAY
	.comm	_HELD_SPEED,8,3                 ; @HELD_SPEED
	.comm	_m_input,16,3                   ; @m_input
	.comm	_PAD_BUTTON_A,4,2               ; @PAD_BUTTON_A
	.comm	_PAD_BUTTON_B,4,2               ; @PAD_BUTTON_B
	.comm	_PAD_TRIGGER_L,4,2              ; @PAD_TRIGGER_L
	.comm	_PAD_TRIGGER_R,4,2              ; @PAD_TRIGGER_R
	.comm	_PAD_TRIGGER_Z,4,2              ; @PAD_TRIGGER_Z
	.comm	_WPAD_BUTTONS_HELD,4,2          ; @WPAD_BUTTONS_HELD
	.comm	_WPAD_BUTTON_1,4,2              ; @WPAD_BUTTON_1
	.comm	_WPAD_BUTTON_2,4,2              ; @WPAD_BUTTON_2
	.comm	_WPAD_BUTTON_A,4,2              ; @WPAD_BUTTON_A
	.comm	_WPAD_BUTTON_B,4,2              ; @WPAD_BUTTON_B
	.comm	_WPAD_BUTTON_DOWN,4,2           ; @WPAD_BUTTON_DOWN
	.comm	_WPAD_BUTTON_HOME,4,2           ; @WPAD_BUTTON_HOME
	.comm	_WPAD_BUTTON_LEFT,4,2           ; @WPAD_BUTTON_LEFT
	.comm	_WPAD_BUTTON_MINUS,4,2          ; @WPAD_BUTTON_MINUS
	.comm	_WPAD_BUTTON_PLUS,4,2           ; @WPAD_BUTTON_PLUS
	.comm	_WPAD_BUTTON_RIGHT,4,2          ; @WPAD_BUTTON_RIGHT
	.comm	_WPAD_BUTTON_UP,4,2             ; @WPAD_BUTTON_UP
	.comm	_WPAD_CLASSIC_BUTTON_A,4,2      ; @WPAD_CLASSIC_BUTTON_A
	.comm	_WPAD_CLASSIC_BUTTON_B,4,2      ; @WPAD_CLASSIC_BUTTON_B
	.comm	_WPAD_CLASSIC_BUTTON_DOWN,4,2   ; @WPAD_CLASSIC_BUTTON_DOWN
	.comm	_WPAD_CLASSIC_BUTTON_FULL_L,4,2 ; @WPAD_CLASSIC_BUTTON_FULL_L
	.comm	_WPAD_CLASSIC_BUTTON_FULL_R,4,2 ; @WPAD_CLASSIC_BUTTON_FULL_R
	.comm	_WPAD_CLASSIC_BUTTON_HOME,4,2   ; @WPAD_CLASSIC_BUTTON_HOME
	.comm	_WPAD_CLASSIC_BUTTON_LEFT,4,2   ; @WPAD_CLASSIC_BUTTON_LEFT
	.comm	_WPAD_CLASSIC_BUTTON_RIGHT,4,2  ; @WPAD_CLASSIC_BUTTON_RIGHT
	.comm	_WPAD_CLASSIC_BUTTON_UP,4,2     ; @WPAD_CLASSIC_BUTTON_UP
.subsections_via_symbols
