	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __wpad_eventCB
___wpad_eventCB:                        ## @__wpad_eventCB
	.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
	movq	%rdi, %r12
	cmpl	$131, %esi
	je	LBB0_5
## %bb.1:
	cmpl	$130, %esi
	je	LBB0_6
## %bb.2:
	cmpl	$129, %esi
	jne	LBB0_12
## %bb.3:
	movslq	(%r12), %rax
	movq	___wpdcb@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_EVENTQUEUE_LENGTH@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %r15
	leaq	(%rax,%rax,4), %rdi
	shlq	$4, %rdi
	leaq	(%rcx,%rdi), %r14
	addq	$8, %r14
	movq	8(%rcx,%rdi), %rsi
	shlq	$2, %rsi
	addq	32(%rcx,%rdi), %rsi
	movl	16(%rcx,%rdi), %ebx
	cmpl	%r15d, %ebx
	jne	LBB0_7
## %bb.4:
	movl	20(%rcx,%rdi), %eax
	movl	72(%rcx,%rdi), %ebx
	incl	%eax
	cltd
	idivl	%r15d
	movl	%edx, 20(%rcx,%rdi)
	leaq	(%rcx,%rdi), %rax
	addq	$72, %rax
	jmp	LBB0_8
LBB0_5:
	movslq	(%r12), %r14
	movq	___wpdcb@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	leaq	(%r14,%r14,4), %rbx
	shlq	$4, %rbx
	movq	%r12, 56(%r15,%rbx)
	leaq	(%r15,%rbx), %rdi
	addq	$40, %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15,%rbx)
	movl	$0, 24(%r15,%rbx)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_wpaddata@GOTPCREL(%rip), %rax
	leaq	(,%r14,4), %rdi
	addq	(%rax), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	32(%r15,%rbx), %rdi
	movq	_EVENTQUEUE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	xorl	%eax, %eax
	callq	_CONF_GetSensorBarPosition
	xorl	$1, %eax
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_wiiuse_set_ir_position
	xorl	%eax, %eax
	callq	_CONF_GetIRSensitivity
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_wiiuse_set_ir_sensitivity
	movq	_WIIMOTE_LED_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WPAD_BALANCE_BOARD@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	cltd
	idivl	(%rcx)
	movl	%edx, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_wiiuse_set_leds
	movl	%r14d, %edi
	callq	___wpad_setfmt
	movl	$1, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	movq	___wpads_active@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_6:
	movslq	(%r12), %r14
	movq	___wpdcb@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	leaq	(%r14,%r14,4), %rbx
	shlq	$4, %rbx
	movq	%r12, 56(%r15,%rbx)
	movl	$0, (%r15,%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15,%rbx)
	movl	$-1, 24(%r15,%rbx)
	leaq	(%r15,%rbx), %rdi
	addq	$40, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_wpaddata@GOTPCREL(%rip), %rax
	leaq	(,%r14,4), %rdi
	addq	(%rax), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	32(%r15,%rbx), %rdi
	movq	_EVENTQUEUE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	movl	$-2, %eax
	movl	%r14d, %ecx
	roll	%cl, %eax
	movq	___wpads_active@GOTPCREL(%rip), %rcx
	andl	%eax, (%rcx)
	movq	___wpads_used@GOTPCREL(%rip), %rcx
	andl	%eax, (%rcx)
	jmp	LBB0_12
LBB0_7:
	leaq	(%rcx,%rdi), %rax
	addq	$16, %rax
LBB0_8:
	incl	%ebx
	movl	%ebx, (%rax)
	leaq	(%rcx,%rdi), %rdx
	addq	$24, %rdx
	addq	%rdi, %rcx
	addq	$68, %rcx
	movq	%r12, %rdi
	callq	___wpad_read_wiimote
	movq	(%r14), %rax
	incq	%rax
	movq	%rax, %rcx
	orq	%r15, %rcx
	shrq	$32, %rcx
	je	LBB0_10
## %bb.9:
	xorl	%edx, %edx
	divq	%r15
	jmp	LBB0_11
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_11:
	movq	%rdx, (%r14)
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___wpdcb,8,3                    ## @__wpdcb
	.comm	_EVENTQUEUE_LENGTH,4,2          ## @EVENTQUEUE_LENGTH
	.comm	_wpaddata,8,3                   ## @wpaddata
	.comm	_WIIMOTE_LED_1,4,2              ## @WIIMOTE_LED_1
	.comm	_WPAD_BALANCE_BOARD,4,2         ## @WPAD_BALANCE_BOARD
	.comm	___wpads_active,4,2             ## @__wpads_active
	.comm	___wpads_used,4,2               ## @__wpads_used
	.no_dead_strip	___wpad_eventCB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __wpad_eventCB
___wpad_eventCB:                        ; @__wpad_eventCB
	.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	x19, x0
	cmp	w1, #131
	b.eq	LBB0_6
; %bb.1:
	cmp	w1, #130
	b.eq	LBB0_7
; %bb.2:
	cmp	w1, #129
	b.ne	LBB0_9
; %bb.3:
	ldrsw	x8, [x19]
Lloh0:
	adrp	x9, ___wpdcb@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___wpdcb@GOTPAGEOFF]
Lloh2:
	adrp	x10, _EVENTQUEUE_LENGTH@GOTPAGE
Lloh3:
	ldr	x10, [x10, _EVENTQUEUE_LENGTH@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	ldrsw	x20, [x10]
	mov	w10, #80
	madd	x21, x8, x10, x9
	ldr	x10, [x21, #8]!
	ldr	x11, [x21, #24]
	add	x1, x11, x10, lsl #2
	mov	x10, x21
	ldr	w11, [x10, #8]!
	cmp	w11, w20
	b.ne	LBB0_5
; %bb.4:
	mov	w10, #80
	madd	x10, x8, x10, x9
	ldr	w11, [x10, #72]!
	ldur	w12, [x10, #-52]
	add	w12, w12, #1
	sdiv	w13, w12, w20
	msub	w12, w13, w20, w12
	stur	w12, [x10, #-52]
LBB0_5:
	add	w11, w11, #1
	str	w11, [x10]
	mov	w10, #80
	madd	x8, x8, x10, x9
	add	x2, x8, #24
	add	x3, x8, #68
	mov	x0, x19
	bl	___wpad_read_wiimote
	ldr	x8, [x21]
	add	x8, x8, #1
	udiv	x9, x8, x20
	msub	x8, x9, x20, x8
	str	x8, [x21]
	b	LBB0_9
LBB0_6:
	ldr	w20, [x19]
Lloh6:
	adrp	x8, ___wpdcb@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___wpdcb@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	w9, #80
	smaddl	x21, w20, w9, x8
	str	x19, [x21, #56]
	add	x0, x21, #40
	stp	xzr, xzr, [x21, #8]
	str	wzr, [x21, #24]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh9:
	adrp	x8, _wpaddata@GOTPAGE
Lloh10:
	ldr	x8, [x8, _wpaddata@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x0, x8, w20, sxtw #2
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x0, [x21, #32]
Lloh12:
	adrp	x8, _EVENTQUEUE_LENGTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EVENTQUEUE_LENGTH@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
	bl	_CONF_GetSensorBarPosition
	eor	w1, w0, #0x1
	mov	x0, x19
	bl	_wiiuse_set_ir_position
	bl	_CONF_GetIRSensitivity
	mov	x1, x0
	mov	x0, x19
	bl	_wiiuse_set_ir_sensitivity
Lloh15:
	adrp	x8, _WIIMOTE_LED_1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WIIMOTE_LED_1@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _WPAD_BALANCE_BOARD@GOTPAGE
Lloh19:
	ldr	x9, [x9, _WPAD_BALANCE_BOARD@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	sdiv	w10, w20, w9
	msub	w9, w10, w9, w20
	lsl	w1, w8, w9
	mov	x0, x19
	mov	x2, #0
	bl	_wiiuse_set_leds
	mov	x0, x20
	bl	___wpad_setfmt
	mov	w8, #1
	lsl	w8, w8, w20
Lloh21:
	adrp	x9, ___wpads_active@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___wpads_active@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w10, w8
	b	LBB0_8
LBB0_7:
	ldr	w20, [x19]
Lloh23:
	adrp	x8, ___wpdcb@GOTPAGE
Lloh24:
	ldr	x8, [x8, ___wpdcb@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	mov	w9, #80
	smaddl	x21, w20, w9, x8
	str	x19, [x21, #56]
	str	wzr, [x21]
	stp	xzr, xzr, [x21, #8]
	mov	w8, #-1
	str	w8, [x21, #24]
	add	x0, x21, #40
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh26:
	adrp	x8, _wpaddata@GOTPAGE
Lloh27:
	ldr	x8, [x8, _wpaddata@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	add	x0, x8, w20, sxtw #2
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x0, [x21, #32]
Lloh29:
	adrp	x8, _EVENTQUEUE_LENGTH@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EVENTQUEUE_LENGTH@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
	mov	w8, #1
	lsl	w8, w8, w20
Lloh32:
	adrp	x9, ___wpads_active@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___wpads_active@GOTPAGEOFF]
	ldr	w10, [x9]
	bic	w10, w10, w8
	str	w10, [x9]
Lloh34:
	adrp	x9, ___wpads_used@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___wpads_used@GOTPAGEOFF]
	ldr	w10, [x9]
	bic	w8, w10, w8
LBB0_8:
	str	w8, [x9]
LBB0_9:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	___wpdcb,8,3                    ; @__wpdcb
	.comm	_EVENTQUEUE_LENGTH,4,2          ; @EVENTQUEUE_LENGTH
	.comm	_wpaddata,8,3                   ; @wpaddata
	.comm	_WIIMOTE_LED_1,4,2              ; @WIIMOTE_LED_1
	.comm	_WPAD_BALANCE_BOARD,4,2         ; @WPAD_BALANCE_BOARD
	.comm	___wpads_active,4,2             ; @__wpads_active
	.comm	___wpads_used,4,2               ; @__wpads_used
	.no_dead_strip	___wpad_eventCB
.subsections_via_symbols
