user: Converte this assembly snippet into its equivalent C code:

```asm
<processPacket>:
  endbr64
  push   %r15
  lea    -0x91(%rdx),%eax
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  cmp    $0x1,%eax
  jbe    L27
  cmp    $0x11,%edx
  je     L27
L53:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L27:
  and    $0x7f,%dl
  cmp    $0x11,%edx
  je     L3
  lea    D32(%rip),%rdi
  call   <puts@plt>
  mov    0x14(%rbp),%ebx
  mov    0x10(%rbp),%r14d
  lea    D0(%rip),%rdi
  lea    0x8(,%rbx,4),%eax
  mov    %eax,0xc(%rsp)
  call   <puts@plt>
  xor    %eax,%eax
  mov    %ebx,%edx
  mov    %r14d,%esi
  lea    D59(%rip),%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  jle    L17
  lea    -0x1(%rbx),%eax
  lea    0x18(%rbp),%r15
  lea    0x1c(%rbp,%rax,4),%r13
  lea    D76(%rip),%rbx
L67:
  mov    (%r15),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x4,%r15
  call   <printf@plt>
  cmp    %r13,%r15
  jne    L67
L17:
  lea    D27(%rip),%rdi
  call   <puts@plt>
  movslq 0xc(%rsp),%rax
  lea    0x10(%rbp,%rax,4),%rbp
  mov    %rbp,%rdi
  call   <printIPHeader@plt>
  test   %r14d,%r14d
  je     L4
  cmp    $0x1,%r14d
  je     L53
  cmp    $0x2,%r14d
  je     L4
  cmp    $0x3,%r14d
  jne    L53
  sub    0xc(%rsp),%r12d
  mov    %r12d,%edi
  call   <malloc@plt>
  lea    D18(%rip),%rdx
  mov    %r12d,%r8d
  mov    $0x92,%ecx
  mov    %rax,%r13
  mov    %rax,%rdi
  lea    D87(%rip),%rsi
  call   <attach_outter_encapsulation@plt>
  lea    -0x4(%r12),%edx
  lea    0x10(%r13),%rdi
  jmp    L90
  nopl   0x0(%rax)
L3:
  lea    D85(%rip),%rdi
  lea    0x4(%r12),%ebx
  call   <puts@plt>
  mov    %ebx,%edi
  call   <malloc@plt>
  lea    D95(%rip),%rdx
  mov    %ebx,%r8d
  mov    $0x92,%ecx
  lea    D87(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%r13
  call   <attach_outter_encapsulation@plt>
  mov    %rbp,%rdi
  call   <printIPHeader@plt>
  lea    0x10(%r13),%rdi
  mov    %r12d,%edx
L90:
  mov    %rbp,%rsi
  call   <memcpy@plt>
  mov    %r13,%rdi
  call   <sendPacket@plt>
  add    $0x18,%rsp
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <free@plt>
  cs nopw 0x0(%rax,%rax,1)
L4:
  add    $0x18,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1100 <sendPacket@plt>
```

tool_calls: name: unpack_data
arguments: tag: D32
type_guessed: string
name: unpack_data
arguments: tag: D0
type_guessed: string
name: unpack_data
arguments: tag: D59
type_guessed: string
name: unpack_data
arguments: tag: D76
type_guessed: string
name: unpack_data
arguments: tag: D27
type_guessed: string
name: unpack_data
arguments: tag: D18
type_guessed: string
name: unpack_data
arguments: tag: D87
type_guessed: string
name: unpack_data
arguments: tag: D85
type_guessed: string
name: unpack_data
arguments: tag: D95
type_guessed: string

tool: D32: 
Received From NSF

tool: D0: 

/**********INSPECTION RESULT**********/

tool: D59: actionCode: %02x, metadataNum: %02x


tool: D76: metaData: %02x


tool: D27: /*************************************/

tool: D18: 10.0.0.102

tool: D87: 10.0.0.100

tool: D85: 
Received From Sender

tool: D95: 10.0.0.200

assistant: ```c
void processPacket(uint8_t *data, int dataLen, int protocol) {
  if (protocol != 145 && protocol != 146 && protocol != 17)
    return;
  int ipHeaderLen = sizeof(struct iphdr);
  if (protocol == 145 || protocol == 17) {
    printf("\nReceived From Sender\n");
    int packetLen = ipHeaderLen + dataLen;
    uint8_t *packet = (uint8_t *)malloc(packetLen);
    attach_outter_encapsulation(packet, "10.0.0.100", "10.0.0.200", 146, packetLen);
    struct iphdr *iphdr = (struct iphdr *)data;
    printIPHeader(iphdr);
    memcpy((void *)(packet + ipHeaderLen), (void *)data, dataLen);
    sendPacket(packet);
    free(packet);
  } else if (protocol == 146) {
    printf("\nReceived From NSF\n");
    struct iphdr *outter_iphdr = (struct iphdr *)data;
    uint8_t actionCode = *(uint8_t *)(data + ipHeaderLen);
    uint8_t metadataNum = *(uint8_t *)(data + ipHeaderLen + 1);
    int resultHeaderLen = (2 + metadataNum) * sizeof(uint8_t);
    int i = 0;
    printf("\n\n/**********INSPECTION RESULT**********/\n");
    printf("actionCode: %02x, metadataNum: %02x\n", actionCode, metadataNum);
    for (i = 0; i < metadataNum; i++) {
      printf("metaData: %02x\n", *(uint8_t *)(data + ipHeaderLen + 2 + i));
    }
    printf("/*************************************/\n");
    struct iphdr *origin_iphdr = (struct iphdr *)(data + ipHeaderLen + resultHeaderLen);
    printIPHeader(origin_iphdr);
    if (actionCode == 0x00000000) {
      sendPacket(data + ipHeaderLen + resultHeaderLen);
    } else if (actionCode == 0x00000001) {
    } else if (actionCode == 0x00000002) {
      sendPacket(data + ipHeaderLen + resultHeaderLen);
    } else if (actionCode == 0x00000003) {
      int packetLen = dataLen - resultHeaderLen;
      uint8_t *packet = (uint8_t *)malloc(packetLen);
      attach_outter_encapsulation(packet, "10.0.0.100", "10.0.0.102", 146, packetLen);
      memcpy((void *)(packet + ipHeaderLen), (void *)(data + ipHeaderLen + resultHeaderLen), packetLen - ipHeaderLen);
      sendPacket(packet);
      free(packet);
    }
  }
}
```