	.file	"814584.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s <dirname>\n"
	.text
	.globl	main
	.type	main, @function
main:
.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], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	call	traverse
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"Directory path invalid '%s'\n"
.LC2:
	.string	"Error opening directory '%s'\n"
	.text
	.globl	traverse
	.type	traverse, @function
traverse:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	QWORD PTR -4136[rbp], rdi
	mov	DWORD PTR -4140[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -4136[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -4136[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L10
.L5:
	mov	rax, QWORD PTR -4136[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -4128[rbp], rax
	cmp	QWORD PTR -4128[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR -4136[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -2
	jmp	.L10
.L9:
	mov	BYTE PTR -4112[rbp], 0
	mov	rdx, QWORD PTR -4136[rbp]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -4112[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 47
	mov	rax, QWORD PTR -4120[rbp]
	lea	rdx, 19[rax]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	edx, DWORD PTR -4140[rbp]
	lea	rcx, -4112[rbp]
	mov	rax, QWORD PTR -4120[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	handle_dirent
	cmp	eax, 1
	jne	.L8
	mov	eax, DWORD PTR -4140[rbp]
	lea	edx, 1[rax]
	lea	rax, -4112[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	traverse
.L8:
	mov	rax, QWORD PTR -4128[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR -4128[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	eax, 0
.L10:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	traverse, .-traverse
	.section	.rodata
.LC3:
	.string	"."
.LC4:
	.string	".."
.LC5:
	.string	""
.LC6:
	.string	"%*s%s\r\n"
	.text
	.globl	handle_dirent
	.type	handle_dirent, @function
handle_dirent:
.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, 192
	mov	QWORD PTR -168[rbp], rdi
	mov	QWORD PTR -176[rbp], rsi
	mov	DWORD PTR -180[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 19
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 19
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 1
	je	.L14
.L13:
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 19
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 19
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 2
	jne	.L15
.L14:
	mov	eax, 0
	jmp	.L18
.L15:
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	test	eax, eax
	jns	.L17
	mov	eax, -1
	jmp	.L18
.L17:
	mov	rax, QWORD PTR -168[rbp]
	lea	rdx, 19[rax]
	mov	eax, DWORD PTR -180[rbp]
	mov	rcx, rdx
	lea	rdx, .LC5[rip]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 16384
	sete	al
	movzx	eax, al
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	handle_dirent, .-handle_dirent
	.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	"814584.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <dirname>\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L4
	bl	printf
	mvn	r0, #0
	bl	exit
.L2:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	traverse
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Directory path invalid '%s'\012\000"
	.align	2
.LC2:
	.ascii	"Error opening directory '%s'\012\000"
	.align	2
.LC3:
	.ascii	"/\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	traverse
	.syntax unified
	.arm
	.fpu softvfp
	.type	traverse, %function
traverse:
	@ args = 0, pretend = 0, frame = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-24]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L7
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-20]
	ldr	r0, .L14+4
	bl	printf
	mvn	r3, #0
	b	.L12
.L7:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-20]
	bl	opendir
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L10
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-20]
	ldr	r0, .L14+8
	bl	printf
	mvn	r3, #1
	b	.L12
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	strb	r2, [r3, #-4]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [r2, #-20]
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, r2
	ldr	r2, .L14+12
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	add	r2, r3, #11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	ldr	r2, [r2, #-24]
	mov	r1, r3
	ldr	r0, [r0, #-8]
	bl	handle_dirent
	mov	r3, r0
	cmp	r3, #1
	bne	.L10
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	add	r2, r3, #1
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	traverse
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	readdir
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bne	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	closedir
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	traverse, .-traverse
	.section	.rodata
	.align	2
.LC5:
	.ascii	".\000"
	.align	2
.LC6:
	.ascii	"..\000"
	.align	2
.LC7:
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"%*s%s\015\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_dirent
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_dirent, %function
handle_dirent:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	str	r2, [fp, #-112]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-104]
	add	r3, r3, #11
	ldr	r1, .L24+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r3, [fp, #-104]
	add	r3, r3, #11
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #1
	beq	.L18
.L17:
	ldr	r3, [fp, #-104]
	add	r3, r3, #11
	ldr	r1, .L24+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-104]
	add	r3, r3, #11
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #2
	bne	.L19
.L18:
	mov	r3, #0
	b	.L22
.L19:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-108]
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L21
	mvn	r3, #0
	b	.L22
.L21:
	ldr	r3, [fp, #-104]
	add	r3, r3, #11
	ldr	r2, .L24+12
	ldr	r1, [fp, #-112]
	ldr	r0, .L24+16
	bl	printf
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #16384
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
.L22:
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC9
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	handle_dirent, .-handle_dirent
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
