	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hgpk_is_byte_valid
_hgpk_is_byte_valid:                    ## @hgpk_is_byte_valid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %rax
	movslq	(%rdi), %rcx
	movl	(%rax), %edx
	cmpl	$128, %edx
	je	LBB0_7
## %bb.1:
	cmpl	$130, %edx
	je	LBB0_4
## %bb.2:
	cmpl	$129, %edx
	jne	LBB0_11
## %bb.3:
	movb	(%rsi), %al
	andb	$12, %al
	xorl	%esi, %esi
	cmpb	$8, %al
	sete	%sil
	jmp	LBB0_10
LBB0_4:
	cmpl	$1, %ecx
	jne	LBB0_9
## %bb.5:
	movb	(%rsi), %al
	movq	_HGPK_GS@GOTPCREL(%rip), %r8
	jmp	LBB0_6
LBB0_7:
	cmpl	$1, %ecx
	jne	LBB0_9
## %bb.8:
	movb	(%rsi), %al
	movq	_HGPK_PT@GOTPCREL(%rip), %r8
LBB0_6:
	xorl	%esi, %esi
	cmpb	(%r8), %al
	sete	%sil
	jmp	LBB0_10
LBB0_9:
	movb	-1(%rcx,%rsi), %al
	notb	%al
	shrb	$7, %al
	movzbl	%al, %esi
LBB0_10:
	movl	$1, %eax
	testl	%esi, %esi
	je	LBB0_11
## %bb.12:
	popq	%rbp
	retq
LBB0_11:
	movl	4(%rdi), %r9d
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	$6, %r8d
	callq	_psmouse_dbg
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HGPK_GS,1,0                    ## @HGPK_GS
	.comm	_HGPK_PT,1,0                    ## @HGPK_PT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad data, mode %d (%d) %*ph\n"

	.no_dead_strip	_hgpk_is_byte_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hgpk_is_byte_valid
_hgpk_is_byte_valid:                    ; @hgpk_is_byte_valid
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0, #8]
	ldrsw	x3, [x0]
	ldr	w2, [x8]
	cmp	w2, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w2, #130
	b.eq	LBB0_4
; %bb.2:
	cmp	w2, #129
	b.ne	LBB0_11
; %bb.3:
	ldrb	w8, [x1]
	and	w8, w8, #0xc
	cmp	w8, #8
	cset	w8, eq
	cbnz	w8, LBB0_9
	b	LBB0_11
LBB0_4:
	cmp	w3, #1
	b.ne	LBB0_10
; %bb.5:
	ldrb	w8, [x1]
Lloh0:
	adrp	x9, _HGPK_GS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HGPK_GS@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	cmp	w3, #1
	b.ne	LBB0_10
; %bb.7:
	ldrb	w8, [x1]
Lloh2:
	adrp	x9, _HGPK_PT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HGPK_PT@GOTPAGEOFF]
LBB0_8:
	ldrb	w9, [x9]
	cmp	w8, w9
	cset	w8, eq
	cbz	w8, LBB0_11
LBB0_9:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_10:
	add	x8, x3, x1
	ldurb	w8, [x8, #-1]
	mvn	w8, w8
	ubfx	w8, w8, #7, #1
	cbnz	w8, LBB0_9
LBB0_11:
	ldr	w5, [x0, #4]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #6
	bl	_psmouse_dbg
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HGPK_GS,1,0                    ; @HGPK_GS
	.comm	_HGPK_PT,1,0                    ; @HGPK_PT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad data, mode %d (%d) %*ph\n"

	.no_dead_strip	_hgpk_is_byte_valid
.subsections_via_symbols
