// File: /workspace/github_cpp_makefile_star2_O2/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 $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
addq %rdi, %rsi
movb $0x31, %r13b
leaq 0xf(%rsp), %rdx
movb %r13b, (%rdx)
callq 0x17516
movq %rax, %rbp
movq (%r14), %rdi
movq %r14, 0x18(%rsp)
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movb $0x32, %r14b
leaq 0xe(%rsp), %rdx
movb %r14b, (%rdx)
callq 0x17516
movq %rax, %r12
movq (%r15), %rdi
movq 0x8(%r15), %rsi
addq %rdi, %rsi
leaq 0xd(%rsp), %rdx
movb %r13b, (%rdx)
callq 0x17516
movq %rax, 0x20(%rsp)
movq (%r15), %rdi
movq %r15, 0x10(%rsp)
movq 0x8(%r15), %rsi
addq %rdi, %rsi
leaq 0xc(%rsp), %rdx
movb %r14b, (%rdx)
callq 0x17516
movq %rax, %r13
leaq 0x7b2e(%rip), %rsi      # 0x2db1a
leaq 0xb(%rsp), %rdx
movq %rbx, %rdi
callq 0x4d3e
cmpl %r12d, %ebp
jle 0x26007
leaq 0x363c(%rip), %rsi      # 0x29641
jmp 0x26010
jge 0x2601a
leaq 0x7efd(%rip), %rsi      # 0x2df0d
movq %rbx, %rdi
callq 0x45d0
jmp 0x26044
leaq 0x7ece(%rip), %rsi      # 0x2deef
movq %rbx, %rdi
callq 0x45d0
movq 0x16f98(%rip), %rdi     # 0x3cfc8
leaq 0x7eba(%rip), %rsi      # 0x2def1
callq 0x4330
movq %rax, %rdi
callq 0x41c0
cmpl %r13d, 0x20(%rsp)
jle 0x26054
leaq 0x35ef(%rip), %rsi      # 0x29641
jmp 0x2605d
jge 0x26067
leaq 0x7eb0(%rip), %rsi      # 0x2df0d
movq %rbx, %rdi
callq 0x45d0
jmp 0x26091
leaq 0x7e81(%rip), %rsi      # 0x2deef
movq %rbx, %rdi
callq 0x45d0
movq 0x16f4b(%rip), %rdi     # 0x3cfc8
leaq 0x7e6d(%rip), %rsi      # 0x2def1
callq 0x4330
movq %rax, %rdi
callq 0x41c0
leaq 0x7e74(%rip), %rsi      # 0x2df0c
movq %rbx, %rdi
callq 0x4110
testl %eax, %eax
je 0x260fb
leaq 0x7e64(%rip), %rsi      # 0x2df0f
movq %rbx, %rdi
callq 0x4110
testl %eax, %eax
je 0x260fb
movq 0x16f0a(%rip), %rdi     # 0x3cfc8
leaq 0x7e4d(%rip), %rsi      # 0x2df12
callq 0x4330
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x42e0
leaq 0x7a3b(%rip), %rsi      # 0x2db19
movq %rax, %rdi
callq 0x4330
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x42e0
movq %rax, %rdi
callq 0x41c0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4638
movq %r14, %rdi
callq 0x45a0