	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiiu_hid_read_loop_callback
_wiiu_hid_read_loop_callback:           ## @wiiu_hid_read_loop_callback
	.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
	testq	%r8, %r8
	je	LBB0_6
## %bb.1:
	movq	%r8, %rbx
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%esi, %r12d
	testl	%esi, %esi
	jns	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_report_hid_error
LBB0_3:
	movq	(%rbx), %rax
	movq	_ADAPTER_STATE_READING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_ADAPTER_STATE_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	testl	%r12d, %r12d
	je	LBB0_7
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RARCH_ERR                      ## TAILCALL
LBB0_7:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read_loop_callback: bad userdata\n"

L_.str.1:                               ## @.str.1
	.asciz	"async read failed"

	.comm	_ADAPTER_STATE_READING,8,3      ## @ADAPTER_STATE_READING
	.comm	_ADAPTER_STATE_READY,8,3        ## @ADAPTER_STATE_READY
	.no_dead_strip	_wiiu_hid_read_loop_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiiu_hid_read_loop_callback
_wiiu_hid_read_loop_callback:           ; @wiiu_hid_read_loop_callback
	.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
	cbz	x4, LBB0_6
; %bb.1:
	mov	x21, x4
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	tbz	w1, #31, LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_report_hid_error
LBB0_3:
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _ADAPTER_STATE_READING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ADAPTER_STATE_READING@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _ADAPTER_STATE_READY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADAPTER_STATE_READY@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x21]
	cbz	w22, LBB0_7
LBB0_5:
	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_6:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	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	_RARCH_ERR
LBB0_7:
	ldr	x8, [x21, #16]
	ldr	x3, [x8]
	ldr	w0, [x21, #8]
	mov	x1, x20
	mov	x2, 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
	br	x3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read_loop_callback: bad userdata\n"

l_.str.1:                               ; @.str.1
	.asciz	"async read failed"

	.comm	_ADAPTER_STATE_READING,8,3      ; @ADAPTER_STATE_READING
	.comm	_ADAPTER_STATE_READY,8,3        ; @ADAPTER_STATE_READY
	.no_dead_strip	_wiiu_hid_read_loop_callback
.subsections_via_symbols
