	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_write_random_index_pack
_mxf_write_random_index_pack:           ## @mxf_write_random_index_pack
	.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	8(%rdi), %r12
	movq	16(%rdi), %r13
	movq	%r12, %rdi
	callq	_avio_tell
	movl	%eax, %r14d
	movq	_random_index_pack_key@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$16, %edx
	callq	_avio_write
	movl	(%r13), %eax
	leal	(%rax,%rax,2), %eax
	leal	28(,%rax,4), %esi
	movq	%r12, %rdi
	callq	_klv_encode_ber_length
	cmpq	$0, 24(%r13)
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movl	$1, %esi
	cmpq	_ff_mxf_opatom_muxer@GOTPCREL(%rip), %rax
	jne	LBB0_3
LBB0_2:
	xorl	%esi, %esi
LBB0_3:
	movq	%r12, %rdi
	callq	_avio_wb32
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_avio_wb64
	cmpq	$0, (%r13)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_avio_wb32
	movq	16(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_avio_wb64
	incq	%rbx
	cmpq	%rbx, (%r13)
	jg	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_avio_wb32
	movl	8(%r13), %esi
	movq	%r12, %rdi
	callq	_avio_wb64
	movq	%r12, %rdi
	callq	_avio_tell
                                        ## kill: def $eax killed $eax def $rax
	subl	%r14d, %eax
	leal	4(%rax), %esi
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_avio_wb32                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_random_index_pack_key,4,2      ## @random_index_pack_key
	.comm	_ff_mxf_opatom_muxer,4,2        ## @ff_mxf_opatom_muxer
	.no_dead_strip	_mxf_write_random_index_pack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_write_random_index_pack
_mxf_write_random_index_pack:           ; @mxf_write_random_index_pack
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	ldp	x19, x22, [x0, #8]
	mov	x0, x19
	bl	_avio_tell
	mov	x20, x0
Lloh0:
	adrp	x8, _random_index_pack_key@GOTPAGE
Lloh1:
	ldr	x8, [x8, _random_index_pack_key@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #16
	bl	_avio_write
	ldr	w8, [x22]
	mov	w9, #12
	orr	w10, wzr, #0x1c
	madd	w1, w8, w9, w10
	mov	x0, x19
	bl	_klv_encode_ber_length
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _ff_mxf_opatom_muxer@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ff_mxf_opatom_muxer@GOTPAGEOFF]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
	mov	w1, #1
	b	LBB0_4
LBB0_3:
	mov	w1, #0
LBB0_4:
	mov	x0, x19
	bl	_avio_wb32
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb64
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_avio_wb32
	ldr	x8, [x22, #16]
	ldr	w1, [x8, x21, lsl #2]
	mov	x0, x19
	bl	_avio_wb64
	add	x21, x21, #1
	ldr	x8, [x22]
	cmp	x8, x21
	b.gt	LBB0_6
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_avio_wb32
	ldr	w1, [x22, #8]
	mov	x0, x19
	bl	_avio_wb64
	mov	x0, x19
	bl	_avio_tell
	sub	w8, w0, w20
	add	w1, w8, #4
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_avio_wb32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_random_index_pack_key,4,2      ; @random_index_pack_key
	.comm	_ff_mxf_opatom_muxer,4,2        ; @ff_mxf_opatom_muxer
	.no_dead_strip	_mxf_write_random_index_pack
.subsections_via_symbols
