	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alps_handle_interleaved_ps2
_alps_handle_interleaved_ps2:           ## @alps_handle_interleaved_ps2
	.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
	movl	(%rdi), %eax
	movq	_PSMOUSE_GOOD_DATA@GOTPCREL(%rip), %r12
	cmpl	$6, %eax
	jl	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	leaq	8(%r14), %r15
	cmpl	$6, %eax
	jne	LBB0_3
## %bb.2:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	$20, %edi
	callq	_msecs_to_jiffies
	addq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mod_timer
	jmp	LBB0_11
LBB0_3:
	movq	%r15, %rdi
	callq	_del_timer
	movq	8(%rbx), %rdx
	movl	24(%rdx), %esi
	testb	$-128, %sil
	jne	LBB0_4
## %bb.9:
	addq	$12, %rdx
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	xorl	%edx, %edx
	callq	_alps_report_bare_ps2_packet
	movq	8(%rbx), %rax
	movl	$247, %ecx
	andl	24(%rax), %ecx
	movl	%ecx, 12(%rax)
	movl	$4, %eax
	jmp	LBB0_10
LBB0_4:
	movl	16(%rdx), %eax
	orl	12(%rdx), %eax
	orl	20(%rdx), %eax
	testb	$-128, %al
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_alps_is_valid_first_byte
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movq	%rbx, %rdi
	callq	*(%r14)
	movq	8(%rbx), %rax
	movl	24(%rax), %ecx
	movl	%ecx, (%rax)
	movl	$1, %eax
LBB0_10:
	movl	%eax, (%rbx)
	jmp	LBB0_11
LBB0_6:
	movq	8(%rbx), %rdx
LBB0_7:
	addq	$12, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_psmouse_dbg
	movq	_PSMOUSE_BAD_DATA@GOTPCREL(%rip), %r12
LBB0_11:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PSMOUSE_GOOD_DATA,4,2          ## @PSMOUSE_GOOD_DATA
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"refusing packet %4ph (suspected interleaved ps/2)\n"

	.comm	_PSMOUSE_BAD_DATA,4,2           ## @PSMOUSE_BAD_DATA
	.no_dead_strip	_alps_handle_interleaved_ps2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alps_handle_interleaved_ps2
_alps_handle_interleaved_ps2:           ; @alps_handle_interleaved_ps2
	.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
	ldr	w8, [x0]
	cmp	w8, #6
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #16]
	add	x21, x20, #8
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	w0, #20
	bl	_msecs_to_jiffies
	add	x1, x0, x19
	mov	x0, x21
	bl	_mod_timer
	b	LBB0_9
LBB0_3:
	mov	x0, x21
	bl	_del_timer
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #24]
	tbnz	w1, #7, LBB0_5
; %bb.4:
	add	x1, x8, #12
	mov	x0, x19
	mov	w2, #0
	bl	_alps_report_bare_ps2_packet
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #24]
	mov	w10, #247
	and	w9, w9, w10
	str	w9, [x8, #12]
	mov	w8, #4
	b	LBB0_8
LBB0_5:
	ldp	w9, w10, [x8, #12]
	orr	w9, w10, w9
	ldr	w10, [x8, #20]
	orr	w9, w9, w10
	tbnz	w9, #7, LBB0_12
; %bb.6:
	mov	x0, x20
	bl	_alps_is_valid_first_byte
	cbz	w0, LBB0_11
; %bb.7:
	ldr	x8, [x20]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #8]
	ldr	w9, [x8, #24]
	str	w9, [x8]
	mov	w8, #1
LBB0_8:
	str	w8, [x19]
LBB0_9:
Lloh3:
	adrp	x8, _PSMOUSE_GOOD_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PSMOUSE_GOOD_DATA@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	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_11:
	ldr	x8, [x19, #8]
LBB0_12:
	add	x2, x8, #12
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
Lloh7:
	adrp	x8, _PSMOUSE_BAD_DATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PSMOUSE_BAD_DATA@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_GOOD_DATA,4,2          ; @PSMOUSE_GOOD_DATA
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"refusing packet %4ph (suspected interleaved ps/2)\n"

	.comm	_PSMOUSE_BAD_DATA,4,2           ; @PSMOUSE_BAD_DATA
	.no_dead_strip	_alps_handle_interleaved_ps2
.subsections_via_symbols
