	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp4_writer_open                ## -- Begin function mp4_writer_open
	.p2align	4, 0x90
_mp4_writer_open:                       ## @mp4_writer_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	24(%rax), %edi
	callq	_vc_uri_path_extension
	movq	%rax, -40(%rbp)
	movq	(%r14), %rax
	movl	24(%rax), %edi
	leaq	L_.str(%rip), %rdx
	leaq	-40(%rbp), %rcx
	xorl	%esi, %esi
	callq	_vc_uri_find_query
	movq	-40(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_8
LBB0_1:
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_24
LBB0_8:
	movl	$40, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_20
## %bb.9:
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	(%r14), %rax
	movq	%r15, 16(%rax)
	movl	32(%r15), %eax
	movl	%eax, 8(%r14)
	movq	-40(%rbp), %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	jne	LBB0_14
## %bb.15:
	movq	_MP4_BRAND_QT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_20:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	callq	_LOG_DEBUG
	jmp	LBB0_24
LBB0_10:
	movq	_MP4_BRAND_3GP5@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_12:
	movq	_MP4_BRAND_SKM2@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_14:
	movq	_MP4_BRAND_ISOM@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	movl	%eax, 28(%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_vc_container_writer_extraio_create_null
	movq	%rax, %rbx
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_21
## %bb.17:
	movq	%r15, %rsi
	addq	$24, %rsi
	movq	%r14, %rdi
	callq	_vc_container_writer_extraio_create_temp
	movq	%rax, %rbx
	cmpq	(%r12), %rax
	jne	LBB0_21
## %bb.18:
	movq	_MP4_BOX_TYPE_FTYP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mp4_write_box
	movq	%rax, %rbx
	cmpq	(%r12), %rax
	jne	LBB0_21
## %bb.19:
	movq	%r14, %rdi
	callq	_STREAM_POSITION
	movq	%rax, 16(%r15)
	leaq	L_.str.7(%rip), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_WRITE_U32
	movl	$109, %edi
	movl	$100, %esi
	movl	$97, %edx
	movl	$116, %ecx
	callq	_VC_FOURCC
	leaq	L_.str.8(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_WRITE_FOURCC
	movq	%r14, %rdi
	callq	_STREAM_POSITION
	movq	%rax, 8(%r15)
	movq	_mp4_writer_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r14), %rcx
	movl	%eax, 8(%rcx)
	movq	_mp4_writer_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx)
	movq	_mp4_writer_control@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movq	(%r12), %rbx
	jmp	LBB0_24
LBB0_21:
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	callq	_LOG_DEBUG
	cmpq	$0, (%r15)
	je	LBB0_23
## %bb.22:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_vc_container_writer_extraio_delete
LBB0_23:
	movq	%r15, %rdi
	callq	_free
LBB0_24:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"container"

L_.str.1:                               ## @.str.1
	.asciz	"3gp"

L_.str.2:                               ## @.str.2
	.asciz	"skm"

L_.str.3:                               ## @.str.3
	.asciz	"mov"

L_.str.4:                               ## @.str.4
	.asciz	"mp4"

L_.str.5:                               ## @.str.5
	.asciz	"m4v"

L_.str.6:                               ## @.str.6
	.asciz	"m4a"

	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ## @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_MP4_BRAND_3GP5,4,2             ## @MP4_BRAND_3GP5
	.comm	_MP4_BRAND_SKM2,4,2             ## @MP4_BRAND_SKM2
	.comm	_MP4_BRAND_QT,4,2               ## @MP4_BRAND_QT
	.comm	_MP4_BRAND_ISOM,4,2             ## @MP4_BRAND_ISOM
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_MP4_BOX_TYPE_FTYP,4,2          ## @MP4_BOX_TYPE_FTYP
L_.str.7:                               ## @.str.7
	.asciz	"size"

L_.str.8:                               ## @.str.8
	.asciz	"type"

	.comm	_mp4_writer_close,4,2           ## @mp4_writer_close
	.comm	_mp4_writer_write,4,2           ## @mp4_writer_write
	.comm	_mp4_writer_control,4,2         ## @mp4_writer_control
L_.str.9:                               ## @.str.9
	.asciz	"mp4: error opening stream"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp4_writer_open                ; -- Begin function mp4_writer_open
	.p2align	2
_mp4_writer_open:                       ; @mp4_writer_open
	.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	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8, #24]
	bl	_vc_uri_path_extension
	str	x0, [sp, #8]
	ldr	x8, [x19]
	ldr	w0, [x8, #24]
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	add	x3, sp, #8
	mov	w1, #0
	bl	_vc_uri_find_query
	ldr	x20, [sp, #8]
	cbz	x20, LBB0_7
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_strcasecmp
	cbz	x0, LBB0_8
; %bb.2:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_strcasecmp
	cbz	x0, LBB0_8
; %bb.3:
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_strcasecmp
	cbz	x0, LBB0_8
; %bb.4:
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_strcasecmp
	cbz	x0, LBB0_8
; %bb.5:
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_strcasecmp
	cbz	x0, LBB0_8
; %bb.6:
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_strcasecmp
	cbz	x0, LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
Lloh16:
	ldr	x21, [x8]
	b	LBB0_22
LBB0_8:
	mov	w0, #40
	bl	_malloc
	cbz	x0, LBB0_12
; %bb.9:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	x8, [x19]
	str	x20, [x8, #16]
	ldr	w8, [x20, #32]
	str	w8, [x19, #8]
	ldr	x21, [sp, #8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
	cbz	x0, LBB0_13
; %bb.10:
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
	cbz	x0, LBB0_14
; %bb.11:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_strcasecmp
Lloh23:
	adrp	x8, _MP4_BRAND_ISOM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MP4_BRAND_ISOM@GOTPAGEOFF]
Lloh25:
	adrp	x9, _MP4_BRAND_QT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _MP4_BRAND_QT@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	b	LBB0_15
LBB0_12:
Lloh27:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh29:
	ldr	x21, [x8]
Lloh30:
	adrp	x1, l_.str.9@PAGE
Lloh31:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	b	LBB0_22
LBB0_13:
Lloh32:
	adrp	x8, _MP4_BRAND_3GP5@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MP4_BRAND_3GP5@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh34:
	adrp	x8, _MP4_BRAND_SKM2@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MP4_BRAND_SKM2@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	str	w8, [x20, #28]
	mov	x0, x19
	mov	x1, x20
	bl	_vc_container_writer_extraio_create_null
	mov	x21, x0
Lloh36:
	adrp	x22, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh37:
	ldr	x22, [x22, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.16:
	add	x1, x20, #24
	mov	x0, x19
	bl	_vc_container_writer_extraio_create_temp
	mov	x21, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.17:
Lloh38:
	adrp	x8, _MP4_BOX_TYPE_FTYP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MP4_BOX_TYPE_FTYP@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mp4_write_box
	mov	x21, x0
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_STREAM_POSITION
	str	x0, [x20, #16]
Lloh41:
	adrp	x2, l_.str.7@PAGE
Lloh42:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_WRITE_U32
	mov	w0, #109
	mov	w1, #100
	mov	w2, #97
	mov	w3, #116
	bl	_VC_FOURCC
	mov	x1, x0
Lloh43:
	adrp	x2, l_.str.8@PAGE
Lloh44:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_WRITE_FOURCC
	mov	x0, x19
	bl	_STREAM_POSITION
	str	x0, [x20, #8]
Lloh45:
	adrp	x8, _mp4_writer_close@GOTPAGE
Lloh46:
	ldr	x8, [x8, _mp4_writer_close@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	ldr	x9, [x19]
	str	w8, [x9, #8]
Lloh48:
	adrp	x8, _mp4_writer_write@GOTPAGE
Lloh49:
	ldr	x8, [x8, _mp4_writer_write@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
Lloh51:
	adrp	x10, _mp4_writer_control@GOTPAGE
Lloh52:
	ldr	x10, [x10, _mp4_writer_control@GOTPAGEOFF]
Lloh53:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
	ldr	x21, [x22]
	b	LBB0_22
LBB0_19:
Lloh54:
	adrp	x1, l_.str.9@PAGE
Lloh55:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
	ldr	x8, [x20]
	cbz	x8, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	x1, x20
	bl	_vc_container_writer_extraio_delete
LBB0_21:
	mov	x0, x20
	bl	_free
LBB0_22:
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,3 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"container"

l_.str.1:                               ; @.str.1
	.asciz	"3gp"

l_.str.2:                               ; @.str.2
	.asciz	"skm"

l_.str.3:                               ; @.str.3
	.asciz	"mov"

l_.str.4:                               ; @.str.4
	.asciz	"mp4"

l_.str.5:                               ; @.str.5
	.asciz	"m4v"

l_.str.6:                               ; @.str.6
	.asciz	"m4a"

	.comm	_VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,3 ; @VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.comm	_MP4_BRAND_3GP5,4,2             ; @MP4_BRAND_3GP5
	.comm	_MP4_BRAND_SKM2,4,2             ; @MP4_BRAND_SKM2
	.comm	_MP4_BRAND_QT,4,2               ; @MP4_BRAND_QT
	.comm	_MP4_BRAND_ISOM,4,2             ; @MP4_BRAND_ISOM
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_MP4_BOX_TYPE_FTYP,4,2          ; @MP4_BOX_TYPE_FTYP
l_.str.7:                               ; @.str.7
	.asciz	"size"

l_.str.8:                               ; @.str.8
	.asciz	"type"

	.comm	_mp4_writer_close,4,2           ; @mp4_writer_close
	.comm	_mp4_writer_write,4,2           ; @mp4_writer_write
	.comm	_mp4_writer_control,4,2         ; @mp4_writer_control
l_.str.9:                               ; @.str.9
	.asciz	"mp4: error opening stream"

.subsections_via_symbols
