	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gx_joypad_init
_gx_joypad_init:                        ## @gx_joypad_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_reset_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SYS_SetResetCallback
	movq	_DEFAULT_MAX_PADS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	_pad_type@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	movq	_WPAD_EXP_NOCONTROLLER@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %edi
	movl	%edi, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%rax), %rdi
	cmpq	%rdi, %rdx
	jl	LBB0_2
LBB0_3:
	xorl	%eax, %eax
	callq	_PAD_Init
	xorl	%eax, %eax
	callq	_gx_joypad_poll
	movl	$1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_reset_cb,4,2                   ## @reset_cb
	.comm	_DEFAULT_MAX_PADS,4,2           ## @DEFAULT_MAX_PADS
	.comm	_WPAD_EXP_NOCONTROLLER,4,2      ## @WPAD_EXP_NOCONTROLLER
	.comm	_pad_type,8,3                   ## @pad_type
	.comm	_WPAD_CHAN_ALL,4,2              ## @WPAD_CHAN_ALL
	.comm	_WPAD_FMT_BTNS_ACC_IR,4,2       ## @WPAD_FMT_BTNS_ACC_IR
	.comm	_power_callback,4,2             ## @power_callback
	.no_dead_strip	_gx_joypad_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gx_joypad_init
_gx_joypad_init:                        ; @gx_joypad_init
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _reset_cb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reset_cb@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_SYS_SetResetCallback
Lloh3:
	adrp	x8, _DEFAULT_MAX_PADS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEFAULT_MAX_PADS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x9, #0
Lloh5:
	adrp	x10, _pad_type@GOTPAGE
Lloh6:
	ldr	x10, [x10, _pad_type@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	adrp	x11, _WPAD_EXP_NOCONTROLLER@GOTPAGE
Lloh9:
	ldr	x11, [x11, _WPAD_EXP_NOCONTROLLER@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	str	w12, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_2
LBB0_3:
	bl	_PAD_Init
	bl	_gx_joypad_poll
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_reset_cb,4,2                   ; @reset_cb
	.comm	_DEFAULT_MAX_PADS,4,2           ; @DEFAULT_MAX_PADS
	.comm	_WPAD_EXP_NOCONTROLLER,4,2      ; @WPAD_EXP_NOCONTROLLER
	.comm	_pad_type,8,3                   ; @pad_type
	.comm	_WPAD_CHAN_ALL,4,2              ; @WPAD_CHAN_ALL
	.comm	_WPAD_FMT_BTNS_ACC_IR,4,2       ; @WPAD_FMT_BTNS_ACC_IR
	.comm	_power_callback,4,2             ; @power_callback
	.no_dead_strip	_gx_joypad_init
.subsections_via_symbols
