	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compute_chapters_end
_compute_chapters_end:                  ## @compute_chapters_end
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rax
	testq	%rax, %rax
	jle	LBB0_4
## %bb.1:
	movq	8(%r15), %rcx
	movq	_INT64_MAX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	subq	%rax, %rdx
	cmpq	%rdx, %rcx
	jge	LBB0_4
## %bb.2:
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
	xorl	%r14d, %r14d
	cmpq	(%rdx), %rcx
	cmovneq	%rcx, %r14
	addq	%rax, %r14
	jmp	LBB0_5
LBB0_4:
	xorl	%r14d, %r14d
LBB0_5:
	movl	16(%r15), %eax
	testl	%eax, %eax
	je	LBB0_19
## %bb.6:
	xorl	%r12d, %r12d
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r13), %rcx
	cmpq	%rcx, %rbx
	movq	%rbx, %rdx
	cmovlq	%rcx, %rdx
	movq	_INT64_MAX@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rbx
	cmoveq	%rcx, %rdx
	movq	%rdx, (%r13)
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rdx
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	incq	%r12
	movl	%eax, %ecx
	cmpq	%rcx, %r12
	jae	LBB0_19
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	24(%r15), %rcx
	movq	(%rcx,%r12,8), %r13
	movq	(%r13), %rcx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	testq	%r14, %r14
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_AV_TIME_BASE_Q@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r13), %edx
	movq	%r14, %rdi
	callq	_av_rescale_q
	movq	%rax, %rbx
	movl	16(%r15), %eax
	testl	%eax, %eax
	je	LBB0_18
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=2
	incq	%r14
	movl	16(%r15), %eax
	cmpq	%rax, %r14
	jae	LBB0_7
LBB0_15:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	24(%r15), %rax
	movq	(%rax,%r14,8), %rax
	movq	8(%rax), %rdi
	movl	16(%rax), %esi
	movl	16(%r13), %edx
	callq	_av_rescale_q
	cmpq	%r14, %r12
	je	LBB0_14
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	cmpq	%rbx, %rax
	movq	%rax, %rcx
	cmovgeq	%rbx, %rcx
	cmpq	8(%r13), %rax
	cmovgq	%rcx, %rbx
	jmp	LBB0_14
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_INT64_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	testl	%eax, %eax
	jne	LBB0_13
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT64_MAX,8,3                  ## @INT64_MAX
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_AV_TIME_BASE_Q,4,2             ## @AV_TIME_BASE_Q
	.no_dead_strip	_compute_chapters_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_chapters_end
_compute_chapters_end:                  ; @compute_chapters_end
	.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	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x22, _INT64_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _INT64_MAX@GOTPAGEOFF]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	x9, [x19, #8]
	ldr	x10, [x22]
	sub	x10, x10, x8
	cmp	x9, x10
	b.ge	LBB0_3
; %bb.2:
Lloh2:
	adrp	x10, _AV_NOPTS_VALUE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	csel	x9, xzr, x9, eq
	add	x20, x9, x8
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_4
	b	LBB0_15
LBB0_3:
	mov	x20, #0
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_15
LBB0_4:
	mov	x23, #0
Lloh5:
	adrp	x24, _AV_NOPTS_VALUE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh7:
	adrp	x25, _AV_TIME_BASE_Q@GOTPAGE
Lloh8:
	ldr	x25, [x25, _AV_TIME_BASE_Q@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x22]
	ldr	x10, [x26, #8]
	cmp	x21, x10
	ccmp	x21, x9, #4, ge
	csel	x9, x10, x21, eq
	str	x9, [x26]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, uxtw
	b.hs	LBB0_15
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x9, [x19, #24]
	ldr	x26, [x9, x23, lsl #3]
	ldr	x9, [x26]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cbz	x20, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x25]
	ldr	w2, [x26, #16]
	mov	x0, x20
	bl	_av_rescale_q
	mov	x21, x0
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_11
	b	LBB0_5
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x21, [x22]
	cbz	w8, LBB0_5
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x27, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	add	x27, x27, #1
	ldr	w8, [x19, #16]
	cmp	x27, x8
	b.hs	LBB0_5
LBB0_13:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #24]
	ldr	x8, [x8, x27, lsl #3]
	ldr	x0, [x8, #8]
	ldr	w1, [x8, #16]
	ldr	w2, [x26, #16]
	bl	_av_rescale_q
	cmp	x23, x27
	b.eq	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x8, [x26, #8]
	cmp	x0, x21
	ccmp	x0, x8, #4, lt
	csel	x21, x0, x21, gt
	b	LBB0_12
LBB0_15:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_INT64_MAX,8,3                  ; @INT64_MAX
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_AV_TIME_BASE_Q,4,2             ; @AV_TIME_BASE_Q
	.no_dead_strip	_compute_chapters_end
.subsections_via_symbols
