	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_pakt_chunk
_read_pakt_chunk:                       ## @read_pakt_chunk
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	16(%rdi), %r15
	movq	(%rdi), %rax
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r14
	movq	(%rax), %r13
	movq	%r15, %rdi
	callq	_avio_tell
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_avio_rb64
	movq	%rax, %rbx
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.1:
	movq	_INT32_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shrq	$2, %rax
	movslq	%ebx, %rcx
	cmpq	%rcx, %rax
	jb	LBB0_2
## %bb.3:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	callq	_avio_rb64
	movq	%rax, 8(%r13)
	movq	%r15, %rdi
	callq	_avio_rb32
	addq	%rax, 8(%r13)
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_avio_rb32
	addq	%rax, 8(%r13)
	movq	$0, (%r13)
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.5:
	xorl	%edx, %edx
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	addl	%r12d, %r15d
	addq	(%r13), %rdx
	movq	%rdx, (%r13)
	decl	%ebx
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rdi
	movq	_AVINDEX_KEYFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_av_add_index_entry
	movq	16(%r14), %r12
	testq	%r12, %r12
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ff_mp4_read_descr_len
	movq	%rax, %r12
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r14), %rdx
	testq	%rdx, %rdx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ff_mp4_read_descr_len
	movq	%rax, %rdx
	jmp	LBB0_10
LBB0_4:
	xorl	%r15d, %r15d
LBB0_11:
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_avio_tell
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	subl	%ebx, %eax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %eax
	jle	LBB0_13
## %bb.12:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	addl	%ecx, %ebx
	movq	%r12, %rdi
	callq	_avio_tell
	subl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_avio_skip
	movl	%r15d, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_INT32_MAX,4,2                  ## @INT32_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AVINDEX_KEYFRAME,4,2           ## @AVINDEX_KEYFRAME
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error reading packet table\n"

	.no_dead_strip	_read_pakt_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_pakt_chunk
_read_pakt_chunk:                       ; @read_pakt_chunk
	.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
	mov	x21, x1
	mov	x20, x0
	ldp	x26, x19, [x0, #8]
	ldr	x8, [x0]
	ldr	x27, [x8]
	mov	x0, x19
	bl	_avio_tell
	mov	x22, x0
	mov	x0, x19
	bl	_avio_rb64
	mov	x23, x0
	tbnz	w23, #31, LBB0_12
; %bb.1:
Lloh0:
	adrp	x8, _INT32_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT32_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	lsr	x8, x8, #2
	cmp	x8, w23, sxtw
	b.lo	LBB0_12
; %bb.2:
	mov	x0, x19
	bl	_avio_rb64
	str	x0, [x27, #8]
	mov	x0, x19
	bl	_avio_rb32
	ldr	x8, [x27, #8]
	add	x8, x8, x0
	str	x8, [x27, #8]
	mov	x0, x19
	bl	_avio_rb32
	ldr	x8, [x27, #8]
	add	x8, x8, x0
	stp	xzr, x8, [x27]
	cbz	w23, LBB0_9
; %bb.3:
	mov	x2, #0
	mov	w24, #0
Lloh3:
	adrp	x28, _AVINDEX_KEYFRAME@GOTPAGE
Lloh4:
	ldr	x28, [x28, _AVINDEX_KEYFRAME@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, w25
	ldr	x8, [x27]
	add	x2, x8, x0
	str	x2, [x27]
	subs	w23, w23, #1
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x0, [x8]
	ldr	w5, [x28]
	mov	x1, x24
	mov	w3, #0
	mov	w4, #0
	bl	_av_add_index_entry
	ldr	x25, [x26, #16]
	cbz	x25, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x26, #8]
	cbnz	x0, LBB0_4
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_ff_mp4_read_descr_len
	mov	x25, x0
	ldr	x0, [x26, #8]
	cbnz	x0, LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_ff_mp4_read_descr_len
	b	LBB0_4
LBB0_9:
	mov	w24, #0
LBB0_10:
	mov	x0, x19
	bl	_avio_tell
	sub	w8, w0, w22
	cmp	w8, w21
	b.le	LBB0_14
; %bb.11:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_av_log
LBB0_12:
Lloh10:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_13:
	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:
	add	w20, w22, w21
	mov	x0, x19
	bl	_avio_tell
	sub	w1, w20, w0
	mov	x0, x19
	bl	_avio_skip
	mov	w0, #0
	str	w24, [x26]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_INT32_MAX,4,2                  ; @INT32_MAX
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AVINDEX_KEYFRAME,4,2           ; @AVINDEX_KEYFRAME
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error reading packet table\n"

	.no_dead_strip	_read_pakt_chunk
.subsections_via_symbols
