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

```asm
<send_headers>:
  endbr64
  push   %r15
  mov    %r9d,%r15d
  push   %r14
  mov    %rcx,%r14
  mov    %esi,%ecx
  lea    D91(%rip),%rsi
  push   %r13
  mov    %r8,%r13
  mov    %rdx,%r8
  lea    D44(%rip),%rdx
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  lea    D94(%rip),%rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rbx
  call   <fprintf@plt>
  lea    D24(%rip),%rdx
  lea    D67(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <fprintf@plt>
  xor    %edi,%edi
  call   <time@plt>
  lea    0xc(%rsp),%rdi
  mov    %eax,0xc(%rsp)
  call   <gmtime@plt>
  mov    %rbp,%rdx
  mov    $0x80,%esi
  mov    %rbx,%rdi
  mov    %eax,%ecx
  call   <strftime@plt>
  xor    %eax,%eax
  mov    %rbx,%rdx
  mov    %r12,%rdi
  lea    D62(%rip),%rsi
  call   <fprintf@plt>
  test   %r14,%r14
  je     L10
  mov    %r14,%rdx
  lea    D45(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
L10:
  test   %r13,%r13
  je     L33
  mov    %r13,%rdx
  lea    D4(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
L33:
  test   %r15d,%r15d
  js     L48
  mov    %r15d,%edx
  lea    D50(%rip),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
L48:
  cmpl   $0xffffffff,0xe0(%rsp)
  je     L22
  lea    0xe0(%rsp),%rdi
  call   <gmtime@plt>
  mov    %rbp,%rdx
  mov    $0x80,%esi
  mov    %rbx,%rdi
  mov    %eax,%ecx
  call   <strftime@plt>
  mov    %rbx,%rdx
  mov    %r12,%rdi
  xor    %eax,%eax
  lea    D90(%rip),%rsi
  call   <fprintf@plt>
L22:
  mov    %r12,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D101(%rip),%rdi
  call   <fwrite@plt>
  mov    %r12,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D5(%rip),%rdi
  call   <fwrite@plt>
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L23
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L23:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D91
type: string
name: unpack_data
arguments: data_label: D44
type: string
name: unpack_data
arguments: data_label: D94
type: string
name: unpack_data
arguments: data_label: D24
type: string
name: unpack_data
arguments: data_label: D67
type: string
name: unpack_data
arguments: data_label: D62
type: string
name: unpack_data
arguments: data_label: D45
type: string
name: unpack_data
arguments: data_label: D4
type: string
name: unpack_data
arguments: data_label: D50
type: string
name: unpack_data
arguments: data_label: D90
type: string
name: unpack_data
arguments: data_label: D101
type: string
name: unpack_data
arguments: data_label: D5
type: string

tool: D91: %s %d %s


tool: D44: HTTP/1.0

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

tool: D24: webserver/1.0

tool: D67: Server: %s


tool: D62: Date: %s


tool: D45: %s


tool: D4: Content-Type: %s


tool: D50: Content-Length: %d


tool: D90: Last-Modified: %s


tool: D101: Connection: close


tool: D5: 


assistant: ```c
void send_headers(FILE *f, int status, char *title, char *extra, char *mime, int length, time_t date) {
  time_t now;
  char timebuf[128];
  fprintf(f, "%s %d %s\r\n", "HTTP/1.0", status, title);
  fprintf(f, "Server: %s\r\n", "webserver/1.0");
  now = time(NULL);
  strftime(timebuf, sizeof(timebuf), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now));
  fprintf(f, "Date: %s\r\n", timebuf);
  if (extra)
    fprintf(f, "%s\r\n", extra);
  if (mime)
    fprintf(f, "Content-Type: %s\r\n", mime);
  if (length >= 0)
    fprintf(f, "Content-Length: %d\r\n", length);
  if (date != -1) {
    strftime(timebuf, sizeof(timebuf), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&date));
    fprintf(f, "Last-Modified: %s\r\n", timebuf);
  }
  fprintf(f, "Connection: close\r\n");
  fprintf(f, "\r\n");
}
```