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

```asm
<accept_loop>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  lea    -0x4000(%rsp),%r11
L38:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L38
  sub    $0x150,%rsp
  mov    %edi,-0x4144(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x4138(%rbp)
  movq   $0x0,-0x4010(%rbp)
  movq   $0x0,-0x4008(%rbp)
  lea    -0x4000(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x1fe,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movq   $0x0,-0x3010(%rbp)
  movq   $0x0,-0x3008(%rbp)
  lea    -0x3000(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x1fe,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movq   $0x0,-0x2010(%rbp)
  movq   $0x0,-0x2008(%rbp)
  lea    -0x2000(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x1fe,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movq   $0x0,-0x1010(%rbp)
  movq   $0x0,-0x1008(%rbp)
  lea    -0x1000(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x1fe,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  movl   $0x0,-0x4134(%rbp)
L3:
  movl   $0x8,-0x4140(%rbp)
  lea    -0x4140(%rbp),%rdx
  lea    -0x4118(%rbp),%rcx
  mov    -0x4144(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <accept@plt>
  mov    %eax,-0x4130(%rbp)
  cmpl   $0x0,-0x4130(%rbp)
  jns    L30
  lea    D103(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  movl   $0xffffffff,-0x4138(%rbp)
  nop
  mov    -0x4138(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L34
  jmp    L22
L30:
  mov    -0x4114(%rbp),%eax
  mov    %eax,%edi
  call   <inet_ntoa@plt>
  mov    %rax,-0x4128(%rbp)
  mov    -0x4118(%rbp),%eax
  mov    %eax,%edi
  call   <ntohs@plt>
  mov    %eax,-0x412c(%rbp)
  mov    -0x412c(%rbp),%edx
  mov    -0x4128(%rbp),%rax
  mov    %rax,%rsi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x4010(%rbp),%rax
  mov    $0x1000,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0x4010(%rbp),%rsi
  mov    -0x4130(%rbp),%eax
  mov    $0x0,%ecx
  mov    $0x1000,%edx
  mov    %eax,%edi
  call   <recv@plt>
  lea    D49(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    -0x4010(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D101(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,-0x413c(%rbp)
  lea    -0x413c(%rbp),%rax
  mov    %rax,%rdi
  call   <gmtime@plt>
  mov    %rax,-0x4120(%rbp)
  mov    -0x4120(%rbp),%rdx
  lea    -0x4110(%rbp),%rax
  mov    %rdx,%rcx
  lea    D181(%rip),%rdx
  mov    $0x80,%esi
  mov    %rax,%rdi
  call   <strftime@plt>
  lea    -0x1010(%rbp),%rax
  lea    D19(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x1010(%rbp),%rax
  lea    D94(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  lea    D33(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  lea    D140(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  lea    D196(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  lea    D143(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x4110(%rbp),%rdx
  lea    -0x1010(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  lea    D128(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  lea    D31(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  lea    D158(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x2010(%rbp),%rax
  lea    D21(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x2010(%rbp),%rax
  lea    D168(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4134(%rbp)
  mov    -0x4134(%rbp),%edx
  lea    -0x4090(%rbp),%rax
  lea    D42(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  lea    -0x4090(%rbp),%rdx
  lea    -0x2010(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x2010(%rbp),%rax
  lea    D128(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x2010(%rbp),%rax
  lea    D4(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x2010(%rbp),%rax
  lea    D190(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x2010(%rbp),%rdx
  lea    -0x3010(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  lea    -0x3010(%rbp),%rax
  lea    D128(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x1010(%rbp),%rdx
  lea    -0x3010(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  lea    -0x3010(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    -0x3010(%rbp),%rsi
  mov    -0x4130(%rbp),%eax
  mov    $0x0,%ecx
  mov    %eax,%edi
  call   <send@plt>
  mov    -0x4130(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  jmp    L3
L22:
  call   <__stack_chk_fail@plt>
L34:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D103
data_type: string
name: parse_data
arguments: data_label: D11
data_type: string
name: parse_data
arguments: data_label: D49
data_type: string
name: parse_data
arguments: data_label: D101
data_type: string
name: parse_data
arguments: data_label: D181
data_type: string
name: parse_data
arguments: data_label: D19
data_type: string
name: parse_data
arguments: data_label: D94
data_type: string
name: parse_data
arguments: data_label: D33
data_type: string
name: parse_data
arguments: data_label: D140
data_type: string
name: parse_data
arguments: data_label: D196
data_type: string
name: parse_data
arguments: data_label: D143
data_type: string
name: parse_data
arguments: data_label: D128
data_type: string
name: parse_data
arguments: data_label: D31
data_type: string
name: parse_data
arguments: data_label: D158
data_type: string
name: parse_data
arguments: data_label: D21
data_type: string
name: parse_data
arguments: data_label: D168
data_type: string
name: parse_data
arguments: data_label: D42
data_type: string
name: parse_data
arguments: data_label: D4
data_type: string
name: parse_data
arguments: data_label: D190
data_type: string

tool: D103: accept

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


tool: D49: ----- recv begin -----

tool: D101: ----- recv end -----

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

tool: D19: <html>


tool: D94:   <head>


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


tool: D140:   </head>


tool: D196:   <body>


tool: D143:     

tool: D128: 


tool: D31:   </body>


tool: D158: </html>


tool: D21: HTTP/1.0 200 OK


tool: D168: Content-Length: 

tool: D42: %d

tool: D4: Content-Type: text/html


tool: D190: Set-Cookie: key1=value1


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;
}
```