	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function classic_ctrl_event
LCPI0_0:
	.long	0x41f80000                      ## float 31
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_classic_ctrl_event
	.p2align	4, 0x90
_classic_ctrl_event:                    ## @classic_ctrl_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	$2, (%rdi)
	jne	LBB0_2
## %bb.1:
	movswl	32(%r14), %edi
	callq	_BIG_ENDIAN_SHORT
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_classic_ctrl_pressed_buttons
	movl	(%r14), %eax
	movl	4(%r14), %esi
	sarl	$4, %eax
	shll	$4, %esi
	orl	%eax, %esi
	movl	%esi, 32(%rbx)
	movl	8(%r14), %eax
	movl	12(%r14), %ecx
	sarl	$4, %eax
	shll	$4, %ecx
	orl	%eax, %ecx
	movl	%ecx, 24(%rbx)
	movl	16(%r14), %eax
	movl	20(%r14), %edx
	sarl	$4, %eax
	shll	$4, %edx
	orl	%eax, %edx
	movl	%edx, 36(%rbx)
	movl	24(%r14), %ecx
	movl	28(%r14), %eax
	sarl	$4, %ecx
	shll	$4, %eax
	orl	%ecx, %eax
	movl	8(%rbx), %ecx
	movq	_CLASSIC_CTRL_BUTTON_FULL_L@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%ecx, %edi
	movl	$31, %r8d
	cmovnel	%r8d, %edi
	movl	%edi, 4(%rbx)
	movq	_CLASSIC_CTRL_BUTTON_FULL_R@GOTPCREL(%rip), %rdi
	andl	(%rdi), %ecx
	cmovnel	%r8d, %ecx
	movl	%ecx, 12(%rbx)
	jmp	LBB0_3
LBB0_2:
	movswl	16(%r14), %edi
	callq	_BIG_ENDIAN_SHORT
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_classic_ctrl_pressed_buttons
	movl	8(%r14), %eax
	movl	12(%r14), %ecx
	shrl	$2, %eax
	andl	$24, %eax
	shrl	$5, %ecx
	andl	$7, %ecx
	orl	%eax, %ecx
	movl	%ecx, 4(%rbx)
	movl	12(%r14), %eax
	andl	$31, %eax
	movl	%eax, 12(%rbx)
	movq	_r@GOTPCREL(%rip), %rax
	cvtsi2ssq	(%rax), %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	movss	%xmm0, 16(%rbx)
	movq	_l@GOTPCREL(%rip), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ssq	(%rax), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, 20(%rbx)
	movl	(%r14), %esi
	andl	$63, %esi
	movl	%esi, 32(%rbx)
	movl	4(%r14), %edx
	andl	$63, %edx
	movl	%edx, 36(%rbx)
	movl	(%r14), %eax
	movl	4(%r14), %ecx
	shrl	$3, %eax
	andl	$24, %eax
	shrl	$5, %ecx
	andl	$6, %ecx
	orl	%eax, %ecx
	movl	8(%r14), %eax
	shrl	$7, %eax
	andl	$1, %eax
	orl	%ecx, %eax
	movl	%eax, 24(%rbx)
	movl	8(%r14), %eax
	andl	$31, %eax
LBB0_3:
	leaq	24(%rbx), %r14
	movl	%eax, 28(%rbx)
	leaq	32(%rbx), %rdi
	callq	_calc_joystick_state
	movl	24(%rbx), %esi
	movl	28(%rbx), %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_calc_joystick_state            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CLASSIC_CTRL_BUTTON_FULL_L,4,2 ## @CLASSIC_CTRL_BUTTON_FULL_L
	.comm	_CLASSIC_CTRL_BUTTON_FULL_R,4,2 ## @CLASSIC_CTRL_BUTTON_FULL_R
	.comm	_r,8,3                          ## @r
	.comm	_l,8,3                          ## @l
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_classic_ctrl_event             ; -- Begin function classic_ctrl_event
	.p2align	2
_classic_ctrl_event:                    ; @classic_ctrl_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #2
	b.ne	LBB0_2
; %bb.1:
	ldrsh	w0, [x20, #32]
	bl	_BIG_ENDIAN_SHORT
	mov	x1, x0
	mov	x0, x19
	bl	_classic_ctrl_pressed_buttons
	ldp	w8, w9, [x20]
	lsl	w9, w9, #4
	orr	w1, w9, w8, asr #4
	str	w1, [x19, #32]
	ldp	w8, w9, [x20, #8]
	lsl	w9, w9, #4
	orr	w8, w9, w8, asr #4
	str	w8, [x19, #24]
	ldp	w8, w9, [x20, #16]
	lsl	w9, w9, #4
	orr	w2, w9, w8, asr #4
	str	w2, [x19, #36]
	ldp	w8, w9, [x20, #24]
	lsl	w9, w9, #4
	orr	w8, w9, w8, asr #4
Lloh0:
	adrp	x9, _CLASSIC_CTRL_BUTTON_FULL_L@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CLASSIC_CTRL_BUTTON_FULL_L@GOTPAGEOFF]
	ldr	w10, [x19, #8]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w10
	mov	w9, #31
	csel	w11, wzr, w9, eq
	str	w11, [x19, #4]
Lloh3:
	adrp	x11, _CLASSIC_CTRL_BUTTON_FULL_R@GOTPAGE
Lloh4:
	ldr	x11, [x11, _CLASSIC_CTRL_BUTTON_FULL_R@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	csel	w9, wzr, w9, eq
	str	w9, [x19, #12]
	b	LBB0_3
LBB0_2:
	ldrsh	w0, [x20, #16]
	bl	_BIG_ENDIAN_SHORT
	mov	x1, x0
	mov	x0, x19
	bl	_classic_ctrl_pressed_buttons
Lloh6:
	adrp	x8, _r@GOTPAGE
Lloh7:
	ldr	x8, [x8, _r@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	scvtf	s0, x8
	fmov	s1, #31.00000000
	fdiv	s0, s0, s1
Lloh9:
	adrp	x8, _l@GOTPAGE
Lloh10:
	ldr	x8, [x8, _l@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	scvtf	s2, x8
	fdiv	s1, s2, s1
	ldp	w8, w9, [x20, #8]
	lsr	w8, w8, #2
	and	w8, w8, #0x18
	bfxil	w8, w9, #5, #3
	str	w8, [x19, #4]
	ldr	w8, [x20, #12]
	and	w8, w8, #0x1f
	str	w8, [x19, #12]
	stp	s0, s1, [x19, #16]
	ldr	w8, [x20]
	and	w1, w8, #0x3f
	str	w1, [x19, #32]
	ldr	w8, [x20, #4]
	and	w2, w8, #0x3f
	str	w2, [x19, #36]
	ldp	w8, w9, [x20]
	lsr	w8, w8, #3
	and	w8, w8, #0x18
	bfxil	w8, w9, #5, #3
	ldr	w9, [x20, #8]
	bfxil	w8, w9, #7, #1
	str	w8, [x19, #24]
	ldr	w8, [x20, #8]
	and	w8, w8, #0x1f
LBB0_3:
	str	w8, [x19, #28]
	add	x0, x19, #32
	bl	_calc_joystick_state
	mov	x0, x19
	ldr	w1, [x0, #24]!
	ldr	w2, [x19, #28]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_calc_joystick_state
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CLASSIC_CTRL_BUTTON_FULL_L,4,2 ; @CLASSIC_CTRL_BUTTON_FULL_L
	.comm	_CLASSIC_CTRL_BUTTON_FULL_R,4,2 ; @CLASSIC_CTRL_BUTTON_FULL_R
	.comm	_r,8,3                          ; @r
	.comm	_l,8,3                          ; @l
.subsections_via_symbols
