// File: SaadBazaz[P]RIP-Protocol-Simulation/./RIPv0.h
// Function: constructNewMessage[abi:cxx11](short, int, int, void*)
string constructNewMessage (short cmd, int src, int dest, void* data){
    string message;
    switch (cmd)
    {
    case ADD:{
        message += to_string(ADD);
        message += '&';
        message += to_string(src);        
        message += '&';
        message += to_string(dest);        
        message += '&';        
        TableRow* table_row_data = static_cast<TableRow *> (data);
        message += table_row_data->toString();
        break;
        }
    case TABLE:{
        message += to_string(TABLE);
        message += '&';
        message += to_string(src);        
        message += '&';
        message += to_string(dest);        
        message += '&';
        message += (  static_cast<char*> (data) );
        break;    
        }
    case UPDATE:{
        message += to_string(UPDATE);
        message += '&';
        message += to_string(src);        
        message += '&';
        message += to_string(dest);        
        message += '&';        
        TableRow* table_row_data = static_cast<TableRow *> (data);
        message += table_row_data->toString();
        break;
        }
    case DELETE:{
        message += to_string(DELETE);
        break;
        }
    case MESSAGE:{
        message += to_string(MESSAGE);
        message += '&';
        message += to_string(src);        
        message += '&';
        message += to_string(dest);        
        message += '&';   
        message += (  static_cast<char*> (data) );
        break;
        }
    default:{
        return NULL;
        break;
        }
    }
    return message;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x260(%rbp)
movw %si, %ax
movq %rdi, %rsi
movq %rsi, -0x258(%rbp)
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x33a0
movswl -0xa(%rbp), %eax
movl %eax, %ecx
movq %rcx, -0x250(%rbp)
subl $0x4, %eax
ja 0x4156
movq -0x250(%rbp), %rax
leaq 0x6456(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x60(%rbp), %rdi
xorl %esi, %esi
callq 0x6040
jmp 0x3bc4
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x3380
jmp 0x3bd3
leaq -0x60(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3bec
movl -0x10(%rbp), %esi
leaq -0x90(%rbp), %rdi
callq 0x6040
jmp 0x3bfd
leaq -0x40(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3380
jmp 0x3c0f
leaq -0x90(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3c2b
movl -0x14(%rbp), %esi
leaq -0xb0(%rbp), %rdi
callq 0x6040
jmp 0x3c3c
leaq -0x40(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x3380
jmp 0x3c4e
leaq -0xb0(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3c6a
movq -0x20(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
movl $0x2c, %edx
callq 0x56b0
jmp 0x3c8f
leaq -0x40(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x3380
jmp 0x3ca1
leaq -0xd8(%rbp), %rdi
callq 0x31a0
jmp 0x41b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
leaq -0xf8(%rbp), %rdi
movl $0x1, %esi
callq 0x6040
jmp 0x3d47
leaq -0x40(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x3380
jmp 0x3d59
leaq -0xf8(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3d75
movl -0x10(%rbp), %esi
leaq -0x118(%rbp), %rdi
callq 0x6040
jmp 0x3d86
leaq -0x40(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x3380
jmp 0x3d98
leaq -0x118(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3db4
movl -0x14(%rbp), %esi
leaq -0x138(%rbp), %rdi
callq 0x6040
jmp 0x3dc5
leaq -0x40(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x3380
jmp 0x3dd7
leaq -0x138(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3df3
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3290
jmp 0x3e02
jmp 0x41b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
leaq -0x158(%rbp), %rdi
movl $0x2, %esi
callq 0x6040
jmp 0x3e71
leaq -0x40(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x3380
jmp 0x3e83
leaq -0x158(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3e9f
movl -0x10(%rbp), %esi
leaq -0x178(%rbp), %rdi
callq 0x6040
jmp 0x3eb0
leaq -0x40(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x3380
jmp 0x3ec2
leaq -0x178(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3ede
movl -0x14(%rbp), %esi
leaq -0x198(%rbp), %rdi
callq 0x6040
jmp 0x3eef
leaq -0x40(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x3380
jmp 0x3f01
leaq -0x198(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x3f1d
movq -0x20(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rsi
leaq -0x1c0(%rbp), %rdi
movl $0x2c, %edx
callq 0x56b0
jmp 0x3f42
leaq -0x40(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3380
jmp 0x3f54
leaq -0x1c0(%rbp), %rdi
callq 0x31a0
jmp 0x41b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
leaq -0x1e0(%rbp), %rdi
movl $0x3, %esi
callq 0x6040
jmp 0x3fec
leaq -0x40(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x3380
jmp 0x3ffe
leaq -0x1e0(%rbp), %rdi
callq 0x31a0
jmp 0x41b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
leaq -0x200(%rbp), %rdi
movl $0x4, %esi
callq 0x6040
jmp 0x403f
leaq -0x40(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x3380
jmp 0x4051
leaq -0x200(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x406d
movl -0x10(%rbp), %esi
leaq -0x220(%rbp), %rdi
callq 0x6040
jmp 0x407e
leaq -0x40(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x3380
jmp 0x4090
leaq -0x220(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x40ac
movl -0x14(%rbp), %esi
leaq -0x240(%rbp), %rdi
callq 0x6040
jmp 0x40bd
leaq -0x40(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x3380
jmp 0x40cf
leaq -0x240(%rbp), %rdi
callq 0x31a0
leaq -0x40(%rbp), %rdi
movl $0x26, %esi
callq 0x31b0
jmp 0x40eb
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3290
jmp 0x40fa
jmp 0x41b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x31a0
jmp 0x41e7
leaq -0x241(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x3450
movq -0x260(%rbp), %rdi
movq -0x268(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x6160
jmp 0x4182
leaq -0x241(%rbp), %rdi
callq 0x3310
movl $0x1, -0x248(%rbp)
jmp 0x41ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x241(%rbp), %rdi
callq 0x3310
jmp 0x41e7
movq -0x260(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3170
movl $0x1, -0x248(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31a0
movq -0x258(%rbp), %rax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x31a0
movq -0x68(%rbp), %rdi
callq 0x3440
nopl (%rax)