	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_container_write             ## -- Begin function vc_container_write
	.p2align	4, 0x90
_vc_container_write:                    ## @vc_container_write
	.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	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	%rsi, %r15
	cmpq	$0, 48(%rsi)
	je	LBB0_3
## %bb.2:
	movq	%rdi, %r14
	movq	(%r15), %rax
	cmpq	(%rdi), %rax
	jge	LBB0_3
## %bb.4:
	movq	16(%r14), %rax
	movq	(%rax), %rbx
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rbx
	je	LBB0_6
## %bb.5:
	movq	_VC_CONTAINER_ERROR_NOT_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	jne	LBB0_23
LBB0_6:
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.7:
	movq	8(%r15), %rdx
	addq	8(%r14), %rdx
	movq	_WRITER_SPACE_SAFETY_MARGIN@GOTPCREL(%rip), %rsi
	addq	(%rsi), %rdx
	cmpq	%rcx, %rdx
	jle	LBB0_9
## %bb.8:
	movq	_VC_CONTAINER_ERROR_LIMIT_REACHED@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_22
LBB0_3:
	movq	_VC_CONTAINER_ERROR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_23:
	movq	%rbx, %rax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	32(%rax), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.10:
	movq	8(%r15), %rdx
	addq	8(%r14), %rdx
	movq	_WRITER_SPACE_SAFETY_MARGIN@GOTPCREL(%rip), %rsi
	addq	(%rsi), %rdx
	movq	40(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.12:
	movslq	(%rsi), %rsi
	jmp	LBB0_13
LBB0_11:
	xorl	%esi, %esi
LBB0_13:
	addq	%rsi, %rdx
	cmpq	%rcx, %rdx
	jle	LBB0_15
## %bb.14:
	movq	_VC_CONTAINER_ERROR_OUT_OF_SPACE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_22
LBB0_15:
	movq	24(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.16:
	movq	%r15, %rsi
	callq	_vc_container_filter_process
	movq	%rax, %rbx
	cmpq	(%r12), %rax
	jne	LBB0_20
## %bb.17:
	movq	_VC_CONTAINER_CONTROL_GET_DRM_METADATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movq	%r14, %rdi
	callq	_vc_container_control
	cmpq	(%r12), %rax
	jne	LBB0_21
## %bb.18:
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	jle	LBB0_21
## %bb.19:
	movq	-48(%rbp), %rcx
	movq	%rcx, -56(%rbp)
	movq	%rax, -64(%rbp)
	movq	%rax, -96(%rbp)
	addq	16(%r15), %rax
	movq	%rax, -88(%rbp)
	movl	32(%r15), %eax
	movl	%eax, -72(%rbp)
	movl	28(%r15), %eax
	movl	%eax, -76(%rbp)
	movl	36(%r15), %eax
	movl	%eax, -68(%rbp)
	movq	(%r15), %rax
	movq	%rax, -104(%rbp)
	movl	24(%r15), %eax
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, -80(%rbp)
	movq	_VC_CONTAINER_TIME_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%r15)
	movl	%ecx, 32(%r15)
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 24(%r15)
	movq	16(%r14), %rax
	leaq	-104(%rbp), %rsi
	movq	%r14, %rdi
	callq	*16(%rax)
	cmpq	(%r12), %rax
	je	LBB0_21
	jmp	LBB0_22
LBB0_20:
	movq	_VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_22
LBB0_21:
	movq	16(%r14), %rax
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*16(%rax)
	movq	%rax, %rbx
LBB0_22:
	movq	16(%r14), %rax
	movq	%rbx, (%rax)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ERROR_INVALID_ARGUMENT,8,3 ## @VC_CONTAINER_ERROR_INVALID_ARGUMENT
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_NOT_READY,8,3 ## @VC_CONTAINER_ERROR_NOT_READY
	.comm	_WRITER_SPACE_SAFETY_MARGIN,8,3 ## @WRITER_SPACE_SAFETY_MARGIN
	.comm	_VC_CONTAINER_ERROR_LIMIT_REACHED,8,3 ## @VC_CONTAINER_ERROR_LIMIT_REACHED
	.comm	_VC_CONTAINER_ERROR_OUT_OF_SPACE,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_SPACE
	.comm	_VC_CONTAINER_CONTROL_GET_DRM_METADATA,4,2 ## @VC_CONTAINER_CONTROL_GET_DRM_METADATA
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.comm	_VC_CONTAINER_TIME_UNKNOWN,4,2  ## @VC_CONTAINER_TIME_UNKNOWN
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.comm	_VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION,8,3 ## @VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_container_write             ; -- Begin function vc_container_write
	.p2align	2
_vc_container_write:                    ; @vc_container_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	stp	xzr, xzr, [x29, #-48]
	cbz	x1, LBB0_7
; %bb.1:
	mov	x20, x1
	ldr	x8, [x1, #48]
	cbz	x8, LBB0_7
; %bb.2:
	mov	x19, x0
	ldr	x8, [x20]
	ldr	x9, [x0]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	x21, [x8]
Lloh0:
	adrp	x22, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh2:
	adrp	x10, _VC_CONTAINER_ERROR_NOT_READY@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VC_CONTAINER_ERROR_NOT_READY@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x21, x9
	ccmp	x21, x10, #4, ne
	b.ne	LBB0_8
; %bb.4:
	ldr	x9, [x8, #8]
Lloh5:
	adrp	x10, _WRITER_SPACE_SAFETY_MARGIN@GOTPAGE
Lloh6:
	ldr	x10, [x10, _WRITER_SPACE_SAFETY_MARGIN@GOTPAGEOFF]
	cbz	x9, LBB0_9
; %bb.5:
	ldr	x11, [x19, #8]
	ldr	x12, [x20, #8]
	ldr	x13, [x10]
	add	x11, x12, x11
	add	x11, x11, x13
	cmp	x11, x9
	b.le	LBB0_9
; %bb.6:
Lloh7:
	adrp	x8, _VC_CONTAINER_ERROR_LIMIT_REACHED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_LIMIT_REACHED@GOTPAGEOFF]
Lloh9:
	ldr	x21, [x8]
	b	LBB0_20
LBB0_7:
Lloh10:
	adrp	x8, _VC_CONTAINER_ERROR_INVALID_ARGUMENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_INVALID_ARGUMENT@GOTPAGEOFF]
Lloh12:
	ldr	x21, [x8]
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	ldr	x9, [x8, #32]
	ldr	x9, [x9]
	cbz	x9, LBB0_14
; %bb.10:
	ldr	x11, [x19, #8]
	ldr	x12, [x20, #8]
	ldr	x10, [x10]
	add	x11, x12, x11
	add	x10, x11, x10
	ldr	x11, [x8, #40]
	cbz	x11, LBB0_12
; %bb.11:
	ldrsw	x11, [x11]
LBB0_12:
	add	x10, x10, x11
	cmp	x10, x9
	b.le	LBB0_14
; %bb.13:
Lloh13:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_SPACE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_SPACE@GOTPAGEOFF]
Lloh15:
	ldr	x21, [x8]
	b	LBB0_20
LBB0_14:
	ldr	x0, [x8, #24]
	cbz	x0, LBB0_19
; %bb.15:
	mov	x1, x20
	bl	_vc_container_filter_process
	mov	x21, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_18
; %bb.16:
Lloh16:
	adrp	x8, _VC_CONTAINER_CONTROL_GET_DRM_METADATA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VC_CONTAINER_CONTROL_GET_DRM_METADATA@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	sub	x2, x29, #40
	sub	x3, x29, #48
	mov	x0, x19
	bl	_vc_container_control
	ldr	x9, [x22]
	ldur	x8, [x29, #-48]
	cmp	x0, x9
	ccmp	x8, #1, #8, eq
	b.lt	LBB0_19
; %bb.17:
	ldur	x9, [x29, #-40]
	stp	x8, x9, [sp, #48]
	ldr	x9, [x20, #16]
	add	x9, x9, x8
	stp	x8, x9, [sp, #16]
	ldur	d0, [x20, #28]
	stur	d0, [sp, #36]
	ldr	w9, [x20, #36]
	str	w9, [sp, #44]
	ldr	x9, [x20]
	str	x9, [sp, #8]
	ldr	w8, [x20, #24]
Lloh19:
	adrp	x9, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGE
Lloh20:
	ldr	x9, [x9, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	bic	w9, w8, w9
	str	w9, [sp, #32]
Lloh22:
	adrp	x9, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGE
Lloh23:
	ldr	x9, [x9, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh25:
	adrp	x9, _VC_CONTAINER_TIME_UNKNOWN@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VC_CONTAINER_TIME_UNKNOWN@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	stp	w9, w9, [x20, #28]
	str	w8, [x20, #24]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #16]
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_19
	b	LBB0_20
LBB0_18:
Lloh28:
	adrp	x8, _VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION@GOTPAGE
Lloh29:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_20
LBB0_19:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #16]
	mov	x0, x19
	mov	x1, x20
	blr	x8
	mov	x21, x0
LBB0_20:
	ldr	x8, [x19, #16]
	str	x21, [x8]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ERROR_INVALID_ARGUMENT,8,3 ; @VC_CONTAINER_ERROR_INVALID_ARGUMENT
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_NOT_READY,8,3 ; @VC_CONTAINER_ERROR_NOT_READY
	.comm	_WRITER_SPACE_SAFETY_MARGIN,8,3 ; @WRITER_SPACE_SAFETY_MARGIN
	.comm	_VC_CONTAINER_ERROR_LIMIT_REACHED,8,3 ; @VC_CONTAINER_ERROR_LIMIT_REACHED
	.comm	_VC_CONTAINER_ERROR_OUT_OF_SPACE,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_SPACE
	.comm	_VC_CONTAINER_CONTROL_GET_DRM_METADATA,4,2 ; @VC_CONTAINER_CONTROL_GET_DRM_METADATA
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.comm	_VC_CONTAINER_TIME_UNKNOWN,4,2  ; @VC_CONTAINER_TIME_UNKNOWN
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.comm	_VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION,8,3 ; @VC_CONTAINER_ERROR_UNSUPPORTED_OPERATION
.subsections_via_symbols
