	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_decode_packet_v7
_alps_decode_packet_v7:                 ## @alps_decode_packet_v7
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdx), %r12
	movq	%rsi, %rdi
	callq	_alps_get_packet_id_v7
	movl	%eax, %ebx
	movq	_V7_PACKET_ID_IDLE@GOTPCREL(%rip), %rax
	cmpb	(%rax), %bl
	jne	LBB0_1
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_1:
	movq	_V7_PACKET_ID_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	cmpb	(%rcx), %bl
	je	LBB0_17
## %bb.2:
	movq	_V7_PACKET_ID_NEW@GOTPCREL(%rip), %rcx
	movl	$1, %eax
	cmpb	(%rcx), %bl
	jne	LBB0_3
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	8(%r14), %rdi
	movzbl	%bl, %edx
	movq	%r15, %rsi
	callq	_alps_get_finger_coordinate_v7
	movq	_V7_PACKET_ID_TWO@GOTPCREL(%rip), %rax
	cmpb	(%rax), %bl
	jne	LBB0_5
## %bb.4:
	movq	8(%r14), %rdi
	callq	_alps_get_mt_count
	jmp	LBB0_6
LBB0_5:
	movzbl	5(%r15), %eax
	andl	$3, %eax
	addl	$3, %eax
LBB0_6:
	movl	%eax, (%r14)
	movb	(%r15), %cl
	shrb	$7, %cl
	movb	%cl, 4(%r14)
	movq	_ALPS_BUTTONPAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movb	(%r15), %cl
	testl	%edx, (%r12)
	je	LBB0_11
## %bb.7:
	testb	$32, %cl
	jne	LBB0_8
## %bb.9:
	testb	$16, %cl
	jne	LBB0_10
LBB0_12:
	cmpl	$1, %eax
	jne	LBB0_16
	jmp	LBB0_13
LBB0_11:
	shrb	$5, %cl
	andb	$1, %cl
	movb	%cl, 5(%r14)
	movb	(%r15), %cl
	shrb	$4, %cl
	andb	$1, %cl
	movb	%cl, 6(%r14)
	cmpl	$1, %eax
	jne	LBB0_16
	jmp	LBB0_13
LBB0_8:
	incl	%eax
	movl	%eax, (%r14)
	movb	(%r15), %cl
	testb	$16, %cl
	je	LBB0_12
LBB0_10:
	incl	%eax
	movl	%eax, (%r14)
	cmpl	$1, %eax
	jne	LBB0_16
LBB0_13:
	movq	8(%r14), %rax
	cmpq	$0, (%rax)
	jne	LBB0_16
## %bb.14:
	cmpq	$0, 8(%rax)
	jne	LBB0_16
## %bb.15:
	movups	16(%rax), %xmm0
	movups	%xmm0, (%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rax)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_V7_PACKET_ID_IDLE,1,0          ## @V7_PACKET_ID_IDLE
	.comm	_V7_PACKET_ID_UNKNOWN,1,0       ## @V7_PACKET_ID_UNKNOWN
	.comm	_V7_PACKET_ID_NEW,1,0           ## @V7_PACKET_ID_NEW
	.comm	_V7_PACKET_ID_TWO,1,0           ## @V7_PACKET_ID_TWO
	.comm	_ALPS_BUTTONPAD,4,2             ## @ALPS_BUTTONPAD
	.no_dead_strip	_alps_decode_packet_v7
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_decode_packet_v7
_alps_decode_packet_v7:                 ; @alps_decode_packet_v7
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x2]
	mov	x0, x1
	bl	_alps_get_packet_id_v7
Lloh0:
	adrp	x8, _V7_PACKET_ID_IDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V7_PACKET_ID_IDLE@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	mov	x21, x0
Lloh2:
	adrp	x8, _V7_PACKET_ID_UNKNOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V7_PACKET_ID_UNKNOWN@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #-1
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _V7_PACKET_ID_NEW@GOTPAGE
Lloh5:
	ldr	x8, [x8, _V7_PACKET_ID_NEW@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_7
; %bb.5:
	mov	w0, #1
LBB0_6:
	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
LBB0_7:
	ldr	x0, [x19, #8]
	mov	x1, x20
	mov	x2, x21
	bl	_alps_get_finger_coordinate_v7
Lloh6:
	adrp	x8, _V7_PACKET_ID_TWO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V7_PACKET_ID_TWO@GOTPAGEOFF]
	ldrb	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_9
; %bb.8:
	ldr	x0, [x19, #8]
	bl	_alps_get_mt_count
	b	LBB0_10
LBB0_9:
	ldrb	w8, [x20, #5]
	and	w8, w8, #0x3
	add	w0, w8, #3
LBB0_10:
	str	w0, [x19]
	ldrb	w8, [x20]
	lsr	w8, w8, #7
	strb	w8, [x19, #4]
	ldr	w9, [x22]
Lloh8:
	adrp	x8, _ALPS_BUTTONPAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ALPS_BUTTONPAD@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x8]
	ldrb	w8, [x20]
	tst	w10, w9
	b.eq	LBB0_14
; %bb.11:
	tbnz	w8, #5, LBB0_15
; %bb.12:
	tbnz	w8, #4, LBB0_16
LBB0_13:
	cmp	w0, #1
	b.ne	LBB0_1
	b	LBB0_17
LBB0_14:
	ubfx	w8, w8, #5, #1
	strb	w8, [x19, #5]
	ldrb	w8, [x20]
	ubfx	w8, w8, #4, #1
	strb	w8, [x19, #6]
	cmp	w0, #1
	b.eq	LBB0_17
	b	LBB0_1
LBB0_15:
	add	w0, w0, #1
	str	w0, [x19]
	ldrb	w8, [x20]
	tbz	w8, #4, LBB0_13
LBB0_16:
	add	w0, w0, #1
	str	w0, [x19]
	cmp	w0, #1
	b.ne	LBB0_1
LBB0_17:
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	cbnz	x9, LBB0_1
; %bb.18:
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_1
; %bb.19:
	mov	w0, #0
	ldr	q0, [x8, #16]
	str	q0, [x8]
	stp	xzr, xzr, [x8, #16]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_V7_PACKET_ID_IDLE,1,0          ; @V7_PACKET_ID_IDLE
	.comm	_V7_PACKET_ID_UNKNOWN,1,0       ; @V7_PACKET_ID_UNKNOWN
	.comm	_V7_PACKET_ID_NEW,1,0           ; @V7_PACKET_ID_NEW
	.comm	_V7_PACKET_ID_TWO,1,0           ; @V7_PACKET_ID_TWO
	.comm	_ALPS_BUTTONPAD,4,2             ; @ALPS_BUTTONPAD
	.no_dead_strip	_alps_decode_packet_v7
.subsections_via_symbols
