// File: /workspace/github_cpp_makefile_star2_O3/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 0xe643(%rip), %rsi      # 0x14930
movq %rsp, %r14
movl $0x220, %edx            # imm = 0x220
movq %r14, %rdi
callq 0x31e0
leaq 0x8928(%rip), %r15      # 0xec2c
leaq 0x7e71(%rip), %r13      # 0xe17c
movq 0xec96(%rip), %rbp      # 0x14fa8
movl (%rbx), %edi
movq 0x8(%rbx), %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x3440
leal -0x61(%rax), %ecx
cmpl $0x19, %ecx
ja 0x6451
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x1, 0x10(%rbx)
jmp 0x6312
movq (%rbp), %rax
movq %rax, 0xa8(%rbx)
jmp 0x6312
movb $0x1, 0x68(%rbx)
movq (%rbp), %rdi
xorl %esi, %esi
callq 0x3330
movss %xmm0, 0x6c(%rbx)
jmp 0x6312
movq (%rbp), %rax
movq %rax, 0xa0(%rbx)
movb $0x0, 0x10(%rbx)
jmp 0x6312
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x646c
jmp 0x6312
movq (%rbp), %rdi
callq 0x33e0
movl %eax, 0x1c(%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
callq 0x34a0
callq 0x3460
cvttsd2si %xmm0, %edi
movl %edi, 0xb0(%rbx)
movsd 0x7d35(%rip), %xmm0     # 0xe0e8
callq 0x33c0
cvttsd2si %xmm0, %eax
movl %eax, 0x18(%rbx)
jmp 0x6312
movb $0x0, 0x77(%rbx)
jmp 0x6312
movq (%rbp), %rdi
callq 0x33e0
movl %eax, 0x60(%rbx)
movb $0x0, 0x98(%rbx)
jmp 0x6312
movq (%rbp), %r12
movq %r12, %rdi
callq 0x33e0
movl %eax, 0x24(%rbx)
movq %r12, %rdi
callq 0x33e0
movl %eax, 0x90(%rbx)
jmp 0x6312
movq (%rbp), %rsi
movq %rbx, %rdi
callq 0x8028
jmp 0x6312
movq %rbx, %rdi
callq 0x7408
jmp 0x6312
movb $0x1, 0x74(%rbx)
jmp 0x6312
movq (%rbp), %rdi
callq 0x33e0
movl %eax, 0x14(%rbx)
jmp 0x6312
movb $0x1, 0x76(%rbx)
jmp 0x6312
movb $0x1, 0x20(%rbx)
jmp 0x6312
cmpl $-0x1, %eax
jne 0x6312
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq