// File: 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:
subq $0xe8, %rsp
movq %rdx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdi, %rax
movq 0x38(%rsp), %rdi
movq %rax, 0x48(%rsp)
movq %rax, %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0xe0(%rsp)
movq %rdi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
callq 0x53c0
movq 0x38(%rsp), %rdi
movq %rax, 0xc0(%rsp)
callq 0x5280
movq %rax, 0xb8(%rsp)
movb $0x31, 0xb7(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
leaq 0xb7(%rsp), %rdx
callq 0x2db90
movq 0x38(%rsp), %rdi
movl %eax, 0xcc(%rsp)
callq 0x53c0
movq 0x38(%rsp), %rdi
movq %rax, 0xa8(%rsp)
callq 0x5280
movq %rax, 0xa0(%rsp)
movb $0x32, 0x9f(%rsp)
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
leaq 0x9f(%rsp), %rdx
callq 0x2db90
movq 0x40(%rsp), %rdi
movl %eax, 0xb0(%rsp)
callq 0x53c0
movq 0x40(%rsp), %rdi
movq %rax, 0x90(%rsp)
callq 0x5280
movq %rax, 0x88(%rsp)
movb $0x31, 0x87(%rsp)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
leaq 0x87(%rsp), %rdx
callq 0x2db90
movq 0x40(%rsp), %rdi
movl %eax, 0x98(%rsp)
callq 0x53c0
movq 0x40(%rsp), %rdi
movq %rax, 0x78(%rsp)
callq 0x5280
movq %rax, 0x70(%rsp)
movb $0x32, 0x6f(%rsp)
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
leaq 0x6f(%rsp), %rdx
callq 0x2db90
movl %eax, 0x80(%rsp)
movb $0x0, 0x6e(%rsp)
leaq 0x6d(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x57c0
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0xa648(%rip), %rsi      # 0x6ab94
callq 0x6880
jmp 0x60553
leaq 0x6d(%rsp), %rdi
callq 0x54d0
movl 0xcc(%rsp), %eax
cmpl 0xb0(%rsp), %eax
jle 0x605bf
movq 0x48(%rsp), %rdi
leaq 0x60c8(%rip), %rsi      # 0x66641
callq 0x5420
jmp 0x60580
jmp 0x60628
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x6d(%rsp), %rdi
callq 0x54d0
jmp 0x6077a
movq 0x48(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
callq 0x58b8
jmp 0x6077a
movl 0xcc(%rsp), %eax
cmpl 0xb0(%rsp), %eax
jge 0x605e4
movq 0x48(%rsp), %rdi
leaq 0xa9b2(%rip), %rsi      # 0x6af8d
callq 0x5420
jmp 0x605e2
jmp 0x60626
movq 0x48(%rsp), %rdi
leaq 0xa97f(%rip), %rsi      # 0x6af6f
callq 0x5420
jmp 0x605f7
movq 0x249ca(%rip), %rdi     # 0x84fc8
leaq 0xa96c(%rip), %rsi      # 0x6af71
callq 0x5460
movq %rax, 0x28(%rsp)
jmp 0x60611
movq 0x28(%rsp), %rdi
movq 0x24993(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x60624
jmp 0x60626
jmp 0x60628
movl 0x98(%rsp), %eax
cmpl 0x80(%rsp), %eax
jle 0x6064d
movq 0x48(%rsp), %rdi
leaq 0x5ffd(%rip), %rsi      # 0x66641
callq 0x5420
jmp 0x6064b
jmp 0x606b6
movl 0x98(%rsp), %eax
cmpl 0x80(%rsp), %eax
jge 0x60672
movq 0x48(%rsp), %rdi
leaq 0xa924(%rip), %rsi      # 0x6af8d
callq 0x5420
jmp 0x60670
jmp 0x606b4
movq 0x48(%rsp), %rdi
leaq 0xa8f1(%rip), %rsi      # 0x6af6f
callq 0x5420
jmp 0x60685
movq 0x2493c(%rip), %rdi     # 0x84fc8
leaq 0xa8de(%rip), %rsi      # 0x6af71
callq 0x5460
movq %rax, 0x20(%rsp)
jmp 0x6069f
movq 0x20(%rsp), %rdi
movq 0x24905(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x606b2
jmp 0x606b4
jmp 0x606b6
movq 0x48(%rsp), %rdi
leaq 0xa8ca(%rip), %rsi      # 0x6af8c
callq 0x5140
cmpl $0x0, %eax
je 0x60757
movq 0x48(%rsp), %rdi
leaq 0xa8b3(%rip), %rsi      # 0x6af8f
callq 0x5140
cmpl $0x0, %eax
je 0x60757
movq 0x248db(%rip), %rdi     # 0x84fc8
leaq 0xa89e(%rip), %rsi      # 0x6af92
callq 0x5460
movq %rax, 0x18(%rsp)
jmp 0x60700
movq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x53e0
movq %rax, 0x10(%rsp)
jmp 0x60716
movq 0x10(%rsp), %rdi
leaq 0xa471(%rip), %rsi      # 0x6ab93
callq 0x5460
movq %rax, 0x8(%rsp)
jmp 0x6072e
movq 0x40(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x53e0
movq %rax, (%rsp)
jmp 0x60743
movq (%rsp), %rdi
movq 0x24862(%rip), %rsi     # 0x84fb0
callq 0x54b0
jmp 0x60755
jmp 0x60757
movb $0x1, 0x6e(%rsp)
testb $0x1, 0x6e(%rsp)
jne 0x6076d
movq 0x48(%rsp), %rdi
callq 0x58b8
movq 0x30(%rsp), %rax
addq $0xe8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x57b0
nopw %cs:(%rax,%rax)
nop