	.file	"22011553.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"failed to getcwd"
	.align 8
.LC1:
	.string	"incorrect cwd \"%s\". expect \"%s\".\n"
.LC2:
	.string	"failed to mkdir \"%s\""
.LC3:
	.string	"failed to chdir to \"%s\""
.LC4:
	.string	"failed to rmdir \"%s\""
	.align 8
.LC5:
	.string	"stat on \"%s\" should return ENOENT"
	.align 8
.LC6:
	.string	"getcwd, mkdir, rmdir, chdir test successful"
	.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, 256
	mov	DWORD PTR -244[rbp], edi
	mov	QWORD PTR -256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -228[rbp], 20
	mov	eax, DWORD PTR -228[rbp]
	movsx	rdx, eax
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR -216[rbp], rax
	lea	rax, -48[rbp]
	cmp	QWORD PTR -216[rbp], rax
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L12
.L2:
	mov	WORD PTR -50[rbp], 47
	lea	rdx, -50[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L4
	lea	rdx, -50[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L4:
	movabs	rax, 7310520272261444143
	mov	QWORD PTR -38[rbp], rax
	mov	DWORD PTR -30[rbp], 1683977331
	mov	WORD PTR -26[rbp], 29289
	mov	BYTE PTR -24[rbp], 0
	mov	QWORD PTR -23[rbp], rax
	mov	DWORD PTR -15[rbp], 1683977331
	mov	WORD PTR -11[rbp], 29289
	mov	BYTE PTR -9[rbp], 0
	mov	DWORD PTR -224[rbp], 436
	mov	edx, DWORD PTR -224[rbp]
	lea	rax, -38[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	mkdir@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L5
	lea	rax, -38[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -220[rbp]
	jmp	.L12
.L5:
	lea	rax, -38[rbp]
	mov	rdi, rax
	call	chdir@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L6
	lea	rax, -38[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -220[rbp]
	jmp	.L12
.L6:
	mov	eax, DWORD PTR -228[rbp]
	movsx	rdx, eax
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR -216[rbp], rax
	lea	rax, -48[rbp]
	cmp	QWORD PTR -216[rbp], rax
	je	.L7
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L12
.L7:
	lea	rdx, -23[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L8
	lea	rdx, -23[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L8:
	lea	rax, -23[rbp]
	mov	rdi, rax
	call	rmdir@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L9
	lea	rax, -23[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -220[rbp]
	jmp	.L12
.L9:
	lea	rdx, -208[rbp]
	lea	rax, -23[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	DWORD PTR -220[rbp], eax
	cmp	DWORD PTR -220[rbp], 0
	jns	.L10
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	je	.L11
.L10:
	lea	rax, -23[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -220[rbp]
	jmp	.L12
.L11:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"22011553.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"failed to getcwd\000"
	.align	2
.LC1:
	.ascii	"incorrect cwd \"%s\". expect \"%s\".\012\000"
	.align	2
.LC3:
	.ascii	"failed to mkdir \"%s\"\000"
	.align	2
.LC4:
	.ascii	"failed to chdir to \"%s\"\000"
	.align	2
.LC5:
	.ascii	"failed to rmdir \"%s\"\000"
	.align	2
.LC6:
	.ascii	"stat on \"%s\" should return ENOENT\000"
	.align	2
.LC7:
	.ascii	"getcwd, mkdir, rmdir, chdir test successful\000"
	.align	2
.LC2:
	.ascii	"/root/test_dir\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 = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	str	r0, [fp, #-168]
	str	r1, [fp, #-172]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #20
	str	r3, [fp, #-164]
	ldr	r2, [fp, #-164]
	sub	r3, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	getcwd
	str	r0, [fp, #-160]
	sub	r3, fp, #52
	ldr	r2, [fp, #-160]
	cmp	r2, r3
	beq	.L2
	ldr	r0, .L14+4
	bl	puts
	mvn	r3, #0
	b	.L12
.L2:
	mov	r3, #47
	strh	r3, [fp, #-56]	@ movhi
	sub	r2, fp, #56
	sub	r3, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	sub	r2, fp, #56
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, .L14+8
	bl	printf
	mvn	r3, #0
	b	.L12
.L4:
	ldr	r3, .L14+12
	sub	ip, fp, #40
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r3, #16
	strb	r3, [ip]
	ldr	r3, .L14+12
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r3, #16
	strb	r3, [ip]
	mov	r3, #436
	str	r3, [fp, #-156]
	ldr	r2, [fp, #-156]
	sub	r3, fp, #40
	mov	r1, r2
	mov	r0, r3
	bl	mkdir
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bge	.L5
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L14+16
	bl	printf
	ldr	r3, [fp, #-152]
	b	.L12
.L5:
	sub	r3, fp, #40
	mov	r0, r3
	bl	chdir
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bge	.L6
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L14+20
	bl	printf
	ldr	r3, [fp, #-152]
	b	.L12
.L6:
	ldr	r2, [fp, #-164]
	sub	r3, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	getcwd
	str	r0, [fp, #-160]
	sub	r3, fp, #52
	ldr	r2, [fp, #-160]
	cmp	r2, r3
	beq	.L7
	ldr	r0, .L14+4
	bl	puts
	mvn	r3, #0
	b	.L12
.L7:
	sub	r2, fp, #24
	sub	r3, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	sub	r2, fp, #24
	sub	r3, fp, #52
	mov	r1, r3
	ldr	r0, .L14+8
	bl	printf
	mvn	r3, #0
	b	.L12
.L8:
	sub	r3, fp, #24
	mov	r0, r3
	bl	rmdir
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bge	.L9
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L14+24
	bl	printf
	ldr	r3, [fp, #-152]
	b	.L12
.L9:
	sub	r2, fp, #148
	sub	r3, fp, #24
	mov	r1, r2
	mov	r0, r3
	bl	stat
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bge	.L10
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L11
.L10:
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L14+28
	bl	printf
	ldr	r3, [fp, #-152]
	b	.L12
.L11:
	ldr	r0, .L14+32
	bl	puts
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC8
	.word	.LC0
	.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
