	.file	"854369.c"
	.intel_syntax noprefix
	.text
	.globl	songs
	.bss
	.align 8
	.type	songs, @object
	.size	songs, 8
songs:
	.zero	8
	.globl	songs_total
	.align 4
	.type	songs_total, @object
	.size	songs_total, 4
songs_total:
	.zero	4
	.globl	songs_used
	.align 4
	.type	songs_used, @object
	.size	songs_used, 4
songs_used:
	.zero	4
	.text
	.type	clean_songs, @function
clean_songs:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	rdx, QWORD PTR songs[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rdx, QWORD PTR songs[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR songs_used[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L3
	mov	rax, QWORD PTR songs[rip]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	clean_songs, .-clean_songs
	.type	new_song, @function
new_song:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 8
	.cfi_offset 3, -24
	mov	rax, QWORD PTR songs[rip]
	test	rax, rax
	jne	.L5
	mov	DWORD PTR songs_total[rip], 8
	mov	DWORD PTR songs_used[rip], 0
	mov	eax, DWORD PTR songs_total[rip]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR songs[rip], rax
	mov	rax, QWORD PTR songs[rip]
	test	rax, rax
	jne	.L6
	mov	eax, -1
	jmp	.L7
.L6:
	lea	rdi, clean_songs[rip]
	call	atexit@PLT
.L5:
	mov	edx, DWORD PTR songs_used[rip]
	mov	eax, DWORD PTR songs_total[rip]
	cmp	edx, eax
	jne	.L8
	mov	eax, DWORD PTR songs_total[rip]
	add	eax, eax
	mov	DWORD PTR songs_total[rip], eax
	mov	eax, DWORD PTR songs_total[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR songs[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR songs[rip], rax
	mov	rax, QWORD PTR songs[rip]
	test	rax, rax
	jne	.L8
	mov	eax, -1
	jmp	.L7
.L8:
	mov	rdx, QWORD PTR songs[rip]
	mov	eax, DWORD PTR songs_used[rip]
	cdqe
	sal	rax, 3
	lea	rbx, [rdx+rax]
	mov	esi, 1
	mov	edi, 16
	call	calloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR songs_used[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR songs_used[rip], edx
.L7:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	new_song, .-new_song
	.globl	song_add
	.type	song_add, @function
song_add:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	call	new_song
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L10
	mov	eax, -1
	jmp	.L11
.L10:
	mov	rdx, QWORD PTR songs[rip]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L12
	mov	eax, -1
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -12[rbp]
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	song_add, .-song_add
	.globl	song_set_pattern
	.type	song_set_pattern, @function
song_set_pattern:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	eax, DWORD PTR songs_used[rip]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L14
	mov	eax, -1
	jmp	.L15
.L14:
	mov	rdx, QWORD PTR songs[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -32[rbp], rax
	jbe	.L16
	mov	eax, -1
	jmp	.L15
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, 0
.L15:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	song_set_pattern, .-song_set_pattern
	.globl	song_total_number
	.type	song_total_number, @function
song_total_number:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR songs_used[rip]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	song_total_number, .-song_total_number
	.globl	song_get
	.type	song_get, @function
song_get:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	eax, DWORD PTR songs_used[rip]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L20
	mov	eax, -1
	jmp	.L21
.L20:
	mov	rdx, QWORD PTR songs[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, 0
.L21:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	song_get, .-song_get
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"854369.c"
	.text
	.comm	songs,4,4
	.comm	songs_total,4,4
	.comm	songs_used,4,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clean_songs, %function
clean_songs:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, .L4+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L3
	ldr	r3, .L4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	songs
	.word	songs_used
	.size	clean_songs, .-clean_songs
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_song, %function
new_song:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L7
	ldr	r3, .L11+4
	mov	r2, #8
	str	r2, [r3]
	ldr	r3, .L11+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L11+4
	ldr	r3, [r3]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L11
	str	r2, [r3]
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	mvn	r3, #0
	b	.L9
.L8:
	ldr	r0, .L11+12
	bl	atexit
.L7:
	ldr	r3, .L11+8
	ldr	r2, [r3]
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L10
	ldr	r3, .L11+4
	ldr	r3, [r3]
	lsl	r3, r3, #1
	ldr	r2, .L11+4
	str	r3, [r2]
	ldr	r3, .L11
	ldr	r3, [r3]
	ldr	r2, .L11+4
	ldr	r2, [r2]
	lsl	r2, r2, #2
	mov	r1, r2
	mov	r0, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L11
	str	r3, [r2]
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	mvn	r3, #0
	b	.L9
.L10:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, .L11+8
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r4, r2, r3
	mov	r1, #1
	mov	r0, #8
	bl	calloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L11+8
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L11+8
	str	r2, [r1]
.L9:
	mov	r0, r3
	pop	{r4, r5, fp, pc}
.L12:
	.align	2
.L11:
	.word	songs
	.word	songs_total
	.word	songs_used
	.word	clean_songs
	.size	new_song, .-new_song
	.align	2
	.global	song_add
	.syntax unified
	.arm
	.fpu softvfp
	.type	song_add, %function
song_add:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	bl	new_song
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L14
	mvn	r3, #0
	b	.L15
.L14:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L16
	mvn	r3, #0
	b	.L15
.L16:
	ldr	r3, [fp, #-12]
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	songs
	.size	song_add, .-song_add
	.align	2
	.global	song_set_pattern
	.syntax unified
	.arm
	.fpu softvfp
	.type	song_set_pattern, %function
song_set_pattern:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L20
	mvn	r3, #0
	b	.L21
.L20:
	ldr	r3, .L23+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bls	.L22
	mvn	r3, #0
	b	.L21
.L22:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	str	r2, [r3]
	mov	r3, #0
.L21:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L24:
	.align	2
.L23:
	.word	songs_used
	.word	songs
	.size	song_set_pattern, .-song_set_pattern
	.align	2
	.global	song_total_number
	.syntax unified
	.arm
	.fpu softvfp
	.type	song_total_number, %function
song_total_number:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L27
	ldr	r3, [r3]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L28:
	.align	2
.L27:
	.word	songs_used
	.size	song_total_number, .-song_total_number
	.align	2
	.global	song_get
	.syntax unified
	.arm
	.fpu softvfp
	.type	song_get, %function
song_get:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L30
	mvn	r3, #0
	b	.L31
.L30:
	ldr	r3, .L32+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	mov	r3, #0
.L31:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L33:
	.align	2
.L32:
	.word	songs_used
	.word	songs
	.size	song_get, .-song_get
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
