// File: /workspace/github_cpp_makefile_star2_O3/schneebergerlab[P]DrLink/check_allele_order.cpp
// Function: check_allele_order(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string check_allele_order(string leftAlleles, string rightAlleles)
{
    // order of alleles
    int left1  = std::count(leftAlleles.begin(), leftAlleles.end(), '1');
    int left2  = std::count(leftAlleles.begin(), leftAlleles.end(), '2');
    int right1 = std::count(rightAlleles.begin(), rightAlleles.end(), '1');
    int right2 = std::count(rightAlleles.begin(), rightAlleles.end(), '2');
    string ordergnome("");
    if(left1 > left2) ordergnome += "1";
    else
    if(left1 < left2) ordergnome += "2";
    else
    {
        ordergnome += "u";
        cout << "   Warning: equal alleles " << endl;
    }
    if(right1 > right2) ordergnome += "1";
    else
    if(right1 < right2) ordergnome += "2";
    else
    {
        ordergnome += "u";
        cout << "   Warning: equal alleles " << endl;
    } 
    if(ordergnome.compare("12")!=0 && ordergnome.compare("21")!=0)
    {
        // should not happen though!
        cout << "   Warning: incorrect order of alleles in prediction " 
             << leftAlleles << "\t" << rightAlleles << endl;
    }
    //
    return ordergnome;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rax
xorl %ebp, %ebp
movl $0x0, %r12d
movl $0x0, %r14d
testq %rax, %rax
je 0x3657f
movq (%r15), %rcx
xorl %edx, %edx
xorl %r12d, %r12d
xorl %esi, %esi
cmpb $0x31, (%rcx,%rdx)
sete %sil
addl %esi, %r12d
incq %rdx
cmpq %rdx, %rax
jne 0x36550
xorl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
cmpb $0x32, (%rcx,%rdx)
sete %sil
addl %esi, %r14d
incq %rdx
cmpq %rdx, %rax
jne 0x3656a
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movl $0x0, %r13d
testq %rax, %rax
je 0x365cd
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
xorl %edx, %edx
xorl %ebp, %ebp
xorl %esi, %esi
cmpb $0x31, (%rcx,%rdx)
sete %sil
addl %esi, %ebp
incq %rdx
cmpq %rdx, %rax
jne 0x3659f
xorl %edx, %edx
xorl %r13d, %r13d
xorl %esi, %esi
cmpb $0x32, (%rcx,%rdx)
sete %sil
addl %esi, %r13d
incq %rdx
cmpq %rdx, %rax
jne 0x365b8
leaq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rax, (%rbx)
leaq 0x852a(%rip), %rdx      # 0x3eb0a
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5384
cmpl %r14d, %r12d
jle 0x365f9
leaq 0x404a(%rip), %rsi      # 0x3a641
jmp 0x36602
jge 0x3660c
leaq 0x88fb(%rip), %rsi      # 0x3eefd
movq %rbx, %rdi
callq 0x45e0
jmp 0x36662
leaq 0x88cc(%rip), %rsi      # 0x3eedf
movq %rbx, %rdi
callq 0x45e0
movq 0x159a6(%rip), %r12     # 0x4bfc8
leaq 0x88b8(%rip), %rsi      # 0x3eee1
movl $0x1a, %edx
movq %r12, %rdi
callq 0x43a0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x4310
movsbl %al, %esi
movq 0x15973(%rip), %rdi     # 0x4bfc8
callq 0x4030
movq %rax, %rdi
callq 0x4220
cmpl %r13d, %ebp
jle 0x36670
leaq 0x3fd3(%rip), %rsi      # 0x3a641
jmp 0x36679
jge 0x36683
leaq 0x8884(%rip), %rsi      # 0x3eefd
movq %rbx, %rdi
callq 0x45e0
jmp 0x366d9
leaq 0x8855(%rip), %rsi      # 0x3eedf
movq %rbx, %rdi
callq 0x45e0
movq 0x1592f(%rip), %r12     # 0x4bfc8
leaq 0x8841(%rip), %rsi      # 0x3eee1
movl $0x1a, %edx
movq %r12, %rdi
callq 0x43a0
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x4310
movsbl %al, %esi
movq 0x158fc(%rip), %rdi     # 0x4bfc8
callq 0x4030
movq %rax, %rdi
callq 0x4220
leaq 0x881c(%rip), %rsi      # 0x3eefc
movq %rbx, %rdi
callq 0x4100
testl %eax, %eax
je 0x36787
leaq 0x8808(%rip), %rsi      # 0x3eeff
movq %rbx, %rdi
callq 0x4100
testl %eax, %eax
je 0x36787
movq 0x158ba(%rip), %rdi     # 0x4bfc8
leaq 0x87ed(%rip), %rsi      # 0x3ef02
movl $0x35, %edx
callq 0x43a0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x1589b(%rip), %rdi     # 0x4bfc8
callq 0x43a0
movq %rax, %r15
leaq 0x83cd(%rip), %rsi      # 0x3eb09
movl $0x1, %edx
movq %rax, %rdi
callq 0x43a0
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x43a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4310
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4220
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x10(%rsp), %rdi
je 0x367b6
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4340
movq %r14, %rdi
callq 0x45a0
nop