	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WPAD_SetMotionPlus             ## -- Begin function WPAD_SetMotionPlus
	.p2align	4, 0x90
_WPAD_SetMotionPlus:                    ## @WPAD_SetMotionPlus
	.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
	movl	%esi, %r14d
	movq	_WPAD_CHAN_ALL@GOTPCREL(%rip), %rax
	movq	_WPAD_CHAN_0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	cmpl	%edi, (%rax)
	jne	LBB0_6
## %bb.1:
	movq	_WPAD_MAX_WIIMOTES@GOTPCREL(%rip), %r15
	cmpl	(%r15), %ebx
	jge	LBB0_14
## %bb.2:
	movq	_WPAD_ERR_NONE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_WPAD_SetMotionPlus
	movl	%eax, %ecx
	movl	(%r12), %eax
	cmpl	%eax, %ecx
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_4
	jmp	LBB0_16
LBB0_6:
	movl	%edi, %r15d
	cmpl	%edi, %ebx
	jg	LBB0_8
## %bb.7:
	movq	_WPAD_MAX_WIIMOTES@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jle	LBB0_8
## %bb.9:
	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_11
## %bb.10:
	callq	__CPU_ISR_Restore
	movq	_WPAD_ERR_NOT_READY@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_8:
	movq	_WPAD_ERR_BAD_CHANNEL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_5:
	movl	%ecx, %eax
	jmp	LBB0_16
LBB0_11:
	movq	___wpads@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	movl	%r14d, %esi
	callq	_wiiuse_set_motion_plus
LBB0_13:
	callq	__CPU_ISR_Restore
LBB0_14:
	movq	_WPAD_ERR_NONE@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WPAD_CHAN_ALL,4,2              ## @WPAD_CHAN_ALL
	.comm	_WPAD_CHAN_0,4,2                ## @WPAD_CHAN_0
	.comm	_WPAD_MAX_WIIMOTES,4,2          ## @WPAD_MAX_WIIMOTES
	.comm	_WPAD_ERR_NONE,4,2              ## @WPAD_ERR_NONE
	.comm	_WPAD_ERR_BAD_CHANNEL,4,2       ## @WPAD_ERR_BAD_CHANNEL
	.comm	___wpads_inited,8,3             ## @__wpads_inited
	.comm	_WPAD_STATE_DISABLED,8,3        ## @WPAD_STATE_DISABLED
	.comm	_WPAD_ERR_NOT_READY,4,2         ## @WPAD_ERR_NOT_READY
	.comm	___wpads,8,3                    ## @__wpads
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WPAD_SetMotionPlus             ; -- Begin function WPAD_SetMotionPlus
	.p2align	2
_WPAD_SetMotionPlus:                    ; @WPAD_SetMotionPlus
	.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
Lloh0:
	adrp	x8, _WPAD_CHAN_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WPAD_CHAN_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _WPAD_CHAN_0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WPAD_CHAN_0@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x9]
	cmp	w8, w0
	b.ne	LBB0_5
; %bb.1:
Lloh6:
	adrp	x21, _WPAD_MAX_WIIMOTES@GOTPAGE
Lloh7:
	ldr	x21, [x21, _WPAD_MAX_WIIMOTES@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w20, w8
	b.ge	LBB0_13
; %bb.2:
Lloh8:
	adrp	x22, _WPAD_ERR_NONE@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WPAD_ERR_NONE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_WPAD_SetMotionPlus
	mov	x8, x0
	ldr	w0, [x22]
	cmp	w8, w0
	b.lt	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_3
	b	LBB0_15
LBB0_5:
	mov	x21, x0
Lloh10:
	adrp	x8, _WPAD_MAX_WIIMOTES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WPAD_MAX_WIIMOTES@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w20, w0
	ccmp	w8, w0, #4, le
	b.gt	LBB0_7
; %bb.6:
Lloh13:
	adrp	x8, _WPAD_ERR_BAD_CHANNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WPAD_ERR_BAD_CHANNEL@GOTPAGEOFF]
	b	LBB0_14
LBB0_7:
	bl	__CPU_ISR_Disable
Lloh15:
	adrp	x8, ___wpads_inited@GOTPAGE
Lloh16:
	ldr	x8, [x8, ___wpads_inited@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _WPAD_STATE_DISABLED@GOTPAGE
Lloh19:
	ldr	x9, [x9, _WPAD_STATE_DISABLED@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	bl	__CPU_ISR_Restore
Lloh21:
	adrp	x8, _WPAD_ERR_NOT_READY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WPAD_ERR_NOT_READY@GOTPAGEOFF]
	b	LBB0_14
LBB0_9:
	mov	x0, x8
	b	LBB0_15
LBB0_10:
Lloh23:
	adrp	x8, ___wpads@GOTPAGE
Lloh24:
	ldr	x8, [x8, ___wpads@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldr	x0, [x8, w21, sxtw #3]
	cbz	x0, LBB0_12
; %bb.11:
	mov	x1, x19
	bl	_wiiuse_set_motion_plus
LBB0_12:
	bl	__CPU_ISR_Restore
LBB0_13:
Lloh26:
	adrp	x8, _WPAD_ERR_NONE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WPAD_ERR_NONE@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_WPAD_CHAN_ALL,4,2              ; @WPAD_CHAN_ALL
	.comm	_WPAD_CHAN_0,4,2                ; @WPAD_CHAN_0
	.comm	_WPAD_MAX_WIIMOTES,4,2          ; @WPAD_MAX_WIIMOTES
	.comm	_WPAD_ERR_NONE,4,2              ; @WPAD_ERR_NONE
	.comm	_WPAD_ERR_BAD_CHANNEL,4,2       ; @WPAD_ERR_BAD_CHANNEL
	.comm	___wpads_inited,8,3             ; @__wpads_inited
	.comm	_WPAD_STATE_DISABLED,8,3        ; @WPAD_STATE_DISABLED
	.comm	_WPAD_ERR_NOT_READY,4,2         ; @WPAD_ERR_NOT_READY
	.comm	___wpads,8,3                    ; @__wpads
.subsections_via_symbols
