	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_joypad_axis
_sdl_joypad_axis:                       ## @sdl_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_AXIS_NONE@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	je	LBB0_6
## %bb.1:
	movq	_sdl_pads@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%edi, %ecx
	cmpl	$0, 8(%rax,%rcx,4)
	je	LBB0_6
## %bb.2:
	movq	%rsi, %rbx
	leaq	(%rax,%rcx,4), %r14
	movq	%rsi, %rdi
	callq	_AXIS_NEG_GET
	cmpq	(%r14), %rax
	jge	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_AXIS_NEG_GET
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_sdl_pad_get_axis
	cmpl	$-32766, %eax                   ## imm = 0x8002
	movl	$-32767, %ecx                   ## imm = 0x8001
	cmovll	%ecx, %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
	jmp	LBB0_7
LBB0_4:
	movq	%rbx, %rdi
	callq	_AXIS_POS_GET
	cmpq	(%r14), %rax
	jge	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_AXIS_POS_GET
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_sdl_pad_get_axis
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovlel	%ecx, %eax
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AXIS_NONE,8,3                  ## @AXIS_NONE
	.comm	_sdl_pads,8,3                   ## @sdl_pads
	.no_dead_strip	_sdl_joypad_axis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_joypad_axis
_sdl_joypad_axis:                       ; @sdl_joypad_axis
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _AXIS_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AXIS_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.eq	LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _sdl_pads@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sdl_pads@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x19, x8, w0, uxtw #2
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
; %bb.2:
	mov	x20, x1
	mov	x0, x1
	bl	_AXIS_NEG_GET
	ldr	x8, [x19]
	cmp	x0, x8
	b.ge	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_AXIS_NEG_GET
	mov	x1, x0
	mov	x0, x19
	bl	_sdl_pad_get_axis
	mov	w8, #-32767
	cmp	w0, w8
	csel	w8, w0, w8, gt
	cmp	w8, #0
	csel	w0, w8, wzr, lt
	b	LBB0_7
LBB0_4:
	mov	x0, x20
	bl	_AXIS_POS_GET
	ldr	x8, [x19]
	cmp	x0, x8
	b.ge	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_AXIS_POS_GET
	mov	x1, x0
	mov	x0, x19
	bl	_sdl_pad_get_axis
	cmp	w0, #0
	csel	w0, w0, wzr, gt
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AXIS_NONE,8,3                  ; @AXIS_NONE
	.comm	_sdl_pads,8,3                   ; @sdl_pads
	.no_dead_strip	_sdl_joypad_axis
.subsections_via_symbols
