// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/files/directory.cpp
// Function: smooth::Directory::Create()
S::Int S::Directory::Create()
{
	if (Exists()) return Success();

	Bool	 result	   = False;
	String	 directory = *this;

	for (Int i = 1; i <= directory.Length(); i++)
	{
		if (directory[i] == '\\' || directory[i] == '/' || directory[i] == 0)
		{
			String	 path = directory.Head(i);

#ifdef __WIN32__
			result = CreateDirectory(MakeExtendedPath(path), NIL);
#else
			if (mkdir(path.ConvertTo("UTF-8"), 0777) == 0) result = True;
			else					       result = False;
#endif
		}
	}

	if (result == False) return Error();
	else		     return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x59570
testb $0x1, %al
jne 0x651e5
jmp 0x6523a
leaq -0x20(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x5ca80
movq -0xa8(%rbp), %rdi
callq 0x59680
movl %eax, -0x9c(%rbp)
jmp 0x65209
movl -0x9c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5a410
jmp 0x65445
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5a410
jmp 0x65451
movq -0x98(%rbp), %rsi
movb $0x0, -0x2d(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5b330
movl $0x1, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0xb0(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5b800
movl %eax, -0xac(%rbp)
jmp 0x6526f
movl -0xb0(%rbp), %eax
movl -0xac(%rbp), %ecx
cmpl %ecx, %eax
jg 0x65375
movl -0x4c(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0xb8(%rbp)
jmp 0x65298
movq -0xb8(%rbp), %rax
cmpl $0x5c, (%rax)
je 0x652e6
movl -0x4c(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0xc0(%rbp)
jmp 0x652b9
movq -0xc0(%rbp), %rax
cmpl $0x2f, (%rax)
je 0x652e6
movl -0x4c(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0xc8(%rbp)
jmp 0x652da
movq -0xc8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x65365
movl -0x4c(%rbp), %edx
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5d6b0
jmp 0x652f8
leaq 0x1408e7(%rip), %rsi    # 0x1a5be6
leaq -0x68(%rbp), %rdi
callq 0x5c120
movq %rax, -0xd0(%rbp)
jmp 0x65311
movq -0xd0(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x5a010
cmpl $0x0, %eax
jne 0x65358
movb $0x1, -0x2d(%rbp)
jmp 0x6535c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x6543a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5df00
jmp 0x6543a
movb $0x0, -0x2d(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5df00
jmp 0x65367
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x65255
movb -0x2d(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x653d5
leaq -0x78(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
jmp 0x65392
leaq -0x78(%rbp), %rdi
callq 0x59680
movl %eax, -0xd4(%rbp)
jmp 0x653a3
movl -0xd4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5b5b0
movl $0x1, -0x7c(%rbp)
jmp 0x6542f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5b5b0
jmp 0x6543a
leaq -0x90(%rbp), %rdi
callq 0x5ca80
jmp 0x653e3
leaq -0x90(%rbp), %rdi
callq 0x59680
movl %eax, -0xd8(%rbp)
jmp 0x653f7
movl -0xd8(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5a410
movl $0x1, -0x7c(%rbp)
jmp 0x6542f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5a410
jmp 0x6543a
leaq -0x48(%rbp), %rdi
callq 0x5df00
jmp 0x65445
leaq -0x48(%rbp), %rdi
callq 0x5df00
jmp 0x65451
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)