user: 请从给定的汇编指令推导出C源代码：

```asm
<send_error>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x420,%rsp
  mov    %edi,-0x414(%rbp)
  mov    %esi,-0x418(%rbp)
  mov    %rdx,-0x420(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x410(%rbp)
  movq   $0x0,-0x408(%rbp)
  lea    -0x400(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x7e,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  cmpl   $0x191,-0x418(%rbp)
  jne    L20
  mov    -0x420(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  lea    D46(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L39
L20:
  cmpl   $0x194,-0x418(%rbp)
  jne    L68
  mov    -0x420(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L39
L68:
  cmpl   $0x1f4,-0x418(%rbp)
  jne    L12
  mov    -0x420(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  lea    D28(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L39
L12:
  cmpl   $0x190,-0x418(%rbp)
  jne    L84
  mov    -0x420(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  lea    D35(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  jmp    L39
L84:
  mov    -0x420(%rbp),%rdx
  lea    -0x410(%rbp),%rax
  lea    D13(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
L39:
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  lea    -0x410(%rbp),%rcx
  mov    -0x414(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L59
  call   <__stack_chk_fail@plt>
L59:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D46
data_type: string
name: retrieve_data
arguments: data_tag: D14
data_type: string
name: retrieve_data
arguments: data_tag: D28
data_type: string
name: retrieve_data
arguments: data_tag: D35
data_type: string
name: retrieve_data
arguments: data_tag: D13
data_type: string

tool: D46: 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: D14: 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: D28: 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: D35: 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: D13: 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

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