// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movq 0x3c0(%rdi), %rax
cmpq 0x3c8(%rdi), %rax
je 0x18beb
movl %ecx, %ebp
movl %edx, %r14d
cmpb $0x0, 0x3d8(%rbx)
jne 0x18ba1
movl %r14d, 0x10(%rsp)
movl %ebp, 0x14(%rsp)
leaq 0x3c0(%rbx), %r12
leaq 0x6cc(%rbx), %r13
movl $0x0, 0x6cc(%rbx)
leaq 0x48(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x219fa
leaq 0x44(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x219fa
movl (%rbp), %eax
movl %eax, 0x6c4(%rbx)
movl (%r14), %eax
movl %eax, 0x6c8(%rbx)
leaq 0x50(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x219fa
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x219fa
leaq 0x4c(%rsp), %rsi
movq %rbx, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x219fa
movl 0x6cc(%rbx), %eax
movq 0x3c0(%rbx), %rcx
movss (%rcx,%rax), %xmm0
movss %xmm0, 0xc(%rsp)
addl $0x4, %eax
movl %eax, 0x6cc(%rbx)
leaq 0x1c(%rsp), %rsi
movq %rbx, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x219fa
leaq 0x54(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x219fa
movzbl 0x3(%r14), %eax
movl %eax, 0x6bc(%rbx)
leaq 0x100(%rbx), %rdi
movl (%rbp), %eax
leaq 0x20(%rsp), %rsi
movl %eax, (%rsi)
callq 0x1b3c6
leaq 0x20(%rax), %rsi
leaq 0x3e0(%rbx), %rdi
callq 0x51f0
leaq 0x18(%rsp), %rax
movl (%rax), %eax
incl %eax
movl %eax, 0x400(%rbx)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x212c0
leaq 0x408(%rbx), %rdi
movq %r14, %rsi
callq 0x5550
movq (%r14), %rdi
leaq 0x30(%rsp), %rbp
cmpq %rbp, %rdi
je 0x18ab8
callq 0x5410
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x212c0
leaq 0x428(%rbx), %rdi
movq %r14, %rsi
callq 0x5550
movq (%r14), %rdi
cmpq %rbp, %rdi
je 0x18aea
callq 0x5410
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movsd %xmm0, 0x460(%rbx)
movl 0x1c(%rsp), %eax
movzwl %ax, %ecx
shrl $0x10, %eax
movl %eax, 0x6c0(%rbx)
movl %ecx, 0x6b8(%rbx)
movl 0x6cc(%rbx), %ecx
movl %ecx, 0x6f0(%rbx)
cmpl $0x2, %eax
jb 0x18b3f
movl $0x1, %ebp
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2185c
incl %ebp
cmpl 0x6c0(%rbx), %ebp
jb 0x18b27
movl 0x6cc(%rbx), %eax
movl %eax, 0x6ec(%rbx)
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2185c
movl 0x6cc(%rbx), %eax
movl %eax, 0x6e8(%rbx)
movq 0x430(%rbx), %r14
testq %r14, %r14
je 0x18b91
movq 0x428(%rbx), %r12
xorl %r13d, %r13d
movsbl (%r12,%r13), %edi
callq 0x5840
movb %al, (%r12,%r13)
incq %r13
cmpq %r13, %r14
jne 0x18b7b
movb $0x1, 0x3d8(%rbx)
movl 0x14(%rsp), %ebp
movl 0x10(%rsp), %r14d
testb %r15b, %r15b
je 0x18bbd
cmpb $0x0, 0x3da(%rbx)
jne 0x18bbd
movl 0x6c0(%rbx), %esi
movq %rbx, %rdi
callq 0x26f1c
testb %r14b, %r14b
je 0x18bd3
cmpb $0x0, 0x3db(%rbx)
jne 0x18bd3
movq %rbx, %rdi
callq 0x28934
testb %bpl, %bpl
je 0x18c2a
cmpb $0x0, 0x3dc(%rbx)
jne 0x18c2a
movq %rbx, %rdi
callq 0x27160
jmp 0x18c2a
testb %r15b, %r15b
je 0x18c2a
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x222ff(%rip), %rdx     # 0x3aeff
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0xc868
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27066
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x18c2a
callq 0x5410
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x18c4b
callq 0x5410
movq %rbx, %rdi
callq 0x57d0
nop