	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wiiuse_read_data               ## -- Begin function wiiuse_read_data
	.p2align	4, 0x90
_wiiuse_read_data:                      ## @wiiuse_read_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movl	%r8d, %r12d
	movq	%rcx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_WIIMOTE_IS_CONNECTED
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	testq	%r13, %r13
	je	LBB0_6
## %bb.3:
	testq	%r14, %r14
	je	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	___lwp_queue_get
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	%r12d, 16(%rax)
	movl	$7, (%rax)
	movq	8(%rax), %r15
	movq	%rax, %r12
	movq	_WM_CMD_READ_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	%r13, 16(%r15)
	movq	%r14, 8(%r15)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_BIG_ENDIAN_LONG
	movl	%eax, 4(%r15)
	movq	%r14, %rdi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, (%r15)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	___wiiuse_push_command
	movl	$1, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WM_CMD_READ_DATA,4,2           ## @WM_CMD_READ_DATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wiiuse_read_data               ; -- Begin function wiiuse_read_data
	.p2align	2
_wiiuse_read_data:                      ; @wiiuse_read_data
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_6
; %bb.1:
	mov	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_WIIMOTE_IS_CONNECTED
	cbz	w0, LBB0_6
; %bb.2:
	mov	w0, #0
	cbz	x22, LBB0_6
; %bb.3:
	cbz	x20, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	___lwp_queue_get
	cbz	x0, LBB0_6
; %bb.5:
	mov	x24, x0
	str	w23, [x0, #16]
	mov	w8, #7
	str	w8, [x0]
	ldr	x23, [x0, #8]
Lloh0:
	adrp	x8, _WM_CMD_READ_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WM_CMD_READ_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x23, #24]
	stp	x20, x22, [x23, #8]
	mov	x0, x21
	bl	_BIG_ENDIAN_LONG
	str	w0, [x23, #4]
	mov	x0, x20
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x23]
	mov	x0, x19
	mov	x1, x24
	bl	___wiiuse_push_command
	mov	w0, #1
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WM_CMD_READ_DATA,4,2           ; @WM_CMD_READ_DATA
.subsections_via_symbols
