// File: /workspace/github_cpp_makefile_star2_O1/JenTus[P]TCEM/src_TCEM/main.cc
// Function: readOptions(int, char**)
AnyOption* readOptions(int argc, char* argv[]) {
    
    AnyOption *opt = new AnyOption();
    
    // ignore POSIX style options
    opt->noPOSIX();
    opt->setVerbose(); /* print warnings about unknown options */
    opt->autoUsagePrint(true); /* print usage for bad options */
    
    opt->addUsage("");
    opt->addUsage("Usage: ");
    opt->addUsage("");
    opt->addUsage("-help Prints this help ");
    opt->addUsage(" -c <config_file> Specify config file ");
    opt->addUsage(" -x <input_file> Specify input file name");
    opt->addUsage(" -r Specify red nodes");
    opt->addUsage(" -b Specify blue nodes");
    opt->addUsage("");
    
//    opt->setOption("probGraphFile");
    opt->setOption("outputFolder");
    
//    opt->setOption("n");
//    opt->setOption("m");
    //opt->setOption("nrItems");
    //opt->setOption("k");
    //opt->setOption("kr");
    //opt->setOption("kb");
//    opt->setOption("attentionConstraint");

    opt->setOption("epsilon");
    opt->setOption("ell");

    opt->setCommandFlag("help");
    opt->setCommandOption("c");
    opt->setCommandOption("x"); // to specify input file
    opt->setCommandOption("r");
    opt->setCommandOption("b");
    opt->setCommandOption("p"); // if comparing with the input, specify a filename
    opt->processCommandArgs(argc, argv);


    if(opt->getFlag( "help" )) {
        opt->printUsage();
        delete opt;
        exit(0);
    }
    
    const char* configFile = opt->getValue("c");
    if (configFile == NULL) {
        cout << "Config file not mentioned" << endl;
        opt->printUsage();
        delete opt;
        exit(0);
    }
    
    cout << "Config file : " << configFile << endl;
    opt->processFile(configFile);
    opt->processCommandArgs( argc, argv );
    cout << endl << endl;
    return opt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0xb0, %edi
callq 0x32f0
movq %rax, %rbx
movq %rax, %rdi
callq 0xe950
movq %rbx, %rdi
callq 0xee56
movq %rbx, %rdi
callq 0xee66
movq %rbx, %rdi
movl $0x1, %esi
callq 0xef78
leaq 0xe8a5(%rip), %r15      # 0x12278
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10752
leaq 0xe61f(%rip), %rsi      # 0x12004
movq %rbx, %rdi
callq 0x10752
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10752
leaq 0xe60d(%rip), %rsi      # 0x1200c
movq %rbx, %rdi
callq 0x10752
leaq 0xe616(%rip), %rsi      # 0x12024
movq %rbx, %rdi
callq 0x10752
leaq 0xe62e(%rip), %rsi      # 0x1204b
movq %rbx, %rdi
callq 0x10752
leaq 0xe648(%rip), %rsi      # 0x12074
movq %rbx, %rdi
callq 0x10752
leaq 0xe64f(%rip), %rsi      # 0x1208a
movq %rbx, %rdi
callq 0x10752
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10752
leaq 0xe64c(%rip), %rsi      # 0x120a1
movq %rbx, %rdi
callq 0xf230
leaq 0xe64a(%rip), %rsi      # 0x120ae
movq %rbx, %rdi
callq 0xf230
leaq 0xe643(%rip), %rsi      # 0x120b6
movq %rbx, %rdi
callq 0xf230
leaq 0xe638(%rip), %r15      # 0x120ba
movq %rbx, %rdi
movq %r15, %rsi
callq 0xf116
leaq 0xef02(%rip), %rsi      # 0x12996
movq %rbx, %rdi
callq 0xefae
leaq 0xe61c(%rip), %rsi      # 0x120bf
movq %rbx, %rdi
callq 0xefae
leaq 0xe5fa(%rip), %rsi      # 0x120ac
movq %rbx, %rdi
callq 0xefae
leaq 0xe6ed(%rip), %rsi      # 0x121ae
movq %rbx, %rdi
callq 0xefae
leaq 0xe5ed(%rip), %rsi      # 0x120bd
movq %rbx, %rdi
callq 0xefae
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xf626
movq %rbx, %rdi
movq %r15, %rsi
callq 0xfdce
testb %al, %al
jne 0x3bfb
leaq 0xee97(%rip), %rsi      # 0x12996
movq %rbx, %rdi
callq 0xfcb2
testq %rax, %rax
je 0x3be0
movq %rax, %r12
movq 0x144be(%rip), %r15     # 0x17fd8
leaq 0xe5ba(%rip), %rsi      # 0x120db
movl $0xe, %edx
movq %r15, %rdi
callq 0x3340
movq %r12, %rdi
callq 0x3130
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3340
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x100ca
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0xf626
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31e0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x143f1(%rip), %rdi     # 0x17fd8
leaq 0xe4d3(%rip), %rsi      # 0x120c1
callq 0x32e0
movq %rax, %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x10650
movq %rbx, %rdi
callq 0xea3e
movq %rbx, %rdi
callq 0x32c0
xorl %edi, %edi
callq 0x3390
movq %rax, %r14
movq %rbx, %rdi
callq 0x32c0
movq %r14, %rdi
callq 0x35c0
nopl (%rax)