	.file	"extr_file_load.c_ParseDirectory.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	".wav"
.LC1:
	.string	".ogg"
.LC2:
	.string	".mp3"
.LC3:
	.string	"%s"
	.text
	.p2align 4
	.globl	ParseDirectory
	.type	ParseDirectory, @function
ParseDirectory:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR fileDir[rip]
	call	opendir@PLT
	test	rax, rax
	je	.L8
	mov	rdi, rax
	mov	r12, rax
	lea	r14, .LC0[rip]
	xor	r13d, r13d
	call	readdir@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, r12
	call	readdir@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L4
.L3:
	cmp	DWORD PTR MAXFILES[rip], r13d
	jle	.L4
	mov	rbp, QWORD PTR [rbx]
	cmp	BYTE PTR 0[rbp], 46
	je	.L5
	mov	rdi, rbp
	call	strlen@PLT
	mov	edx, 4
	mov	rdi, r14
	cdqe
	lea	rsi, -4[rbp+rax]
	call	strncasecmp@PLT
	test	rax, rax
	je	.L5
	mov	rbp, QWORD PTR [rbx]
	mov	rdi, rbp
	call	strlen@PLT
	mov	edx, 4
	lea	rdi, .LC1[rip]
	cdqe
	lea	rsi, -4[rbp+rax]
	call	strncasecmp@PLT
	test	rax, rax
	je	.L5
	mov	rbp, QWORD PTR [rbx]
	mov	rdi, rbp
	call	strlen@PLT
	mov	edx, 4
	lea	rdi, .LC2[rip]
	cdqe
	lea	rsi, -4[rbp+rax]
	call	strncasecmp@PLT
	test	rax, rax
	je	.L5
	mov	rdi, QWORD PTR filelist[rip]
	movsx	r15, r13d
	mov	edx, 4
	xor	esi, esi
	lea	rbp, 0[0+r15*8]
	add	rdi, rbp
	call	memset@PLT
	mov	rax, QWORD PTR filelist[rip]
	mov	rdx, QWORD PTR [rbx]
	lea	rsi, .LC3[rip]
	mov	edi, DWORD PTR 4[rax+rbp]
	call	sprintf@PLT
	mov	rax, QWORD PTR DT_DIR[rip]
	cmp	QWORD PTR 8[rbx], rax
	jne	.L6
	mov	rax, QWORD PTR filelist[rip]
	mov	DWORD PTR [rax+r15*8], 1
.L6:
	mov	rdi, r12
	add	r13d, 1
	call	readdir@PLT
	mov	rbx, rax
	test	rax, rax
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r12
	call	closedir@PLT
	mov	ecx, DWORD PTR FileSortCallback[rip]
	mov	edx, 4
	mov	esi, r13d
	mov	rdi, QWORD PTR filelist[rip]
	call	qsort@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L8:
	.cfi_restore_state
	mov	r13d, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	ParseDirectory, .-ParseDirectory
	.comm	filelist,8,8
	.comm	fileDir,4,4
	.comm	MAXFILES,4,4
	.comm	FileSortCallback,4,4
	.comm	DT_DIR,8,8
	.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_file_load.c_ParseDirectory.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	".wav\000"
	.align	2
.LC1:
	.ascii	".ogg\000"
	.align	2
.LC2:
	.ascii	".mp3\000"
	.align	2
.LC3:
	.ascii	"%s\000"
	.text
	.align	2
	.global	ParseDirectory
	.syntax unified
	.arm
	.fpu softvfp
	.type	ParseDirectory, %function
ParseDirectory:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L28
	ldr	r0, [r3]
	bl	opendir
	subs	r6, r0, #0
	beq	.L8
	bl	readdir
	subs	r4, r0, #0
	moveq	r5, r4
	ldreq	r10, .L28+4
	beq	.L4
	mov	r5, #0
	ldr	r10, .L28+4
	ldr	r7, .L28+8
	ldr	r8, .L28+12
	ldr	r9, .L28+16
	b	.L3
.L7:
	ldr	fp, [r4]
	ldrb	r3, [fp]	@ zero_extendqisi2
	cmp	r3, #46
	beq	.L5
	mov	r0, fp
	bl	strlen
	sub	r0, r0, #4
	add	fp, fp, r0
	mov	r1, fp
	mov	r2, #4
	mov	r0, r8
	bl	strncasecmp
	cmp	r0, #0
	beq	.L5
	mov	r2, #4
	mov	r1, fp
	mov	r0, r9
	bl	strncasecmp
	cmp	r0, #0
	beq	.L5
	mov	r1, fp
	mov	r2, #4
	ldr	r0, .L28+20
	bl	strncasecmp
	cmp	r0, #0
	bne	.L27
.L5:
	mov	r0, r6
	bl	readdir
	subs	r4, r0, #0
	beq	.L4
.L3:
	ldr	r3, [r7]
	cmp	r3, r5
	bgt	.L7
.L4:
	mov	r0, r6
	bl	closedir
	ldr	r3, .L28+24
	mov	r2, #4
	mov	r1, r5
	ldr	r0, [r10]
	ldr	r3, [r3]
	bl	qsort
.L1:
	mov	r0, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	mov	r3, #0
	ldr	r0, [r10]
	ldr	r1, .L28+28
	add	r2, r0, r5, lsl #3
	strb	r3, [r0, r5, lsl #3]
	strb	r3, [r2, #1]
	strb	r3, [r2, #2]
	strb	r3, [r2, #3]
	ldr	r3, [r10]
	ldr	r2, [r4]
	add	r3, r3, r5, lsl #3
	ldr	r0, [r3, #4]
	bl	sprintf
	ldr	r3, .L28+32
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	moveq	r2, #1
	ldreq	r3, [r10]
	streq	r2, [r3, r5, lsl #3]
	add	r5, r5, #1
	b	.L5
.L8:
	mvn	r5, #0
	b	.L1
.L29:
	.align	2
.L28:
	.word	fileDir
	.word	filelist
	.word	MAXFILES
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	FileSortCallback
	.word	.LC3
	.word	DT_DIR
	.size	ParseDirectory, .-ParseDirectory
	.comm	filelist,4,4
	.comm	fileDir,4,4
	.comm	MAXFILES,4,4
	.comm	FileSortCallback,4,4
	.comm	DT_DIR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
