	.file	"1217773.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s <directory>\n"
	.align 8
.LC1:
	.string	"Error: Cannot get full path of file '%s'. %s\n"
	.align 8
.LC2:
	.string	"Error: Cannot open directory '%s'. %s\n"
.LC3:
	.string	"/"
.LC4:
	.string	"."
.LC5:
	.string	".."
	.align 8
.LC6:
	.string	"Error: Cannot stat file '%s'. %s\n"
.LC7:
	.string	"%s [directory]\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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 208
	mov	DWORD PTR -8388[rbp], edi
	mov	QWORD PTR -8400[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -8388[rbp], 2
	je	.L2
	mov	rax, QWORD PTR -8400[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 1
	jmp	.L13
.L2:
	mov	rax, QWORD PTR -8400[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -8208[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	realpath@PLT
	test	rax, rax
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -8400[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L13
.L4:
	lea	rax, -8208[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -8376[rbp], rax
	cmp	QWORD PTR -8376[rbp], 0
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -8208[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L13
.L5:
	mov	BYTE PTR -4112[rbp], 0
	mov	QWORD PTR -8368[rbp], 0
	lea	rax, -8208[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L6
	lea	rcx, -8208[rbp]
	lea	rax, -4112[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
.L6:
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	QWORD PTR -8368[rbp], rax
	mov	rax, QWORD PTR -8368[rbp]
	sub	rax, 1
	mov	BYTE PTR -4112[rbp+rax], 47
	lea	rdx, -4112[rbp]
	mov	rax, QWORD PTR -8368[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	jmp	.L7
.L12:
	mov	rax, QWORD PTR -8360[rbp]
	add	rax, 19
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -8360[rbp]
	add	rax, 19
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	jmp	.L7
.L9:
	mov	eax, 4096
	sub	rax, QWORD PTR -8368[rbp]
	mov	rdx, QWORD PTR -8360[rbp]
	lea	rsi, 19[rdx]
	lea	rcx, -4112[rbp]
	mov	rdx, QWORD PTR -8368[rbp]
	add	rcx, rdx
	mov	rdx, rax
	mov	rdi, rcx
	call	strncpy@PLT
	lea	rdx, -8352[rbp]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	test	eax, eax
	jns	.L10
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -4112[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L7
.L10:
	mov	rax, QWORD PTR -8360[rbp]
	movzx	eax, BYTE PTR 18[rax]
	cmp	al, 4
	jne	.L11
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L11:
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	puts@PLT
.L7:
	mov	rax, QWORD PTR -8376[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -8360[rbp], rax
	cmp	QWORD PTR -8360[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -8376[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	eax, 0
.L13:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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	"1217773.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s <directory>\012\000"
	.align	2
.LC1:
	.ascii	"Error: Cannot get full path of file '%s'. %s\012\000"
	.align	2
.LC2:
	.ascii	"Error: Cannot open directory '%s'. %s\012\000"
	.align	2
.LC3:
	.ascii	"/\000"
	.align	2
.LC4:
	.ascii	".\000"
	.align	2
.LC5:
	.ascii	"..\000"
	.align	2
.LC6:
	.ascii	"Error: Cannot stat file '%s'. %s\012\000"
	.align	2
.LC7:
	.ascii	"%s [directory]\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8256
	sub	sp, sp, #56
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r0, [r3, #-116]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	str	r1, [r3, #-120]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-116]
	cmp	r3, #2
	beq	.L2
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-120]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L15+4
	bl	printf
	mov	r3, #1
	b	.L13
.L2:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-120]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	realpath
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L15+8
	ldr	r4, [r3]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-120]
	add	r3, r3, #4
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L15+12
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L13
.L4:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	opendir
	str	r0, [r4, #-108]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L15+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	sub	r2, r2, #4
	ldr	r1, .L15+16
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L13
.L5:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #0
	strb	r2, [r3, #-4]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-104]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L15+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	sub	r1, fp, #8192
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #4096
	mov	r0, r3
	bl	strncpy
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r2, fp, #8192
	sub	r2, r2, #12
	add	r3, r3, #1
	str	r3, [r2, #-104]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	sub	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	add	r3, r2, r3
	mov	r2, #47
	strb	r2, [r3, #-4]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	add	r3, r2, r3
	sub	r3, r3, #4
	mov	r2, #0
	strb	r2, [r3]
	b	.L7
.L12:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	add	r3, r3, #11
	ldr	r1, .L15+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	add	r3, r3, #11
	ldr	r1, .L15+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	b	.L7
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #8192
	sub	r2, r2, #12
	ldr	r2, [r2, #-104]
	add	r0, r3, r2
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	add	r1, r3, #11
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	rsb	r3, r3, #4096
	mov	r2, r3
	bl	strncpy
	sub	r2, fp, #8256
	sub	r2, r2, #12
	sub	r2, r2, #32
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r3, .L15+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #4096
	sub	r2, r2, #12
	sub	r2, r2, #4
	ldr	r1, .L15+32
	mov	r0, r4
	bl	fprintf
	b	.L7
.L10:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	ldrb	r3, [r3, #10]	@ zero_extendqisi2
	cmp	r3, #4
	bne	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L15+36
	bl	printf
	b	.L7
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
.L7:
	sub	r3, fp, #8192
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-108]
	bl	readdir
	str	r0, [r4, #-100]
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	cmp	r3, #0
	bne	.L12
	sub	r3, fp, #8192
	sub	r3, r3, #12
	ldr	r0, [r3, #-108]
	bl	closedir
	mov	r3, #0
.L13:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC8
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
