// File: auton1[P]viterbi/bcf_entry.cpp
// Function: bcf_entry::parse_basic_entry(bool, bool, bool)
void bcf_entry::parse_basic_entry(bool parse_ALT, bool parse_FILTER, bool parse_INFO)
{
	if (line.empty())
	{
		if (parse_ALT)
			set_ALT("");
		return;
	}

	if (!basic_parsed)
	{
		uint32_t n_allele_info, n_fmt_sample;
		uint32_t chrom, pos, rlen;
		uint32_t shared, indiv;
		float qual;

		line_pos = 0;

		get_number(shared, &line_pos, line);
		get_number(indiv, &line_pos, line);
		L_shared = shared;
		L_indiv = indiv;

		get_number(chrom, &line_pos, line);
		get_number(pos, &line_pos, line);
		get_number(rlen, &line_pos, line);

		qual = *reinterpret_cast<const float*>(&line[line_pos]);
		line_pos += sizeof(qual);

		get_number(n_allele_info, &line_pos, line);
		get_number(n_fmt_sample, &line_pos, line);

		N_format = n_fmt_sample >> 24;
		CHROM = entry_header.CONTIG_map[chrom].ID;
		POS = pos + 1;
		ID = get_typed_string( &line_pos, line );
		REF = get_typed_string( &line_pos, line );
		QUAL = qual;

		N_allele = n_allele_info >> 16;
		N_info = n_allele_info & (uint32_t)65535;

		ALT_pos = line_pos;
		for (unsigned int ui=1; ui<N_allele; ui++)
			skip_section(&line_pos, line);

		FILTER_pos = line_pos;
		skip_section(&line_pos, line);

		INFO_pos = line_pos;
		std::transform(REF.begin(), REF.end(), REF.begin(), ::toupper);

		basic_parsed = true;
	}
	if (parse_ALT && !parsed_ALT)
		set_ALT(N_allele);
	if (parse_FILTER && !parsed_FILTER)
		set_FILTER();
	if (parse_INFO && !parsed_INFO)
		set_INFO();
}

// Assembly:
subq $0xe8, %rsp
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movq %rdi, 0xe0(%rsp)
andb $0x1, %dl
movb %dl, 0xdf(%rsp)
andb $0x1, %cl
movb %cl, 0xde(%rsp)
andb $0x1, %al
movb %al, 0xdd(%rsp)
movq 0xe0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x3c0, %rdi            # imm = 0x3C0
callq 0x39540
testb $0x1, %al
jne 0x348d5
jmp 0x3498e
testb $0x1, 0xdf(%rsp)
je 0x34989
leaq 0xb7(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x69f0
movq 0x8(%rsp), %rdx
leaq 0x41428(%rip), %rsi     # 0x75d29
leaq 0xb8(%rsp), %rdi
callq 0x67c0
jmp 0x34910
movq 0x10(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x56680
jmp 0x34924
leaq 0xb8(%rsp), %rdi
callq 0x6b50
leaq 0xb7(%rsp), %rdi
callq 0x65f0
jmp 0x34989
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x34977
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x6b50
leaq 0xb7(%rsp), %rdi
callq 0x65f0
jmp 0x34d98
jmp 0x34d90
movq 0x10(%rsp), %rax
testb $0x1, 0x3d8(%rax)
jne 0x34d24
movq 0x10(%rsp), %rdi
movl $0x0, 0x6cc(%rdi)
movq %rdi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x8c(%rsp), %rsi
callq 0x495c0
movq 0x10(%rsp), %rdi
movq %rdi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x88(%rsp), %rsi
callq 0x495c0
movq 0x10(%rsp), %rdi
movl 0x8c(%rsp), %eax
movl %eax, 0x6c4(%rdi)
movl 0x88(%rsp), %eax
movl %eax, 0x6c8(%rdi)
movq %rdi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x98(%rsp), %rsi
callq 0x495c0
movq 0x10(%rsp), %rdi
movq %rdi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x94(%rsp), %rsi
callq 0x495c0
movq 0x10(%rsp), %rdi
movq %rdi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x90(%rsp), %rsi
callq 0x495c0
movq 0x10(%rsp), %rax
movq %rax, %rdi
addq $0x3c0, %rdi            # imm = 0x3C0
movl 0x6cc(%rax), %eax
movl %eax, %esi
callq 0x209b0
movq 0x10(%rsp), %rdi
movss (%rax), %xmm0
movss %xmm0, 0x84(%rsp)
movl 0x6cc(%rdi), %eax
addq $0x4, %rax
movl %eax, 0x6cc(%rdi)
movq %rdi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0xa0(%rsp), %rsi
callq 0x495c0
movq 0x10(%rsp), %rdi
movq %rdi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rdi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x9c(%rsp), %rsi
callq 0x495c0
movq 0x10(%rsp), %rdi
movl 0x9c(%rsp), %eax
shrl $0x18, %eax
movl %eax, 0x6bc(%rdi)
addq $0x10, %rdi
addq $0xf0, %rdi
movl 0x98(%rsp), %eax
movl %eax, 0x80(%rsp)
leaq 0x80(%rsp), %rsi
callq 0x39590
movq 0x10(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
addq $0x3e0, %rdi            # imm = 0x3E0
callq 0x6060
movq 0x10(%rsp), %rsi
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x400(%rsi)
movq %rsi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rsi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x60(%rsp), %rdi
callq 0x486b0
movq 0x10(%rsp), %rdi
addq $0x408, %rdi            # imm = 0x408
leaq 0x60(%rsp), %rsi
callq 0x66c0
leaq 0x60(%rsp), %rdi
callq 0x6b50
movq 0x10(%rsp), %rsi
movq %rsi, %rdx
addq $0x6cc, %rdx            # imm = 0x6CC
movq %rsi, %rcx
addq $0x3c0, %rcx            # imm = 0x3C0
leaq 0x40(%rsp), %rdi
callq 0x486b0
movq 0x10(%rsp), %rdi
addq $0x428, %rdi            # imm = 0x428
leaq 0x40(%rsp), %rsi
callq 0x66c0
leaq 0x40(%rsp), %rdi
callq 0x6b50
movq 0x10(%rsp), %rax
movss 0x84(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x460(%rax)
movl 0xa0(%rsp), %ecx
shrl $0x10, %ecx
movl %ecx, 0x6c0(%rax)
movl 0xa0(%rsp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
movl %ecx, 0x6b8(%rax)
movl 0x6cc(%rax), %ecx
movl %ecx, 0x6f0(%rax)
movl $0x1, 0x3c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x3c(%rsp), %eax
cmpl 0x6c0(%rcx), %eax
jae 0x34c7d
movq 0x10(%rsp), %rdi
movq %rdi, %rsi
addq $0x6cc, %rsi            # imm = 0x6CC
movq %rdi, %rdx
addq $0x3c0, %rdx            # imm = 0x3C0
callq 0x49190
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x34c41
movq 0x10(%rsp), %rdi
movl 0x6cc(%rdi), %eax
movl %eax, 0x6ec(%rdi)
movq %rdi, %rsi
addq $0x6cc, %rsi            # imm = 0x6CC
movq %rdi, %rdx
addq $0x3c0, %rdx            # imm = 0x3C0
callq 0x49190
movq 0x10(%rsp), %rdi
movl 0x6cc(%rdi), %eax
movl %eax, 0x6e8(%rdi)
addq $0x428, %rdi            # imm = 0x428
callq 0x6470
movq 0x10(%rsp), %rdi
movq %rax, 0x30(%rsp)
addq $0x428, %rdi            # imm = 0x428
callq 0x6270
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
addq $0x428, %rdi            # imm = 0x428
callq 0x6470
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x5e2cd(%rip), %rcx     # 0x92fd8
callq 0x39680
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rsp)
movb $0x1, 0x3d8(%rax)
testb $0x1, 0xdf(%rsp)
je 0x34d4c
movq 0x10(%rsp), %rax
testb $0x1, 0x3da(%rax)
jne 0x34d4c
movq 0x10(%rsp), %rdi
movl 0x6c0(%rdi), %esi
callq 0x564f0
testb $0x1, 0xde(%rsp)
je 0x34d6e
movq 0x10(%rsp), %rax
testb $0x1, 0x3db(%rax)
jne 0x34d6e
movq 0x10(%rsp), %rdi
callq 0x58ef0
testb $0x1, 0xdd(%rsp)
je 0x34d90
movq 0x10(%rsp), %rax
testb $0x1, 0x3dc(%rax)
jne 0x34d90
movq 0x10(%rsp), %rdi
callq 0x56790
addq $0xe8, %rsp
retq
movq 0xa8(%rsp), %rdi
callq 0x69e0
nopw %cs:(%rax,%rax)