// File: /workspace/github_c_makefile_star2_O2/info-telecom-strasbourg[P]code-generator/src/other_flags.cpp
// Function: create_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void create_file (string name, string ext, string dir, int type) {
	int exit_code;
	vector<char*> cmd;
	
	string new_file = type == IS_SOURCE 
		? dir + "/" + name + "." + ext
		: name + "." + ext;

	LOAD_CMD ("bash");	
	
	if (type == IS_SOURCE) {
		LOAD_CMD (CPY_FILES_SCRIPT_PATH);

		if ( ext == "c" )
			LOAD_CMD (STANDARD_C_FILE);
		if ( ext == "cpp" )
			LOAD_CMD (STANDARD_CPP_FILE);
		if ( ext == "cc" )
			LOAD_CMD (STANDARD_CC_FILE);

		LOAD_CMD (new_file.c_str());

	}

	if (type == IS_INCLUDE) {
		LOAD_CMD (ADD_HEADER_SCRIPT_PATH);
		LOAD_CMD ("0");
		LOAD_CMD (new_file.c_str());
		LOAD_CMD (dir.c_str());
	}

	execute (exit_code, BASH_PATH, cmd);
	if ( !exit_code )
		cout << "\033[1;32minfo\033[0m: created a new standard file at \"" 
			<< new_file << "\".\n"; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
testl %ecx, %ecx
je 0x39bf
leaq 0x2fcc(%rip), %rdx      # 0x6965
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x45eb
leaq 0x40(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x45ad
leaq 0x18(%rsp), %rdi
jmp 0x3a2f
leaq 0x286b(%rip), %rdx      # 0x6231
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x45eb
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
movq %r15, %rdx
callq 0x45ad
leaq 0x2f76(%rip), %rdx      # 0x6965
leaq 0x18(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x45cc
leaq 0x40(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x45ad
leaq 0x18(%rsp), %rdi
callq 0x20c0
leaq 0x98(%rsp), %rdi
callq 0x20c0
leaq 0x78(%rsp), %rdi
callq 0x20c0
leaq 0x26be(%rip), %rax      # 0x60f9
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
testl %ebp, %ebp
je 0x3ab3
cmpl $0x1, %ebp
jne 0x3b5d
leaq 0x2709(%rip), %rax      # 0x6168
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
leaq 0x271e(%rip), %rax      # 0x6194
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
movq 0x40(%rsp), %rax
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
movq (%r14), %rax
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
jmp 0x3b5d
leaq 0x254a(%rip), %rax      # 0x6004
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
leaq 0x258c(%rip), %rsi      # 0x605d
movq %rbx, %rdi
callq 0x348e
testb %al, %al
je 0x3af4
leaq 0x2a69(%rip), %rax      # 0x654d
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
leaq 0x2592(%rip), %rsi      # 0x608d
movq %rbx, %rdi
callq 0x348e
testb %al, %al
je 0x3b1e
leaq 0x2a6e(%rip), %rax      # 0x657c
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
leaq 0x259a(%rip), %rsi      # 0x60bf
movq %rbx, %rdi
callq 0x348e
testb %al, %al
je 0x3b48
leaq 0x2a75(%rip), %rax      # 0x65ad
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
movq 0x40(%rsp), %rax
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
callq 0x35bc
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0x349c
leaq 0x257f(%rip), %rdx      # 0x60f0
leaq 0xb8(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
leaq 0x60(%rsp), %rcx
callq 0x4d8c
leaq 0xb8(%rsp), %rdi
callq 0x20c0
leaq 0x60(%rsp), %rdi
callq 0x3588
cmpl $0x0, 0x3c(%rsp)
jne 0x3bd5
movq 0x541b(%rip), %rdi      # 0x8fc8
leaq 0x2a29(%rip), %rsi      # 0x65dd
callq 0x21b0
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x2180
leaq 0x265f(%rip), %rsi      # 0x622c
movq %rax, %rdi
callq 0x21b0
leaq 0x40(%rsp), %rdi
callq 0x20c0
movq %rsp, %rdi
callq 0x3588
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c54
jmp 0x3c54
jmp 0x3c54
jmp 0x3c54
jmp 0x3c54
jmp 0x3c54
jmp 0x3c54
jmp 0x3c54
jmp 0x3c54
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20c0
jmp 0x3c19
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x20c0
jmp 0x3c2b
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
jmp 0x3c5c
jmp 0x3c3e
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x3c5c
movq %rax, %rbx
jmp 0x3c61
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3588
jmp 0x3c57
jmp 0x3c54
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x20c0
movq %rsp, %rdi
callq 0x3588
movq %rbx, %rdi
callq 0x2350