	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxf_write_tagged_value
_mxf_write_tagged_value:                ## @mxf_write_tagged_value
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	(%rdi), %r13
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_mxf_utf16_local_tag_length
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mxf_utf16_local_tag_length
	movl	%eax, %r12d
	movl	$1, %eax
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.2:
	leal	13(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$81664, %esi                    ## imm = 0x13F00
	callq	_mxf_write_metadata_key
	leal	(%rbx,%r12), %esi
	addl	$37, %esi
	movq	%r13, %rdi
	callq	_klv_encode_ber_length
	movq	%r13, %rdi
	movl	$16, %esi
	movl	$15370, %edx                    ## imm = 0x3C0A
	callq	_mxf_write_local_tag
	movq	_TaggedValue@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edx
	movq	%r13, %rdi
	callq	_mxf_write_uuid
	movq	%r13, %rdi
	movl	$20481, %esi                    ## imm = 0x5001
	movq	%r15, %rdx
	callq	_mxf_write_local_tag_utf16
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$20483, %edx                    ## imm = 0x5003
	callq	_mxf_write_local_tag
	movq	_mxf_indirect_value_utf16le@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movl	$17, %edx
	callq	_avio_write
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_avio_put_str16le
	incl	(%rbx)
	xorl	%eax, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TaggedValue,4,2                ## @TaggedValue
	.comm	_mxf_indirect_value_utf16le,4,2 ## @mxf_indirect_value_utf16le
	.no_dead_strip	_mxf_write_tagged_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxf_write_tagged_value
_mxf_write_tagged_value:                ; @mxf_write_tagged_value
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	ldp	x20, x24, [x0]
	mov	x0, x1
	bl	_mxf_utf16_local_tag_length
	mov	x22, x0
	mov	x0, x19
	bl	_mxf_utf16_local_tag_length
	mov	x8, x0
	mov	w0, #1
	cbz	w22, LBB0_3
; %bb.1:
	cbz	w8, LBB0_3
; %bb.2:
	add	w23, w8, #13
	mov	x0, x20
	mov	w1, #16128
	movk	w1, #1, lsl #16
	bl	_mxf_write_metadata_key
	add	w8, w22, w23
	add	w1, w8, #24
	mov	x0, x20
	bl	_klv_encode_ber_length
	mov	x0, x20
	mov	w1, #16
	mov	w2, #15370
	bl	_mxf_write_local_tag
Lloh0:
	adrp	x8, _TaggedValue@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TaggedValue@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x24]
	mov	x0, x20
	bl	_mxf_write_uuid
	mov	x0, x20
	mov	w1, #20481
	mov	x2, x21
	bl	_mxf_write_local_tag_utf16
	mov	x0, x20
	mov	x1, x23
	mov	w2, #20483
	bl	_mxf_write_local_tag
Lloh3:
	adrp	x8, _mxf_indirect_value_utf16le@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mxf_indirect_value_utf16le@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #17
	bl	_avio_write
	mov	x0, x20
	mov	x1, x19
	bl	_avio_put_str16le
	mov	w0, #0
	ldr	w8, [x24]
	add	w8, w8, #1
	str	w8, [x24]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TaggedValue,4,2                ; @TaggedValue
	.comm	_mxf_indirect_value_utf16le,4,2 ; @mxf_indirect_value_utf16le
	.no_dead_strip	_mxf_write_tagged_value
.subsections_via_symbols
