	.file	"518001.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"chkdirs [-n] dir ...\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 255
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	usage, .-usage
	.globl	make_pathname
	.type	make_pathname, @function
make_pathname:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	add	eax, 2
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L3
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, 8
	jbe	.L4
.L3:
	cmp	QWORD PTR -40[rbp], 0
	je	.L5
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
.L5:
	mov	eax, 4096
	cmp	DWORD PTR -8[rbp], 4096
	cmovge	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L4
	mov	eax, 0
	jmp	.L6
.L4:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L7
	mov	DWORD PTR -16[rbp], 0
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sub	rax, 1
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L9
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -16[rbp], eax
	jmp	.L8
.L9:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	mov	BYTE PTR [rax], 47
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
.L8:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	make_pathname, .-make_pathname
	.section	.rodata
.LC1:
	.string	"malloc() failed: %s\n"
.LC2:
	.string	"getcwd() failed: %s\n"
.LC3:
	.string	"make_pathname() failed: %s\n"
.LC4:
	.string	"chdir(%s): %s\n"
.LC5:
	.string	"."
.LC6:
	.string	"lstat(%s): %s\n"
.LC7:
	.string	"opendir(%s): %s\n"
.LC8:
	.string	".."
.LC9:
	.string	"lstat(%s/%s): %s\n"
.LC10:
	.string	"%d\t%s\n"
	.align 8
.LC11:
	.string	"Final chdir(%s) failed (%s) -- EXIT!\n"
	.text
	.globl	check_dir
	.type	check_dir, @function
check_dir:
.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, 256
	mov	QWORD PTR -232[rbp], rdi
	mov	QWORD PTR -240[rbp], rsi
	mov	DWORD PTR -244[rbp], edx
	mov	DWORD PTR -248[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -224[rbp], -1
	cmp	QWORD PTR -240[rbp], 0
	je	.L11
	mov	rax, QWORD PTR -240[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -212[rbp], eax
	cmp	DWORD PTR -212[rbp], 0
	jne	.L12
.L11:
	mov	DWORD PTR -220[rbp], 4096
.L13:
	mov	eax, DWORD PTR -220[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -200[rbp], rax
	cmp	QWORD PTR -200[rbp], 0
	jne	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L39
.L14:
	mov	eax, DWORD PTR -220[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -200[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	getcwd@PLT
	test	rax, rax
	jne	.L18
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 34
	jne	.L17
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	free@PLT
	sal	DWORD PTR -220[rbp]
	jmp	.L13
.L17:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L39
.L12:
	mov	eax, DWORD PTR -212[rbp]
	add	eax, 1
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -200[rbp], rax
	cmp	QWORD PTR -200[rbp], 0
	jne	.L19
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L39
.L19:
	mov	rdx, QWORD PTR -240[rbp]
	mov	rax, QWORD PTR -200[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
.L18:
	mov	QWORD PTR -208[rbp], 0
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -232[rbp]
	mov	rax, QWORD PTR -200[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	make_pathname
	test	rax, rax
	jne	.L20
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, -1
	jmp	.L39
.L20:
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L21
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -208[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, -1
	jmp	.L39
.L21:
	cmp	DWORD PTR -244[rbp], 0
	jne	.L22
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	call	lstat@PLT
	test	eax, eax
	je	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -144[rbp]
	mov	DWORD PTR -244[rbp], eax
.L22:
	lea	rdi, .LC5[rip]
	call	opendir@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	jne	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L24
.L25:
	mov	DWORD PTR -216[rbp], 0
	mov	QWORD PTR -192[rbp], 0
	jmp	.L26
.L34:
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 19
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L26
	mov	rax, QWORD PTR -168[rbp]
	add	rax, 19
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L28
	jmp	.L26
.L28:
	mov	rax, QWORD PTR -168[rbp]
	lea	rdx, 19[rax]
	lea	rax, -160[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	lstat@PLT
	test	eax, eax
	je	.L29
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR -168[rbp]
	lea	rcx, 19[rax]
	mov	rdx, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rsi
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	closedir@PLT
	jmp	.L24
.L29:
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L26
	add	DWORD PTR -216[rbp], 1
	cmp	DWORD PTR -248[rbp], 0
	je	.L30
	jmp	.L26
.L30:
	mov	rax, QWORD PTR -144[rbp]
	cmp	rax, 2
	jbe	.L26
	mov	rax, QWORD PTR -192[rbp]
	mov	QWORD PTR -184[rbp], rax
	mov	edi, 272
	call	malloc@PLT
	mov	QWORD PTR -192[rbp], rax
	cmp	QWORD PTR -192[rbp], 0
	jne	.L31
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -248[rbp], 1
	jmp	.L32
.L33:
	mov	rax, QWORD PTR -184[rbp]
	mov	rax, QWORD PTR 264[rax]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	QWORD PTR -184[rbp], rax
.L32:
	cmp	QWORD PTR -184[rbp], 0
	jne	.L33
	jmp	.L26
.L31:
	mov	rax, QWORD PTR -168[rbp]
	lea	rdx, 19[rax]
	mov	rax, QWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -192[rbp]
	mov	DWORD PTR 256[rax], edx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR 264[rax], rdx
.L26:
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L34
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	eax, DWORD PTR -244[rbp]
	sub	eax, DWORD PTR -216[rbp]
	sub	eax, 2
	mov	DWORD PTR -224[rbp], eax
	cmp	DWORD PTR -224[rbp], 0
	je	.L36
	mov	rdx, QWORD PTR -208[rbp]
	mov	eax, DWORD PTR -224[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L36
.L37:
	mov	rax, QWORD PTR -192[rbp]
	mov	edx, DWORD PTR 256[rax]
	mov	rsi, QWORD PTR -208[rbp]
	mov	rax, QWORD PTR -192[rbp]
	mov	ecx, DWORD PTR -248[rbp]
	mov	rdi, rax
	call	check_dir
	mov	rax, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR 264[rax]
	mov	QWORD PTR -184[rbp], rax
	mov	rax, QWORD PTR -192[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -184[rbp]
	mov	QWORD PTR -192[rbp], rax
.L36:
	cmp	QWORD PTR -192[rbp], 0
	jne	.L37
	nop
.L24:
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	chdir@PLT
	test	eax, eax
	je	.L38
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -200[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 255
	call	exit@PLT
.L38:
	mov	rax, QWORD PTR -208[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -200[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -224[rbp]
.L39:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	check_dir, .-check_dir
	.section	.rodata
.LC12:
	.string	"n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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 -12[rbp], 0
	mov	DWORD PTR opterr[rip], 0
	jmp	.L42
.L44:
	movsx	eax, BYTE PTR -13[rbp]
	cmp	eax, 110
	jne	.L43
	mov	DWORD PTR -12[rbp], 1
	jmp	.L42
.L43:
	mov	eax, 0
	call	usage
.L42:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, .LC12[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	BYTE PTR -13[rbp], al
	cmp	BYTE PTR -13[rbp], 0
	jg	.L44
	mov	eax, DWORD PTR optind[rip]
	cmp	DWORD PTR -20[rbp], eax
	jg	.L45
	mov	eax, 0
	call	usage
.L45:
	mov	eax, DWORD PTR optind[rip]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L46
.L47:
	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	edx, DWORD PTR -12[rbp]
	mov	ecx, edx
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	check_dir
	mov	DWORD PTR -4[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L46:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L47
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.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	"518001.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"chkdirs [-n] dir ...\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L2
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L2+4
	bl	fwrite
	mov	r0, #255
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	usage, .-usage
	.align	2
	.global	make_pathname
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_pathname, %function
make_pathname:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	add	r3, r3, #2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	bls	.L6
.L5:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
.L7:
	ldr	r3, [fp, #-12]
	cmp	r3, #4096
	movge	r3, r3
	movlt	r3, #4096
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L6
	mov	r3, #0
	b	.L8
.L6:
	ldr	r3, [fp, #-28]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L9
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L10
.L9:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L11
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-20]
	b	.L10
.L11:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #47
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L10:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	make_pathname, .-make_pathname
	.section	.rodata
	.align	2
.LC1:
	.ascii	"malloc() failed: %s\012\000"
	.align	2
.LC2:
	.ascii	"getcwd() failed: %s\012\000"
	.align	2
.LC3:
	.ascii	"make_pathname() failed: %s\012\000"
	.align	2
.LC4:
	.ascii	"chdir(%s): %s\012\000"
	.align	2
.LC5:
	.ascii	".\000"
	.align	2
.LC6:
	.ascii	"lstat(%s): %s\012\000"
	.align	2
.LC7:
	.ascii	"opendir(%s): %s\012\000"
	.align	2
.LC8:
	.ascii	"..\000"
	.align	2
.LC9:
	.ascii	"lstat(%s/%s): %s\012\000"
	.align	2
.LC10:
	.ascii	"%d\011%s\012\000"
	.align	2
.LC11:
	.ascii	"Final chdir(%s) failed (%s) -- EXIT!\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	check_dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_dir, %function
check_dir:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #164
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	str	r2, [fp, #-168]
	str	r3, [fp, #-172]
	ldr	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	beq	.L13
	ldr	r0, [fp, #-164]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	bne	.L14
.L13:
	mov	r3, #4096
	str	r3, [fp, #-148]
.L15:
	ldr	r3, [fp, #-148]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L16
	ldr	r3, .L43+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L43+8
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L41
.L16:
	ldr	r3, [fp, #-148]
	mov	r1, r3
	ldr	r0, [fp, #-140]
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #34
	bne	.L19
	ldr	r0, [fp, #-140]
	bl	free
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #1
	str	r3, [fp, #-148]
	b	.L15
.L19:
	ldr	r3, .L43+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L43+12
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L41
.L14:
	ldr	r3, [fp, #-128]
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L21
	ldr	r3, .L43+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L43+8
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L41
.L21:
	ldr	r1, [fp, #-164]
	ldr	r0, [fp, #-140]
	bl	strcpy
.L20:
	mov	r3, #0
	str	r3, [fp, #-156]
	sub	r3, fp, #156
	mov	r2, r3
	ldr	r1, [fp, #-160]
	ldr	r0, [fp, #-140]
	bl	make_pathname
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	ldr	r3, .L43+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L43+16
	mov	r0, r4
	bl	fprintf
	ldr	r0, [fp, #-140]
	bl	free
	mvn	r3, #0
	b	.L41
.L22:
	ldr	r0, [fp, #-160]
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r3, .L43+4
	ldr	r4, [r3]
	ldr	r5, [fp, #-156]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L43+20
	mov	r0, r4
	bl	fprintf
	ldr	r0, [fp, #-140]
	bl	free
	ldr	r3, [fp, #-156]
	mov	r0, r3
	bl	free
	mvn	r3, #0
	b	.L41
.L23:
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	bne	.L24
	sub	r3, fp, #116
	mov	r1, r3
	ldr	r0, .L43+24
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	beq	.L25
	ldr	r3, .L43+4
	ldr	r4, [r3]
	ldr	r5, [fp, #-156]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L43+28
	mov	r0, r4
	bl	fprintf
	b	.L26
.L25:
	ldr	r3, [fp, #-96]
	str	r3, [fp, #-168]
.L24:
	ldr	r0, .L43+24
	bl	opendir
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-124]
	cmp	r3, #0
	bne	.L27
	ldr	r3, .L43+4
	ldr	r4, [r3]
	ldr	r5, [fp, #-156]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L43+32
	mov	r0, r4
	bl	fprintf
	b	.L26
.L27:
	mov	r3, #0
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-136]
	b	.L28
.L36:
	ldr	r3, [fp, #-120]
	add	r3, r3, #11
	ldr	r1, .L43+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L28
	ldr	r3, [fp, #-120]
	add	r3, r3, #11
	ldr	r1, .L43+36
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L30
	b	.L28
.L30:
	ldr	r3, [fp, #-120]
	add	r3, r3, #11
	sub	r2, fp, #116
	mov	r1, r2
	mov	r0, r3
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	beq	.L31
	ldr	r3, .L43+4
	ldr	r4, [r3]
	ldr	r5, [fp, #-156]
	ldr	r3, [fp, #-120]
	add	r6, r3, #11
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L43+40
	mov	r0, r4
	bl	fprintf
	ldr	r0, [fp, #-124]
	bl	closedir
	b	.L26
.L31:
	ldr	r3, [fp, #-100]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L28
	ldr	r3, [fp, #-144]
	add	r3, r3, #1
	str	r3, [fp, #-144]
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	beq	.L32
	b	.L28
.L32:
	ldr	r3, [fp, #-96]
	cmp	r3, #2
	bls	.L28
	ldr	r3, [fp, #-136]
	str	r3, [fp, #-132]
	mov	r0, #264
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L33
	ldr	r3, .L43+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L43+8
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	str	r3, [fp, #-172]
	b	.L34
.L35:
	ldr	r3, [fp, #-132]
	ldr	r3, [r3, #260]
	str	r3, [fp, #-136]
	ldr	r0, [fp, #-132]
	bl	free
	ldr	r3, [fp, #-136]
	str	r3, [fp, #-132]
.L34:
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L35
	b	.L28
.L33:
	ldr	r2, [fp, #-136]
	ldr	r3, [fp, #-120]
	add	r3, r3, #11
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	ldr	r3, [fp, #-96]
	mov	r2, r3
	ldr	r3, [fp, #-136]
	str	r2, [r3, #256]
	ldr	r3, [fp, #-136]
	ldr	r2, [fp, #-132]
	str	r2, [r3, #260]
.L28:
	ldr	r0, [fp, #-124]
	bl	readdir
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bne	.L36
	ldr	r0, [fp, #-124]
	bl	closedir
	ldr	r2, [fp, #-168]
	ldr	r3, [fp, #-144]
	sub	r3, r2, r3
	sub	r3, r3, #2
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-156]
	mov	r2, r3
	ldr	r1, [fp, #-152]
	ldr	r0, .L43+44
	bl	printf
	b	.L38
.L39:
	ldr	r0, [fp, #-136]
	ldr	r1, [fp, #-156]
	ldr	r3, [fp, #-136]
	ldr	r2, [r3, #256]
	ldr	r3, [fp, #-172]
	bl	check_dir
	ldr	r3, [fp, #-136]
	ldr	r3, [r3, #260]
	str	r3, [fp, #-132]
	ldr	r0, [fp, #-136]
	bl	free
	ldr	r3, [fp, #-132]
	str	r3, [fp, #-136]
.L38:
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	bne	.L39
	nop
.L26:
	ldr	r0, [fp, #-140]
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	beq	.L40
	ldr	r3, .L43+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	ldr	r2, [fp, #-140]
	ldr	r1, .L43+48
	mov	r0, r4
	bl	fprintf
	mov	r0, #255
	bl	exit
.L40:
	ldr	r3, [fp, #-156]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-140]
	bl	free
	ldr	r3, [fp, #-152]
.L41:
	ldr	r2, .L43
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L42
	bl	__stack_chk_fail
.L42:
	mov	r0, r3
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC12
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	check_dir, .-check_dir
	.section	.rodata
	.align	2
.LC13:
	.ascii	"n\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, .L52
	mov	r2, #0
	str	r2, [r3]
	b	.L46
.L48:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #110
	bne	.L47
	mov	r3, #1
	str	r3, [fp, #-16]
	b	.L46
.L47:
	bl	usage
.L46:
	ldr	r2, .L52+4
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	getopt
	mov	r3, r0
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L48
	ldr	r3, .L52+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bgt	.L49
	bl	usage
.L49:
	ldr	r3, .L52+8
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L50
.L51:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	mov	r1, #0
	bl	check_dir
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L50:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L51
	ldr	r0, [fp, #-8]
	bl	exit
.L53:
	.align	2
.L52:
	.word	opterr
	.word	.LC13
	.word	optind
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
