	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parse_event                    ## -- Begin function parse_event
	.p2align	4, 0x90
_parse_event:                           ## @parse_event
	.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	(%rdi), %rbx
	movl	(%rbx), %esi
	leal	-128(%rsi), %eax
	cmpl	$9, %eax
	ja	LBB0_12
## %bb.1:
	movq	%rdi, %r14
	leaq	4(%rbx), %rsi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_event_data_read                ## TAILCALL
LBB0_12:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WIIUSE_WARNING                 ## TAILCALL
LBB0_2:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_event_status                   ## TAILCALL
LBB0_10:
	movq	%r14, %rdi
	callq	_wiiuse_pressed_buttons
	leaq	12(%rbx), %rsi
	movq	%r14, %rdi
	callq	_calculate_basic_ir
	addq	$52, %rbx
	jmp	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	callq	_wiiuse_pressed_buttons
	addq	$12, %rbx
	jmp	LBB0_8
LBB0_11:
	movq	%r14, %rdi
	callq	_wiiuse_pressed_buttons
	movl	4(%rbx), %eax
	movl	12(%rbx), %ecx
	shrl	$5, %eax
	andl	$3, %eax
	leal	(%rax,%rcx,4), %eax
	leaq	16(%r14), %r15
	movl	%eax, 16(%r14)
	movl	8(%rbx), %eax
	movl	16(%rbx), %ecx
	shrl	$4, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 20(%r14)
	movl	8(%rbx), %eax
	movl	20(%rbx), %ecx
	shrl	$5, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r14)
	leaq	28(%r14), %r12
	leaq	32(%r14), %r13
	movq	_WIIUSE_SMOOTHING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_WIIMOTE_IS_FLAG_SET
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%eax, %ecx
	callq	_calculate_orientation
	leaq	12(%r14), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_calculate_gforce
	leaq	24(%rbx), %rsi
	movq	%r14, %rdi
	callq	_calculate_basic_ir
	addq	$64, %rbx
	jmp	LBB0_8
LBB0_6:
	movq	%r14, %rdi
	callq	_wiiuse_pressed_buttons
	movl	4(%rbx), %eax
	movl	12(%rbx), %ecx
	shrl	$5, %eax
	andl	$3, %eax
	leal	(%rax,%rcx,4), %eax
	leaq	16(%r14), %r15
	movl	%eax, 16(%r14)
	movl	8(%rbx), %eax
	movl	16(%rbx), %ecx
	shrl	$4, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 20(%r14)
	movl	8(%rbx), %eax
	movl	20(%rbx), %ecx
	shrl	$5, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r14)
	leaq	28(%r14), %r12
	leaq	32(%r14), %r13
	movq	_WIIUSE_SMOOTHING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_WIIMOTE_IS_FLAG_SET
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%eax, %ecx
	callq	_calculate_orientation
	leaq	12(%r14), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_calculate_gforce
	addq	$24, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_calculate_extended_ir
	jmp	LBB0_14
LBB0_9:
	movq	%r14, %rdi
	callq	_wiiuse_pressed_buttons
	movl	4(%rbx), %eax
	movl	12(%rbx), %ecx
	shrl	$5, %eax
	andl	$3, %eax
	leal	(%rax,%rcx,4), %eax
	leaq	16(%r14), %r15
	movl	%eax, 16(%r14)
	movl	8(%rbx), %eax
	movl	16(%rbx), %ecx
	shrl	$4, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 20(%r14)
	movl	8(%rbx), %eax
	movl	20(%rbx), %ecx
	shrl	$5, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r14)
	leaq	28(%r14), %r12
	leaq	32(%r14), %r13
	movq	_WIIUSE_SMOOTHING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_WIIMOTE_IS_FLAG_SET
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%eax, %ecx
	callq	_calculate_orientation
	leaq	12(%r14), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_calculate_gforce
	addq	$24, %rbx
LBB0_8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_handle_expansion
	jmp	LBB0_14
LBB0_5:
	movq	%r14, %rdi
	callq	_wiiuse_pressed_buttons
	movl	4(%rbx), %eax
	movl	12(%rbx), %ecx
	shrl	$5, %eax
	andl	$3, %eax
	leal	(%rax,%rcx,4), %eax
	leaq	16(%r14), %r15
	movl	%eax, 16(%r14)
	movl	8(%rbx), %eax
	movl	16(%rbx), %ecx
	shrl	$4, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 20(%r14)
	movl	8(%rbx), %eax
	movl	20(%rbx), %ecx
	shrl	$5, %eax
	andl	$2, %eax
	leal	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r14)
	leaq	28(%r14), %rbx
	leaq	32(%r14), %r12
	movq	_WIIUSE_SMOOTHING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_WIIMOTE_IS_FLAG_SET
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_calculate_orientation
	leaq	12(%r14), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_calculate_gforce
	jmp	LBB0_14
LBB0_4:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_event_ack                      ## TAILCALL
LBB0_13:
	movq	%r14, %rdi
	callq	_wiiuse_pressed_buttons
LBB0_14:
	movq	_WIIUSE_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_10
	.long	L0_0_set_7
	.long	L0_0_set_11
	.long	L0_0_set_6
	.long	L0_0_set_9
	.long	L0_0_set_5
	.long	L0_0_set_13
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_WIIUSE_SMOOTHING,4,2           ## @WIIUSE_SMOOTHING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown event, can not handle it [Code 0x%x]."

	.comm	_WIIUSE_EVENT,4,2               ## @WIIUSE_EVENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_parse_event                    ; -- Begin function parse_event
	.p2align	2
_parse_event:                           ; @parse_event
	.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
	ldr	x23, [x0]
	mov	x1, x23
	ldr	w8, [x1], #4
	sub	w9, w8, #128
	cmp	w9, #9
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, lJTI0_0@PAGE
Lloh1:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	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	_event_data_read
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x8
	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_WARNING
LBB0_4:
	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	_event_status
LBB0_5:
	mov	x0, x19
	bl	_wiiuse_pressed_buttons
	add	x1, x23, #12
	mov	x0, x19
	bl	_calculate_basic_ir
	add	x1, x23, #52
	b	LBB0_10
LBB0_6:
	mov	x0, x19
	bl	_wiiuse_pressed_buttons
	add	x1, x23, #12
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	bl	_wiiuse_pressed_buttons
	ldr	w8, [x23, #12]
	lsl	w8, w8, #2
	ldr	w9, [x23, #4]
	bfxil	w8, w9, #5, #2
	mov	x20, x19
	str	w8, [x20, #16]!
	ldr	w8, [x23, #16]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #4
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #20]
	ldr	w8, [x23, #20]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #5
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #24]
	add	x21, x19, #28
	add	x22, x19, #32
Lloh4:
	adrp	x8, _WIIUSE_SMOOTHING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WIIUSE_SMOOTHING@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_FLAG_SET
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_calculate_orientation
	add	x2, x19, #12
	mov	x0, x21
	mov	x1, x20
	bl	_calculate_gforce
	add	x1, x23, #24
	mov	x0, x19
	bl	_calculate_basic_ir
	add	x1, x23, #64
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_wiiuse_pressed_buttons
	ldr	w8, [x23, #12]
	lsl	w8, w8, #2
	ldr	w9, [x23, #4]
	bfxil	w8, w9, #5, #2
	mov	x20, x19
	str	w8, [x20, #16]!
	ldr	w8, [x23, #16]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #4
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #20]
	ldr	w8, [x23, #20]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #5
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #24]
	add	x21, x19, #28
	add	x22, x19, #32
Lloh7:
	adrp	x8, _WIIUSE_SMOOTHING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WIIUSE_SMOOTHING@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_FLAG_SET
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_calculate_orientation
	add	x2, x19, #12
	mov	x0, x21
	mov	x1, x20
	bl	_calculate_gforce
	add	x1, x23, #24
	mov	x0, x19
	bl	_calculate_extended_ir
	b	LBB0_14
LBB0_9:
	mov	x0, x19
	bl	_wiiuse_pressed_buttons
	ldr	w8, [x23, #12]
	lsl	w8, w8, #2
	ldr	w9, [x23, #4]
	bfxil	w8, w9, #5, #2
	mov	x20, x19
	str	w8, [x20, #16]!
	ldr	w8, [x23, #16]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #4
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #20]
	ldr	w8, [x23, #20]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #5
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #24]
	add	x21, x19, #28
	add	x22, x19, #32
Lloh10:
	adrp	x8, _WIIUSE_SMOOTHING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WIIUSE_SMOOTHING@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_FLAG_SET
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_calculate_orientation
	add	x2, x19, #12
	mov	x0, x21
	mov	x1, x20
	bl	_calculate_gforce
	add	x1, x23, #24
LBB0_10:
	mov	x0, x19
	bl	_handle_expansion
	b	LBB0_14
LBB0_11:
	mov	x0, x19
	bl	_wiiuse_pressed_buttons
	ldr	w8, [x23, #12]
	lsl	w8, w8, #2
	ldr	w9, [x23, #4]
	bfxil	w8, w9, #5, #2
	mov	x20, x19
	str	w8, [x20, #16]!
	ldr	w8, [x23, #16]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #4
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #20]
	ldr	w8, [x23, #20]
	ldr	w9, [x23, #8]
	lsr	w9, w9, #5
	and	w9, w9, #0x2
	bfi	w9, w8, #2, #30
	str	w9, [x19, #24]
	add	x21, x19, #28
	add	x22, x19, #32
Lloh13:
	adrp	x8, _WIIUSE_SMOOTHING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WIIUSE_SMOOTHING@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_FLAG_SET
	mov	x3, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_calculate_orientation
	add	x2, x19, #12
	mov	x0, x21
	mov	x1, x20
	bl	_calculate_gforce
	b	LBB0_14
LBB0_12:
	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	_event_ack
LBB0_13:
	mov	x0, x19
	bl	_wiiuse_pressed_buttons
LBB0_14:
Lloh16:
	adrp	x8, _WIIUSE_EVENT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WIIUSE_EVENT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
                                        ; -- End function
	.comm	_WIIUSE_SMOOTHING,4,2           ; @WIIUSE_SMOOTHING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown event, can not handle it [Code 0x%x]."

	.comm	_WIIUSE_EVENT,4,2               ; @WIIUSE_EVENT
.subsections_via_symbols
