// File: /workspace/github_cpp_makefile_star2_O3/auton1[P]viterbi/header.cpp
// Function: header::parse_header(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void header::parse_header(const string &line)
{
	// #CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	(FORMAT	NA00001 NA00002 ... )
	if (has_header == true)
		LOG.warning("Multiple Header lines.");

	has_header = true;
	istringstream header(line);
	int count = 0;
	string tmp_str;
	unsigned int N_header_indv = 0;
	has_genotypes = false;
	while (!header.eof())
	{
		getline(header, tmp_str, '\t');
		switch (count)
		{
			case 0: if (tmp_str != "#CHROM") LOG.warning("First Header entry should be #CHROM: " + tmp_str); break;
			case 1: if (tmp_str != "POS") LOG.warning("Second Header entry should be POS: " + tmp_str); break;
			case 2: if (tmp_str != "ID") LOG.warning("Third Header entry should be ID: " + tmp_str); break;
			case 3: if (tmp_str != "REF") LOG.warning("Fourth Header entry should be REF: " + tmp_str); break;
			case 4: if (tmp_str != "ALT") LOG.warning("Fifth Header entry should be ALT: " + tmp_str); break;
			case 5: if (tmp_str != "QUAL") LOG.warning("Sixth Header entry should be QUAL: " + tmp_str); break;
			case 6: if (tmp_str != "FILTER") LOG.warning("Seventh Header entry should be FILTER: " + tmp_str); break;
			case 7: if (tmp_str != "INFO") LOG.warning("Eighth Header entry should be INFO: " + tmp_str); break;
			case 8:
				if (tmp_str != "FORMAT")
					LOG.warning("Ninth Header entry should be FORMAT: " + tmp_str);
				else
					has_genotypes = true;
				break;
			default:
			{
				if (count <= 8)
					LOG.error("Incorrectly formatted header.");
				indv.push_back(tmp_str);
				N_header_indv++;
			}
			break;
		}
		count++;
	}
	N_indv = N_header_indv;

	if ((has_genotypes == true ) && (N_indv == 0))
		LOG.warning("FORMAT field without genotypes?");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x6(%rdi)
jne 0x1647b
leaq 0x178(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x225cb(%rip), %rsi     # 0x38a0e
leaq 0x225da(%rip), %rdx     # 0x38a24
leaq 0x168(%rsp), %r15
movq %r15, %rdi
callq 0xc85e
leaq 0x33047(%rip), %rdi     # 0x494a8
movq %r15, %rsi
callq 0x37146
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x1647b
callq 0x5410
movb $0x1, 0x6(%rbx)
leaq 0x188(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x5730
leaq 0x138(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
xorl %ebp, %ebp
movb %bpl, (%r12)
movb %bpl, 0x5(%rbx)
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x1a8(%rsp,%rax)
jne 0x1688a
leaq 0x10(%rbx), %rax
movq %rax, (%rsp)
leaq 0x188(%rsp), %r15
leaq 0x128(%rsp), %r12
leaq 0x2247d(%rip), %r14     # 0x38968
xorl %r13d, %r13d
movq %r15, %rdi
movq %r12, %rsi
movl $0x9, %edx
callq 0x5830
cmpl $0x8, %r13d
ja 0x167f3
movl %r13d, %eax
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq %r12, %rdi
leaq 0x22507(%rip), %rsi     # 0x38a25
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0x108(%rsp), %rdi
leaq 0x224f2(%rip), %rsi     # 0x38a2c
movq %r12, %rdx
callq 0xb777
leaq 0x32f5f(%rip), %rdi     # 0x494a8
leaq 0x108(%rsp), %rsi
callq 0x37146
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x22552(%rip), %rsi     # 0x38ac7
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0x88(%rsp), %rdi
leaq 0x2253a(%rip), %rsi     # 0x38acb
movq %r12, %rdx
callq 0xb777
leaq 0x32f08(%rip), %rdi     # 0x494a8
leaq 0x88(%rsp), %rsi
callq 0x37146
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x224ae(%rip), %rsi     # 0x38a7a
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0xc8(%rsp), %rdi
leaq 0x22495(%rip), %rsi     # 0x38a7d
movq %r12, %rdx
callq 0xb777
leaq 0x32eb1(%rip), %rdi     # 0x494a8
leaq 0xc8(%rsp), %rsi
callq 0x37146
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x2247c(%rip), %rsi     # 0x38a9f
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0xa8(%rsp), %rdi
leaq 0x22464(%rip), %rsi     # 0x38aa3
movq %r12, %rdx
callq 0xb777
leaq 0x32e5a(%rip), %rdi     # 0x494a8
leaq 0xa8(%rsp), %rsi
callq 0x37146
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x23d8a(%rip), %rsi     # 0x3a404
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0x28(%rsp), %rdi
leaq 0x224b3(%rip), %rsi     # 0x38b46
movq %r12, %rdx
callq 0xb777
leaq 0x32e06(%rip), %rdi     # 0x494a8
leaq 0x28(%rsp), %rsi
callq 0x37146
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x2238d(%rip), %rsi     # 0x38a52
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0xe8(%rsp), %rdi
leaq 0x22375(%rip), %rsi     # 0x38a56
movq %r12, %rdx
callq 0xb777
leaq 0x32db8(%rip), %rdi     # 0x494a8
leaq 0xe8(%rsp), %rsi
callq 0x37146
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x223d2(%rip), %rsi     # 0x38aee
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0x68(%rsp), %rdi
leaq 0x223be(%rip), %rsi     # 0x38af3
movq %r12, %rdx
callq 0xb777
leaq 0x32d64(%rip), %rdi     # 0x494a8
leaq 0x68(%rsp), %rsi
callq 0x37146
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x223b0(%rip), %rsi     # 0x38b17
callq 0x50e0
testl %eax, %eax
je 0x16807
leaq 0x48(%rsp), %rdi
leaq 0x2239e(%rip), %rsi     # 0x38b1e
movq %r12, %rdx
callq 0xb777
leaq 0x32d19(%rip), %rdi     # 0x494a8
leaq 0x48(%rsp), %rsi
callq 0x37146
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
jmp 0x167e7
movq %r12, %rdi
leaq 0x223bc(%rip), %rsi     # 0x38b6b
callq 0x50e0
testl %eax, %eax
je 0x16803
leaq 0x8(%rsp), %rdi
leaq 0x223ae(%rip), %rsi     # 0x38b72
movq %r12, %rdx
callq 0xb777
leaq 0x32cd5(%rip), %rdi     # 0x494a8
leaq 0x8(%rsp), %rsi
callq 0x37146
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x16807
callq 0x5410
jmp 0x16807
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x13084
incl %ebp
jmp 0x16807
movb $0x1, 0x5(%rbx)
incl %r13d
movq 0x188(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x1a8(%rsp,%rax)
je 0x164ee
movl %ebp, 0x58(%rbx)
testl %ebp, %ebp
sete %al
andb 0x5(%rbx), %al
cmpb $0x1, %al
leaq 0x138(%rsp), %r12
jne 0x16891
leaq 0x158(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2234a(%rip), %rsi     # 0x38b98
leaq 0x22362(%rip), %rdx     # 0x38bb7
leaq 0x148(%rsp), %rdi
callq 0xc85e
leaq 0x32c3f(%rip), %rdi     # 0x494a8
leaq 0x148(%rsp), %rsi
callq 0x37146
movq 0x148(%rsp), %rdi
cmpq %r14, %rdi
je 0x16891
callq 0x5410
jmp 0x16891
movl $0x0, 0x58(%rbx)
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x168a3
callq 0x5410
movq 0x3270e(%rip), %rsi     # 0x48fb8
leaq 0x188(%rsp), %rdi
callq 0x5610
leaq 0x200(%rsp), %rdi
callq 0x5100
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x148(%rsp), %rdi
cmpq %r14, %rdi
jne 0x169bd
jmp 0x169c7
jmp 0x169c4
movq %rax, %rbx
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x16a02
callq 0x5410
jmp 0x16a02
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0x169b8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x169c7
callq 0x5410
jmp 0x169c7
movq %rax, %rbx
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x169e1
callq 0x5410
movq 0x325d0(%rip), %rsi     # 0x48fb8
leaq 0x188(%rsp), %rdi
callq 0x5610
leaq 0x200(%rsp), %rdi
callq 0x5100
movq %rbx, %rdi
callq 0x57d0