	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cyapa_gen3_event_process
_cyapa_gen3_event_process:              ## @cyapa_gen3_event_process
	.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, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r13
	movl	(%rsi), %eax
	shrl	$4, %eax
	andl	$15, %eax
	je	LBB0_3
## %bb.1:
	shlq	$2, %rax
	leaq	(%rax,%rax,4), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %r15
	movl	(%r15,%rbx), %esi
	decl	%esi
	movq	%r13, %rdi
	callq	_input_mt_slot
	movq	_MT_TOOL_FINGER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_input_mt_report_slot_state
	movq	_ABS_MT_POSITION_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15,%rbx), %edx
	shll	$4, %edx
	andl	$3840, %edx                     ## imm = 0xF00
	orl	8(%r15,%rbx), %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	movq	_ABS_MT_POSITION_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15,%rbx), %edx
	andl	$15, %edx
	shll	$8, %edx
	orl	12(%r15,%rbx), %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	movq	_ABS_MT_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r15,%rbx), %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	addq	$20, %rbx
	cmpq	%rbx, %r12
	jne	LBB0_2
LBB0_3:
	movq	%r13, %rdi
	callq	_input_mt_sync_frame
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	movq	_CAPABILITY_LEFT_BTN_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OP_DATA_LEFT_BTN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r14), %eax
	setne	%dl
	movq	%r13, %rdi
	callq	_input_report_key
	movl	(%rbx), %eax
LBB0_5:
	movq	_CAPABILITY_MIDDLE_BTN_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_BTN_MIDDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OP_DATA_MIDDLE_BTN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r14), %eax
	setne	%dl
	movq	%r13, %rdi
	callq	_input_report_key
	movl	(%rbx), %eax
LBB0_7:
	movq	_CAPABILITY_RIGHT_BTN_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OP_DATA_RIGHT_BTN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%r14), %eax
	setne	%dl
	movq	%r13, %rdi
	callq	_input_report_key
LBB0_9:
	movq	%r13, %rdi
	callq	_input_sync
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_CAPABILITY_LEFT_BTN_MASK,4,2   ## @CAPABILITY_LEFT_BTN_MASK
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_OP_DATA_LEFT_BTN,4,2           ## @OP_DATA_LEFT_BTN
	.comm	_CAPABILITY_MIDDLE_BTN_MASK,4,2 ## @CAPABILITY_MIDDLE_BTN_MASK
	.comm	_BTN_MIDDLE,4,2                 ## @BTN_MIDDLE
	.comm	_OP_DATA_MIDDLE_BTN,4,2         ## @OP_DATA_MIDDLE_BTN
	.comm	_CAPABILITY_RIGHT_BTN_MASK,4,2  ## @CAPABILITY_RIGHT_BTN_MASK
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_OP_DATA_RIGHT_BTN,4,2          ## @OP_DATA_RIGHT_BTN
	.no_dead_strip	_cyapa_gen3_event_process
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cyapa_gen3_event_process
_cyapa_gen3_event_process:              ; @cyapa_gen3_event_process
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	w8, [x1]
	ubfx	x8, x8, #4, #4
	cbz	w8, LBB0_3
; %bb.1:
	mov	x22, #0
	add	x8, x8, x8, lsl #2
	lsl	x23, x8, #2
Lloh0:
	adrp	x24, _MT_TOOL_FINGER@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MT_TOOL_FINGER@GOTPAGEOFF]
Lloh2:
	adrp	x25, _ABS_MT_POSITION_X@GOTPAGE
Lloh3:
	ldr	x25, [x25, _ABS_MT_POSITION_X@GOTPAGEOFF]
Lloh4:
	adrp	x26, _ABS_MT_POSITION_Y@GOTPAGE
Lloh5:
	ldr	x26, [x26, _ABS_MT_POSITION_Y@GOTPAGEOFF]
Lloh6:
	adrp	x27, _ABS_MT_PRESSURE@GOTPAGE
Lloh7:
	ldr	x27, [x27, _ABS_MT_PRESSURE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x28, x8, x22
	ldr	w8, [x28]
	sub	w1, w8, #1
	mov	x0, x19
	bl	_input_mt_slot
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #1
	bl	_input_mt_report_slot_state
	ldr	w1, [x25]
	ldp	w8, w9, [x28, #4]
	lsl	w8, w8, #4
	and	w8, w8, #0xf00
	orr	w2, w8, w9
	mov	x0, x19
	bl	_input_report_abs
	ldr	w1, [x26]
	ldr	w8, [x28, #4]
	ubfiz	w8, w8, #8, #4
	ldr	w9, [x28, #12]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_input_report_abs
	ldr	w1, [x27]
	ldr	w2, [x28, #16]
	mov	x0, x19
	bl	_input_report_abs
	add	x22, x22, #20
	cmp	x23, x22
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_input_mt_sync_frame
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _CAPABILITY_LEFT_BTN_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CAPABILITY_LEFT_BTN_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x20]
Lloh14:
	adrp	x9, _OP_DATA_LEFT_BTN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _OP_DATA_LEFT_BTN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	mov	x0, x19
	bl	_input_report_key
	ldr	w8, [x21]
LBB0_5:
Lloh17:
	adrp	x9, _CAPABILITY_MIDDLE_BTN_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CAPABILITY_MIDDLE_BTN_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
Lloh20:
	adrp	x8, _BTN_MIDDLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BTN_MIDDLE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w8, [x20]
Lloh23:
	adrp	x9, _OP_DATA_MIDDLE_BTN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _OP_DATA_MIDDLE_BTN@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	mov	x0, x19
	bl	_input_report_key
	ldr	w8, [x21]
LBB0_7:
Lloh26:
	adrp	x9, _CAPABILITY_RIGHT_BTN_MASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _CAPABILITY_RIGHT_BTN_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh29:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	ldr	w8, [x20]
Lloh32:
	adrp	x9, _OP_DATA_RIGHT_BTN@GOTPAGE
Lloh33:
	ldr	x9, [x9, _OP_DATA_RIGHT_BTN@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	mov	x0, x19
	bl	_input_report_key
LBB0_9:
	mov	x0, x19
	bl	_input_sync
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.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	_CAPABILITY_LEFT_BTN_MASK,4,2   ; @CAPABILITY_LEFT_BTN_MASK
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_OP_DATA_LEFT_BTN,4,2           ; @OP_DATA_LEFT_BTN
	.comm	_CAPABILITY_MIDDLE_BTN_MASK,4,2 ; @CAPABILITY_MIDDLE_BTN_MASK
	.comm	_BTN_MIDDLE,4,2                 ; @BTN_MIDDLE
	.comm	_OP_DATA_MIDDLE_BTN,4,2         ; @OP_DATA_MIDDLE_BTN
	.comm	_CAPABILITY_RIGHT_BTN_MASK,4,2  ; @CAPABILITY_RIGHT_BTN_MASK
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_OP_DATA_RIGHT_BTN,4,2          ; @OP_DATA_RIGHT_BTN
	.no_dead_strip	_cyapa_gen3_event_process
.subsections_via_symbols
