	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IN_StartupJoystick             ## -- Begin function IN_StartupJoystick
	.p2align	4, 0x90
_IN_StartupJoystick:                    ## @IN_StartupJoystick
	.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	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_joy@GOTPCREL(%rip), %r15
	movl	%eax, 4(%r15)
	movq	_in_joystick@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	callq	_joyGetNumDevs
	testl	%eax, %eax
	je	LBB0_12
## %bb.4:
	movl	$0, (%r15)
	jle	LBB0_8
## %bb.5:
	movl	%eax, %r14d
	leaq	64(%r15), %rbx
	movq	_JOY_RETURNCENTERED@GOTPCREL(%rip), %r12
	movq	_JOYERR_NOERROR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_Com_Memset
	movl	$40, 64(%r15)
	movl	(%r12), %eax
	movl	%eax, 100(%r15)
	movl	(%r15), %edi
	movq	%rbx, %rsi
	callq	_joyGetPosEx
	movq	(%r13), %rcx
	cmpq	%rcx, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r15), %edx
	incl	%edx
	movl	%edx, (%r15)
	cmpl	%r14d, %edx
	jl	LBB0_6
LBB0_9:
	cmpq	%rcx, %rax
	jne	LBB0_10
LBB0_13:
	leaq	24(%r15), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_Com_Memset
	movl	(%r15), %edi
	movq	%rbx, %rsi
	movl	$40, %edx
	callq	_joyGetDevCaps
	movq	_JOYERR_NOERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.15:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movl	56(%r15), %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movl	52(%r15), %esi
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movl	48(%r15), %esi
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movl	40(%r15), %edx
	movl	44(%r15), %esi
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movl	32(%r15), %edx
	movl	36(%r15), %esi
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movl	28(%r15), %esi
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movq	_JOYCAPS_HASPOV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	28(%r15), %eax
	leaq	L_.str.12(%rip), %rax
	leaq	L_.str.11(%rip), %rdi
	cmoveq	%rax, %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Com_Printf                     ## TAILCALL
LBB0_8:
	movq	_JOYERR_NOERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	xorl	%eax, %eax
	cmpq	%rcx, %rax
	je	LBB0_13
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_11
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
LBB0_11:
	movq	%rax, %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Com_Printf                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_joy,104,3                      ## @joy
	.comm	_in_joystick,8,3                ## @in_joystick
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Joystick is not active.\n"

L_.str.1:                               ## @.str.1
	.asciz	"joystick not found -- driver not present\n"

	.comm	_JOY_RETURNCENTERED,4,2         ## @JOY_RETURNCENTERED
	.comm	_JOYERR_NOERROR,8,3             ## @JOYERR_NOERROR
L_.str.2:                               ## @.str.2
	.asciz	"joystick not found -- no valid joysticks (%x)\n"

L_.str.3:                               ## @.str.3
	.asciz	"joystick not found -- invalid joystick capabilities (%x)\n"

L_.str.4:                               ## @.str.4
	.asciz	"Joystick found.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Pname: %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"OemVxD: %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"RegKey: %s\n"

L_.str.8:                               ## @.str.8
	.asciz	"Numbuttons: %i / %i\n"

L_.str.9:                               ## @.str.9
	.asciz	"Axis: %i / %i\n"

L_.str.10:                              ## @.str.10
	.asciz	"Caps: 0x%x\n"

	.comm	_JOYCAPS_HASPOV,4,2             ## @JOYCAPS_HASPOV
L_.str.11:                              ## @.str.11
	.asciz	"HASPOV\n"

L_.str.12:                              ## @.str.12
	.asciz	"no POV\n"

	.comm	_qtrue,4,2                      ## @qtrue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_IN_StartupJoystick             ; -- Begin function IN_StartupJoystick
	.p2align	2
_IN_StartupJoystick:                    ; @IN_StartupJoystick
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _qfalse@GOTPAGE
Lloh1:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh2:
	adrp	x21, _joy@GOTPAGE
Lloh3:
	ldr	x21, [x21, _joy@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x21, #4]
Lloh5:
	adrp	x8, _in_joystick@GOTPAGE
Lloh6:
	ldr	x8, [x8, _in_joystick@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.1:
	bl	_joyGetNumDevs
	cbz	w0, LBB0_10
; %bb.2:
	mov	x19, x0
	str	wzr, [x21]
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.3:
	mov	w22, #40
Lloh8:
	adrp	x23, _JOY_RETURNCENTERED@GOTPAGE
Lloh9:
	ldr	x23, [x23, _JOY_RETURNCENTERED@GOTPAGEOFF]
Lloh10:
	adrp	x24, _JOYERR_NOERROR@GOTPAGE
Lloh11:
	ldr	x24, [x24, _JOYERR_NOERROR@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x20, x21, #64
	mov	x0, x20
	mov	w1, #0
	mov	w2, #40
	bl	_Com_Memset
	str	w22, [x21, #64]
	ldr	w8, [x23]
	str	w8, [x21, #100]
	ldr	w0, [x21]
	mov	x1, x20
	bl	_joyGetPosEx
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x21]
	add	w9, w9, #1
	str	w9, [x21]
	cmp	w9, w19
	b.lt	LBB0_4
LBB0_6:
	cmp	x0, x8
	b.ne	LBB0_13
LBB0_7:
	add	x19, x21, #24
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_Com_Memset
	ldr	w0, [x21]
	mov	x1, x19
	mov	w2, #40
	bl	_joyGetDevCaps
Lloh12:
	adrp	x8, _JOYERR_NOERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _JOYERR_NOERROR@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.8:
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Com_Printf
	ldr	w8, [x21, #56]
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_Com_Printf
	ldr	w8, [x21, #52]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.6@PAGE
Lloh20:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_Com_Printf
	ldr	w8, [x21, #48]
	str	x8, [sp]
Lloh21:
	adrp	x0, l_.str.7@PAGE
Lloh22:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_Com_Printf
	ldp	w9, w8, [x21, #40]
	stp	x8, x9, [sp]
Lloh23:
	adrp	x0, l_.str.8@PAGE
Lloh24:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_Com_Printf
	ldp	w9, w8, [x21, #32]
	stp	x8, x9, [sp]
Lloh25:
	adrp	x0, l_.str.9@PAGE
Lloh26:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_Com_Printf
	ldr	w8, [x21, #28]
	str	x8, [sp]
Lloh27:
	adrp	x0, l_.str.10@PAGE
Lloh28:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_Com_Printf
	ldr	w8, [x21, #28]
Lloh29:
	adrp	x9, _JOYCAPS_HASPOV@GOTPAGE
Lloh30:
	ldr	x9, [x9, _JOYCAPS_HASPOV@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
Lloh32:
	adrp	x10, l_.str.11@PAGE
Lloh33:
	add	x10, x10, l_.str.11@PAGEOFF
Lloh34:
	adrp	x11, l_.str.12@PAGE
Lloh35:
	add	x11, x11, l_.str.12@PAGEOFF
	tst	w9, w8
	csel	x0, x11, x10, eq
	bl	_Com_Printf
	stp	xzr, xzr, [x21, #8]
Lloh36:
	adrp	x8, _qtrue@GOTPAGE
Lloh37:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	b	LBB0_16
LBB0_9:
Lloh39:
	adrp	x0, l_.str@PAGE
Lloh40:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh41:
	adrp	x0, l_.str.1@PAGE
Lloh42:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_Com_Printf
LBB0_12:
	mov	x0, #0
Lloh43:
	adrp	x8, _JOYERR_NOERROR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _JOYERR_NOERROR@GOTPAGEOFF]
Lloh45:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
LBB0_13:
	str	x0, [sp]
Lloh46:
	adrp	x0, l_.str.2@PAGE
Lloh47:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:
	str	x0, [sp]
Lloh48:
	adrp	x0, l_.str.3@PAGE
Lloh49:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_15:
	bl	_Com_Printf
LBB0_16:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_joy,104,3                      ; @joy
	.comm	_in_joystick,8,3                ; @in_joystick
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Joystick is not active.\n"

l_.str.1:                               ; @.str.1
	.asciz	"joystick not found -- driver not present\n"

	.comm	_JOY_RETURNCENTERED,4,2         ; @JOY_RETURNCENTERED
	.comm	_JOYERR_NOERROR,8,3             ; @JOYERR_NOERROR
l_.str.2:                               ; @.str.2
	.asciz	"joystick not found -- no valid joysticks (%x)\n"

l_.str.3:                               ; @.str.3
	.asciz	"joystick not found -- invalid joystick capabilities (%x)\n"

l_.str.4:                               ; @.str.4
	.asciz	"Joystick found.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Pname: %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"OemVxD: %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"RegKey: %s\n"

l_.str.8:                               ; @.str.8
	.asciz	"Numbuttons: %i / %i\n"

l_.str.9:                               ; @.str.9
	.asciz	"Axis: %i / %i\n"

l_.str.10:                              ; @.str.10
	.asciz	"Caps: 0x%x\n"

	.comm	_JOYCAPS_HASPOV,4,2             ; @JOYCAPS_HASPOV
l_.str.11:                              ; @.str.11
	.asciz	"HASPOV\n"

l_.str.12:                              ; @.str.12
	.asciz	"no POV\n"

	.comm	_qtrue,4,2                      ; @qtrue
.subsections_via_symbols
