	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function simple_write_add_track
_simple_write_add_track:                ## @simple_write_add_track
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	callq	_vc_uri_path
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_strlen
	movq	(%rbx), %rcx
	movq	_MAX_TRACKS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jae	LBB0_1
## %bb.2:
	movl	%eax, %r13d
	movq	_ES_SUFFIX_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%r13), %rsi
	addq	$5, %rsi
	movq	%rbx, %rdi
	callq	_vc_container_allocate_track
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	%r14, (%rcx,%rax,8)
	testq	%r14, %r14
	je	LBB0_3
## %bb.4:
	movl	(%r12), %edx
	testl	%edx, %edx
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_vc_container_track_allocate_extradata
	movq	%rax, -48(%rbp)
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.7:
	movl	(%r12), %edx
	jmp	LBB0_8
LBB0_1:
	movq	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	xorl	%edx, %edx
LBB0_8:
	movq	8(%r14), %rdi
	movq	%r12, %rsi
	callq	_vc_container_format_copy
	movq	(%r14), %rax
	movq	(%rax), %rax
	leaq	16(%rax), %rdi
	movq	%rdi, (%rax)
	movq	_ES_SUFFIX_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	1(%r13,%rax), %rsi
	movq	_ES_SUFFIX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	(%rbx), %r8
	movq	8(%r14), %r9
	movq	%r15, %rcx
	callq	_snprintf
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_LOG_DEBUG
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	movq	_VC_CONTAINER_IO_MODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_vc_container_io_open
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 8(%rcx)
	movq	-48(%rbp), %rdx
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_9
## %bb.12:
	incq	(%rbx)
	jmp	LBB0_11
LBB0_9:
	movq	(%rcx), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_LOG_ERROR
LBB0_10:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_vc_container_free_track
	leaq	-48(%rbp), %rax
LBB0_11:
	movq	(%rax), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TRACKS,8,3                 ## @MAX_TRACKS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_RESOURCES
	.comm	_ES_SUFFIX_SIZE,8,3             ## @ES_SUFFIX_SIZE
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_ES_SUFFIX,8,3                  ## @ES_SUFFIX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"opening elementary stream: %s"

	.comm	_VC_CONTAINER_IO_MODE_WRITE,4,2 ## @VC_CONTAINER_IO_MODE_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"error opening elementary stream: %s"

	.no_dead_strip	_simple_write_add_track
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function simple_write_add_track
_simple_write_add_track:                ; @simple_write_add_track
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
	bl	_vc_uri_path
	mov	x21, x0
	bl	_strlen
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _MAX_TRACKS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_TRACKS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_7
; %bb.1:
	mov	w24, w0
Lloh3:
	adrp	x25, _ES_SUFFIX_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ES_SUFFIX_SIZE@GOTPAGEOFF]
	ldr	x8, [x25]
	add	x8, x24, x8
	add	x1, x8, #5
	mov	x0, x19
	bl	_vc_container_allocate_track
	ldp	x9, x8, [x19]
	str	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_8
; %bb.2:
	mov	x20, x0
	ldr	w2, [x22]
Lloh5:
	adrp	x23, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	cbz	w2, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_vc_container_track_allocate_extradata
	str	x0, [sp, #8]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.4:
	ldr	w2, [x22]
LBB0_5:
	ldr	x0, [x20, #8]
	mov	x1, x22
	bl	_vc_container_format_copy
	ldp	x8, x5, [x20]
	ldr	x8, [x8]
	add	x0, x8, #16
	str	x0, [x8]
	ldr	x8, [x25]
	add	x8, x24, x8
	add	x1, x8, #1
Lloh7:
	adrp	x8, _ES_SUFFIX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ES_SUFFIX@GOTPAGEOFF]
Lloh9:
	ldr	x2, [x8]
	ldr	x4, [x19]
	mov	x3, x21
	bl	_snprintf
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x2, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x0, [x8]
Lloh12:
	adrp	x8, _VC_CONTAINER_IO_MODE_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VC_CONTAINER_IO_MODE_WRITE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_vc_container_io_open
	ldr	x8, [x20]
	ldr	x8, [x8]
	str	w0, [x8, #8]
	ldr	x9, [sp, #8]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
Lloh15:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
Lloh17:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_RESOURCES@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
Lloh19:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
	ldr	x2, [x8]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_LOG_ERROR
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	bl	_vc_container_free_track
	add	x8, sp, #8
LBB0_11:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TRACKS,8,3                 ; @MAX_TRACKS
	.comm	_VC_CONTAINER_ERROR_OUT_OF_RESOURCES,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_RESOURCES
	.comm	_ES_SUFFIX_SIZE,8,3             ; @ES_SUFFIX_SIZE
	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_ES_SUFFIX,8,3                  ; @ES_SUFFIX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"opening elementary stream: %s"

	.comm	_VC_CONTAINER_IO_MODE_WRITE,4,2 ; @VC_CONTAINER_IO_MODE_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"error opening elementary stream: %s"

	.no_dead_strip	_simple_write_add_track
.subsections_via_symbols
