	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_container_open_writer       ## -- Begin function vc_container_open_writer
	.p2align	4, 0x90
_vc_container_open_writer:              ## @vc_container_open_writer
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -40(%rbp)
	movq	%rdx, %rdi
	callq	_VC_CONTAINER_PARAM_UNUSED
	movq	%rbx, %rdi
	callq	_VC_CONTAINER_PARAM_UNUSED
	movq	_VC_CONTAINER_IO_MODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%r15, %rdi
	callq	_vc_container_io_open
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	_WRITER_SPACE_SAFETY_MARGIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	callq	_LOG_DEBUG
	movq	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	%r15, %rax
	addq	$8, %rax
	movq	%rax, (%r15)
	xorl	%eax, %eax
	callq	_vc_container_log_get_default_verbosity
	movq	(%r15), %rcx
	movl	%eax, 16(%rcx)
	movq	%rbx, 8(%rcx)
	movl	8(%rbx), %edi
	movl	%edi, (%rcx)
	callq	_vc_uri_path_extension
	movq	%rax, -48(%rbp)
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	leaq	-48(%rbp), %rcx
	xorl	%esi, %esi
	callq	_vc_uri_find_query
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_vc_container_load_writer
	movq	%rax, -40(%rbp)
	cmpq	(%r12), %rax
	je	LBB0_11
## %bb.7:
	movq	%r15, %rdi
	callq	_vc_container_close
	jmp	LBB0_10
LBB0_8:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	%rbx, %rdi
	callq	_vc_container_io_close
LBB0_10:
	xorl	%r15d, %r15d
LBB0_11:
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	movq	-40(%rbp), %rax
	movq	%rax, (%r14)
LBB0_13:
	movq	%r15, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_IO_MODE_WRITE,4,2 ## @VC_CONTAINER_IO_MODE_WRITE
	.comm	_WRITER_SPACE_SAFETY_MARGIN,8,3 ## @WRITER_SPACE_SAFETY_MARGIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not enough space available to open a writer"

	.comm	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_RESOURCES
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
L_.str.1:                               ## @.str.1
	.asciz	"container"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_container_open_writer       ; -- Begin function vc_container_open_writer
	.p2align	2
_vc_container_open_writer:              ; @vc_container_open_writer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x3
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [sp, #8]
	mov	x0, x2
	bl	_VC_CONTAINER_PARAM_UNUSED
	mov	x0, x20
	bl	_VC_CONTAINER_PARAM_UNUSED
Lloh2:
	adrp	x8, _VC_CONTAINER_IO_MODE_WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VC_CONTAINER_IO_MODE_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	bl	_vc_container_io_open
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0]
Lloh5:
	adrp	x9, _WRITER_SPACE_SAFETY_MARGIN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WRITER_SPACE_SAFETY_MARGIN@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x8, x9, #0, ne
	b.lt	LBB0_9
; %bb.2:
	mov	w0, #32
	bl	_malloc
	cbz	x0, LBB0_10
; %bb.3:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x8, x20, #8
	str	x8, [x20]
	bl	_vc_container_log_get_default_verbosity
	ldr	x8, [x20]
	str	w0, [x8, #16]
	str	x21, [x8, #8]
	ldr	w0, [x21, #8]
	str	w0, [x8]
	bl	_vc_uri_path_extension
	str	x0, [sp]
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x3, sp
	mov	w1, #0
	bl	_vc_uri_find_query
	ldr	x1, [sp]
	mov	x0, x20
	bl	_vc_container_load_writer
	str	x0, [sp, #8]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_vc_container_close
	mov	x20, #0
	cbnz	x19, LBB0_7
	b	LBB0_8
LBB0_5:
	mov	x20, #0
LBB0_6:
	cbz	x19, LBB0_8
LBB0_7:
	ldr	x8, [sp, #8]
	str	x8, [x19]
LBB0_8:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_9:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, #0
	bl	_LOG_DEBUG
Lloh12:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh14:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
LBB0_11:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	x0, x21
	bl	_vc_container_io_close
	mov	x20, #0
	cbnz	x19, LBB0_7
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_IO_MODE_WRITE,4,2 ; @VC_CONTAINER_IO_MODE_WRITE
	.comm	_WRITER_SPACE_SAFETY_MARGIN,8,3 ; @WRITER_SPACE_SAFETY_MARGIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not enough space available to open a writer"

	.comm	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_RESOURCES
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
l_.str.1:                               ; @.str.1
	.asciz	"container"

.subsections_via_symbols
