	.file	"978902.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"open"
.LC1:
	.string	"getdents64"
.LC2:
	.string	"char dev"
.LC3:
	.string	"???"
.LC4:
	.string	"block dev"
.LC5:
	.string	"symlink"
.LC6:
	.string	"socket"
.LC7:
	.string	"FIFO"
.LC8:
	.string	"directory"
.LC9:
	.string	"regular"
.LC10:
	.string	"(%s) - (%s) %-10s "
	.text
	.globl	listdir
	.type	listdir, @function
listdir:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -128[rbp]
	mov	esi, 65536
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -96[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -96[rbp]
	mov	ecx, 64
	mov	esi, eax
	mov	edi, 217
	mov	eax, 0
	call	syscall@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	cmp	DWORD PTR -92[rbp], 0
	je	.L25
	mov	DWORD PTR -100[rbp], 0
	jmp	.L6
.L21:
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	lea	rdx, -80[rbp]
	add	rax, rdx
	mov	QWORD PTR -88[rbp], rax
	mov	eax, DWORD PTR -100[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, WORD PTR 16[rax]
	movzx	eax, ax
	add	rax, rdx
	lea	rdx, -1[rax]
	lea	rax, -80[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -101[rbp], al
	cmp	BYTE PTR -101[rbp], 8
	je	.L7
	cmp	BYTE PTR -101[rbp], 4
	je	.L8
	cmp	BYTE PTR -101[rbp], 1
	je	.L9
	cmp	BYTE PTR -101[rbp], 12
	je	.L10
	cmp	BYTE PTR -101[rbp], 10
	je	.L11
	cmp	BYTE PTR -101[rbp], 6
	je	.L12
	cmp	BYTE PTR -101[rbp], 2
	jne	.L13
	lea	rax, .LC2[rip]
	jmp	.L20
.L13:
	lea	rax, .LC3[rip]
	jmp	.L20
.L12:
	lea	rax, .LC4[rip]
	jmp	.L20
.L11:
	lea	rax, .LC5[rip]
	jmp	.L20
.L10:
	lea	rax, .LC6[rip]
	jmp	.L20
.L9:
	lea	rax, .LC7[rip]
	jmp	.L20
.L8:
	lea	rax, .LC8[rip]
	jmp	.L20
.L7:
	lea	rax, .LC9[rip]
.L20:
	mov	rdx, QWORD PTR -128[rbp]
	mov	rsi, QWORD PTR -120[rbp]
	mov	rcx, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -88[rbp]
	add	rax, 19
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, WORD PTR 16[rax]
	movzx	eax, ax
	add	DWORD PTR -100[rbp], eax
.L6:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -92[rbp]
	jl	.L21
	jmp	.L2
.L25:
	nop
	mov	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	listdir, .-listdir
	.section	.rodata
.LC11:
	.string	"mkdir(%s, 0x%x) => "
.LC12:
	.string	"r = %d, errno = %d\n"
.LC13:
	.string	"dfd = %d, for %s, errno = %d\n"
.LC14:
	.string	"ok"
	.text
	.globl	_mkdir
	.type	_mkdir, @function
_mkdir:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	mkdir@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	je	.L27
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L27:
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 65536
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L28
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -8[rbp], 0
	jne	.L30
	mov	edi, 1
	call	exit@PLT
.L28:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
.L30:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	_mkdir, .-_mkdir
	.section	.rodata
.LC15:
	.string	"mkdirat(%d, %s, 0x%x) => "
	.align 8
.LC16:
	.string	"ERROR - mkdirat() succeeded but errno %d expected\n"
	.align 8
.LC17:
	.string	"ERROR - mkdirat() errno %d, expecting %d\n"
	.text
	.globl	_mkdirat
	.type	_mkdirat, @function
_mkdirat:
.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, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	ecx, DWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	mkdirat@PLT
	mov	DWORD PTR -4[rbp], eax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -4[rbp], 0
	jne	.L32
	cmp	DWORD PTR -36[rbp], 0
	je	.L34
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	je	.L34
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L34:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	_mkdirat, .-_mkdirat
	.section	.rodata
.LC18:
	.string	"chdir(%s) => "
.LC19:
	.string	"ERROR - malloc() failed"
	.align 8
.LC20:
	.string	"ERROR - getcwd() didn't return ERANGE error"
	.align 8
.LC21:
	.string	"ERROR - getcwd() didn't return expected directory"
	.text
	.globl	_chdir
	.type	_chdir, @function
_chdir:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	chdir@PLT
	mov	DWORD PTR -24[rbp], eax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L36
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L36:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L37
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 34
	je	.L38
.L37:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L38:
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L39
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L40
.L39:
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L40:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	_chdir, .-_chdir
	.section	.rodata
.LC22:
	.string	"fchdir(%d) => "
	.text
	.globl	_fchdir
	.type	_fchdir, @function
_fchdir:
.LFB10:
	.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
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	fchdir@PLT
	mov	DWORD PTR -4[rbp], eax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	_fchdir, .-_fchdir
	.section	.rodata
	.align 8
.LC23:
	.string	"      => \"%s\" does not exist.\n"
	.align 8
.LC24:
	.string	"     => \"%s\" is not a directory.\n"
	.text
	.globl	check
	.type	check, @function
check:
.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, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	je	.L43
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L42
.L43:
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 16384
	je	.L42
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L42:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L47
	call	__stack_chk_fail@PLT
.L47:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	check, .-check
	.section	.rodata
	.align 8
.LC25:
	.string	"%s(%d): ERROR opening %s, errno = %d\n"
	.text
	.type	_open, @function
_open:
.LFB12:
	.cfi_startproc
	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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	QWORD PTR -40[rbp], rcx
	mov	DWORD PTR -44[rbp], r8d
	mov	edx, DWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L49
	call	__errno_location@PLT
	mov	esi, DWORD PTR [rax]
	mov	rcx, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -44[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L49:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	_open, .-_open
	.type	_openat, @function
_openat:
.LFB13:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	DWORD PTR -36[rbp], ecx
	mov	QWORD PTR -48[rbp], r8
	mov	DWORD PTR -40[rbp], r9d
	mov	ecx, DWORD PTR -36[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	mov	eax, 0
	call	openat@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L52
	call	__errno_location@PLT
	mov	esi, DWORD PTR [rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	r8d, esi
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
.L52:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	_openat, .-_openat
	.section	.rodata
.LC26:
	.string	"ERROR - can't stat %s\n"
	.align 8
.LC27:
	.string	"ERROR: stat/fstat miscompare(%d,%d)\n"
.LC28:
	.string	"absolution path"
	.align 8
.LC29:
	.string	"ERROR: stat/fstatat (%s)  miscompare(%d,%d)\n"
.LC30:
	.string	"absolution path with AT_FDCWD"
.LC31:
	.string	"relative path with AT_FDCWD"
.LC32:
	.string	"relative path with dfd"
.LC33:
	.string	""
	.align 8
.LC34:
	.string	"AT_EMPTY_PATH path with reldfd"
	.text
	.globl	check2
	.type	check2, @function
check2:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 240
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	QWORD PTR -232[rbp], rdx
	mov	DWORD PTR -216[rbp], ecx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -196[rbp], -1
	mov	DWORD PTR -204[rbp], -1
	mov	DWORD PTR -200[rbp], -1
	mov	rax, QWORD PTR -224[rbp]
	mov	r8d, 188
	lea	rcx, __func__.1[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	_open
	mov	DWORD PTR -192[rbp], eax
	mov	rax, QWORD PTR -224[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	rdi, rax
	call	dirname@PLT
	mov	QWORD PTR -176[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	mov	r8d, 190
	lea	rcx, __func__.1[rip]
	mov	edx, 0
	mov	esi, 65536
	mov	rdi, rax
	call	_open
	mov	DWORD PTR -188[rbp], eax
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	rdi, rax
	call	dirname@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	rsi, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -212[rbp]
	mov	r9d, 193
	lea	r8, __func__.1[rip]
	mov	ecx, 0
	mov	edx, 65536
	mov	edi, eax
	call	_openat
	mov	DWORD PTR -184[rbp], eax
	mov	rax, QWORD PTR -232[rbp]
	mov	r9d, 194
	lea	r8, __func__.1[rip]
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	mov	edi, -100
	call	_openat
	mov	DWORD PTR -180[rbp], eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jne	.L55
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -196[rbp], eax
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -192[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	test	eax, eax
	jne	.L57
	jmp	.L70
.L55:
	mov	rax, QWORD PTR -224[rbp]
	mov	rsi, rax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L70:
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -204[rbp], eax
.L57:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -204[rbp]
	je	.L58
	mov	edx, DWORD PTR -204[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	esi, eax
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	printf@PLT
.L58:
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	ecx, 0
	mov	rsi, rax
	mov	edi, 200
	call	fstatat@PLT
	test	eax, eax
	jne	.L59
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -200[rbp], eax
.L59:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -200[rbp]
	je	.L60
	mov	edx, DWORD PTR -200[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC28[rip]
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
.L60:
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -224[rbp]
	mov	ecx, 0
	mov	rsi, rax
	mov	edi, -100
	call	fstatat@PLT
	test	eax, eax
	jne	.L61
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -200[rbp], eax
.L61:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -200[rbp]
	je	.L62
	mov	edx, DWORD PTR -200[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC30[rip]
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
.L62:
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -232[rbp]
	mov	ecx, 0
	mov	rsi, rax
	mov	edi, -100
	call	fstatat@PLT
	test	eax, eax
	jne	.L63
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -200[rbp], eax
.L63:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -200[rbp]
	je	.L64
	mov	edx, DWORD PTR -200[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC31[rip]
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
.L64:
	lea	rdx, -160[rbp]
	mov	rsi, QWORD PTR -232[rbp]
	mov	eax, DWORD PTR -212[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	fstatat@PLT
	test	eax, eax
	jne	.L65
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -200[rbp], eax
.L65:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -200[rbp]
	je	.L66
	mov	edx, DWORD PTR -200[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC32[rip]
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
.L66:
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	ecx, 4096
	lea	rsi, .LC33[rip]
	mov	edi, eax
	call	fstatat@PLT
	test	eax, eax
	jne	.L67
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -200[rbp], eax
.L67:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -200[rbp]
	je	.L68
	mov	edx, DWORD PTR -200[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	ecx, edx
	mov	edx, eax
	lea	rsi, .LC34[rip]
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
.L68:
	mov	eax, DWORD PTR -180[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -184[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -188[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L69
	call	__stack_chk_fail@PLT
.L69:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	check2, .-check2
	.section	.rodata
.LC35:
	.string	"creat(%s, 0x%x) => "
.LC36:
	.string	"fd %d\n"
.LC37:
	.string	"test failed"
	.text
	.globl	_creat
	.type	_creat, @function
_creat:
.LFB15:
	.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	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC35[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	creat@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L72
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdi, rax
	call	puts@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -32[rbp], eax
	je	.L76
	jmp	.L74
.L72:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC36[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	DWORD PTR -32[rbp], 0
	je	.L76
	nop
.L74:
	lea	rdi, .LC37[rip]
	call	puts@PLT
	jmp	.L71
.L76:
	nop
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	_creat, .-_creat
	.section	.rodata
	.align 8
.LC38:
	.string	"ERROR - cwd \"%s\" doesn't match expected \"%s\"\n"
.LC39:
	.string	"/tmp/mkdir_test/test"
.LC40:
	.string	"/tmp/mkdir_test/test_slash/"
	.align 8
.LC41:
	.string	"/tmp/mkdir_test/blurb/test/deep"
.LC42:
	.string	"/tmp/mkdir_test/test/subdir"
.LC43:
	.string	"/tmp/mkdir_test/test/subdira"
.LC44:
	.string	"/tmp/mkdir_test/"
.LC45:
	.string	"subdir2"
.LC46:
	.string	"/tmp/mkdir_test/test/subdir2"
.LC47:
	.string	"subdir2/subdir2a"
	.align 8
.LC48:
	.string	"/tmp/mkdir_test/test/subdir2/subdir2a"
.LC49:
	.string	"/tmp/mkdir_test/test1"
.LC50:
	.string	"/tmp/mkdir_test/test/test1"
.LC51:
	.string	"/tmp/mkdir_test/test2"
.LC52:
	.string	"/tmp/mkdir_test/bogus"
	.align 8
.LC53:
	.string	"ERROR - chdir on invalid path didn't return ENOENT error"
.LC54:
	.string	"/tmp/mkdir_test/zip"
.LC55:
	.string	"zipa"
.LC56:
	.string	"/tmp/mkdir_test"
.LC57:
	.string	"root_newfile"
.LC58:
	.string	"."
.LC59:
	.string	"/tmp/mkdir_test/root_newfile"
.LC60:
	.string	"testdir_from_chdir"
.LC61:
	.string	"test_newfile"
.LC62:
	.string	"test_newfile2"
.LC63:
	.string	"test_newfile3"
	.align 8
.LC64:
	.string	"/tmp/mkdir_test/test/subdir/test_newfile"
.LC65:
	.string	"subdir/test_newfile"
.LC66:
	.string	"test"
	.text
	.globl	main
	.type	main, @function
main:
.LFB16:
	.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, 64
	mov	DWORD PTR -4148[rbp], edi
	mov	QWORD PTR -4160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rax, -4133[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	jne	.L78
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 34
	je	.L79
.L78:
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L79:
	cmp	DWORD PTR -4148[rbp], 1
	jle	.L80
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	getcwd@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	je	.L81
	mov	rax, QWORD PTR -4160[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L80
.L81:
	mov	rax, QWORD PTR -4160[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -4120[rbp]
	mov	rsi, rax
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L80:
	mov	esi, 448
	lea	rdi, .LC39[rip]
	call	_mkdir
	lea	rdi, .LC39[rip]
	call	check
	mov	esi, 448
	lea	rdi, .LC40[rip]
	call	_mkdir
	mov	esi, 448
	lea	rdi, .LC41[rip]
	call	_mkdir
	mov	esi, 448
	lea	rdi, .LC42[rip]
	call	_mkdir
	lea	rdi, .LC42[rip]
	call	check
	mov	esi, 448
	lea	rdi, .LC43[rip]
	call	_mkdir
	lea	rdi, .LC43[rip]
	call	check
	mov	r8d, 306
	lea	rcx, __func__.0[rip]
	mov	edx, 0
	mov	esi, 65536
	lea	rdi, .LC39[rip]
	call	_open
	mov	DWORD PTR -4132[rbp], eax
	lea	rsi, .LC44[rip]
	lea	rdi, .LC44[rip]
	call	listdir
	lea	rsi, .LC39[rip]
	lea	rdi, .LC39[rip]
	call	listdir
	mov	eax, DWORD PTR -4132[rbp]
	mov	ecx, 0
	mov	edx, 448
	lea	rsi, .LC45[rip]
	mov	edi, eax
	call	_mkdirat
	lea	rdi, .LC46[rip]
	call	check
	lea	rsi, .LC44[rip]
	lea	rdi, .LC44[rip]
	call	listdir
	lea	rsi, .LC39[rip]
	lea	rdi, .LC39[rip]
	call	listdir
	mov	eax, DWORD PTR -4132[rbp]
	mov	ecx, 0
	mov	edx, 448
	lea	rsi, .LC47[rip]
	mov	edi, eax
	call	_mkdirat
	lea	rdi, .LC48[rip]
	call	check
	lea	rsi, .LC44[rip]
	lea	rdi, .LC44[rip]
	call	listdir
	lea	rsi, .LC39[rip]
	lea	rdi, .LC39[rip]
	call	listdir
	lea	rsi, .LC46[rip]
	lea	rdi, .LC46[rip]
	call	listdir
	mov	eax, DWORD PTR -4132[rbp]
	mov	ecx, 0
	mov	edx, 448
	lea	rsi, .LC49[rip]
	mov	edi, eax
	call	_mkdirat
	lea	rdi, .LC50[rip]
	call	check
	lea	rsi, .LC44[rip]
	lea	rdi, .LC44[rip]
	call	listdir
	lea	rsi, .LC39[rip]
	lea	rdi, .LC39[rip]
	call	listdir
	mov	ecx, 0
	mov	edx, 448
	lea	rsi, .LC51[rip]
	mov	edi, -100
	call	_mkdirat
	lea	rdi, .LC51[rip]
	call	check
	lea	rsi, .LC44[rip]
	lea	rdi, .LC44[rip]
	call	listdir
	lea	rsi, .LC39[rip]
	lea	rdi, .LC39[rip]
	call	listdir
	lea	rdi, .LC52[rip]
	call	chdir@PLT
	mov	DWORD PTR -4128[rbp], eax
	cmp	DWORD PTR -4128[rbp], -1
	jne	.L83
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	je	.L84
.L83:
	lea	rdi, .LC53[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L84:
	mov	edx, 420
	mov	esi, 65
	lea	rdi, .LC54[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4128[rbp], eax
	mov	eax, DWORD PTR -4128[rbp]
	mov	ecx, 20
	mov	edx, 448
	lea	rsi, .LC55[rip]
	mov	edi, eax
	call	_mkdirat
	mov	eax, DWORD PTR -4128[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rsi, .LC44[rip]
	lea	rdi, .LC44[rip]
	call	listdir
	lea	rsi, .LC39[rip]
	lea	rdi, .LC39[rip]
	call	listdir
	lea	rdi, .LC56[rip]
	call	_chdir
	mov	edx, 0
	mov	esi, 448
	lea	rdi, .LC57[rip]
	call	_creat
	lea	rsi, .LC58[rip]
	lea	rdi, .LC44[rip]
	call	listdir
	mov	ecx, 0
	lea	rdx, .LC57[rip]
	lea	rsi, .LC59[rip]
	mov	edi, -100
	call	check2
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	r8d, 347
	lea	rcx, __func__.0[rip]
	mov	edx, 0
	mov	esi, 65536
	lea	rdi, .LC42[rip]
	call	_open
	mov	DWORD PTR -4132[rbp], eax
	lea	rdi, .LC42[rip]
	call	_chdir
	mov	esi, 448
	lea	rdi, .LC60[rip]
	call	_mkdir
	lea	rdi, .LC60[rip]
	call	check
	mov	edx, 0
	mov	esi, 448
	lea	rdi, .LC61[rip]
	call	_creat
	mov	r9d, 351
	lea	r8, __func__.0[rip]
	mov	ecx, 432
	mov	edx, 64
	lea	rsi, .LC62[rip]
	mov	edi, -100
	call	_openat
	mov	DWORD PTR -4124[rbp], eax
	mov	eax, DWORD PTR -4124[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	r9d, 353
	lea	r8, __func__.0[rip]
	mov	ecx, 432
	mov	edx, 64
	lea	rsi, .LC63[rip]
	mov	edi, eax
	call	_openat
	mov	DWORD PTR -4124[rbp], eax
	mov	eax, DWORD PTR -4124[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	r9d, 355
	lea	r8, __func__.0[rip]
	mov	ecx, 432
	mov	edx, 0
	lea	rsi, .LC63[rip]
	mov	edi, eax
	call	_openat
	mov	DWORD PTR -4124[rbp], eax
	mov	eax, DWORD PTR -4124[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC42[rip]
	call	_chdir
	lea	rsi, .LC58[rip]
	lea	rdi, .LC42[rip]
	call	listdir
	mov	ecx, 0
	lea	rdx, .LC61[rip]
	lea	rsi, .LC64[rip]
	mov	edi, -100
	call	check2
	lea	rdi, .LC39[rip]
	call	_chdir
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	mov	r8d, 364
	lea	rcx, __func__.0[rip]
	mov	edx, 0
	mov	esi, 65536
	lea	rdi, .LC39[rip]
	call	_open
	mov	DWORD PTR -4132[rbp], eax
	mov	eax, DWORD PTR -4132[rbp]
	mov	ecx, 0
	lea	rdx, .LC65[rip]
	lea	rsi, .LC64[rip]
	mov	edi, eax
	call	check2
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	_fchdir
	mov	eax, DWORD PTR -4132[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rsi, .LC58[rip]
	lea	rdi, .LC66[rip]
	call	listdir
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE16:
	.size	main, .-main
	.section	.rodata
	.type	__func__.1, @object
	.size	__func__.1, 7
__func__.1:
	.string	"check2"
	.type	__func__.0, @object
	.size	__func__.0, 5
__func__.0:
	.string	"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	"978902.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"open\000"
	.align	2
.LC1:
	.ascii	"getdents64\000"
	.align	2
.LC2:
	.ascii	"char dev\000"
	.align	2
.LC3:
	.ascii	"???\000"
	.align	2
.LC4:
	.ascii	"block dev\000"
	.align	2
.LC5:
	.ascii	"symlink\000"
	.align	2
.LC6:
	.ascii	"socket\000"
	.align	2
.LC7:
	.ascii	"FIFO\000"
	.align	2
.LC8:
	.ascii	"directory\000"
	.align	2
.LC9:
	.ascii	"regular\000"
	.align	2
.LC10:
	.ascii	"(%s) - (%s) %-10s \000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	listdir
	.syntax unified
	.arm
	.fpu softvfp
	.type	listdir, %function
listdir:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #16384
	ldr	r0, [fp, #-100]
	bl	open
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L26+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r2, fp, #72
	mov	r3, #64
	ldr	r1, [fp, #-84]
	mov	r0, #217
	bl	syscall
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L26+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	beq	.L25
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L6
.L21:
	ldr	r3, [fp, #-88]
	sub	r2, fp, #72
	add	r3, r2, r3
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-76]
	ldrh	r3, [r3, #8]
	mov	r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r2, r3
	sub	r3, r3, #1
	sub	r2, fp, #72
	add	r3, r2, r3
	ldrb	r3, [r3]
	strb	r3, [fp, #-89]
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #8
	beq	.L7
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #4
	beq	.L8
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #1
	beq	.L9
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #12
	beq	.L10
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L11
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #6
	beq	.L12
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #2
	bne	.L13
	ldr	r3, .L26+12
	b	.L20
.L13:
	ldr	r3, .L26+16
	b	.L20
.L12:
	ldr	r3, .L26+20
	b	.L20
.L11:
	ldr	r3, .L26+24
	b	.L20
.L10:
	ldr	r3, .L26+28
	b	.L20
.L9:
	ldr	r3, .L26+32
	b	.L20
.L8:
	ldr	r3, .L26+36
	b	.L20
.L7:
	ldr	r3, .L26+40
.L20:
	ldr	r2, [fp, #-100]
	ldr	r1, [fp, #-96]
	ldr	r0, .L26+44
	bl	printf
	ldr	r3, [fp, #-76]
	add	r3, r3, #11
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-76]
	ldrh	r3, [r3, #8]
	mov	r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r3, r2
	str	r3, [fp, #-88]
.L6:
	ldr	r2, [fp, #-88]
	ldr	r3, [fp, #-80]
	cmp	r2, r3
	blt	.L21
	b	.L2
.L25:
	nop
	ldr	r0, [fp, #-84]
	bl	close
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	listdir, .-listdir
	.section	.rodata
	.align	2
.LC12:
	.ascii	"mkdir(%s, 0x%x) => \000"
	.align	2
.LC13:
	.ascii	"r = %d, errno = %d\012\000"
	.align	2
.LC14:
	.ascii	"dfd = %d, for %s, errno = %d\012\000"
	.align	2
.LC15:
	.ascii	"ok\000"
	.text
	.align	2
	.global	_mkdir
	.syntax unified
	.arm
	.fpu softvfp
	.type	_mkdir, %function
_mkdir:
	@ 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]
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L33
	bl	printf
	ldr	r3, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	mkdir
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, .L33+4
	bl	printf
.L29:
	mov	r1, #16384
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L30
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+8
	bl	printf
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L32
	mov	r0, #1
	bl	exit
.L30:
	ldr	r0, [fp, #-8]
	bl	close
	ldr	r0, .L33+12
	bl	puts
.L32:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	_mkdir, .-_mkdir
	.section	.rodata
	.align	2
.LC16:
	.ascii	"mkdirat(%d, %s, 0x%x) => \000"
	.align	2
.LC17:
	.ascii	"ERROR - mkdirat() succeeded but errno %d expected\012"
	.ascii	"\000"
	.align	2
.LC18:
	.ascii	"ERROR - mkdirat() errno %d, expecting %d\012\000"
	.text
	.align	2
	.global	_mkdirat
	.syntax unified
	.arm
	.fpu softvfp
	.type	_mkdirat, %function
_mkdirat:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L39
	bl	printf
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	mkdirat
	str	r0, [fp, #-8]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L39+4
	bl	printf
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L36
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L38
	ldr	r1, [fp, #-28]
	ldr	r0, .L39+8
	bl	printf
	mov	r0, #1
	bl	exit
.L36:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	beq	.L38
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, .L39+12
	bl	printf
	mov	r0, #1
	bl	exit
.L38:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC16
	.word	.LC13
	.word	.LC17
	.word	.LC18
	.size	_mkdirat, .-_mkdirat
	.section	.rodata
	.align	2
.LC19:
	.ascii	"chdir(%s) => \000"
	.align	2
.LC20:
	.ascii	"ERROR - malloc() failed\000"
	.align	2
.LC21:
	.ascii	"ERROR - getcwd() didn't return ERANGE error\000"
	.align	2
.LC22:
	.ascii	"ERROR - getcwd() didn't return expected directory\000"
	.text
	.align	2
	.global	_chdir
	.syntax unified
	.arm
	.fpu softvfp
	.type	_chdir, %function
_chdir:
	@ 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]
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, [fp, #-24]
	ldr	r0, .L47
	bl	printf
	ldr	r0, [fp, #-24]
	bl	chdir
	str	r0, [fp, #-20]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, .L47+4
	bl	printf
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L42
	ldr	r0, .L47+8
	bl	puts
	mov	r0, #1
	bl	exit
.L42:
	ldr	r3, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	getcwd
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L43
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #34
	beq	.L44
.L43:
	ldr	r0, .L47+12
	bl	puts
	mov	r0, #1
	bl	exit
.L44:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	getcwd
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L45
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
.L45:
	ldr	r0, .L47+16
	bl	puts
	mov	r0, #1
	bl	exit
.L46:
	ldr	r0, [fp, #-12]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC19
	.word	.LC13
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.size	_chdir, .-_chdir
	.section	.rodata
	.align	2
.LC23:
	.ascii	"fchdir(%d) => \000"
	.text
	.align	2
	.global	_fchdir
	.syntax unified
	.arm
	.fpu softvfp
	.type	_fchdir, %function
_fchdir:
	@ 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]
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r1, [fp, #-16]
	ldr	r0, .L50
	bl	printf
	ldr	r0, [fp, #-16]
	bl	fchdir
	str	r0, [fp, #-8]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-8]
	ldr	r0, .L50+4
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC23
	.word	.LC13
	.size	_fchdir, .-_fchdir
	.section	.rodata
	.align	2
.LC24:
	.ascii	"      => \"%s\" does not exist.\012\000"
	.align	2
.LC25:
	.ascii	"     => \"%s\" is not a directory.\012\000"
	.align	2
.LC26:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	check
	.syntax unified
	.arm
	.fpu softvfp
	.type	check, %function
check:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	stat
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	beq	.L53
	ldr	r1, [fp, #-112]
	ldr	r0, .L58+4
	bl	printf
	b	.L52
.L53:
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #16384
	beq	.L52
	ldr	r1, [fp, #-112]
	ldr	r0, .L58+8
	bl	printf
	nop
.L52:
	ldr	r3, .L58
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC26
	.word	.LC24
	.word	.LC25
	.size	check, .-check
	.section	.rodata
	.align	2
.LC27:
	.ascii	"%s(%d): ERROR opening %s, errno = %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_open, %function
_open:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L61
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #4]
	ldr	r1, [fp, #-28]
	ldr	r0, .L63
	bl	printf
	ldr	r0, .L63+4
	bl	perror
	mov	r0, #1
	bl	exit
.L61:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	.LC27
	.word	.LC0
	.size	_open, .-_open
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_openat, %function
_openat:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	openat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L66
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #8]
	ldr	r1, [fp, #4]
	ldr	r0, .L68
	bl	printf
.L66:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC27
	.size	_openat, .-_openat
	.section	.rodata
	.align	2
.LC28:
	.ascii	"ERROR - can't stat %s\012\000"
	.align	2
.LC29:
	.ascii	"ERROR: stat/fstat miscompare(%d,%d)\012\000"
	.align	2
.LC30:
	.ascii	"absolution path\000"
	.align	2
.LC31:
	.ascii	"ERROR: stat/fstatat (%s)  miscompare(%d,%d)\012\000"
	.align	2
.LC32:
	.ascii	"absolution path with AT_FDCWD\000"
	.align	2
.LC33:
	.ascii	"relative path with AT_FDCWD\000"
	.align	2
.LC34:
	.ascii	"relative path with dfd\000"
	.align	2
.LC35:
	.ascii	"\000"
	.align	2
.LC36:
	.ascii	"AT_EMPTY_PATH path with reldfd\000"
	.align	2
.LC37:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	check2
	.syntax unified
	.arm
	.fpu softvfp
	.type	check2, %function
check2:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	str	r2, [fp, #-152]
	str	r3, [fp, #-156]
	ldr	r3, .L87
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-128]
	mvn	r3, #0
	str	r3, [fp, #-136]
	mvn	r3, #0
	str	r3, [fp, #-132]
	mov	r3, #188
	str	r3, [sp]
	ldr	r3, .L87+4
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-148]
	bl	_open
	str	r0, [fp, #-124]
	ldr	r0, [fp, #-148]
	bl	strdup
	mov	r3, r0
	mov	r0, r3
	bl	dirname
	str	r0, [fp, #-120]
	mov	r3, #190
	str	r3, [sp]
	ldr	r3, .L87+4
	mov	r2, #0
	mov	r1, #16384
	ldr	r0, [fp, #-120]
	bl	_open
	str	r0, [fp, #-116]
	ldr	r0, [fp, #-152]
	bl	strdup
	mov	r3, r0
	mov	r0, r3
	bl	dirname
	str	r0, [fp, #-112]
	mov	r3, #193
	str	r3, [sp, #4]
	ldr	r3, .L87+4
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #16384
	ldr	r1, [fp, #-112]
	ldr	r0, [fp, #-144]
	bl	_openat
	str	r0, [fp, #-108]
	mov	r3, #194
	str	r3, [sp, #4]
	ldr	r3, .L87+4
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	ldr	r1, [fp, #-152]
	mvn	r0, #99
	bl	_openat
	str	r0, [fp, #-104]
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-148]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bne	.L71
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-128]
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-124]
	bl	fstat
	mov	r3, r0
	cmp	r3, #0
	bne	.L73
	b	.L86
.L71:
	ldr	r1, [fp, #-148]
	ldr	r0, .L87+8
	bl	printf
	mov	r0, #1
	bl	exit
.L86:
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-136]
.L73:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-136]
	cmp	r2, r3
	beq	.L74
	ldr	r2, [fp, #-136]
	ldr	r1, [fp, #-128]
	ldr	r0, .L87+12
	bl	printf
.L74:
	sub	r2, fp, #100
	mov	r3, #0
	ldr	r1, [fp, #-148]
	mov	r0, #200
	bl	fstatat
	mov	r3, r0
	cmp	r3, #0
	bne	.L75
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-132]
.L75:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L76
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	ldr	r1, .L87+16
	ldr	r0, .L87+20
	bl	printf
.L76:
	sub	r2, fp, #100
	mov	r3, #0
	ldr	r1, [fp, #-148]
	mvn	r0, #99
	bl	fstatat
	mov	r3, r0
	cmp	r3, #0
	bne	.L77
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-132]
.L77:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L78
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	ldr	r1, .L87+24
	ldr	r0, .L87+20
	bl	printf
.L78:
	sub	r2, fp, #100
	mov	r3, #0
	ldr	r1, [fp, #-152]
	mvn	r0, #99
	bl	fstatat
	mov	r3, r0
	cmp	r3, #0
	bne	.L79
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-132]
.L79:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L80
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	ldr	r1, .L87+28
	ldr	r0, .L87+20
	bl	printf
.L80:
	sub	r2, fp, #100
	mov	r3, #0
	ldr	r1, [fp, #-152]
	ldr	r0, [fp, #-144]
	bl	fstatat
	mov	r3, r0
	cmp	r3, #0
	bne	.L81
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-132]
.L81:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L82
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	ldr	r1, .L87+32
	ldr	r0, .L87+20
	bl	printf
.L82:
	sub	r2, fp, #100
	mov	r3, #4096
	ldr	r1, .L87+36
	ldr	r0, [fp, #-104]
	bl	fstatat
	mov	r3, r0
	cmp	r3, #0
	bne	.L83
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-132]
.L83:
	ldr	r2, [fp, #-128]
	ldr	r3, [fp, #-132]
	cmp	r2, r3
	beq	.L84
	ldr	r3, [fp, #-132]
	ldr	r2, [fp, #-128]
	ldr	r1, .L87+40
	ldr	r0, .L87+20
	bl	printf
.L84:
	ldr	r0, [fp, #-104]
	bl	close
	ldr	r0, [fp, #-108]
	bl	close
	ldr	r0, [fp, #-116]
	bl	close
	ldr	r0, [fp, #-124]
	bl	close
	nop
	ldr	r3, .L87
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L85
	bl	__stack_chk_fail
.L85:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L88:
	.align	2
.L87:
	.word	.LC37
	.word	__func__.6457
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.size	check2, .-check2
	.section	.rodata
	.align	2
.LC38:
	.ascii	"creat(%s, 0x%x) => \000"
	.align	2
.LC39:
	.ascii	"fd %d\012\000"
	.align	2
.LC40:
	.ascii	"test failed\000"
	.text
	.align	2
	.global	_creat
	.syntax unified
	.arm
	.fpu softvfp
	.type	_creat, %function
_creat:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-16]
	ldr	r0, .L95
	bl	printf
	ldr	r3, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	creat
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L90
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r0, r3
	bl	puts
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	beq	.L94
	b	.L92
.L90:
	ldr	r1, [fp, #-8]
	ldr	r0, .L95+4
	bl	printf
	ldr	r0, [fp, #-8]
	bl	close
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L94
	nop
.L92:
	ldr	r0, .L95+8
	bl	puts
	b	.L89
.L94:
	nop
.L89:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L96:
	.align	2
.L95:
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.size	_creat, .-_creat
	.section	.rodata
	.align	2
.LC41:
	.ascii	"ERROR - cwd \"%s\" doesn't match expected \"%s\"\012"
	.ascii	"\000"
	.align	2
.LC42:
	.ascii	"/tmp/mkdir_test/test\000"
	.align	2
.LC43:
	.ascii	"/tmp/mkdir_test/test_slash/\000"
	.align	2
.LC44:
	.ascii	"/tmp/mkdir_test/blurb/test/deep\000"
	.align	2
.LC45:
	.ascii	"/tmp/mkdir_test/test/subdir\000"
	.align	2
.LC46:
	.ascii	"/tmp/mkdir_test/test/subdira\000"
	.align	2
.LC47:
	.ascii	"/tmp/mkdir_test/\000"
	.align	2
.LC48:
	.ascii	"subdir2\000"
	.align	2
.LC49:
	.ascii	"/tmp/mkdir_test/test/subdir2\000"
	.align	2
.LC50:
	.ascii	"subdir2/subdir2a\000"
	.align	2
.LC51:
	.ascii	"/tmp/mkdir_test/test/subdir2/subdir2a\000"
	.align	2
.LC52:
	.ascii	"/tmp/mkdir_test/test1\000"
	.align	2
.LC53:
	.ascii	"/tmp/mkdir_test/test/test1\000"
	.align	2
.LC54:
	.ascii	"/tmp/mkdir_test/test2\000"
	.align	2
.LC55:
	.ascii	"/tmp/mkdir_test/bogus\000"
	.align	2
.LC56:
	.ascii	"ERROR - chdir on invalid path didn't return ENOENT "
	.ascii	"error\000"
	.align	2
.LC57:
	.ascii	"/tmp/mkdir_test/zip\000"
	.align	2
.LC58:
	.ascii	"zipa\000"
	.align	2
.LC59:
	.ascii	"/tmp/mkdir_test\000"
	.align	2
.LC60:
	.ascii	"root_newfile\000"
	.align	2
.LC61:
	.ascii	".\000"
	.align	2
.LC62:
	.ascii	"/tmp/mkdir_test/root_newfile\000"
	.align	2
.LC63:
	.ascii	"testdir_from_chdir\000"
	.align	2
.LC64:
	.ascii	"test_newfile\000"
	.align	2
.LC65:
	.ascii	"test_newfile2\000"
	.align	2
.LC66:
	.ascii	"test_newfile3\000"
	.align	2
.LC67:
	.ascii	"/tmp/mkdir_test/test/subdir/test_newfile\000"
	.align	2
.LC68:
	.ascii	"subdir/test_newfile\000"
	.align	2
.LC69:
	.ascii	"test\000"
	.align	2
.LC70:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #44
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L106
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L106+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #21
	mov	r1, #1
	mov	r0, r3
	bl	getcwd
	str	r0, [r4, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L98
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #34
	beq	.L99
.L98:
	ldr	r0, .L106+8
	bl	puts
	mov	r0, #1
	bl	exit
.L99:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #1
	ble	.L100
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #4096
	mov	r0, r3
	bl	getcwd
	str	r0, [r4, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	beq	.L101
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L100
.L101:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	mov	r2, r3
	ldr	r1, [r1, #-20]
	ldr	r0, .L106+12
	bl	printf
	mov	r0, #1
	bl	exit
.L100:
	mov	r1, #448
	ldr	r0, .L106+16
	bl	_mkdir
	ldr	r0, .L106+16
	bl	check
	mov	r1, #448
	ldr	r0, .L106+20
	bl	_mkdir
	mov	r1, #448
	ldr	r0, .L106+24
	bl	_mkdir
	mov	r1, #448
	ldr	r0, .L106+28
	bl	_mkdir
	ldr	r0, .L106+28
	bl	check
	mov	r1, #448
	ldr	r0, .L106+32
	bl	_mkdir
	ldr	r0, .L106+32
	bl	check
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r3, .L106+36
	str	r3, [sp]
	ldr	r3, .L106+40
	mov	r2, #0
	mov	r1, #16384
	ldr	r0, .L106+16
	bl	_open
	str	r0, [r4, #-16]
	ldr	r1, .L106+44
	ldr	r0, .L106+44
	bl	listdir
	ldr	r1, .L106+16
	ldr	r0, .L106+16
	bl	listdir
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #448
	ldr	r1, .L106+48
	ldr	r0, [r0, #-16]
	bl	_mkdirat
	ldr	r0, .L106+52
	bl	check
	ldr	r1, .L106+44
	ldr	r0, .L106+44
	bl	listdir
	ldr	r1, .L106+16
	ldr	r0, .L106+16
	bl	listdir
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #448
	ldr	r1, .L106+56
	ldr	r0, [r0, #-16]
	bl	_mkdirat
	ldr	r0, .L106+60
	bl	check
	ldr	r1, .L106+44
	ldr	r0, .L106+44
	bl	listdir
	ldr	r1, .L106+16
	ldr	r0, .L106+16
	bl	listdir
	ldr	r1, .L106+52
	ldr	r0, .L106+52
	bl	listdir
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	mov	r2, #448
	ldr	r1, .L106+64
	ldr	r0, [r0, #-16]
	bl	_mkdirat
	ldr	r0, .L106+68
	bl	check
	ldr	r1, .L106+44
	ldr	r0, .L106+44
	bl	listdir
	ldr	r1, .L106+16
	ldr	r0, .L106+16
	bl	listdir
	mov	r3, #0
	mov	r2, #448
	ldr	r1, .L106+72
	mvn	r0, #99
	bl	_mkdirat
	ldr	r0, .L106+72
	bl	check
	ldr	r1, .L106+44
	ldr	r0, .L106+44
	bl	listdir
	ldr	r1, .L106+16
	ldr	r0, .L106+16
	bl	listdir
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r0, .L106+76
	bl	chdir
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmn	r3, #1
	bne	.L103
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L104
.L103:
	ldr	r0, .L106+80
	bl	puts
	mov	r0, #1
	bl	exit
.L104:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	mov	r2, #420
	mov	r1, #65
	ldr	r0, .L106+84
	bl	open
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #20
	mov	r2, #448
	ldr	r1, .L106+88
	ldr	r0, [r0, #-12]
	bl	_mkdirat
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	ldr	r1, .L106+44
	ldr	r0, .L106+44
	bl	listdir
	ldr	r1, .L106+16
	ldr	r0, .L106+16
	bl	listdir
	ldr	r0, .L106+92
	bl	_chdir
	mov	r2, #0
	mov	r1, #448
	ldr	r0, .L106+96
	bl	_creat
	ldr	r1, .L106+100
	ldr	r0, .L106+44
	bl	listdir
	mov	r3, #0
	ldr	r2, .L106+96
	ldr	r1, .L106+104
	mvn	r0, #99
	bl	check2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r3, .L106+108
	str	r3, [sp]
	ldr	r3, .L106+40
	mov	r2, #0
	mov	r1, #16384
	ldr	r0, .L106+28
	bl	_open
	str	r0, [r4, #-16]
	ldr	r0, .L106+28
	bl	_chdir
	mov	r1, #448
	ldr	r0, .L106+112
	bl	_mkdir
	ldr	r0, .L106+112
	bl	check
	mov	r2, #0
	mov	r1, #448
	ldr	r0, .L106+116
	bl	_creat
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r3, .L106+120
	str	r3, [sp, #4]
	ldr	r3, .L106+40
	str	r3, [sp]
	mov	r3, #432
	mov	r2, #64
	ldr	r1, .L106+124
	mvn	r0, #99
	bl	_openat
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-8]
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	ldr	r3, .L106+128
	str	r3, [sp, #4]
	ldr	r3, .L106+40
	str	r3, [sp]
	mov	r3, #432
	mov	r2, #64
	ldr	r1, .L106+132
	ldr	r0, [r0, #-16]
	bl	_openat
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-8]
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	ldr	r3, .L106+136
	str	r3, [sp, #4]
	ldr	r3, .L106+40
	str	r3, [sp]
	mov	r3, #432
	mov	r2, #0
	ldr	r1, .L106+132
	ldr	r0, [r0, #-16]
	bl	_openat
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-8]
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	close
	ldr	r0, .L106+28
	bl	_chdir
	ldr	r1, .L106+100
	ldr	r0, .L106+28
	bl	listdir
	mov	r3, #0
	ldr	r2, .L106+116
	ldr	r1, .L106+140
	mvn	r0, #99
	bl	check2
	ldr	r0, .L106+16
	bl	_chdir
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	mov	r3, #364
	str	r3, [sp]
	ldr	r3, .L106+40
	mov	r2, #0
	mov	r1, #16384
	ldr	r0, .L106+16
	bl	_open
	str	r0, [r4, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	ldr	r2, .L106+144
	ldr	r1, .L106+140
	ldr	r0, [r0, #-16]
	bl	check2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	_fchdir
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	close
	ldr	r1, .L106+100
	ldr	r0, .L106+148
	bl	listdir
	mov	r0, #0
	bl	exit
.L107:
	.align	2
.L106:
	.word	.LC70
	.word	stdout
	.word	.LC21
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.word	.LC45
	.word	.LC46
	.word	306
	.word	__func__.6478
	.word	.LC47
	.word	.LC48
	.word	.LC49
	.word	.LC50
	.word	.LC51
	.word	.LC52
	.word	.LC53
	.word	.LC54
	.word	.LC55
	.word	.LC56
	.word	.LC57
	.word	.LC58
	.word	.LC59
	.word	.LC60
	.word	.LC61
	.word	.LC62
	.word	347
	.word	.LC63
	.word	.LC64
	.word	351
	.word	.LC65
	.word	353
	.word	.LC66
	.word	355
	.word	.LC67
	.word	.LC68
	.word	.LC69
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__func__.6457, %object
	.size	__func__.6457, 7
__func__.6457:
	.ascii	"check2\000"
	.align	2
	.type	__func__.6478, %object
	.size	__func__.6478, 5
__func__.6478:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
