// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::read_vocab(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>&, int&, bool)
int
Unigrams::read_vocab(string fname,
                     map<string, flt_type> &vocab,
                     int &maxlen,
                     bool utf8)
{
    SimpleFileInput vocabfile(fname);

    string line;
    flt_type count;
    maxlen = -1;
    while (vocabfile.getline(line)) {
        stringstream ss(line);
        string word;
        ss >> count;
        ss >> word;
        vocab[word] = count;

        maxlen = max(maxlen, (int)get_factor_length(word, utf8));
    }

    return vocab.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %ecx, -0x34(%rbp)
movq %rdx, %r15
movq %rsi, -0x40(%rbp)
leaq -0xa0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rbx
movq %rbx, %rdi
callq 0x5f0a
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x6040
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x1d6b1
callq 0x4350
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0xffffffff, (%r15)     # imm = 0xFFFFFFFF
leaq -0x50(%rbp), %r14
leaq -0x90(%rbp), %r13
leaq -0x238(%rbp), %r12
leaq -0x60(%rbp), %rbx
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *(%rax)
testb %al, %al
je 0x1d7d1
movq %r12, %rdi
movq %r13, %rsi
movl $0x18, %edx
callq 0x4580
movq %r14, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
movq %r12, %rdi
leaq -0x70(%rbp), %rsi
callq 0x4240
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4450
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x1b05e
movsd -0x68(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x58(%rbp), %rax
cmpb $0x0, -0x34(%rbp)
je 0x1d792
testq %rax, %rax
je 0x1d796
xorl %edx, %edx
movq -0x60(%rbp), %rsi
xorl %ecx, %ecx
movb (%rsi,%rdx), %r8b
movl $0x1, %edi
testb %r8b, %r8b
jns 0x1d787
movl $0x4, %edi
cmpb $-0x11, %r8b
ja 0x1d787
cmpb $-0x20, %r8b
movl $0x2, %edi
sbbl $-0x1, %edi
addl %edi, %edx
incl %ecx
cmpq %rdx, %rax
ja 0x1d762
jmp 0x1d798
movl %eax, %ecx
jmp 0x1d798
xorl %ecx, %ecx
movl (%r15), %eax
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, (%r15)
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x1d7b1
callq 0x4350
movq %r12, %rdi
movq 0x167d5(%rip), %rsi     # 0x33f90
callq 0x42c0
leaq -0x1b8(%rbp), %rdi
callq 0x4110
jmp 0x1d6e1
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x1d7ee
callq 0x4350
leaq -0x30(%rbp), %rdi
callq 0x6192
movl %ebx, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0x1d876
callq 0x4350
jmp 0x1d876
jmp 0x1d823
movq %rax, %rbx
jmp 0x1d858
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r14, %rdi
je 0x1d839
callq 0x4350
movq 0x16750(%rip), %rsi     # 0x33f90
leaq -0x238(%rbp), %rdi
callq 0x42c0
leaq -0x1b8(%rbp), %rdi
callq 0x4110
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x1d86d
callq 0x4350
leaq -0x30(%rbp), %rdi
callq 0x6192
movq %rbx, %rdi
callq 0x4650