	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgpk_process_packet
_hgpk_process_packet:                   ## @hgpk_process_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, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movzbl	(%rax), %ebx
	movl	%ebx, %r13d
	andl	$1, %r13d
	movl	%ebx, %r12d
	shrl	%r12d
	andl	$1, %r12d
	movzbl	1(%rax), %r15d
	movl	%ebx, %ecx
	andl	$16, %ecx
	shll	$4, %ecx
	subl	%ecx, %r15d
	andl	$32, %ebx
	shll	$3, %ebx
	movzbl	2(%rax), %eax
	subl	%eax, %ebx
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_hgpk_jumpy_hack
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	callq	_hgpk_spewing_hack
	movq	_tpdebug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%ebx, %r9d
	callq	_hgpk_dbg
LBB0_2:
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_input_report_key
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_input_report_key
	movq	_REL_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_input_report_rel
	movq	_REL_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_input_report_rel
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tpdebug,8,3                    ## @tpdebug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.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_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_packet
_hgpk_process_packet:                   ; @hgpk_process_packet
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x24, x0
	ldp	x8, x19, [x0]
	ldrb	w9, [x8]
	and	w23, w9, #0x1
	ubfx	w22, w9, #1, #1
	ldrb	w10, [x8, #1]
	lsl	w11, w9, #4
	and	w11, w11, #0x100
	sub	w21, w10, w11
	lsl	w9, w9, #3
	and	w9, w9, #0x100
	ldrb	w8, [x8, #2]
	sub	w20, w9, w8
	mov	x1, x21
	mov	x2, x20
	bl	_hgpk_jumpy_hack
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_hgpk_spewing_hack
Lloh0:
	adrp	x8, _tpdebug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _tpdebug@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	bl	_hgpk_dbg
LBB0_2:
Lloh5:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_input_report_key
Lloh8:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_input_report_key
Lloh11:
	adrp	x8, _REL_X@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REL_X@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_input_report_rel
Lloh14:
	adrp	x8, _REL_Y@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REL_Y@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_input_report_rel
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_tpdebug,8,3                    ; @tpdebug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.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_packet
.subsections_via_symbols
