	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handler_status
_handler_status:                        ## @handler_status
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_handler_status_K
	movq	_WIIPROTO_FLAG_EXT_PLUGGED@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	andl	(%rbx), %eax
	testb	$2, 8(%r14)
	jne	LBB0_1
## %bb.3:
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_hid_dbg
	movl	(%r15), %eax
	notl	%eax
	andl	(%rbx), %eax
	movl	%eax, (%rbx)
	movq	_WIIPROTO_FLAG_MP_PLUGGED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx)
	movq	_WIIPROTO_FLAG_EXT_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	%ecx, %edx
	movl	%edx, (%rbx)
	movq	_WIIPROTO_FLAG_MP_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%edx, %eax
	jmp	LBB0_5
LBB0_1:
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_hid_dbg
	movl	(%rbx), %eax
	orl	(%r15), %eax
LBB0_5:
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	___wiimote_schedule
LBB0_6:
	movl	20(%r14), %eax
	movl	%eax, 4(%rbx)
	movq	_WIIPROTO_REQ_SREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_wiimote_cmd_pending
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wiimote_cmd_complete           ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIPROTO_FLAG_EXT_PLUGGED,4,2  ## @WIIPROTO_FLAG_EXT_PLUGGED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EXT hotplug: 1\n"

L_.str.1:                               ## @.str.1
	.asciz	"EXT hotplug: 0\n"

	.comm	_WIIPROTO_FLAG_MP_PLUGGED,4,2   ## @WIIPROTO_FLAG_MP_PLUGGED
	.comm	_WIIPROTO_FLAG_EXT_ACTIVE,4,2   ## @WIIPROTO_FLAG_EXT_ACTIVE
	.comm	_WIIPROTO_FLAG_MP_ACTIVE,4,2    ## @WIIPROTO_FLAG_MP_ACTIVE
	.comm	_WIIPROTO_REQ_SREQ,4,2          ## @WIIPROTO_REQ_SREQ
	.no_dead_strip	_handler_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handler_status
_handler_status:                        ; @handler_status
	.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
	bl	_handler_status_K
	ldr	w8, [x19]
Lloh0:
	adrp	x21, _WIIPROTO_FLAG_EXT_PLUGGED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WIIPROTO_FLAG_EXT_PLUGGED@GOTPAGEOFF]
	ldr	w9, [x21]
	and	w8, w9, w8
	ldrb	w9, [x20, #8]
	tbnz	w9, #1, LBB0_3
; %bb.1:
	cbz	w8, LBB0_6
; %bb.2:
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_hid_dbg
	ldr	w8, [x21]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh4:
	adrp	x9, _WIIPROTO_FLAG_MP_PLUGGED@GOTPAGE
Lloh5:
	ldr	x9, [x9, _WIIPROTO_FLAG_MP_PLUGGED@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19]
Lloh7:
	adrp	x9, _WIIPROTO_FLAG_EXT_ACTIVE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WIIPROTO_FLAG_EXT_ACTIVE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19]
Lloh10:
	adrp	x9, _WIIPROTO_FLAG_MP_ACTIVE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _WIIPROTO_FLAG_MP_ACTIVE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	bic	w8, w8, w9
	b	LBB0_5
LBB0_3:
	cbnz	w8, LBB0_6
; %bb.4:
	ldr	w0, [x19, #8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hid_dbg
	ldr	w8, [x21]
	ldr	w9, [x19]
	orr	w8, w9, w8
LBB0_5:
	str	w8, [x19]
	mov	x0, x19
	bl	___wiimote_schedule
LBB0_6:
	ldr	w8, [x20, #20]
	str	w8, [x19, #4]
Lloh15:
	adrp	x8, _WIIPROTO_REQ_SREQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WIIPROTO_REQ_SREQ@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_wiimote_cmd_pending
	cbz	x0, LBB0_8
; %bb.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
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIPROTO_FLAG_EXT_PLUGGED,4,2  ; @WIIPROTO_FLAG_EXT_PLUGGED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EXT hotplug: 1\n"

l_.str.1:                               ; @.str.1
	.asciz	"EXT hotplug: 0\n"

	.comm	_WIIPROTO_FLAG_MP_PLUGGED,4,2   ; @WIIPROTO_FLAG_MP_PLUGGED
	.comm	_WIIPROTO_FLAG_EXT_ACTIVE,4,2   ; @WIIPROTO_FLAG_EXT_ACTIVE
	.comm	_WIIPROTO_FLAG_MP_ACTIVE,4,2    ; @WIIPROTO_FLAG_MP_ACTIVE
	.comm	_WIIPROTO_REQ_SREQ,4,2          ; @WIIPROTO_REQ_SREQ
	.no_dead_strip	_handler_status
.subsections_via_symbols
