	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_process_byte
_alps_process_byte:                     ## @alps_process_byte
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r14
	movq	(%r14), %rax
	movq	_ALPS_PROTO_V8@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	je	LBB0_5
## %bb.1:
	cmpl	$0, 16(%rbx)
	jne	LBB0_5
## %bb.2:
	movq	(%rbx), %rsi
	movl	$200, %eax
	andl	(%rsi), %eax
	cmpl	$8, %eax
	jne	LBB0_5
## %bb.3:
	cmpl	$3, 8(%rbx)
	jne	LBB0_22
## %bb.4:
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_alps_report_bare_ps2_packet
	movq	_PSMOUSE_FULL_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_5:
	movq	_ALPS_PS2_INTERLEAVED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_9
## %bb.6:
	cmpl	$4, 8(%rbx)
	jl	LBB0_9
## %bb.7:
	movq	(%rbx), %rax
	movl	12(%rax), %eax
	notl	%eax
	testb	$15, %al
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alps_handle_interleaved_ps2    ## TAILCALL
LBB0_9:
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_alps_is_valid_first_byte
	testl	%eax, %eax
	je	LBB0_21
## %bb.10:
	movq	(%r14), %rax
	movq	_ALPS_PROTO_V5@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_14
## %bb.11:
	movl	8(%rbx), %edx
	cmpl	$2, %edx
	jl	LBB0_14
## %bb.12:
	cmpl	12(%rbx), %edx
	jg	LBB0_14
## %bb.13:
	movq	(%rbx), %rcx
	decl	%edx
	movl	(%rcx,%rdx,4), %ecx
	testb	$-128, %cl
	jne	LBB0_26
LBB0_14:
	movq	_ALPS_PROTO_V7@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.15:
	movq	%rbx, %rdi
	callq	_alps_is_valid_package_v7
	testl	%eax, %eax
	je	LBB0_23
## %bb.16:
	movq	(%r14), %rax
LBB0_17:
	cmpq	(%r15), %rax
	jne	LBB0_19
## %bb.18:
	movq	%rbx, %rdi
	callq	_alps_is_valid_package_ss4_v2
	testl	%eax, %eax
	je	LBB0_23
LBB0_19:
	movl	8(%rbx), %eax
	cmpl	12(%rbx), %eax
	jne	LBB0_22
## %bb.20:
	movq	%rbx, %rdi
	callq	*16(%r14)
	movq	_PSMOUSE_FULL_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_21:
	movq	(%rbx), %rax
	movl	(%rax), %edx
	movl	24(%r14), %r8d
	movl	28(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_psmouse_dbg
	jmp	LBB0_24
LBB0_22:
	movq	_PSMOUSE_GOOD_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_23:
	movslq	8(%rbx), %rdx
	movq	(%rbx), %rax
	movl	-4(%rax,%rdx,4), %ecx
	decq	%rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_psmouse_dbg
LBB0_24:
	movq	_PSMOUSE_BAD_DATA@GOTPCREL(%rip), %rax
LBB0_25:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_psmouse_dbg
	movq	(%r14), %rax
	movq	_ALPS_PROTO_V3_RUSHMORE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.27:
	movl	8(%rbx), %eax
	cmpl	12(%rbx), %eax
	jne	LBB0_24
## %bb.28:
	movq	_PSMOUSE_FULL_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_ALPS_PROTO_V8,8,3              ## @ALPS_PROTO_V8
	.comm	_PSMOUSE_FULL_PACKET,4,2        ## @PSMOUSE_FULL_PACKET
	.comm	_PSMOUSE_GOOD_DATA,4,2          ## @PSMOUSE_GOOD_DATA
	.comm	_ALPS_PS2_INTERLEAVED,4,2       ## @ALPS_PS2_INTERLEAVED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"refusing packet[0] = %x (mask0 = %x, byte0 = %x)\n"

	.comm	_PSMOUSE_BAD_DATA,4,2           ## @PSMOUSE_BAD_DATA
	.comm	_ALPS_PROTO_V5,8,3              ## @ALPS_PROTO_V5
L_.str.1:                               ## @.str.1
	.asciz	"refusing packet[%i] = %x\n"

	.comm	_ALPS_PROTO_V3_RUSHMORE,8,3     ## @ALPS_PROTO_V3_RUSHMORE
	.comm	_ALPS_PROTO_V7,8,3              ## @ALPS_PROTO_V7
	.no_dead_strip	_alps_process_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_process_byte
_alps_process_byte:                     ; @alps_process_byte
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #24]
	ldr	x8, [x20]
Lloh0:
	adrp	x21, _ALPS_PROTO_V8@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ALPS_PROTO_V8@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.1:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_5
; %bb.2:
	ldr	x1, [x19]
	ldr	w8, [x1]
	mov	w9, #200
	and	w8, w8, w9
	cmp	w8, #8
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x19, #8]
	cmp	w8, #3
	b.ne	LBB0_23
; %bb.4:
	mov	x0, x19
	mov	w2, #1
	bl	_alps_report_bare_ps2_packet
	b	LBB0_21
LBB0_5:
	ldr	w8, [x20, #8]
Lloh2:
	adrp	x9, _ALPS_PS2_INTERLEAVED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ALPS_PS2_INTERLEAVED@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.6:
	ldr	w8, [x19, #8]
	cmp	w8, #4
	b.lt	LBB0_9
; %bb.7:
	ldr	x8, [x19]
	ldr	w8, [x8, #12]
	mvn	w8, w8
	tst	w8, #0xf
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_alps_handle_interleaved_ps2
LBB0_9:
	ldr	x8, [x19]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_alps_is_valid_first_byte
	cbz	w0, LBB0_22
; %bb.10:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _ALPS_PROTO_V5@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ALPS_PROTO_V5@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.11:
	ldr	w9, [x19, #8]
	cmp	w9, #2
	b.lt	LBB0_14
; %bb.12:
	ldr	w10, [x19, #12]
	cmp	w9, w10
	b.gt	LBB0_14
; %bb.13:
	ldr	x10, [x19]
	sub	w2, w9, #1
	ldr	w3, [x10, w2, uxtw #2]
	tbnz	w3, #7, LBB0_28
LBB0_14:
Lloh8:
	adrp	x9, _ALPS_PROTO_V7@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ALPS_PROTO_V7@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_alps_is_valid_package_v7
	cbz	w0, LBB0_24
; %bb.16:
	ldr	x8, [x20]
LBB0_17:
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_alps_is_valid_package_ss4_v2
	cbz	w0, LBB0_24
LBB0_19:
	ldp	w8, w9, [x19, #8]
	cmp	w8, w9
	b.ne	LBB0_23
; %bb.20:
	ldr	x8, [x20, #16]
	mov	x0, x19
	blr	x8
LBB0_21:
Lloh11:
	adrp	x8, _PSMOUSE_FULL_PACKET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PSMOUSE_FULL_PACKET@GOTPAGEOFF]
	b	LBB0_27
LBB0_22:
	ldr	x8, [x19]
	ldr	w2, [x8]
	ldp	w8, w3, [x20, #24]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	b	LBB0_25
LBB0_23:
Lloh15:
	adrp	x8, _PSMOUSE_GOOD_DATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PSMOUSE_GOOD_DATA@GOTPAGEOFF]
	b	LBB0_27
LBB0_24:
	ldrsw	x8, [x19, #8]
	sub	x2, x8, #1
	ldr	x8, [x19]
	ldr	w3, [x8, x2, lsl #2]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
LBB0_25:
	bl	_psmouse_dbg
LBB0_26:
Lloh19:
	adrp	x8, _PSMOUSE_BAD_DATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PSMOUSE_BAD_DATA@GOTPAGEOFF]
LBB0_27:
	ldr	w0, [x8]
	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
	add	sp, sp, #64
	ret
LBB0_28:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
	ldr	x8, [x20]
Lloh23:
	adrp	x9, _ALPS_PROTO_V3_RUSHMORE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ALPS_PROTO_V3_RUSHMORE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_26
; %bb.29:
	ldp	w8, w9, [x19, #8]
	cmp	w8, w9
	b.ne	LBB0_26
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ALPS_PROTO_V8,8,3              ; @ALPS_PROTO_V8
	.comm	_PSMOUSE_FULL_PACKET,4,2        ; @PSMOUSE_FULL_PACKET
	.comm	_PSMOUSE_GOOD_DATA,4,2          ; @PSMOUSE_GOOD_DATA
	.comm	_ALPS_PS2_INTERLEAVED,4,2       ; @ALPS_PS2_INTERLEAVED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"refusing packet[0] = %x (mask0 = %x, byte0 = %x)\n"

	.comm	_PSMOUSE_BAD_DATA,4,2           ; @PSMOUSE_BAD_DATA
	.comm	_ALPS_PROTO_V5,8,3              ; @ALPS_PROTO_V5
l_.str.1:                               ; @.str.1
	.asciz	"refusing packet[%i] = %x\n"

	.comm	_ALPS_PROTO_V3_RUSHMORE,8,3     ; @ALPS_PROTO_V3_RUSHMORE
	.comm	_ALPS_PROTO_V7,8,3              ; @ALPS_PROTO_V7
	.no_dead_strip	_alps_process_byte
.subsections_via_symbols
