	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgpk_process_simple_packet
_hgpk_process_simple_packet:            ## @hgpk_process_simple_packet
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	8(%rdi), %r14
	movzbl	(%rax), %r12d
	movzbl	1(%rax), %ecx
	movl	%r12d, %edx
	andl	$16, %edx
	shll	$4, %edx
	movl	%ecx, %r15d
	subl	%edx, %r15d
	movl	%r12d, %ebx
	andl	$32, %ebx
	shll	$3, %ebx
	movzbl	2(%rax), %r8d
	subl	%r8d, %ebx
	testb	$-64, %r12b
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_psmouse_dbg
LBB0_2:
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_hgpk_discard_decay_hack
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_tpdebug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_psmouse_dbg                    ## TAILCALL
LBB0_5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	shrl	%r14d
	andl	$1, %r12d
	andl	$1, %r14d
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	callq	_hgpk_spewing_hack
	movq	_tpdebug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	xorl	%eax, %eax
	callq	_psmouse_dbg
LBB0_7:
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_input_report_key
	movq	_REL_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_input_report_rel
	movq	_REL_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_input_report_rel
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"overflow -- 0x%02x 0x%02x 0x%02x\n"

	.comm	_tpdebug,8,3                    ## @tpdebug
L_.str.1:                               ## @.str.1
	.asciz	"discarding\n"

L_.str.2:                               ## @.str.2
	.asciz	"l=%d r=%d x=%d y=%d\n"

	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_REL_X,4,2                      ## @REL_X
	.comm	_REL_Y,4,2                      ## @REL_Y
	.no_dead_strip	_hgpk_process_simple_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hgpk_process_simple_packet
_hgpk_process_simple_packet:            ; @hgpk_process_simple_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x0
	ldp	x9, x19, [x0]
	ldrb	w23, [x9]
	ldrb	w8, [x9, #1]
	lsl	w10, w23, #4
	and	w10, w10, #0x100
	sub	w21, w8, w10
	lsl	w10, w23, #3
	and	w10, w10, #0x100
	ldrb	w9, [x9, #2]
	sub	w20, w10, w9
	tst	w23, #0xc0
	b.eq	LBB0_2
; %bb.1:
	stp	x8, x9, [sp, #8]
	str	x23, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_psmouse_dbg
LBB0_2:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_hgpk_discard_decay_hack
	cbz	x0, LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _tpdebug@GOTPAGE
Lloh3:
	ldr	x8, [x8, _tpdebug@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.4:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_psmouse_dbg
LBB0_5:
	and	w24, w23, #0x1
	ubfx	w23, w23, #1, #1
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	bl	_hgpk_spewing_hack
Lloh7:
	adrp	x8, _tpdebug@GOTPAGE
Lloh8:
	ldr	x8, [x8, _tpdebug@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	stp	x21, x20, [sp, #16]
	stp	x24, x23, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_psmouse_dbg
LBB0_7:
Lloh12:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x24
	bl	_input_report_key
Lloh15:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_key
Lloh18:
	adrp	x8, _REL_X@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REL_X@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_rel
Lloh21:
	adrp	x8, _REL_Y@GOTPAGE
Lloh22:
	ldr	x8, [x8, _REL_Y@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_input_report_rel
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_input_sync
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"overflow -- 0x%02x 0x%02x 0x%02x\n"

	.comm	_tpdebug,8,3                    ; @tpdebug
l_.str.1:                               ; @.str.1
	.asciz	"discarding\n"

l_.str.2:                               ; @.str.2
	.asciz	"l=%d r=%d x=%d y=%d\n"

	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_REL_X,4,2                      ; @REL_X
	.comm	_REL_Y,4,2                      ; @REL_Y
	.no_dead_strip	_hgpk_process_simple_packet
.subsections_via_symbols
