	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_write_header_metadata_sets
_mxf_write_header_metadata_sets:        ## @mxf_write_header_metadata_sets
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %r12
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	leaq	-112(%rbp), %rax
	movq	_MaterialPackage@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -128(%rbp)
	movq	_SourcePackage@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	%rcx, -96(%rbp)
	movl	$1, -112(%rbp)
	movq	%rax, -136(%rbp)
	movl	4(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
LBB0_2:
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	je	LBB0_3
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
LBB0_8:
	movl	4(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movl	(%rax), %eax
	leaq	-80(%rbp), %rcx
	movl	%eax, -56(%rbp)
	movq	(%r13), %rax
	movq	%rax, -64(%rbp)
	movl	$2, -80(%rbp)
	movq	%rcx, -104(%rbp)
	movl	$3, %r14d
	jmp	LBB0_11
LBB0_3:
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	leaq	L_.str.1(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_av_dict_get
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_6
	jmp	LBB0_8
LBB0_9:
	movl	$2, %r14d
LBB0_11:
	movq	%r15, %rdi
	callq	_mxf_write_preface
	movq	%r15, %rdi
	callq	_mxf_write_identification
	leaq	-144(%rbp), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_mxf_write_content_storage
	movq	$0, (%r12)
	movl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mxf_write_package
	addq	$32, %rbx
	decq	%r14
	jne	LBB0_12
## %bb.13:
	movq	%r15, %rdi
	callq	_mxf_write_essence_container_data
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MaterialPackage,8,3            ## @MaterialPackage
	.comm	_SourcePackage,8,3              ## @SourcePackage
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"material_package_name"

L_.str.1:                               ## @.str.1
	.asciz	"file_package_name"

L_.str.2:                               ## @.str.2
	.asciz	"reel_name"

	.no_dead_strip	_mxf_write_header_metadata_sets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_write_header_metadata_sets
_mxf_write_header_metadata_sets:        ; @mxf_write_header_metadata_sets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x21, [x0, #16]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	stp	q0, q0, [sp, #64]
	mov	x8, sp
	add	x8, x8, #32
Lloh3:
	adrp	x22, _SourcePackage@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SourcePackage@GOTPAGEOFF]
	ldr	x9, [x22]
	str	x9, [sp, #48]
	mov	w9, #1
	str	w9, [sp, #32]
Lloh5:
	adrp	x9, _MaterialPackage@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MaterialPackage@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	stp	x8, x9, [sp, #8]
	ldr	w0, [x0, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x0]
	str	w8, [sp, #24]
LBB0_2:
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	cbz	x0, LBB0_6
LBB0_3:
	ldr	w8, [x0]
	str	w8, [sp, #56]
LBB0_4:
	ldr	w0, [x19, #4]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	cbz	x0, LBB0_10
; %bb.5:
	ldr	w8, [x0]
	mov	x9, sp
	add	x9, x9, #64
	str	w8, [sp, #88]
	ldr	x8, [x22]
	str	x8, [sp, #80]
	mov	w20, #2
	str	w20, [sp, #64]
	str	x9, [sp, #40]
	mov	x0, x19
	bl	_mxf_write_preface
	mov	x0, x19
	bl	_mxf_write_identification
	mov	x1, sp
	mov	x0, x19
	mov	w2, #3
	bl	_mxf_write_content_storage
	str	xzr, [x21]
	mov	x1, sp
	mov	x0, x19
	bl	_mxf_write_package
	mov	w8, #1
	b	LBB0_11
LBB0_6:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.7:
	mov	x23, #0
Lloh14:
	adrp	x20, l_.str.1@PAGE
Lloh15:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x23, lsl #3]
	ldr	w0, [x8]
	mov	x1, x20
	mov	x2, #0
	mov	w3, #0
	bl	_av_dict_get
	cbnz	x0, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.lt	LBB0_8
	b	LBB0_4
LBB0_10:
	mov	x0, x19
	bl	_mxf_write_preface
	mov	x0, x19
	bl	_mxf_write_identification
	mov	x1, sp
	mov	x0, x19
	mov	w2, #2
	bl	_mxf_write_content_storage
	mov	x8, #0
	str	xzr, [x21]
	mov	w20, #1
LBB0_11:
	mov	x21, sp
	add	x1, x21, x8, lsl #5
	mov	x0, x19
	bl	_mxf_write_package
	add	x1, x21, x20, lsl #5
	mov	x0, x19
	bl	_mxf_write_package
	mov	x0, x19
	bl	_mxf_write_essence_container_data
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	w0, #0
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MaterialPackage,8,3            ; @MaterialPackage
	.comm	_SourcePackage,8,3              ; @SourcePackage
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"material_package_name"

l_.str.1:                               ; @.str.1
	.asciz	"file_package_name"

l_.str.2:                               ; @.str.2
	.asciz	"reel_name"

	.no_dead_strip	_mxf_write_header_metadata_sets
.subsections_via_symbols
