// File: /workspace/github_cpp_makefile_star2_O1/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 0xc1c0
cmpq $0x3, 0x8(%r15)
jne 0x24e10
movq (%r15), %rax
movzbl 0x1(%rax), %ecx
cmpl $0x7c, %ecx
je 0x24dd9
cmpl $0x2f, %ecx
jne 0x24e10
movl %ebx, %ecx
movq 0x4e8(%r14), %rdx
movl $0x2, (%rdx,%rcx,4)
movsbl 0x1(%rax), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x25312
movq (%r15), %rax
movsbl (%rax), %edx
movsbl 0x2(%rax), %ecx
movq %r14, %rdi
movl %ebx, %esi
callq 0x2537a
jmp 0x25238
leaq 0x15e17(%rip), %rsi     # 0x3ac2e
movl $0x2, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x5670
movq %rax, %r12
movl %ebx, %eax
movq (%r13), %rcx
cmpq $-0x1, %r12
je 0x24eaa
movl $0x2, (%rcx,%rax,4)
movq (%r15), %rax
movsbl (%rax,%r12), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x25312
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 0x24f08
movq %rax, 0x50(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x24f10
movl $0x1, (%rcx,%rax,4)
movq %r14, %rdi
movl %ebx, %esi
movl $0x7c, %edx
callq 0x25312
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 0x250da
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x250e3
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 0x24f5a
movq %rax, 0x70(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0x24f63
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 0x25408
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0x24f9d
callq 0x5410
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0x24fac
callq 0x5410
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
movq 0xb0(%rsp), %r12
je 0x24fc3
callq 0x5410
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x24fd7
callq 0x5410
leaq 0x15c50(%rip), %rsi     # 0x3ac2e
movl $0x2, %ecx
movq %r15, %rdi
movq $-0x1, %rdx
callq 0x5890
cmpq %rax, %r12
je 0x25238
leaq 0x3e0(%r14), %rdx
leaq 0x15c28(%rip), %rsi     # 0x3ac31
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0xb7dd
leaq 0x16098(%rip), %rsi     # 0x3b0b5
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 0x2504c
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x25053
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 0x17284
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x10(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x250a3
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x250c6
leaq 0x18(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x250bd
movq 0x18(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x25173
movq 0x8(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x50f0
jmp 0x25181
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 0x15102(%rip), %rax     # 0x3a20d
movq %rax, 0x20(%rsi)
leaq 0x50(%rsp), %rdi
callq 0x25cc2
leaq 0x50(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x25408
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2513e
callq 0x5410
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25151
callq 0x5410
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x25160
callq 0x5410
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x24fd2
jmp 0x24fd7
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 0x251ae
movq %rsi, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x251b4
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 0x252cd(%rip), %rdi     # 0x4a4a8
leaq 0x90(%rsp), %rsi
movl $0x1, %edx
callq 0x3721e
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25203
callq 0x5410
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25216
callq 0x5410
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x25225
callq 0x5410
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25238
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 0x25c98
jmp 0x25276
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x25285
callq 0x5410
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x25304
jmp 0x25309
movq %rax, %rbx
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x252af
callq 0x5410
jmp 0x252af
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x252c7
callq 0x5410
jmp 0x252c7
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
jne 0x252ec
jmp 0x252f6
jmp 0x252f3
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x25c98
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x252f6
callq 0x5410
jmp 0x252f6
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25309
callq 0x5410
movq %rbx, %rdi
callq 0x57d0
nop