// File: JenTus[P]TCEM/src_TCEM/allocator.cc
// Function: Cide::allocator::arrangeOutputFiles()
void allocator::arrangeOutputFiles() {
        
       string command = string("mkdir -p ") + outFolderName ;
        
       system(command.c_str());

        std::size_t pos = probGraphFile.find("/");
        std::size_t end = probGraphFile.find(".txt");

        string masterFileName = probGraphFile.substr(pos+1, end-pos-1) + "+" + to_string(k_r) + "+" + to_string(k_b) + ".txt";

        outMasterName = outFolderName + OS_SEP + masterFileName;
//        outMasterName = masterFileName;
        
        if(outMasterStream.is_open())
            outMasterStream.close();
        
        outMasterStream.open(outMasterName.c_str());
        
        outMasterStream << "n" << " " << "m" << " " << "redNodes" << " " << "blueNodes" << " "<< endl;
        outMasterStream << n << " " << m << " " << k_r << " " << k_b << " " << endl;
        outMasterStream << "Algorithm" << " " << "Time" << " " << "Memory(MB)" << " " << "score" << endl;
        
        if (!outMasterStream.is_open()) {
            cout << "Can't open file " << outMasterName  << " for writing" << endl;
            exit(1);
        }
        
        // memory icin
        command = string("mkdir -p temp") ;
        system(command.c_str());
    }

// Assembly:
subq $0x308, %rsp            # imm = 0x308
movq %rdi, 0x300(%rsp)
movq 0x300(%rsp), %rax
movq %rax, 0x120(%rsp)
leaq 0x2bf(%rsp), %rdi
movq %rdi, 0x128(%rsp)
callq 0x4690
movq 0x128(%rsp), %rdx
leaq 0x1d778(%rip), %rsi     # 0x2441b
leaq 0x2c0(%rsp), %rdi
callq 0x44f0
jmp 0x6cb2
movq 0x120(%rsp), %rdx
addq $0xd98, %rdx            # imm = 0xD98
leaq 0x2e0(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0xf3f0
jmp 0x6cd8
leaq 0x2c0(%rsp), %rdi
callq 0x41f0
leaq 0x2bf(%rsp), %rdi
callq 0x43e0
leaq 0x2e0(%rsp), %rdi
callq 0x4130
movq %rax, %rdi
callq 0x42f0
jmp 0x6d09
movq 0x120(%rsp), %rdi
addq $0x20, %rdi
movq %rdi, 0x118(%rsp)
leaq 0x1d701(%rip), %rsi     # 0x24425
xorl %eax, %eax
movl %eax, %edx
movq %rdx, 0x110(%rsp)
callq 0x4710
movq 0x110(%rsp), %rdx
movq 0x118(%rsp), %rdi
movq %rax, 0x2a0(%rsp)
leaq 0x1d6d3(%rip), %rsi     # 0x24427
callq 0x4710
movq 0x118(%rsp), %rsi
movq %rax, 0x298(%rsp)
movq 0x2a0(%rsp), %rcx
movq %rcx, %rdx
incq %rdx
movq 0x298(%rsp), %rax
notq %rcx
addq %rax, %rcx
leaq 0x1d8(%rsp), %rdi
callq 0x43a0
jmp 0x6d94
leaq 0x1d691(%rip), %rdx     # 0x2442c
leaq 0x1f8(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0xf440
jmp 0x6db2
movq 0x120(%rsp), %rax
movl 0x78(%rax), %esi
leaq 0x1b8(%rsp), %rdi
callq 0xf580
jmp 0x6dcc
leaq 0x218(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
leaq 0x1b8(%rsp), %rdx
callq 0xf490
jmp 0x6deb
leaq 0x1d63a(%rip), %rdx     # 0x2442c
leaq 0x238(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0xf440
jmp 0x6e09
movq 0x120(%rsp), %rax
movl 0x7c(%rax), %esi
leaq 0x198(%rsp), %rdi
callq 0xf580
jmp 0x6e23
leaq 0x258(%rsp), %rdi
leaq 0x238(%rsp), %rsi
leaq 0x198(%rsp), %rdx
callq 0xf490
jmp 0x6e42
leaq 0x1d5de(%rip), %rdx     # 0x24427
leaq 0x278(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0xf440
jmp 0x6e60
leaq 0x258(%rsp), %rdi
callq 0x41f0
leaq 0x198(%rsp), %rdi
callq 0x41f0
leaq 0x238(%rsp), %rdi
callq 0x41f0
leaq 0x218(%rsp), %rdi
callq 0x41f0
leaq 0x1b8(%rsp), %rdi
callq 0x41f0
leaq 0x1f8(%rsp), %rdi
callq 0x41f0
leaq 0x1d8(%rsp), %rdi
callq 0x41f0
movq 0x120(%rsp), %rsi
addq $0xd98, %rsi            # imm = 0xD98
leaq 0x158(%rsp), %rdi
movl $0x2f, %edx
callq 0xf6c0
jmp 0x6ede
leaq 0x178(%rsp), %rdi
leaq 0x158(%rsp), %rsi
leaq 0x278(%rsp), %rdx
callq 0xf3f0
jmp 0x6efd
movq 0x120(%rsp), %rdi
addq $0xdb8, %rdi            # imm = 0xDB8
leaq 0x178(%rsp), %rsi
movq %rsi, 0x100(%rsp)
callq 0x4450
movq 0x100(%rsp), %rdi
callq 0x41f0
leaq 0x158(%rsp), %rdi
callq 0x41f0
movq 0x120(%rsp), %rdi
addq $0xb98, %rdi            # imm = 0xB98
callq 0x4290
movb %al, 0x10f(%rsp)
jmp 0x6f58
movb 0x10f(%rsp), %al
testb $0x1, %al
jne 0x6f68
jmp 0x7125
movq 0x120(%rsp), %rdi
addq $0xb98, %rdi            # imm = 0xB98
callq 0x4520
jmp 0x6f7e
jmp 0x7125
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x6fba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x41f0
leaq 0x2bf(%rsp), %rdi
callq 0x43e0
jmp 0x75ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x759f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x70d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x70c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x70ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x70ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x70a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x7093
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x258(%rsp), %rdi
callq 0x41f0
leaq 0x198(%rsp), %rdi
callq 0x41f0
leaq 0x238(%rsp), %rdi
callq 0x41f0
leaq 0x218(%rsp), %rdi
callq 0x41f0
leaq 0x1b8(%rsp), %rdi
callq 0x41f0
leaq 0x1f8(%rsp), %rdi
callq 0x41f0
leaq 0x1d8(%rsp), %rdi
callq 0x41f0
jmp 0x759f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
jmp 0x7592
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x41f0
jmp 0x7592
movq 0x120(%rsp), %rdi
movq %rdi, %rax
addq $0xb98, %rax            # imm = 0xB98
movq %rax, 0xf8(%rsp)
addq $0xdb8, %rdi            # imm = 0xDB8
callq 0x4130
movq 0xf8(%rsp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0x4040
jmp 0x7161
movq 0x120(%rsp), %rdi
addq $0xb98, %rdi            # imm = 0xB98
leaq 0x1cf3d(%rip), %rsi     # 0x240b4
callq 0x4370
movq %rax, 0xf0(%rsp)
jmp 0x7186
movq 0xf0(%rsp), %rdi
leaq 0x1d092(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0xe8(%rsp)
jmp 0x71a4
movq 0xe8(%rsp), %rdi
leaq 0x1cffe(%rip), %rsi     # 0x241b1
callq 0x4370
movq %rax, 0xe0(%rsp)
jmp 0x71c2
movq 0xe0(%rsp), %rdi
leaq 0x1d056(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0xd8(%rsp)
jmp 0x71e0
movq 0xd8(%rsp), %rdi
leaq 0x1d23f(%rip), %rsi     # 0x2442e
callq 0x4370
movq %rax, 0xd0(%rsp)
jmp 0x71fe
movq 0xd0(%rsp), %rdi
leaq 0x1d01a(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0xc8(%rsp)
jmp 0x721c
movq 0xc8(%rsp), %rdi
leaq 0x1d20c(%rip), %rsi     # 0x24437
callq 0x4370
movq %rax, 0xc0(%rsp)
jmp 0x723a
movq 0xc0(%rsp), %rdi
leaq 0x1cfde(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0xb8(%rsp)
jmp 0x7258
movq 0xb8(%rsp), %rdi
movq 0x27d61(%rip), %rsi     # 0x2efc8
callq 0x43c0
jmp 0x726e
movq 0x120(%rsp), %rax
movq %rax, %rdi
addq $0xb98, %rdi            # imm = 0xB98
movl 0x68(%rax), %esi
callq 0x4650
movq %rax, 0xb0(%rsp)
jmp 0x7292
movq 0xb0(%rsp), %rdi
leaq 0x1cf86(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0xa8(%rsp)
jmp 0x72b0
movq 0xa8(%rsp), %rdi
movq 0x120(%rsp), %rax
movl 0x6c(%rax), %esi
callq 0x4650
movq %rax, 0xa0(%rsp)
jmp 0x72d2
movq 0xa0(%rsp), %rdi
leaq 0x1cf46(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0x98(%rsp)
jmp 0x72f0
movq 0x98(%rsp), %rdi
movq 0x120(%rsp), %rax
movl 0x78(%rax), %esi
callq 0x4650
movq %rax, 0x90(%rsp)
jmp 0x7312
movq 0x90(%rsp), %rdi
leaq 0x1cf06(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0x88(%rsp)
jmp 0x7330
movq 0x88(%rsp), %rdi
movq 0x120(%rsp), %rax
movl 0x7c(%rax), %esi
callq 0x4650
movq %rax, 0x80(%rsp)
jmp 0x7352
movq 0x80(%rsp), %rdi
leaq 0x1cec6(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0x78(%rsp)
jmp 0x736d
movq 0x78(%rsp), %rdi
movq 0x27c4f(%rip), %rsi     # 0x2efc8
callq 0x43c0
jmp 0x7380
movq 0x120(%rsp), %rdi
addq $0xb98, %rdi            # imm = 0xB98
leaq 0x1d0ab(%rip), %rsi     # 0x24441
callq 0x4370
movq %rax, 0x70(%rsp)
jmp 0x73a2
movq 0x70(%rsp), %rdi
leaq 0x1ce79(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0x68(%rsp)
jmp 0x73ba
movq 0x68(%rsp), %rdi
leaq 0x1d085(%rip), %rsi     # 0x2444b
callq 0x4370
movq %rax, 0x60(%rsp)
jmp 0x73d2
movq 0x60(%rsp), %rdi
leaq 0x1ce49(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0x58(%rsp)
jmp 0x73ea
movq 0x58(%rsp), %rdi
leaq 0x1d05a(%rip), %rsi     # 0x24450
callq 0x4370
movq %rax, 0x50(%rsp)
jmp 0x7402
movq 0x50(%rsp), %rdi
leaq 0x1ce19(%rip), %rsi     # 0x24227
callq 0x4370
movq %rax, 0x48(%rsp)
jmp 0x741a
movq 0x48(%rsp), %rdi
leaq 0x1d035(%rip), %rsi     # 0x2445b
callq 0x4370
movq %rax, 0x40(%rsp)
jmp 0x7432
movq 0x40(%rsp), %rdi
movq 0x27b8a(%rip), %rsi     # 0x2efc8
callq 0x43c0
jmp 0x7445
movq 0x120(%rsp), %rdi
addq $0xb98, %rdi            # imm = 0xB98
callq 0x4290
movb %al, 0x3f(%rsp)
jmp 0x745f
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0x74d8
jmp 0x7469
movq 0x27b68(%rip), %rdi     # 0x2efd8
leaq 0x1cfea(%rip), %rsi     # 0x24461
callq 0x4370
movq %rax, 0x30(%rsp)
jmp 0x7483
movq 0x30(%rsp), %rdi
movq 0x120(%rsp), %rsi
addq $0xdb8, %rsi            # imm = 0xDB8
callq 0x4310
movq %rax, 0x28(%rsp)
jmp 0x74a3
movq 0x28(%rsp), %rdi
leaq 0x1cfc3(%rip), %rsi     # 0x24472
callq 0x4370
movq %rax, 0x20(%rsp)
jmp 0x74bb
movq 0x20(%rsp), %rdi
movq 0x27b01(%rip), %rsi     # 0x2efc8
callq 0x43c0
jmp 0x74ce
movl $0x1, %edi
callq 0x4430
leaq 0x137(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x4690
movq 0x18(%rsp), %rdx
leaq 0x1cf89(%rip), %rsi     # 0x2447f
leaq 0x138(%rsp), %rdi
callq 0x44f0
jmp 0x7505
leaq 0x2e0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x138(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0x4450
movq 0x8(%rsp), %rdi
callq 0x41f0
leaq 0x137(%rsp), %rdi
callq 0x43e0
movq 0x10(%rsp), %rdi
callq 0x4130
movq %rax, %rdi
callq 0x42f0
jmp 0x754f
leaq 0x278(%rsp), %rdi
callq 0x41f0
leaq 0x2e0(%rsp), %rdi
callq 0x41f0
addq $0x308, %rsp            # imm = 0x308
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x2b0(%rsp)
movl %eax, 0x2ac(%rsp)
leaq 0x137(%rsp), %rdi
callq 0x43e0
leaq 0x278(%rsp), %rdi
callq 0x41f0
leaq 0x2e0(%rsp), %rdi
callq 0x41f0
movq 0x2b0(%rsp), %rdi
callq 0x4680
nopl (%rax)