	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nuv_packet
_nuv_packet:                            ## @nuv_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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_HDRSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	%r15, %rdi
	callq	_avio_feof
	testl	%eax, %eax
	je	LBB0_1
LBB0_20:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_21:
	movl	%eax, %r15d
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	32(%rbx), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 8(%rax)
	je	LBB0_18
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 4(%rax)
	leaq	L_.str(%rip), %rdx
	jns	LBB0_8
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_avio_skip
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_avio_feof
	testl	%eax, %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_20
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	movq	_HDRSIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	movq	%r15, %rdi
	callq	_avio_tell
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_avio_read
	cmpl	(%r13), %eax
	jl	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %ebx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_AV_RL32
	movq	%rax, %rdi
	callq	_PKTSIZE
	movl	%eax, %r13d
	addl	$-128, %ebx
	cmpl	$3, %ebx
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	ja	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	leaq	L_.str.1(%rip), %rdx
	js	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_av_get_packet
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 24(%rbx)
	movl	%eax, %r14d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$16, %rdi
	callq	_AV_RL32
	movq	%rax, 8(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	%r14d, %r15d
	sarl	$31, %r15d
	andl	%r14d, %r15d
	jmp	LBB0_22
LBB0_3:
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_20
	jmp	LBB0_22
LBB0_8:
	testq	%r14, %r14
	movl	$0, %r14d
	movq	%r12, %rax
	cmovel	%r14d, %eax
	movq	%rax, %r12
	leal	(%rax,%r13), %esi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_21
## %bb.9:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 8(%rax)
	jne	LBB0_11
## %bb.10:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_11:
	orl	%r14d, 24(%rbx)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	addq	$16, %rdi
	callq	_AV_RL32
	movq	%rax, 8(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	movl	%eax, (%rbx)
	movl	28(%rbx), %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movslq	28(%rbx), %rax
	movslq	%r12d, %rsi
	addq	%rax, %rsi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	callq	_avio_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	xorl	%r15d, %r15d
	cmpl	%r13d, %r14d
	jge	LBB0_22
## %bb.14:
	addl	%r12d, %r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_av_shrink_packet
	jmp	LBB0_22
LBB0_12:
	movq	%rbx, %rdi
	callq	_av_packet_unref
	movl	%r14d, %r15d
	jmp	LBB0_22
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_19
	.long	L0_0_set_6
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.comm	_HDRSIZE,4,2                    ## @HDRSIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Video packet in file without video stream!\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
L_.str.1:                               ## @.str.1
	.asciz	"Audio packet in file without audio stream!\n"

	.no_dead_strip	_nuv_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nuv_packet
_nuv_packet:                            ; @nuv_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	stur	x1, [x29, #-104]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldp	x20, x27, [x0]
	stur	x0, [x29, #-96]                 ; 8-byte Folded Spill
Lloh3:
	adrp	x28, _HDRSIZE@GOTPAGE
Lloh4:
	ldr	x28, [x28, _HDRSIZE@GOTPAGEOFF]
	ldr	w8, [x28]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x20
	bl	_avio_feof
	cbz	w0, LBB0_5
LBB0_1:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_2:
	mov	x26, x0
LBB0_3:
	ldur	x8, [x29, #-88]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.4:
	mov	x0, x26
	sub	sp, x29, #80
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	add	x24, x21, #32
	b	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x27, #4]
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	tbz	w8, #31, LBB0_17
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldur	x0, [x29, #-96]                 ; 8-byte Folded Reload
	bl	_av_log
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_avio_skip
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x20
	bl	_avio_feof
	cbnz	w0, LBB0_1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x27, #8]
	ldr	w19, [x28]
	mov	x0, x20
	bl	_avio_tell
	mov	x25, x0
	ldr	w2, [x28]
	mov	x0, x20
	mov	x1, x21
	bl	_avio_read
	ldr	w8, [x28]
	cmp	w0, w8
	b.lt	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w26, [x21]
	mov	x0, x24
	bl	_AV_RL32
	bl	_PKTSIZE
	mov	x23, x0
	sub	w8, w26, #128
	cmp	w8, #3
	b.hi	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
Lloh18:
	adrp	x11, lJTI0_0@PAGE
Lloh19:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x9, LBB0_6
	ldrb	w10, [x11, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x27]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	tbnz	w8, #31, LBB0_8
; %bb.15:
	mov	x0, x20
	ldur	x19, [x29, #-104]               ; 8-byte Folded Reload
	mov	x1, x19
	mov	x2, x23
	bl	_av_get_packet
	mov	x20, x0
Lloh22:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
	str	x25, [x19, #16]
	add	x0, x21, #16
	bl	_AV_RL32
	str	x0, [x19, #8]
	ldr	w8, [x27]
	str	w8, [x19]
	cmp	w20, #0
	csel	w26, w20, wzr, lt
	b	LBB0_3
LBB0_16:
	mov	x26, x0
	tbz	w0, #31, LBB0_1
	b	LBB0_3
LBB0_17:
	cmp	x22, #0
	csel	w22, wzr, w19, eq
	add	w1, w23, w22
	ldur	x19, [x29, #-104]               ; 8-byte Folded Reload
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_2
; %bb.18:
	str	x25, [x19, #16]
	ldr	w8, [x21, #8]
Lloh25:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh26:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, wzr, eq
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
	str	w8, [x19, #24]
	add	x0, x21, #16
	bl	_AV_RL32
	str	x0, [x19, #8]
	ldr	w8, [x27, #4]
	str	w8, [x19]
	ldr	w0, [x19, #28]
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	ldrsw	x8, [x19, #28]
	add	x1, x8, w22, sxtw
	mov	x0, x20
	mov	x2, x23
	bl	_avio_read
	mov	x26, x0
	tbnz	w0, #31, LBB0_21
; %bb.19:
	cmp	w26, w23
	b.ge	LBB0_22
; %bb.20:
	add	w1, w26, w22
	mov	x0, x19
	bl	_av_shrink_packet
	mov	w26, #0
	b	LBB0_3
LBB0_21:
	mov	x0, x19
	bl	_av_packet_unref
	b	LBB0_3
LBB0_22:
	mov	w26, #0
	b	LBB0_3
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_14-LBB0_6)>>2
                                        ; -- End function
	.comm	_HDRSIZE,4,2                    ; @HDRSIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Video packet in file without video stream!\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
l_.str.1:                               ; @.str.1
	.asciz	"Audio packet in file without audio stream!\n"

	.no_dead_strip	_nuv_packet
.subsections_via_symbols
