	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_write_index_table_segment
_mxf_write_index_table_segment:         ## @mxf_write_index_table_segment
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %r15
	movl	(%r15), %ebx
	movl	4(%r15), %ecx
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_av_log
	cmpl	$0, 4(%r15)
	jne	LBB0_2
## %bb.1:
	cmpl	$0, 8(%r15)
	je	LBB0_45
LBB0_2:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_index_table_segment_key@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_avio_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_klv_encode_ber4_length
	movq	%rbx, %rdi
	callq	_avio_tell
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	$15370, %edx                    ## imm = 0x3C0A
	callq	_mxf_write_local_tag
	movq	_IndexTableSegment@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mxf_write_uuid
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$16139, %edx                    ## imm = 0x3F0B
	callq	_mxf_write_local_tag
	movl	24(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movl	28(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$16140, %edx                    ## imm = 0x3F0C
	callq	_mxf_write_local_tag
	movl	12(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wb64
	movq	%rbx, %rdi
	movl	$8, %esi
	movl	$16141, %edx                    ## imm = 0x3F0D
	callq	_mxf_write_local_tag
	cmpl	$0, 8(%r15)
	jne	LBB0_4
## %bb.3:
	movl	4(%r15), %r14d
LBB0_4:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_avio_wb64
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$16133, %edx                    ## imm = 0x3F05
	callq	_mxf_write_local_tag
	movl	8(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$16134, %edx                    ## imm = 0x3F06
	callq	_mxf_write_local_tag
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$4, %esi
	movl	$16135, %edx                    ## imm = 0x3F07
	callq	_mxf_write_local_tag
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$16136, %edx                    ## imm = 0x3F08
	callq	_mxf_write_local_tag
	xorl	%esi, %esi
	cmpl	$0, 8(%r15)
	sete	%sil
	movq	%rbx, %rdi
	callq	_avio_w8
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %eax
	leal	(%rax,%rax,2), %eax
	leal	(%rax,%rax), %esi
	addl	$14, %esi
	movq	%rbx, %rdi
	movl	$16137, %edx                    ## imm = 0x3F09
	callq	_mxf_write_local_tag
	movl	(%r14), %esi
	incl	%esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_avio_wb32
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	cmpl	$0, (%r14)
	jle	LBB0_16
## %bb.5:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movl	(%rbx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_w8
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	cmpl	$0, (%rbx)
	setne	%al
	cmpl	$0, 8(%r15)
	jne	LBB0_6
## %bb.7:
	movq	_KAG_SIZE@GOTPCREL(%rip), %rbx
	jmp	LBB0_8
LBB0_6:
	addq	$4, %rbx
LBB0_8:
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movb	%al, %cl
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_avio_w8
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_avio_wb32
	cmpl	$2, (%r14)
	jl	LBB0_16
## %bb.9:
	movl	$1, %ebx
	movl	$1, %r13d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_avio_w8
	movl	4(%r14), %esi
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_wb32
	incq	%rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_16
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %r14
	movl	(%r14), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_w8
	cmpl	$0, (%r14)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmovnel	%r13d, %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	cmpl	$0, 8(%r15)
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	testl	%r12d, %r12d
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	24(%r14), %rax
	movl	32(%r14), %r14d
	imull	(%rax), %r14d
	movl	%r14d, %edi
	callq	_klv_fill_size
	movq	%rax, %r12
	addl	%r14d, %r12d
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_avio_w8
	leal	-1(%rbx), %esi
	imull	%r12d, %esi
	jmp	LBB0_15
LBB0_16:
	cmpl	$0, 8(%r15)
	jne	LBB0_44
## %bb.17:
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %eax
	leal	(%rax,%rax,4), %eax
	leal	8(%rax,%rax,2), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$16138, %edx                    ## imm = 0x3F0A
	callq	_mxf_write_local_tag
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_avio_wb32
	movq	%rbx, %rdi
	movl	$15, %esi
	callq	_avio_wb32
	movl	4(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_43
## %bb.18:
	xorl	%r12d, %r12d
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_42:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_wb32
	incq	%r12
	movslq	4(%r15), %rax
	cmpq	%rax, %r12
	jge	LBB0_43
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_25 Depth 2
	movq	16(%r15), %rax
	movq	%r12, %r14
	shlq	$4, %r14
	testb	$51, (%rax,%r14)
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rdi
	movl	%r12d, %esi
	subl	(%r15), %esi
	callq	_FFMAX
	movq	%rax, 16(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	movl	%r12d, %eax
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	xorl	%ebx, %ebx
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_31
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%r12d, %eax
	subl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	16(%r15), %rdx
	cmpl	4(%rdx,%r14), %eax
	je	LBB0_31
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	4(%r15), %ecx
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %ebx
	cmpl	%ecx, %esi
	jge	LBB0_28
## %bb.24:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movslq	%ebx, %rsi
	shlq	$4, %rsi
	addq	%rsi, %rdx
	addq	$4, %rdx
	.p2align	4, 0x90
LBB0_25:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	(%rdx), %eax
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=2
	incl	%ebx
	addq	$16, %rdx
	cmpl	%ebx, %ecx
	jne	LBB0_25
## %bb.27:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ecx, %ebx
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_19 Depth=1
	cmpl	%ecx, %ebx
	jne	LBB0_30
LBB0_29:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
LBB0_30:                                ##   in Loop: Header=BB0_19 Depth=1
	subl	%r12d, %ebx
LBB0_31:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_avio_w8
	movq	16(%r15), %rax
	movl	(%rax,%r14), %eax
	notl	%eax
	testb	$48, %al
	jne	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	8(%r13), %rdi
	movl	%r12d, %esi
	subl	-64(%rbp), %esi                 ## 4-byte Folded Reload
	callq	_FFMAX
	movq	%rax, 8(%r13)
	movl	(%r15), %esi
	subl	%r12d, %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_w8
	movq	16(%r15), %rax
	movl	(%rax,%r14), %esi
	testb	$51, %sil
	jne	LBB0_40
	jmp	LBB0_37
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	subl	%r12d, %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_avio_w8
	movq	16(%r15), %rax
	movl	(%rax,%r14), %esi
	testb	$32, %sil
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%r13d, (%r15)
LBB0_35:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%r12d, %ecx
	movl	%r12d, -64(%rbp)                ## 4-byte Spill
	testb	$51, %sil
	jne	LBB0_40
LBB0_37:                                ##   in Loop: Header=BB0_19 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_40
## %bb.38:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%esi, %ecx
	andl	$64, %ecx
	je	LBB0_40
## %bb.39:                              ##   in Loop: Header=BB0_19 Depth=1
	addq	%r14, %rax
	orl	$128, %esi
	movl	%esi, (%rax)
	.p2align	4, 0x90
LBB0_40:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_avio_w8
	movq	16(%r15), %rax
	movl	8(%rax,%r14), %esi
	movq	%rbx, %rdi
	callq	_avio_wb64
	xorl	%esi, %esi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, (%rax)
	jl	LBB0_42
## %bb.41:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	16(%r15), %rax
	movl	12(%rax,%r14), %esi
	jmp	LBB0_42
LBB0_43:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	subl	%eax, %ecx
	movl	%ecx, (%r15)
	addl	%eax, 12(%r15)
	movl	$0, 4(%r15)
LBB0_44:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mxf_update_klv_size            ## TAILCALL
LBB0_45:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"edit units count %d\n"

	.comm	_index_table_segment_key,4,2    ## @index_table_segment_key
	.comm	_IndexTableSegment,4,2          ## @IndexTableSegment
	.comm	_KAG_SIZE,4,2                   ## @KAG_SIZE
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"missing frames\n"

	.no_dead_strip	_mxf_write_index_table_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_write_index_table_segment
_mxf_write_index_table_segment:         ; @mxf_write_index_table_segment
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	ldp	x19, x24, [x0, #16]
Lloh0:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	w25, w8, [x24]
	str	x8, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	ldr	w8, [x24, #4]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x24, #8]
	cbz	w8, LBB0_44
LBB0_2:
Lloh5:
	adrp	x8, _index_table_segment_key@GOTPAGE
Lloh6:
	ldr	x8, [x8, _index_table_segment_key@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #16
	bl	_avio_write
	mov	x0, x19
	mov	w1, #0
	bl	_klv_encode_ber4_length
	mov	x0, x19
	bl	_avio_tell
	mov	x28, x0
	mov	x0, x19
	mov	w1, #16
	mov	w2, #15370
	bl	_mxf_write_local_tag
Lloh8:
	adrp	x8, _IndexTableSegment@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IndexTableSegment@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_mxf_write_uuid
	mov	x0, x19
	mov	w1, #8
	mov	w2, #16139
	bl	_mxf_write_local_tag
	ldr	w1, [x24, #24]
	mov	x0, x19
	bl	_avio_wb32
	ldr	w1, [x24, #28]
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #8
	mov	w2, #16140
	bl	_mxf_write_local_tag
	ldr	w1, [x24, #12]
	mov	x0, x19
	bl	_avio_wb64
	mov	x0, x19
	mov	w1, #8
	mov	w2, #16141
	bl	_mxf_write_local_tag
	mov	w1, #0
	ldr	w8, [x24, #8]
	cbnz	w8, LBB0_4
; %bb.3:
	ldr	w1, [x24, #4]
LBB0_4:
	mov	x0, x19
	bl	_avio_wb64
	mov	x0, x19
	mov	w1, #4
	mov	w2, #16133
	bl	_mxf_write_local_tag
	ldr	w1, [x24, #8]
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #4
	mov	w2, #16134
	bl	_mxf_write_local_tag
	mov	x0, x19
	mov	w1, #2
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #4
	mov	w2, #16135
	bl	_mxf_write_local_tag
	mov	x0, x19
	mov	w1, #1
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #1
	mov	w2, #16136
	bl	_mxf_write_local_tag
	ldr	w8, [x24, #8]
	cmp	w8, #0
	cset	w1, eq
	mov	x0, x19
	bl	_avio_w8
	ldr	w8, [x20]
	mov	w9, #6
	orr	w10, wzr, #0xe
	madd	w1, w8, w9, w10
	mov	x0, x19
	mov	w2, #16137
	bl	_mxf_write_local_tag
	ldr	w8, [x20]
	add	w1, w8, #1
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #6
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb32
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.5:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x21, [x8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_avio_w8
	ldr	w8, [x21], #4
	cmp	w8, #0
	cset	w26, ne
	ldr	w22, [x24, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
Lloh11:
	adrp	x8, _KAG_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KAG_SIZE@GOTPAGEOFF]
	cmp	w22, #0
	csel	x8, x8, x21, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_avio_wb32
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.6:
	mov	w22, #0
	mov	w21, #1
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_avio_w8
	ldr	w1, [x23, #4]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	bl	_avio_wb32
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x23, [x8]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_avio_w8
	ldr	w8, [x23]
	cmp	w8, #0
	csinc	w26, w26, wzr, eq
	ldr	w8, [x24, #8]
	cbnz	w8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cbnz	w22, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x23, #24]
	ldr	w8, [x8]
	ldr	w9, [x23, #32]
	mul	w22, w9, w8
	mov	x0, x22
	bl	_klv_fill_size
	add	w22, w22, w0
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_avio_w8
	sub	w8, w21, #1
	mul	w1, w22, w8
	b	LBB0_8
LBB0_13:
	mov	w26, #0
LBB0_14:
	ldr	w8, [x24, #8]
	cbnz	w8, LBB0_43
; %bb.15:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x27, [x8]
	ldr	w8, [x24, #4]
	lsl	w9, w8, #4
	sub	w8, w9, w8
	add	w1, w8, #8
	mov	x0, x19
	mov	w2, #16138
	bl	_mxf_write_local_tag
	ldr	w1, [x24, #4]
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #15
	bl	_avio_wb32
	ldr	w8, [x24, #4]
	cmp	w8, #1
	b.lt	LBB0_42
; %bb.16:
	str	w28, [sp, #12]                  ; 4-byte Folded Spill
	mov	x28, #0
	mov	w22, #0
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x24, #16]
	add	x8, x8, x28, lsl #4
	ldr	w1, [x8, #12]
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x19
	bl	_avio_wb32
	add	x28, x28, #1
	ldrsw	x8, [x24, #4]
	cmp	x28, x8
	b.ge	LBB0_41
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_26 Depth 2
	ldr	x8, [x24, #16]
	lsl	x21, x28, #4
	ldrb	w8, [x8, x21]
	tst	w8, #0x33333333
	b.eq	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	cbnz	w26, LBB0_22
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x0, [x27, #16]
	ldr	w8, [x24]
	sub	w1, w28, w8
	bl	_FFMAX
	str	x0, [x27, #16]
	str	w25, [x24]
	mov	x25, x28
	cbz	w26, LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	x10, [x24, #16]
	add	x8, x10, x28, lsl #4
	ldr	w8, [x8, #4]
	sub	w9, w28, w25
	cmp	w9, w8
	b.ne	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	w23, #0
	b	LBB0_32
LBB0_24:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w8, [x24, #4]
	mov	x23, x25
	cmp	w25, w8
	b.ge	LBB0_29
; %bb.25:                               ;   in Loop: Header=BB0_19 Depth=1
	add	x10, x10, w25, sxtw #4
	add	x10, x10, #4
	mov	x23, x25
LBB0_26:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x10]
	cmp	w9, w11
	b.eq	LBB0_29
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=2
	add	w23, w23, #1
	add	x10, x10, #16
	cmp	w8, w23
	b.ne	LBB0_26
; %bb.28:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x23, x8
	b	LBB0_30
LBB0_29:                                ;   in Loop: Header=BB0_19 Depth=1
	cmp	w23, w8
	b.ne	LBB0_31
LBB0_30:                                ;   in Loop: Header=BB0_19 Depth=1
Lloh13:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
LBB0_31:                                ;   in Loop: Header=BB0_19 Depth=1
	sub	w23, w23, w28
LBB0_32:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_avio_w8
	ldr	x8, [x24, #16]
	ldr	w8, [x8, x21]
	mvn	w8, w8
	tst	w8, #0x30
	b.ne	LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x0, [x27, #8]
	sub	w1, w28, w22
	bl	_FFMAX
	str	x0, [x27, #8]
	ldr	w8, [x24]
	sub	w1, w8, w28
	mov	x0, x19
	bl	_avio_w8
	ldr	x8, [x24, #16]
	ldr	w1, [x8, x21]
	b	LBB0_37
LBB0_34:                                ;   in Loop: Header=BB0_19 Depth=1
	sub	w1, w25, w28
	mov	x0, x19
	bl	_avio_w8
	ldr	x8, [x24, #16]
	ldr	w1, [x8, x21]
	tbz	w1, #5, LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_19 Depth=1
	str	w25, [x24]
LBB0_36:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x22, x28
LBB0_37:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	w9, #51
	and	w9, w1, w9
	cmp	w9, #0
	and	w9, w1, #0x40
	ccmp	w23, #0, #0, eq
	ccmp	w9, #0, #4, eq
	b.ne	LBB0_40
LBB0_38:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x19
	bl	_avio_w8
	ldr	x8, [x24, #16]
	add	x8, x8, x28, lsl #4
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_avio_wb64
	ldr	w8, [x20]
	cmp	w8, #2
	b.ge	LBB0_17
; %bb.39:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	w1, #0
	b	LBB0_18
LBB0_40:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x8, x8, x28, lsl #4
	orr	w1, w1, #0x80
	str	w1, [x8]
	b	LBB0_38
LBB0_41:
	ldr	w28, [sp, #12]                  ; 4-byte Folded Reload
LBB0_42:
	sub	w9, w25, w8
	ldr	w10, [x24, #12]
	add	w8, w10, w8
	str	w8, [x24, #12]
	stp	w9, wzr, [x24]
LBB0_43:
	mov	x0, x19
	mov	x1, x28
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_mxf_update_klv_size
LBB0_44:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"edit units count %d\n"

	.comm	_index_table_segment_key,4,2    ; @index_table_segment_key
	.comm	_IndexTableSegment,4,2          ; @IndexTableSegment
	.comm	_KAG_SIZE,4,2                   ; @KAG_SIZE
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"missing frames\n"

	.no_dead_strip	_mxf_write_index_table_segment
.subsections_via_symbols
