// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::write_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>>> const&, bool, int)
int
Unigrams::write_vocab(string fname,
                      const map<string, flt_type> &vocab,
                      bool count_style,
                      int num_decimals)
{
    SimpleFileOutput vocabfile(fname);

    vector<pair<string, flt_type> > sorted_vocab;
    sort_vocab(vocab, sorted_vocab);
    for (unsigned int i=0; i<sorted_vocab.size(); i++)
        if (count_style)
            vocabfile << sorted_vocab[i].first << "\t" << sorted_vocab[i].second << "\n";
        else
            vocabfile << sorted_vocab[i].second << " " << sorted_vocab[i].first << "\n";
    vocabfile.close();

    return vocab.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edx, -0x3c(%rbp)
movq %rsi, %r14
movq %rdi, %rsi
leaq -0xc8(%rbp), %rbx
movq %rbx, %rdi
callq 0x4460
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x5864
leaq -0xc8(%rbp), %rdi
callq 0x46b8
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
pushq $0x1
popq %rdx
movq %r14, -0x68(%rbp)
movq %r14, %rdi
callq 0x1bfa0
xorl %r14d, %r14d
leaq -0xa8(%rbp), %r13
leaq -0x88(%rbp), %r15
movl %r14d, %r14d
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rax
subq %rsi, %rax
cqto
pushq $0x28
popq %rcx
idivq %rcx
cmpq %r14, %rax
jbe 0x1bf0b
cmpb $0x0, -0x3c(%rbp)
je 0x1be8e
imulq $0x28, %r14, %rbx
addq %rbx, %rsi
leaq -0x38(%rbp), %rdi
callq 0x599c
movq %rax, %r12
movq %r13, %rdi
leaq 0x76e1(%rip), %rsi      # 0x23526
leaq -0x2a(%rbp), %rdx
callq 0x4140
movq %r12, %rdi
movq %r13, %rsi
callq 0x599c
movq -0x60(%rbp), %rcx
movsd 0x20(%rcx,%rbx), %xmm0
movq %rax, %rdi
callq 0x5a44
movq %rax, %r12
movq %r15, %rdi
leaq 0x74da(%rip), %rsi      # 0x23352
leaq -0x29(%rbp), %rdx
callq 0x4140
movq %r12, %rdi
movq %r15, %rsi
callq 0x599c
jmp 0x1bef3
imulq $0x28, %r14, %r12
movsd 0x20(%rsi,%r12), %xmm0
leaq -0x38(%rbp), %rdi
callq 0x5a44
movq %rax, %rbx
movq %r13, %rdi
leaq 0x74b9(%rip), %rsi      # 0x23368
leaq -0x2a(%rbp), %rdx
callq 0x4140
movq %rbx, %rdi
movq %r13, %rsi
callq 0x599c
addq -0x60(%rbp), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x599c
movq %rax, %rbx
movq %r15, %rdi
leaq 0x7473(%rip), %rsi      # 0x23352
leaq -0x29(%rbp), %rdx
callq 0x4140
movq %rbx, %rdi
movq %r15, %rsi
callq 0x599c
movq %r15, %rdi
callq 0x46b8
movq %r13, %rdi
callq 0x46b8
incl %r14d
jmp 0x1be03
leaq -0x38(%rbp), %rdi
callq 0x596c
movq -0x68(%rbp), %rax
movl 0x28(%rax), %ebx
leaq -0x60(%rbp), %rdi
callq 0x1d9d2
leaq -0x38(%rbp), %rdi
callq 0x5958
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x46b8
jmp 0x1bf97
jmp 0x1bf82
jmp 0x1bf71
jmp 0x1bf5a
jmp 0x1bf71
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x46b8
jmp 0x1bf74
jmp 0x1bf82
jmp 0x1bf82
jmp 0x1bf71
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x46b8
jmp 0x1bf85
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x1d9d2
leaq -0x38(%rbp), %rdi
callq 0x5958
movq %rbx, %rdi
callq 0x45f0
nop