	.file	"extr_files.c_FS_FilenameCompletion.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	FS_FilenameCompletion
	.type	FS_FilenameCompletion, @function
FS_FilenameCompletion:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rcx
	push	r13
	.cfi_offset 13, -40
	mov	r13, rdx
	push	r12
	push	rbx
	sub	rsp, 40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_STRING_CHARS[rip]
	mov	rcx, rsp
	mov	DWORD PTR -68[rbp], eax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L18:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L18
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L19
.L4:
	lea	rcx, -60[rbp]
	xor	edx, edx
	mov	rbx, rsp
	call	FS_ListFilteredFiles@PLT
	mov	esi, DWORD PTR -60[rbp]
	mov	rdi, rax
	mov	r12, rax
	call	FS_SortFileList@PLT
	mov	eax, DWORD PTR -60[rbp]
	test	eax, eax
	jle	.L5
	xor	r15d, r15d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbx
	add	r15, 1
	call	r14
	cmp	DWORD PTR -60[rbp], r15d
	jle	.L5
.L7:
	mov	rdi, QWORD PTR [r12+r15*8]
	call	FS_ConvertPath@PLT
	mov	rsi, QWORD PTR [r12+r15*8]
	mov	edx, DWORD PTR MAX_STRING_CHARS[rip]
	mov	rdi, rbx
	call	Q_strncpyz@PLT
	test	r13, r13
	je	.L6
	mov	edx, DWORD PTR -68[rbp]
	mov	rsi, rbx
	mov	rdi, rbx
	add	r15, 1
	call	COM_StripExtension@PLT
	mov	rdi, rbx
	call	r14
	cmp	DWORD PTR -60[rbp], r15d
	jg	.L7
.L5:
	mov	rdi, r12
	call	FS_FreeFileList@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	FS_FilenameCompletion, .-FS_FilenameCompletion
	.comm	MAX_STRING_CHARS,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_files.c_FS_FilenameCompletion.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	FS_FilenameCompletion
	.syntax unified
	.arm
	.fpu softvfp
	.type	FS_FilenameCompletion, %function
FS_FilenameCompletion:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	ldr	r9, .L13
	mov	r8, r3
	ldr	r10, [r9]
	mov	r7, r2
	add	r3, r10, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r6, sp
	ldr	r2, [fp, #4]
	ldr	ip, .L13+4
	sub	r3, fp, #44
	str	r2, [r6], #8
	mov	r2, #0
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	bl	FS_ListFilteredFiles
	ldr	r1, [fp, #-44]
	mov	r4, r0
	str	r0, [fp, #-48]
	bl	FS_SortFileList
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	ble	.L2
	mov	r5, #0
	sub	r4, r4, #4
	b	.L4
.L3:
	mov	r0, r6
	blx	r8
	ldr	r3, [fp, #-44]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L2
.L4:
	ldr	r0, [r4, #4]!
	bl	FS_ConvertPath
	mov	r0, r6
	ldr	r1, [r4]
	ldr	r2, [r9]
	bl	Q_strncpyz
	cmp	r7, #0
	beq	.L3
	mov	r2, r10
	mov	r1, r6
	mov	r0, r6
	bl	COM_StripExtension
	b	.L3
.L2:
	ldr	r0, [fp, #-48]
	bl	FS_FreeFileList
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	bl	__stack_chk_fail
.L14:
	.align	2
.L13:
	.word	MAX_STRING_CHARS
	.word	.LC0
	.size	FS_FilenameCompletion, .-FS_FilenameCompletion
	.comm	MAX_STRING_CHARS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
