user: Please show me the C implementation that matches the assembly code listed below:

```asm
<accept_loop>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L37:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L37
  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    L16
L12:
  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    D92(%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    D171(%rip),%rdi
  call   <puts@plt>
  mov    %rbx,%rdi
  call   <puts@plt>
  lea    D145(%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    D24(%rip),%rdx
  mov    $0x80,%esi
  mov    %rbp,%rdi
  call   <strftime@plt>
  lea    0x3110(%rsp),%rbx
  lea    D73(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    D54(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D52(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D38(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D61(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D122(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D68(%rip),%r14
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D117(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    D33(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    0x2110(%rsp),%rbp
  lea    D174(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  lea    D191(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    0x90(%rsp),%r13
  lea    D151(%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    D15(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D42(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcat@plt>
  lea    D71(%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>
L16:
  movl   $0x8,(%rsp)
  mov    %rsp,%rdx
  lea    0x8(%rsp),%rsi
  mov    %r15d,%edi
  call   <accept@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jns    L12
  lea    D166(%rip),%rdi
  call   <perror@plt>
  mov    0x4118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L32
  mov    $0xffffffff,%eax
  add    $0x4128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D92
datatype: string
name: extract_symbolic_data
arguments: tag: D171
datatype: string
name: extract_symbolic_data
arguments: tag: D145
datatype: string
name: extract_symbolic_data
arguments: tag: D24
datatype: string
name: extract_symbolic_data
arguments: tag: D73
datatype: string
name: extract_symbolic_data
arguments: tag: D54
datatype: string
name: extract_symbolic_data
arguments: tag: D52
datatype: string
name: extract_symbolic_data
arguments: tag: D38
datatype: string
name: extract_symbolic_data
arguments: tag: D61
datatype: string
name: extract_symbolic_data
arguments: tag: D122
datatype: string
name: extract_symbolic_data
arguments: tag: D68
datatype: string
name: extract_symbolic_data
arguments: tag: D117
datatype: string
name: extract_symbolic_data
arguments: tag: D33
datatype: string
name: extract_symbolic_data
arguments: tag: D174
datatype: string
name: extract_symbolic_data
arguments: tag: D191
datatype: string
name: extract_symbolic_data
arguments: tag: D151
datatype: string
name: extract_symbolic_data
arguments: tag: D15
datatype: string
name: extract_symbolic_data
arguments: tag: D42
datatype: string
name: extract_symbolic_data
arguments: tag: D71
datatype: string
name: extract_symbolic_data
arguments: tag: D166
datatype: string

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


tool: D171: ----- recv begin -----

tool: D145: ----- recv end -----

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

tool: D73: <html>


tool: D54:   <head>


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


tool: D38:   </head>


tool: D61:   <body>


tool: D122:     

tool: D68: 


tool: D117:   </body>


tool: D33: </html>


tool: D174: HTTP/1.0 200 OK


tool: D191: Content-Length: 

tool: D151: %d

tool: D15: Content-Type: text/html


tool: D42: Set-Cookie: key1=value1


tool: D71: Set-Cookie: key2=value2


tool: D166: 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");
    strcat(response_header, "Set-Cookie: key2=value2\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;
}
```