// File: millanek[P]evo/process_vcf_utils.cpp
// Function: readMultiFastaToMap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::map<string,string> readMultiFastaToMap(const string& fileName) {
    std::map<string, string> fastaSeqs;
    string line;
    std::ifstream* fastaFile = new std::ifstream(fileName.c_str());
    getline(*fastaFile, line);
    std::vector<std::string> fields = split(line, ' ');
    string currentScaffold = fields[0].substr(1,string::npos);
    fastaSeqs[currentScaffold] = ""; fastaSeqs[currentScaffold].reserve(50000000);
    while (getline(*fastaFile, line)) {
        if (line[0] != '>') {
            fastaSeqs[currentScaffold].append(line);
        } else {
            int l = (int)fastaSeqs[currentScaffold].length();
            std::cerr << currentScaffold << " length: " << l << std::endl;
            fastaSeqs[currentScaffold].shrink_to_fit();
            std::vector<std::string> fields = split(line, ' ');
            currentScaffold = fields[0].substr(1,string::npos);
            fastaSeqs[currentScaffold] = ""; fastaSeqs[currentScaffold].reserve(50000000);
        }
    }
    std::cerr << currentScaffold << " length: " << (int)fastaSeqs[currentScaffold].length() << std::endl;
    return fastaSeqs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0xe0(%rbp)
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x584b0
leaq -0x38(%rbp), %rdi
callq 0xa820
movl $0x208, %edi            # imm = 0x208
callq 0xa5d0
movq %rax, -0xd0(%rbp)
jmp 0x81809
movq -0x10(%rbp), %rdi
callq 0xa220
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0xab90
jmp 0x81828
movq -0xd0(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa0d0
jmp 0x81842
leaq -0x68(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x20, %edx
callq 0x7bbe0
jmp 0x81856
xorl %eax, %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0x88(%rbp), %rdi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0xa5f0
jmp 0x81880
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x584d0
movq %rax, -0xe8(%rbp)
jmp 0x8189c
movq -0xe8(%rbp), %rdi
leaq 0xb4635(%rip), %rsi     # 0x135edf
callq 0xa810
jmp 0x818b1
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x584d0
movq %rax, -0xf0(%rbp)
jmp 0x818cd
movq -0xf0(%rbp), %rdi
movl $0x2faf080, %esi        # imm = 0x2FAF080
callq 0xa980
jmp 0x818e0
jmp 0x818e2
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xa0d0
movq %rax, -0xf8(%rbp)
jmp 0x818f8
movq -0xf8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xa740
movb %al, -0xf9(%rbp)
jmp 0x81916
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0x81925
jmp 0x81b95
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0xac60
movq %rax, -0x108(%rbp)
jmp 0x8193b
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
je 0x819d6
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x584d0
movq %rax, -0x110(%rbp)
jmp 0x8196a
movq -0x110(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xac20
jmp 0x8197c
jmp 0x81b90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x81c60
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x208, %esi            # imm = 0x208
callq 0xa5e0
jmp 0x81c60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x81c57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x81c4b
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x584d0
movq %rax, -0x118(%rbp)
jmp 0x819f2
movq -0x118(%rbp), %rdi
callq 0xa930
movl %eax, -0x8c(%rbp)
movq 0x1175e5(%rip), %rdi    # 0x198ff0
leaq -0x88(%rbp), %rsi
callq 0xa520
movq %rax, -0x120(%rbp)
jmp 0x81a20
movq -0x120(%rbp), %rdi
leaq 0xbe070(%rip), %rsi     # 0x13fa9e
callq 0xa5c0
movq %rax, -0x128(%rbp)
jmp 0x81a3c
movq -0x128(%rbp), %rdi
movl -0x8c(%rbp), %esi
callq 0xab20
movq %rax, -0x130(%rbp)
jmp 0x81a57
movq -0x130(%rbp), %rdi
movq 0x117523(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x81a6c
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x584d0
movq %rax, -0x138(%rbp)
jmp 0x81a88
movq -0x138(%rbp), %rdi
callq 0xac30
leaq -0xa8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x20, %edx
callq 0x7bbe0
jmp 0x81aab
xorl %eax, %eax
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x3d940
movq %rax, %rsi
leaq -0xc8(%rbp), %rdi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0xa5f0
jmp 0x81ad8
leaq -0x88(%rbp), %rdi
movq %rdi, -0x148(%rbp)
leaq -0xc8(%rbp), %rsi
movq %rsi, -0x150(%rbp)
callq 0xa710
movq -0x150(%rbp), %rdi
callq 0xac88
movq -0xe0(%rbp), %rdi
movq -0x148(%rbp), %rsi
callq 0x584d0
movq %rax, -0x140(%rbp)
jmp 0x81b21
movq -0x140(%rbp), %rdi
leaq 0xb43b0(%rip), %rsi     # 0x135edf
callq 0xa810
jmp 0x81b36
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x584d0
movq %rax, -0x158(%rbp)
jmp 0x81b52
movq -0x158(%rbp), %rdi
movl $0x2faf080, %esi        # imm = 0x2FAF080
callq 0xa980
jmp 0x81b65
leaq -0xa8(%rbp), %rdi
callq 0x3dfa0
jmp 0x81b90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3dfa0
jmp 0x81c4b
jmp 0x818e2
movq 0x117454(%rip), %rdi    # 0x198ff0
leaq -0x88(%rbp), %rsi
callq 0xa520
movq %rax, -0x160(%rbp)
jmp 0x81bb1
movq -0x160(%rbp), %rdi
leaq 0xbdedf(%rip), %rsi     # 0x13fa9e
callq 0xa5c0
movq %rax, -0x168(%rbp)
jmp 0x81bcd
movq -0xe0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x584d0
movq %rax, -0x170(%rbp)
jmp 0x81be9
movq -0x170(%rbp), %rdi
callq 0xa930
movq -0x168(%rbp), %rdi
movl %eax, %esi
callq 0xab20
movq %rax, -0x178(%rbp)
jmp 0x81c0c
movq -0x178(%rbp), %rdi
movq 0x11736e(%rip), %rsi    # 0x198f88
callq 0xa610
jmp 0x81c21
movb $0x1, -0x11(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xac88
leaq -0x68(%rbp), %rdi
callq 0x3dfa0
leaq -0x38(%rbp), %rdi
callq 0xac88
testb $0x1, -0x11(%rbp)
jne 0x81c83
jmp 0x81c77
leaq -0x88(%rbp), %rdi
callq 0xac88
leaq -0x68(%rbp), %rdi
callq 0x3dfa0
leaq -0x38(%rbp), %rdi
callq 0xac88
movq -0xe0(%rbp), %rdi
callq 0x58620
jmp 0x81c93
movq -0xe0(%rbp), %rdi
callq 0x58620
movq -0xd8(%rbp), %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0xab50
nopl (%rax)