user: What is the c source code of the assembly code below?

```asm
<construct_command_argv>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    %rdi,0x8(%rsp)
  lea    D39(%rip),%rdi
  mov    %rsi,0x10(%rsp)
  call   <variable_expand_for_file@plt>
  lea    D9(%rip),%rsi
  movslq %eax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L176
L280:
  mov    $0x20,%edi
  xor    %eax,%eax
  call   <xmalloc@plt>
  mov    0x10(%rsp),%rsi
  lea    D39(%rip),%rdi
  movslq %eax,%r12
  xor    %eax,%eax
  call   <variable_expand_for_file@plt>
  movq   $0x0,0x18(%r12)
  cltq
  mov    %rax,(%r12)
  lea    D8(%rip),%rax
  mov    %rax,0x8(%r12)
  mov    0x8(%rsp),%rax
  mov    %rax,0x10(%r12)
L141:
  add    $0x38,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L176:
  mov    %rbx,%rsi
  lea    D25(%rip),%rdi
  call   <variable_expand_for_file@plt>
  cltq
  movzbl (%rax),%edx
  test   %dl,%dl
  je     L25
  nopl   0x0(%rax,%rax,1)
L263:
  lea    -0x9(%rdx),%ecx
  cmp    $0x1,%cl
  jbe    L279
  cmp    $0x20,%dl
  jne    L280
L279:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  test   %dl,%dl
  jne    L263
L25:
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    0x1(%rax),%r13d
  xor    %eax,%eax
  movslq %r13d,%rbp
  lea    0x0(,%rbp,8),%rdi
  call   <xmalloc@plt>
  mov    %r13d,%edi
  movslq %eax,%r12
  xor    %eax,%eax
  call   <xmalloc@plt>
  movslq %eax,%r14
  mov    %r14,(%r12)
  movzbl (%rbx),%r15d
  lea    (%r14,%rbp,1),%rax
  mov    %rax,%rdi
  test   %r15b,%r15b
  je     L195
  cmp    %rax,%r14
  ja     1140 <construct_command_argv.cold>
  mov    0x8(%rsp),%rbp
  mov    %r15d,%eax
  mov    %r12,0x18(%rsp)
  mov    %r14,%r15
  movl   $0x0,0x28(%rsp)
  xor    %ebx,%ebx
  lea    D17(%rip),%r13
  mov    %eax,%r14d
  mov    %rbp,%r12
  mov    %rdi,%rbp
  jmp    L356
  nopl   (%rax)
L129:
  lea    0x1(%r12),%rax
  cmp    $0x27,%r14b
  je     L67
  mov    %r14b,(%r15)
  add    $0x1,%r15
  movzbl 0x1(%r12),%r14d
  mov    %rax,%r12
L352:
  test   %r14b,%r14b
  je     L284
L266:
  cmp    %rbp,%r15
  ja     L361
L356:
  test   %ebx,%ebx
  jne    L129
  movsbl %r14b,%esi
  mov    %r13,%rdi
  call   <index@plt>
  test   %rax,%rax
  jne    L127
  cmp    $0x27,%r14b
  je     L260
  jg     L146
  cmp    $0xa,%r14b
  jg     L180
  cmp    $0x8,%r14b
  jg     L367
L134:
  mov    %r14b,(%r15)
  movzbl 0x1(%r12),%r14d
  add    $0x1,%r15
  add    $0x1,%r12
  test   %r14b,%r14b
  jne    L266
  nopl   0x0(%rax)
L284:
  mov    0x18(%rsp),%r12
  movslq 0x28(%rsp),%rax
  mov    %r15,%r14
  lea    (%r12,%rax,8),%rax
L145:
  movb   $0x0,(%r14)
  mov    (%rax),%rdx
  cmpb   $0x0,(%rdx)
  je     L73
  mov    0x28(%rsp),%eax
  add    $0x1,%eax
  cltq
  lea    (%r12,%rax,8),%rax
L73:
  movq   $0x0,(%rax)
  xor    %eax,%eax
  cmpq   $0x0,(%r12)
  cmove  %rax,%r12
  jmp    L141
  nopl   0x0(%rax)
L146:
  cmp    $0x5c,%r14b
  jne    L134
  movzbl 0x1(%r12),%r14d
  lea    0x1(%r12),%rax
  test   %r14b,%r14b
  je     L276
  cmp    $0xa,%r14b
  je     L276
  mov    %r14b,(%r15)
  add    $0x2,%r12
  movzbl (%r12),%r14d
  add    $0x1,%r15
  jmp    L352
  nopl   0x0(%rax)
L180:
  cmp    $0x20,%r14b
  jne    L134
L367:
  addl   $0x1,0x28(%rsp)
  mov    0x18(%rsp),%rdi
  lea    0x1(%r15),%rsi
  movslq 0x28(%rsp),%rax
  movb   $0x0,(%r15)
  mov    %rsi,0x20(%rsp)
  mov    %rsi,(%rdi,%rax,8)
  cmp    $0x1,%eax
  je     L310
L199:
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <next_token@plt>
  mov    0x20(%rsp),%r15
  movslq %eax,%r12
  movzbl (%r12),%r14d
  jmp    L352
  nopl   0x0(%rax,%rax,1)
L67:
  movzbl 0x1(%r12),%r14d
  xor    %ebx,%ebx
  mov    %rax,%r12
  jmp    L352
  nopl   0x0(%rax,%rax,1)
L260:
  movzbl 0x1(%r12),%r14d
  mov    $0x1,%ebx
  add    $0x1,%r12
  jmp    L352
  nopl   0x0(%rax)
L276:
  mov    %rax,%r12
  jmp    L352
L310:
  mov    (%rdi),%r14
  mov    %ebx,0x2c(%rsp)
  lea    D75(%rip),%r15
  lea    D36(%rip),%rax
  lea    0x1(%r14),%rdi
  mov    %r14,%rbx
  mov    %rdi,%r14
  jmp    L163
  nopl   0x0(%rax)
L190:
  mov    (%r15),%rax
  add    $0x8,%r15
  test   %rax,%rax
  je     L41
L163:
  cmp    %rax,%rbx
  je     L127
  movzbl (%rax),%edx
  cmp    (%rbx),%dl
  jne    L190
  test   %dl,%dl
  je     L127
  lea    0x1(%rax),%rdi
  mov    %r14,%rsi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L190
  nopl   0x0(%rax)
L127:
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  jmp    L280
  nopw   0x0(%rax,%rax,1)
L41:
  mov    0x2c(%rsp),%ebx
  jmp    L199
L195:
  movl   $0x0,0x28(%rsp)
  mov    %r12,%rax
  jmp    L145
L361:
  jmp    1140 <construct_command_argv.cold>
```

tool_calls: name: disassemble_data
arguments: data_label: D39
datatype: string
name: disassemble_data
arguments: data_label: D9
datatype: string
name: disassemble_data
arguments: data_label: D8
datatype: string
name: disassemble_data
arguments: data_label: D25
datatype: string
name: disassemble_data
arguments: data_label: D36
datatype: string

tool: D39: $(SHELL)

tool: D9: /bin/sh

tool: D8: -c

tool: D25: $(IFS)

tool: D36: cd

assistant: ```c
char **construct_command_argv(line, file)
char *line;
struct file *file;
{
  static char sh_chars[] = "#;\"*?[]&|<>(){}=$`";
  static char *sh_cmds[] = {"cd", "eval", "exec", "exit", "login", "logout", "set", "umask", "wait", "while", "for", "case", "if", ":", ".", "break", "continue", "export", "read", "readonly", "shift", "times", "trap", "switch", 0};
  register int i;
  register char *p;
  register char *ap;
  char *end;
  int instring;
  char **new_argv = 0;
  p = variable_expand_for_file("$(SHELL)", file);
  if (strcmp(p, "/bin/sh"))
    goto slow;
  p = variable_expand_for_file("$(IFS)", file);
  for (ap = p; *ap != '\0'; ++ap)
    if (*ap != ' ' && *ap != '\t' && *ap != '\n')
      goto slow;
  i = strlen(line) + 1;
  new_argv = (char **)xmalloc(i * sizeof(char *));
  ap = new_argv[0] = (char *)xmalloc(i);
  end = ap + i;
  i = 0;
  instring = 0;
  for (p = line; *p != '\0'; ++p) {
    if (ap > end)
      abort();
    if (instring) {
      if (*p == '\'')
        instring = 0;
      else
        *ap++ = *p;
    } else if (index(sh_chars, *p) != 0)
      goto slow;
    else
      switch (*p) {
      case '\\':
        if (p[1] != '\0' && p[1] != '\n')
          *ap++ = *++p;
        break;
      case '\'':
        instring = 1;
        break;
      case '\n':
      case ' ':
      case '\t':
        *ap++ = '\0';
        new_argv[++i] = ap;
        if (i == 1) {
          register int j;
          for (j = 0; sh_cmds[j] != 0; ++j)
            if (((sh_cmds[j]) == (new_argv[0]) || (*(sh_cmds[j]) == *(new_argv[0]) && (*(sh_cmds[j]) == '\0' || !strcmp((sh_cmds[j]) + 1, (new_argv[0]) + 1)))))
              goto slow;
        }
        p = next_token(p);
        --p;
        break;
      default:
        *ap++ = *p;
        break;
      }
  }
  *ap = '\0';
  if (new_argv[i][0] != '\0')
    ++i;
  new_argv[i] = 0;
  if (new_argv[0] == 0)
    return 0;
  else
    return new_argv;
slow:;
  if (new_argv != 0)
    free(new_argv);
  new_argv = (char **)xmalloc(4 * sizeof(char *));
  new_argv[0] = variable_expand_for_file("$(SHELL)", file);
  new_argv[1] = "-c";
  new_argv[2] = line;
  new_argv[3] = 0;
  return new_argv;
}
```