	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nunchuk_event                  ## -- Begin function nunchuk_event
	.p2align	4, 0x90
_nunchuk_event:                         ## @nunchuk_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	20(%rsi), %esi
	callq	_nunchuk_pressed_buttons
	movslq	(%r14), %rsi
	movl	%esi, 24(%rbx)
	movslq	4(%r14), %rdx
	movl	%edx, 28(%rbx)
	cmpq	$0, 72(%rbx)
	je	LBB0_5
## %bb.1:
	cmpq	%rsi, 48(%rbx)
	jle	LBB0_3
## %bb.2:
	movq	%rsi, 48(%rbx)
LBB0_3:
	cmpq	%rsi, 32(%rbx)
	jge	LBB0_5
## %bb.4:
	movq	%rsi, 32(%rbx)
LBB0_5:
	leaq	24(%rbx), %rdi
	cmpq	$0, 64(%rbx)
	je	LBB0_10
## %bb.6:
	cmpq	%rdx, 56(%rbx)
	jle	LBB0_8
## %bb.7:
	movq	%rdx, 56(%rbx)
LBB0_8:
	cmpq	%rdx, 40(%rbx)
	jge	LBB0_10
## %bb.9:
	movq	%rdx, 40(%rbx)
LBB0_10:
	callq	_calc_joystick_state
	movl	8(%r14), %eax
	movl	20(%r14), %ecx
	shrl	$2, %ecx
	andl	$3, %ecx
	leal	(%rcx,%rax,4), %eax
	leaq	4(%rbx), %r15
	movl	%eax, 4(%rbx)
	movl	12(%r14), %eax
	movl	20(%r14), %ecx
	shrl	$4, %ecx
	andl	$3, %ecx
	leal	(%rcx,%rax,4), %eax
	movl	%eax, 8(%rbx)
	movl	16(%r14), %eax
	movl	20(%r14), %ecx
	shrl	$6, %ecx
	andl	$3, %ecx
	leal	(%rcx,%rax,4), %eax
	movl	%eax, 12(%rbx)
	leaq	16(%rbx), %r14
	leaq	20(%rbx), %r12
	movq	_WIIUSE_SMOOTHING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_NUNCHUK_IS_FLAG_SET
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_calculate_orientation
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_calculate_gforce               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIUSE_SMOOTHING,4,2           ## @WIIUSE_SMOOTHING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nunchuk_event                  ; -- Begin function nunchuk_event
	.p2align	2
_nunchuk_event:                         ; @nunchuk_event
	.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
	ldr	w1, [x1, #20]
	bl	_nunchuk_pressed_buttons
	ldrsw	x1, [x20]
	mov	x0, x19
	str	w1, [x0, #24]!
	ldrsw	x2, [x20, #4]
	str	w2, [x0, #4]
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x19, #48]
	cmp	x8, x1
	b.le	LBB0_3
; %bb.2:
	str	x1, [x19, #48]
LBB0_3:
	ldr	x8, [x19, #32]
	cmp	x8, x1
	b.ge	LBB0_5
; %bb.4:
	str	x1, [x19, #32]
LBB0_5:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_10
; %bb.6:
	ldr	x8, [x19, #56]
	cmp	x8, x2
	b.le	LBB0_8
; %bb.7:
	str	x2, [x19, #56]
LBB0_8:
	ldr	x8, [x19, #40]
	cmp	x8, x2
	b.ge	LBB0_10
; %bb.9:
	str	x2, [x19, #40]
LBB0_10:
	bl	_calc_joystick_state
	ldr	w8, [x20, #8]
	lsl	w8, w8, #2
	ldr	w9, [x20, #20]
	bfxil	w8, w9, #2, #2
	mov	x21, x19
	str	w8, [x21, #4]!
	ldr	w8, [x20, #12]
	lsl	w8, w8, #2
	ldr	w9, [x20, #20]
	bfxil	w8, w9, #4, #2
	str	w8, [x19, #8]
	ldp	w8, w9, [x20, #16]
	lsl	w8, w8, #2
	bfxil	w8, w9, #6, #2
	str	w8, [x19, #12]
	add	x20, x19, #16
	add	x22, x19, #20
Lloh0:
	adrp	x8, _WIIUSE_SMOOTHING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WIIUSE_SMOOTHING@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_NUNCHUK_IS_FLAG_SET
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_calculate_orientation
	mov	x0, x20
	mov	x1, x21
	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
	b	_calculate_gforce
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIUSE_SMOOTHING,4,2           ; @WIIUSE_SMOOTHING
.subsections_via_symbols
