// File: /workspace/github_cpp_makefile_star2_O3/auton1[P]viterbi/vcf_entry_setters.cpp
// Function: vcf_entry::set_indv_GENOTYPE_and_PHASE(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void vcf_entry::set_indv_GENOTYPE_and_PHASE(unsigned int indv, const string &in)
{
	ploidy.resize(N_indv);
	if ((in.size() == 3) && ((in.c_str()[1] == '/') || (in.c_str()[1] == '|')))
	{	// Fast, diploid case...
		ploidy[indv] = 2;
		set_indv_PHASE(indv, in.c_str()[1]);
		set_indv_GENOTYPE_alleles(indv, in.c_str()[0], in.c_str()[2]);
	}
	else
	{	// More complex case...
		size_t pos = in.find_first_of("/|");
		if (pos != string::npos)
		{	// autosome
			ploidy[indv] = 2;
			set_indv_PHASE(indv, in[pos]);
			set_indv_GENOTYPE_alleles(indv, make_pair(in.substr(0,pos), in.substr(pos+1)));
		}
		else
		{	// Male chrX, or chrY
			ploidy[indv] = 1;
			set_indv_PHASE(indv, '|');
			set_indv_GENOTYPE_alleles(indv, make_pair(in.substr(0,pos), "."));
		}

		// Check for polypoidy
		size_t pos2 = in.find_last_of("/|");
		if (pos != pos2)
			LOG.error("Polypolidy found, and not supported by vcftools: " + CHROM + ":" + header::int2str(POS));
	}

	parsed_GT[indv] = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
leaq 0x4e8(%rdi), %r13
movl 0x8(%rdi), %esi
movq %r13, %rdi
callq 0xc17a
cmpq $0x3, 0x8(%r15)
jne 0x24bcc
movq (%r15), %rax
movzbl 0x1(%rax), %ecx
cmpl $0x7c, %ecx
je 0x24b95
cmpl $0x2f, %ecx
jne 0x24bcc
movl %ebx, %ecx
movq 0x4e8(%r14), %rdx
movl $0x2, (%rdx,%rcx,4)
movsbl 0x1(%rax), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x250cc
movq (%r15), %rax
movsbl (%rax), %edx
movsbl 0x2(%rax), %ecx
movq %r14, %rdi
movl %ebx, %esi
callq 0x25134
jmp 0x24ff3
leaq 0x15033(%rip), %rsi     # 0x39c06
movl $0x2, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x5670
movq %rax, %r12
movl %ebx, %eax
movq (%r13), %rcx
cmpq $-0x1, %r12
je 0x24c66
movl $0x2, (%rcx,%rax,4)
movq (%r15), %rax
movsbl (%rax,%r12), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x250cc
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x5480
movq %r12, 0xb0(%rsp)
leaq 0x1(%r12), %rdx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x5480
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x38(%rsp), %rcx
movq -0x10(%rcx), %rax
cmpq %rcx, %rax
je 0x24cc4
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x24ccc
movl $0x1, (%rcx,%rax,4)
movq %r14, %rdi
movl %ebx, %esi
movl $0x7c, %edx
callq 0x250cc
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
callq 0x5480
leaq 0x38(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r13), %rax
leaq 0x18(%rsp), %r13
cmpq %r13, %rax
je 0x24e95
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x24e9e
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x30(%rsp), %rax
leaq 0x80(%rsp), %r13
movq %rax, -0x28(%r13)
movq %rcx, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
movq %r13, -0x10(%r13)
leaq 0x18(%rsp), %rbp
movq -0x10(%rbp), %rax
cmpq %rbp, %rax
je 0x24d16
movq %rax, 0x70(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x24d1f
movups (%rbp), %xmm0
movups %xmm0, (%r13)
movq 0x10(%rsp), %rax
leaq 0x50(%rsp), %rdx
movq %rax, 0x28(%rdx)
movq %rbp, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %r14, %rdi
movl %ebx, %esi
callq 0x251c4
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x24d59
callq 0x5410
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x24d68
callq 0x5410
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
movq 0xb0(%rsp), %r12
je 0x24d7f
callq 0x5410
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x24d93
callq 0x5410
leaq 0x14e6c(%rip), %rsi     # 0x39c06
movl $0x2, %ecx
movq %r15, %rdi
movq $-0x1, %rdx
callq 0x5890
cmpq %rax, %r12
je 0x24ff3
leaq 0x3e0(%r14), %rdx
leaq 0x14e44(%rip), %rsi     # 0x39c09
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0xb777
leaq 0x152b4(%rip), %rsi     # 0x3a08d
movq %r15, %rdi
callq 0x5870
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x24e08
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x24e0f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x400(%r14), %esi
leaq 0x8(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x1720e
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x10(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x24e5f
movq 0x60(%rsp), %rdi
movq 0x8(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x24e86
leaq 0x18(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x24e7d
movq 0x18(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x24f2e
leaq 0x50(%rsp), %rdi
callq 0x50f0
jmp 0x24f3c
movups (%r13), %xmm0
movups %xmm0, (%rbp)
movq 0x10(%rsp), %rax
leaq 0x28(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %r13, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x14327(%rip), %rax     # 0x391ed
movq %rax, 0x20(%rsi)
leaq 0x50(%rsp), %rdi
callq 0x25a92
leaq 0x50(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x251c4
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24ef9
callq 0x5410
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24f0c
callq 0x5410
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x24f1b
callq 0x5410
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x24d8e
jmp 0x24d93
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x54d0
leaq 0xa0(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x24f69
movq %rsi, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x24f6f
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x24512(%rip), %rdi     # 0x494a8
leaq 0x90(%rsp), %rsi
movl $0x1, %edx
callq 0x36ec8
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24fbe
callq 0x5410
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24fd1
callq 0x5410
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x24fe0
callq 0x5410
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x24ff3
callq 0x5410
movq 0x560(%r14), %rax
movl %ebx, %edx
movl $0x1, %esi
movl %ebx, %ecx
shlq %cl, %rsi
shrl $0x6, %edx
orq %rsi, (%rax,%rdx,8)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x25a68
jmp 0x25031
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x25040
callq 0x5410
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x250bf
jmp 0x250c4
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2506a
callq 0x5410
jmp 0x2506a
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25082
callq 0x5410
jmp 0x25082
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
jne 0x250a7
jmp 0x250b1
jmp 0x250ae
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x25a68
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x250b1
callq 0x5410
jmp 0x250b1
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x250c4
callq 0x5410
movq %rbx, %rdi
callq 0x57d0