// File: /workspace/github_c_makefile_star2_O1/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
movq $0x0, 0x28(%rdi)
leaq 0x1f8(%rsp), %rdi
movq %rdx, %rsi
movl $0x8, %edx
callq 0x2400
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x20(%rsp), %r12
leaq 0x30(%rsp), %rbp
leaq 0x78(%rsp), %r15
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 0x8cbc
movq %r15, %rdi
movq %rbp, %rsi
movl $0x8, %edx
callq 0x2400
movq %r15, %rdi
leaq 0xf(%rsp), %rsi
callq 0x22f0
movb 0xf(%rsp), %r13b
cmpb $0x23, %r13b
je 0x8c9e
movq %r12, 0x10(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x940c
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x910e
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x8b84
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2290
movq 0x58(%rsp), %rcx
movq (%r14), %rdi
movq 0x8(%r14), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x8be2
movq (%rdx), %r9
movq %rdx, %rax
cmpq 0x8(%r9), %rcx
je 0x8be2
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x8be0
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x8be2
movq %r10, %rax
cmpq %rdi, %rcx
jne 0x8bb5
jmp 0x8be2
xorl %eax, %eax
testq %rax, %rax
je 0x8bff
cmpq $0x0, (%rax)
je 0x8bff
movq %r14, %rdi
leaq 0x58(%rsp), %rsi
callq 0x9b56
movq (%rax), %r12
jmp 0x8c1a
movq 0x18(%r14), %r12
movq %rcx, 0x68(%rsp)
movq %r12, 0x70(%rsp)
movq %r14, %rdi
leaq 0x68(%rsp), %rsi
callq 0x9ffc
movq %r12, 0x58(%rsp)
movq 0x8(%rbx), %rsi
movq 0x20(%rbx), %rax
cmpq %rax, %r12
cmovbq %r12, %rax
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rax
cmpq %r12, %rax
cmovaq %rax, %r12
movq %r12, 0x28(%rbx)
cmpq 0x10(%rbx), %rsi
je 0x8c64
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x8(%rbx)
leaq 0x20(%rsp), %r12
jmp 0x8c76
movq %rbx, %rdi
leaq 0x50(%rsp), %rdx
callq 0xa0c8
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq 0x7340(%rip), %rsi      # 0xffc0
callq 0x2340
leaq 0xf0(%rsp), %rdi
callq 0x20b0
cmpb $0x23, %r13b
jne 0x8aef
jmp 0x8cbc
movq 0x731b(%rip), %rsi      # 0xffc0
leaq 0x78(%rsp), %rdi
callq 0x2340
leaq 0xf0(%rsp), %rdi
callq 0x20b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x8cd8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2290
movq 0x72e1(%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
movq %rax, %r14
jmp 0x8d9b
jmp 0x8d3d
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x8d40
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2290
jmp 0x8d40
jmp 0x8d3d
jmp 0x8d38
movq %rax, %r14
jmp 0x8d5e
movq %rax, %r14
movq 0x7279(%rip), %rsi      # 0xffc0
leaq 0x78(%rsp), %rdi
callq 0x2340
leaq 0xf0(%rsp), %rdi
callq 0x20b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x8d7a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2290
movq 0x723f(%rip), %rsi      # 0xffc0
leaq 0x1f8(%rsp), %rdi
callq 0x2340
leaq 0x270(%rsp), %rdi
callq 0x20b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x8daf
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2290
movq %r14, %rdi
callq 0x2450
nop