	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgpk_process_byte
_hgpk_process_byte:                     ## @hgpk_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %r15
	movl	16(%rdi), %esi
	callq	_hgpk_is_byte_valid
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	jge	LBB0_7
## %bb.2:
	movq	8(%r15), %rsi
	movq	_PSMOUSE_GOOD_DATA@GOTPCREL(%rip), %r12
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.3:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_psmouse_dbg
	leaq	16(%r15), %r14
	movq	_post_interrupt_delay@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_psmouse_queue_work
LBB0_5:
	movq	$0, 8(%r15)
	jmp	LBB0_11
LBB0_6:
	movq	_PSMOUSE_BAD_DATA@GOTPCREL(%rip), %r12
	jmp	LBB0_11
LBB0_7:
	movq	(%r15), %rax
	movq	_HGPK_MODE_MOUSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_hgpk_process_simple_packet
	jmp	LBB0_10
LBB0_9:
	movq	%rbx, %rdi
	callq	_hgpk_process_advanced_packet
LBB0_10:
	movq	_PSMOUSE_FULL_PACKET@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_BAD_DATA,4,2           ## @PSMOUSE_BAD_DATA
	.comm	_HGPK_MODE_MOUSE,8,3            ## @HGPK_MODE_MOUSE
	.comm	_PSMOUSE_FULL_PACKET,4,2        ## @PSMOUSE_FULL_PACKET
	.comm	_jiffies,4,2                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"packet inside calibration window, queueing another recalibration\n"

	.comm	_post_interrupt_delay,4,2       ## @post_interrupt_delay
	.comm	_PSMOUSE_GOOD_DATA,4,2          ## @PSMOUSE_GOOD_DATA
	.no_dead_strip	_hgpk_process_byte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hgpk_process_byte
_hgpk_process_byte:                     ; @hgpk_process_byte
	.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, x0
	ldr	x21, [x0, #24]
	ldr	w1, [x0, #16]
	bl	_hgpk_is_byte_valid
	cbz	w0, LBB0_7
; %bb.1:
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.2:
	ldr	x1, [x21, #8]
	cbz	x1, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_time_before
	cbz	x0, LBB0_5
; %bb.4:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_psmouse_dbg
	add	x20, x21, #16
Lloh5:
	adrp	x8, _post_interrupt_delay@GOTPAGE
Lloh6:
	ldr	x8, [x8, _post_interrupt_delay@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_psmouse_queue_work
LBB0_5:
	str	xzr, [x21, #8]
LBB0_6:
Lloh8:
	adrp	x8, _PSMOUSE_GOOD_DATA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PSMOUSE_GOOD_DATA@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
Lloh10:
	adrp	x8, _PSMOUSE_BAD_DATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PSMOUSE_BAD_DATA@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	ldr	x8, [x21]
Lloh12:
	adrp	x9, _HGPK_MODE_MOUSE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _HGPK_MODE_MOUSE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	mov	x0, x19
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	bl	_hgpk_process_simple_packet
	b	LBB0_11
LBB0_10:
	bl	_hgpk_process_advanced_packet
LBB0_11:
Lloh15:
	adrp	x8, _PSMOUSE_FULL_PACKET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PSMOUSE_FULL_PACKET@GOTPAGEOFF]
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PSMOUSE_BAD_DATA,4,2           ; @PSMOUSE_BAD_DATA
	.comm	_HGPK_MODE_MOUSE,8,3            ; @HGPK_MODE_MOUSE
	.comm	_PSMOUSE_FULL_PACKET,4,2        ; @PSMOUSE_FULL_PACKET
	.comm	_jiffies,4,2                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"packet inside calibration window, queueing another recalibration\n"

	.comm	_post_interrupt_delay,4,2       ; @post_interrupt_delay
	.comm	_PSMOUSE_GOOD_DATA,4,2          ; @PSMOUSE_GOOD_DATA
	.no_dead_strip	_hgpk_process_byte
.subsections_via_symbols
