	.file	"extr_cafenc.c_caf_write_trailer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"pakt"
	.text
	.p2align 4
	.type	caf_write_trailer, @function
caf_write_trailer:
.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
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 8[rdi]
	mov	rbx, QWORD PTR 16[rdi]
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR AVIO_SEEKABLE_NORMAL[rip], eax
	jne	.L9
.L2:
	lea	rdi, 12[rbx]
	call	av_freep@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L9:
	.cfi_restore_state
	mov	rax, QWORD PTR [rdi]
	mov	rdi, rbp
	mov	rax, QWORD PTR [rax]
	mov	r13, QWORD PTR [rax]
	call	avio_tell@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	mov	r12d, eax
	call	avio_seek@PLT
	mov	esi, r12d
	sub	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	sub	esi, 8
	call	avio_wb64@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, r12d
	mov	rdi, rbp
	call	avio_seek@PLT
	mov	eax, DWORD PTR 0[r13]
	test	eax, eax
	je	.L10
.L3:
	mov	rdi, rbp
	call	avio_flush@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	ffio_wfourcc@PLT
	mov	eax, DWORD PTR 4[rbx]
	mov	rdi, rbp
	lea	esi, 24[rax]
	call	avio_wb64@PLT
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, rbp
	call	avio_wb64@PLT
	mov	edx, DWORD PTR 0[r13]
	mov	r12d, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 4[r13]
	mov	edi, DWORD PTR 8[r13]
	call	samples_per_packet@PLT
	mov	esi, r12d
	mov	rdi, rbp
	imul	esi, eax
	call	avio_wb64@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	avio_wb32@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	avio_wb32@PLT
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR 12[rbx]
	mov	rdi, rbp
	call	avio_write@PLT
	mov	QWORD PTR 16[rbx], 0
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	caf_write_trailer, .-caf_write_trailer
	.comm	SEEK_SET,4,4
	.comm	AVIO_SEEKABLE_NORMAL,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_cafenc.c_caf_write_trailer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"pakt\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	caf_write_trailer, %function
caf_write_trailer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L11
	ldr	r4, [r0, #4]
	ldr	r3, [r3]
	ldr	r2, [r4]
	ldr	r5, [r0, #8]
	tst	r2, r3
	bne	.L9
.L2:
	add	r0, r5, #12
	bl	av_freep
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r3, [r0]
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r7, .L11+4
	ldr	r8, [r3]
	bl	avio_tell
	mov	r6, r0
	ldr	r2, [r7]
	ldr	r1, [r5]
	mov	r0, r4
	bl	avio_seek
	ldr	r1, [r5]
	mov	r0, r4
	sub	r1, r6, r1
	sub	r1, r1, #8
	bl	avio_wb64
	mov	r1, r6
	mov	r0, r4
	ldr	r2, [r7]
	bl	avio_seek
	ldr	r6, [r8]
	cmp	r6, #0
	beq	.L10
.L3:
	mov	r0, r4
	bl	avio_flush
	b	.L2
.L10:
	ldr	r1, .L11+8
	mov	r0, r4
	bl	ffio_wfourcc
	ldr	r1, [r5, #4]
	mov	r0, r4
	add	r1, r1, #24
	bl	avio_wb64
	ldr	r1, [r5, #8]
	mov	r0, r4
	bl	avio_wb64
	ldr	r2, [r8]
	ldr	r1, [r8, #4]
	ldr	r0, [r8, #8]
	ldr	r7, [r5, #8]
	bl	samples_per_packet
	mov	r1, r0
	mov	r0, r4
	mul	r1, r7, r1
	bl	avio_wb64
	mov	r1, r6
	mov	r0, r4
	bl	avio_wb32
	mov	r1, r6
	mov	r0, r4
	bl	avio_wb32
	mov	r0, r4
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #12]
	bl	avio_write
	str	r6, [r5, #16]
	b	.L3
.L12:
	.align	2
.L11:
	.word	AVIO_SEEKABLE_NORMAL
	.word	SEEK_SET
	.word	.LC0
	.size	caf_write_trailer, .-caf_write_trailer
	.comm	SEEK_SET,4,4
	.comm	AVIO_SEEKABLE_NORMAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
