	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %esi
	movl	%esi, %ecx
	andl	$200, %ecx
	cmpl	$8, %ecx
	jne	LBB0_3
## %bb.1:
	cmpl	$3, 8(%rbx)
	jne	LBB0_14
## %bb.2:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_alps_report_bare_ps2_packet
	movq	_PSMOUSE_FULL_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_3:
	movq	16(%rbx), %r14
	movq	_ALPS_PS2_INTERLEAVED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_7
## %bb.4:
	cmpl	$4, 8(%rbx)
	jl	LBB0_7
## %bb.5:
	movl	12(%rax), %eax
	notl	%eax
	testb	$15, %al
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_alps_handle_interleaved_ps2    ## TAILCALL
LBB0_7:
	movq	%r14, %rdi
	callq	_alps_is_valid_first_byte
	testl	%eax, %eax
	je	LBB0_15
## %bb.8:
	movq	8(%r14), %rcx
	movq	_ALPS_PROTO_V5@GOTPCREL(%rip), %rdx
	movl	8(%rbx), %eax
	cmpq	(%rdx), %rcx
	je	LBB0_12
## %bb.9:
	cmpl	$2, %eax
	jl	LBB0_12
## %bb.10:
	cmpl	12(%rbx), %eax
	jg	LBB0_12
## %bb.11:
	movq	(%rbx), %rcx
	leal	-1(%rax), %esi
	movl	(%rcx,%rsi,4), %edx
	testb	$-128, %dl
	jne	LBB0_18
LBB0_12:
	cmpl	12(%rbx), %eax
	jne	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	*16(%r14)
	movq	_PSMOUSE_FULL_PACKET@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_14:
	movq	_PSMOUSE_GOOD_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	(%rbx), %rax
	movl	(%rax), %esi
	movl	24(%r14), %ecx
	movl	28(%r14), %edx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dbg
LBB0_16:
	movq	_PSMOUSE_BAD_DATA@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_dbg
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.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"

	.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, #48
	.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
	mov	x19, x0
	ldr	x1, [x0]
	ldr	w8, [x1]
	mov	w9, #200
	and	w9, w8, w9
	cmp	w9, #8
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x19, #8]
	cmp	w8, #3
	b.ne	LBB0_14
; %bb.2:
	mov	x0, x19
	mov	w2, #1
	bl	_alps_report_bare_ps2_packet
	b	LBB0_13
LBB0_3:
	ldr	x20, [x19, #16]
	ldr	w9, [x20]
Lloh0:
	adrp	x10, _ALPS_PS2_INTERLEAVED@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ALPS_PS2_INTERLEAVED@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_7
; %bb.4:
	ldr	w9, [x19, #8]
	cmp	w9, #4
	b.lt	LBB0_7
; %bb.5:
	ldr	w9, [x1, #12]
	mvn	w9, w9
	tst	w9, #0xf
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_alps_handle_interleaved_ps2
LBB0_7:
	mov	x0, x20
	mov	x1, x8
	bl	_alps_is_valid_first_byte
	cbz	w0, LBB0_15
; %bb.8:
	ldr	x9, [x20, #8]
Lloh3:
	adrp	x8, _ALPS_PROTO_V5@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALPS_PROTO_V5@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x8]
	ldr	w8, [x19, #8]
	cmp	x9, x10
	ccmp	w8, #2, #8, ne
	b.lt	LBB0_11
; %bb.9:
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.gt	LBB0_11
; %bb.10:
	ldr	x9, [x19]
	sub	w1, w8, #1
	ldr	w2, [x9, w1, uxtw #2]
	tbnz	w2, #7, LBB0_18
LBB0_11:
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x20, #16]
	mov	x0, x19
	blr	x8
LBB0_13:
Lloh6:
	adrp	x8, _PSMOUSE_FULL_PACKET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PSMOUSE_FULL_PACKET@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:
Lloh8:
	adrp	x8, _PSMOUSE_GOOD_DATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PSMOUSE_GOOD_DATA@GOTPAGEOFF]
	b	LBB0_17
LBB0_15:
	ldr	x8, [x19]
	ldr	w1, [x8]
	ldp	w8, w2, [x20, #24]
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
LBB0_16:
	bl	_dbg
Lloh12:
	adrp	x8, _PSMOUSE_BAD_DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PSMOUSE_BAD_DATA@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_18:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.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"

	.no_dead_strip	_alps_process_byte
.subsections_via_symbols
