	.file	"extr_aiffenc.c_aiff_write_trailer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	aiff_write_trailer, @function
aiff_write_trailer:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR 8[rdi]
	mov	r12, QWORD PTR [rdi]
	mov	rdx, QWORD PTR 0[r13]
	mov	rdi, r12
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	r14, QWORD PTR [rax]
	call	avio_tell@PLT
	mov	ebx, eax
	mov	r8d, eax
	test	al, 1
	jne	.L14
.L2:
	mov	rax, QWORD PTR 0[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, DWORD PTR AVIO_SEEKABLE_NORMAL[rip]
	mov	r15d, eax
	jne	.L15
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	xor	esi, esi
	mov	rdi, r12
	call	avio_w8@PLT
	lea	r8d, 1[rbx]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, DWORD PTR 8[r13]
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], r8d
	call	avio_seek@PLT
	mov	eax, ebx
	sub	eax, DWORD PTR 12[r13]
	mov	rdi, r12
	sub	eax, 12
	cdq
	idiv	DWORD PTR [r14]
	mov	esi, eax
	call	avio_wb32@PLT
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, DWORD PTR 12[r13]
	mov	rdi, r12
	call	avio_seek@PLT
	sub	ebx, DWORD PTR 12[r13]
	mov	rdi, r12
	lea	esi, -4[rbx]
	call	avio_wb32@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	rdi, r12
	mov	esi, r8d
	call	avio_seek@PLT
	cmp	QWORD PTR 24[r13], 0
	jne	.L16
	xor	r15d, r15d
.L4:
	mov	rdi, r12
	call	avio_tell@PLT
	mov	esi, DWORD PTR 16[r13]
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	rdi, r12
	mov	ebx, eax
	call	avio_seek@PLT
	sub	ebx, DWORD PTR 16[r13]
	mov	rdi, r12
	lea	esi, -4[rbx]
	call	avio_wb32@PLT
	mov	rdi, r12
	call	avio_flush@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rsi, r13
	mov	rdi, rbp
	call	put_id3v2_tags@PLT
	mov	r15d, eax
	test	eax, eax
	jns	.L4
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	aiff_write_trailer, .-aiff_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_aiffenc.c_aiff_write_trailer.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	aiff_write_trailer, %function
aiff_write_trailer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldmib	r0, {r3, r7}
	ldr	r2, [r7]
	ldr	r6, [r0]
	ldr	r3, [r3, r2, lsl #2]
	mov	r4, r0
	mov	r0, r6
	ldr	r9, [r3]
	bl	avio_tell
	tst	r0, #1
	mov	r5, r0
	moveq	r8, r0
	bne	.L14
.L2:
	ldr	r2, [r4]
	ldr	r3, .L16
	ldr	r2, [r2]
	ldr	r3, [r3]
	ands	fp, r2, r3
	bne	.L15
.L1:
	mov	r0, fp
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	mov	r1, #0
	mov	r0, r6
	bl	avio_w8
	add	r8, r5, #1
	b	.L2
.L15:
	ldr	r10, .L16+4
	ldr	r1, [r7, #4]
	ldr	r2, [r10]
	mov	r0, r6
	bl	avio_seek
	ldr	r0, [r7, #8]
	ldr	r1, [r9]
	sub	r0, r5, r0
	sub	r0, r0, #12
	bl	__aeabi_idiv
	mov	r1, r0
	mov	r0, r6
	bl	avio_wb32
	ldr	r2, [r10]
	ldr	r1, [r7, #8]
	mov	r0, r6
	bl	avio_seek
	ldr	r1, [r7, #8]
	mov	r0, r6
	sub	r1, r5, r1
	sub	r1, r1, #4
	bl	avio_wb32
	mov	r1, r8
	mov	r0, r6
	ldr	r2, [r10]
	bl	avio_seek
	ldr	fp, [r7, #16]
	cmp	fp, #0
	beq	.L4
	mov	r0, r4
	mov	r1, r7
	bl	put_id3v2_tags
	subs	fp, r0, #0
	blt	.L1
.L4:
	mov	r0, r6
	bl	avio_tell
	mov	r4, r0
	ldr	r2, [r10]
	ldr	r1, [r7, #12]
	mov	r0, r6
	bl	avio_seek
	ldr	r1, [r7, #12]
	mov	r0, r6
	sub	r1, r4, r1
	sub	r1, r1, #4
	bl	avio_wb32
	mov	r0, r6
	bl	avio_flush
	mov	r0, fp
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	AVIO_SEEKABLE_NORMAL
	.word	SEEK_SET
	.size	aiff_write_trailer, .-aiff_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
