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

```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
  mov    %edi,%r12d
  mov    %rsi,%r15
  mov    %rdx,%r13
  mov    %rcx,%r14
  mov    %r8,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x4008(%rsp)
  xor    %eax,%eax
  lea    0x2000(%rsp),%rbx
  movabs $0x743c3e6c6d74683c,%rax
  movabs $0x616f4e3e656c7469,%rdx
  mov    %rax,0x2000(%rsp)
  mov    %rdx,0x2008(%rsp)
  movabs $0x3c726f7272452068,%rax
  movabs $0x3e656c7469742f,%rdx
  mov    %rax,0x2010(%rsp)
  mov    %rdx,0x2018(%rsp)
  mov    %rbx,%rdx
  lea    D21(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %rbx,%rdx
  lea    D18(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %r15,%r8
  mov    %rbp,%rcx
  mov    %rbx,%rdx
  lea    D2(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbx,%rdx
  lea    D49(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rsp,%rbp
  mov    %r14,%rcx
  mov    %r13,%rdx
  lea    D34(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <Rio_writen@plt>
  movabs $0x2d746e65746e6f43,%rax
  movabs $0x6574203a65707974,%rdx
  mov    %rax,(%rsp)
  mov    %rdx,0x8(%rsp)
  movabs $0xd6c6d74682f7478,%rax
  mov    %rax,0x10(%rsp)
  movw   $0xa,0x18(%rsp)
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <Rio_writen@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    D50(%rip),%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <Rio_writen@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  mov    %rbx,%rsi
  mov    %r12d,%edi
  call   <Rio_writen@plt>
  mov    0x4008(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L13
  add    $0x4018,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D21
datatype: string
name: disassemble_data
arguments: data_tag: D18
datatype: string
name: disassemble_data
arguments: data_tag: D2
datatype: string
name: disassemble_data
arguments: data_tag: D49
datatype: string
name: disassemble_data
arguments: data_tag: D34
datatype: string
name: disassemble_data
arguments: data_tag: D50
datatype: string

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


tool: D18: %s%s: %s


tool: D2: %s<p>%s: %s


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


tool: D34: HTTP/1.0 %s %s


tool: D50: 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));
}
```