	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_packetizer_open             ## -- Begin function vc_packetizer_open
	.p2align	4, 0x90
_vc_packetizer_open:                    ## @vc_packetizer_open
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	leaq	24(%rbx), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	addq	$28, %rdi
	callq	_bytestream_init
	movq	8(%r12), %rdi
	callq	_vc_container_format_create
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	8(%r12), %rdi
	callq	_vc_container_format_create
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.5:
	movq	16(%rbx), %rdi
	movq	8(%r12), %rdx
	movq	%r12, %rsi
	callq	_vc_container_format_copy
	movq	16(%rbx), %rsi
	movq	$0, 8(%rsi)
	movq	8(%rbx), %rdi
	movq	8(%r12), %rdx
	callq	_vc_container_format_copy
	movq	8(%r12), %rax
	movq	16(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movl	16(%rcx), %ecx
	movq	8(%rbx), %rdx
	movl	%ecx, 16(%rdx)
	movq	%rax, 8(%rdx)
	movl	%r15d, (%rdx)
	movq	(%rbx), %rdi
	movl	$1000000, %esi                  ## imm = 0xF4240
	callq	_vc_container_time_init
	movq	%rbx, %rdi
	callq	_vc_packetizer_load
	movq	%rax, %r15
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_6
	jmp	LBB0_3
LBB0_9:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	xorl	%ebx, %ebx
LBB0_6:
	testq	%r14, %r14
	je	LBB0_8
LBB0_7:
	movq	%r15, (%r14)
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_3:
	movq	%rbx, %rdi
	callq	_vc_packetizer_close
	xorl	%ebx, %ebx
	testq	%r14, %r14
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_packetizer_open             ; -- Begin function vc_packetizer_open
	.p2align	2
_vc_packetizer_open:                    ; @vc_packetizer_open
	.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	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	w0, #32
	bl	_malloc
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	add	x8, x20, #24
	str	x8, [x20]
	add	x0, x20, #28
	bl	_bytestream_init
	ldr	x0, [x22, #8]
	bl	_vc_container_format_create
	str	x0, [x20, #16]
	cbz	x0, LBB0_8
; %bb.2:
	ldr	x0, [x22, #8]
	bl	_vc_container_format_create
	str	x0, [x20, #8]
	cbz	x0, LBB0_8
; %bb.3:
	ldr	x0, [x20, #16]
	ldr	x2, [x22, #8]
	mov	x1, x22
	bl	_vc_container_format_copy
	ldp	x0, x1, [x20, #8]
	str	xzr, [x1, #8]
	ldr	x2, [x22, #8]
	bl	_vc_container_format_copy
	ldr	x8, [x22, #8]
	ldr	x9, [x20, #16]
	str	x8, [x9, #8]
	ldr	w9, [x9, #16]
	ldp	x0, x10, [x20]
	str	w9, [x10, #16]
	str	x8, [x10, #8]
	str	w21, [x10]
	mov	w1, #16960
	movk	w1, #15, lsl #16
	bl	_vc_container_time_init
	mov	x0, x20
	bl	_vc_packetizer_load
	mov	x21, x0
Lloh0:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
	b	LBB0_9
LBB0_4:
Lloh3:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x8]
LBB0_5:
	cbz	x19, LBB0_7
LBB0_6:
	str	x21, [x19]
LBB0_7:
	mov	x0, x20
	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
LBB0_8:
Lloh6:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
LBB0_9:
	mov	x0, x20
	bl	_vc_packetizer_close
	mov	x20, #0
	cbnz	x19, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
.subsections_via_symbols
