user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<http_request_line>:
  endbr64
  push   %r15
  lea    D7(%rip),%r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %edi,%ebp
  lea    D95(%rip),%rdi
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x8,%rsp
  call   <touch@plt>
  mov    $0x2000,%edx
  mov    %r15,%rsi
  mov    %ebp,%edi
  call   <http_read_line@plt>
  lea    D108(%rip),%r8
  test   %rax,%rax
  js     L36
  mov    $0x20,%esi
  mov    %r15,%rdi
  call   <strchr@plt>
  lea    D1(%rip),%r8
  test   %rax,%rax
  je     L36
  cmpb   $0x2f,0x1(%rax)
  movb   $0x0,(%rax)
  lea    D128(%rip),%r8
  je     L39
L36:
  add    $0x8,%rsp
  mov    %r8,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L39:
  lea    0x1(%rax),%rbp
  mov    $0x20,%esi
  mov    %rbp,%rdi
  call   <strchr@plt>
  lea    D112(%rip),%r8
  mov    %rax,%r14
  test   %rax,%rax
  je     L36
  movb   $0x0,(%rax)
  lea    D46(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L50
  lea    D104(%rip),%rsi
  mov    %r15,%rdi
  call   <strcmp@plt>
  lea    D117(%rip),%r8
  test   %rax,%rax
  jne    L36
L50:
  mov    %r15,%rdx
  lea    D8(%rip),%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  lea    0x1(%r14),%rdx
  lea    D22(%rip),%rsi
  lea    0x1(%rbx,%rax,1),%r15
  xor    %eax,%eax
  mov    %r15,%rdi
  call   <sprintf@plt>
  mov    $0x3f,%esi
  mov    %rbp,%rdi
  lea    0x1(%r15,%rax,1),%r14
  call   <strchr@plt>
  test   %rax,%rax
  je     L8
  movb   $0x0,(%rax)
  lea    0x1(%rax),%rdx
  xor    %eax,%eax
  mov    %r14,%rdi
  lea    D96(%rip),%rsi
  call   <sprintf@plt>
  lea    0x1(%r14,%rax,1),%r14
L8:
  mov    %rbp,%rsi
  mov    $0x800,%edx
  mov    %r12,%rdi
  call   <url_decode@plt>
  mov    %r12,%rdx
  mov    %r14,%rdi
  xor    %eax,%eax
  lea    D61(%rip),%rsi
  call   <sprintf@plt>
  lea    D100(%rip),%rsi
  lea    0x1(%r14,%rax,1),%rbp
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <sprintf@plt>
  xor    %r8d,%r8d
  lea    0x1(%rbp,%rax,1),%rax
  movb   $0x0,(%rax)
  sub    %rbx,%rax
  add    $0x1,%rax
  mov    %rax,0x0(%r13)
  jmp    L36
```

tool_calls: name: disassemble_data
arguments: tag: D95
type_guessed: string
name: disassemble_data
arguments: tag: D108
type_guessed: string
name: disassemble_data
arguments: tag: D1
type_guessed: string
name: disassemble_data
arguments: tag: D128
type_guessed: string
name: disassemble_data
arguments: tag: D112
type_guessed: string
name: disassemble_data
arguments: tag: D46
type_guessed: string
name: disassemble_data
arguments: tag: D104
type_guessed: string
name: disassemble_data
arguments: tag: D117
type_guessed: string
name: disassemble_data
arguments: tag: D8
type_guessed: string
name: disassemble_data
arguments: tag: D22
type_guessed: string
name: disassemble_data
arguments: tag: D96
type_guessed: string
name: disassemble_data
arguments: tag: D61
type_guessed: string
name: disassemble_data
arguments: tag: D100
type_guessed: string

tool: D95: http_request_line

tool: D108: Socket IO error

tool: D1: Cannot parse HTTP request (1)

tool: D128: Bad request path

tool: D112: Cannot parse HTTP request (2)

tool: D46: GET

tool: D104: POST

tool: D117: Unsupported request (not GET or POST)

tool: D8: REQUEST_METHOD=%s

tool: D22: SERVER_PROTOCOL=%s

tool: D96: QUERY_STRING=%s

tool: D61: REQUEST_URI=%s

tool: D100: SERVER_NAME=zoobar.org

assistant: ```c
const char *http_request_line(int fd, char *reqpath, char *env, size_t *env_len) {
  static char buf[8192];
  char *sp1, *sp2, *qp, *envp = env;
  touch("http_request_line");
  if (http_read_line(fd, buf, sizeof(buf)) < 0)
    return "Socket IO error";
  sp1 = strchr(buf, ' ');
  if (!sp1)
    return "Cannot parse HTTP request (1)";
  *sp1 = '\0';
  sp1++;
  if (*sp1 != '/')
    return "Bad request path";
  sp2 = strchr(sp1, ' ');
  if (!sp2)
    return "Cannot parse HTTP request (2)";
  *sp2 = '\0';
  sp2++;
  if (strcmp(buf, "GET") && strcmp(buf, "POST"))
    return "Unsupported request (not GET or POST)";
  envp += sprintf(envp, "REQUEST_METHOD=%s", buf) + 1;
  envp += sprintf(envp, "SERVER_PROTOCOL=%s", sp2) + 1;
  if ((qp = strchr(sp1, '?'))) {
    *qp = '\0';
    envp += sprintf(envp, "QUERY_STRING=%s", qp + 1) + 1;
  }
  url_decode(reqpath, sp1, 2048);
  envp += sprintf(envp, "REQUEST_URI=%s", reqpath) + 1;
  envp += sprintf(envp, "SERVER_NAME=zoobar.org") + 1;
  *envp = 0;
  *env_len = envp - env + 1;
  return NULL;
}
```