	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_chapters
_copy_chapters:                         ## @copy_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %rcx
	movq	8(%rcx), %rdi
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %esi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	addl	(%rax), %esi
	movl	$8, %edx
	callq	_av_realloc_f
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, (%rcx)
	jle	LBB0_13
## %bb.2:
	xorl	%r12d, %r12d
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rsi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rax
	movslq	(%rsi), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rsi)
	movq	%r14, (%rax,%rcx,8)
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rsi
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	(%rcx), %rax
	cmpq	%rax, %r12
	jge	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rcx), %rax
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rcx
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	(%rax,%r12,8), %r15
	movl	$0, %edi
	cmovneq	%rcx, %rdi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subq	(%rax), %rdi
	movq	%rsi, %r14
	movl	(%rsi), %esi
	movl	20(%r15), %edx
	callq	_av_rescale_q
	movq	%rax, %r13
	movq	8(%rbx), %rbx
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14), %esi
	movl	20(%r15), %edx
	movq	%rbx, %rdi
	callq	_av_rescale_q
	movq	%rax, %rbx
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r13, (%r15)
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jl	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rbx,%r13), %rax
	cmpq	%rax, 8(%r15)
	jg	LBB0_13
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$32, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r14
	movl	24(%r15), %eax
	movl	%eax, 24(%r14)
	movl	20(%r15), %eax
	movl	%eax, 20(%r14)
	movq	8(%r15), %rsi
	subq	%r13, %rsi
	xorl	%edi, %edi
	callq	_FFMAX
	movq	%rax, 8(%r14)
	movq	(%r15), %rsi
	subq	%r13, %rsi
	movq	%rbx, %rdi
	callq	_FFMIN
	movq	%rax, (%r14)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	addq	$16, %rdi
	movl	16(%r15), %esi
	xorl	%edx, %edx
	callq	_av_dict_copy
	jmp	LBB0_11
LBB0_13:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AV_TIME_BASE_Q,4,2             ## @AV_TIME_BASE_Q
	.comm	_INT64_MAX,8,3                  ## @INT64_MAX
	.no_dead_strip	_copy_chapters
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_chapters
_copy_chapters:                         ; @copy_chapters
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	w2, [sp, #12]                   ; 4-byte Folded Spill
	mov	x20, x1
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x25, [x0, #8]
	ldr	x9, [x1, #16]
	ldr	x0, [x9, #8]
	ldr	w8, [x25]
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	ldr	w9, [x9]
	add	w1, w9, w8
	mov	w2, #8
	bl	_av_realloc_f
	cbz	x0, LBB0_14
; %bb.1:
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x0, [x8, #8]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.2:
	mov	x27, #0
Lloh0:
	adrp	x24, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	adrp	x28, _AV_TIME_BASE_Q@GOTPAGE
Lloh3:
	ldr	x28, [x28, _AV_TIME_BASE_Q@GOTPAGEOFF]
Lloh4:
	adrp	x26, _INT64_MAX@GOTPAGE
Lloh5:
	ldr	x26, [x26, _INT64_MAX@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [sp, #16]                  ; 8-byte Folded Reload
	ldr	x8, [x11, #8]
	ldrsw	x9, [x11]
	add	w10, w9, #1
	str	w10, [x11]
	str	x24, [x8, x9, lsl #3]
	mov	x24, x28
	mov	x28, x21
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [x25]
	cmp	x27, x8
	b.ge	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25, #8]
	ldr	x19, [x8, x27, lsl #3]
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	csel	x8, xzr, x8, eq
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x9, [x9]
	sub	x0, x8, x9
	ldr	w1, [x28]
	ldr	w2, [x19, #20]
	bl	_av_rescale_q
	mov	x22, x0
	ldr	x23, [x20, #8]
	ldr	x8, [x26]
	cmp	x23, x8
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x28]
	ldr	w2, [x19, #20]
	mov	x0, x23
	bl	_av_rescale_q
	mov	x23, x0
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	cmp	x8, x22
	b.lt	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26]
	cmp	x23, x8
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	add	x9, x23, x22
	cmp	x8, x9
	b.gt	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x28
	mov	x28, x24
	mov	w0, #32
	bl	_av_mallocz
	cbz	x0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	ldur	d0, [x19, #20]
	stur	d0, [x0, #20]
	ldr	x8, [x19, #8]
	sub	x1, x8, x22
	mov	w0, #0
	bl	_FFMAX
	str	x0, [x24, #8]
	ldr	x8, [x19]
	sub	x1, x8, x22
	mov	x0, x23
	bl	_FFMIN
	str	x0, [x24]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, x24, #16
	ldr	w1, [x19, #16]
	mov	w2, #0
	bl	_av_dict_copy
	b	LBB0_3
LBB0_13:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_AVERROR
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AV_TIME_BASE_Q,4,2             ; @AV_TIME_BASE_Q
	.comm	_INT64_MAX,8,3                  ; @INT64_MAX
	.no_dead_strip	_copy_chapters
.subsections_via_symbols
