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

```asm
<dump_tcpflags>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,%rbp
  mov    %rdx,%r15
  mov    %rcx,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    D79(%rip),%rax
  mov    %rax,(%rsp)
  lea    D99(%rip),%rax
  mov    %rax,0x8(%rsp)
  lea    D92(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D50(%rip),%rdi
  mov    %rdi,0x18(%rsp)
  lea    D20(%rip),%rsi
  mov    %rsi,0x20(%rsp)
  mov    %rax,0x28(%rsp)
  lea    D120(%rip),%rdi
  mov    %rdi,0x30(%rsp)
  lea    D57(%rip),%rdx
  mov    %rdx,0x38(%rsp)
  mov    %rax,0x40(%rsp)
  lea    D21(%rip),%rsi
  mov    %rsi,0x48(%rsp)
  lea    D51(%rip),%rdi
  mov    %rdi,0x50(%rsp)
  mov    %rax,0x58(%rsp)
  lea    D103(%rip),%rdx
  mov    %rdx,0x60(%rsp)
  lea    D115(%rip),%rsi
  mov    %rsi,0x68(%rsp)
  mov    %rax,0x70(%rsp)
  lea    D98(%rip),%rax
  mov    %rax,0x78(%rsp)
  lea    D143(%rip),%rax
  mov    %rax,0x80(%rsp)
  lea    D12(%rip),%rax
  mov    %rax,0x88(%rsp)
  mov    %rsp,%rbx
  lea    0x90(%rsp),%r12
  lea    D48(%rip),%r13
  jmp    L23
L22:
  mov    0x8(%rbx),%rdx
  mov    0x10(%rbx),%r8
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <fprintf@plt>
L19:
  add    $0x18,%rbx
  cmp    %r12,%rbx
  je     L36
L23:
  mov    $0x0,%esi
  mov    (%rbx),%rdi
  call   <get_option@plt>
  mov    %rax,%rcx
  test   %rax,%rax
  jne    L22
  mov    0x8(%rbx),%rsi
  mov    0x10(%rbx),%r8
  mov    %r14,%rcx
  mov    %r15,%rdx
  mov    %rbp,%rdi
  call   <dump_tcpflag@plt>
  jmp    L19
L36:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D79
datatype: string
name: unpack_data
arguments: tag: D99
datatype: string
name: unpack_data
arguments: tag: D92
datatype: string
name: unpack_data
arguments: tag: D50
datatype: string
name: unpack_data
arguments: tag: D20
datatype: string
name: unpack_data
arguments: tag: D120
datatype: string
name: unpack_data
arguments: tag: D57
datatype: string
name: unpack_data
arguments: tag: D21
datatype: string
name: unpack_data
arguments: tag: D51
datatype: string
name: unpack_data
arguments: tag: D103
datatype: string
name: unpack_data
arguments: tag: D115
datatype: string
name: unpack_data
arguments: tag: D98
datatype: string
name: unpack_data
arguments: tag: D143
datatype: string
name: unpack_data
arguments: tag: D12
datatype: string
name: unpack_data
arguments: tag: D48
datatype: string

tool: D79: tcp-urg

tool: D99: tcp.urg

tool: D92: ,

tool: D50: tcp-ack

tool: D20: tcp.ack

tool: D120: tcp-psh

tool: D57: tcp.psh

tool: D21: tcp-rst

tool: D51: tcp.rst

tool: D103: tcp-syn

tool: D115: tcp.syn

tool: D98: tcp-fin

tool: D143: tcp.fin

tool: 

tool: D48: 
 %s = %s%s

assistant: ```c
void dump_tcpflags(FILE *pigsty, const char *field, const unsigned char *buffer, const size_t buffer_size) {
  char *data = NULL;
  struct dump_program_instruction_set {
    const char *option;
    const char *field;
    const char *ntok;
  };
  struct dump_program_instruction_set dump_task[] = {{"tcp-urg", "tcp.urg", ","}, {"tcp-ack", "tcp.ack", ","}, {"tcp-psh", "tcp.psh", ","}, {"tcp-rst", "tcp.rst", ","}, {"tcp-syn", "tcp.syn", ","}, {"tcp-fin", "tcp.fin", ""}};
  size_t dump_task_nr = sizeof(dump_task) / sizeof(dump_task[0]);
  size_t d;
  for (d = 0; d < dump_task_nr; d++) {
    data = get_option(dump_task[d].option, NULL);
    if (data != NULL) {
      fprintf(pigsty,
              "\n "
              "%s = %s%s",
              dump_task[d].field, data, dump_task[d].ntok);
    } else {
      dump_tcpflag(pigsty, dump_task[d].field, buffer, buffer_size, dump_task[d].ntok);
    }
  }
}
```