// File: LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/aws.cpp
// Function: mapsearchresult(char, char, char, int, int)
char mapsearchresult(char msgA, char msgB,char mapid, int srcVtxid, int dstVtxid)
{
    if (msgA=='y' || msgB=='y')
    {
        if(msgA=='y')
        {
            std::cout << "The AWS has received map information from server A" << "\n" << std::endl;
            std::cout << "The source and destination vertex are in the graph" << "\n" << std::endl;
        }
        else
        {
            std::cout << "The AWS has received map information from server B" << "\n" << std::endl;
            std::cout << "The source and destination vertex are in the graph" << "\n" << std::endl;
        }

        return 'y';
    }
    else if (msgA=='m' && msgB=='m')
    {
        std::cout << "Map " << mapid << " is not found in both serverA and serverB" << "\n" << std::endl;
        std::cout << "Sending error to client using TCP over port " << TCPPORT << std::endl;
        return 'm';
    }
    else
    {
        if (msgA=='s' || msgB=='s')
        {
            if(msgA=='s')
            {
                std::cout << "The AWS has received map information from server A" << "\n" << std::endl;
                std::cout << "Source vertex " << srcVtxid << " not found in the graph, sending error to client using TCP over port " 
                << TCPPORT << "\n" << std::endl;
            }
            else
            {
                std::cout << "The AWS has received map information from server B" << "\n" << std::endl;
                std::cout << "Source vertex " << srcVtxid << " not found in the graph, sending error to client using TCP over port " 
                << TCPPORT << "\n" << std::endl;
            }
            return 's';
        }
        else if (msgA=='d' || msgB=='d')
        {
            if(msgA=='d')
            {
                std::cout << "The AWS has received map information from server A" << "\n" << std::endl;
                std::cout << "Destination vertex " << dstVtxid << " not found in the graph, sending error to client using TCP over port " 
                << TCPPORT << "\n" << std::endl;
            }
            else
            {
                std::cout << "The AWS has received map information from server B" << "\n" << std::endl;
                std::cout << "Destination vertex " << dstVtxid << " not found in the graph, sending error to client using TCP over port " 
                << TCPPORT << "\n" << std::endl;
            }
            return 'd';
        }
        else if (msgA=='b' || msgB=='b')
        {
            if(msgA=='b')
            {
                std::cout << "The AWS has received map information from server A" << "\n" << std::endl;
                std::cout << "Both sourse vertex " << srcVtxid << " and destination vertex " << dstVtxid << 
                " not found in the graph, sending error to client using TCP over port " << TCPPORT << "\n" << std::endl;
            }
            else
            {
                std::cout << "The AWS has received map information from server B" << "\n" << std::endl;
                std::cout << "Both sourse vertex " << srcVtxid << " and destination vertex " << dstVtxid << 
                " not found in the graph, sending error to client using TCP over port " << TCPPORT << "\n" << std::endl;
            }
            return 'b';
        }
        return 'e';
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movb %sil, %dl
movb %dil, %sil
movb %sil, -0x2(%rbp)
movb %dl, -0x3(%rbp)
movb %al, -0x4(%rbp)
movl %ecx, -0x8(%rbp)
movl %r8d, -0xc(%rbp)
movsbl -0x2(%rbp), %eax
cmpl $0x79, %eax
je 0x3bf7
movsbl -0x3(%rbp), %eax
cmpl $0x79, %eax
jne 0x3ccf
movsbl -0x2(%rbp), %eax
cmpl $0x79, %eax
jne 0x3c64
movq 0x33c9(%rip), %rdi      # 0x6fd0
leaq 0x1786(%rip), %rsi      # 0x5394
callq 0x21b0
movq %rax, %rdi
leaq 0x1630(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3394(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x3398(%rip), %rdi      # 0x6fd0
leaq 0x1788(%rip), %rsi      # 0x53c7
callq 0x21b0
movq %rax, %rdi
leaq 0x15ff(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3363(%rip), %rsi      # 0x6fc0
callq 0x21d0
jmp 0x3cc6
movq 0x3365(%rip), %rdi      # 0x6fd0
leaq 0x1788(%rip), %rsi      # 0x53fa
callq 0x21b0
movq %rax, %rdi
leaq 0x15cc(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3330(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x3334(%rip), %rdi      # 0x6fd0
leaq 0x1724(%rip), %rsi      # 0x53c7
callq 0x21b0
movq %rax, %rdi
leaq 0x159b(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x32ff(%rip), %rsi      # 0x6fc0
callq 0x21d0
movb $0x79, -0x1(%rbp)
jmp 0x417d
movsbl -0x2(%rbp), %eax
cmpl $0x6d, %eax
jne 0x3d6f
movsbl -0x3(%rbp), %eax
cmpl $0x6d, %eax
jne 0x3d6f
movq 0x32e0(%rip), %rdi      # 0x6fd0
leaq 0x1736(%rip), %rsi      # 0x542d
callq 0x21b0
movq %rax, %rdi
movsbl -0x4(%rbp), %esi
callq 0x2240
movq %rax, %rdi
leaq 0x1720(%rip), %rsi      # 0x5432
callq 0x21b0
movq %rax, %rdi
leaq 0x152c(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3290(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x3294(%rip), %rdi      # 0x6fd0
leaq 0x1719(%rip), %rsi      # 0x545c
callq 0x21b0
movq %rax, %rdi
leaq 0x12bc(%rip), %rsi      # 0x500e
callq 0x21b0
movq %rax, %rdi
movq 0x325f(%rip), %rsi      # 0x6fc0
callq 0x21d0
movb $0x6d, -0x1(%rbp)
jmp 0x417d
movsbl -0x2(%rbp), %eax
cmpl $0x73, %eax
je 0x3d85
movsbl -0x3(%rbp), %eax
cmpl $0x73, %eax
jne 0x3eb6
movsbl -0x2(%rbp), %eax
cmpl $0x73, %eax
jne 0x3e22
movq 0x3237(%rip), %rdi      # 0x6fd0
leaq 0x15f4(%rip), %rsi      # 0x5394
callq 0x21b0
movq %rax, %rdi
leaq 0x149e(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3202(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x3206(%rip), %rdi      # 0x6fd0
leaq 0x16b8(%rip), %rsi      # 0x5489
callq 0x21b0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x16ad(%rip), %rsi      # 0x5498
callq 0x21b0
movq %rax, %rdi
leaq 0x1214(%rip), %rsi      # 0x500e
callq 0x21b0
movq %rax, %rdi
leaq 0x1444(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x31a8(%rip), %rsi      # 0x6fc0
callq 0x21d0
jmp 0x3ead
movq 0x31a7(%rip), %rdi      # 0x6fd0
leaq 0x15ca(%rip), %rsi      # 0x53fa
callq 0x21b0
movq %rax, %rdi
leaq 0x140e(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3172(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x3176(%rip), %rdi      # 0x6fd0
leaq 0x1628(%rip), %rsi      # 0x5489
callq 0x21b0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x161d(%rip), %rsi      # 0x5498
callq 0x21b0
movq %rax, %rdi
leaq 0x1184(%rip), %rsi      # 0x500e
callq 0x21b0
movq %rax, %rdi
leaq 0x13b4(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3118(%rip), %rsi      # 0x6fc0
callq 0x21d0
movb $0x73, -0x1(%rbp)
jmp 0x417d
movsbl -0x2(%rbp), %eax
cmpl $0x64, %eax
je 0x3ecc
movsbl -0x3(%rbp), %eax
cmpl $0x64, %eax
jne 0x3ffd
movsbl -0x2(%rbp), %eax
cmpl $0x64, %eax
jne 0x3f69
movq 0x30f0(%rip), %rdi      # 0x6fd0
leaq 0x14ad(%rip), %rsi      # 0x5394
callq 0x21b0
movq %rax, %rdi
leaq 0x1357(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x30bb(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x30bf(%rip), %rdi      # 0x6fd0
leaq 0x15c6(%rip), %rsi      # 0x54de
callq 0x21b0
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x1566(%rip), %rsi      # 0x5498
callq 0x21b0
movq %rax, %rdi
leaq 0x10cd(%rip), %rsi      # 0x500e
callq 0x21b0
movq %rax, %rdi
leaq 0x12fd(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x3061(%rip), %rsi      # 0x6fc0
callq 0x21d0
jmp 0x3ff4
movq 0x3060(%rip), %rdi      # 0x6fd0
leaq 0x1483(%rip), %rsi      # 0x53fa
callq 0x21b0
movq %rax, %rdi
leaq 0x12c7(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x302b(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x302f(%rip), %rdi      # 0x6fd0
leaq 0x1536(%rip), %rsi      # 0x54de
callq 0x21b0
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x14d6(%rip), %rsi      # 0x5498
callq 0x21b0
movq %rax, %rdi
leaq 0x103d(%rip), %rsi      # 0x500e
callq 0x21b0
movq %rax, %rdi
leaq 0x126d(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x2fd1(%rip), %rsi      # 0x6fc0
callq 0x21d0
movb $0x64, -0x1(%rbp)
jmp 0x417d
movsbl -0x2(%rbp), %eax
cmpl $0x62, %eax
je 0x4013
movsbl -0x3(%rbp), %eax
cmpl $0x62, %eax
jne 0x4175
movsbl -0x2(%rbp), %eax
cmpl $0x62, %eax
jne 0x40ca
movq 0x2fa9(%rip), %rdi      # 0x6fd0
leaq 0x1366(%rip), %rsi      # 0x5394
callq 0x21b0
movq %rax, %rdi
leaq 0x1210(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x2f74(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x2f78(%rip), %rdi      # 0x6fd0
leaq 0x1493(%rip), %rsi      # 0x54f2
callq 0x21b0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x148d(%rip), %rsi      # 0x5506
callq 0x21b0
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x1405(%rip), %rsi      # 0x5498
callq 0x21b0
movq %rax, %rdi
leaq 0xf6c(%rip), %rsi       # 0x500e
callq 0x21b0
movq %rax, %rdi
leaq 0x119c(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x2f00(%rip), %rsi      # 0x6fc0
callq 0x21d0
jmp 0x416f
movq 0x2eff(%rip), %rdi      # 0x6fd0
leaq 0x1322(%rip), %rsi      # 0x53fa
callq 0x21b0
movq %rax, %rdi
leaq 0x1166(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x2eca(%rip), %rsi      # 0x6fc0
callq 0x21d0
movq 0x2ece(%rip), %rdi      # 0x6fd0
leaq 0x13e9(%rip), %rsi      # 0x54f2
callq 0x21b0
movq %rax, %rdi
movl -0x8(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x13e3(%rip), %rsi      # 0x5506
callq 0x21b0
movq %rax, %rdi
movl -0xc(%rbp), %esi
callq 0x2340
movq %rax, %rdi
leaq 0x135b(%rip), %rsi      # 0x5498
callq 0x21b0
movq %rax, %rdi
leaq 0xec2(%rip), %rsi       # 0x500e
callq 0x21b0
movq %rax, %rdi
leaq 0x10f2(%rip), %rsi      # 0x524d
callq 0x21b0
movq %rax, %rdi
movq 0x2e56(%rip), %rsi      # 0x6fc0
callq 0x21d0
movb $0x62, -0x1(%rbp)
jmp 0x417d
jmp 0x4177
jmp 0x4179
movb $0x65, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)