user: Translate the below assembly code into C programming language:

```asm
<http_request_headers>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x440,%rsp
  mov    %edi,-0x434(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    D115(%rip),%rax
  mov    %rax,%rdi
  call   <touch@plt>
L165:
  mov    -0x434(%rbp),%eax
  mov    $0x2000,%edx
  lea    D99(%rip),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <http_read_line@plt>
  test   %rax,%rax
  jns    L46
  lea    D91(%rip),%rax
  jmp    L17
L46:
  movzbl D99(%rip),%eax
  test   %al,%al
  je     L145
  mov    $0x20,%esi
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x420(%rbp)
  cmpq   $0x0,-0x420(%rbp)
  jne    L162
  lea    D34(%rip),%rax
  jmp    L17
L162:
  mov    -0x420(%rbp),%rax
  movb   $0x0,(%rax)
  addq   $0x1,-0x420(%rbp)
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jne    L161
  lea    D76(%rip),%rax
  jmp    L17
L161:
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    $0x1,%eax
  cltq
  lea    D99(%rip),%rdx
  add    %rdx,%rax
  mov    %rax,-0x418(%rbp)
  mov    -0x418(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  je     L37
  lea    D168(%rip),%rax
  jmp    L17
L37:
  mov    -0x418(%rbp),%rax
  movb   $0x0,(%rax)
  movl   $0x0,-0x424(%rbp)
  jmp    L115
L147:
  mov    -0x424(%rbp),%eax
  cltq
  lea    D99(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    -0x424(%rbp),%edx
  movslq %edx,%rdx
  lea    D99(%rip),%rcx
  mov    %al,(%rdx,%rcx,1)
  mov    -0x424(%rbp),%eax
  cltq
  lea    D99(%rip),%rdx
  movzbl (%rax,%rdx,1),%eax
  cmp    $0x2d,%al
  jne    L51
  mov    -0x424(%rbp),%eax
  cltq
  lea    D99(%rip),%rdx
  movb   $0x5f,(%rax,%rdx,1)
L51:
  addl   $0x1,-0x424(%rbp)
L115:
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x424(%rbp)
  jl     L147
  mov    -0x420(%rbp),%rcx
  lea    -0x410(%rbp),%rax
  mov    $0x200,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <url_decode@plt>
  lea    D183(%rip),%rax
  mov    %rax,%rsi
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L121
  lea    D220(%rip),%rax
  mov    %rax,%rsi
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L121
  lea    -0x210(%rbp),%rax
  lea    D99(%rip),%rdx
  mov    %rdx,%rcx
  lea    D204(%rip),%rdx
  mov    $0x200,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  lea    -0x410(%rbp),%rcx
  lea    -0x210(%rbp),%rax
  mov    $0x1,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <setenv@plt>
  jmp    L62
L121:
  lea    -0x410(%rbp),%rax
  mov    $0x1,%edx
  mov    %rax,%rsi
  lea    D99(%rip),%rax
  mov    %rax,%rdi
  call   <setenv@plt>
L62:
  jmp    L165
L145:
  nop
  mov    $0x0,%eax
L17:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D115
data_type: string
name: parse_data
arguments: label: D91
data_type: string
name: parse_data
arguments: label: D34
data_type: string
name: parse_data
arguments: label: D76
data_type: string
name: parse_data
arguments: label: D168
data_type: string
name: parse_data
arguments: label: D183
data_type: string
name: parse_data
arguments: label: D220
data_type: string
name: parse_data
arguments: label: D204
data_type: string

tool: D115: http_request_headers

tool: D91: Socket IO error

tool: D34: Header parse error (1)

tool: D76: Header parse error (2)

tool: D168: Header parse error (3)

tool: D183: CONTENT_TYPE

tool: D220: CONTENT_LENGTH

tool: D204: HTTP_%s

assistant: ```c
const char *http_request_headers(int fd) {
  static char buf[8192];
  int i;
  char value[512];
  char envvar[512];
  touch("http_request_headers");
  for (;;) {
    if (http_read_line(fd, buf, sizeof(buf)) < 0)
      return "Socket IO error";
    if (buf[0] == '\0')
      break;
    char *sp = strchr(buf, ' ');
    if (!sp)
      return "Header parse error (1)";
    *sp = '\0';
    sp++;
    if (strlen(buf) == 0)
      return "Header parse error (2)";
    char *colon = &buf[strlen(buf) - 1];
    if (*colon != ':')
      return "Header parse error (3)";
    *colon = '\0';
    for (i = 0; i < strlen(buf); i++) {
      buf[i] = toupper(buf[i]);
      if (buf[i] == '-')
        buf[i] = '_';
    }
    url_decode(value, sp, 512);
    if (strcmp(buf, "CONTENT_TYPE") != 0 && strcmp(buf, "CONTENT_LENGTH") != 0) {
      snprintf(envvar, 512, "HTTP_%s", buf);
      setenv(envvar, value, 1);
    } else {
      setenv(buf, value, 1);
    }
  }
  return 0;
}
```