// File: /workspace/github_c_makefile_star2_O2/waynebhayes[P]SAHap/src/InputReader.cpp
// Function: SAHap::WIFInputReader::parseRead(std::unordered_map<unsigned long, unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<std::pair<unsigned long const, unsigned long>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Read WIFInputReader::parseRead(unordered_map<dnapos_t, dnapos_t>& index, string line) {
	Read result;
	istringstream iss(line);
	string buf;
	while (getline(iss, buf, ':')) {
		istringstream siss(buf);
		char a;
		siss >> a;
		if (a == '#') break;

		Site snp = WIFInputReader::parseSNP(buf);
		if (index.find(snp.pos) == index.end()) {
			// not a known site
			dnapos_t matrixPos = index.size();
			index.insert(make_pair(snp.pos, matrixPos));
			snp.pos = matrixPos;
		} else {
			// known site
			// index[actual pos] = matrix pos
			snp.pos = index[snp.pos];
		}

		result.range.start = min(result.range.start, snp.pos);
		result.range.end = max(result.range.end, snp.pos);

		result.sites.push_back(snp);
	}

	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x7fffffff, 0x20(%rdi) # imm = 0x7FFFFFFF
andq $0x0, 0x28(%rdi)
leaq 0x78(%rsp), %rdi
pushq $0x8
popq %rax
movq %rdx, %rsi
movl %eax, %edx
callq 0x23d0
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x38(%rsp), %r13
leaq 0x1f8(%rsp), %r12
leaq 0x58(%rsp), %rbp
leaq 0x10(%rsp), %r15
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
pushq $0x3a
popq %rdx
callq 0x2420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x8107
movq %r12, %rdi
movq %r13, %rsi
pushq $0x8
popq %rdx
callq 0x23d0
movq %r12, %rdi
leaq 0xf(%rsp), %rsi
callq 0x22c0
cmpb $0x23, 0xf(%rsp)
je 0x80fa
movq %rbp, %rdi
movq %r13, %rsi
callq 0x22e0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x83b4
movq %rbp, %rdi
callq 0x20d0
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
callq 0x91e4
testq %rax, %rax
je 0x809a
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
callq 0x8dbe
movq (%rax), %r15
jmp 0x80ba
movq 0x18(%r14), %r15
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r15, 0x30(%rsp)
movq %r14, %rdi
leaq 0x28(%rsp), %rsi
callq 0x9202
movq %r15, 0x18(%rsp)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
cmpq %rax, %r15
cmovbq %r15, %rax
movq %rax, 0x20(%rbx)
cmpq %r15, %rcx
cmovaq %rcx, %r15
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x8638
movq %r12, %rdi
callq 0x20e0
jmp 0x8010
leaq 0x1f8(%rsp), %rdi
callq 0x20e0
leaq 0x38(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20e0
movq %rbx, %rax
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x8175
jmp 0x8151
jmp 0x8151
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0x20d0
jmp 0x8154
jmp 0x8151
jmp 0x814c
movq %rax, %r14
jmp 0x8161
movq %rax, %r14
leaq 0x1f8(%rsp), %rdi
callq 0x20e0
leaq 0x38(%rsp), %rdi
callq 0x20d0
leaq 0x78(%rsp), %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x5a48
movq %r14, %rdi
callq 0x2400
nop