	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handler_data
_handler_data:                          ## @handler_data
	.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, %r15
	movq	%rdi, %r14
	movl	8(%rsi), %r12d
	movl	12(%rsi), %ebx
	shll	$8, %ebx
	orl	16(%rsi), %ebx
	callq	_handler_keys
	movq	_WIIPROTO_REQ_RMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_wiimote_cmd_pending
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	xorl	%edx, %edx
	testb	$15, %r12b
	jne	LBB0_3
## %bb.2:
	sarl	$4, %r12d
	leal	1(%r12), %edx
	movl	(%r14), %eax
	cmpl	%eax, %r12d
	cmovgel	%eax, %edx
LBB0_3:
	movl	%edx, (%r14)
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	addq	$20, %r15
	movq	%r15, %rsi
	callq	_memcpy
LBB0_5:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wiimote_cmd_complete           ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIPROTO_REQ_RMEM,4,2          ## @WIIPROTO_REQ_RMEM
	.no_dead_strip	_handler_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handler_data
_handler_data:                          ; @handler_data
	.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	x20, x1
	mov	x19, x0
	ldp	w9, w8, [x1, #12]
	ldr	w22, [x1, #8]
	orr	w21, w8, w9, lsl #8
	bl	_handler_keys
Lloh0:
	adrp	x8, _WIIPROTO_REQ_RMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WIIPROTO_REQ_RMEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_wiimote_cmd_pending
	cbz	x0, LBB0_3
; %bb.1:
	tst	w22, #0xf
	b.eq	LBB0_4
; %bb.2:
	mov	w2, #0
	b	LBB0_5
LBB0_3:
	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
LBB0_4:
	asr	w8, w22, #4
	add	w9, w8, #1
	ldr	w10, [x19]
	cmp	w8, w10
	csel	w2, w9, w10, lt
LBB0_5:
	str	w2, [x19]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_7
; %bb.6:
	add	x1, x20, #20
	bl	_memcpy
LBB0_7:
	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
	b	_wiimote_cmd_complete
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIPROTO_REQ_RMEM,4,2          ; @WIIPROTO_REQ_RMEM
	.no_dead_strip	_handler_data
.subsections_via_symbols
