// File: LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/aws.cpp
// Function: interpUDPmsg(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int*, int*, char*, char*)
void interpUDPmsg(std::string &mapbuff, std::string &mapinfo, int *receivedA, int *receivedB, char *msgA, char *msgB)
{
    int pos;
    std::string markA("serverA");
    std::string markB("serverB");

    pos = mapbuff.find(markA);
    if( pos != -1 )
    {
        *receivedA = 1;
        if ( mapbuff[pos+markA.length()] != '!')
        {
            *msgA = 'y';
            mapinfo = mapbuff.substr(pos+markA.length()+1,mapbuff.find(markB,pos));
        }
        else
            *msgA = mapbuff[pos+markA.length()+1];
    }
    
    pos = mapbuff.find(markB);
    if( pos != -1 )
    {
        *receivedB= 1;
        if ( mapbuff[pos+markB.length()] != '!')
        {
            *msgB = 'y';
            mapinfo = mapbuff.substr(pos+markB.length()+1,mapbuff.find(markA,pos));
        }
        else
            *msgB = mapbuff[pos+markA.length()+1];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x2360
movq -0xe0(%rbp), %rdx
leaq 0x1b6b(%rip), %rsi      # 0x538c
leaq -0x58(%rbp), %rdi
callq 0x4190
jmp 0x382c
leaq -0x59(%rbp), %rdi
callq 0x2200
leaq -0x91(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x2360
movq -0xe8(%rbp), %rdx
leaq 0x1bfe(%rip), %rsi      # 0x5454
leaq -0x90(%rbp), %rdi
callq 0x4190
jmp 0x3864
leaq -0x91(%rbp), %rdi
callq 0x2200
movq -0x8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x23d0
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
je 0x3a21
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2310
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdi
addq %rax, %rsi
callq 0x23c0
movq %rax, -0xf0(%rbp)
jmp 0x38d6
movq -0xf0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
je 0x39cd
movq -0x28(%rbp), %rax
movb $0x79, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2310
movq %rax, %rcx
movq -0x118(%rbp), %rax
leaq 0x1(%rax,%rcx), %rax
movq %rax, -0x108(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x34(%rbp), %rdx
leaq -0x90(%rbp), %rsi
callq 0x23d0
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq %rax, %rcx
leaq -0xb8(%rbp), %rdi
callq 0x21c0
jmp 0x3958
movq -0x10(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x2260
leaq -0xb8(%rbp), %rdi
callq 0x2110
jmp 0x3a1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x59(%rbp), %rdi
callq 0x2200
jmp 0x3ba8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x2200
jmp 0x3b9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2110
jmp 0x3b9f
movq -0x8(%rbp), %rax
movq %rax, -0x130(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2310
movq -0x130(%rbp), %rdi
movq %rax, %rcx
movq -0x128(%rbp), %rax
leaq 0x1(%rax,%rcx), %rsi
callq 0x23c0
movq %rax, -0x120(%rbp)
jmp 0x3a10
movq -0x120(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
jmp 0x3a21
movq -0x8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x23d0
movl %eax, -0x34(%rbp)
cmpl $-0x1, -0x34(%rbp)
je 0x3b81
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2310
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdi
addq %rax, %rsi
callq 0x23c0
movq %rax, -0x138(%rbp)
jmp 0x3a8d
movq -0x138(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x21, %eax
je 0x3b2d
movq -0x30(%rbp), %rax
movb $0x79, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x158(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2310
movq %rax, %rcx
movq -0x160(%rbp), %rax
leaq 0x1(%rax,%rcx), %rax
movq %rax, -0x150(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x34(%rbp), %rdx
leaq -0x58(%rbp), %rsi
callq 0x23d0
movq -0x158(%rbp), %rsi
movq -0x150(%rbp), %rdx
movq %rax, %rcx
leaq -0xd8(%rbp), %rdi
callq 0x21c0
jmp 0x3b0f
movq -0x10(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2260
leaq -0xd8(%rbp), %rdi
callq 0x2110
jmp 0x3b7f
movq -0x8(%rbp), %rax
movq %rax, -0x178(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x170(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2310
movq -0x178(%rbp), %rdi
movq %rax, %rcx
movq -0x170(%rbp), %rax
leaq 0x1(%rax,%rcx), %rsi
callq 0x23c0
movq %rax, -0x168(%rbp)
jmp 0x3b70
movq -0x168(%rbp), %rax
movb (%rax), %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
jmp 0x3b81
leaq -0x90(%rbp), %rdi
callq 0x2110
leaq -0x58(%rbp), %rdi
callq 0x2110
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x2110
movq -0x68(%rbp), %rdi
callq 0x2350
nopw %cs:(%rax,%rax)