	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_sdl_num_joysticks
_get_sdl_num_joysticks:                 ## @get_sdl_num_joysticks
	.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	_SDL_INIT_JOYSTICK@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_SDL_WasInit
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_SDL_NumJoysticks               ## TAILCALL
LBB0_1:
	movl	(%rbx), %edi
	callq	_SDL_InitSubSystem
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.4:
	xorl	%eax, %eax
	callq	_SDL_NumJoysticks
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_SDL_QuitSubSystem
	movl	%r14d, %eax
	jmp	LBB0_5
LBB0_2:
	movq	_M64MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_SDL_GetError
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_DebugMessage
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_INIT_JOYSTICK,4,2          ## @SDL_INIT_JOYSTICK
	.comm	_M64MSG_ERROR,4,2               ## @M64MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't init SDL joystick subsystem: %s"

	.no_dead_strip	_get_sdl_num_joysticks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_sdl_num_joysticks
_get_sdl_num_joysticks:                 ; @get_sdl_num_joysticks
	.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	x20, _SDL_INIT_JOYSTICK@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SDL_INIT_JOYSTICK@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_SDL_WasInit
	cbz	w0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_SDL_NumJoysticks
LBB0_2:
	ldr	w0, [x20]
	bl	_SDL_InitSubSystem
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.3:
	bl	_SDL_NumJoysticks
	mov	x19, x0
	ldr	w0, [x20]
	bl	_SDL_QuitSubSystem
	mov	x0, x19
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _M64MSG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M64MSG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
	bl	_SDL_GetError
	mov	x2, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DebugMessage
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_INIT_JOYSTICK,4,2          ; @SDL_INIT_JOYSTICK
	.comm	_M64MSG_ERROR,4,2               ; @M64MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't init SDL joystick subsystem: %s"

	.no_dead_strip	_get_sdl_num_joysticks
.subsections_via_symbols
