	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ksign_parse_one_packet
_ksign_parse_one_packet:                ## @ksign_parse_one_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rbx
	xorl	%r14d, %r14d
	cmpq	%rsi, %rbx
	jae	LBB0_30
## %bb.1:
	leaq	8(%rbx), %rax
	movq	%rax, (%rdi)
	movl	(%rbx), %r8d
	movq	_EBADMSG@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	subl	(%rcx), %r14d
	testb	$-128, %r8b
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	%r8d, %esi
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_30
LBB0_3:
	testb	$64, %r8b
	jne	LBB0_6
## %bb.4:
	andl	$3, %r8d
	cmpl	$3, %r8d
	jne	LBB0_9
LBB0_32:
	xorl	%edx, %edx
	jmp	LBB0_26
LBB0_6:
	cmpq	%rsi, %rax
	jae	LBB0_11
## %bb.7:
	leaq	16(%rbx), %rax
	movq	%rax, (%rdi)
	movq	8(%rbx), %rcx
	cmpl	$191, %ecx
	jg	LBB0_12
## %bb.8:
	movslq	%ecx, %rdx
	jmp	LBB0_26
LBB0_9:
	movl	$1, %r9d
	movl	%r8d, %ecx
	shll	%cl, %r9d
	leaq	(%rax,%r9,8), %rcx
	cmpq	%rsi, %rcx
	jbe	LBB0_15
## %bb.10:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_28
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_28
LBB0_12:
	cmpl	$223, %ecx
	ja	LBB0_18
## %bb.13:
	cmpq	%rsi, %rax
	jae	LBB0_31
## %bb.14:
	shll	$8, %ecx
	addl	$-49152, %ecx                   ## imm = 0xFFFF4000
	leaq	24(%rbx), %rax
	movq	%rax, (%rdi)
	movl	$192, %edx
	addl	16(%rbx), %edx
	movslq	%edx, %rdx
	addq	%rcx, %rdx
	jmp	LBB0_26
LBB0_15:
	cmpl	$2, %r8d
	jb	LBB0_21
## %bb.16:
	movl	%r9d, %ecx
	andl	$-4, %ecx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	shlq	$16, %rdx
	movq	(%rax), %rbx
	shlq	$8, %rbx
	orq	%rdx, %rbx
	orq	8(%rax), %rbx
	movq	16(%rax), %rdx
	shlq	$16, %rbx
	shlq	$8, %rdx
	orq	%rbx, %rdx
	orq	24(%rax), %rdx
	addq	$32, %rax
	addl	$-4, %ecx
	jne	LBB0_17
	jmp	LBB0_22
LBB0_18:
	cmpl	$255, %ecx
	jne	LBB0_32
## %bb.19:
	leaq	40(%rbx), %rax
	cmpq	%rsi, %rax
	jae	LBB0_33
## %bb.20:
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	shlq	$24, %rax
	shlq	$16, %rcx
	orq	%rax, %rcx
	movq	32(%rbx), %rdx
	shlq	$8, %rdx
	orq	%rcx, %rdx
	leaq	48(%rbx), %rax
	movq	%rax, (%rdi)
	orq	40(%rbx), %rdx
	jmp	LBB0_26
LBB0_21:
	xorl	%edx, %edx
LBB0_22:
	cmpl	$1, %r8d
	ja	LBB0_25
## %bb.23:
	andl	$3, %r9d
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	shlq	$8, %rdx
	orq	(%rax), %rdx
	addq	$8, %rax
	decl	%r9d
	jne	LBB0_24
LBB0_25:
	movq	%rax, (%rdi)
LBB0_26:
	leaq	(%rax,%rdx,8), %rax
	cmpq	%rsi, %rax
	jbe	LBB0_29
## %bb.27:
	leaq	L_.str.5(%rip), %rdi
LBB0_28:
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_30
LBB0_29:
	movq	%rax, (%rdi)
	xorl	%r14d, %r14d
LBB0_30:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_31:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_28
LBB0_33:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ksign: invalid packet (ctb=%02x)\n"

L_.str.1:                               ## @.str.1
	.asciz	"ksign: 1st length byte missing\n"

L_.str.2:                               ## @.str.2
	.asciz	"ksign: 2nd length byte missing\n"

L_.str.3:                               ## @.str.3
	.asciz	"ksign: 4 uint8_t length invalid\n"

L_.str.4:                               ## @.str.4
	.asciz	"ksign: length bytes missing\n"

L_.str.5:                               ## @.str.5
	.asciz	"ksign: packet length longer than available data\n"

	.no_dead_strip	_ksign_parse_one_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ksign_parse_one_packet
_ksign_parse_one_packet:                ; @ksign_parse_one_packet
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x9, [x0]
	cmp	x9, x1
	b.hs	LBB0_3
; %bb.1:
	mov	x8, x9
	ldr	w10, [x8], #8
	str	x8, [x0]
Lloh0:
	adrp	x11, _EBADMSG@GOTPAGE
Lloh1:
	ldr	x11, [x11, _EBADMSG@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	neg	w19, w11
	tbnz	w10, #7, LBB0_5
; %bb.2:
	str	x10, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	b	LBB0_4
LBB0_3:
	mov	w19, #0
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	tbnz	w10, #6, LBB0_8
; %bb.6:
	and	w9, w10, #0x3
	cmp	w9, #3
	b.ne	LBB0_11
LBB0_7:
	mov	x9, #0
	b	LBB0_20
LBB0_8:
	cmp	x8, x1
	b.hs	LBB0_13
; %bb.9:
	add	x8, x9, #16
	str	x8, [x0]
	ldr	x10, [x9, #8]
	cmp	w10, #191
	b.gt	LBB0_14
; %bb.10:
	sxtw	x9, w10
	b	LBB0_20
LBB0_11:
	mov	w10, #1
	lsl	w10, w10, w9
	add	x9, x8, w10, uxtw #3
	cmp	x9, x1
	b.ls	LBB0_17
; %bb.12:
Lloh5:
	adrp	x0, l_.str.4@PAGE
Lloh6:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printk
	b	LBB0_4
LBB0_13:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	b	LBB0_4
LBB0_14:
	cmp	w10, #223
	b.hi	LBB0_23
; %bb.15:
	cmp	x8, x1
	b.hs	LBB0_26
; %bb.16:
	lsl	w8, w10, #8
	sub	w10, w8, #12, lsl #12           ; =49152
	add	x8, x9, #24
	str	x8, [x0]
	ldr	w9, [x9, #16]
	add	w9, w9, #192
	add	x9, x10, w9, sxtw
	b	LBB0_20
LBB0_17:
	mov	x9, #0
	sub	w11, w10, #1
	add	x11, x11, #1
	mov	x12, x8
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12], #8
	orr	x9, x13, x9, lsl #8
	subs	w10, w10, #1
	b.ne	LBB0_18
; %bb.19:
	add	x8, x8, x11, lsl #3
	str	x8, [x0]
LBB0_20:
	add	x8, x8, x9, lsl #3
	cmp	x8, x1
	b.ls	LBB0_22
; %bb.21:
Lloh9:
	adrp	x0, l_.str.5@PAGE
Lloh10:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_printk
	b	LBB0_4
LBB0_22:
	mov	w19, #0
	str	x8, [x0]
	b	LBB0_4
LBB0_23:
	cmp	w10, #255
	b.ne	LBB0_7
; %bb.24:
	add	x8, x9, #40
	cmp	x8, x1
	b.hs	LBB0_27
; %bb.25:
	ldp	x8, x10, [x9, #16]
	lsl	x10, x10, #16
	orr	x8, x10, x8, lsl #24
	ldp	x10, x11, [x9, #32]
	orr	x10, x8, x10, lsl #8
	add	x8, x9, #48
	str	x8, [x0]
	orr	x9, x10, x11
	b	LBB0_20
LBB0_26:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
	b	LBB0_4
LBB0_27:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printk
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ksign: invalid packet (ctb=%02x)\n"

l_.str.1:                               ; @.str.1
	.asciz	"ksign: 1st length byte missing\n"

l_.str.2:                               ; @.str.2
	.asciz	"ksign: 2nd length byte missing\n"

l_.str.3:                               ; @.str.3
	.asciz	"ksign: 4 uint8_t length invalid\n"

l_.str.4:                               ; @.str.4
	.asciz	"ksign: length bytes missing\n"

l_.str.5:                               ; @.str.5
	.asciz	"ksign: packet length longer than available data\n"

	.no_dead_strip	_ksign_parse_one_packet
.subsections_via_symbols
