	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_packet_head_v4
_process_packet_head_v4:                ## @process_packet_head_v4
	.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	(%rdi), %rax
	movzbl	3(%rax), %ebx
	cmpl	$32, %ebx
	jae	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	shrl	$5, %ebx
	decl	%ebx
	movq	8(%rdi), %r14
	movq	16(%rdi), %r15
	movb	2(%rax), %cl
	movq	8(%r14), %rdx
	movb	%cl, (%rdx,%rbx,8)
	movl	(%r14), %ecx
	movzbl	4(%rax), %esi
	andl	$15, %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movzbl	5(%rax), %edi
	subl	%edi, %ecx
	shll	$8, %esi
	subl	%esi, %ecx
	movl	%ecx, 4(%rdx,%rbx,8)
	movzbl	1(%rax), %ecx
	andl	$-16, %ecx
	movzbl	4(%rax), %r13d
	shrl	$4, %r13d
	orl	%ecx, %r13d
	movzbl	(%rax), %r12d
	shrl	$4, %r12d
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_input_mt_slot
	movq	_MT_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_input_mt_report_slot_state
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rax
	movzbl	(%rax,%rbx,8), %edx
	movq	%r15, %rdi
	callq	_input_report_abs
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rax
	movl	4(%rax,%rbx,8), %edx
	movq	%r15, %rdi
	callq	_input_report_abs
	movq	_ABS_MT_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_input_report_abs
	movq	_ABS_MT_TOUCH_MAJOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	imull	%r12d, %edx
	movq	%r15, %rdi
	callq	_input_report_abs
	movq	_ABS_TOOL_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_input_report_abs
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elantech_input_sync_v4         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_TOOL_FINGER,4,2             ## @MT_TOOL_FINGER
	.comm	_ABS_MT_POSITION_X,4,2          ## @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ## @ABS_MT_POSITION_Y
	.comm	_ABS_MT_PRESSURE,4,2            ## @ABS_MT_PRESSURE
	.comm	_ABS_MT_TOUCH_MAJOR,4,2         ## @ABS_MT_TOUCH_MAJOR
	.comm	_ABS_TOOL_WIDTH,4,2             ## @ABS_TOOL_WIDTH
	.no_dead_strip	_process_packet_head_v4
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_packet_head_v4
_process_packet_head_v4:                ; @process_packet_head_v4
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0]
	ldrb	w9, [x8, #3]
	cmp	w9, #32
	b.hs	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	lsr	w9, w9, #5
	sub	w1, w9, #1
	ldp	x23, x20, [x0, #8]
	ldrb	w9, [x8, #2]
	ldr	x10, [x23, #8]
	lsl	x24, x1, #3
	add	x10, x10, x24
	strb	w9, [x10]
	ldr	w9, [x23]
	ldrb	w11, [x8, #4]
	and	w11, w11, #0xf
	ldrb	w12, [x8, #5]
	sub	w9, w9, w12
	sub	w9, w9, w11, lsl #8
	str	w9, [x10, #4]
	ldrb	w9, [x8, #1]
	and	w9, w9, #0xf0
	ldrb	w10, [x8, #4]
	orr	w22, w9, w10, lsr #4
	ldrb	w8, [x8]
	lsr	w21, w8, #4
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_input_mt_slot
Lloh0:
	adrp	x8, _MT_TOOL_FINGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_TOOL_FINGER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_input_mt_report_slot_state
Lloh3:
	adrp	x8, _ABS_MT_POSITION_X@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ABS_MT_POSITION_X@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x23, #8]
	ldrb	w2, [x8, x24]
	mov	x0, x20
	bl	_input_report_abs
Lloh6:
	adrp	x8, _ABS_MT_POSITION_Y@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x8, [x23, #8]
	add	x8, x8, x24
	ldr	w2, [x8, #4]
	mov	x0, x20
	bl	_input_report_abs
Lloh9:
	adrp	x8, _ABS_MT_PRESSURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ABS_MT_PRESSURE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	bl	_input_report_abs
Lloh12:
	adrp	x8, _ABS_MT_TOUCH_MAJOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ABS_MT_TOUCH_MAJOR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w8, [x23, #4]
	mul	w2, w8, w21
	mov	x0, x20
	bl	_input_report_abs
Lloh15:
	adrp	x8, _ABS_TOOL_WIDTH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ABS_TOOL_WIDTH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_input_report_abs
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_elantech_input_sync_v4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_TOOL_FINGER,4,2             ; @MT_TOOL_FINGER
	.comm	_ABS_MT_POSITION_X,4,2          ; @ABS_MT_POSITION_X
	.comm	_ABS_MT_POSITION_Y,4,2          ; @ABS_MT_POSITION_Y
	.comm	_ABS_MT_PRESSURE,4,2            ; @ABS_MT_PRESSURE
	.comm	_ABS_MT_TOUCH_MAJOR,4,2         ; @ABS_MT_TOUCH_MAJOR
	.comm	_ABS_TOOL_WIDTH,4,2             ; @ABS_TOOL_WIDTH
	.no_dead_strip	_process_packet_head_v4
.subsections_via_symbols
