// File: /workspace/github_c_makefile_star2_O2/info-telecom-strasbourg[P]code-generator/src/flag_m.cpp
// Function: parse_path[abi:cxx11](char const*, char const*, int)
string parse_path (const char * path, const char * extension,
	int type) {

	vector<string> directories;	 
	string path_str = path;
	string extension_str = extension;
	stringstream ss(path_str);
	string token, dynamic_path = "./";

    while ( getline(ss, token, '/') ) {
		if ( token == "." || token == ".." )
			continue;
        else if ( has_dot (token) ) {
			if (type == IS_SOURCE)
				create_standard_main_file (path, extension_str);
			else if ( type == IS_INCLUDE )
				create_standard_include (token, dynamic_path);
			else {
				cerr << "\n\033[1;31merror\033[0m: ";
				cerr << token << "should be a directory.";
				exit (EXIT_FAILURE);
			}
		}
		else {
			dynamic_path += token + '/';
			create_dir (dynamic_path);
		}
    }

	return dynamic_path;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x180(%rsp), %rdx
movq %rsi, 0x18(%rsp)
callq 0x34ea
leaq 0x80(%rsp), %rdi
leaq 0x180(%rsp), %rdx
movq %rbx, %rsi
callq 0x34ea
leaq 0x180(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x2320
movl %ebp, 0x14(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x37ed(%rip), %rsi      # 0x6230
leaq 0x60(%rsp), %rdx
movq %r14, 0x8(%rsp)
movq %r14, %rdi
callq 0x34ea
leaq 0x180(%rsp), %r15
leaq 0x40(%rsp), %r12
pushq $0x2f
popq %r13
leaq 0x3ef8(%rip), %r14      # 0x6965
movq %r15, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x2370
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2be4
movq %r12, %rdi
movq %r14, %rsi
callq 0x348e
testb %al, %al
jne 0x2a6d
movq %r12, %rdi
leaq 0x378d(%rip), %rsi      # 0x6233
callq 0x348e
testb %al, %al
jne 0x2a6d
leaq 0x120(%rsp), %rdi
movq %r12, %rsi
callq 0x22c0
leaq 0x120(%rsp), %rbx
movq %rbx, %rdi
callq 0x4acf
movl %eax, %ebp
movq %rbx, %rdi
callq 0x20c0
testb %bpl, %bpl
je 0x2b3f
movl 0x14(%rsp), %eax
cmpl $0x1, %eax
je 0x2b97
testl %eax, %eax
jne 0x2c36
leaq 0x100(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x34ea
leaq 0x160(%rsp), %rbp
movq %rbp, %rdi
leaq 0x80(%rsp), %rsi
callq 0x22c0
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x25c8
movq %rbp, %rdi
callq 0x20c0
jmp 0x2b8a
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x3525
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x23b0
movq %rbx, %rdi
callq 0x20c0
leaq 0xc0(%rsp), %rdi
movq %rbp, %rsi
callq 0x22c0
leaq 0xc0(%rsp), %rbx
movq %rbx, %rdi
callq 0x2953
movq %rbx, %rdi
callq 0x20c0
jmp 0x2a6d
leaq 0xe0(%rsp), %rdi
movq %r12, %rsi
callq 0x22c0
leaq 0x140(%rsp), %rbx
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x22c0
leaq 0xe0(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x27f2
movq %rbx, %rdi
callq 0x20c0
movq %rbp, %rdi
callq 0x20c0
jmp 0x2a6d
leaq 0x40(%rsp), %rdi
callq 0x20c0
leaq 0x180(%rsp), %rdi
callq 0x2120
leaq 0x80(%rsp), %rdi
callq 0x20c0
leaq 0xa0(%rsp), %rdi
callq 0x20c0
leaq 0x20(%rsp), %rdi
callq 0x355c
movq 0x8(%rsp), %rax
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x63b3(%rip), %rdi      # 0x8ff0
leaq 0x35f2(%rip), %rsi      # 0x6236
callq 0x21b0
movq 0x63a0(%rip), %rdi      # 0x8ff0
leaq 0x40(%rsp), %rsi
callq 0x2180
leaq 0x35e9(%rip), %rsi      # 0x624a
movq %rax, %rdi
callq 0x21b0
pushq $0x1
popq %rdi
callq 0x2240
movq %rax, %rbx
jmp 0x2d0b
movq %rax, %rbx
jmp 0x2d22
movq %rax, %rbx
jmp 0x2d2f
movq %rax, %rbx
jmp 0x2d3c
jmp 0x2cfe
jmp 0x2cfe
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x20c0
jmp 0x2caa
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
jmp 0x2cf7
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x20c0
jmp 0x2cc9
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
jmp 0x2cf7
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x2cf7
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x2cf7
jmp 0x2cfe
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x20c0
jmp 0x2d01
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x20c0
leaq 0x40(%rsp), %rdi
callq 0x20c0
leaq 0x180(%rsp), %rdi
callq 0x2120
leaq 0x80(%rsp), %rdi
callq 0x20c0
leaq 0xa0(%rsp), %rdi
callq 0x20c0
leaq 0x20(%rsp), %rdi
callq 0x355c
movq %rbx, %rdi
callq 0x2350