	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mousedev_packet
_mousedev_packet:                       ## @mousedev_packet
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movq	40(%rdi), %r15
	shlq	$5, %r13
	leaq	(%r15,%r13), %rax
	addq	$24, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r15,%r13), %rdi
	movl	$-127, %esi
	movl	$127, %edx
	callq	_clamp_val
	cltq
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	subq	%rax, 24(%r15,%r13)
	movq	16(%r15,%r13), %rdi
	movl	$-127, %esi
	movl	$127, %edx
	callq	_clamp_val
	movslq	%eax, %r12
	subq	%r12, 16(%r15,%r13)
	movl	$3, %edi
	callq	_BIT
	movl	%eax, (%r14)
	movl	$7, %edi
	callq	_BIT
	movl	%eax, %ebx
	andl	-64(%rbp), %ebx                 ## 4-byte Folded Reload
	sarl	$3, %ebx
	movl	$7, %edi
	callq	_BIT
	andl	%r12d, %eax
	sarl	$2, %eax
	orl	(%r14), %ebx
	orl	%eax, %ebx
	movl	%ebx, (%r14)
	movq	%r15, %rdx
	movl	(%r15,%r13), %eax
	andl	$7, %eax
	orl	%ebx, %eax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, (%r14)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, 4(%r14)
	movl	%r12d, 8(%r14)
	movq	%rsi, %r15
	movl	8(%rsi), %ecx
	movq	%rdx, %rbx
	cmpl	$129, %ecx
	je	LBB0_4
## %bb.1:
	cmpl	$130, %ecx
	jne	LBB0_5
## %bb.2:
	movq	8(%rdx,%r13), %rdi
	movl	$-7, %esi
	movl	$7, %edx
	callq	_clamp_val
	movslq	%eax, %rcx
	movq	8(%rbx,%r13), %rax
	subq	%rcx, %rax
	movq	%rax, 8(%rbx,%r13)
	andl	$15, %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %edx
	andl	$24, %edx
	leal	(%rcx,%rdx,2), %ecx
	movl	%ecx, 12(%r14)
	movl	$4, %ecx
	jmp	LBB0_6
LBB0_4:
	movq	8(%rdx,%r13), %rdi
	movl	$-127, %esi
	movl	$127, %edx
	callq	_clamp_val
	movslq	%eax, %rcx
	movq	8(%rbx,%r13), %rax
	subq	%rcx, %rax
	movq	%rax, 8(%rbx,%r13)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %edx
	movl	%edx, %esi
	shrl	$3, %esi
	andl	$2, %esi
	shrl	%edx
	andl	$4, %edx
	orl	(%r14), %edx
	orl	%esi, %edx
	movl	%edx, (%r14)
	movl	%ecx, 12(%r14)
	movl	$4, %ecx
	jmp	LBB0_6
LBB0_5:
	movq	$0, 8(%rdx,%r13)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %ecx
	movl	%ecx, %edx
	shrl	$3, %edx
	andl	$2, %edx
	shrl	%ecx
	andl	$4, %ecx
	orl	%eax, %ecx
	orl	%edx, %ecx
	movl	%ecx, (%r14)
	movl	$3, %ecx
	xorl	%eax, %eax
LBB0_6:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, 12(%r15)
	cmpq	$0, (%rdx)
	jne	LBB0_14
## %bb.7:
	leaq	(%rbx,%r13), %rcx
	addq	$16, %rcx
	orq	(%rcx), %rax
	jne	LBB0_14
## %bb.8:
	movq	%r15, %rcx
	movq	(%r15), %rax
	cmpq	16(%r15), %rax
	jne	LBB0_10
## %bb.9:
	movq	$0, 32(%r15)
	movl	(%rdi), %eax
	movl	%eax, 24(%r15)
	jmp	LBB0_14
LBB0_10:
	incq	%rax
	movq	_PACKET_QUEUE_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_11
## %bb.12:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_13
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_13:
	movq	%rdx, (%r15)
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET_QUEUE_LEN,4,2           ## @PACKET_QUEUE_LEN
	.no_dead_strip	_mousedev_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mousedev_packet
_mousedev_packet:                       ; @mousedev_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	x26, [x0, #40]
	ldr	x27, [x0]
	add	x23, x26, x27, lsl #5
	mov	x24, x23
	ldr	x0, [x24, #24]!
	mov	w1, #-127
	mov	w2, #127
	bl	_clamp_val
	mov	x21, x0
	ldr	x8, [x24]
	sub	x8, x8, w0, sxtw
	str	x8, [x24]
	mov	x25, x23
	ldr	x0, [x25, #16]!
	mov	w1, #-127
	mov	w2, #127
	bl	_clamp_val
	mov	x22, x0
	ldr	x8, [x25]
	sub	x8, x8, w0, sxtw
	str	x8, [x25]
	mov	w0, #3
	bl	_BIT
	str	w0, [x20]
	mov	w0, #7
	bl	_BIT
	and	w28, w0, w21
	mov	w0, #7
	bl	_BIT
	and	w8, w0, w22
	ldr	w9, [x20]
	orr	w9, w9, w28, asr #3
	orr	w8, w9, w8, asr #2
	str	w8, [x20]
	ldr	w9, [x23]
	and	w9, w9, #0x7
	orr	w9, w8, w9
	stp	w9, w21, [x20]
	str	w22, [x20, #8]
	ldr	w8, [x19, #8]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #130
	b.ne	LBB0_4
; %bb.2:
	add	x21, x26, x27, lsl #5
	ldr	x0, [x21, #8]
	mov	w1, #-7
	mov	w2, #7
	bl	_clamp_val
	ldr	x8, [x21, #8]
	sub	x8, x8, w0, sxtw
	str	x8, [x21, #8]
	and	w9, w0, #0xf
	ldr	w10, [x23]
	lsr	w10, w10, #3
	bfi	w9, w10, #4, #2
	str	w9, [x20, #12]
	mov	w9, #4
	b	LBB0_5
LBB0_3:
	ldr	x0, [x23, #8]
	mov	w1, #-127
	mov	w2, #127
	bl	_clamp_val
	ldr	x8, [x23, #8]
	sub	x8, x8, w0, sxtw
	str	x8, [x23, #8]
	ldr	w9, [x23]
	lsr	w10, w9, #3
	and	w10, w10, #0x2
	lsr	w9, w9, #1
	and	w9, w9, #0x4
	ldr	w11, [x20]
	orr	w9, w9, w11
	orr	w9, w9, w10
	str	w9, [x20]
	str	w0, [x20, #12]
	mov	w9, #4
	b	LBB0_5
LBB0_4:
	mov	x8, #0
	add	x10, x26, x27, lsl #5
	str	xzr, [x10, #8]
	ldr	w10, [x23]
	lsr	w11, w10, #3
	and	w11, w11, #0x2
	lsr	w10, w10, #1
	and	w10, w10, #0x4
	orr	w9, w10, w9
	orr	w9, w9, w11
	str	w9, [x20]
	mov	w9, #3
LBB0_5:
	str	w9, [x19, #12]
	ldr	x9, [x24]
	cbnz	x9, LBB0_10
; %bb.6:
	ldr	x9, [x25]
	orr	x8, x9, x8
	cbnz	x8, LBB0_10
; %bb.7:
	ldr	x8, [x19]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	str	xzr, [x19, #32]
	ldr	w8, [x23]
	str	w8, [x19, #24]
	b	LBB0_10
LBB0_9:
	add	x8, x8, #1
Lloh0:
	adrp	x9, _PACKET_QUEUE_LEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PACKET_QUEUE_LEN@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	udiv	x10, x8, x9
	msub	x8, x10, x9, x8
	str	x8, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET_QUEUE_LEN,4,2           ; @PACKET_QUEUE_LEN
	.no_dead_strip	_mousedev_packet
.subsections_via_symbols
