	.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), %r14
	movq	8(%rdi), %r15
	cmpl	$131071, 8(%r15)                ## imm = 0x1FFFF
	jg	LBB0_2
## %bb.1:
	movzbl	1(%r14), %ebx
	movl	%ebx, %eax
	shrl	$7, %eax
	shrl	$4, %ebx
	andl	$3, %ebx
	addl	%eax, %ebx
	jmp	LBB0_3
LBB0_2:
	movzbl	(%r14), %ebx
	shrl	$6, %ebx
LBB0_3:
	movq	16(%rdi), %r12
	cmpq	$0, 24(%r15)
	je	LBB0_7
## %bb.4:
	cmpl	$1, %ebx
	jne	LBB0_5
## %bb.6:
	movl	(%r15), %eax
	cmpl	$1, %eax
	jg	LBB0_7
## %bb.13:
	incl	%eax
	movl	%eax, (%r15)
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elantech_debug                 ## TAILCALL
LBB0_5:
	movl	$0, (%r15)
LBB0_7:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	testl	%ebx, %ebx
	setne	%dl
	movq	%r12, %rdi
	callq	_input_report_key
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	2(%r14), %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movb	4(%r15), %al
	subb	3(%r14), %al
	movzbl	%al, %edx
	movq	%r12, %rdi
	callq	_input_report_abs
LBB0_9:
	movq	_BTN_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$1, %ebx
	sete	%dl
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_BTN_TOOL_DOUBLETAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$2, %ebx
	sete	%dl
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_BTN_TOOL_TRIPLETAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$3, %ebx
	sete	%dl
	movq	%r12, %rdi
	callq	_input_report_key
	movzbl	(%r14), %esi
	movq	%r12, %rdi
	callq	_psmouse_report_standard_buttons
	cmpl	$131071, 8(%r15)                ## imm = 0x1FFFF
	jg	LBB0_12
## %bb.10:
	movq	16(%r15), %rax
	movq	_ETP_CAP_HAS_ROCKER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_BTN_FORWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	(%r14), %edx
	andl	$64, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_BTN_BACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	(%r14), %edx
	andl	$-128, %edx
	movq	%r12, %rdi
	callq	_input_report_key
LBB0_12:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"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	_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	_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	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldp	x20, x21, [x0]
	ldr	w8, [x21, #8]
	cmp	w8, #32, lsl #12                ; =131072
	b.ge	LBB0_2
; %bb.1:
	ldrb	w8, [x20, #1]
	ubfx	w9, w8, #4, #2
	add	w22, w9, w8, lsr #7
	b	LBB0_3
LBB0_2:
	ldrb	w8, [x20]
	lsr	w22, w8, #6
LBB0_3:
	ldr	x19, [x0, #16]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_8
; %bb.4:
	cmp	w22, #1
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [x21]
	cmp	w8, #1
	b.gt	LBB0_8
; %bb.6:
	add	w8, w8, #1
	str	w8, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_elantech_debug
LBB0_7:
	str	wzr, [x21]
LBB0_8:
Lloh2:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	cmp	w22, #0
	cset	w2, ne
	mov	x0, x19
	bl	_input_report_key
	cbz	w22, LBB0_10
; %bb.9:
Lloh5:
	adrp	x8, _ABS_X@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldrb	w2, [x20, #2]
	mov	x0, x19
	bl	_input_report_abs
Lloh8:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldrb	w8, [x21, #4]
	ldrb	w9, [x20, #3]
	sub	w8, w8, w9
	and	w2, w8, #0xff
	mov	x0, x19
	bl	_input_report_abs
LBB0_10:
Lloh11:
	adrp	x8, _BTN_TOOL_FINGER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BTN_TOOL_FINGER@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	cmp	w22, #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	w22, #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	w22, #3
	cset	w2, eq
	mov	x0, x19
	bl	_input_report_key
	ldrb	w1, [x20]
	mov	x0, x19
	bl	_psmouse_report_standard_buttons
	ldr	w8, [x21, #8]
	cmp	w8, #32, lsl #12                ; =131072
	b.ge	LBB0_13
; %bb.11:
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _ETP_CAP_HAS_ROCKER@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ETP_CAP_HAS_ROCKER@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.12:
Lloh23:
	adrp	x8, _BTN_FORWARD@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BTN_FORWARD@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	ldrb	w8, [x20]
	and	w2, w8, #0x40
	mov	x0, x19
	bl	_input_report_key
Lloh26:
	adrp	x8, _BTN_BACK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BTN_BACK@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldrb	w8, [x20]
	and	w2, w8, #0x80
	mov	x0, x19
	bl	_input_report_key
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"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	_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	_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
