user: 请将以下的汇编代码转换成C语言代码:

```asm
<send_error>:
  endbr64
  push   %r12
  pxor   %xmm0,%xmm0
  mov    $0x7e,%ecx
  push   %rbp
  mov    %edi,%ebp
  sub    $0x418,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdi
  movaps %xmm0,(%rsp)
  mov    %rsp,%r12
  rep stos %rax,%es:(%rdi)
  cmp    $0x191,%esi
  je     L81
  cmp    $0x194,%esi
  je     L14
  cmp    $0x1f4,%esi
  je     L15
  cmp    $0x190,%esi
  je     L22
  lea    D25(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
L66:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r12,%rsi
  mov    %ebp,%edi
  mov    %eax,%edx
  call   <write@plt>
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  add    $0x418,%rsp
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax)
L81:
  lea    D5(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  jmp    L66
  nopl   0x0(%rax)
L22:
  lea    D36(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  jmp    L66
  nopl   0x0(%rax)
L14:
  lea    D40(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  jmp    L66
  nopl   0x0(%rax)
L15:
  lea    D18(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  jmp    L66
L28:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D25
datatype: string
name: unpack_data
arguments: tag: D5
datatype: string
name: unpack_data
arguments: tag: D36
datatype: string
name: unpack_data
arguments: tag: D40
datatype: string
name: unpack_data
arguments: tag: D18
datatype: string

tool: D25: 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: D5: 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: D36: 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

tool: D40: 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: D18: 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

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) {
    ;
  }
}
```