	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xinput_joypad_axis
_xinput_joypad_axis:                    ## @xinput_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	%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	_AXIS_NONE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	%rsi, (%rax)
	je	LBB0_17
## %bb.1:
	movq	%rsi, %r15
	callq	_pad_index_to_xuser_index
	movq	_g_xinput_states@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	cltq
	leaq	(%rax,%rax,8), %rdx
	leaq	(%rdx,%rdx,2), %r12
	addq	%rax, %r12
	cmpl	$0, 24(%rcx,%r12)
	je	LBB0_17
## %bb.2:
	movq	%r15, %rdi
	callq	_AXIS_NEG_GET
	movl	%eax, %r14d
	cmpl	$3, %eax
	jg	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_AXIS_NEG_GET
	jmp	LBB0_6
LBB0_4:
	movq	%r15, %rdi
	callq	_AXIS_POS_GET
	xorl	%ecx, %ecx
	movl	$0, %edx
	cmpl	$5, %eax
	jg	LBB0_16
## %bb.5:
	movq	%r15, %rdi
	callq	_AXIS_POS_GET
LBB0_6:
	cmpl	$4, %r14d
	setge	%cl
	cmpl	$5, %eax
	ja	LBB0_7
## %bb.8:
	movq	(%r13), %rdx
	movl	%eax, %eax
	leaq	LJTI0_0(%rip), %rsi
	movslq	(%rsi,%rax,4), %rax
	addq	%rsi, %rax
	jmpq	*%rax
LBB0_9:
	movl	(%rdx,%r12), %edx
	jmp	LBB0_16
LBB0_7:
	xorl	%edx, %edx
	jmp	LBB0_16
LBB0_10:
	movl	4(%rdx,%r12), %edx
	jmp	LBB0_16
LBB0_11:
	movl	8(%rdx,%r12), %edx
	jmp	LBB0_16
LBB0_12:
	movl	12(%rdx,%r12), %edx
	jmp	LBB0_16
LBB0_13:
	movl	16(%rdx,%r12), %eax
	jmp	LBB0_15
LBB0_14:
	movl	20(%rdx,%r12), %eax
LBB0_15:
	movl	%eax, %edx
	shll	$15, %edx
	subl	%eax, %edx
	movslq	%edx, %rdx
	imulq	$-2139062143, %rdx, %rax        ## imm = 0x80808081
	shrq	$32, %rax
	addl	%eax, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	sarl	$7, %edx
	addl	%eax, %edx
LBB0_16:
	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
	cmpl	$-32768, %eax                   ## imm = 0x8000
	movl	$-32767, %ebx                   ## imm = 0x8001
	cmovnel	%eax, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_AXIS_NONE,8,3                  ## @AXIS_NONE
	.comm	_g_xinput_states,8,3            ## @g_xinput_states
	.comm	_dinput_joypad,8,3              ## @dinput_joypad
	.no_dead_strip	_xinput_joypad_axis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xinput_joypad_axis
_xinput_joypad_axis:                    ; @xinput_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]
	cmp	x8, x1
	b.eq	LBB0_4
; %bb.1:
	mov	x21, x1
	bl	_pad_index_to_xuser_index
Lloh3:
	adrp	x22, _g_xinput_states@GOTPAGE
Lloh4:
	ldr	x22, [x22, _g_xinput_states@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w9, #28
	smaddl	x8, w0, w9, x8
	ldr	w8, [x8, #24]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x20, x0
	mov	x0, x21
	bl	_AXIS_NEG_GET
	mov	x19, x0
	cmp	w0, #3
	b.gt	LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_AXIS_NEG_GET
	b	LBB0_7
LBB0_4:
	mov	w0, #0
	b	LBB0_19
LBB0_5:
	mov	x0, x21
	bl	_AXIS_POS_GET
	cmp	w0, #5
	b.gt	LBB0_10
; %bb.6:
	mov	x0, x21
	bl	_AXIS_POS_GET
LBB0_7:
	cmp	w19, #3
	cset	w8, gt
	cmp	w0, #5
	b.hi	LBB0_11
; %bb.8:
	sxtw	x9, w20
	ldr	x10, [x22]
	mov	w11, w0
Lloh5:
	adrp	x12, lJTI0_0@PAGE
Lloh6:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_9
	ldrb	w14, [x12, x11]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_9:
	mov	w11, #28
	mul	x9, x9, x11
	ldr	w9, [x10, x9]
	b	LBB0_18
LBB0_10:
	mov	w8, #0
LBB0_11:
	mov	w9, #0
	b	LBB0_18
LBB0_12:
	mov	w11, #28
	madd	x9, x9, x11, x10
	ldr	w9, [x9, #4]
	b	LBB0_18
LBB0_13:
	mov	w11, #28
	madd	x9, x9, x11, x10
	ldr	w9, [x9, #8]
	b	LBB0_18
LBB0_14:
	mov	w11, #28
	madd	x9, x9, x11, x10
	ldr	w9, [x9, #12]
	b	LBB0_18
LBB0_15:
	mov	w11, #28
	madd	x9, x9, x11, x10
	ldr	w9, [x9, #16]
	b	LBB0_17
LBB0_16:
	mov	w11, #28
	madd	x9, x9, x11, x10
	ldr	w9, [x9, #20]
LBB0_17:
	lsl	w10, w9, #15
	mov	w11, #32897
	movk	w11, #32896, lsl #16
	sub	w9, w10, w9
	smull	x10, w9, w11
	lsr	x10, x10, #32
	add	w9, w10, w9
	asr	w10, w9, #7
	add	w9, w10, w9, lsr #31
LBB0_18:
	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	w8, wzr, w9, ne
	cmn	w8, #8, lsl #12                 ; =32768
	mov	w9, #-32767
	csel	w0, w9, w8, eq
LBB0_19:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
	.byte	(LBB0_14-LBB0_9)>>2
	.byte	(LBB0_15-LBB0_9)>>2
	.byte	(LBB0_16-LBB0_9)>>2
                                        ; -- End function
	.comm	_AXIS_NONE,8,3                  ; @AXIS_NONE
	.comm	_g_xinput_states,8,3            ; @g_xinput_states
	.comm	_dinput_joypad,8,3              ; @dinput_joypad
	.no_dead_strip	_xinput_joypad_axis
.subsections_via_symbols
