	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	40(%rdi), %r12
	shlq	$5, %rbx
	leaq	(%r12,%rbx), %r13
	movq	(%r12,%rbx), %rax
	movq	8(%r12,%rbx), %rcx
	shrq	$59, %rax
	andl	$-16, %eax
	shrq	$58, %rcx
	andl	$-32, %ecx
	leaq	(%r12,%rbx), %rdx
	addq	$16, %rdx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	16(%r12,%rbx), %edx
	andl	$7, %edx
	orl	%eax, %edx
	orl	%ecx, %edx
	orb	$8, %dl
	movb	%dl, (%rsi)
	movq	(%r12,%rbx), %rdi
	movl	$127, %esi
	callq	_mousedev_limit_delta
	movb	%al, 1(%r15)
	movq	8(%r12,%rbx), %rdi
	movl	$127, %esi
	callq	_mousedev_limit_delta
	movb	%al, 2(%r15)
	movsbq	1(%r15), %rax
	subq	%rax, (%r12,%rbx)
	movsbq	2(%r15), %rax
	subq	%rax, 8(%r12,%rbx)
	movl	8(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$130, %eax
	jne	LBB0_4
## %bb.2:
	movq	24(%r12,%rbx), %rdi
	movl	$7, %esi
	callq	_mousedev_limit_delta
	movb	%al, 3(%r15)
	movsbq	%al, %rax
	subq	%rax, 24(%r12,%rbx)
	movb	3(%r15), %al
	andb	$15, %al
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movb	(%rcx), %cl
	addb	%cl, %cl
	andb	$48, %cl
	orb	%al, %cl
	movb	%cl, 3(%r15)
	movl	$4, %eax
	jmp	LBB0_5
LBB0_3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$3, %ecx
	andl	$2, %ecx
	shrl	%eax
	andl	$4, %eax
	orl	%ecx, %eax
	orb	%al, (%r15)
	movq	24(%r12,%rbx), %rdi
	movl	$127, %esi
	callq	_mousedev_limit_delta
	movb	%al, 3(%r15)
	movsbq	%al, %rax
	subq	%rax, 24(%r12,%rbx)
	movl	$4, %eax
	jmp	LBB0_5
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$3, %ecx
	andl	$2, %ecx
	shrl	%eax
	andl	$4, %eax
	orl	%ecx, %eax
	orb	%al, (%r15)
	movq	$0, 24(%r12,%rbx)
	movl	$3, %eax
LBB0_5:
	movl	%eax, 12(%r14)
	cmpq	$0, (%r13)
	jne	LBB0_14
## %bb.6:
	leaq	(%r12,%rbx), %rax
	addq	$8, %rax
	cmpq	$0, (%rax)
	jne	LBB0_14
## %bb.7:
	cmpq	$0, 24(%r12,%rbx)
	jne	LBB0_14
## %bb.8:
	movq	(%r14), %rax
	cmpq	16(%r14), %rax
	jne	LBB0_10
## %bb.9:
	movq	$0, 32(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	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, (%r14)
LBB0_14:
	addq	$8, %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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #40]
	ldr	x23, [x0]
	add	x24, x21, x23, lsl #5
	ldr	x8, [x24]
	lsr	x8, x8, #59
	and	w8, w8, #0x10
	mov	x25, x24
	ldr	x9, [x25, #8]!
	lsr	x9, x9, #58
	mov	x22, x24
	ldr	w10, [x22, #16]!
	and	w9, w9, #0x20
	bfxil	w8, w10, #0, #3
	orr	w8, w8, w9
	orr	w8, w8, #0x8
	strb	w8, [x1]
	ldr	x0, [x24]
	mov	w1, #127
	bl	_mousedev_limit_delta
	strb	w0, [x20, #1]
	ldr	x0, [x25]
	mov	w1, #127
	bl	_mousedev_limit_delta
	strb	w0, [x20, #2]
	ldrsb	x8, [x20, #1]
	ldr	x9, [x24]
	sub	x8, x9, x8
	str	x8, [x24]
	ldrsb	x8, [x20, #2]
	ldr	x9, [x25]
	sub	x8, x9, x8
	str	x8, [x25]
	ldr	w8, [x19, #8]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #130
	b.ne	LBB0_4
; %bb.2:
	add	x26, x21, x23, lsl #5
	ldr	x0, [x26, #24]
	mov	w1, #7
	bl	_mousedev_limit_delta
	strb	w0, [x20, #3]
	ldr	x8, [x26, #24]
	sub	x8, x8, w0, sxtw
	str	x8, [x26, #24]
	ldrb	w8, [x20, #3]
	and	w8, w8, #0xf
	ldrb	w9, [x22]
	lsr	w9, w9, #3
	bfi	w8, w9, #4, #2
	strb	w8, [x20, #3]
	mov	w8, #4
	b	LBB0_5
LBB0_3:
	ldr	w8, [x22]
	lsr	w9, w8, #3
	and	w9, w9, #0x2
	lsr	w8, w8, #1
	and	w8, w8, #0x4
	orr	w8, w9, w8
	ldrb	w9, [x20]
	orr	w8, w9, w8
	strb	w8, [x20]
	ldr	x0, [x24, #24]
	mov	w1, #127
	bl	_mousedev_limit_delta
	strb	w0, [x20, #3]
	ldr	x8, [x24, #24]
	sub	x8, x8, w0, sxtw
	str	x8, [x24, #24]
	mov	w8, #4
	b	LBB0_5
LBB0_4:
	ldr	w8, [x22]
	lsr	w9, w8, #3
	and	w9, w9, #0x2
	lsr	w8, w8, #1
	and	w8, w8, #0x4
	orr	w8, w9, w8
	ldrb	w9, [x20]
	orr	w8, w9, w8
	strb	w8, [x20]
	add	x8, x21, x23, lsl #5
	str	xzr, [x8, #24]
	mov	w8, #3
LBB0_5:
	str	w8, [x19, #12]
	ldr	x8, [x24]
	cbnz	x8, LBB0_11
; %bb.6:
	ldr	x8, [x25]
	cbnz	x8, LBB0_11
; %bb.7:
	add	x8, x21, x23, lsl #5
	ldr	x8, [x8, #24]
	cbnz	x8, LBB0_11
; %bb.8:
	ldr	x8, [x19]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	str	xzr, [x19, #32]
	ldr	w8, [x22]
	str	w8, [x19, #24]
	b	LBB0_11
LBB0_10:
	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_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 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
