user: 请将这段汇编代码片段转换成等效的C代码：

```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    L29
  cmp    $0x11,%edx
  je     L29
L49:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L29:
  and    $0x7f,%dl
  cmp    $0x11,%edx
  je     L91
  lea    D49(%rip),%rdi
  call   <puts@plt>
  mov    0x14(%rbp),%ebx
  mov    0x10(%rbp),%r14d
  lea    D17(%rip),%rdi
  lea    0x8(,%rbx,4),%eax
  mov    %eax,0xc(%rsp)
  call   <puts@plt>
  xor    %eax,%eax
  mov    %ebx,%edx
  mov    %r14d,%esi
  lea    D42(%rip),%rdi
  call   <printf@plt>
  test   %ebx,%ebx
  jle    L27
  lea    -0x1(%rbx),%eax
  lea    0x18(%rbp),%r15
  lea    0x1c(%rbp,%rax,4),%r13
  lea    D2(%rip),%rbx
L14:
  mov    (%r15),%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x4,%r15
  call   <printf@plt>
  cmp    %r13,%r15
  jne    L14
L27:
  lea    D66(%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     L2
  cmp    $0x1,%r14d
  je     L49
  cmp    $0x2,%r14d
  je     L2
  cmp    $0x3,%r14d
  jne    L49
  sub    0xc(%rsp),%r12d
  mov    %r12d,%edi
  call   <malloc@plt>
  lea    D93(%rip),%rdx
  mov    %r12d,%r8d
  mov    $0x92,%ecx
  mov    %rax,%r13
  mov    %rax,%rdi
  lea    D10(%rip),%rsi
  call   <attach_outter_encapsulation@plt>
  lea    -0x4(%r12),%edx
  lea    0x10(%r13),%rdi
  jmp    L37
  nopl   0x0(%rax)
L91:
  lea    D16(%rip),%rdi
  lea    0x4(%r12),%ebx
  call   <puts@plt>
  mov    %ebx,%edi
  call   <malloc@plt>
  lea    D87(%rip),%rdx
  mov    %ebx,%r8d
  mov    $0x92,%ecx
  lea    D10(%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
L37:
  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)
L2:
  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: disassemble_data
arguments: label: D49
data_type: string
name: disassemble_data
arguments: label: D17
data_type: string
name: disassemble_data
arguments: label: D42
data_type: string
name: disassemble_data
arguments: label: D2
data_type: string
name: disassemble_data
arguments: label: D66
data_type: string
name: disassemble_data
arguments: label: D93
data_type: string
name: disassemble_data
arguments: label: D10
data_type: string
name: disassemble_data
arguments: label: D16
data_type: string
name: disassemble_data
arguments: label: D87
data_type: string

tool: D49: 
Received From NSF

tool: D17: 

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

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


tool: D2: metaData: %02x


tool: D66: /*************************************/

tool: D93: 10.0.0.102

tool: D10: 10.0.0.100

tool: D16: 
Received From Sender

tool: D87: 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);
    }
  }
}
```