// File: /workspace/github_cpp_makefile_star2_O1/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 0x342a
movq 0x2bbc(%rip), %rbx      # 0x5fd0
cmpb $0x79, %dil
jne 0x3516
leaq 0xf6f(%rip), %rsi       # 0x4394
jmp 0x351d
movl %edi, %eax
xorb $0x6d, %al
movl %esi, %ecx
xorb $0x6d, %cl
orb %al, %cl
jne 0x35c0
movl %edx, %r14d
movq 0x2b8b(%rip), %rbx      # 0x5fd0
leaq 0xfe1(%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 0xfba(%rip), %rsi       # 0x4432
movl $0x29, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0xdc1(%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 0xf95(%rip), %rsi       # 0x445c
movl $0x2c, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0xb33(%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 0x35b5
leaq 0xedd(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %rbx, %rdi
callq 0x21a0
leaq 0xd1c(%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 0xe58(%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 0x35e8
movq 0x29f7(%rip), %r14      # 0x5fd0
cmpb $0x73, %dil
jne 0x361e
leaq 0xdae(%rip), %rsi       # 0x4394
jmp 0x3625
movl %r8d, %ebx
cmpb $0x64, %dil
setne %al
cmpb $0x64, %sil
setne %cl
testb %cl, %al
jne 0x36f7
movq 0x29c8(%rip), %r15      # 0x5fd0
cmpb $0x64, %dil
jne 0x372c
leaq 0xd7b(%rip), %rsi       # 0x4394
jmp 0x3733
leaq 0xdd5(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %r14, %rdi
callq 0x21a0
leaq 0xc14(%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 0xe12(%rip), %rsi       # 0x4489
movl $0xe, %edx
movq %r14, %rdi
callq 0x21a0
movq %r14, %rdi
movl %ebp, %esi
callq 0x2260
movq %rax, %r14
leaq 0xe00(%rip), %rsi       # 0x4498
movl $0x45, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0x962(%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 0x35b5
cmpb $0x62, %dil
setne %cl
cmpb $0x62, %sil
setne %dl
movb $0x65, %al
testb %dl, %cl
jne 0x35b5
movq 0x28ba(%rip), %r15      # 0x5fd0
cmpb $0x62, %dil
jne 0x3805
leaq 0xc6d(%rip), %rsi       # 0x4394
jmp 0x380c
leaq 0xcc7(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %r15, %rdi
callq 0x21a0
leaq 0xb06(%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 0xd59(%rip), %rsi       # 0x44de
movl $0x13, %edx
movq %r15, %rdi
callq 0x21a0
movq %r15, %rdi
movl %ebx, %esi
callq 0x2260
movq %rax, %rbx
leaq 0xcf2(%rip), %rsi       # 0x4498
movl $0x45, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0x854(%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 0x35b5
leaq 0xbee(%rip), %rsi       # 0x43fa
movl $0x32, %edx
movq %r15, %rdi
callq 0x21a0
leaq 0xa2d(%rip), %r14       # 0x424d
movl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21a0
movq %r15, %rdi
callq 0x20c0
leaq 0xcb3(%rip), %rsi       # 0x44f2
movl $0x13, %edx
movq %r15, %rdi
callq 0x21a0
movq %r15, %rdi
movl %ebp, %esi
callq 0x2260
movq %rax, %r15
leaq 0xca6(%rip), %rsi       # 0x4506
movl $0x18, %edx
movq %rax, %rdi
callq 0x21a0
movq %r15, %rdi
movl %ebx, %esi
callq 0x2260
movq %rax, %rbx
leaq 0xc17(%rip), %rsi       # 0x4498
movl $0x45, %edx
movq %rax, %rdi
callq 0x21a0
leaq 0x779(%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 0x35b5
nop