	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_packet
_read_packet:                           ## @read_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_MM_PREAMBLE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_avio_read
	cmpl	(%rbx), %eax
	jne	LBB0_7
## %bb.1:
	movq	%r13, %r15
	addq	$2, %r15
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_AV_RL16
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_AV_RL16
	movl	%eax, %r12d
	leal	-128(%r14), %eax
	cmpl	$7, %eax
	jb	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$135, %r14d
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %ecx
	callq	_av_log
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_avio_skip
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_avio_read
	cmpl	(%rbx), %eax
	je	LBB0_2
	jmp	LBB0_7
LBB0_9:
	movl	(%rbx), %esi
	addl	%r12d, %esi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	je	LBB0_11
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_11:
	movl	(%r15), %edi
	movl	(%rbx), %edx
	movq	%r13, %rsi
	callq	_memcpy
	movq	%rbx, %r13
	movl	(%rbx), %esi
	addl	(%r15), %esi
	xorl	%ebx, %ebx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_avio_read
	cmpl	%r12d, %eax
	jne	LBB0_7
## %bb.12:
	movl	(%r13), %eax
	addl	%r12d, %eax
	movl	%eax, 4(%r15)
	movl	$0, 8(%r15)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %eax
	movl	%eax, 12(%r15)
	cmpl	$128, %r14d
	je	LBB0_14
## %bb.13:
	incl	%eax
	movl	%eax, 4(%rcx)
	jmp	LBB0_14
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_10
## %bb.5:
	movl	$1, 8(%r14)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdx)
	movl	%eax, 12(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MM_PREAMBLE_SIZE,4,2           ## @MM_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown chunk type 0x%x\n"

	.no_dead_strip	_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_packet
_read_packet:                           ; @read_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, #16
	mov	x19, x1
	mov	x22, x0
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, x8, [x0]
	stur	x8, [x29, #-96]                 ; 8-byte Folded Spill
Lloh3:
	adrp	x28, _MM_PREAMBLE_SIZE@GOTPAGE
Lloh4:
	ldr	x28, [x28, _MM_PREAMBLE_SIZE@GOTPAGEOFF]
	ldr	w8, [x28]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x21, x9, x10
	mov	sp, x21
	stp	x21, x8, [sp, #-16]!
	mov	x0, x20
	bl	_avio_read
	add	sp, sp, #16
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.1:
	add	x25, x21, #2
Lloh7:
	adrp	x27, _AV_LOG_INFO@GOTPAGE
Lloh8:
	ldr	x27, [x27, _AV_LOG_INFO@GOTPAGEOFF]
Lloh9:
	adrp	x26, l_.str@PAGE
Lloh10:
	add	x26, x26, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_AV_RL16
	mov	x23, x0
	mov	x0, x25
	bl	_AV_RL16
	mov	x24, x0
	sub	w8, w23, #128
	cmp	w8, #7
	b.lo	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w23, #135
	b.eq	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x27]
	mov	x0, x22
	mov	x2, x26
	mov	x3, x23
	bl	_av_log
	mov	x0, x20
	mov	x1, x24
	bl	_avio_skip
	ldr	w8, [x28]
	stp	x21, x8, [sp, #-16]!
	mov	x0, x20
	bl	_avio_read
	add	sp, sp, #16
	ldr	w8, [x28]
	cmp	w0, w8
	b.eq	LBB0_2
	b	LBB0_10
LBB0_5:
	ldr	w8, [x28]
	add	w1, w8, w24
	mov	x0, x19
	bl	_av_new_packet
	cbz	w0, LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	ldr	w0, [x19]
	ldr	w2, [x28]
	mov	x1, x21
	bl	_memcpy
	ldr	w8, [x19]
	ldr	w9, [x28]
	add	w8, w9, w8
	stp	x8, x24, [sp, #-16]!
	mov	x0, x20
	bl	_avio_read
	add	sp, sp, #16
	cmp	w0, w24
	b.ne	LBB0_10
; %bb.8:
	mov	w0, #0
	ldr	w8, [x28]
	add	w8, w8, w24
	stp	w8, wzr, [x19, #4]
	ldur	x9, [x29, #-96]                 ; 8-byte Folded Reload
	ldr	w8, [x9, #4]
	str	w8, [x19, #12]
	cmp	w23, #128
	b.eq	LBB0_12
; %bb.9:
	mov	w0, #0
	add	w8, w8, #1
	str	w8, [x9, #4]
	b	LBB0_12
LBB0_10:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_12:
	ldur	x8, [x29, #-88]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.13:
	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_14:
	ldr	x0, [x22]
	mov	x1, x19
	mov	x2, x24
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_6
; %bb.15:
	mov	w0, #0
	mov	w8, #1
	ldur	x11, [x29, #-96]                ; 8-byte Folded Reload
	ldr	w9, [x11]
	add	w10, w9, #1
	str	w10, [x11]
	stp	w8, w9, [x19, #8]
	b	LBB0_12
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MM_PREAMBLE_SIZE,4,2           ; @MM_PREAMBLE_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown chunk type 0x%x\n"

	.no_dead_strip	_read_packet
.subsections_via_symbols
