	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_asf_writer_open                ## -- Begin function asf_writer_open
	.p2align	4, 0x90
_asf_writer_open:                       ## @asf_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	%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	%rdi, %r12
	movq	8(%rdi), %rax
	movl	24(%rax), %edi
	callq	_vc_uri_path_extension
	movq	%rax, -48(%rbp)
	movq	8(%r12), %rax
	movl	24(%rax), %edi
	leaq	L_.str(%rip), %rdx
	leaq	-48(%rbp), %rcx
	xorl	%esi, %esi
	callq	_vc_uri_find_query
	movq	-48(%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_5
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_5
LBB0_1:
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_15
LBB0_5:
	movl	$16, %edi
	callq	_malloc
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_6
## %bb.13:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	8(%r12), %rax
	movq	%r14, 16(%rax)
	movq	8(%r14), %rax
	movq	%rax, (%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_vc_container_writer_extraio_create_null
	movq	%rax, %r15
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_7
## %bb.14:
	movq	_asf_writer_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rcx
	movl	%eax, 8(%rcx)
	movq	_asf_writer_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx)
	movq	_asf_writer_control@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	jmp	LBB0_15
LBB0_6:
	movq	_VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_7:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	callq	_LOG_DEBUG
	movq	_ASF_TRACKS_MAX@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rdi
	callq	_vc_container_free_track
	incq	%rbx
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jb	LBB0_9
LBB0_12:
	movq	%r14, %rdi
	callq	_free
LBB0_15:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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	"asf"

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

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

	.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	_asf_writer_close,4,2           ## @asf_writer_close
	.comm	_asf_writer_write,4,2           ## @asf_writer_write
	.comm	_asf_writer_control,4,2         ## @asf_writer_control
L_.str.4:                               ## @.str.4
	.asciz	"asf: error opening stream"

	.comm	_ASF_TRACKS_MAX,4,2             ## @ASF_TRACKS_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_asf_writer_open                ; -- Begin function asf_writer_open
	.p2align	2
_asf_writer_open:                       ; @asf_writer_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8, #24]
	bl	_vc_uri_path_extension
	str	x0, [sp, #8]
	ldr	x8, [x19, #8]
	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_4
; %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_5
; %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_5
; %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_5
LBB0_4:
Lloh8:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
Lloh10:
	ldr	x20, [x8]
	b	LBB0_15
LBB0_5:
	mov	w0, #16
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x21
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x8, [x19, #8]
	str	x21, [x8, #16]
	ldr	x8, [x21, #8]
	str	x8, [x19]
	mov	x0, x19
	mov	x1, x21
	bl	_vc_container_writer_extraio_create_null
	mov	x20, x0
Lloh11:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
Lloh14:
	adrp	x8, _asf_writer_close@GOTPAGE
Lloh15:
	ldr	x8, [x8, _asf_writer_close@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9, #8]
Lloh17:
	adrp	x8, _asf_writer_write@GOTPAGE
Lloh18:
	ldr	x8, [x8, _asf_writer_write@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x10, _asf_writer_control@GOTPAGE
Lloh21:
	ldr	x10, [x10, _asf_writer_control@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	stp	w10, w8, [x9]
	b	LBB0_15
LBB0_8:
Lloh23:
	adrp	x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh25:
	ldr	x20, [x8]
LBB0_9:
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_LOG_DEBUG
Lloh28:
	adrp	x22, _ASF_TRACKS_MAX@GOTPAGE
Lloh29:
	ldr	x22, [x22, _ASF_TRACKS_MAX@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_14
; %bb.10:
	mov	x23, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	cbz	x8, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x1, [x8, x23, lsl #3]
	cbz	x1, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x19
	bl	_vc_container_free_track
	add	x23, x23, #1
	ldr	w8, [x22]
	cmp	x23, x8
	b.lo	LBB0_11
LBB0_14:
	mov	x0, x21
	bl	_free
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.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	"asf"

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

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

	.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	_asf_writer_close,4,2           ; @asf_writer_close
	.comm	_asf_writer_write,4,2           ; @asf_writer_write
	.comm	_asf_writer_control,4,2         ; @asf_writer_control
l_.str.4:                               ; @.str.4
	.asciz	"asf: error opening stream"

	.comm	_ASF_TRACKS_MAX,4,2             ; @ASF_TRACKS_MAX
.subsections_via_symbols
