	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function event_status
_event_status:                          ## @event_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	%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
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	8(%rdi), %r14
	callq	_wiiuse_pressed_buttons
	movq	_WIIUSE_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movq	_WM_CTRL_STATUS_BYTE1_ATTACHMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	8(%r15), %ebx
	movl	20(%r15), %eax
	movq	_WM_CTRL_STATUS_BYTE1_IR_ENABLED@GOTPCREL(%rip), %rcx
	movl	%ebx, %edx
	notl	%edx
	andl	(%rcx), %edx
	movl	%eax, (%r13)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_1
## %bb.3:
	movq	_WIIMOTE_STATE_IR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_ENABLE_STATE
	jmp	LBB0_7
LBB0_1:
	movq	_WIIMOTE_STATE_IR_INIT@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_DISABLE_STATE
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_wiiuse_set_ir
	jmp	LBB0_15
LBB0_5:
	movq	_WIIMOTE_STATE_IR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_DISABLE_STATE
LBB0_7:
	andl	%r12d, %ebx
	cmpl	%r12d, %ebx
	jne	LBB0_12
## %bb.8:
	movq	_WIIMOTE_STATE_EXP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	jne	LBB0_14
## %bb.9:
	movq	_WIIMOTE_STATE_EXP_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	jne	LBB0_14
## %bb.10:
	movq	_WIIMOTE_STATE_EXP_HANDSHAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	jne	LBB0_14
## %bb.11:
	movq	%r13, %rdi
	callq	_wiiuse_handshake_expansion_start
	jmp	LBB0_15
LBB0_12:
	movq	_WIIMOTE_STATE_EXP_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_DISABLE_STATE
	movq	_WIIMOTE_STATE_EXP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_WIIMOTE_IS_SET
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	_wiiuse_disable_expansion
	jmp	LBB0_15
LBB0_14:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_wiiuse_set_report_type
LBB0_15:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.16:
	movq	(%rbx), %rax
	movq	_CMD_SENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.17:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	_WM_CMD_CTRL_STATUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.18:
	movq	32(%rbx), %rax
	movq	%rax, 8(%r13)
	movq	_CMD_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	$6, %edx
	callq	*%rax
LBB0_20:
	leaq	4(%r13), %rdi
	addq	$16, %rbx
	movq	%rbx, %rsi
	callq	___lwp_queue_append
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wiiuse_send_next_command       ## TAILCALL
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIUSE_STATUS,4,2              ## @WIIUSE_STATUS
	.comm	_WM_CTRL_STATUS_BYTE1_ATTACHMENT,4,2 ## @WM_CTRL_STATUS_BYTE1_ATTACHMENT
	.comm	_WM_CTRL_STATUS_BYTE1_IR_ENABLED,4,2 ## @WM_CTRL_STATUS_BYTE1_IR_ENABLED
	.comm	_WIIMOTE_STATE_IR_INIT,4,2      ## @WIIMOTE_STATE_IR_INIT
	.comm	_WIIMOTE_STATE_IR,4,2           ## @WIIMOTE_STATE_IR
	.comm	_WIIMOTE_STATE_EXP,4,2          ## @WIIMOTE_STATE_EXP
	.comm	_WIIMOTE_STATE_EXP_FAILED,4,2   ## @WIIMOTE_STATE_EXP_FAILED
	.comm	_WIIMOTE_STATE_EXP_HANDSHAKE,4,2 ## @WIIMOTE_STATE_EXP_HANDSHAKE
	.comm	_CMD_SENT,8,3                   ## @CMD_SENT
	.comm	_WM_CMD_CTRL_STATUS,8,3         ## @WM_CMD_CTRL_STATUS
	.comm	_CMD_DONE,8,3                   ## @CMD_DONE
	.comm	_WIIMOTE_STATE_SPEAKER,4,2      ## @WIIMOTE_STATE_SPEAKER
	.comm	_WIIMOTE_STATE_SPEAKER_INIT,4,2 ## @WIIMOTE_STATE_SPEAKER_INIT
	.comm	_WM_CTRL_STATUS_BYTE1_SPEAKER_ENABLED,4,2 ## @WM_CTRL_STATUS_BYTE1_SPEAKER_ENABLED
	.no_dead_strip	_event_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function event_status
_event_status:                          ; @event_status
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_wiiuse_pressed_buttons
Lloh0:
	adrp	x8, _WIIUSE_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WIIUSE_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w22, [x20, #8]
Lloh3:
	adrp	x8, _WM_CTRL_STATUS_BYTE1_ATTACHMENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WM_CTRL_STATUS_BYTE1_ATTACHMENT@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _WM_CTRL_STATUS_BYTE1_IR_ENABLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WM_CTRL_STATUS_BYTE1_IR_ENABLED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	str	w9, [x19]
	bics	wzr, w8, w22
	b.ne	LBB0_3
; %bb.1:
Lloh9:
	adrp	x24, _WIIMOTE_STATE_IR@GOTPAGE
Lloh10:
	ldr	x24, [x24, _WIIMOTE_STATE_IR@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	cbnz	x0, LBB0_7
; %bb.2:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_WIIMOTE_ENABLE_STATE
	b	LBB0_7
LBB0_3:
Lloh11:
	adrp	x24, _WIIMOTE_STATE_IR_INIT@GOTPAGE
Lloh12:
	ldr	x24, [x24, _WIIMOTE_STATE_IR_INIT@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_WIIMOTE_DISABLE_STATE
	mov	x0, x19
	mov	w1, #1
	bl	_wiiuse_set_ir
	cbnz	x21, LBB0_15
	b	LBB0_20
LBB0_5:
Lloh13:
	adrp	x24, _WIIMOTE_STATE_IR@GOTPAGE
Lloh14:
	ldr	x24, [x24, _WIIMOTE_STATE_IR@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w1, [x24]
	mov	x0, x19
	bl	_WIIMOTE_DISABLE_STATE
LBB0_7:
	and	w8, w23, w22
	cmp	w8, w23
	b.ne	LBB0_12
; %bb.8:
Lloh15:
	adrp	x8, _WIIMOTE_STATE_EXP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WIIMOTE_STATE_EXP@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	cbnz	x0, LBB0_14
; %bb.9:
Lloh18:
	adrp	x8, _WIIMOTE_STATE_EXP_FAILED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WIIMOTE_STATE_EXP_FAILED@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	cbnz	x0, LBB0_14
; %bb.10:
Lloh21:
	adrp	x8, _WIIMOTE_STATE_EXP_HANDSHAKE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WIIMOTE_STATE_EXP_HANDSHAKE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	cbnz	x0, LBB0_14
; %bb.11:
	mov	x0, x19
	bl	_wiiuse_handshake_expansion_start
	cbnz	x21, LBB0_15
	b	LBB0_20
LBB0_12:
Lloh24:
	adrp	x8, _WIIMOTE_STATE_EXP_FAILED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WIIMOTE_STATE_EXP_FAILED@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_DISABLE_STATE
Lloh27:
	adrp	x8, _WIIMOTE_STATE_EXP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WIIMOTE_STATE_EXP@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	cbz	x0, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_wiiuse_disable_expansion
	cbnz	x21, LBB0_15
	b	LBB0_20
LBB0_14:
	mov	x0, x19
	mov	x1, #0
	bl	_wiiuse_set_report_type
	cbz	x21, LBB0_20
LBB0_15:
	ldr	x8, [x21]
Lloh30:
	adrp	x9, _CMD_SENT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _CMD_SENT@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.16:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
Lloh33:
	adrp	x9, _WM_CMD_CTRL_STATUS@GOTPAGE
Lloh34:
	ldr	x9, [x9, _WM_CMD_CTRL_STATUS@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.17:
	ldp	x8, x9, [x21, #24]
	str	x9, [x19, #8]
Lloh36:
	adrp	x9, _CMD_DONE@GOTPAGE
Lloh37:
	ldr	x9, [x9, _CMD_DONE@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	str	x9, [x21]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #6
	blr	x8
LBB0_19:
	add	x0, x19, #4
	add	x1, x21, #16
	bl	___lwp_queue_append
	mov	x0, x19
	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
	b	_wiiuse_send_next_command
LBB0_20:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIUSE_STATUS,4,2              ; @WIIUSE_STATUS
	.comm	_WM_CTRL_STATUS_BYTE1_ATTACHMENT,4,2 ; @WM_CTRL_STATUS_BYTE1_ATTACHMENT
	.comm	_WM_CTRL_STATUS_BYTE1_IR_ENABLED,4,2 ; @WM_CTRL_STATUS_BYTE1_IR_ENABLED
	.comm	_WIIMOTE_STATE_IR_INIT,4,2      ; @WIIMOTE_STATE_IR_INIT
	.comm	_WIIMOTE_STATE_IR,4,2           ; @WIIMOTE_STATE_IR
	.comm	_WIIMOTE_STATE_EXP,4,2          ; @WIIMOTE_STATE_EXP
	.comm	_WIIMOTE_STATE_EXP_FAILED,4,2   ; @WIIMOTE_STATE_EXP_FAILED
	.comm	_WIIMOTE_STATE_EXP_HANDSHAKE,4,2 ; @WIIMOTE_STATE_EXP_HANDSHAKE
	.comm	_CMD_SENT,8,3                   ; @CMD_SENT
	.comm	_WM_CMD_CTRL_STATUS,8,3         ; @WM_CMD_CTRL_STATUS
	.comm	_CMD_DONE,8,3                   ; @CMD_DONE
	.comm	_WIIMOTE_STATE_SPEAKER,4,2      ; @WIIMOTE_STATE_SPEAKER
	.comm	_WIIMOTE_STATE_SPEAKER_INIT,4,2 ; @WIIMOTE_STATE_SPEAKER_INIT
	.comm	_WM_CTRL_STATUS_BYTE1_SPEAKER_ENABLED,4,2 ; @WM_CTRL_STATUS_BYTE1_SPEAKER_ENABLED
	.no_dead_strip	_event_status
.subsections_via_symbols
