// File: /workspace/github_cpp_makefile_star2_O1/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, 0x10(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
xorl %r12d, %r12d
movl $0x0, %r14d
testq %rcx, %rcx
je 0x36918
xorl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
cmpb $0x31, (%rax,%rdx)
sete %sil
addq %rsi, %r14
incq %rdx
cmpq %rdx, %rcx
jne 0x36903
testq %rcx, %rcx
je 0x36937
xorl %edx, %edx
xorl %r12d, %r12d
xorl %esi, %esi
cmpb $0x32, (%rax,%rdx)
sete %sil
addq %rsi, %r12
incq %rdx
cmpq %rdx, %rcx
jne 0x36922
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
xorl %ebp, %ebp
movl $0x0, %r13d
testq %rcx, %rcx
je 0x3696a
xorl %edx, %edx
xorl %r13d, %r13d
xorl %esi, %esi
cmpb $0x31, (%rax,%rdx)
sete %sil
addq %rsi, %r13
incq %rdx
cmpq %rdx, %rcx
jne 0x36955
testq %rcx, %rcx
je 0x36988
xorl %edx, %edx
xorl %ebp, %ebp
xorl %esi, %esi
cmpb $0x32, (%rax,%rdx)
sete %sil
addq %rsi, %rbp
incq %rdx
cmpq %rdx, %rcx
jne 0x36973
leaq 0x10(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rbx)
leaq 0x8187(%rip), %rdx      # 0x3eb22
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x5384
cmpl %r12d, %r14d
jle 0x369b4
leaq 0x3c8f(%rip), %rsi      # 0x3a641
jmp 0x369bd
jge 0x369c7
leaq 0x730c(%rip), %rsi      # 0x3dcc9
movq %rbx, %rdi
callq 0x45e0
jmp 0x36a1d
leaq 0x8531(%rip), %rsi      # 0x3eeff
movq %rbx, %rdi
callq 0x45e0
movq 0x155eb(%rip), %r12     # 0x4bfc8
leaq 0x851d(%rip), %rsi      # 0x3ef01
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 0x155b8(%rip), %rdi     # 0x4bfc8
callq 0x4030
movq %rax, %rdi
callq 0x4220
cmpl %ebp, %r13d
jle 0x36a2b
leaq 0x3c18(%rip), %rsi      # 0x3a641
jmp 0x36a34
jge 0x36a3e
leaq 0x7295(%rip), %rsi      # 0x3dcc9
movq %rbx, %rdi
callq 0x45e0
jmp 0x36a94
leaq 0x84ba(%rip), %rsi      # 0x3eeff
movq %rbx, %rdi
callq 0x45e0
movq 0x15574(%rip), %r12     # 0x4bfc8
leaq 0x84a6(%rip), %rsi      # 0x3ef01
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 0x15541(%rip), %rdi     # 0x4bfc8
callq 0x4030
movq %rax, %rdi
callq 0x4220
leaq 0x8481(%rip), %rsi      # 0x3ef1c
movq %rbx, %rdi
callq 0x4100
testl %eax, %eax
je 0x36b42
leaq 0x846d(%rip), %rsi      # 0x3ef1f
movq %rbx, %rdi
callq 0x4100
testl %eax, %eax
je 0x36b42
movq 0x154ff(%rip), %rdi     # 0x4bfc8
leaq 0x8452(%rip), %rsi      # 0x3ef22
movl $0x35, %edx
callq 0x43a0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x154e0(%rip), %rdi     # 0x4bfc8
callq 0x43a0
movq %rax, %r15
leaq 0x802a(%rip), %rsi      # 0x3eb21
movl $0x1, %edx
movq %rax, %rdi
callq 0x43a0
movq 0x10(%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 0x8(%rsp), %rdi
je 0x36b71
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x4340
movq %r14, %rdi
callq 0x45a0
nopl (%rax)