	.file	"529629.c"
	.intel_syntax noprefix
	.text
	.globl	scandir
	.type	scandir, @function
scandir:
.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, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	QWORD PTR -80[rbp], rcx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L2
	mov	eax, -1
	jmp	.L3
.L2:
	mov	QWORD PTR -32[rbp], 512
	mov	rax, QWORD PTR -32[rbp]
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L4
	mov	eax, -1
	jmp	.L3
.L4:
	mov	DWORD PTR -44[rbp], 537
	mov	DWORD PTR -44[rbp], 280
	mov	DWORD PTR -48[rbp], 0
	jmp	.L5
.L9:
	cmp	QWORD PTR -72[rbp], 0
	je	.L6
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	rdx
	test	eax, eax
	jne	.L6
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L7
	mov	eax, -1
	jmp	.L3
.L7:
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 280
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 19[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 19
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	add	DWORD PTR -48[rbp], 1
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	cmp	QWORD PTR -32[rbp], rax
	jg	.L8
	add	QWORD PTR -32[rbp], 512
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L8
	mov	eax, -1
	jmp	.L3
.L8:
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	sal	rax, 3
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
.L5:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	closedir@PLT
	cmp	DWORD PTR -48[rbp], 0
	je	.L10
	cmp	QWORD PTR -80[rbp], 0
	je	.L10
	mov	eax, DWORD PTR -48[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, rdx
	mov	edx, 8
	mov	rdi, rax
	call	qsort@PLT
.L10:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR -48[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	scandir, .-scandir
	.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	"529629.c"
	.text
	.align	2
	.global	scandir
	.syntax unified
	.arm
	.fpu softvfp
	.type	scandir, %function
scandir:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	ldr	r0, [fp, #-40]
	bl	opendir
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L2
	mvn	r3, #0
	b	.L3
.L2:
	mov	r3, #512
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L4
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r3, .L11
	str	r3, [fp, #-16]
	mov	r3, #268
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L5
.L9:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-48]
	ldr	r0, [fp, #-12]
	blx	r3
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	b	.L5
.L6:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L7
	mvn	r3, #0
	b	.L3
.L7:
	mov	r2, #268
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	memcpy
	ldr	r3, [fp, #-8]
	add	r2, r3, #11
	ldr	r3, [fp, #-12]
	add	r3, r3, #11
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L8
	ldr	r3, [fp, #-24]
	add	r3, r3, #512
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	realloc
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L8
	mvn	r3, #0
	b	.L3
.L8:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	str	r2, [r3]
.L5:
	ldr	r0, [fp, #-20]
	bl	readdir
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L9
	ldr	r0, [fp, #-20]
	bl	closedir
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L10
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-52]
	mov	r2, #4
	ldr	r0, [fp, #-32]
	bl	qsort
.L10:
	ldr	r3, [fp, #-44]
	ldr	r2, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	525
	.size	scandir, .-scandir
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
