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

```asm
<accept_loop>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L22:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L22
  sub    $0x1b8,%rsp
  mov    %edi,%r15d
  mov    %fs:0x28,%rax
  mov    %rax,0x41a8(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x1a0(%rsp)
  movq   $0x0,0x1a8(%rsp)
  lea    0x1b0(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x11a0(%rsp)
  movq   $0x0,0x11a8(%rsp)
  lea    0x11b0(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x21a0(%rsp)
  movq   $0x0,0x21a8(%rsp)
  lea    0x21b0(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x31a0(%rsp)
  movq   $0x0,0x31a8(%rsp)
  lea    0x31b0(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  jmp    L24
L28:
  mov    0x1c(%rsp),%edi
  call   <inet_ntoa@plt>
  mov    %rax,%rbx
  mov    0x18(%rsp),%edi
  call   <ntohs@plt>
  mov    %eax,%edx
  mov    %rbx,%rsi
  lea    D88(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x1a0(%rsp),%rbx
  mov    $0x1000,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    $0x0,%ecx
  mov    $0x1000,%edx
  mov    %rbx,%rsi
  mov    %ebp,%edi
  call   <recv@plt>
  lea    D62(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D174(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %rax,0x8(%rsp)
  lea    0x8(%rsp),%rdi
  call   <gmtime@plt>
  mov    %rax,%rcx
  lea    0x20(%rsp),%r12
  lea    D163(%rip),%rdx
  mov    $0x80,%esi
  mov    %r12,%rdi
  call   <strftime@plt>
  mov    0x8(%rsp),%rax
  add    $0x12c,%rax
  mov    %rax,0x10(%rsp)
  lea    0x10(%rsp),%rdi
  call   <gmtime@plt>
  mov    %rax,%rcx
  lea    0x120(%rsp),%rdi
  lea    D168(%rip),%rdx
  mov    $0x80,%esi
  call   <strftime@plt>
  lea    0x31a0(%rsp),%rbx
  lea    D143(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    D71(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D92(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D164(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D122(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D114(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D100(%rip),%r14
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D11(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D57(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    0x21a0(%rsp),%r12
  lea    D26(%rip),%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  lea    D33(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    0xa0(%rsp),%r13
  lea    D97(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  lea    D128(%rip),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  lea    0x11a0(%rsp),%r13
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strcpy@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    %rbx,%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x0,%ecx
  mov    %r13,%rsi
  mov    %ebp,%edi
  call   <send@plt>
  mov    %ebp,%edi
  call   <close@plt>
L24:
  movl   $0x8,0x4(%rsp)
  lea    0x4(%rsp),%rdx
  lea    0x18(%rsp),%rsi
  mov    %r15d,%edi
  call   <accept@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  jns    L28
  lea    D104(%rip),%rdi
  call   <perror@plt>
  mov    0x41a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  mov    $0xffffffff,%eax
  add    $0x41b8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D88
data_type: string
name: unpack_data
arguments: tag: D62
data_type: string
name: unpack_data
arguments: tag: D174
data_type: string
name: unpack_data
arguments: tag: D163
data_type: string
name: unpack_data
arguments: tag: D168
data_type: string
name: unpack_data
arguments: tag: D143
data_type: string
name: unpack_data
arguments: tag: D71
data_type: string
name: unpack_data
arguments: tag: D92
data_type: string
name: unpack_data
arguments: tag: D164
data_type: string
name: unpack_data
arguments: tag: D122
data_type: string
name: unpack_data
arguments: tag: D114
data_type: string
name: unpack_data
arguments: tag: D100
data_type: string
name: unpack_data
arguments: tag: D11
data_type: string
name: unpack_data
arguments: tag: D57
data_type: string
name: unpack_data
arguments: tag: D26
data_type: string
name: unpack_data
arguments: tag: D33
data_type: string
name: unpack_data
arguments: tag: D97
data_type: string
name: unpack_data
arguments: tag: D128
data_type: string
name: unpack_data
arguments: tag: D104
data_type: string

tool: D88: accept!(IPAddress = %s, Port = %hu)


tool: D62: ----- recv begin -----

tool: D174: ----- recv end -----

tool: D163: %Y/%m/%d %H:%M:%S %Z

tool: D168: %a, %d %b %Y %H:%M:%S %Z

tool: D143: <html>


tool: D71:   <head>


tool: D92:     <title>Content-Type</title>


tool: D164:   </head>


tool: D122:   <body>


tool: D114:     

tool: D100: 


tool: D11:   </body>


tool: D57: </html>


tool: D26: HTTP/1.0 200 OK


tool: D33: Content-Length: 

tool: D97: %d

tool: D128: Content-Type: text/html


tool: D104: accept

assistant: ```c
int accept_loop(int soc) {
  struct sockaddr_in client_addr;
  int client_addr_len;
  int acc;
  char *client_ip_addr_str;
  u_short client_port;
  int ret = 0;
  char recv_buf[4096] = {0};
  char send_buf[4096] = {0};
  char response_header[4096] = {0};
  char response_body[4096] = {0};
  time_t t;
  struct tm *tm_ptr;
  char time_str[128];
  int content_length = 0;
  char content_length_str[128];
  time_t expires_t;
  struct tm *expires_tm_ptr;
  char expires_time_str[128];
  while (1) {
    client_addr_len = sizeof(client_addr);
    acc = accept(soc, (struct sockaddr *)&client_addr, &client_addr_len);
    if (acc < 0) {
      perror("accept");
      ret = -1;
      break;
    }
    client_ip_addr_str = inet_ntoa(client_addr.sin_addr);
    client_port = ntohs(client_addr.sin_port);
    printf("accept!(IPAddress = %s, Port = %hu)\n", client_ip_addr_str, client_port);
    memset(recv_buf, 0, sizeof(char) * 4096);
    recv(acc, recv_buf, sizeof(recv_buf), 0);
    printf("----- recv begin -----\n");
    printf("%s\n", recv_buf);
    printf("----- recv end -----\n");
    t = time(NULL);
    tm_ptr = gmtime(&t);
    strftime(time_str, sizeof(time_str), "%Y/%m/%d %H:%M:%S %Z", tm_ptr);
    expires_t = t + 5 * 60;
    expires_tm_ptr = gmtime(&expires_t);
    strftime(expires_time_str, sizeof(expires_time_str), "%a, %d %b %Y %H:%M:%S %Z", expires_tm_ptr);
    strcpy(response_body, "<html>\r\n");
    strcat(response_body, "  <head>\r\n");
    strcat(response_body, "    <title>Content-Type</title>\r\n");
    strcat(response_body, "  </head>\r\n");
    strcat(response_body, "  <body>\r\n");
    strcat(response_body, "    ");
    strcat(response_body, time_str);
    strcat(response_body, "\r\n");
    strcat(response_body, "  </body>\r\n");
    strcat(response_body, "</html>\r\n");
    strcpy(response_header, "HTTP/1.0 200 OK\r\n");
    strcat(response_header, "Content-Length: ");
    content_length = strlen(response_body);
    sprintf(content_length_str, "%d", content_length);
    strcat(response_header, content_length_str);
    strcat(response_header, "\r\n");
    strcat(response_header, "Content-Type: text/html\r\n");
    strcpy(send_buf, response_header);
    strcat(send_buf, "\r\n");
    strcat(send_buf, response_body);
    send(acc, send_buf, strlen(send_buf), 0);
    close(acc);
  }
  return ret;
}
```