// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdx, -0x3d0(%rbp)
movq %rdi, -0x3e0(%rbp)
movq %rdi, %rax
movq %rax, -0x3d8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x16a30
movq -0x3d0(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
movl $0x8, %edx
callq 0x23e0
jmp 0x15c42
leaq -0x1d0(%rbp), %rdi
callq 0x2300
leaq -0x1a0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
movl $0x3a, %edx
callq 0x2450
movq %rax, -0x3e8(%rbp)
jmp 0x15c6f
movq -0x3e8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x22c0
movb %al, -0x3e9(%rbp)
jmp 0x15c8d
movb -0x3e9(%rbp), %al
testb $0x1, %al
jne 0x15c9c
jmp 0x15f4f
leaq -0x350(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
movl $0x8, %edx
callq 0x23e0
jmp 0x15cb6
leaq -0x350(%rbp), %rdi
leaq -0x351(%rbp), %rsi
callq 0x22e0
jmp 0x15ccb
movsbl -0x351(%rbp), %eax
cmpl $0x23, %eax
jne 0x15d2b
movl $0x3, -0x358(%rbp)
jmp 0x15f22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
jmp 0x15fb3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
jmp 0x15f7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
jmp 0x15f41
leaq -0x390(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x20e0
jmp 0x15d40
leaq -0x370(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x16400
jmp 0x15d55
leaq -0x390(%rbp), %rdi
callq 0x2150
movq -0x10(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x16ac0
movq %rax, -0x3f8(%rbp)
jmp 0x15d7a
movq -0x3f8(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x10(%rbp), %rdi
callq 0x16700
movq %rax, -0x3a0(%rbp)
leaq -0x398(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x16a90
testb $0x1, %al
jne 0x15db4
jmp 0x15e7d
movq -0x10(%rbp), %rdi
callq 0x58b0
movq %rax, -0x3a8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x410(%rbp)
leaq -0x368(%rbp), %rdi
leaq -0x3a8(%rbp), %rsi
callq 0x16b30
movq %rdx, -0x408(%rbp)
movq %rax, -0x400(%rbp)
jmp 0x15df2
movq -0x410(%rbp), %rdi
movq -0x408(%rbp), %rax
movq -0x400(%rbp), %rcx
movq %rcx, -0x3b8(%rbp)
movq %rax, -0x3b0(%rbp)
leaq -0x3b8(%rbp), %rsi
callq 0x16af0
movb %dl, -0x419(%rbp)
movq %rax, -0x418(%rbp)
jmp 0x15e30
movb -0x419(%rbp), %al
movq -0x418(%rbp), %rcx
movq %rcx, -0x3c8(%rbp)
movb %al, -0x3c0(%rbp)
movq -0x3a8(%rbp), %rax
movq %rax, -0x368(%rbp)
jmp 0x15ea7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x2150
jmp 0x15f41
movq -0x10(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0x16970
movq %rax, -0x428(%rbp)
jmp 0x15e96
movq -0x428(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x368(%rbp)
movq -0x3e0(%rbp), %rdi
addq $0x20, %rdi
leaq -0x368(%rbp), %rsi
callq 0x6010
movq %rax, -0x430(%rbp)
jmp 0x15ec7
movq -0x3e0(%rbp), %rdi
movq -0x430(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rdi)
addq $0x28, %rdi
leaq -0x368(%rbp), %rsi
callq 0x6050
movq %rax, -0x438(%rbp)
jmp 0x15ef5
movq -0x3e0(%rbp), %rdi
movq -0x438(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rdi)
leaq -0x370(%rbp), %rsi
callq 0x16b60
jmp 0x15f18
movl $0x0, -0x358(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x20f0
movl -0x358(%rbp), %eax
testl %eax, %eax
je 0x15f3c
jmp 0x15f3a
jmp 0x15f4f
jmp 0x15c4e
leaq -0x350(%rbp), %rdi
callq 0x20f0
jmp 0x15f7d
movb $0x1, -0x19(%rbp)
movl $0x1, -0x358(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x2150
leaq -0x1a0(%rbp), %rdi
callq 0x20f0
testb $0x1, -0x19(%rbp)
jne 0x15fa3
jmp 0x15f97
leaq -0x1d0(%rbp), %rdi
callq 0x2150
leaq -0x1a0(%rbp), %rdi
callq 0x20f0
jmp 0x15fb3
movq -0x3e0(%rbp), %rdi
callq 0x5ff0
movq -0x3d8(%rbp), %rax
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
movq -0x3e0(%rbp), %rdi
callq 0x5ff0
movq -0x1a8(%rbp), %rdi
callq 0x2410
nopl (%rax,%rax)