	.file	"extr_avienc.c_avi_start_new_riff.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"RIFF"
.LC1:
	.string	"LIST"
	.text
	.p2align 4
	.type	avi_start_new_riff, @function
avi_start_new_riff:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR 16[rdi]
	mov	edx, DWORD PTR [rdi]
	add	DWORD PTR 8[rbx], 1
	test	edx, edx
	jle	.L2
	mov	rax, QWORD PTR 8[rdi]
	sub	edx, 1
	lea	rsi, 8[rax]
	lea	r9, [rsi+rdx*8]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	add	rsi, 8
.L3:
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	r8d, DWORD PTR 16[rax]
	mov	QWORD PTR [rax], 0
	mov	DWORD PTR 8[rax], r8d
	mov	rax, rsi
	cmp	rsi, r9
	jne	.L7
.L2:
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	call	ff_start_tag@PLT
	mov	rsi, r12
	mov	rdi, rbp
	mov	QWORD PTR [rbx], rax
	call	ffio_wfourcc@PLT
	mov	rdi, rbp
	lea	rsi, .LC1[rip]
	call	ff_start_tag@PLT
	mov	rsi, r13
	mov	rdi, rbp
	mov	r12, rax
	call	ffio_wfourcc@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
	.cfi_endproc
.LFE0:
	.size	avi_start_new_riff, .-avi_start_new_riff
	.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_avienc.c_avi_start_new_riff.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"RIFF\000"
	.align	2
.LC1:
	.ascii	"LIST\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	avi_start_new_riff, %function
avi_start_new_riff:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, [r0, #8]
	ldr	r4, [r0]
	ldr	ip, [r7, #4]
	cmp	r4, #0
	add	ip, ip, #1
	mov	r5, r1
	mov	r8, r2
	mov	r6, r3
	str	ip, [r7, #4]
	ble	.L2
	mov	r3, #0
	ldr	ip, [r0, #4]
	sub	ip, ip, #4
	add	r4, ip, r4, lsl #2
.L3:
	ldr	r0, [ip, #4]!
	ldr	r0, [r0]
	cmp	ip, r4
	ldr	lr, [r0, #8]
	stm	r0, {r3, lr}
	bne	.L3
.L2:
	mov	r0, r5
	ldr	r1, .L7
	bl	ff_start_tag
	mov	r1, r8
	str	r0, [r7]
	mov	r0, r5
	bl	ffio_wfourcc
	mov	r0, r5
	ldr	r1, .L7+4
	bl	ff_start_tag
	mov	r4, r0
	mov	r1, r6
	mov	r0, r5
	bl	ffio_wfourcc
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.size	avi_start_new_riff, .-avi_start_new_riff
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
