// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x7fffffff, 0x20(%rdi) # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movq %r14, 0x28(%rdi)
leaq 0x1f8(%rsp), %rdi
movq %rdx, %rsi
movl $0x8, %edx
callq 0x2400
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
movq %r14, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x58(%rsp), %r13
leaq 0x28(%rsp), %rbp
leaq 0x78(%rsp), %r14
leaq 0x48(%rsp), %r12
leaq 0x1f8(%rsp), %rdi
movq %rbp, %rsi
movl $0x3a, %edx
callq 0x2480
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x8cdf
movq %r14, %rdi
movq %rbp, %rsi
movl $0x8, %edx
callq 0x2400
movq %r14, %rdi
leaq 0xf(%rsp), %rsi
callq 0x22f0
cmpb $0x23, 0xf(%rsp)
je 0x8cc1
movq %r13, 0x48(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x9426
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x912a
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x8c00
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2290
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
callq 0x9f88
testq %rax, %rax
je 0x8c24
movq %r15, %rdi
leaq 0x18(%rsp), %rsi
callq 0x9b36
movq (%rax), %r13
jmp 0x8c44
movq 0x18(%r15), %r13
movq 0x18(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %r13, 0x70(%rsp)
movq %r15, %rdi
leaq 0x68(%rsp), %rsi
callq 0x9fe4
movq %r13, 0x18(%rsp)
movq 0x8(%rbx), %rsi
movq 0x20(%rbx), %rax
cmpq %rax, %r13
cmovbq %r13, %rax
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rax
cmpq %r13, %rax
cmovaq %rax, %r13
movq %r13, 0x28(%rbx)
cmpq 0x10(%rbx), %rsi
je 0x8c8e
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x8(%rbx)
leaq 0x58(%rsp), %r13
jmp 0x8ca0
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0xa09c
leaq 0x58(%rsp), %r13
movq %r14, %rdi
movq 0x7316(%rip), %rsi      # 0xffc0
callq 0x2340
leaq 0xf0(%rsp), %rdi
callq 0x20b0
jmp 0x8b73
movq 0x72f8(%rip), %rsi      # 0xffc0
leaq 0x78(%rsp), %rdi
callq 0x2340
leaq 0xf0(%rsp), %rdi
callq 0x20b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8cfb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2290
movq 0x72be(%rip), %rsi      # 0xffc0
leaq 0x1f8(%rsp), %rdi
callq 0x2340
leaq 0x270(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8d5a
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x8d5d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2290
jmp 0x8d5d
jmp 0x8d5a
jmp 0x8d5a
jmp 0x8d55
movq %rax, %r14
jmp 0x8d7b
movq %rax, %r14
movq 0x725c(%rip), %rsi      # 0xffc0
leaq 0x78(%rsp), %rdi
callq 0x2340
leaq 0xf0(%rsp), %rdi
callq 0x20b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8d97
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2290
movq 0x7222(%rip), %rsi      # 0xffc0
leaq 0x1f8(%rsp), %rdi
callq 0x2340
leaq 0x270(%rsp), %rdi
callq 0x20b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8dcc
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2290
movq %r14, %rdi
callq 0x2450