	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vivo_get_packet_header
_vivo_get_packet_header:                ## @vivo_get_packet_header
	.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), %r12
	movq	8(%rdi), %r13
	movq	%r12, %rdi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r12, %rdi
	callq	_avio_r8
	movl	%eax, %r15d
	cmpl	$130, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_avio_r8
LBB0_4:
	movl	%eax, %ecx
	shrl	$4, %ecx
	movl	%ecx, (%r13)
	andl	$15, %eax
	movl	%eax, 4(%r13)
	cmpl	$4, %ecx
	ja	LBB0_7
## %bb.5:
	movl	$128, %eax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_8:
	movl	$40, %eax
	jmp	LBB0_9
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_13
LBB0_6:
	movl	$24, %eax
LBB0_9:
	xorl	%ebx, %ebx
	movl	%eax, 8(%r13)
	cmpl	$130, %r15d
	jne	LBB0_15
LBB0_10:
	movq	%r12, %rdi
	callq	_avio_r8
	movl	%eax, %ecx
	andl	$127, %ecx
	movl	%ecx, 8(%r13)
	xorl	%ebx, %ebx
	testb	$-128, %al
	je	LBB0_15
## %bb.11:
	movq	%r12, %rdi
	callq	_avio_r8
	movl	8(%r13), %ecx
	shll	$7, %ecx
	movl	%eax, %edx
	andl	$127, %edx
	orl	%ecx, %edx
	movl	%edx, 8(%r13)
	testb	$-128, %al
	je	LBB0_15
## %bb.12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_13:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	jmp	LBB0_14
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown packet type %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"coded length is more than two bytes\n"

	.no_dead_strip	_vivo_get_packet_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vivo_get_packet_header
_vivo_get_packet_header:                ; @vivo_get_packet_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldp	x20, x22, [x0]
	mov	x0, x20
	bl	_avio_feof
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
	b	LBB0_14
LBB0_3:
	mov	x0, x20
	bl	_avio_r8
	mov	x21, x0
	cmp	w0, #130
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_avio_r8
LBB0_5:
	lsr	w9, w0, #4
	and	w8, w0, #0xf
	stp	w9, w8, [x22]
	cmp	w9, #4
	b.hi	LBB0_8
; %bb.6:
	mov	w8, #128
Lloh2:
	adrp	x10, lJTI0_0@PAGE
Lloh3:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_7
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_7:
	mov	w8, #40
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	str	x9, [sp]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_16
LBB0_9:
	mov	w8, #24
LBB0_10:
	str	w8, [x22, #8]
	cmp	w21, #130
	b.ne	LBB0_13
LBB0_11:
	mov	x0, x20
	bl	_avio_r8
	and	w8, w0, #0x7f
	str	w8, [x22, #8]
	tbz	w0, #7, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_avio_r8
	ldr	w8, [x22, #8]
	mov	x9, x0
	bfi	w9, w8, #7, #25
	str	w9, [x22, #8]
	tbnz	w0, #7, LBB0_15
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	add	sp, sp, #64
	ret
LBB0_15:
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_av_log
Lloh14:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_11-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_9-LBB0_7)>>2
                                        ; -- End function
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown packet type %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"coded length is more than two bytes\n"

	.no_dead_strip	_vivo_get_packet_header
.subsections_via_symbols
