	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_port0_active
_check_port0_active:                    ## @check_port0_active
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_config_get_ptr
	cmpl	$1, %ebx
	jg	LBB0_2
## %bb.1:
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.3:
	movq	_WPAD_EXP_GAMECUBE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_pad_type@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%rdx)
	movl	$0, (%rax)
	xorl	%edi, %edi
	callq	_gx_joypad_name
	movq	_gx_joypad@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_input_autoconfigure_connect
	xorl	%edi, %edi
	callq	_gx_joypad_name
	xorl	%edi, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_input_config_set_device_name   ## TAILCALL
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WPAD_EXP_GAMECUBE,4,2          ## @WPAD_EXP_GAMECUBE
	.comm	_pad_type,8,3                   ## @pad_type
	.comm	_gx_joypad,4,2                  ## @gx_joypad
	.comm	_WPAD_EXP_NONE,4,2              ## @WPAD_EXP_NONE
	.no_dead_strip	_check_port0_active
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_port0_active
_check_port0_active:                    ; @check_port0_active
	.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
	mov	x19, x0
	bl	_config_get_ptr
	cmp	w19, #1
	b.gt	LBB0_3
; %bb.1:
	ldr	x8, [x0]
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.2:
Lloh0:
	adrp	x9, _WPAD_EXP_GAMECUBE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WPAD_EXP_GAMECUBE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _pad_type@GOTPAGE
Lloh4:
	ldr	x10, [x10, _pad_type@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	str	w9, [x10]
	str	wzr, [x8]
	mov	w0, #0
	bl	_gx_joypad_name
Lloh6:
	adrp	x8, _gx_joypad@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gx_joypad@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_input_autoconfigure_connect
	mov	w0, #0
	bl	_gx_joypad_name
	mov	x1, x0
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_input_config_set_device_name
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WPAD_EXP_GAMECUBE,4,2          ; @WPAD_EXP_GAMECUBE
	.comm	_pad_type,8,3                   ; @pad_type
	.comm	_gx_joypad,4,2                  ; @gx_joypad
	.comm	_WPAD_EXP_NONE,4,2              ; @WPAD_EXP_NONE
	.no_dead_strip	_check_port0_active
.subsections_via_symbols
