// File: /workspace/github_cpp_makefile_star2_O2/c2-d2[P]disty/src/main.cpp
// Function: parse_arguments(int, char const**, params_t&)
void parse_arguments(int argc, const char **argv, params_t &params) {
    if (argc==1){
        cerr << USAGE << endl;
        exit(1);
    }

    int c;
    while ((c = getopt(argc, (char *const *)argv, "hvi:s:n:")) >= 0) {
        switch (c) {
            case 'h': {
                cout << USAGE << endl;
                exit(0);
            }
            case 'v': {
                cout << DISTY_VERSION << endl;
                exit(0);
            }
            case 'i': {
                int val=atoi(optarg);
                assert(val>=0);
                assert(val<(int)input_t::_MAX);
                params.input=static_cast<input_t>(val);
                break;
            }
            case 's': {
                int val=atoi(optarg);
                assert(val>=0);
                assert(val<(int)n_strategy_t::_MAX);
                params.n_strategy=static_cast<n_strategy_t>(val);
                break;
            }
            case 'n': {
                float val=atof(optarg);
                assert(val>=0.0);
                assert(val<=1.0);
                params.skip_n=val;
                break;
            }
            case '?': {
                cerr << "Unknown error" << endl;
                exit(1);
            }
            default: {
                cerr << "Unknown option " << c << endl;
                exit(1);
            }
        }
    }

    argc -= optind;
    argv += optind;

    if(argc != 1){
        cerr << USAGE << endl;
        exit(1);
    }
    else {
        params.fasta_fn=string(argv[0]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x1, %edi
je 0x269c
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x2e6e(%rip), %r15      # 0x52d0
movq 0x5b4f(%rip), %r13      # 0x7fb8
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2040
testl %eax, %eax
js 0x2509
movl %eax, %r12d
cmpl $0x69, %eax
je 0x24b5
cmpl $0x6e, %r12d
je 0x24d4
cmpl $0x73, %r12d
jne 0x2556
movq (%r13), %rdi
callq 0x2230
testl %eax, %eax
js 0x267d
cmpl $0x5, %eax
jae 0x25e2
movl %eax, 0x24(%rbx)
jmp 0x2469
movq (%r13), %rdi
callq 0x2230
testl %eax, %eax
js 0x263f
cmpl $0x2, %eax
jae 0x265e
movl %eax, 0x20(%rbx)
jmp 0x2469
movq (%r13), %rdi
callq 0x21c0
cvtsd2ss %xmm0, %xmm0
ucomiss 0x2b20(%rip), %xmm0     # 0x5008
jb 0x2601
movss 0x2b0e(%rip), %xmm1     # 0x5004
ucomiss %xmm0, %xmm1
jb 0x2620
movss %xmm0, 0x28(%rbx)
jmp 0x2469
movq 0x5ac0(%rip), %rax      # 0x7fd0
movslq (%rax), %rax
subl %eax, %ebp
cmpl $0x1, %ebp
jne 0x269c
movq (%r14,%rax,8), %rsi
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x2fd4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22d8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x3f, %r12d
je 0x259f
cmpl $0x76, %r12d
je 0x257d
cmpl $0x68, %r12d
jne 0x25b4
movq 0x5a59(%rip), %rdi      # 0x7fc8
leaq 0x5c1a(%rip), %rsi      # 0x8190
callq 0x2130
jmp 0x2590
movq 0x5a44(%rip), %rdi      # 0x7fc8
leaq 0x2d4e(%rip), %rsi      # 0x52d9
callq 0x2140
movq %rax, %rdi
callq 0x2090
xorl %edi, %edi
callq 0x21a0
movq 0x5a4a(%rip), %rdi      # 0x7ff0
leaq 0x2dc0(%rip), %rsi      # 0x536d
callq 0x2140
jmp 0x25d2
movq 0x5a35(%rip), %rdi      # 0x7ff0
leaq 0x2db9(%rip), %rsi      # 0x537b
callq 0x2140
movq %rax, %rdi
movl %r12d, %esi
callq 0x2280
movq %rax, %rdi
callq 0x2090
pushq $0x1
popq %rdi
callq 0x21a0
leaq 0x2d56(%rip), %rdi      # 0x533f
leaq 0x2cf6(%rip), %rsi      # 0x52e6
leaq 0x2cfc(%rip), %rcx      # 0x52f3
movl $0xc3, %edx
callq 0x20c0
leaq 0x2d53(%rip), %rdi      # 0x535b
leaq 0x2cd7(%rip), %rsi      # 0x52e6
leaq 0x2cdd(%rip), %rcx      # 0x52f3
movl $0xc9, %edx
callq 0x20c0
leaq 0x2d3d(%rip), %rdi      # 0x5364
leaq 0x2cb8(%rip), %rsi      # 0x52e6
leaq 0x2cbe(%rip), %rcx      # 0x52f3
movl $0xca, %edx
callq 0x20c0
leaq 0x2c99(%rip), %rdi      # 0x52df
leaq 0x2c99(%rip), %rsi      # 0x52e6
leaq 0x2c9f(%rip), %rcx      # 0x52f3
movl $0xbb, %edx
callq 0x20c0
leaq 0x2cc3(%rip), %rdi      # 0x5328
leaq 0x2c7a(%rip), %rsi      # 0x52e6
leaq 0x2c80(%rip), %rcx      # 0x52f3
movl $0xbc, %edx
callq 0x20c0
leaq 0x2c5b(%rip), %rdi      # 0x52df
leaq 0x2c5b(%rip), %rsi      # 0x52e6
leaq 0x2c61(%rip), %rcx      # 0x52f3
movl $0xc2, %edx
callq 0x20c0
movq 0x594d(%rip), %rdi      # 0x7ff0
leaq 0x5ae6(%rip), %rsi      # 0x8190
callq 0x2130
jmp 0x25d2