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

```asm
<clienterror>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L0:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L0
  sub    $0x18,%rsp
  movdqa D31(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x4008(%rsp)
  xor    %eax,%eax
  lea    0x2000(%rsp),%rbp
  mov    %edi,%r13d
  mov    %rcx,%r15
  mov    %rdx,%r14
  mov    %rsi,%rbx
  mov    %rbp,%rdx
  mov    %rbp,%rdi
  movaps %xmm0,0x2000(%rsp)
  movdqa D26(%rip),%xmm0
  mov    %r8,%r12
  lea    D49(%rip),%rsi
  movb   $0x0,0x2020(%rsp)
  movaps %xmm0,0x2010(%rsp)
  call   <sprintf@plt>
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %rbp,%rdx
  lea    D48(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D63(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %rsp,%r12
  call   <sprintf@plt>
  mov    %rbp,%rdx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D5(%rip),%rsi
  call   <sprintf@plt>
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r12,%rdi
  lea    D4(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %r13d,%edi
  mov    %rax,%rdx
  call   <Gs_writen@plt>
  movdqa D72(%rip),%xmm0
  mov    %r12,%rdi
  movabs $0xd6c6d74682f7478,%rax
  mov    %rax,0x10(%rsp)
  mov    $0xa,%eax
  movaps %xmm0,(%rsp)
  mov    %ax,0x18(%rsp)
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %r13d,%edi
  mov    %rax,%rdx
  call   <Gs_writen@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    D30(%rip),%rsi
  mov    %r12,%rdi
  mov    %eax,%edx
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %r13d,%edi
  mov    %rax,%rdx
  call   <Gs_writen@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %r13d,%edi
  mov    %rax,%rdx
  call   <Gs_writen@plt>
  mov    0x4008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0x4018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D31
datatype: byte[16]
name: read_data
arguments: data_tag: D26
datatype: byte[16]
name: read_data
arguments: data_tag: D49
datatype: string
name: read_data
arguments: data_tag: D48
datatype: string
name: read_data
arguments: data_tag: D63
datatype: string
name: read_data
arguments: data_tag: D5
datatype: string
name: read_data
arguments: data_tag: D4
datatype: string
name: read_data
arguments: data_tag: D72
datatype: byte[16]
name: read_data
arguments: data_tag: D30
datatype: string

tool: {"D31": [0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x47,0x61,0x75]}

tool: {"D26": [0x73,0x73,0x20,0x45,0x72,0x72,0x6f,0x72,0x3c,0x2f,0x74,0x69,0x74,0x6c,0x65,0x3e]}

tool: D49: %s<body bgcolor=ffffff>


tool: D48: %s%s: %s


tool: D63: %s<p>%s: %s


tool: D5: %s<hr><em>The Gauss Web server</em>


tool: D4: HTTP/1.0 %s %s


tool: {"D72": [0x43,0x6f,0x6e,0x74,0x65,0x6e,0x74,0x2d,0x74,0x79,0x70,0x65,0x3a,0x20,0x74,0x65]}

tool: D30: Content-length: %d



assistant: ```c
void clienterror(int fd, char *cause, char *errnum, char *shortmsg, char *longmsg) {
  char buf[8192], body[8192];
  sprintf(body, "<html><title>Gauss Error</title>");
  sprintf(body,
          "%s<body bgcolor="
          "ffffff"
          ">\r\n",
          body);
  sprintf(body, "%s%s: %s\r\n", body, errnum, shortmsg);
  sprintf(body, "%s<p>%s: %s\r\n", body, longmsg, cause);
  sprintf(body, "%s<hr><em>The Gauss Web server</em>\r\n", body);
  sprintf(buf, "HTTP/1.0 %s %s\r\n", errnum, shortmsg);
  Gs_writen(fd, buf, strlen(buf));
  sprintf(buf, "Content-type: text/html\r\n");
  Gs_writen(fd, buf, strlen(buf));
  sprintf(buf, "Content-length: %d\r\n\r\n", (int)strlen(body));
  Gs_writen(fd, buf, strlen(buf));
  Gs_writen(fd, body, strlen(body));
}
```