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

```asm
<accept_loop>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L2:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L2
  sub    $0x128,%rsp
  mov    %edi,%r15d
  mov    %fs:0x28,%rax
  mov    %rax,0x4118(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x110(%rsp)
  movq   $0x0,0x118(%rsp)
  lea    0x120(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x1110(%rsp)
  movq   $0x0,0x1118(%rsp)
  lea    0x1120(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x2110(%rsp)
  movq   $0x0,0x2118(%rsp)
  lea    0x2120(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  movq   $0x0,0x3110(%rsp)
  movq   $0x0,0x3118(%rsp)
  lea    0x3120(%rsp),%rdi
  mov    $0x1fe,%ecx
  rep stos %rax,%es:(%rdi)
  jmp    L35
L14:
  mov    0xc(%rsp),%edi
  call   <inet_ntoa@plt>
  mov    %rax,%rbx
  mov    0x8(%rsp),%edi
  call   <ntohs@plt>
  mov    %eax,%edx
  mov    %rbx,%rsi
  lea    D97(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x110(%rsp),%rbx
  mov    $0x1000,%edx
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    $0x0,%ecx
  mov    $0x1000,%edx
  mov    %rbx,%rsi
  mov    %r12d,%edi
  call   <recv@plt>
  lea    D164(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D115(%rip),%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,0x4(%rsp)
  lea    0x4(%rsp),%rdi
  call   <gmtime@plt>
  mov    %rax,%rcx
  lea    0x10(%rsp),%rbp
  lea    D14(%rip),%rdx
  mov    $0x80,%esi
  mov    %rbp,%rdi
  call   <strftime@plt>
  lea    0x3110(%rsp),%rbx
  lea    D53(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    D137(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D89(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D105(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D96(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D13(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D146(%rip),%r14
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D60(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D188(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    0x2110(%rsp),%rbp
  lea    D27(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    0x90(%rsp),%r13
  lea    D135(%rip),%rsi
  mov    %r13,%rdi
  call   <sprintf@plt>
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D12(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D145(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    0x1110(%rsp),%r13
  mov    %rbp,%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    %r12d,%edi
  call   <send@plt>
  mov    %r12d,%edi
  call   <close@plt>
L35:
  movl   $0x8,(%rsp)
  mov    %rsp,%rdx
  lea    0x8(%rsp),%rsi
  mov    %r15d,%edi
  call   <accept@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jns    L14
  lea    D39(%rip),%rdi
  call   <perror@plt>
  mov    0x4118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  mov    $0xffffffff,%eax
  add    $0x4128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D97
type_guessed: string
name: unpack_data
arguments: tag: D164
type_guessed: string
name: unpack_data
arguments: tag: D115
type_guessed: string
name: unpack_data
arguments: tag: D14
type_guessed: string
name: unpack_data
arguments: tag: D53
type_guessed: string
name: unpack_data
arguments: tag: D137
type_guessed: string
name: unpack_data
arguments: tag: D89
type_guessed: string
name: unpack_data
arguments: tag: D105
type_guessed: string
name: unpack_data
arguments: tag: D96
type_guessed: string
name: unpack_data
arguments: tag: D13
type_guessed: string
name: unpack_data
arguments: tag: D146
type_guessed: string
name: unpack_data
arguments: tag: D60
type_guessed: string
name: unpack_data
arguments: tag: D188
type_guessed: string
name: unpack_data
arguments: tag: D27
type_guessed: string
name: unpack_data
arguments: tag: D153
type_guessed: string
name: unpack_data
arguments: tag: D135
type_guessed: string
name: unpack_data
arguments: tag: D12
type_guessed: string
name: unpack_data
arguments: tag: D145
type_guessed: string
name: unpack_data
arguments: tag: D39
type_guessed: string

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


tool: D164: ----- recv begin -----

tool: D115: ----- recv end -----

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

tool: D53: <html>


tool: D137:   <head>


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


tool: D105:   </head>


tool: D96:   <body>


tool: D13:     

tool: D146: 


tool: D60:   </body>


tool: D188: </html>


tool: D27: HTTP/1.0 200 OK


tool: D153: Content-Length: 

tool: D135: %d

tool: D12: Content-Type: text/html


tool: D145: Set-Cookie: key1=value1


tool: D39: 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];
  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);
    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");
    strcat(response_header, "Set-Cookie: key1=value1\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;
}
```