// File: /workspace/github_cpp_makefile_star2_O2/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 0x307f
movq 0x2f67(%rip), %rbx      # 0x5fd0
cmpb $0x79, %dil
jne 0x30fe
leaq 0x131a(%rip), %rsi      # 0x4394
jmp 0x3105
movl %edi, %eax
xorb $0x6d, %al
movl %esi, %ecx
xorb $0x6d, %cl
orb %al, %cl
jne 0x315a
movl %edx, %r14d
movq 0x2f36(%rip), %rbx      # 0x5fd0
leaq 0x138c(%rip), %rsi      # 0x442d
movq %rbx, %rdi
callq 0x2160
movsbl %r14b, %esi
movq %rax, %rdi
callq 0x21a0
leaq 0x1376(%rip), %rsi      # 0x4432
movq %rax, %rdi
callq 0x2160
leaq 0x1182(%rip), %rsi      # 0x424d
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20d0
leaq 0x137a(%rip), %rsi      # 0x445c
movq %rbx, %rdi
callq 0x2160
leaq 0xf1d(%rip), %rsi       # 0x400e
movq %rax, %rdi
callq 0x2160
movb $0x6d, %r14b
jmp 0x3144
leaq 0x12f5(%rip), %rsi      # 0x43fa
movq %rbx, %rdi
callq 0x2160
leaq 0x1139(%rip), %r14      # 0x424d
movq %rax, %rdi
movq %r14, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20d0
leaq 0x1299(%rip), %rsi      # 0x43c7
movq %rbx, %rdi
callq 0x2160
movq %rax, %rdi
movq %r14, %rsi
callq 0x2160
movb $0x79, %r14b
movq %rax, %rdi
callq 0x20d0
movl %r14d, %eax
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 0x3182
movq 0x2e5d(%rip), %r14      # 0x5fd0
cmpb $0x73, %dil
jne 0x31b8
leaq 0x1214(%rip), %rsi      # 0x4394
jmp 0x31bf
movl %r8d, %ebx
cmpb $0x64, %dil
setne %al
cmpb $0x64, %sil
setne %cl
testb %cl, %al
jne 0x322b
movq 0x2e2e(%rip), %r15      # 0x5fd0
cmpb $0x64, %dil
jne 0x325a
leaq 0x11e1(%rip), %rsi      # 0x4394
jmp 0x3261
leaq 0x123b(%rip), %rsi      # 0x43fa
movq %r14, %rdi
callq 0x2160
leaq 0x107f(%rip), %rbx      # 0x424d
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20d0
leaq 0x12a1(%rip), %rsi      # 0x4489
movq %r14, %rdi
callq 0x2160
movq %rax, %rdi
movl %ebp, %esi
callq 0x2250
leaq 0x1297(%rip), %rsi      # 0x4498
movq %rax, %rdi
callq 0x2160
leaq 0xdfe(%rip), %rsi       # 0x400e
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2160
movb $0x73, %r14b
jmp 0x3144
cmpb $0x62, %dil
setne %al
cmpb $0x62, %sil
setne %cl
movb $0x65, %r14b
testb %cl, %al
jne 0x314c
movq 0x2d85(%rip), %r15      # 0x5fd0
cmpb $0x62, %dil
jne 0x32cd
leaq 0x113c(%rip), %rsi      # 0x4394
jmp 0x32d4
leaq 0x1199(%rip), %rsi      # 0x43fa
movq %r15, %rdi
callq 0x2160
leaq 0xfdd(%rip), %r14       # 0x424d
movq %rax, %rdi
movq %r14, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20d0
leaq 0x1254(%rip), %rsi      # 0x44de
movq %r15, %rdi
callq 0x2160
movq %rax, %rdi
movl %ebx, %esi
callq 0x2250
leaq 0x11f5(%rip), %rsi      # 0x4498
movq %rax, %rdi
callq 0x2160
leaq 0xd5c(%rip), %rsi       # 0x400e
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movq %r14, %rsi
callq 0x2160
movb $0x64, %r14b
jmp 0x3144
leaq 0x1126(%rip), %rsi      # 0x43fa
movq %r15, %rdi
callq 0x2160
leaq 0xf6a(%rip), %r14       # 0x424d
movq %rax, %rdi
movq %r14, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20d0
leaq 0x11f5(%rip), %rsi      # 0x44f2
movq %r15, %rdi
callq 0x2160
movq %rax, %rdi
movl %ebp, %esi
callq 0x2250
leaq 0x11f0(%rip), %rsi      # 0x4506
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movl %ebx, %esi
callq 0x2250
leaq 0x1169(%rip), %rsi      # 0x4498
movq %rax, %rdi
callq 0x2160
leaq 0xcd0(%rip), %rsi       # 0x400e
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
movq %r14, %rsi
callq 0x2160
movb $0x62, %r14b
jmp 0x3144
nop