// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
cmpb $0x79, %dil
setne %al
cmpb $0x79, %sil
setne %cl
testb %cl, %al
jne 0x3408
movq 0x2bde(%rip), %rbx      # 0x5fd0
cmpb $0x79, %dil
jne 0x34f4
leaq 0xf91(%rip), %rsi       # 0x4394
jmp 0x34fb
movl %edi, %eax
xorb $0x6d, %al
movl %esi, %ecx
xorb $0x6d, %cl
orb %al, %cl
jne 0x359e
movl %edx, %r14d
movq 0x2bad(%rip), %rbx      # 0x5fd0
leaq 0x1003(%rip), %rsi      # 0x442d
movl $0x4, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0x7(%rsp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21a0
movq %rax, %r14
leaq 0xfdc(%rip), %rsi       # 0x4432
movl $0x29, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0xde3(%rip), %rsi       # 0x424d
movl $0x1, %edx
movq %r14, %rdi
callq 0x21a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq 0xfb7(%rip), %rsi       # 0x445c
movl $0x2c, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0xb55(%rip), %rsi       # 0x400e
movl $0x5, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movb $0x6d, %al
jmp 0x3593
leaq 0xeff(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0xd3e(%rip), %r14       # 0x424d
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq 0xe7a(%rip), %rsi       # 0x43c7
movl $0x32, %edx
movq %rbx, %rdi
callq 0x21a0
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movb $0x79, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x73, %dil
setne %al
cmpb $0x73, %sil
setne %cl
testb %cl, %al
jne 0x35c6
movq 0x2a19(%rip), %r14      # 0x5fd0
cmpb $0x73, %dil
jne 0x35fc
leaq 0xdd0(%rip), %rsi       # 0x4394
jmp 0x3603
movl %r8d, %ebx
cmpb $0x64, %dil
setne %al
cmpb $0x64, %sil
setne %cl
testb %cl, %al
jne 0x36d5
movq 0x29ea(%rip), %r15      # 0x5fd0
cmpb $0x64, %dil
jne 0x370a
leaq 0xd9d(%rip), %rsi       # 0x4394
jmp 0x3711
leaq 0xdf7(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %r14, %rdi
callq 0x21a0
leaq 0xc36(%rip), %rbx       # 0x424d
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq 0xe34(%rip), %rsi       # 0x4489
movl $0xe, %edx
movq %r14, %rdi
callq 0x21a0
movq %r14, %rdi
movl %ebp, %esi
callq 0x2260
movq %rax, %r14
leaq 0xe22(%rip), %rsi       # 0x4498
movl $0x45, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0x984(%rip), %rsi       # 0x400e
movl $0x5, %edx
movq %r14, %rdi
callq 0x21a0
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x21a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movb $0x73, %al
jmp 0x3593
cmpb $0x62, %dil
setne %cl
cmpb $0x62, %sil
setne %dl
movb $0x65, %al
testb %dl, %cl
jne 0x3593
movq 0x28dc(%rip), %r15      # 0x5fd0
cmpb $0x62, %dil
jne 0x37e3
leaq 0xc8f(%rip), %rsi       # 0x4394
jmp 0x37ea
leaq 0xce9(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %r15, %rdi
callq 0x21a0
leaq 0xb28(%rip), %r14       # 0x424d
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21a0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq 0xd7b(%rip), %rsi       # 0x44de
movl $0x13, %edx
movq %r15, %rdi
callq 0x21a0
movq %r15, %rdi
movl %ebx, %esi
callq 0x2260
movq %rax, %rbx
leaq 0xd14(%rip), %rsi       # 0x4498
movl $0x45, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0x876(%rip), %rsi       # 0x400e
movl $0x5, %edx
movq %rbx, %rdi
callq 0x21a0
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movb $0x64, %al
jmp 0x3593
leaq 0xc10(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %r15, %rdi
callq 0x21a0
leaq 0xa4f(%rip), %r14       # 0x424d
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21a0
movq %r15, %rdi
callq 0x20c0
leaq 0xcd5(%rip), %rsi       # 0x44f2
movl $0x13, %edx
movq %r15, %rdi
callq 0x21a0
movq %r15, %rdi
movl %ebp, %esi
callq 0x2260
movq %rax, %r15
leaq 0xcc8(%rip), %rsi       # 0x4506
movl $0x18, %edx
movq %rax, %rdi
callq 0x21a0
movq %r15, %rdi
movl %ebx, %esi
callq 0x2260
movq %rax, %rbx
leaq 0xc39(%rip), %rsi       # 0x4498
movl $0x45, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0x79b(%rip), %rsi       # 0x400e
movl $0x5, %edx
movq %rbx, %rdi
callq 0x21a0
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x20c0
movb $0x62, %al
jmp 0x3593
nop