	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WPAD_Probe                     ## -- Begin function WPAD_Probe
	.p2align	4, 0x90
_WPAD_Probe:                            ## @WPAD_Probe
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	__CPU_ISR_Disable
	movq	___wpads_inited@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_WPAD_STATE_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	callq	__CPU_ISR_Restore
	movq	_WPAD_ERR_NOT_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_11
LBB0_2:
	movq	___wpads@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rbx
	movq	_WPAD_ERR_NO_CONTROLLER@GOTPCREL(%rip), %r15
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.3:
	movq	_WIIMOTE_STATE_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	_WIIMOTE_STATE_HANDSHAKE_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_WPAD_EXP_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_WIIMOTE_STATE_EXP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%rbx), %eax
	movl	%eax, %ecx
	andl	$-2, %ecx
	cmpl	$128, %ecx
	cmovel	%eax, %r12d
LBB0_8:
	movq	_WPAD_ERR_NONE@GOTPCREL(%rip), %r15
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	movl	%r12d, (%r14)
	jmp	LBB0_10
LBB0_5:
	movq	_WPAD_ERR_NOT_READY@GOTPCREL(%rip), %r15
LBB0_10:
	movq	(%r15), %rbx
	callq	__CPU_ISR_Restore
LBB0_11:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___wpads_inited,8,3             ## @__wpads_inited
	.comm	_WPAD_STATE_DISABLED,8,3        ## @WPAD_STATE_DISABLED
	.comm	_WPAD_ERR_NOT_READY,8,3         ## @WPAD_ERR_NOT_READY
	.comm	___wpads,8,3                    ## @__wpads
	.comm	_WIIMOTE_STATE_CONNECTED,4,2    ## @WIIMOTE_STATE_CONNECTED
	.comm	_WIIMOTE_STATE_HANDSHAKE_COMPLETE,4,2 ## @WIIMOTE_STATE_HANDSHAKE_COMPLETE
	.comm	_WPAD_EXP_NONE,4,2              ## @WPAD_EXP_NONE
	.comm	_WIIMOTE_STATE_EXP,4,2          ## @WIIMOTE_STATE_EXP
	.comm	_WPAD_ERR_NONE,8,3              ## @WPAD_ERR_NONE
	.comm	_WPAD_ERR_NO_CONTROLLER,8,3     ## @WPAD_ERR_NO_CONTROLLER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WPAD_Probe                     ; -- Begin function WPAD_Probe
	.p2align	2
_WPAD_Probe:                            ; @WPAD_Probe
	.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
	mov	x19, x1
	mov	x20, x0
	bl	__CPU_ISR_Disable
Lloh0:
	adrp	x8, ___wpads_inited@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___wpads_inited@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _WPAD_STATE_DISABLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WPAD_STATE_DISABLED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	__CPU_ISR_Restore
Lloh6:
	adrp	x8, _WPAD_ERR_NOT_READY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WPAD_ERR_NOT_READY@GOTPAGEOFF]
Lloh8:
	ldr	x19, [x8]
	b	LBB0_13
LBB0_2:
Lloh9:
	adrp	x8, ___wpads@GOTPAGE
Lloh10:
	ldr	x8, [x8, ___wpads@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x20, [x8, x20, lsl #3]
	cbz	x20, LBB0_10
; %bb.3:
Lloh12:
	adrp	x8, _WIIMOTE_STATE_CONNECTED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WIIMOTE_STATE_CONNECTED@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_WIIMOTE_IS_SET
	cbz	x0, LBB0_10
; %bb.4:
Lloh15:
	adrp	x8, _WIIMOTE_STATE_HANDSHAKE_COMPLETE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WIIMOTE_STATE_HANDSHAKE_COMPLETE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_WIIMOTE_IS_SET
	cbz	x0, LBB0_11
; %bb.5:
Lloh18:
	adrp	x8, _WPAD_EXP_NONE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WPAD_EXP_NONE@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
Lloh21:
	adrp	x8, _WIIMOTE_STATE_EXP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WIIMOTE_STATE_EXP@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_WIIMOTE_IS_SET
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w8, [x20]
	and	w9, w8, #0xfffffffe
	cmp	w9, #128
	csel	w21, w8, w21, eq
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	str	w21, [x19]
LBB0_9:
Lloh24:
	adrp	x8, _WPAD_ERR_NONE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WPAD_ERR_NONE@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh26:
	adrp	x8, _WPAD_ERR_NO_CONTROLLER@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WPAD_ERR_NO_CONTROLLER@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh28:
	adrp	x8, _WPAD_ERR_NOT_READY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _WPAD_ERR_NOT_READY@GOTPAGEOFF]
LBB0_12:
	ldr	x19, [x8]
	bl	__CPU_ISR_Restore
LBB0_13:
	mov	x0, x19
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	___wpads_inited,8,3             ; @__wpads_inited
	.comm	_WPAD_STATE_DISABLED,8,3        ; @WPAD_STATE_DISABLED
	.comm	_WPAD_ERR_NOT_READY,8,3         ; @WPAD_ERR_NOT_READY
	.comm	___wpads,8,3                    ; @__wpads
	.comm	_WIIMOTE_STATE_CONNECTED,4,2    ; @WIIMOTE_STATE_CONNECTED
	.comm	_WIIMOTE_STATE_HANDSHAKE_COMPLETE,4,2 ; @WIIMOTE_STATE_HANDSHAKE_COMPLETE
	.comm	_WPAD_EXP_NONE,4,2              ; @WPAD_EXP_NONE
	.comm	_WIIMOTE_STATE_EXP,4,2          ; @WIIMOTE_STATE_EXP
	.comm	_WPAD_ERR_NONE,8,3              ; @WPAD_ERR_NONE
	.comm	_WPAD_ERR_NO_CONTROLLER,8,3     ; @WPAD_ERR_NO_CONTROLLER
.subsections_via_symbols
