// File: /workspace/github_cpp_makefile_star2_O3/aalto-speech[P]ftk/util/conf.cc
// Function: conf::Config::parse_aux(std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool)
void
Config::parse_aux(std::deque<std::string> &argument_queue, bool override)
{
    bool options_allowed = true; // Have not seen "--" yet.
    std::deque<int> options_pending; // Options waiting for parameter

    while (!argument_queue.empty()) {
        std::string arg(argument_queue.front());
        argument_queue.pop_front();

        // Check if the argument is an option at all
        if (options_allowed && options_pending.empty() &&
                arg.length() > 1 && arg[0] == '-')
        {

            // End of options "--"
            if (arg == "--") {
                options_allowed = false;
                continue;
            }

            // Short option?
            if (arg[1] != '-') {

                // Parse grouped short options
                for (int c = 1; c < (int)arg.length(); c++) {

                    // Check if the option is valid
                    unsigned char short_name = arg[c];
                    ShortMap::iterator it = short_map.find(short_name);
                    if (it == short_map.end()) {
                        fprintf(stderr, "invalid option -%c\n", short_name);
                        exit(1);
                    }

                    Option &option = options[it->second];
                    if (option.needs_argument)
                        options_pending.push_back(it->second);
                    else
                        option.specified = true;
                }
            }

            // Long option?
            else {

                std::string long_name(arg.substr(2));
                std::string parameter;
                int equal_pos = long_name.find('=');
                if (equal_pos >= 0) {
                    parameter = long_name.substr(equal_pos + 1);
                    argument_queue.push_front(parameter);
                    long_name.erase(equal_pos);
                }
                LongMap::iterator it = long_map.find(long_name);
                if (it == long_map.end()) {
                    fprintf(stderr, "invalid option --%s\n", long_name.c_str());
                    exit(1);
                }

                Option &option = options[it->second];
                if (option.needs_argument)
                    options_pending.push_back(it->second);
                else
                    option.specified = true;
            }

        }

        // Otherwise just a parameter (possibly for a previous option)
        else {

            // Just an ordinary command line parameter
            if (options_pending.empty())
                arguments.push_back(arg);

            // Parameter for an option
            else {
                Option &option = options[options_pending.front()];
                options_pending.pop_front();
                if (!option.specified || override)
                    option.value = arg;
                option.specified = true;
            }
        }
    }

    // Check if the last option is missing arguments
    if (!options_pending.empty()) {
        std::string option_name;
        Option &option = options[options_pending.front()];
        if (option.short_name != 0) {
            option_name.append(" -");
            option_name.append(1, option.short_name);
        }
        if (option.long_name != "") {
            option_name.append(" --");
            option_name.append(option.long_name);
        }
        fprintf(stderr, "option%s lacks an argument\n", option_name.c_str());
        exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movl %edx, -0x4c(%rbp)
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0xe0(%rbp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x8552
movq 0x10(%r15), %rax
cmpq %rax, 0x30(%r15)
je 0x72c9
leaq -0x38(%rbp), %r13
leaq 0x98(%rbx), %rcx
movq %rcx, -0xf8(%rbp)
leaq 0x40(%rbx), %r14
leaq 0x68(%rbx), %rcx
movq %rcx, -0xf0(%rbp)
leaq 0x70(%rbx), %rcx
movq %rcx, -0xe8(%rbp)
movb $0x1, %r12b
movq %r13, -0x48(%rbp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x5f0e
movq %r15, %rdi
callq 0x7ec8
movq -0xd0(%rbp), %rax
movq -0xb0(%rbp), %rcx
testb $0x1, %r12b
je 0x7101
cmpq %rax, %rcx
jne 0x7101
cmpq $0x2, -0x40(%rbp)
jb 0x7101
movq -0x48(%rbp), %rdx
cmpb $0x2d, (%rdx)
jne 0x7101
leaq -0x48(%rbp), %rdi
leaq 0x1f357(%rip), %rsi     # 0x26312
callq 0x40f0
testl %eax, %eax
je 0x71bf
movq -0x48(%rbp), %rax
cmpb $0x2d, 0x1(%rax)
jne 0x71c4
movl $0x2, %edx
leaq -0x90(%rbp), %r12
movq %r12, %rdi
leaq -0x48(%rbp), %rsi
movq $-0x1, %rcx
callq 0x43b0
leaq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movb $0x0, -0x60(%rbp)
movq %r12, %rdi
movl $0x3d, %esi
xorl %edx, %edx
callq 0x4480
movq %r12, %rsi
movq %rax, %r12
testl %r12d, %r12d
js 0x70a0
leal 0x1(%r12), %edx
leaq -0x118(%rbp), %rdi
movq $-0x1, %rcx
callq 0x43b0
leaq -0x70(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x4430
movq -0x118(%rbp), %rdi
leaq -0x108(%rbp), %rax
cmpq %rax, %rdi
je 0x7063
callq 0x4350
movq %r15, %rdi
leaq -0x70(%rbp), %rsi
callq 0x7f14
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq -0x88(%rbp), %rcx
cmpq %r12, %rcx
jb 0x7380
movq %r12, -0x88(%rbp)
movq -0x90(%rbp), %rax
movb $0x0, (%rax,%r12)
leaq -0x90(%rbp), %rsi
movq -0xf0(%rbp), %rdi
callq 0x884a
cmpq -0xe8(%rbp), %rax
je 0x7374
movslq 0x40(%rax), %rcx
movq 0x20(%rbx), %rdx
leaq (%rcx,%rcx,8), %rsi
shlq $0x4, %rsi
cmpb $0x1, 0x49(%rdx,%rsi)
jne 0x727e
movq -0xb0(%rbp), %rdx
movq -0xa0(%rbp), %rsi
addq $-0x4, %rsi
cmpq %rsi, %rdx
je 0x7287
movl %ecx, (%rdx)
addq $0x4, %rdx
movq %rdx, -0xb0(%rbp)
jmp 0x729a
cmpq %rax, %rcx
je 0x712b
movslq (%rax), %rcx
leaq (%rcx,%rcx,8), %r13
shlq $0x4, %r13
addq 0x20(%rbx), %r13
movq -0xc0(%rbp), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x713d
addq $0x4, %rax
jmp 0x7174
movq -0xf8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x7f60
jmp 0x719e
movq -0xc8(%rbp), %rdi
callq 0x4350
movq -0xb8(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0xb8(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xc8(%rbp)
leaq 0x200(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq %rax, -0xd0(%rbp)
movb 0x4a(%r13), %al
xorb $0x1, %al
orb -0x4c(%rbp), %al
cmpb $0x1, %al
jne 0x7195
leaq 0x28(%r13), %rdi
leaq -0x48(%rbp), %rsi
callq 0x41c0
movb $0x1, 0x4a(%r13)
leaq -0x38(%rbp), %r13
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x71ac
callq 0x4350
movq 0x10(%r15), %rax
cmpq %rax, 0x30(%r15)
jne 0x6f58
jmp 0x72c9
xorl %r12d, %r12d
jmp 0x719e
movb $0x1, %r12b
cmpl $0x2, -0x40(%rbp)
jl 0x719e
movl $0x1, %r13d
movq -0x48(%rbp), %rax
movb (%rax,%r13), %al
movq 0x48(%rbx), %rcx
testq %rcx, %rcx
je 0x72f7
movq %r14, %rsi
xorl %edx, %edx
cmpb %al, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rsi
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x71eb
cmpq %r14, %rsi
je 0x72f7
cmpb 0x20(%rsi), %al
jb 0x72f7
movslq 0x24(%rsi), %rax
movq 0x20(%rbx), %rcx
leaq (%rax,%rax,8), %rdx
shlq $0x4, %rdx
cmpb $0x1, 0x49(%rcx,%rdx)
jne 0x7250
movq -0xb0(%rbp), %rcx
movq -0xa0(%rbp), %rdx
addq $-0x4, %rdx
cmpq %rdx, %rcx
je 0x7259
movl %eax, (%rcx)
addq $0x4, %rcx
movq %rcx, -0xb0(%rbp)
jmp 0x7269
addq %rdx, %rcx
movb $0x1, 0x4a(%rcx)
jmp 0x7269
addq $0x24, %rsi
leaq -0xe0(%rbp), %rdi
callq 0x9376
incq %r13
movslq -0x40(%rbp), %rax
cmpq %rax, %r13
jl 0x71d3
jmp 0x719a
addq %rsi, %rdx
movb $0x1, 0x4a(%rdx)
jmp 0x729a
addq $0x40, %rax
leaq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0x9376
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x72ac
callq 0x4350
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x72c1
callq 0x4350
movb $0x1, %r12b
jmp 0x719e
movq -0xd0(%rbp), %rax
cmpq %rax, -0xb0(%rbp)
jne 0x72ff
leaq -0xe0(%rbp), %rdi
callq 0x92ca
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %al, %edi
callq 0x482b
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movslq (%rax), %rax
movq 0x20(%rbx), %rcx
leaq (%rax,%rax,8), %rax
shlq $0x4, %rax
leaq (%rcx,%rax), %rbx
cmpb $0x0, (%rcx,%rax)
je 0x7354
leaq 0x1f00b(%rip), %rsi     # 0x2633e
leaq -0x48(%rbp), %rdi
callq 0x46b0
movsbl (%rbx), %r8d
leaq -0x48(%rbp), %rdi
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x4690
addq $0x8, %rbx
leaq 0x1f238(%rip), %rsi     # 0x26597
movq %rbx, %rdi
callq 0x40f0
testl %eax, %eax
jne 0x7398
leaq -0x48(%rbp), %rdi
callq 0x4880
leaq -0x90(%rbp), %rdi
callq 0x4856
leaq 0x1f09c(%rip), %rdi     # 0x26423
leaq 0x1f081(%rip), %rsi     # 0x2640f
movq %r12, %rdx
xorl %eax, %eax
callq 0x4530
leaq 0x1ef72(%rip), %rsi     # 0x26311
leaq -0x48(%rbp), %rdi
callq 0x46b0
leaq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq 0x46d0
jmp 0x736b
jmp 0x73cc
jmp 0x73cc
jmp 0x73cc
jmp 0x73cc
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
jne 0x740e
jmp 0x7418
movq %rax, %rbx
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x73e1
callq 0x4350
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x7401
callq 0x4350
jmp 0x7401
jmp 0x73fe
jmp 0x73fe
jmp 0x73fe
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x7418
callq 0x4350
jmp 0x7418
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x92ca
movq %rbx, %rdi
callq 0x4650