	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elantech_report_absolute_v3
_elantech_report_absolute_v3:           ## @elantech_report_absolute_v3
	.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	16(%rdi), %r8
	movq	(%rdi), %rbx
	movq	8(%rdi), %rdx
	movzbl	(%rbx), %r15d
	movl	%r15d, %ecx
	shrl	$6, %ecx
	cmpl	$1, %ecx
	je	LBB0_5
## %bb.1:
	cmpl	$2, %ecx
	je	LBB0_6
## %bb.2:
	cmpl	$3, %ecx
	jne	LBB0_3
LBB0_5:
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movzbl	1(%rbx), %eax
	movl	%eax, %ecx
	andl	$15, %ecx
	shll	$8, %ecx
	movzbl	2(%rbx), %esi
	orl	%ecx, %esi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	4(%rdx), %esi
	movzbl	4(%rbx), %r14d
	movl	%r14d, %ecx
	andl	$15, %ecx
	movzbl	5(%rbx), %edx
	subl	%edx, %esi
	shll	$8, %ecx
	subl	%ecx, %esi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_4
LBB0_6:
	movq	_PACKET_V3_HEAD@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_7
## %bb.14:
	movb	2(%rbx), %al
	movq	8(%rdx), %rcx
	movb	%al, (%rcx)
	movl	4(%rdx), %eax
	movzbl	4(%rbx), %edx
	andl	$15, %edx
	movzbl	5(%rbx), %esi
	subl	%esi, %eax
	shll	$8, %edx
	subl	%edx, %eax
	movl	%eax, 4(%rcx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movb	1(%rbx), %al
	movb	4(%rbx), %r14b
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_4:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
LBB0_8:
	andb	$-16, %al
	shrb	$4, %r14b
	orb	%al, %r14b
	movl	%r15d, %r13d
	shrl	$2, %r13d
	andl	$12, %r13d
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movzbl	3(%rbx), %r12d
	shrl	$4, %r12d
	andl	$3, %r12d
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpb	$64, %r15b
	setae	%dl
	movq	%r8, %rbx
	movq	%r8, %rdi
	callq	_input_report_key
	cmpb	$64, %r15b
	movq	%rbx, %r15
	jb	LBB0_10
## %bb.9:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_abs
LBB0_10:
	orl	%r13d, %r12d
	movzbl	%r14b, %r14d
	movq	%r15, %rdi
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	callq	_elantech_report_semi_mt_data
	movq	_BTN_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpb	$1, %bl
	sete	%dl
	movq	%r15, %rdi
	callq	_input_report_key
	movq	_BTN_TOOL_DOUBLETAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpb	$2, %bl
	sete	%dl
	movq	%r15, %rdi
	callq	_input_report_key
	movq	_BTN_TOOL_TRIPLETAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpb	$3, %bl
	sete	%dl
	movq	%r15, %rdi
	callq	_input_report_key
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_elantech_is_buttonpad
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movzbl	(%rax), %edx
	andl	$3, %edx
	movq	%r15, %rdi
	callq	_input_report_key
	jmp	LBB0_13
LBB0_12:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movzbl	(%rax), %esi
	movq	%r15, %rdi
	callq	_psmouse_report_standard_buttons
LBB0_13:
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	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	%r15, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
LBB0_7:
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	8(%rdx), %rax
	movzbl	(%rax), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	4(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movzbl	1(%rbx), %eax
	movl	%eax, %ecx
	andl	$15, %ecx
	shll	$8, %ecx
	movzbl	2(%rbx), %esi
	orl	%ecx, %esi
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	4(%rdx), %esi
	movzbl	4(%rbx), %r14d
	movl	%r14d, %ecx
	andl	$15, %ecx
	movzbl	5(%rbx), %edx
	subl	%edx, %esi
	shll	$8, %ecx
	subl	%ecx, %esi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET_V3_HEAD,4,2             ## @PACKET_V3_HEAD
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_BTN_TOOL_FINGER,4,2            ## @BTN_TOOL_FINGER
	.comm	_BTN_TOOL_DOUBLETAP,4,2         ## @BTN_TOOL_DOUBLETAP
	.comm	_BTN_TOOL_TRIPLETAP,4,2         ## @BTN_TOOL_TRIPLETAP
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.comm	_ABS_TOOL_WIDTH,4,2             ## @ABS_TOOL_WIDTH
	.no_dead_strip	_elantech_report_absolute_v3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elantech_report_absolute_v3
_elantech_report_absolute_v3:           ; @elantech_report_absolute_v3
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldp	x20, x19, [x0, #8]
	ldr	x28, [x0]
	ldrb	w24, [x28]
	lsr	w21, w24, #6
	cmp	w21, #1
	b.eq	LBB0_3
; %bb.1:
	cmp	w21, #2
	b.eq	LBB0_4
; %bb.2:
	cmp	w21, #3
	b.ne	LBB0_6
LBB0_3:
	mov	w25, #0
	mov	w27, #0
	ldrb	w8, [x28, #1]
	and	w9, w8, #0xf
	ldrb	w23, [x28, #2]
	bfi	w23, w9, #8, #4
	ldr	w10, [x20, #4]
	ldrb	w9, [x28, #4]
	and	w11, w9, #0xf
	ldrb	w12, [x28, #5]
	sub	w10, w10, w12
	sub	w26, w10, w11, lsl #8
	b	LBB0_8
LBB0_4:
Lloh0:
	adrp	x8, _PACKET_V3_HEAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PACKET_V3_HEAD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_7
; %bb.5:
	ldrb	w8, [x28, #2]
	ldr	x9, [x20, #8]
	strb	w8, [x9]
	ldr	w8, [x20, #4]
	ldrb	w10, [x28, #4]
	and	w10, w10, #0xf
	ldrb	w11, [x28, #5]
	sub	w8, w8, w11
	sub	w8, w8, w10, lsl #8
	str	w8, [x9, #4]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	mov	w23, #0
	mov	w26, #0
	mov	w25, #0
	mov	w27, #0
	ldrb	w8, [x28, #1]
	ldrb	w9, [x28, #4]
	b	LBB0_8
LBB0_7:
	ldr	x8, [x20, #8]
	ldrb	w23, [x8]
	ldr	w26, [x8, #4]
	ldrb	w8, [x28, #1]
	and	w9, w8, #0xf
	ldrb	w25, [x28, #2]
	bfi	w25, w9, #8, #4
	ldr	w10, [x20, #4]
	ldrb	w9, [x28, #4]
	and	w11, w9, #0xf
	ldrb	w12, [x28, #5]
	sub	w10, w10, w12
	sub	w27, w10, w11, lsl #8
LBB0_8:
	and	w8, w8, #0xf0
	orr	w8, w8, w9, lsr #4
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	lsr	w8, w24, #2
	and	w22, w8, #0xc
	ldrb	w8, [x28, #3]
	bfxil	w22, w8, #4, #2
Lloh3:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	cmp	w24, #63
	cset	w2, hi
	mov	x0, x19
	bl	_input_report_key
	cmp	w24, #64
	b.lo	LBB0_10
; %bb.9:
Lloh6:
	adrp	x8, _ABS_X@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_abs
Lloh9:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x26
	bl	_input_report_abs
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x26
	mov	x4, x25
	mov	x5, x27
	bl	_elantech_report_semi_mt_data
Lloh12:
	adrp	x8, _BTN_TOOL_FINGER@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BTN_TOOL_FINGER@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	cmp	w21, #1
	cset	w2, eq
	mov	x0, x19
	bl	_input_report_key
Lloh15:
	adrp	x8, _BTN_TOOL_DOUBLETAP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BTN_TOOL_DOUBLETAP@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	cmp	w21, #2
	cset	w2, eq
	mov	x0, x19
	bl	_input_report_key
Lloh18:
	adrp	x8, _BTN_TOOL_TRIPLETAP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BTN_TOOL_TRIPLETAP@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	cmp	w21, #3
	cset	w2, eq
	mov	x0, x19
	bl	_input_report_key
	mov	x0, x20
	bl	_elantech_is_buttonpad
	cbz	x0, LBB0_12
; %bb.11:
Lloh21:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldrb	w8, [x28]
	and	w2, w8, #0x3
	mov	x0, x19
	bl	_input_report_key
	b	LBB0_13
LBB0_12:
	ldrb	w1, [x28]
	mov	x0, x19
	bl	_psmouse_report_standard_buttons
LBB0_13:
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
Lloh24:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_input_report_abs
Lloh27:
	adrp	x8, _ABS_TOOL_WIDTH@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ABS_TOOL_WIDTH@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_input_report_abs
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET_V3_HEAD,4,2             ; @PACKET_V3_HEAD
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_BTN_TOOL_FINGER,4,2            ; @BTN_TOOL_FINGER
	.comm	_BTN_TOOL_DOUBLETAP,4,2         ; @BTN_TOOL_DOUBLETAP
	.comm	_BTN_TOOL_TRIPLETAP,4,2         ; @BTN_TOOL_TRIPLETAP
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.comm	_ABS_TOOL_WIDTH,4,2             ; @ABS_TOOL_WIDTH
	.no_dead_strip	_elantech_report_absolute_v3
.subsections_via_symbols
