	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_KillJoysticks                  ## -- Begin function KillJoysticks
	.p2align	4, 0x90
_KillJoysticks:                         ## @KillJoysticks
	.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	_jinited@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_MAX_JOYSTICKS@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	movq	_Joysticks@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%rcx,%rbx,8)
	incq	%rbx
	movslq	%eax, %rdx
	cmpq	%rdx, %rbx
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_SDL_JoystickClose
	movq	(%r15), %rcx
	movl	(%r14), %eax
	jmp	LBB0_6
LBB0_7:
	movq	_SDL_INIT_JOYSTICK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SDL_QuitSubSystem
	movl	$1, %eax
	jmp	LBB0_8
LBB0_1:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jinited,4,2                    ## @jinited
	.comm	_MAX_JOYSTICKS,4,2              ## @MAX_JOYSTICKS
	.comm	_Joysticks,8,3                  ## @Joysticks
	.comm	_SDL_INIT_JOYSTICK,4,2          ## @SDL_INIT_JOYSTICK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_KillJoysticks                  ; -- Begin function KillJoysticks
	.p2align	2
_KillJoysticks:                         ; @KillJoysticks
	.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, _jinited@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jinited@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_7
; %bb.1:
Lloh3:
	adrp	x19, _MAX_JOYSTICKS@GOTPAGE
Lloh4:
	ldr	x19, [x19, _MAX_JOYSTICKS@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x20, #0
Lloh5:
	adrp	x21, _Joysticks@GOTPAGE
Lloh6:
	ldr	x21, [x21, _Joysticks@GOTPAGEOFF]
	ldr	x9, [x21]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x9, x20, lsl #3]
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x9, x20, lsl #3]
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_SDL_JoystickClose
	ldr	x9, [x21]
	ldr	w8, [x19]
	b	LBB0_3
LBB0_6:
Lloh7:
	adrp	x8, _SDL_INIT_JOYSTICK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDL_INIT_JOYSTICK@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_SDL_QuitSubSystem
	mov	w0, #1
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_jinited,4,2                    ; @jinited
	.comm	_MAX_JOYSTICKS,4,2              ; @MAX_JOYSTICKS
	.comm	_Joysticks,8,3                  ; @Joysticks
	.comm	_SDL_INIT_JOYSTICK,4,2          ; @SDL_INIT_JOYSTICK
.subsections_via_symbols
