	.file	"extr_asf_writer.c_asf_writer_open.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"container"
.LC1:
	.string	"asf"
.LC2:
	.string	"wmv"
.LC3:
	.string	"wma"
.LC4:
	.string	"asf: error opening stream"
	.text
	.p2align 4
	.globl	asf_writer_open
	.type	asf_writer_open, @function
asf_writer_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR 24[rax]
	call	vc_uri_path_extension@PLT
	mov	rcx, rsp
	lea	rdx, .LC0[rip]
	xor	esi, esi
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 24[rax]
	call	vc_uri_find_query@PLT
	mov	rdi, QWORD PTR [rsp]
	test	rdi, rdi
	je	.L26
	lea	rsi, .LC1[rip]
	call	strcasecmp@PLT
	test	rax, rax
	je	.L4
	mov	rdi, QWORD PTR [rsp]
	lea	rsi, .LC2[rip]
	call	strcasecmp@PLT
	test	rax, rax
	jne	.L28
.L4:
	mov	edi, 16
	call	malloc@PLT
	mov	r13, QWORD PTR VC_CONTAINER_ERROR_OUT_OF_MEMORY[rip]
	mov	r12, rax
	test	rax, rax
	je	.L6
	xor	esi, esi
	mov	edx, 16
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	rsi, r12
	mov	rdi, rbp
	mov	QWORD PTR 16[rax], r12
	mov	rax, QWORD PTR 8[r12]
	mov	QWORD PTR 0[rbp], rax
	call	vc_container_writer_extraio_create_null@PLT
	cmp	QWORD PTR VC_CONTAINER_SUCCESS[rip], rax
	mov	r13, rax
	jne	.L6
	mov	rax, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR asf_writer_close[rip]
	mov	DWORD PTR 8[rax], edx
	mov	edx, DWORD PTR asf_writer_write[rip]
	mov	DWORD PTR 4[rax], edx
	mov	edx, DWORD PTR asf_writer_control[rip]
	mov	DWORD PTR [rax], edx
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	lea	rsi, .LC4[rip]
	mov	rdi, rbp
	xor	ebx, ebx
	call	LOG_DEBUG@PLT
	mov	eax, DWORD PTR ASF_TRACKS_MAX[rip]
	test	eax, eax
	jne	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edx, ebx
	mov	rsi, QWORD PTR [rax+rdx*8]
	test	rsi, rsi
	je	.L8
	mov	rdi, rbp
	add	ebx, 1
	call	vc_container_free_track@PLT
	cmp	DWORD PTR ASF_TRACKS_MAX[rip], ebx
	jbe	.L8
.L7:
	mov	rax, QWORD PTR 0[rbp]
	test	rax, rax
	jne	.L30
.L8:
	mov	rdi, r12
	call	free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, QWORD PTR [rsp]
	lea	rsi, .LC3[rip]
	call	strcasecmp@PLT
	test	rax, rax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L26:
	mov	r13, QWORD PTR VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED[rip]
	jmp	.L1
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	asf_writer_open, .-asf_writer_open
	.comm	asf_writer_write,4,4
	.comm	asf_writer_control,4,4
	.comm	asf_writer_close,4,4
	.comm	VC_CONTAINER_SUCCESS,8,8
	.comm	VC_CONTAINER_ERROR_OUT_OF_MEMORY,8,8
	.comm	VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,8,8
	.comm	ASF_TRACKS_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_asf_writer.c_asf_writer_open.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"container\000"
	.align	2
.LC1:
	.ascii	"asf\000"
	.align	2
.LC2:
	.ascii	"wmv\000"
	.align	2
.LC3:
	.ascii	"wma\000"
	.align	2
.LC4:
	.ascii	"asf: error opening stream\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	asf_writer_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	asf_writer_open, %function
asf_writer_open:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r0, #4]
	ldr	r2, .L28
	sub	sp, sp, #8
	mov	r4, r0
	ldr	r0, [r3, #16]
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	bl	vc_uri_path_extension
	mov	ip, r0
	ldr	r2, [r4, #4]
	mov	r3, sp
	ldr	r0, [r2, #16]
	mov	r1, #0
	ldr	r2, .L28+4
	str	ip, [sp]
	bl	vc_uri_find_query
	ldr	r5, [sp]
	cmp	r5, #0
	beq	.L5
	mov	r0, r5
	ldr	r1, .L28+8
	bl	strcasecmp
	cmp	r0, #0
	beq	.L4
	mov	r0, r5
	ldr	r1, .L28+12
	bl	strcasecmp
	cmp	r0, #0
	bne	.L24
.L4:
	mov	r0, #8
	bl	malloc
	subs	r6, r0, #0
	ldreq	r3, .L28+16
	ldreq	r7, [r3]
	beq	.L7
	mov	r3, #0
	ldr	r2, [r4, #4]
	str	r3, [r6]
	str	r3, [r6, #4]
	mov	r1, r6
	str	r6, [r2, #12]
	mov	r0, r4
	str	r3, [r4]
	bl	vc_container_writer_extraio_create_null
	ldr	r3, .L28+20
	mov	r7, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L25
.L7:
	ldr	r8, .L28+24
	mov	r0, r4
	ldr	r1, .L28+28
	bl	LOG_DEBUG
	ldr	r3, [r8]
	cmp	r3, #0
	movne	r5, #0
	bne	.L8
	b	.L9
.L26:
	ldr	r1, [r3, r5, lsl #2]
	cmp	r1, #0
	beq	.L9
	mov	r0, r4
	bl	vc_container_free_track
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	bls	.L9
.L8:
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L26
.L9:
	mov	r0, r6
	bl	free
	b	.L1
.L25:
	ldr	r0, .L28+32
	ldr	r1, .L28+36
	ldr	r2, .L28+40
	ldr	r3, [r4, #4]
	ldr	r0, [r0]
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r0, [r3, #8]
	str	r1, [r3, #4]
	str	r2, [r3]
.L1:
	ldr	r3, .L28
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	mov	r0, r7
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L24:
	mov	r0, r5
	ldr	r1, .L28+44
	bl	strcasecmp
	cmp	r0, #0
	beq	.L4
.L5:
	ldr	r3, .L28+48
	ldr	r7, [r3]
	b	.L1
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	VC_CONTAINER_ERROR_OUT_OF_MEMORY
	.word	VC_CONTAINER_SUCCESS
	.word	ASF_TRACKS_MAX
	.word	.LC4
	.word	asf_writer_close
	.word	asf_writer_write
	.word	asf_writer_control
	.word	.LC3
	.word	VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.size	asf_writer_open, .-asf_writer_open
	.comm	asf_writer_write,4,4
	.comm	asf_writer_control,4,4
	.comm	asf_writer_close,4,4
	.comm	VC_CONTAINER_SUCCESS,4,4
	.comm	VC_CONTAINER_ERROR_OUT_OF_MEMORY,4,4
	.comm	VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,4,4
	.comm	ASF_TRACKS_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
