	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cypress_parse_packet
_cypress_parse_packet:                  ## @cypress_parse_packet
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	(%rdi), %r12
	movb	(%r12), %r15b
	movq	%rdx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movzbl	%r15b, %edi
	callq	_cypress_get_finger_count
	movl	%eax, (%rbx)
	movq	_ABS_MULTIFINGER_TAP@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	xorl	%edx, %edx
	testb	%r15b, %cl
	setne	%dl
	movl	%edx, 4(%rbx)
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.1:
	movb	2(%r12), %dl
	movq	24(%rbx), %rax
	movb	%dl, (%rax)
	movb	3(%r12), %dl
	movb	%dl, 1(%rax)
	movq	_CYTP_BIT_ABS_PRESSURE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%r14)
	je	LBB0_7
## %bb.2:
	movb	4(%r12), %dl
	movb	%dl, 2(%rax)
	jmp	LBB0_7
LBB0_3:
	jle	LBB0_7
## %bb.4:
	movb	2(%r12), %dl
	movq	24(%rbx), %rax
	movb	%dl, (%rax)
	movb	3(%r12), %dl
	movb	%dl, 1(%rax)
	movq	_CYTP_BIT_ABS_PRESSURE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%r14)
	je	LBB0_5
## %bb.6:
	movb	4(%r12), %sil
	movb	%sil, 2(%rax)
	movb	6(%r12), %dl
	movb	%dl, 3(%rax)
	movb	7(%r12), %dl
	movb	%dl, 4(%rax)
	movb	%sil, 5(%rax)
	jmp	LBB0_7
LBB0_5:
	movb	6(%r12), %dl
	movb	%dl, 3(%rax)
	movb	7(%r12), %dl
	movb	%dl, 4(%rax)
LBB0_7:
	movq	_BTN_LEFT_BIT@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	movb	(%rax), %al
	andb	%r15b, %al
	setne	%dl
	movl	%edx, 8(%rbx)
	movq	_BTN_RIGHT_BIT@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	movb	(%rax), %al
	andb	%r15b, %al
	setne	%dl
	movl	%edx, 12(%rbx)
	testb	%r15b, %cl
	je	LBB0_9
## %bb.8:
	movl	$0, 8(%rbx)
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABS_MULTIFINGER_TAP,1,0        ## @ABS_MULTIFINGER_TAP
	.comm	_CYTP_BIT_ABS_PRESSURE,4,2      ## @CYTP_BIT_ABS_PRESSURE
	.comm	_BTN_LEFT_BIT,1,0               ## @BTN_LEFT_BIT
	.comm	_BTN_RIGHT_BIT,1,0              ## @BTN_RIGHT_BIT
	.comm	_CYTP_MAX_MT_SLOTS,4,2          ## @CYTP_MAX_MT_SLOTS
	.no_dead_strip	_cypress_parse_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cypress_parse_packet
_cypress_parse_packet:                  ; @cypress_parse_packet
	.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
	mov	x19, x2
	mov	x21, x1
	ldr	x22, [x0]
	ldrb	w20, [x22]
	mov	x0, x2
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	mov	x0, x20
	bl	_cypress_get_finger_count
Lloh0:
	adrp	x8, _ABS_MULTIFINGER_TAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ABS_MULTIFINGER_TAP@GOTPAGEOFF]
	str	w0, [x19]
	ldrb	w8, [x8]
	ands	w8, w8, w20
	cset	w9, ne
	str	w9, [x19, #4]
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.1:
	ldrb	w10, [x22, #2]
	ldr	x9, [x19, #24]
	strb	w10, [x9]
	ldrb	w10, [x22, #3]
	strb	w10, [x9, #1]
	ldr	w10, [x21]
Lloh2:
	adrp	x11, _CYTP_BIT_ABS_PRESSURE@GOTPAGE
Lloh3:
	ldr	x11, [x11, _CYTP_BIT_ABS_PRESSURE@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.2:
	ldrb	w10, [x22, #4]
	strb	w10, [x9, #2]
	b	LBB0_7
LBB0_3:
	cmp	w0, #2
	b.lt	LBB0_7
; %bb.4:
	ldrb	w10, [x22, #2]
	ldr	x9, [x19, #24]
	strb	w10, [x9]
	ldrb	w10, [x22, #3]
	strb	w10, [x9, #1]
	ldr	w10, [x21]
Lloh5:
	adrp	x11, _CYTP_BIT_ABS_PRESSURE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _CYTP_BIT_ABS_PRESSURE@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_6
; %bb.5:
	ldrb	w10, [x22, #4]
	strb	w10, [x9, #2]
	ldrb	w11, [x22, #6]
	strb	w11, [x9, #3]
	ldrb	w11, [x22, #7]
	strb	w11, [x9, #4]
	strb	w10, [x9, #5]
	b	LBB0_7
LBB0_6:
	ldrb	w10, [x22, #6]
	strb	w10, [x9, #3]
	ldrb	w10, [x22, #7]
	strb	w10, [x9, #4]
LBB0_7:
Lloh8:
	adrp	x9, _BTN_LEFT_BIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BTN_LEFT_BIT@GOTPAGEOFF]
	ldrb	w9, [x9]
	tst	w9, w20
	cset	w9, ne
Lloh10:
	adrp	x10, _BTN_RIGHT_BIT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _BTN_RIGHT_BIT@GOTPAGEOFF]
	ldrb	w10, [x10]
	tst	w10, w20
	cset	w10, ne
	stp	w9, w10, [x19, #8]
	and	w8, w8, #0xff
	cbz	w8, LBB0_9
; %bb.8:
	str	wzr, [x19, #8]
LBB0_9:
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ABS_MULTIFINGER_TAP,1,0        ; @ABS_MULTIFINGER_TAP
	.comm	_CYTP_BIT_ABS_PRESSURE,4,2      ; @CYTP_BIT_ABS_PRESSURE
	.comm	_BTN_LEFT_BIT,1,0               ; @BTN_LEFT_BIT
	.comm	_BTN_RIGHT_BIT,1,0              ; @BTN_RIGHT_BIT
	.comm	_CYTP_MAX_MT_SLOTS,4,2          ; @CYTP_MAX_MT_SLOTS
	.no_dead_strip	_cypress_parse_packet
.subsections_via_symbols
