	.file	"429656.c"
	.intel_syntax noprefix
	.text
	.local	prefix
	.comm	prefix,8,8
	.local	prefixlen
	.comm	prefixlen,8,8
	.local	buf
	.comm	buf,1024,32
	.local	pwd
	.comm	pwd,1024,32
	.type	makepath, @function
makepath:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR prefix[rip]
	mov	rsi, rax
	lea	rdi, buf[rip]
	call	strcpy@PLT
	mov	rdx, QWORD PTR prefix[rip]
	mov	rax, QWORD PTR prefixlen[rip]
	sub	rax, 1
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	je	.L2
	lea	rdi, buf[rip]
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, buf[rip]
	add	rax, rdx
	mov	WORD PTR [rax], 47
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, buf[rip]
	call	strcat@PLT
	lea	rax, buf[rip]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	makepath, .-makepath
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.type	dochdir, @function
dochdir:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	chdir@PLT
	cmp	eax, -1
	jne	.L6
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, rax
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dochdir, .-dochdir
	.section	.rodata
.LC1:
	.string	"open %s"
.LC2:
	.string	"fchdir %s"
	.text
	.type	dofchdir, @function
dofchdir:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L8
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	lea	rsi, .LC1[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L8:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	fchdir@PLT
	cmp	eax, -1
	jne	.L9
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, rax
	lea	rsi, .LC2[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L9:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dofchdir, .-dofchdir
	.local	thechdir
	.comm	thechdir,8,8
	.section	.rodata
.LC3:
	.string	"chdir1"
.LC4:
	.string	"getcwd1"
.LC5:
	.string	"strcmp1"
.LC6:
	.string	"dir"
.LC7:
	.string	"mkdir2"
.LC8:
	.string	"chdir2"
.LC9:
	.string	"getcwd2"
.LC10:
	.string	"strcmp2"
.LC11:
	.string	"mkdir3"
.LC12:
	.string	"chdir3"
.LC13:
	.string	"getcwd3"
.LC14:
	.string	"dir/dir"
.LC15:
	.string	"strcmp3"
.LC16:
	.string	"chdir4"
.LC17:
	.string	".."
.LC18:
	.string	"getcwd4"
.LC19:
	.string	"strcmp4"
.LC20:
	.string	"chdir5"
.LC21:
	.string	"../../../../../../.."
.LC22:
	.string	"getcwd5"
.LC23:
	.string	"strcmp5"
.LC24:
	.string	"chdir6"
.LC25:
	.string	"/"
.LC26:
	.string	"getcwd6"
.LC27:
	.string	"strcmp6"
	.text
	.type	simple, @function
simple:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rdx, QWORD PTR thechdir[rip]
	mov	rax, QWORD PTR prefix[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	rdx
	mov	esi, 1024
	lea	rdi, pwd[rip]
	call	getcwd@PLT
	test	rax, rax
	jne	.L11
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L11:
	mov	rax, QWORD PTR prefix[rip]
	mov	rsi, rax
	lea	rdi, pwd[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L12
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L12:
	mov	esi, 511
	lea	rdi, .LC6[rip]
	call	mkdir@PLT
	cmp	eax, -1
	jne	.L13
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L13:
	mov	rax, QWORD PTR thechdir[rip]
	lea	rsi, .LC8[rip]
	lea	rdi, .LC6[rip]
	call	rax
	mov	esi, 1024
	lea	rdi, pwd[rip]
	call	getcwd@PLT
	test	rax, rax
	jne	.L14
	lea	rsi, .LC9[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L14:
	lea	rdi, .LC6[rip]
	call	makepath
	mov	rsi, rax
	lea	rdi, pwd[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L15
	lea	rsi, .LC10[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L15:
	mov	esi, 511
	lea	rdi, .LC6[rip]
	call	mkdir@PLT
	cmp	eax, -1
	jne	.L16
	lea	rsi, .LC11[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L16:
	mov	rax, QWORD PTR thechdir[rip]
	lea	rsi, .LC12[rip]
	lea	rdi, .LC6[rip]
	call	rax
	mov	esi, 1024
	lea	rdi, pwd[rip]
	call	getcwd@PLT
	test	rax, rax
	jne	.L17
	lea	rsi, .LC13[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L17:
	lea	rdi, .LC14[rip]
	call	makepath
	mov	rsi, rax
	lea	rdi, pwd[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L18
	lea	rsi, .LC15[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L18:
	mov	rax, QWORD PTR thechdir[rip]
	lea	rsi, .LC16[rip]
	lea	rdi, .LC17[rip]
	call	rax
	mov	esi, 1024
	lea	rdi, pwd[rip]
	call	getcwd@PLT
	test	rax, rax
	jne	.L19
	lea	rsi, .LC18[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L19:
	lea	rdi, .LC6[rip]
	call	makepath
	mov	rsi, rax
	lea	rdi, pwd[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L20
	lea	rsi, .LC19[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L20:
	mov	rax, QWORD PTR thechdir[rip]
	lea	rsi, .LC20[rip]
	lea	rdi, .LC21[rip]
	call	rax
	mov	esi, 1024
	lea	rdi, pwd[rip]
	call	getcwd@PLT
	test	rax, rax
	jne	.L21
	lea	rsi, .LC22[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L21:
	mov	rax, QWORD PTR prefix[rip]
	mov	rsi, rax
	lea	rdi, pwd[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L22
	lea	rsi, .LC23[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L22:
	mov	rax, QWORD PTR thechdir[rip]
	lea	rsi, .LC24[rip]
	lea	rdi, .LC25[rip]
	call	rax
	mov	esi, 1024
	lea	rdi, pwd[rip]
	call	getcwd@PLT
	test	rax, rax
	jne	.L23
	lea	rsi, .LC26[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L23:
	lea	rsi, .LC25[rip]
	lea	rdi, pwd[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L25
	lea	rsi, .LC27[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L25:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	simple, .-simple
	.section	.rodata
.LC28:
	.string	"adir"
.LC29:
	.string	"mkdir1"
.LC30:
	.string	"anotherdir"
.LC31:
	.string	"anotherdir/lincthesink"
.LC32:
	.string	"/adir"
.LC33:
	.string	"symlink"
.LC34:
	.string	"getcwd"
.LC35:
	.string	"strcmp"
	.text
	.type	symlinktest, @function
symlinktest:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rdx, QWORD PTR thechdir[rip]
	mov	rax, QWORD PTR prefix[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	rdx
	mov	esi, 511
	lea	rdi, .LC28[rip]
	call	mkdir@PLT
	cmp	eax, -1
	jne	.L27
	lea	rsi, .LC29[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L27:
	mov	esi, 511
	lea	rdi, .LC30[rip]
	call	mkdir@PLT
	cmp	eax, -1
	jne	.L28
	lea	rsi, .LC7[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L28:
	lea	rsi, .LC31[rip]
	lea	rdi, .LC32[rip]
	call	symlink@PLT
	cmp	eax, -1
	jne	.L29
	lea	rsi, .LC33[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L29:
	mov	rax, QWORD PTR thechdir[rip]
	lea	rsi, .LC8[rip]
	lea	rdi, .LC31[rip]
	call	rax
	mov	esi, 1024
	lea	rdi, pwd[rip]
	call	getcwd@PLT
	test	rax, rax
	jne	.L30
	lea	rsi, .LC34[rip]
	mov	edi, 1
	mov	eax, 0
	call	err@PLT
.L30:
	lea	rdi, .LC28[rip]
	call	makepath
	mov	rsi, rax
	lea	rdi, pwd[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L32
	lea	rsi, .LC35[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L32:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	symlinktest, .-symlinktest
	.section	.rodata
.LC36:
	.string	"usage"
.LC37:
	.string	"chdir"
.LC38:
	.string	"fchdir"
.LC39:
	.string	"invalid chdir type"
.LC40:
	.string	"simple"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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], 4
	je	.L34
	lea	rsi, .LC36[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L34:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR prefix[rip], rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR prefixlen[rip], rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC37[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L35
	lea	rax, dochdir[rip]
	mov	QWORD PTR thechdir[rip], rax
	jmp	.L36
.L35:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC38[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L37
	lea	rax, dofchdir[rip]
	mov	QWORD PTR thechdir[rip], rax
	jmp	.L36
.L37:
	lea	rsi, .LC39[rip]
	mov	edi, 1
	mov	eax, 0
	call	errx@PLT
.L36:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L38
	call	simple
.L38:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L39
	call	symlinktest
.L39:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"429656.c"
	.text
	.local	prefix
	.comm	prefix,4,4
	.local	prefixlen
	.comm	prefixlen,4,4
	.local	buf
	.comm	buf,1024,4
	.local	pwd
	.comm	pwd,1024,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	makepath, %function
makepath:
	@ 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]
	ldr	r3, .L4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L4+4
	bl	strcpy
	ldr	r3, .L4
	ldr	r2, [r3]
	ldr	r3, .L4+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L2
	ldr	r0, .L4+4
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L4+4
	add	r3, r2, r3
	ldr	r2, .L4+12
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
.L2:
	ldr	r1, [fp, #-8]
	ldr	r0, .L4+4
	bl	strcat
	ldr	r3, .L4+4
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	prefix
	.word	buf
	.word	prefixlen
	.word	.LC0
	.size	makepath, .-makepath
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dochdir, %function
dochdir:
	@ 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	r0, [fp, #-8]
	bl	chdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r2, [fp, #-12]
	ldr	r1, .L9
	mov	r0, #1
	bl	err
.L8:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.size	dochdir, .-dochdir
	.section	.rodata
	.align	2
.LC2:
	.ascii	"open %s\000"
	.align	2
.LC3:
	.ascii	"fchdir %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dofchdir, %function
dofchdir:
	@ 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	r1, #0
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L12
	ldr	r2, [fp, #-20]
	ldr	r1, .L14
	mov	r0, #1
	bl	err
.L12:
	ldr	r0, [fp, #-8]
	bl	fchdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	ldr	r2, [fp, #-20]
	ldr	r1, .L14+4
	mov	r0, #1
	bl	err
.L13:
	ldr	r0, [fp, #-8]
	bl	close
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	.LC3
	.size	dofchdir, .-dofchdir
	.local	thechdir
	.comm	thechdir,4,4
	.section	.rodata
	.align	2
.LC4:
	.ascii	"chdir1\000"
	.align	2
.LC5:
	.ascii	"getcwd1\000"
	.align	2
.LC6:
	.ascii	"strcmp1\000"
	.align	2
.LC7:
	.ascii	"dir\000"
	.align	2
.LC8:
	.ascii	"mkdir2\000"
	.align	2
.LC9:
	.ascii	"chdir2\000"
	.align	2
.LC10:
	.ascii	"getcwd2\000"
	.align	2
.LC11:
	.ascii	"strcmp2\000"
	.align	2
.LC12:
	.ascii	"mkdir3\000"
	.align	2
.LC13:
	.ascii	"chdir3\000"
	.align	2
.LC14:
	.ascii	"getcwd3\000"
	.align	2
.LC15:
	.ascii	"dir/dir\000"
	.align	2
.LC16:
	.ascii	"strcmp3\000"
	.align	2
.LC17:
	.ascii	"chdir4\000"
	.align	2
.LC18:
	.ascii	"..\000"
	.align	2
.LC19:
	.ascii	"getcwd4\000"
	.align	2
.LC20:
	.ascii	"strcmp4\000"
	.align	2
.LC21:
	.ascii	"chdir5\000"
	.align	2
.LC22:
	.ascii	"../../../../../../..\000"
	.align	2
.LC23:
	.ascii	"getcwd5\000"
	.align	2
.LC24:
	.ascii	"strcmp5\000"
	.align	2
.LC25:
	.ascii	"chdir6\000"
	.align	2
.LC26:
	.ascii	"getcwd6\000"
	.align	2
.LC27:
	.ascii	"strcmp6\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	simple, %function
simple:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r2, .L32+4
	ldr	r2, [r2]
	ldr	r1, .L32+8
	mov	r0, r2
	blx	r3
	mov	r1, #1024
	ldr	r0, .L32+12
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r1, .L32+16
	mov	r0, #1
	bl	err
.L17:
	ldr	r3, .L32+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L32+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L18
	ldr	r1, .L32+20
	mov	r0, #1
	bl	errx
.L18:
	ldr	r1, .L32+24
	ldr	r0, .L32+28
	bl	mkdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L19
	ldr	r1, .L32+32
	mov	r0, #1
	bl	err
.L19:
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r1, .L32+36
	ldr	r0, .L32+28
	blx	r3
	mov	r1, #1024
	ldr	r0, .L32+12
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	ldr	r1, .L32+40
	mov	r0, #1
	bl	err
.L20:
	ldr	r0, .L32+28
	bl	makepath
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L32+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
	ldr	r1, .L32+44
	mov	r0, #1
	bl	errx
.L21:
	ldr	r1, .L32+24
	ldr	r0, .L32+28
	bl	mkdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L22
	ldr	r1, .L32+48
	mov	r0, #1
	bl	err
.L22:
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r1, .L32+52
	ldr	r0, .L32+28
	blx	r3
	mov	r1, #1024
	ldr	r0, .L32+12
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L23
	ldr	r1, .L32+56
	mov	r0, #1
	bl	err
.L23:
	ldr	r0, .L32+60
	bl	makepath
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L32+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L24
	ldr	r1, .L32+64
	mov	r0, #1
	bl	errx
.L24:
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r1, .L32+68
	ldr	r0, .L32+72
	blx	r3
	mov	r1, #1024
	ldr	r0, .L32+12
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	ldr	r1, .L32+76
	mov	r0, #1
	bl	err
.L25:
	ldr	r0, .L32+28
	bl	makepath
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L32+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
	ldr	r1, .L32+80
	mov	r0, #1
	bl	errx
.L26:
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r1, .L32+84
	ldr	r0, .L32+88
	blx	r3
	mov	r1, #1024
	ldr	r0, .L32+12
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L27
	ldr	r1, .L32+92
	mov	r0, #1
	bl	err
.L27:
	ldr	r3, .L32+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L32+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L28
	ldr	r1, .L32+96
	mov	r0, #1
	bl	errx
.L28:
	ldr	r3, .L32
	ldr	r3, [r3]
	ldr	r1, .L32+100
	ldr	r0, .L32+104
	blx	r3
	mov	r1, #1024
	ldr	r0, .L32+12
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L29
	ldr	r1, .L32+108
	mov	r0, #1
	bl	err
.L29:
	ldr	r1, .L32+104
	ldr	r0, .L32+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L31
	ldr	r1, .L32+112
	mov	r0, #1
	bl	errx
.L31:
	nop
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	thechdir
	.word	prefix
	.word	.LC4
	.word	pwd
	.word	.LC5
	.word	.LC6
	.word	511
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC0
	.word	.LC26
	.word	.LC27
	.size	simple, .-simple
	.section	.rodata
	.align	2
.LC28:
	.ascii	"adir\000"
	.align	2
.LC29:
	.ascii	"mkdir1\000"
	.align	2
.LC30:
	.ascii	"anotherdir\000"
	.align	2
.LC31:
	.ascii	"anotherdir/lincthesink\000"
	.align	2
.LC32:
	.ascii	"/adir\000"
	.align	2
.LC33:
	.ascii	"symlink\000"
	.align	2
.LC34:
	.ascii	"getcwd\000"
	.align	2
.LC35:
	.ascii	"strcmp\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	symlinktest, %function
symlinktest:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L41
	ldr	r3, [r3]
	ldr	r2, .L41+4
	ldr	r2, [r2]
	ldr	r1, .L41+8
	mov	r0, r2
	blx	r3
	ldr	r1, .L41+12
	ldr	r0, .L41+16
	bl	mkdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L35
	ldr	r1, .L41+20
	mov	r0, #1
	bl	err
.L35:
	ldr	r1, .L41+12
	ldr	r0, .L41+24
	bl	mkdir
	mov	r3, r0
	cmn	r3, #1
	bne	.L36
	ldr	r1, .L41+28
	mov	r0, #1
	bl	err
.L36:
	ldr	r1, .L41+32
	ldr	r0, .L41+36
	bl	symlink
	mov	r3, r0
	cmn	r3, #1
	bne	.L37
	ldr	r1, .L41+40
	mov	r0, #1
	bl	err
.L37:
	ldr	r3, .L41
	ldr	r3, [r3]
	ldr	r1, .L41+44
	ldr	r0, .L41+32
	blx	r3
	mov	r1, #1024
	ldr	r0, .L41+48
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L38
	ldr	r1, .L41+52
	mov	r0, #1
	bl	err
.L38:
	ldr	r0, .L41+16
	bl	makepath
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L41+48
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L40
	ldr	r1, .L41+56
	mov	r0, #1
	bl	errx
.L40:
	nop
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	thechdir
	.word	prefix
	.word	.LC4
	.word	511
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC8
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC9
	.word	pwd
	.word	.LC34
	.word	.LC35
	.size	symlinktest, .-symlinktest
	.section	.rodata
	.align	2
.LC36:
	.ascii	"usage\000"
	.align	2
.LC37:
	.ascii	"chdir\000"
	.align	2
.LC38:
	.ascii	"fchdir\000"
	.align	2
.LC39:
	.ascii	"invalid chdir type\000"
	.align	2
.LC40:
	.ascii	"simple\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, #4
	beq	.L44
	ldr	r1, .L51
	mov	r0, #1
	bl	errx
.L44:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, .L51+4
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	ldr	r2, .L51+8
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L51+12
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L45
	ldr	r3, .L51+16
	ldr	r2, .L51+20
	str	r2, [r3]
	b	.L46
.L45:
	ldr	r3, [fp, #-12]
	add	r3, r3, #12
	ldr	r3, [r3]
	ldr	r1, .L51+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L47
	ldr	r3, .L51+16
	ldr	r2, .L51+28
	str	r2, [r3]
	b	.L46
.L47:
	ldr	r1, .L51+32
	mov	r0, #1
	bl	errx
.L46:
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L51+36
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
	bl	simple
.L48:
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L51+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L49
	bl	symlinktest
.L49:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	.LC36
	.word	prefix
	.word	prefixlen
	.word	.LC37
	.word	thechdir
	.word	dochdir
	.word	.LC38
	.word	dofchdir
	.word	.LC39
	.word	.LC40
	.word	.LC33
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
