	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elantech_report_absolute_v1
_elantech_report_absolute_v1:           ## @elantech_report_absolute_v1
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	8(%rdi), %r12
	cmpl	$1, (%r12)
	jne	LBB0_2
## %bb.1:
	movzbl	1(%r15), %ebx
	movl	%ebx, %eax
	shrl	$7, %eax
	shrl	$4, %ebx
	andl	$3, %ebx
	addl	%eax, %ebx
	jmp	LBB0_3
LBB0_2:
	movzbl	(%r15), %ebx
	shrl	$6, %ebx
LBB0_3:
	movq	16(%rdi), %r14
	cmpq	$0, 8(%r12)
	je	LBB0_6
## %bb.4:
	cmpl	_elantech_report_absolute_v1.old_fingers(%rip), %ebx
	jle	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_elantech_debug
	jmp	LBB0_12
LBB0_6:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	testl	%ebx, %ebx
	setne	%dl
	movq	%r14, %rdi
	callq	_input_report_key
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	2(%r15), %edx
	movq	%r14, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ETP_YMAX_V1@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	subb	3(%r15), %al
	movzbl	%al, %edx
	movq	%r14, %rdi
	callq	_input_report_abs
LBB0_8:
	movq	_BTN_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$1, %ebx
	sete	%dl
	movq	%r14, %rdi
	callq	_input_report_key
	movq	_BTN_TOOL_DOUBLETAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$2, %ebx
	sete	%dl
	movq	%r14, %rdi
	callq	_input_report_key
	movq	_BTN_TOOL_TRIPLETAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$3, %ebx
	sete	%dl
	movq	%r14, %rdi
	callq	_input_report_key
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	(%r15), %edx
	andl	$1, %edx
	movq	%r14, %rdi
	callq	_input_report_key
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	(%r15), %edx
	andl	$2, %edx
	movq	%r14, %rdi
	callq	_input_report_key
	cmpl	$1, (%r12)
	jne	LBB0_11
## %bb.9:
	movq	_ETP_CAP_HAS_ROCKER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_11
## %bb.10:
	movq	_BTN_FORWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	(%r15), %edx
	andl	$64, %edx
	movq	%r14, %rdi
	callq	_input_report_key
	movq	_BTN_BACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	(%r15), %edx
	andl	$-128, %edx
	movq	%r14, %rdi
	callq	_input_report_key
LBB0_11:
	movq	%r14, %rdi
	callq	_input_sync
LBB0_12:
	movl	%ebx, _elantech_report_absolute_v1.old_fingers(%rip)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_elantech_report_absolute_v1.old_fingers,4,2 ## @elantech_report_absolute_v1.old_fingers
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"elantech.c: discarding packet\n"

	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ETP_YMAX_V1,1,0                ## @ETP_YMAX_V1
	.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	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_ETP_CAP_HAS_ROCKER,4,2         ## @ETP_CAP_HAS_ROCKER
	.comm	_BTN_FORWARD,4,2                ## @BTN_FORWARD
	.comm	_BTN_BACK,4,2                   ## @BTN_BACK
	.no_dead_strip	_elantech_report_absolute_v1
.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_v1
_elantech_report_absolute_v1:           ; @elantech_report_absolute_v1
	.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
	ldp	x21, x23, [x0]
	ldr	w8, [x23]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	ldrb	w8, [x21, #1]
	ubfx	w9, w8, #4, #2
	add	w20, w9, w8, lsr #7
	b	LBB0_3
LBB0_2:
	ldrb	w8, [x21]
	lsr	w20, w8, #6
LBB0_3:
	ldr	x8, [x23, #8]
	adrp	x22, _elantech_report_absolute_v1.old_fingers@PAGE
	ldr	w9, [x22, _elantech_report_absolute_v1.old_fingers@PAGEOFF]
	cmp	x8, #0
	ccmp	w20, w9, #4, ne
	b.gt	LBB0_10
; %bb.4:
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	cmp	w20, #0
	cset	w2, ne
	mov	x0, x19
	bl	_input_report_key
	cbz	w20, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _ABS_X@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldrb	w2, [x21, #2]
	mov	x0, x19
	bl	_input_report_abs
Lloh6:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _ETP_YMAX_V1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETP_YMAX_V1@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [x21, #3]
	sub	w8, w8, w9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_input_report_abs
LBB0_6:
Lloh11:
	adrp	x8, _BTN_TOOL_FINGER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BTN_TOOL_FINGER@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	cmp	w20, #1
	cset	w2, eq
	mov	x0, x19
	bl	_input_report_key
Lloh14:
	adrp	x8, _BTN_TOOL_DOUBLETAP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTN_TOOL_DOUBLETAP@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	cmp	w20, #2
	cset	w2, eq
	mov	x0, x19
	bl	_input_report_key
Lloh17:
	adrp	x8, _BTN_TOOL_TRIPLETAP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BTN_TOOL_TRIPLETAP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	cmp	w20, #3
	cset	w2, eq
	mov	x0, x19
	bl	_input_report_key
Lloh20:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldrb	w8, [x21]
	and	w2, w8, #0x1
	mov	x0, x19
	bl	_input_report_key
Lloh23:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldrb	w8, [x21]
	and	w2, w8, #0x2
	mov	x0, x19
	bl	_input_report_key
	ldr	w8, [x23]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.7:
	ldr	w8, [x23, #4]
Lloh26:
	adrp	x9, _ETP_CAP_HAS_ROCKER@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ETP_CAP_HAS_ROCKER@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh29:
	adrp	x8, _BTN_FORWARD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BTN_FORWARD@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldrb	w8, [x21]
	and	w2, w8, #0x40
	mov	x0, x19
	bl	_input_report_key
Lloh32:
	adrp	x8, _BTN_BACK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _BTN_BACK@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ldrb	w8, [x21]
	and	w2, w8, #0x80
	mov	x0, x19
	bl	_input_report_key
LBB0_9:
	mov	x0, x19
	bl	_input_sync
	b	LBB0_11
LBB0_10:
Lloh35:
	adrp	x0, l_.str@PAGE
Lloh36:
	add	x0, x0, l_.str@PAGEOFF
	bl	_elantech_debug
LBB0_11:
	str	w20, [x22, _elantech_report_absolute_v1.old_fingers@PAGEOFF]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_elantech_report_absolute_v1.old_fingers,4,2 ; @elantech_report_absolute_v1.old_fingers
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"elantech.c: discarding packet\n"

	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ETP_YMAX_V1,1,0                ; @ETP_YMAX_V1
	.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	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_ETP_CAP_HAS_ROCKER,4,2         ; @ETP_CAP_HAS_ROCKER
	.comm	_BTN_FORWARD,4,2                ; @BTN_FORWARD
	.comm	_BTN_BACK,4,2                   ; @BTN_BACK
	.no_dead_strip	_elantech_report_absolute_v1
.subsections_via_symbols
