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
L16:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L16
  sub    $0x18,%rsp
  movdqa D16(%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 D14(%rip),%xmm0
  lea    D63(%rip),%rsi
  mov    %r8,%r12
  movaps %xmm0,0x2010(%rsp)
  call   <sprintf@plt>
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %rbp,%rdx
  lea    D49(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %rbx,%r8
  mov    %r12,%rcx
  mov    %rbp,%rdx
  lea    D42(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  mov    %rsp,%r12
  call   <sprintf@plt>
  mov    %rbp,%rdx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D8(%rip),%rsi
  call   <sprintf@plt>
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r12,%rdi
  lea    D19(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %r13d,%edi
  mov    %rax,%rdx
  call   <Rio_writen@plt>
  movdqa D46(%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   <Rio_writen@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  lea    D43(%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   <Rio_writen@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rbp,%rsi
  mov    %r13d,%edi
  mov    %rax,%rdx
  call   <Rio_writen@plt>
  mov    0x4008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L2
  add    $0x4018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D16
type_guessed: byte[16]
name: read_data
arguments: data_label: D14
type_guessed: byte[16]
name: read_data
arguments: data_label: D63
type_guessed: string
name: read_data
arguments: data_label: D49
type_guessed: string
name: read_data
arguments: data_label: D42
type_guessed: string
name: read_data
arguments: data_label: D8
type_guessed: string
name: read_data
arguments: data_label: D19
type_guessed: string
name: read_data
arguments: data_label: D46
type_guessed: byte[16]
name: read_data
arguments: data_label: D43
type_guessed: string

tool: {"D16": [0x3c,0x68,0x74,0x6d,0x6c,0x3e,0x3c,0x74,0x69,0x74,0x6c,0x65,0x3e,0x4e,0x6f,0x61]}

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

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


tool: D49: %s%s: %s


tool: D42: %s<p>%s: %s


tool: D8: %s<hr><em>The Noah Web server</em>


tool: D19: HTTP/1.0 %s %s


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

tool: D43: 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>Noah 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 Noah Web server</em>\r\n", body);
  sprintf(buf, "HTTP/1.0 %s %s\r\n", errnum, shortmsg);
  Rio_writen(fd, buf, strlen(buf));
  sprintf(buf, "Content-type: text/html\r\n");
  Rio_writen(fd, buf, strlen(buf));
  sprintf(buf, "Content-length: %d\r\n\r\n", (int)strlen(body));
  Rio_writen(fd, buf, strlen(buf));
  Rio_writen(fd, body, strlen(body));
}
```