// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/process_vcf_utils.cpp
// Function: MultiallelicCounts::getMultiallelicCounts(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
void MultiallelicCounts::getMultiallelicCounts(const std::vector<std::string>& genotypes) {
    
  /*  std::cerr << "genotypes.size(): " << genotypes.size() << std::endl;
    std::cerr << "missingIndividualsDot.size(): " << missingIndividualsDot.size() << std::endl;
    std::cerr << "missingIndividualsAny.size(): " << missingIndividualsAny.size() << std::endl;
    std::cerr << "missingHaplotypesDot.size(): " << missingHaplotypesDot.size() << std::endl;
    std::cerr << "starpos: " << starPos << std::endl;
   */
    
    for (std::vector<std::string>::size_type i = 0; i != genotypes.size(); i++) {
     //   std::cerr << "genotypes[i]: " << genotypes[i] << std::endl;
        
        
        if (genotypes[i][0] == '.' || genotypes[i][2] == '.') { missingIndividualsDot[i] = 1; missingIndividualsAny[i] = 1; }
     //   std::cerr << "Missing individuals assigned: " << std::endl;
        if (genotypes[i][0] == starPos || genotypes[i][2] == starPos) missingIndividualsAny[i] = 1;
          
        if (genotypes[i][0] == '.') { missingHaplotypesDot[2*i] = 1;}
        else if (genotypes[i][0] == starPos) { missingHaplotypesStar[2*i] = 1; }
        else haplotypeVariants[2*i] = genotypes[i][0];
        
        if (genotypes[i][1] == '.')  { missingHaplotypesDot[(2*i)+1] = 1;}
        else if (genotypes[i][1] == starPos) { missingHaplotypesStar[(2*i)+1] = 1; }
        else haplotypeVariants[(2*i)+1] = genotypes[i][2];
        
        if (missingIndividualsAny[i] == 0 && genotypes[i][0] != genotypes[i][2]) {
            individualsHets[i] = 1;
        }
        
        if (missingIndividualsAny[i] == 0 && genotypes[i][0] == genotypes[i][2]) {
            individualsHets[i] = 0;
        }
        
    }
}

// Assembly:
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
je 0x50f46
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
sarq $0x5, %rcx
movq 0x50(%rdi), %rdx
movq 0x68(%rdi), %rsi
movq 0x20(%rdi), %r8
movq 0x38(%rdi), %r9
movq 0x98(%rdi), %r10
movq 0x80(%rdi), %r11
xorl %ebx, %ebx
movl $0x1, %ebp
movq (%rax,%rbx,8), %r14
cmpb $0x2e, (%r14)
je 0x50e8c
cmpb $0x2e, 0x2(%r14)
jne 0x50e92
movl %ebp, (%rdx,%rbx)
movl %ebp, (%rsi,%rbx)
movsbl (%r14), %r12d
movl (%rdi), %r15d
cmpl %r12d, %r15d
je 0x50ea8
movsbl 0x2(%r14), %r12d
cmpl %r12d, %r15d
jne 0x50eaf
movl $0x1, (%rsi,%rbx)
movsbl (%r14), %r15d
cmpl $0x2e, %r15d
jne 0x50ec3
movl $0x1, (%r11,%rbx,2)
jmp 0x50ed6
cmpl %r15d, (%rdi)
jne 0x50ed2
movl $0x1, (%r10,%rbx,2)
jmp 0x50ed6
movl %r15d, (%r9,%rbx,2)
movsbl 0x1(%r14), %r13d
movl $0x1, %r15d
cmpl $0x2e, %r13d
jne 0x50eec
movq %r11, %r12
jmp 0x50efc
movq %r10, %r12
cmpl %r13d, (%rdi)
je 0x50efc
movsbl 0x2(%r14), %r15d
movq %r9, %r12
movl %r15d, 0x4(%r12,%rbx,2)
cmpl $0x0, (%rsi,%rbx)
jne 0x50f18
movb (%r14), %r15b
cmpb 0x2(%r14), %r15b
je 0x50f18
movl $0x1, (%r8,%rbx)
cmpl $0x0, (%rsi,%rbx)
jne 0x50f2f
movb (%r14), %r15b
cmpb 0x2(%r14), %r15b
jne 0x50f2f
movl $0x0, (%r8,%rbx)
addq $0x4, %rbx
decq %rcx
jne 0x50e7b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop