// File: schneebergerlab[P]DrLink/find_intersection.cpp
// Function: get_CO_reads(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>>, int, 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, int>>>*)
bool get_CO_reads(string coreadfile, map<string, int>* reads)
{
    ifstream ifp;
    ifp.open(coreadfile.c_str(), ios::in);
    if(!ifp.is_open())
    {
        cout << "   Error: cannot find file " << coreadfile << endl;
        return false;
    }
    while(ifp.good())
    {
        string line("");
        getline(ifp, line);
        if(line.size()==0 || line[0]=='#') continue;
        //00000000	0	1109895	1110045	2	J00137:120:HNWTCBBXX:2:1112:28970:19021	151M
        vector<string> lineinfo = split_string(line, '\t');
        (*reads).insert(std::pair<string, int>(lineinfo[5], 1));
    }
    ifp.close();
    return true;
}

// Assembly:
subq $0x318, %rsp            # imm = 0x318
movq %rdi, 0x50(%rsp)
movq %rdi, 0x308(%rsp)
movq %rsi, 0x300(%rsp)
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x5500
movq 0x50(%rsp), %rdi
callq 0x51d0
movq 0x58(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x52c0
jmp 0x3dc0c
leaq 0xf8(%rsp), %rdi
callq 0x56f0
movb %al, 0x4f(%rsp)
jmp 0x3dc1f
movb 0x4f(%rsp), %al
testb $0x1, %al
jne 0x3dc9d
jmp 0x3dc29
movq 0x47398(%rip), %rdi     # 0x84fc8
leaq 0x2c359(%rip), %rsi     # 0x69f90
callq 0x5460
movq %rax, 0x40(%rsp)
jmp 0x3dc43
movq 0x50(%rsp), %rsi
movq 0x40(%rsp), %rdi
callq 0x53e0
movq %rax, 0x38(%rsp)
jmp 0x3dc59
movq 0x38(%rsp), %rdi
movq 0x4734b(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x3dc6c
movb $0x0, 0x317(%rsp)
movl $0x1, 0xe8(%rsp)
jmp 0x3dee9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x3df07
jmp 0x3dc9f
movq 0xf8(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0xf8(%rsp,%rax), %rdi
callq 0x5760
movb %al, 0x37(%rsp)
jmp 0x3dcbe
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x3dccb
jmp 0x3dec7
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x57c0
movq 0x28(%rsp), %rdx
leaq 0x2ceab(%rip), %rsi     # 0x6ab94
leaq 0xc8(%rsp), %rdi
callq 0x6880
jmp 0x3dcf8
leaq 0xc7(%rsp), %rdi
callq 0x54d0
leaq 0xf8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x50c0
jmp 0x3dd1c
leaq 0xc8(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
je 0x3dd54
xorl %eax, %eax
movl %eax, %esi
leaq 0xc8(%rsp), %rdi
callq 0x5880
movq %rax, 0x20(%rsp)
jmp 0x3dd47
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x3dda3
movl $0x2, 0xe8(%rsp)
jmp 0x3de53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xc7(%rsp), %rdi
callq 0x54d0
jmp 0x3df07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x3deb8
movb $0x9, 0xa7(%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa7(%rsp), %rdx
callq 0x60790
jmp 0x3ddca
movq 0x300(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xa8(%rsp), %rdi
movl $0x5, %esi
callq 0x88f0
movq %rax, %rsi
movl $0x1, 0x74(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x74(%rsp), %rdx
callq 0x10580
jmp 0x3de05
movq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x10530
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x3de1f
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movb %al, 0x68(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x105c0
leaq 0xa8(%rsp), %rdi
callq 0x8910
movl $0x0, 0xe8(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x58b8
movl 0xe8(%rsp), %eax
testl %eax, %eax
je 0x3de72
jmp 0x3de6d
jmp 0x3dc9f
jmp 0x3dc9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x3deab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x105c0
leaq 0xa8(%rsp), %rdi
callq 0x8910
leaq 0xc8(%rsp), %rdi
callq 0x58b8
jmp 0x3df07
leaq 0xf8(%rsp), %rdi
callq 0x50d0
jmp 0x3ded6
movb $0x1, 0x317(%rsp)
movl $0x1, 0xe8(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x5100
movb 0x317(%rsp), %al
andb $0x1, %al
addq $0x318, %rsp            # imm = 0x318
retq
leaq 0xf8(%rsp), %rdi
callq 0x5100
movq 0xf0(%rsp), %rdi
callq 0x57b0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)