// File: /workspace/github_cpp_makefile_star2_O2/UCBASiCS[P]SPRIGHT/src/config.cpp
// Function: Config::setOptionsFromCommandLine()
void Config::setOptionsFromCommandLine()
{

    const struct option longOptions[] =
    {	
       {"experiment",	 no_argument,	    NULL, 'a'},
       {"bins",	 required_argument, NULL, 'b'},
       {"samples",      no_argument,       NULL, 'c'},
       {"chains",       required_argument, NULL, 'e'},
       {"file",         required_argument, NULL, 'f'},
       {"write",        required_argument, NULL, 'w'},
       {"help",         no_argument,       NULL, 'h'},
       {"iterations",   required_argument, NULL, 'i'},
       {"sparsity",     required_argument, NULL, 'k'},
       {"ml",           no_argument,       NULL, 'l'},
       {"length",       required_argument, NULL, 'n'},
       {"optimize",     no_argument,       NULL, 'o'},
       {"reconstruct",  no_argument,       NULL, 'r'},
       {"snr",          required_argument, NULL, 's'},
       {"distribution", required_argument, NULL, 'u'},
       {"verbose",      no_argument,       NULL, 'v'},
       {0, 0, 0, 0}
   };

   int option = 0;

   while(option != -1)
   {
        option = getopt_long(argc, argv, "acf:e:hi:k:b:ln:op:rs:tu:vw:z:", longOptions, NULL); //abfgjuxyz
        switch (option)
        {
           case 'a':
           experimentMode = true;
           break;

           case 'b':
           setBins(optarg);
           break;

           case 'n':
           signalLengthOriginal = atoi(optarg);
           signalLogLength = floor(log2(signalLengthOriginal));
           signalLength = pow(2,signalLogLength);
           break;

           case 'c':
           countSamples = false;
           break;

           case 'e':
           chainsNb = atoi(optarg);
           defaultDelays = false;
           break;

           case 'f':
           inputFile = optarg;
           experimentMode = false;
           break;

           case 'h':
           help();
           break;

           case 'i':
           iterations = atoi(optarg);
           break;

           case 'k':
           signalSparsity = atoi(optarg);
           signalSparsityPeeling = atoi(optarg);
           break;

           case 'l':
           maximumLikelihood = true;
           break;

           case 'r':
           reconstructSignalInBackEnd = true;
           break;

           case 's':
           noisy = true;
           SNRdB = strtof(optarg, 0);
           break;

           case 'u':
           preprocessDistribution(optarg);
           break;

           case 'z':
           outputFile = optarg;
           break;

           case 'v':
           verbose = true;
           break;
       }
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
leaq 0xd98d(%rip), %rsi      # 0x13950
movq %rsp, %r14
movl $0x220, %edx            # imm = 0x220
movq %r14, %rdi
callq 0x31f0
xorl %r12d, %r12d
leaq 0x6c4f(%rip), %r15      # 0xcc2c
leaq 0x6198(%rip), %rbp      # 0xc17c
movq 0xdfd5(%rip), %r13      # 0x13fc0
cmpl $-0x1, %r12d
je 0x6141
movl (%rbx), %edi
movq 0x8(%rbx), %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x3440
movl %eax, %r12d
addl $-0x61, %eax
cmpl $0x19, %eax
ja 0x5feb
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
movb $0x1, 0x10(%rbx)
jmp 0x5feb
movq (%r13), %rax
movq %rax, 0xa8(%rbx)
jmp 0x5feb
movb $0x1, 0x68(%rbx)
movq (%r13), %rdi
xorl %esi, %esi
callq 0x3330
movss %xmm0, 0x6c(%rbx)
jmp 0x5feb
movq (%r13), %rax
movq %rax, 0xa0(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x5feb
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x6154
jmp 0x5feb
movq (%r13), %rdi
callq 0x33e0
movl %eax, 0x1c(%rbx)
movl %eax, %edi
callq 0x70a8
callq 0x3460
cvttsd2si %xmm0, %edi
movl %edi, 0xb0(%rbx)
movsd 0x6058(%rip), %xmm0     # 0xc0e8
callq 0x33c0
cvttsd2si %xmm0, %eax
movl %eax, 0x18(%rbx)
jmp 0x5feb
movb $0x0, 0x77(%rbx)
jmp 0x5feb
movq (%r13), %rdi
callq 0x33e0
movl %eax, 0x60(%rbx)
movb $0x0, 0x98(%rbx)
jmp 0x5feb
movq %r14, %r15
movq %r13, %r14
movq (%r13), %r13
movq %r13, %rdi
callq 0x33e0
movl %eax, 0x24(%rbx)
movq %r13, %rdi
movq %r14, %r13
movq %r15, %r14
leaq 0x6b45(%rip), %r15      # 0xcc2c
callq 0x33e0
movl %eax, 0x90(%rbx)
jmp 0x5feb
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x6fd0
jmp 0x5feb
movq %rbx, %rdi
callq 0x6bc0
jmp 0x5feb
movb $0x1, 0x74(%rbx)
jmp 0x5feb
movq (%r13), %rdi
callq 0x33e0
movl %eax, 0x14(%rbx)
jmp 0x5feb
movb $0x1, 0x76(%rbx)
jmp 0x5feb
movb $0x1, 0x20(%rbx)
jmp 0x5feb
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop