	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mp4_writer_write
_mp4_writer_write:                      ## @mp4_writer_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	cmpl	$0, 8(%r15)
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_mp4_writer_add_track_done
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_2:
	movl	(%rbx), %eax
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	incl	4(%r15)
	movq	%r14, %rdi
	callq	_STREAM_POSITION
	movl	%eax, (%r15)
	movq	8(%rbx), %rax
	movq	%rax, 24(%r15)
	movl	24(%rbx), %eax
	movl	%eax, 40(%r15)
	movl	24(%rbx), %eax
	movl	%eax, 44(%r15)
	movl	20(%rbx), %eax
	movl	%eax, 36(%r15)
	movl	(%rbx), %eax
	movl	%eax, 16(%r15)
	jmp	LBB0_5
LBB0_4:
	movq	8(%rbx), %rcx
	addq	%rcx, 24(%r15)
	orl	%eax, 16(%r15)
LBB0_5:
	movl	16(%rbx), %esi
	movq	8(%rbx), %rdx
	movq	%r14, %rdi
	callq	_WRITE_BYTES
	cmpq	8(%rbx), %rax
	jne	LBB0_10
## %bb.6:
	addl	%eax, (%r14)
	movq	_VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.7:
	addq	$16, %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mp4_writer_write_sample_to_temp
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mp4_writer_add_sample
LBB0_8:
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STREAM_STATUS                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ## @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.no_dead_strip	_mp4_writer_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mp4_writer_write
_mp4_writer_write:                      ; @mp4_writer_write
	.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, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	ldr	w8, [x21, #8]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mp4_writer_add_track_done
Lloh0:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
LBB0_2:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VC_CONTAINER_PACKET_FLAG_FRAME_START@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x21, #4]
	add	w8, w8, #1
	str	w8, [x21, #4]
	mov	x0, x19
	bl	_STREAM_POSITION
	str	w0, [x21]
	ldr	x8, [x20, #8]
	str	x8, [x21, #24]
	ldur	d0, [x20, #20]
	stur	d0, [x21, #36]
	ldr	w8, [x20, #24]
	str	w8, [x21, #44]
	ldr	w8, [x20]
	b	LBB0_5
LBB0_4:
	ldr	x9, [x20, #8]
	ldr	x10, [x21, #24]
	add	x9, x10, x9
	str	x9, [x21, #24]
	ldr	w9, [x21, #16]
	orr	w8, w9, w8
LBB0_5:
	str	w8, [x21, #16]
	ldr	w1, [x20, #16]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_WRITE_BYTES
	ldr	x8, [x20, #8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.6:
	ldr	w8, [x19]
	add	w8, w8, w0
	str	w8, [x19]
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VC_CONTAINER_PACKET_FLAG_FRAME_END@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	add	x20, x21, #16
	mov	x0, x19
	mov	x1, x20
	bl	_mp4_writer_write_sample_to_temp
	mov	x0, x19
	mov	x1, x20
	bl	_mp4_writer_add_sample
LBB0_8:
Lloh9:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
LBB0_9:
	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_10:
	mov	x0, x19
	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
	b	_STREAM_STATUS
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_START,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_START
	.comm	_VC_CONTAINER_PACKET_FLAG_FRAME_END,4,2 ; @VC_CONTAINER_PACKET_FLAG_FRAME_END
	.no_dead_strip	_mp4_writer_write
.subsections_via_symbols
