	.file	"51699229.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"."
	.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 1
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	find_directory
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jne	.L3
	mov	edi, 1
	call	exit@PLT
.L3:
	add	DWORD PTR -8[rbp], 1
.L2:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L4
	cmp	DWORD PTR -20[rbp], 1
	jne	.L5
	lea	rdi, .LC0[rip]
	call	find_directory
.L5:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	".."
.LC2:
	.string	"Cannot open directory %s\n"
	.text
	.type	find_directory, @function
find_directory:
.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, 96
	mov	QWORD PTR -4184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -4112[rbp]
	mov	QWORD PTR -4160[rbp], rax
	lea	rax, -4112[rbp]
	add	rax, 4096
	mov	QWORD PTR -4136[rbp], rax
	mov	rax, QWORD PTR -4184[rbp]
	mov	QWORD PTR -4152[rbp], rax
	jmp	.L8
.L10:
	mov	rdx, QWORD PTR -4152[rbp]
	lea	rax, 1[rdx]
	mov	QWORD PTR -4152[rbp], rax
	mov	rax, QWORD PTR -4160[rbp]
	lea	rcx, 1[rax]
	mov	QWORD PTR -4160[rbp], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
.L8:
	mov	rax, QWORD PTR -4160[rbp]
	cmp	rax, QWORD PTR -4136[rbp]
	jnb	.L9
	mov	rax, QWORD PTR -4152[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L10
.L9:
	mov	rax, QWORD PTR -4160[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -4184[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -4128[rbp], rax
	cmp	QWORD PTR -4128[rbp], 0
	je	.L11
	jmp	.L12
.L22:
	mov	rax, QWORD PTR -4160[rbp]
	mov	QWORD PTR -4144[rbp], rax
	lea	rax, -4112[rbp]
	cmp	QWORD PTR -4144[rbp], rax
	jbe	.L13
	mov	rax, QWORD PTR -4144[rbp]
	movzx	eax, BYTE PTR -1[rax]
	mov	BYTE PTR -4165[rbp], al
	jmp	.L14
.L13:
	mov	BYTE PTR -4165[rbp], 58
.L14:
	cmp	BYTE PTR -4165[rbp], 58
	je	.L15
	cmp	BYTE PTR -4165[rbp], 47
	je	.L15
	cmp	BYTE PTR -4165[rbp], 92
	je	.L15
	mov	rax, QWORD PTR -4144[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -4144[rbp], rdx
	mov	BYTE PTR [rax], 47
.L15:
	mov	rax, QWORD PTR -4120[rbp]
	add	rax, 19
	mov	QWORD PTR -4152[rbp], rax
	jmp	.L16
.L18:
	mov	rdx, QWORD PTR -4152[rbp]
	lea	rax, 1[rdx]
	mov	QWORD PTR -4152[rbp], rax
	mov	rax, QWORD PTR -4144[rbp]
	lea	rcx, 1[rax]
	mov	QWORD PTR -4144[rbp], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
.L16:
	mov	rax, QWORD PTR -4144[rbp]
	cmp	rax, QWORD PTR -4136[rbp]
	jnb	.L17
	mov	rax, QWORD PTR -4152[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L18
.L17:
	mov	rax, QWORD PTR -4144[rbp]
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -4120[rbp]
	movzx	eax, BYTE PTR 18[rax]
	movzx	eax, al
	cmp	eax, 10
	je	.L19
	cmp	eax, 10
	jg	.L12
	cmp	eax, 4
	je	.L20
	cmp	eax, 8
	jne	.L12
.L19:
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L12
.L20:
	mov	rax, QWORD PTR -4120[rbp]
	add	rax, 19
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L26
	mov	rax, QWORD PTR -4120[rbp]
	add	rax, 19
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L26
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	find_directory
.L26:
	nop
.L12:
	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	.L22
	mov	rax, QWORD PTR -4128[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	DWORD PTR -4164[rbp], 1
	jmp	.L23
.L11:
	mov	rax, QWORD PTR -4184[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4164[rbp], 0
.L23:
	mov	eax, DWORD PTR -4164[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	find_directory, .-find_directory
	.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	"51699229.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	".\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L2
.L4:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	find_directory
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L3
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L4
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L5
	ldr	r0, .L7
	bl	find_directory
.L5:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.size	main, .-main
	.section	.rodata
	.align	2
.LC1:
	.ascii	"..\000"
	.align	2
.LC2:
	.ascii	"Cannot open directory %s\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_directory, %function
find_directory:
	@ args = 0, pretend = 0, frame = 4144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #52
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-44]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	str	r3, [r2, #-36]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	add	r3, r3, #4096
	str	r3, [r2, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-44]
	str	r3, [r2, #-32]
	b	.L10
.L12:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-32]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	add	r3, r2, #1
	str	r3, [r1, #-32]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	add	r1, r3, #1
	str	r1, [r0, #-36]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-36]
	ldr	r3, [r3, #-20]
	cmp	r2, r3
	bcs	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L12
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-44]
	bl	opendir
	str	r0, [r4, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	beq	.L13
	b	.L14
.L24:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-36]
	str	r3, [r2, #-24]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-24]
	cmp	r2, r3
	bls	.L15
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	ldrb	r3, [r3, #-1]
	strb	r3, [r2, #-37]
	b	.L16
.L15:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #58
	strb	r2, [r3, #-37]
.L16:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-37]	@ zero_extendqisi2
	cmp	r3, #58
	beq	.L17
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-37]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L17
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-37]	@ zero_extendqisi2
	cmp	r3, #92
	beq	.L17
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-24]
	mov	r2, #47
	strb	r2, [r3]
.L17:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, #11
	str	r3, [r2, #-32]
	b	.L18
.L20:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-32]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	add	r3, r2, #1
	str	r3, [r1, #-32]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	add	r1, r3, #1
	str	r1, [r0, #-24]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L18:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-24]
	ldr	r3, [r3, #-20]
	cmp	r2, r3
	bcs	.L19
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L20
.L19:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-24]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	ldrb	r3, [r3, #10]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L21
	cmp	r3, #10
	bgt	.L14
	cmp	r3, #4
	beq	.L22
	cmp	r3, #8
	bne	.L14
.L21:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	bl	puts
	b	.L14
.L22:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, #11
	ldr	r1, .L29+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, #11
	ldr	r1, .L29+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #8
	mov	r0, r3
	bl	find_directory
.L28:
	nop
.L14:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	readdir
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L24
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	closedir
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-28]
	b	.L25
.L13:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-44]
	ldr	r0, .L29+12
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-28]
.L25:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L27
	bl	__stack_chk_fail
.L27:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	find_directory, .-find_directory
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
