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

```asm
<send_error>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x418,%rsp
  mov    %edi,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  movq   $0x0,(%rsp)
  movq   $0x0,0x8(%rsp)
  lea    0x10(%rsp),%rdi
  mov    $0x7e,%ecx
  rep stos %rax,%es:(%rdi)
  cmp    $0x191,%esi
  je     L70
  cmp    $0x194,%esi
  je     L81
  cmp    $0x1f4,%esi
  je     L51
  cmp    $0x190,%esi
  je     L63
  mov    %rsp,%rdi
  lea    D36(%rip),%rsi
  call   <sprintf@plt>
L28:
  mov    %rsp,%rbp
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  call   <write@plt>
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  add    $0x418,%rsp
  pop    %rbx
  pop    %rbp
  ret
L70:
  mov    %rsp,%rdi
  lea    D22(%rip),%rsi
  call   <sprintf@plt>
  jmp    L28
L81:
  mov    %rsp,%rdi
  lea    D5(%rip),%rsi
  call   <sprintf@plt>
  jmp    L28
L51:
  mov    %rsp,%rdi
  lea    D2(%rip),%rsi
  call   <sprintf@plt>
  jmp    L28
L63:
  mov    %rsp,%rdi
  lea    D11(%rip),%rsi
  call   <sprintf@plt>
  jmp    L28
L34:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D36
data_type: string
name: disassemble_data
arguments: data_label: D22
data_type: string
name: disassemble_data
arguments: data_label: D5
data_type: string
name: disassemble_data
arguments: data_label: D2
data_type: string
name: disassemble_data
arguments: data_label: D11
data_type: string

tool: D36: HTTP/1.0 501 Not Implemented
Content-type: text/plain
Connection: close
Server: MJPG-Streamer/0.2
Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Expires: Mon, 3 Jan 2000 12:34:56 GMT

501: Not Implemented!
%s

tool: D22: HTTP/1.0 401 Unauthorized
Content-type: text/plain
Connection: close
Server: MJPG-Streamer/0.2
Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Expires: Mon, 3 Jan 2000 12:34:56 GMT
WWW-Authenticate: Basic realm="MJPG-Streamer"

401: Not Authenticated!
%s

tool: D5: HTTP/1.0 404 Not Found
Content-type: text/plain
Connection: close
Server: MJPG-Streamer/0.2
Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Expires: Mon, 3 Jan 2000 12:34:56 GMT

404: Not Found!
%s

tool: D2: HTTP/1.0 500 Internal Server Error
Content-type: text/plain
Connection: close
Server: MJPG-Streamer/0.2
Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Expires: Mon, 3 Jan 2000 12:34:56 GMT

500: Internal Server Error!
%s

tool: D11: HTTP/1.0 400 Bad Request
Content-type: text/plain
Connection: close
Server: MJPG-Streamer/0.2
Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Expires: Mon, 3 Jan 2000 12:34:56 GMT

400: Not Found!
%s

assistant: ```c
void send_error(int fd, int which, char *message) {
  char buffer[1024] = {0};
  if (which == 401) {
    sprintf(buffer,
            "HTTP/1.0 401 Unauthorized\r\n"
            "Content-type: text/plain\r\n"
            "Connection: close\r\n"
            "Server: MJPG-Streamer/0.2\r\n"
            "Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0\r\n"
            "Pragma: no-cache\r\n"
            "Expires: Mon, 3 Jan 2000 12:34:56 GMT\r\n"
            "WWW-Authenticate: Basic realm=\"MJPG-Streamer\"\r\n"
            "\r\n"
            "401: Not Authenticated!\r\n"
            "%s",
            message);
  } else if (which == 404) {
    sprintf(buffer,
            "HTTP/1.0 404 Not Found\r\n"
            "Content-type: text/plain\r\n"
            "Connection: close\r\n"
            "Server: MJPG-Streamer/0.2\r\n"
            "Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0\r\n"
            "Pragma: no-cache\r\n"
            "Expires: Mon, 3 Jan 2000 12:34:56 GMT\r\n"
            "\r\n"
            "404: Not Found!\r\n"
            "%s",
            message);
  } else if (which == 500) {
    sprintf(buffer,
            "HTTP/1.0 500 Internal Server Error\r\n"
            "Content-type: text/plain\r\n"
            "Connection: close\r\n"
            "Server: MJPG-Streamer/0.2\r\n"
            "Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0\r\n"
            "Pragma: no-cache\r\n"
            "Expires: Mon, 3 Jan 2000 12:34:56 GMT\r\n"
            "\r\n"
            "500: Internal Server Error!\r\n"
            "%s",
            message);
  } else if (which == 400) {
    sprintf(buffer,
            "HTTP/1.0 400 Bad Request\r\n"
            "Content-type: text/plain\r\n"
            "Connection: close\r\n"
            "Server: MJPG-Streamer/0.2\r\n"
            "Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0\r\n"
            "Pragma: no-cache\r\n"
            "Expires: Mon, 3 Jan 2000 12:34:56 GMT\r\n"
            "\r\n"
            "400: Not Found!\r\n"
            "%s",
            message);
  } else {
    sprintf(buffer,
            "HTTP/1.0 501 Not Implemented\r\n"
            "Content-type: text/plain\r\n"
            "Connection: close\r\n"
            "Server: MJPG-Streamer/0.2\r\n"
            "Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0\r\n"
            "Pragma: no-cache\r\n"
            "Expires: Mon, 3 Jan 2000 12:34:56 GMT\r\n"
            "\r\n"
            "501: Not Implemented!\r\n"
            "%s",
            message);
  }
  if (write(fd, buffer, strlen(buffer)) < 0) {
    ;
  }
}
```