	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_joypad_axis
_psp_joypad_axis:                       ## @psp_joypad_axis
	.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	_AXIS_NONE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpq	%rsi, (%rcx)
	je	LBB0_16
## %bb.1:
	movl	%edi, %r15d
	movq	_DEFAULT_MAX_PADS@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	jbe	LBB0_16
## %bb.2:
	movq	%rsi, %rbx
	movq	%rsi, %rdi
	callq	_AXIS_NEG_GET
	movl	%eax, %r14d
	cmpl	$3, %eax
	jg	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_AXIS_NEG_GET
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	callq	_AXIS_POS_GET
	xorl	%ecx, %ecx
	movl	$0, %edx
	cmpl	$3, %eax
	jg	LBB0_15
## %bb.5:
	movq	%rbx, %rdi
	callq	_AXIS_POS_GET
LBB0_6:
	cmpl	$4, %r14d
	setge	%cl
	cmpl	$3, %eax
	ja	LBB0_7
## %bb.8:
	movl	%eax, %eax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_9:
	movq	_analog_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %edx
	movq	(%rax,%rdx,8), %rax
	movq	(%rax), %rax
	jmp	LBB0_14
LBB0_7:
	xorl	%edx, %edx
	jmp	LBB0_15
LBB0_10:
	movq	_analog_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %edx
	movq	(%rax,%rdx,8), %rax
	movq	(%rax), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_analog_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %edx
	movq	(%rax,%rdx,8), %rax
	movq	8(%rax), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_analog_state@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %edx
	movq	(%rax,%rdx,8), %rax
	movq	8(%rax), %rax
LBB0_13:
	addq	$4, %rax
LBB0_14:
	movl	(%rax), %edx
LBB0_15:
	xorl	%eax, %eax
	testl	%edx, %edx
	movl	%edx, %esi
	cmovsl	%eax, %esi
	testb	%cl, %cl
	cmovel	%edx, %esi
	testl	%edx, %edx
	cmovlel	%esi, %eax
	cmpl	$4, %r14d
	cmovgel	%esi, %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.end_data_region
                                        ## -- End function
	.comm	_AXIS_NONE,8,3                  ## @AXIS_NONE
	.comm	_DEFAULT_MAX_PADS,4,2           ## @DEFAULT_MAX_PADS
	.comm	_analog_state,8,3               ## @analog_state
	.no_dead_strip	_psp_joypad_axis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psp_joypad_axis
_psp_joypad_axis:                       ; @psp_joypad_axis
	.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, _AXIS_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AXIS_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _DEFAULT_MAX_PADS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEFAULT_MAX_PADS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x8, x1
	ccmp	w9, w0, #0, ne
	b.hi	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_17
LBB0_2:
	mov	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_AXIS_NEG_GET
	mov	x19, x0
	cmp	w0, #3
	b.gt	LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_AXIS_NEG_GET
	b	LBB0_6
LBB0_4:
	mov	x0, x21
	bl	_AXIS_POS_GET
	cmp	w0, #3
	b.gt	LBB0_9
; %bb.5:
	mov	x0, x21
	bl	_AXIS_POS_GET
LBB0_6:
	cmp	w19, #3
	cset	w8, gt
	cmp	w0, #3
	b.hi	LBB0_10
; %bb.7:
	mov	w9, w0
Lloh6:
	adrp	x10, lJTI0_0@PAGE
Lloh7:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_8
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_8:
Lloh8:
	adrp	x9, _analog_state@GOTPAGE
Lloh9:
	ldr	x9, [x9, _analog_state@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	x9, [x9, w20, uxtw #3]
	ldr	x9, [x9]
	b	LBB0_15
LBB0_9:
	mov	w8, #0
LBB0_10:
	mov	w9, #0
	b	LBB0_16
LBB0_11:
Lloh11:
	adrp	x9, _analog_state@GOTPAGE
Lloh12:
	ldr	x9, [x9, _analog_state@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	ldr	x9, [x9, w20, uxtw #3]
	ldr	x9, [x9]
	b	LBB0_14
LBB0_12:
Lloh14:
	adrp	x9, _analog_state@GOTPAGE
Lloh15:
	ldr	x9, [x9, _analog_state@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	x9, [x9, w20, uxtw #3]
	ldr	x9, [x9, #8]
	b	LBB0_15
LBB0_13:
Lloh17:
	adrp	x9, _analog_state@GOTPAGE
Lloh18:
	ldr	x9, [x9, _analog_state@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	x9, [x9, w20, uxtw #3]
	ldr	x9, [x9, #8]
LBB0_14:
	add	x9, x9, #4
LBB0_15:
	ldr	w9, [x9]
LBB0_16:
	cmp	w19, #4
	cset	w10, lt
	cmp	w9, #0
	cset	w11, gt
	and	w10, w10, w11
	cset	w11, lt
	and	w8, w8, w11
	orr	w8, w10, w8
	cmp	w8, #0
	csel	w0, wzr, w9, ne
LBB0_17:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
	.byte	(LBB0_12-LBB0_8)>>2
	.byte	(LBB0_13-LBB0_8)>>2
                                        ; -- End function
	.comm	_AXIS_NONE,8,3                  ; @AXIS_NONE
	.comm	_DEFAULT_MAX_PADS,4,2           ; @DEFAULT_MAX_PADS
	.comm	_analog_state,8,3               ; @analog_state
	.no_dead_strip	_psp_joypad_axis
.subsections_via_symbols
