// File: schneebergerlab[P]DrLink/detect_recombsite.cpp
// Function: get_chr_num_ii(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int get_chr_num_ii(string marker_file)
{
    // here we get the number of chrs in the given marker list
    ifstream ifp;
    if(!ifp.good() )
    {
        cout << "   warning: file not found. " << endl;
        return 0;
    }
    map<string, int> chrs;
    while(ifp.good())
    {
        string line("");
        getline(ifp, line);
        if(line.size()==0 || line[0]=='#') continue;
        vector<string> lineinfo = split_string(line, '\t');
        string chrid = lineinfo[1];
        if(chrs.find(chrid) ==chrs.end() )
        {
           chrs.insert(std::pair<string, int>(chrid, 1) );
        }
    }
    return chrs.size();
}

// Assembly:
subq $0x358, %rsp            # imm = 0x358
movq %rdi, 0x348(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x5500
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x140(%rsp,%rax), %rdi
callq 0x5760
movb %al, 0x47(%rsp)
jmp 0x2c9ab
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x2ca16
jmp 0x2c9b5
movq 0x5860c(%rip), %rdi     # 0x84fc8
leaq 0x3d2ef(%rip), %rsi     # 0x69cb2
callq 0x5460
movq %rax, 0x38(%rsp)
jmp 0x2c9cf
movq 0x38(%rsp), %rdi
movq 0x585d5(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x2c9e2
movl $0x0, 0x354(%rsp)
movl $0x1, 0x130(%rsp)
jmp 0x2cd41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x2cd5d
leaq 0x100(%rsp), %rdi
callq 0xfb90
movq 0x140(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x140(%rsp,%rax), %rdi
callq 0x5760
movb %al, 0x37(%rsp)
jmp 0x2ca42
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x2ca4f
jmp 0x2cd04
leaq 0xdf(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x57c0
movq 0x28(%rsp), %rdx
leaq 0x3e127(%rip), %rsi     # 0x6ab94
leaq 0xe0(%rsp), %rdi
callq 0x6880
jmp 0x2ca7c
leaq 0xdf(%rsp), %rdi
callq 0x54d0
leaq 0x140(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x50c0
jmp 0x2caa0
leaq 0xe0(%rsp), %rdi
callq 0x5310
cmpq $0x0, %rax
je 0x2cad8
xorl %eax, %eax
movl %eax, %esi
leaq 0xe0(%rsp), %rdi
callq 0x5880
movq %rax, 0x20(%rsp)
jmp 0x2cacb
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x2cb40
movl $0x2, 0x130(%rsp)
jmp 0x2ccb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x2cd32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0xdf(%rsp), %rdi
callq 0x54d0
jmp 0x2cd32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x2ccf5
movb $0x9, 0xbf(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0xbf(%rsp), %rdx
callq 0x60790
jmp 0x2cb67
leaq 0xc0(%rsp), %rdi
movl $0x1, %esi
callq 0x88f0
movq %rax, %rsi
leaq 0x98(%rsp), %rdi
callq 0x51f0
jmp 0x2cb8b
leaq 0x100(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x104b0
movq %rax, 0x18(%rsp)
jmp 0x2cba7
movq 0x18(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x10500
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x104e0
testb $0x1, %al
jne 0x2cbe7
jmp 0x2cc92
movl $0x1, 0x5c(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x5c(%rsp), %rdx
callq 0x10580
jmp 0x2cc08
leaq 0x100(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x10530
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x2cc25
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movb %al, 0x50(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x105c0
jmp 0x2cc92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x2cce8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0x2ccdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x105c0
jmp 0x2ccdb
leaq 0x98(%rsp), %rdi
callq 0x58b8
leaq 0xc0(%rsp), %rdi
callq 0x8910
movl $0x0, 0x130(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x58b8
movl 0x130(%rsp), %eax
testl %eax, %eax
je 0x2ccd6
jmp 0x2ccd1
jmp 0x2ca23
jmp 0x2ca23
leaq 0x98(%rsp), %rdi
callq 0x58b8
leaq 0xc0(%rsp), %rdi
callq 0x8910
leaq 0xe0(%rsp), %rdi
callq 0x58b8
jmp 0x2cd32
leaq 0x100(%rsp), %rdi
callq 0x2de80
movl %eax, 0x354(%rsp)
movl $0x1, 0x130(%rsp)
leaq 0x100(%rsp), %rdi
callq 0xfe20
jmp 0x2cd41
leaq 0x100(%rsp), %rdi
callq 0xfe20
jmp 0x2cd5d
leaq 0x140(%rsp), %rdi
callq 0x5100
movl 0x354(%rsp), %eax
addq $0x358, %rsp            # imm = 0x358
retq
leaq 0x140(%rsp), %rdi
callq 0x5100
movq 0x138(%rsp), %rdi
callq 0x57b0
nopw (%rax,%rax)