	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mov_read_chapters
_mov_read_chapters:                     ## @mov_read_chapters
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %r14
	cmpl	$0, (%r14)
	jle	LBB0_34
## %bb.1:
	movq	%rdi, %r15
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %esi
	movq	%rdi, %rbx
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	%rbx, %rdi
LBB0_33:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdi
	movslq	(%r14), %rax
	cmpq	%rax, %rdi
	jge	LBB0_34
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_35
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rcx
	movl	(%rcx,%rdi,4), %ecx
	movq	8(%r15), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdx,%rsi,8), %rbx
	cmpl	%ecx, (%rbx)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=2
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_5
	jmp	LBB0_35
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	72(%rbx), %r13
	movl	(%r13), %edi
	callq	_avio_tell
	movq	48(%rbx), %rsi
	movq	(%rsi), %rcx
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_DISPOSITION_TIMED_THUMBNAILS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AV_DISPOSITION_ATTACHED_PIC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%eax, 4(%rbx)
	cmpl	$0, 8(%rbx)
	je	LBB0_32
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rbx), %r14
	movl	(%r13), %edi
	movq	(%r14), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_avio_seek
	cmpq	(%r14), %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	movl	8(%r14), %edx
	leaq	-48(%rbp), %rsi
	callq	_av_get_packet
	testq	%rax, %rax
	js	LBB0_32
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %eax
	movl	64(%rbx), %ecx
	movl	%ecx, 60(%rbx)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 56(%rbx)
	jmp	LBB0_32
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_AVMEDIA_TYPE_DATA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rsi)
	movq	_AV_CODEC_ID_BIN_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rsi)
	movq	_AVDISCARD_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	8(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_32
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	16(%rbx), %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movl	$40, %r12d
	xorl	%edx, %edx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_14
LBB0_22:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	$0, (%rax)
LBB0_30:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	24(%rbx), %edx
	movq	-24(%r14,%r12), %rcx
	movq	-48(%rbp), %r9
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_avpriv_new_chapter
	leaq	-48(%rbp), %rdi
	callq	_av_freep
LBB0_31:                                ##   in Loop: Header=BB0_14 Depth=2
	movslq	8(%rbx), %rax
	addq	$24, %r12
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, %rdx
	cmpq	%rax, %rcx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jge	LBB0_32
LBB0_14:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	32(%rbx), %r14
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	incq	%rdx
	cltq
	leaq	(%r14,%r12), %rcx
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	cmpq	%rax, %rdx
	cmovgeq	-112(%rbp), %rcx                ## 8-byte Folded Reload
	movq	(%rcx), %rax
	cmpq	-24(%r14,%r12), %rax
	jge	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	L_.str.2(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	movq	-40(%r14,%r12), %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_avio_seek
	cmpq	-40(%r14,%r12), %rax
	jne	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	(%r13), %edi
	callq	_avio_rb16
	movl	%eax, %r13d
	movl	-32(%r14,%r12), %eax
	addl	$-2, %eax
	cmpl	%eax, %r13d
	jg	LBB0_31
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=2
	leal	1(%r13,%r13), %r15d
	movl	%r15d, %edi
	callq	_av_mallocz
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_18
## %bb.21:                              ##   in Loop: Header=BB0_14 Depth=2
	testl	%r13d, %r13d
	je	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_avio_rb16
	cmpl	$65534, %eax                    ## imm = 0xFFFE
	je	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpl	$65279, %eax                    ## imm = 0xFEFF
	jne	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-48(%rbp), %rdx
	movl	%r13d, %esi
	movl	%r15d, %ecx
	callq	_avio_get_str16be
	jmp	LBB0_30
LBB0_26:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-48(%rbp), %rdx
	movl	%r13d, %esi
	movl	%r15d, %ecx
	callq	_avio_get_str16le
	jmp	LBB0_30
LBB0_27:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-48(%rbp), %rdi
	movl	%eax, %esi
	callq	_AV_WB16
	leal	-1(%r13), %ecx
	cmpl	$1, %ecx
	ja	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	-48(%rbp), %rax
	movl	%r13d, %ecx
	movq	$0, (%rax,%rcx,8)
	jmp	LBB0_30
LBB0_29:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdx
	addq	$16, %rdx
	callq	_avio_get_str
	jmp	LBB0_30
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_32
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	L_.str.3(%rip), %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_av_log
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_avio_seek
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %r12
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	jmp	LBB0_33
LBB0_34:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Referenced QT chapter track not found\n"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_AV_DISPOSITION_ATTACHED_PIC,4,2 ## @AV_DISPOSITION_ATTACHED_PIC
	.comm	_AV_DISPOSITION_TIMED_THUMBNAILS,4,2 ## @AV_DISPOSITION_TIMED_THUMBNAILS
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.1:                               ## @.str.1
	.asciz	"Failed to retrieve first frame\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AVMEDIA_TYPE_DATA,8,3          ## @AVMEDIA_TYPE_DATA
	.comm	_AV_CODEC_ID_BIN_DATA,4,2       ## @AV_CODEC_ID_BIN_DATA
	.comm	_AVDISCARD_ALL,4,2              ## @AVDISCARD_ALL
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.2:                               ## @.str.2
	.asciz	"ignoring stream duration which is shorter than chapters\n"

	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
L_.str.3:                               ## @.str.3
	.asciz	"Chapter %d not found in file\n"

	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_mov_read_chapters
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mov_read_chapters
_mov_read_chapters:                     ; @mov_read_chapters
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	x21, [x0, #16]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_35
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x22, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	adrp	x23, l_.str@PAGE
Lloh3:
	add	x23, x23, l_.str@PAGEOFF
	str	x0, [sp, #32]                   ; 8-byte Folded Spill
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x23
	bl	_av_log
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x21]
	cmp	x20, x8
	b.ge	LBB0_35
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_18 Depth 2
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x21, #8]
	ldr	w9, [x9, x20, lsl #2]
	ldr	x10, [x19, #8]
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x24, [x10]
	ldr	w11, [x24]
	cmp	w11, w9
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x10, x10, #8
	subs	x8, x8, #1
	b.ne	LBB0_6
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [x24, #72]
	ldr	w0, [x23]
	bl	_avio_tell
	ldr	x8, [x24, #48]
	ldr	x9, [x8]
Lloh4:
	adrp	x10, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh5:
	ldr	x10, [x10, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	cmp	x9, x10
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh7:
	adrp	x8, _AV_DISPOSITION_ATTACHED_PIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_DISPOSITION_ATTACHED_PIC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _AV_DISPOSITION_TIMED_THUMBNAILS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AV_DISPOSITION_TIMED_THUMBNAILS@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldp	w9, w10, [x24, #4]
	orr	w8, w8, w9
	str	w8, [x24, #4]
	cbz	w10, LBB0_34
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x19, [x24, #32]
	ldr	w0, [x23]
	ldr	x1, [x19]
Lloh13:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	bl	_avio_seek
	ldr	x8, [x19]
	cmp	x0, x8
	b.ne	LBB0_31
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	ldr	w2, [x19, #8]
	add	x1, sp, #40
	bl	_av_get_packet
	tbnz	x0, #63, LBB0_34
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #40]
	ldr	w9, [x24, #64]
Lloh16:
	adrp	x10, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh17:
	ldr	x10, [x10, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w8, w10, w8
	stp	w8, w9, [x24, #56]
	b	LBB0_34
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh19:
	adrp	x9, _AVMEDIA_TYPE_DATA@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AVMEDIA_TYPE_DATA@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	str	x9, [x8]
Lloh22:
	adrp	x9, _AV_CODEC_ID_BIN_DATA@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AV_CODEC_ID_BIN_DATA@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	str	w9, [x8, #8]
Lloh25:
	adrp	x8, _AVDISCARD_ALL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AVDISCARD_ALL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x24, #40]
	ldr	w8, [x24, #8]
	cmp	w8, #1
	b.lt	LBB0_34
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, #0
	mov	x25, #0
	add	x9, x24, #16
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	b	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_18 Depth=2
	str	xzr, [x0]
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=2
	ldp	x0, x5, [sp, #32]               ; 8-byte Folded Reload
	ldr	w2, [x24, #24]
	ldr	x3, [x19, #16]
	mov	x1, x25
	mov	x4, x26
	bl	_avpriv_new_chapter
	add	x0, sp, #40
	bl	_av_freep
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=2
	ldrsw	x8, [x24, #8]
	add	x21, x21, #24
	mov	x25, x22
	cmp	x22, x8
	b.ge	LBB0_34
LBB0_18:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x28, [x24, #32]
	add	x22, x25, #1
	add	x19, x28, x21
	add	x9, x19, #40
	cmp	x22, w8, sxtw
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	csel	x8, x9, x8, lt
	ldr	x26, [x8]
	ldr	x8, [x19, #16]
	cmp	x26, x8
	b.ge	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
Lloh28:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
Lloh31:
	adrp	x2, l_.str.2@PAGE
Lloh32:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_av_log
Lloh33:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh35:
	ldr	x26, [x8]
LBB0_20:                                ;   in Loop: Header=BB0_18 Depth=2
	ldr	w0, [x23]
	ldr	x1, [x28, x21]
Lloh36:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	bl	_avio_seek
	ldr	x8, [x28, x21]
	cmp	x0, x8
	b.ne	LBB0_32
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=2
	ldr	w0, [x23]
	bl	_avio_rb16
	add	x8, x28, x21
	ldr	w8, [x8, #8]
	sub	w8, w8, #2
	cmp	w0, w8
	b.gt	LBB0_17
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=2
	mov	x27, x0
	mov	w28, #1
	bfi	w28, w0, #1, #31
	mov	x0, x28
	bl	_av_mallocz
	str	x0, [sp, #40]
	cbz	x0, LBB0_34
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=2
	cbz	w27, LBB0_15
; %bb.24:                               ;   in Loop: Header=BB0_18 Depth=2
	ldr	w0, [x23]
	bl	_avio_rb16
	mov	w8, #65534
	cmp	w0, w8
	b.eq	LBB0_27
; %bb.25:                               ;   in Loop: Header=BB0_18 Depth=2
	mov	x1, x0
	mov	w8, #65279
	cmp	w0, w8
	b.ne	LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_18 Depth=2
	ldr	w0, [x23]
	ldr	x2, [sp, #40]
	mov	x1, x27
	mov	x3, x28
	bl	_avio_get_str16be
	b	LBB0_16
LBB0_27:                                ;   in Loop: Header=BB0_18 Depth=2
	ldr	w0, [x23]
	ldr	x2, [sp, #40]
	mov	x1, x27
	mov	x3, x28
	bl	_avio_get_str16le
	b	LBB0_16
LBB0_28:                                ;   in Loop: Header=BB0_18 Depth=2
	ldr	x0, [sp, #40]
	bl	_AV_WB16
	sub	w3, w27, #1
	cmp	w3, #1
	b.hi	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_18 Depth=2
	ldr	x8, [sp, #40]
	str	xzr, [x8, w27, uxtw #3]
	b	LBB0_16
LBB0_30:                                ;   in Loop: Header=BB0_18 Depth=2
	ldr	w0, [x23]
Lloh39:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh40:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	ldr	x8, [sp, #40]
	add	x2, x8, #16
	bl	_avio_get_str
	b	LBB0_16
LBB0_31:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh42:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
Lloh45:
	adrp	x2, l_.str.1@PAGE
Lloh46:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_33
LBB0_32:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh47:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh48:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	str	x25, [sp]
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
Lloh50:
	adrp	x2, l_.str.3@PAGE
Lloh51:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_33:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_av_log
LBB0_34:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
Lloh52:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh53:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	bl	_avio_seek
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
Lloh55:
	adrp	x22, _AV_LOG_ERROR@GOTPAGE
Lloh56:
	ldr	x22, [x22, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh57:
	adrp	x23, l_.str@PAGE
Lloh58:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_3
LBB0_35:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Referenced QT chapter track not found\n"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_AV_DISPOSITION_ATTACHED_PIC,4,2 ; @AV_DISPOSITION_ATTACHED_PIC
	.comm	_AV_DISPOSITION_TIMED_THUMBNAILS,4,2 ; @AV_DISPOSITION_TIMED_THUMBNAILS
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.1:                               ; @.str.1
	.asciz	"Failed to retrieve first frame\n"

	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AVMEDIA_TYPE_DATA,8,3          ; @AVMEDIA_TYPE_DATA
	.comm	_AV_CODEC_ID_BIN_DATA,4,2       ; @AV_CODEC_ID_BIN_DATA
	.comm	_AVDISCARD_ALL,4,2              ; @AVDISCARD_ALL
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.2:                               ; @.str.2
	.asciz	"ignoring stream duration which is shorter than chapters\n"

	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
l_.str.3:                               ; @.str.3
	.asciz	"Chapter %d not found in file\n"

	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_mov_read_chapters
.subsections_via_symbols
