	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wiiuse_set_motion_plus         ## -- Begin function wiiuse_set_motion_plus
	.p2align	4, 0x90
_wiiuse_set_motion_plus:                ## @wiiuse_set_motion_plus
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_WIIMOTE_STATE_EXP_HANDSHAKE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_WIIMOTE_ENABLE_STATE
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	_wiiuse_motion_plus_check@GOTPCREL(%rip), %rax
	movq	_WM_EXP_MOTION_PLUS_ENABLE@GOTPCREL(%rip), %rcx
	movl	$4, %edx
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_wiiuse_disable_expansion
	movq	_wiiuse_set_motion_plus_clear1@GOTPCREL(%rip), %rax
	movq	_WM_EXP_MEM_ENABLE1@GOTPCREL(%rip), %rcx
	movl	$85, %edx
LBB0_4:
	movl	%edx, -28(%rbp)
	movl	(%rcx), %esi
	movl	(%rax), %r8d
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_wiiuse_write_data
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIMOTE_STATE_EXP_HANDSHAKE,4,2 ## @WIIMOTE_STATE_EXP_HANDSHAKE
	.comm	_WM_EXP_MOTION_PLUS_ENABLE,4,2  ## @WM_EXP_MOTION_PLUS_ENABLE
	.comm	_wiiuse_motion_plus_check,4,2   ## @wiiuse_motion_plus_check
	.comm	_WM_EXP_MEM_ENABLE1,4,2         ## @WM_EXP_MEM_ENABLE1
	.comm	_wiiuse_set_motion_plus_clear1,4,2 ## @wiiuse_set_motion_plus_clear1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wiiuse_set_motion_plus         ; -- Begin function wiiuse_set_motion_plus
	.p2align	2
_wiiuse_set_motion_plus:                ; @wiiuse_set_motion_plus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _WIIMOTE_STATE_EXP_HANDSHAKE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WIIMOTE_STATE_EXP_HANDSHAKE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_WIIMOTE_IS_SET
	cbnz	x0, LBB0_5
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_WIIMOTE_ENABLE_STATE
	cbz	w20, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _wiiuse_motion_plus_check@GOTPAGE
Lloh3:
	ldr	x8, [x8, _wiiuse_motion_plus_check@GOTPAGEOFF]
Lloh4:
	adrp	x9, _WM_EXP_MOTION_PLUS_ENABLE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _WM_EXP_MOTION_PLUS_ENABLE@GOTPAGEOFF]
	mov	w10, #4
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_wiiuse_disable_expansion
Lloh6:
	adrp	x8, _wiiuse_set_motion_plus_clear1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _wiiuse_set_motion_plus_clear1@GOTPAGEOFF]
Lloh8:
	adrp	x9, _WM_EXP_MEM_ENABLE1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _WM_EXP_MEM_ENABLE1@GOTPAGEOFF]
	mov	w10, #85
LBB0_4:
	str	w10, [sp, #12]
	ldr	w1, [x9]
	ldr	w4, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_wiiuse_write_data
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIMOTE_STATE_EXP_HANDSHAKE,4,2 ; @WIIMOTE_STATE_EXP_HANDSHAKE
	.comm	_WM_EXP_MOTION_PLUS_ENABLE,4,2  ; @WM_EXP_MOTION_PLUS_ENABLE
	.comm	_wiiuse_motion_plus_check,4,2   ; @wiiuse_motion_plus_check
	.comm	_WM_EXP_MEM_ENABLE1,4,2         ; @WM_EXP_MEM_ENABLE1
	.comm	_wiiuse_set_motion_plus_clear1,4,2 ; @wiiuse_set_motion_plus_clear1
.subsections_via_symbols
