user: 请从给定的汇编指令推导出C源代码:

```asm
<build_headers>:
  endbr64
  push   %r15
  lea    D32(%rip),%r15
  push   %r14
  push   %r13
  mov    %r8d,%r13d
  mov    %rdx,%r8
  lea    D1(%rip),%rdx
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %r9,0x8(%rsp)
  lea    0x20(%rsp),%r14
  mov    %rcx,(%rsp)
  mov    %esi,%ecx
  lea    D87(%rip),%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <sprintf@plt>
  lea    D43(%rip),%rdx
  lea    D6(%rip),%rsi
  movslq %eax,%rdi
  mov    %rax,%r12
  xor    %eax,%eax
  add    %rbp,%rdi
  call   <sprintf@plt>
  xor    %edi,%edi
  add    %eax,%r12d
  call   <time@plt>
  lea    0x18(%rsp),%rdi
  mov    %rax,0x18(%rsp)
  call   <gmtime@plt>
  mov    %r15,%rdx
  mov    $0x64,%esi
  mov    %r14,%rdi
  mov    %eax,%ecx
  call   <strftime@plt>
  movslq %r12d,%rdi
  mov    %r14,%rdx
  xor    %eax,%eax
  add    %rbp,%rdi
  lea    D36(%rip),%rsi
  call   <sprintf@plt>
  mov    (%rsp),%r10
  lea    (%r12,%rax,1),%ebx
  test   %r10,%r10
  je     L5
  movslq %ebx,%rdi
  mov    %r10,%rdx
  lea    D93(%rip),%rsi
  xor    %eax,%eax
  add    %rbp,%rdi
  call   <sprintf@plt>
  add    %eax,%ebx
L5:
  test   %r13d,%r13d
  js     L2
  movslq %ebx,%rdi
  mov    %r13d,%edx
  lea    D84(%rip),%rsi
  xor    %eax,%eax
  add    %rbp,%rdi
  call   <sprintf@plt>
  add    %eax,%ebx
L2:
  cmpq   $0xffffffffffffffff,0x8(%rsp)
  je     L21
  lea    0x8(%rsp),%rdi
  call   <gmtime@plt>
  mov    %r15,%rdx
  mov    $0x64,%esi
  mov    %r14,%rdi
  mov    %eax,%ecx
  call   <strftime@plt>
  movslq %ebx,%rdi
  mov    %r14,%rdx
  xor    %eax,%eax
  add    %rbp,%rdi
  lea    D40(%rip),%rsi
  call   <printf@plt>
  add    %eax,%ebx
L21:
  movslq %ebx,%rdi
  lea    D79(%rip),%rsi
  xor    %eax,%eax
  add    %rbp,%rdi
  call   <sprintf@plt>
  lea    D64(%rip),%rsi
  add    %eax,%ebx
  movslq %ebx,%rax
  lea    0x0(%rbp,%rax,1),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  add    %ebx,%eax
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L39
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D32
type: string
name: retrieve_data
arguments: data_label: D1
type: string
name: retrieve_data
arguments: data_label: D87
type: string
name: retrieve_data
arguments: data_label: D43
type: string
name: retrieve_data
arguments: data_label: D6
type: string
name: retrieve_data
arguments: data_label: D36
type: string
name: retrieve_data
arguments: data_label: D93
type: string
name: retrieve_data
arguments: data_label: D84
type: string
name: retrieve_data
arguments: data_label: D40
type: string
name: retrieve_data
arguments: data_label: D79
type: string
name: retrieve_data
arguments: data_label: D64
type: string

tool: D32: %a, %d %b %Y %H:%M:%S GMT

tool: D1: HTTP/1.0

tool: D87: %s %d %s


tool: D43: micro_proxy

tool: D6: Server: %s


tool: D36: Date: %s


tool: D93: Content-Type: %s


tool: D84: Content-Length: %d


tool: D40: Last-Modified: %s


tool: D79: Connection: close


tool: D64: 


assistant: ```c
int build_headers(char *buffer, int status, char *title, char *mime_type, int length, time_t mod) {
  time_t now;
  char timebuf[100];
  int index = 0;
  index += sprintf(buffer + index, "%s %d %s\r\n", "HTTP/1.0", status, title);
  index += sprintf(buffer + index, "Server: %s\r\n", "micro_proxy");
  now = time((time_t *)0);
  strftime(timebuf, sizeof(timebuf), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now));
  index += sprintf(buffer + index, "Date: %s\r\n", timebuf);
  if (mime_type != (char *)0)
    index += sprintf(buffer + index, "Content-Type: %s\r\n", mime_type);
  if (length >= 0)
    index += sprintf(buffer + index, "Content-Length: %d\r\n", length);
  if (mod != (time_t)-1) {
    strftime(timebuf, sizeof(timebuf), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&mod));
    index += printf(buffer + index, "Last-Modified: %s\r\n", timebuf);
  }
  index += sprintf(buffer + index, "Connection: close\r\n");
  index += printf(buffer + index, "\r\n");
  return index;
}
```