// File: /workspace/github_cpp_makefile_star2_O3/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), %rcx
movb (%rcx), %al
cmpb $0x30, %al
jne 0x6e750
cmpb $0x30, 0x1(%rcx)
jne 0x6e75e
movq (%r15), %rsi
movq 0x8(%r15), %rdx
jmp 0x6e8a2
cmpb $0x31, %al
jne 0x6e75e
cmpb $0x31, 0x1(%rcx)
je 0x6e89b
movsbl %r8b, %edx
cmpl $0x6f, %edx
jg 0x6e830
cmpl $0x62, %edx
je 0x6e85f
cmpl $0x69, %edx
jne 0x6e8b5
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x2ba06
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x2ba06
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x57a7a
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e7e3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e7fa
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 0x6e8b5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6e8b5
cmpl $0x70, %edx
je 0x6e87e
cmpl $0x72, %edx
jne 0x6e8b5
callq 0x8140
cvtsi2sd %eax, %xmm0
divsd 0x61ad5(%rip), %xmm0    # 0xd0320
movsd 0x5decd(%rip), %xmm1    # 0xcc720
ucomisd %xmm0, %xmm1
jae 0x6e744
jmp 0x6e89b
movb 0x1(%rcx), %al
cmpb $0x30, %al
jne 0x6e897
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x8180
movq (%r12), %rax
movb 0x1(%rax), %al
jmp 0x6e897
cmpb $0x30, %al
jne 0x6e897
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x8180
movq (%r12), %rax
movb (%rax), %al
cmpb $0x31, %al
jne 0x6e8b5
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8180
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x58(%rsp), %r12
movq -0x10(%r12), %rdi
jmp 0x6e8f4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e8ef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8480
jmp 0x6e8ef
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e905
movq (%r12), %rsi
incq %rsi
callq 0x8480
movq %rbx, %rdi
callq 0x8840