// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testl %ecx, %ecx
je 0x43b3
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x3f06
leaq 0x35f0(%rip), %rsi      # 0x7965
movq %rsp, %rdi
callq 0x2380
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rsp, %rdi
callq 0x2070
leaq 0x48(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x4423
movq %rsi, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x4429
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0x3f06
leaq 0x2e59(%rip), %rsi      # 0x7231
leaq 0x60(%rsp), %rdi
callq 0x2380
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x60(%rsp), %rdi
callq 0x2070
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4458
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x445f
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x456d
movq 0x10(%rsp), %rsi
jmp 0x4565
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x98(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x34e0(%rip), %rsi      # 0x7965
callq 0x2380
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x44b0
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x44b8
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x2070
leaq 0x48(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x4505
movq %rsi, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x450b
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x4539
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x4556
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x456d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x2b85(%rip), %rax      # 0x70f9
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
testl %ebp, %ebp
je 0x45ec
cmpl $0x1, %ebp
jne 0x4696
leaq 0x2bd0(%rip), %rax      # 0x7168
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
leaq 0x2be5(%rip), %rax      # 0x7194
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
movq 0x38(%rsp), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
movq (%r14), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
jmp 0x4696
leaq 0x2a11(%rip), %rax      # 0x7004
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
leaq 0x2a53(%rip), %rsi      # 0x705d
movq %rbx, %rdi
callq 0x2060
testl %eax, %eax
jne 0x462d
leaq 0x2f30(%rip), %rax      # 0x754d
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
leaq 0x2a59(%rip), %rsi      # 0x708d
movq %rbx, %rdi
callq 0x2060
testl %eax, %eax
jne 0x4657
leaq 0x2f35(%rip), %rax      # 0x757c
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
leaq 0x2a61(%rip), %rsi      # 0x70bf
movq %rbx, %rdi
callq 0x2060
testl %eax, %eax
jne 0x4681
leaq 0x2f3c(%rip), %rax      # 0x75ad
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
movq 0x38(%rsp), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x3f9c
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3dea
leaq 0x2a41(%rip), %rdx      # 0x70f0
leaq 0xb8(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
leaq 0x80(%rsp), %rcx
callq 0x5e42
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46ea
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x4707
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
cmpl $0x0, 0x5c(%rsp)
jne 0x4750
movq 0x58b3(%rip), %rdi      # 0x9fc8
leaq 0x2ec1(%rip), %rsi      # 0x75dd
movl $0x31, %edx
callq 0x2210
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x5891(%rip), %rdi      # 0x9fc8
callq 0x2210
leaq 0x2ae9(%rip), %rsi      # 0x722c
movl $0x3, %edx
movq %rax, %rdi
callq 0x2210
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x476b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4782
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4854
jmp 0x4854
jmp 0x4854
jmp 0x4854
jmp 0x4854
jmp 0x4854
jmp 0x4854
jmp 0x4854
jmp 0x4854
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x47df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x47df
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x4803
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x4803
jmp 0x4800
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x4872
movq 0x70(%rsp), %rsi
jmp 0x486a
jmp 0x482b
jmp 0x4818
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x4872
movq 0x10(%rsp), %rsi
jmp 0x486a
movq %rax, %rbx
jmp 0x4872
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x4857
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0x4857
jmp 0x4854
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4872
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4889
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2340