	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_joy_get_joystick               ## -- Begin function joy_get_joystick
	.p2align	4, 0x90
_joy_get_joystick:                      ## @joy_get_joystick
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_joy_count@GOTPCREL(%rip), %rcx
	movq	_joys@GOTPCREL(%rip), %rdx
	movslq	%edi, %rsi
	leaq	(,%rsi,4), %rax
	addq	(%rdx), %rax
	xorl	%edx, %edx
	cmpl	%esi, (%rcx)
	cmovleq	%rdx, %rax
	testl	%esi, %esi
	cmovsq	%rdx, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_joy_count,4,2                  ## @joy_count
	.comm	_joys,8,3                       ## @joys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_joy_get_joystick               ; -- Begin function joy_get_joystick
	.p2align	2
_joy_get_joystick:                      ; @joy_get_joystick
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _joy_count@GOTPAGE
Lloh1:
	ldr	x8, [x8, _joy_count@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	mov	w8, #-1
	ccmp	w0, w8, #4, gt
Lloh3:
	adrp	x8, _joys@GOTPAGE
Lloh4:
	ldr	x8, [x8, _joys@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x8, x8, w0, sxtw #2
	csel	x0, x8, xzr, gt
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_joy_count,4,2                  ; @joy_count
	.comm	_joys,8,3                       ; @joys
.subsections_via_symbols
