	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mp4_writer_close
_mp4_writer_close:                      ## @mp4_writer_close
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %r14
	callq	_STREAM_POSITION
	movq	%rax, %r12
	subl	8(%r14), %r12d
	movq	_MP4_BOX_TYPE_MOOV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mp4_write_box
	movl	%eax, %r15d
	movq	8(%r14), %rsi
	movq	%rbx, %rdi
	callq	_SEEK
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_WRITE_U32
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rcx
	decl	%eax
	movl	(%rcx,%rax,4), %esi
	movq	%rbx, %rdi
	callq	_vc_container_free_track
	movl	(%rbx), %ecx
	leal	-1(%rcx), %eax
	movl	%eax, (%rbx)
	cmpl	$1, %ecx
	jg	LBB0_1
LBB0_2:
	leaq	4(%r14), %rsi
	movq	%rbx, %rdi
	callq	_vc_container_writer_extraio_delete
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_vc_container_writer_extraio_delete
	movq	%r14, %rdi
	callq	_free
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MP4_BOX_TYPE_MOOV,4,2          ## @MP4_BOX_TYPE_MOOV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mdat size"

	.no_dead_strip	_mp4_writer_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mp4_writer_close
_mp4_writer_close:                      ; @mp4_writer_close
	.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	x20, x0
	ldr	x8, [x0, #16]
	ldr	x19, [x8]
	bl	_STREAM_POSITION
	ldr	w8, [x19, #8]
	sub	w22, w0, w8
Lloh0:
	adrp	x8, _MP4_BOX_TYPE_MOOV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MP4_BOX_TYPE_MOOV@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mp4_write_box
	mov	x21, x0
	ldr	x1, [x19, #8]
	mov	x0, x20
	bl	_SEEK
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	bl	_WRITE_U32
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	sub	w8, w8, #1
	ldr	w1, [x9, w8, uxtw #2]
	mov	x0, x20
	bl	_vc_container_free_track
	ldr	w8, [x20]
	subs	w8, w8, #1
	str	w8, [x20]
	b.gt	LBB0_1
LBB0_2:
	add	x1, x19, #4
	mov	x0, x20
	bl	_vc_container_writer_extraio_delete
	mov	x0, x20
	mov	x1, x19
	bl	_vc_container_writer_extraio_delete
	mov	x0, x19
	bl	_free
	mov	x0, x21
	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
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MP4_BOX_TYPE_MOOV,4,2          ; @MP4_BOX_TYPE_MOOV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mdat size"

	.no_dead_strip	_mp4_writer_close
.subsections_via_symbols
