// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/util/conf.cc
// Function: conf::Config::operator()(unsigned char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Config&
Config::operator()(unsigned char short_name, std::string long_name,
                   std::string type, std::string default_value,
                   std::string help)
{
    // Initialize new option
    Option o;
    o.short_name = short_name;
    o.long_name = long_name;
    o.value = default_value;
    o.required = false;
    o.needs_argument = false;
    o.help = help;

    // Remove the possible equal sign part from the long name used as
    // a map key.
    std::string long_name_map_key(long_name);
    int equal_pos = long_name_map_key.find('=');
    if (equal_pos >= 0)
        long_name_map_key.erase(equal_pos);

    // Parse the type string
    std::vector<std::string> types = str::split(type, " \t", true);
    for (int i = 0; i < (int)types.size(); i++) {
        if (types[i] == "arg")
            o.needs_argument = true;
        else if (types[i] == "must")
            o.required = true;
        else {
            fprintf(stderr, "invalid option type %s for option -%c --%s\n",
                    types[i].c_str(), short_name, long_name.c_str());
            abort();
        }
    }

    // Add structure to configuration
    if (short_name != 0) {
        if (short_map.find(short_name) != short_map.end()) {
            fprintf(stderr, "trying to add option -%c twice\n", short_name);
            exit(1);
        }
        short_map[short_name] = options.size();
        o.name.append("-");
        o.name.append(1, short_name);
    }
    if (long_name_map_key != "") {
        if (long_map.find(long_name_map_key) != long_map.end()) {
            fprintf(stderr, "trying to add option --%s twice\n",
                    long_name_map_key.c_str());
            exit(1);
        }
        long_map[long_name_map_key] = options.size();
        if ((int)long_name.length() > longest_name_length)
            longest_name_length = long_name.length();
        if (o.name.length() > 0)
            o.name.append(" --");
        else
            o.name.append("--");
        o.name.append(long_name_map_key);
    }
    options.push_back(o);

    return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, %r13
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %r8, %r14
xorl %r8d, %r8d
movb %r8b, (%rax)
leaq -0xc8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %r8b, (%rax)
andw $0x0, 0x10(%rax)
movq %rcx, %r15
movq %rdx, %r12
movb %r8b, 0x12(%rax)
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb %r8b, (%rax)
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %sil, -0x29(%rbp)
leaq -0xf8(%rbp), %rdi
movb %r8b, (%rax)
movl %esi, -0x30(%rbp)
movb %sil, -0x80(%rax)
movq %rdx, %rsi
callq 0x41c0
leaq -0xd8(%rbp), %rdi
movq %r14, %rsi
callq 0x41c0
leaq -0xb0(%rbp), %rdi
andw $0x0, -0x8(%rdi)
movq %r13, %rsi
callq 0x41c0
leaq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x4460
leaq -0x58(%rbp), %rdi
pushq $0x3d
popq %rsi
xorl %edx, %edx
callq 0x4430
testl %eax, %eax
js 0x613b
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leaq -0x58(%rbp), %rdi
pushq $-0x1
popq %rdx
movq %rax, %rsi
callq 0x40c0
movq %r12, -0x38(%rbp)
leaq 0x1d12a(%rip), %rdx     # 0x23270
leaq -0x70(%rbp), %rdi
pushq $0x1
popq %rcx
movq %r15, %rsi
xorl %r8d, %r8d
callq 0x6e3a
xorl %r14d, %r14d
leaq 0x1d111(%rip), %r13     # 0x23273
leaq 0x1d10e(%rip), %r15     # 0x23277
xorl %r12d, %r12d
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rax
subq %rdi, %rax
shrq $0x5, %rax
cltq
cmpq %rax, %r12
jge 0x61c1
addq %r14, %rdi
movq %r13, %rsi
callq 0x6fed
testb %al, %al
je 0x619a
movb $0x1, -0xb7(%rbp)
jmp 0x61b8
movq -0x70(%rbp), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x6fed
testb %al, %al
je 0x6316
movb $0x1, -0xb8(%rbp)
incq %r12
addq $0x20, %r14
jmp 0x616c
cmpb $0x0, -0x30(%rbp)
leaq -0x90(%rbp), %r13
je 0x6232
leaq 0x38(%rbx), %r14
leaq -0x29(%rbp), %rsi
movq %r14, %rdi
callq 0x7bfc
leaq 0x40(%rbx), %rcx
cmpq %rcx, %rax
jne 0x6346
movq 0x20(%rbx), %r12
movq 0x28(%rbx), %r15
leaq -0x29(%rbp), %rsi
movq %r14, %rdi
callq 0x6ffe
movq %rax, %rcx
subq %r12, %r15
movl $0x90, %esi
movq %r15, %rax
cqto
idivq %rsi
movl %eax, (%rcx)
leaq 0x1d0fc(%rip), %rsi     # 0x23317
movq %r13, %rdi
callq 0x4630
movsbl -0x29(%rbp), %edx
pushq $0x1
popq %rsi
movq %r13, %rdi
callq 0x4380
leaq 0x1d2ee(%rip), %rsi     # 0x23527
leaq -0x58(%rbp), %rdi
callq 0x704f
testb %al, %al
je 0x62d3
leaq 0x68(%rbx), %r14
leaq -0x58(%rbp), %rsi
movq %r14, %rdi
callq 0x7b5c
leaq 0x70(%rbx), %rcx
cmpq %rcx, %rax
jne 0x6364
movq 0x20(%rbx), %r12
movq 0x28(%rbx), %r15
leaq -0x58(%rbp), %rsi
movq %r14, %rdi
callq 0x705c
movq %rax, %rcx
subq %r12, %r15
movl $0x90, %esi
movq %r15, %rax
cqto
idivq %rsi
movl %eax, (%rcx)
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
cmpl %eax, 0xb0(%rbx)
jge 0x62a5
movl %eax, 0xb0(%rbx)
cmpq $0x0, -0x88(%rbp)
leaq 0x1d036(%rip), %rax     # 0x232ea
leaq 0x1d02e(%rip), %rsi     # 0x232e9
cmoveq %rax, %rsi
movq %r13, %rdi
callq 0x4630
leaq -0x58(%rbp), %rsi
movq %r13, %rdi
callq 0x4660
leaq 0x20(%rbx), %rdi
leaq -0x100(%rbp), %rsi
callq 0x70c6
leaq -0x70(%rbp), %rdi
callq 0x54b6
leaq -0x58(%rbp), %rdi
callq 0x46b8
leaq -0x100(%rbp), %rdi
callq 0x5652
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2eca3(%rip), %rax     # 0x34fc0
movq (%rax), %rdi
movq -0x70(%rbp), %rax
movq (%rax,%r14), %rdx
movzbl -0x30(%rbp), %ecx
movq -0x38(%rbp), %rax
movq (%rax), %r8
leaq 0x1cf42(%rip), %rsi     # 0x2327c
xorl %eax, %eax
callq 0x4480
callq 0x41e0
movq 0x2ec73(%rip), %rax     # 0x34fc0
movq (%rax), %rdi
movzbl -0x29(%rbp), %edx
leaq 0x1cf4d(%rip), %rsi     # 0x232a8
xorl %eax, %eax
callq 0x4480
jmp 0x6380
movq 0x2ec55(%rip), %rax     # 0x34fc0
movq (%rax), %rdi
movq -0x58(%rbp), %rdx
leaq 0x1cf4f(%rip), %rsi     # 0x232c8
xorl %eax, %eax
callq 0x4480
pushq $0x1
popq %rdi
callq 0x43c0
jmp 0x639a
jmp 0x638e
jmp 0x639a
movq %rax, %rbx
jmp 0x63a6
jmp 0x6395
movq %rax, %rbx
jmp 0x63af
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x54b6
leaq -0x58(%rbp), %rdi
callq 0x46b8
leaq -0x100(%rbp), %rdi
callq 0x5652
movq %rbx, %rdi
callq 0x45f0
nop