// File: /workspace/github_cpp_makefile_star2_O1/millanek[P]evo/./process_vcf_seq_utils.h
// Function: appendGenotypeBaseToString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<char, std::allocator<char>> const&, char)
inline void appendGenotypeBaseToString(std::string& toExtend, const std::string& ref, const std::string& alt, const std::vector<char>& genotype, char hetTreatment) {
    if (genotype[0] == '0' && genotype[1] == '0')
        toExtend.append(ref);
    else if (genotype[0] == '1' && genotype[1] == '1')
        toExtend.append(alt);
    else {
        if (hetTreatment == 'r') {
            double rn = ((double) rand() / RAND_MAX);
            if (rn <= 0.5) {
                toExtend.append(ref);
            } else {
                toExtend.append(alt);
            }
        } else if(hetTreatment == 'p') {
            if (genotype[0] == '0')
                toExtend.append(ref);
            if (genotype[0] == '1')
                toExtend.append(alt);
        } else if (hetTreatment == 'i') {
            std::string ambiguityBase = getAmbiguityCode(ref, alt);
            toExtend.append(ambiguityBase);
        } else if (hetTreatment == 'b') {
            if (genotype[1] == '0')
                toExtend.append(ref);
            if (genotype[1] == '1')
                toExtend.append(alt);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rcx), %rax
movb (%rax), %cl
cmpb $0x30, %cl
jne 0x6ea70
cmpb $0x30, 0x1(%rax)
jne 0x6ea70
movq (%r15), %rsi
movq 0x8(%r15), %rdx
jmp 0x6ebc8
cmpb $0x31, %cl
jne 0x6ea7f
cmpb $0x31, 0x1(%rax)
je 0x6ebc1
movsbl %r8b, %edx
cmpl $0x6f, %edx
jg 0x6eb4a
cmpl $0x62, %edx
je 0x6eb79
cmpl $0x69, %edx
jne 0x6eb98
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x2e45c
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x2e45c
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x5790e
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6eb04
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6eb1b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %rbx, %rdi
callq 0x8180
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6eb98
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6eb98
cmpl $0x70, %edx
je 0x6eba4
cmpl $0x72, %edx
jne 0x6eb98
callq 0x8140
cvtsi2sd %eax, %xmm0
divsd 0x5b5a3(%rip), %xmm0    # 0xca108
movsd 0x608e3(%rip), %xmm1    # 0xcf450
ucomisd %xmm0, %xmm1
jae 0x6ea64
jmp 0x6ebc1
cmpb $0x30, 0x1(%rax)
jne 0x6eb8e
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x8180
movq (%r12), %rax
cmpb $0x31, 0x1(%rax)
je 0x6ebc1
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpb $0x30, %cl
jne 0x6ebb8
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x8180
movq (%r12), %rax
cmpb $0x31, (%rax)
jne 0x6eb98
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8180
movq %rax, %rbx
leaq 0x58(%rsp), %r12
movq -0x10(%r12), %rdi
jmp 0x6ec0e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6ec09
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6ec09
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6ec1f
movq (%r12), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840