user: What would the C source look like for the assembly code provided here?

```asm
<get_pid_query>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  call   <strlen@plt>
  mov    %eax,%ebp
  lea    -0x28(%rax),%eax
  cmp    $0x3c0,%eax
  ja     L29
  cmpb   $0x47,(%rbx)
  jne    L75
  cmpb   $0x45,0x1(%rbx)
  jne    L75
  cmpb   $0x54,0x2(%rbx)
  jne    L75
  lea    0x5(%rbx),%rdi
  lea    D95(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L25
  lea    0x6(%rbx),%rdi
  lea    D35(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L25
  lea    0x7(%rbx),%rdi
  lea    D29(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L25
  lea    0x8(%rbx),%rdi
  lea    D23(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L25
  lea    0x9(%rbx),%rdi
  lea    D58(%rip),%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L25
  lea    D42(%rip),%rsi
  mov    %rbx,%rdi
  call   <strstr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L94
  mov    $0x8,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  movzbl 0x4(%rbx),%edx
  cmp    $0x20,%dl
  je     L43
  mov    $0x4,%eax
L46:
  mov    %dl,-0x4(%rbp,%rax,1)
  add    $0x1,%rax
  movzbl (%rbx,%rax,1),%edx
  cmp    $0xb,%eax
  jg     L43
  cmp    $0x20,%dl
  jne    L46
L43:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%esi
  mov    %rbp,%rdi
  call   <realloc@plt>
  mov    %rax,%rbx
  jmp    L93
L29:
  lea    D54(%rip),%rdi
  call   <log_all@plt>
  mov    %ebp,%esi
  lea    D80(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%ebx
  jmp    L93
L75:
  lea    D48(%rip),%rdi
  call   <log_all@plt>
  mov    $0x0,%ebx
L93:
  mov    %rbx,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L25:
  lea    D13(%rip),%rdi
  call   <log_all@plt>
  mov    $0x0,%ebx
  jmp    L93
L94:
  lea    D38(%rip),%rdi
  call   <log_all@plt>
  jmp    L93
```

tool_calls: name: disassemble_data
arguments: label: D95
datatype: string
name: disassemble_data
arguments: label: D35
datatype: string
name: disassemble_data
arguments: label: D29
datatype: string
name: disassemble_data
arguments: label: D23
datatype: string
name: disassemble_data
arguments: label: D58
datatype: string
name: disassemble_data
arguments: label: D42
datatype: string
name: disassemble_data
arguments: label: D54
datatype: string
name: disassemble_data
arguments: label: D80
datatype: string
name: disassemble_data
arguments: label: D48
datatype: string
name: disassemble_data
arguments: label: D13
datatype: string
name: disassemble_data
arguments: label: D38
datatype: string

tool: D95: ?

tool: D35: p

tool: D29: i

tool: D23: d

tool: D58: =

tool: D42: pid=

tool: D54: String is out of bounds

tool: D80: %d


tool: D48: String contains no GET specification

tool: D13: String contains no PID query

tool: D38: Could not locate substring in request

assistant: ```c
char *get_pid_query(char *req) {
  int headers_len = strlen(req);
  if (headers_len > 1000 || headers_len < 40) {
    log_all("String is out of bounds");
    printf("%d\n", headers_len);
    return NULL;
  } else {
    if (req[0] != 'G' || req[1] != 'E' || req[2] != 'T') {
      log_all("String contains no GET specification");
      return NULL;
    } else if (!strcmp(&req[5], "?") || !strcmp(&req[6], "p") || !strcmp(&req[7], "i") || !strcmp(&req[8], "d") || !strcmp(&req[9], "=")) {
      log_all("String contains no PID query");
      return NULL;
    } else {
      char *sreq = strstr(req, "pid=");
      if (sreq != NULL) {
        char *pid = malloc(8);
        int i = 4;
        while ((sreq + i)[0] != ' ' && i < 12) {
          pid[i - 4] = sreq[i];
          i++;
        }
        int pidlen = strlen(pid);
        if (pidlen > 3 || pidlen < 8) {
          pid = realloc(pid, pidlen);
          return pid;
        } else {
          free(pid);
          return NULL;
        }
      } else {
        log_all("Could not locate substring in request");
        return NULL;
      }
    }
  }
}
```