	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_index
_write_index:                           ## @write_index
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -72(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	%rsi, %rdi
	callq	_avio_tell
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	28(%rbx), %ecx
	movl	32(%rbx), %esi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_put_tt
	movq	(%rbx), %rsi
	movq	%r15, %rdi
	callq	_ff_put_v
	movq	%rbx, %rsi
	movq	(%rbx), %rax
	testq	%rax, %rax
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_ff_nut_sp_pos_cmp@GOTPCREL(%rip), %r14
	leaq	-72(%rbp), %r12
	leaq	-64(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	24(%rax), %edi
	movl	(%r14), %edx
	movq	%r12, %rsi
	movq	%r13, %rcx
	callq	_av_tree_find
	movq	-56(%rbp), %rax
	movl	(%rax), %eax
	sarl	$4, %eax
	movl	-72(%rbp), %ecx
	sarl	$4, %ecx
	subl	%ecx, %eax
	movslq	%eax, %rsi
	movq	%r15, %rdi
	callq	_ff_put_v
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	incq	%rbx
	movq	(%rsi), %rax
	cmpq	%rbx, %rax
	jg	LBB0_2
LBB0_3:
	movq	8(%rsi), %rcx
	cmpl	$0, (%rcx)
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	jle	LBB0_23
## %bb.4:
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rsi), %rcx
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	movslq	(%rcx), %rdx
	cmpq	%rdx, %r14
	jge	LBB0_23
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
                                        ##       Child Loop BB0_16 Depth 3
	testq	%rax, %rax
	jle	LBB0_22
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rsi), %r12
	movq	$-1, %r13
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	incl	%edi
	movslq	%edi, %rbx
	movq	(%rsi), %rax
	cmpq	%rbx, %rax
	jle	LBB0_21
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
                                        ##       Child Loop BB0_16 Depth 3
	movq	%r13, -112(%rbp)                ## 8-byte Spill
	movq	(%r12,%r14,8), %rdx
	movq	(%rdx,%rbx,8), %rcx
	movslq	%edi, %r13
	testl	%edi, %edi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	cmpq	-8(%rdx,%r13,8), %rcx
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%r12,%r14,8), %rdx
	movq	%rcx, (%rdx,%rbx,8)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	%rsi, %rcx
	setne	%bl
	leal	1(%r13), %ecx
	movslq	%ecx, %rcx
	cmpq	%rcx, %rax
	sete	%cl
	xorb	%bl, %cl
	xorl	%r15d, %r15d
	cmpq	%r13, %rax
	jle	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	leaq	(%rdx,%r13,8), %rdx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	%rsi, (%rdx,%r15,8)
	sete	%bl
	cmpb	%bl, %cl
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=3
	leaq	(%r15,%r13), %rdi
	incq	%rdi
	incq	%r15
	cmpq	%rdi, %rax
	jg	LBB0_12
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	addq	%r15, %r13
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=2
	movzbl	%cl, %eax
	leal	(,%r15,4), %ecx
	leal	(%rcx,%rax,2), %esi
	incl	%esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_ff_put_v
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, %eax
	subl	%r15d, %eax
	movslq	%eax, %rbx
	movslq	%ecx, %r15
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-112(%rbp), %r13                ## 8-byte Reload
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=3
	leaq	1(%rbx), %rax
	cmpq	%r15, %rbx
	movq	%rax, %rbx
	jge	LBB0_20
LBB0_16:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpq	%rbx, (%rsi)
	jle	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=3
	movq	(%r12,%r14,8), %rax
	movq	(%rax,%rbx,8), %rax
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=3
	xorl	%edi, %edi
	cmpq	%r13, %rax
	setg	%dil
	callq	_av_assert0
	movq	(%r12,%r14,8), %rax
	movq	(%rax,%rbx,8), %rsi
	subq	%r13, %rsi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_ff_put_v
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	(%r12,%r14,8), %rax
	movq	(%rax,%rbx,8), %r13
	jmp	LBB0_19
LBB0_23:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_avio_tell
	movq	%rax, %rbx
	subq	-104(%rbp), %rbx                ## 8-byte Folded Reload
	leaq	12(%rbx), %rdi
	callq	_av_log2
	cltq
	imulq	$-1840700269, %rax, %rcx        ## imm = 0x92492493
	shrq	$32, %rcx
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$2, %eax
	addl	%ecx, %eax
	xorl	%ecx, %ecx
	cmpq	$4085, %rbx                     ## imm = 0xFF5
	setge	%cl
	addl	%eax, %ebx
	leal	(%rbx,%rcx,4), %esi
	addl	$21, %esi
	movq	%r14, %rdi
	callq	_avio_wb64
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_nut_sp_pos_cmp,4,2          ## @ff_nut_sp_pos_cmp
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Multiple keyframes with same PTS\n"

	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_write_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_index
_write_index:                           ; @write_index
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	str	wzr, [sp, #16]
	stp	xzr, xzr, [sp, #24]
	mov	x0, x1
	bl	_avio_tell
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldp	w3, w1, [x20, #28]
	mov	x0, x20
	mov	x2, x19
	bl	_put_tt
	ldr	x1, [x20]
	mov	x0, x19
	bl	_ff_put_v
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
Lloh3:
	adrp	x22, _ff_nut_sp_pos_cmp@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ff_nut_sp_pos_cmp@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #24]
	ldr	w2, [x22]
	add	x1, sp, #16
	add	x3, sp, #24
	bl	_av_tree_find
	ldr	x8, [sp, #32]
	ldr	w8, [x8]
	asr	w8, w8, #4
	ldr	w9, [sp, #16]
	sub	w8, w8, w9, asr #4
	sxtw	x1, w8
	mov	x0, x19
	bl	_ff_put_v
	ldr	x8, [sp, #32]
	ldr	w8, [x8]
	str	w8, [sp, #16]
	add	x21, x21, #1
	ldr	x8, [x20]
	cmp	x8, x21
	b.gt	LBB0_2
LBB0_3:
	ldr	x9, [x20, #8]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_25
; %bb.4:
	mov	x23, #0
Lloh5:
	adrp	x24, _AV_NOPTS_VALUE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _AV_NOPTS_VALUE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x20, #8]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldrsw	x10, [x9]
	cmp	x23, x10
	b.ge	LBB0_25
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;       Child Loop BB0_22 Depth 3
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x26, #0
	mov	w21, #0
	ldr	x27, [x20, #16]
	mov	x28, #-1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	w21, w21, #1
	sxtw	x26, w21
	ldr	x8, [x20]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	cmp	x8, x26
	b.le	LBB0_5
LBB0_10:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;       Child Loop BB0_22 Depth 3
	ldr	x10, [x27, x23, lsl #3]
	ldr	x9, [x10, x26, lsl #3]
	cbz	w21, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x11, x10, w21, sxtw #3
	ldur	x11, [x11, #-8]
	cmp	x9, x11
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x0, [x20, #8]
Lloh7:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	ldr	x9, [x24]
	ldr	x10, [x27, x23, lsl #3]
	str	x9, [x10, x26, lsl #3]
	ldr	x8, [x20]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=2
	ldr	x11, [x24]
	cmp	x9, x11
	cset	w9, ne
	add	w12, w21, #1
	cmp	x8, w12, sxtw
	cset	w12, eq
	eor	w9, w9, w12
	sxtw	x12, w21
	cmp	x8, x12
	b.le	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	x26, #0
	add	x10, x10, x12, lsl #3
LBB0_15:                                ;   Parent Loop BB0_7 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x13, [x10, x26, lsl #3]
	cmp	x13, x11
	cset	w13, eq
	cmp	w9, w13
	b.eq	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=3
	add	x26, x26, #1
	add	x21, x12, x26
	cmp	x8, x21
	b.gt	LBB0_15
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=2
	mov	w26, #0
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=2
	add	x21, x12, x26
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=2
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_20:                                ;   in Loop: Header=BB0_10 Depth=2
	cmp	w9, #0
	mov	w8, #3
	csinc	w1, w8, wzr, ne
	bfi	w1, w26, #2, #30
	mov	x0, x19
	bl	_ff_put_v
	sub	w8, w21, w26
	sxtw	x26, w8
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	sxtw	x21, w21
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=3
	add	x8, x26, #1
	cmp	x26, x21
	mov	x26, x8
	b.ge	LBB0_9
LBB0_22:                                ;   Parent Loop BB0_7 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x20]
	cmp	x8, x26
	b.le	LBB0_9
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=3
	ldr	x8, [x27, x23, lsl #3]
	ldr	x8, [x8, x26, lsl #3]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_21
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=3
	cmp	x8, x28
	cset	w0, gt
	bl	_av_assert0
	lsl	x22, x23, #3
	ldr	x8, [x27, x22]
	lsl	x25, x26, #3
	ldr	x8, [x8, x25]
	sub	x1, x8, x28
	mov	x0, x19
	bl	_ff_put_v
	ldr	x8, [x27, x22]
	ldr	x28, [x8, x25]
	b	LBB0_21
LBB0_25:
	mov	x0, x19
	bl	_avio_tell
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	sub	x20, x0, x8
	cmp	x20, #4084
	cset	w21, gt
	add	x0, x20, #12
	bl	_av_log2
	mov	w8, #9363
	movk	w8, #37449, lsl #16
	smull	x8, w0, w8
	lsr	x8, x8, #32
	add	w8, w8, w0
	asr	w9, w8, #2
	add	w8, w9, w8, lsr #31
	add	w8, w20, w8
	add	w8, w8, w21, lsl #2
	add	w1, w8, #21
	mov	x0, x19
	bl	_avio_wb64
	ldr	x8, [sp, #40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.26:
	mov	w0, #0
	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
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_nut_sp_pos_cmp,4,2          ; @ff_nut_sp_pos_cmp
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Multiple keyframes with same PTS\n"

	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_write_index
.subsections_via_symbols
