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

```asm
<construct_command_argv>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x30,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  movq   $0x0,-0x30(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <variable_expand_for_file@plt>
  cltq
  mov    %rax,%rbx
  lea    D7(%rip),%rax
  mov    %rax,%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L422
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D98(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <variable_expand_for_file@plt>
  cltq
  mov    %rax,%rbx
  mov    %rbx,%r12
  jmp    L202
L103:
  movzbl (%r12),%eax
  cmp    $0x20,%al
  je     L257
  movzbl (%r12),%eax
  cmp    $0x9,%al
  je     L257
  movzbl (%r12),%eax
  cmp    $0xa,%al
  jne    L77
L257:
  add    $0x1,%r12
L202:
  movzbl (%r12),%eax
  test   %al,%al
  jne    L103
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  add    $0x1,%eax
  mov    %eax,%r13d
  movslq %r13d,%rax
  shl    $0x3,%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <xmalloc@plt>
  cltq
  mov    %rax,-0x30(%rbp)
  mov    %r13d,%edi
  mov    $0x0,%eax
  call   <xmalloc@plt>
  cltq
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%r12
  movslq %r13d,%rax
  add    %r12,%rax
  mov    %rax,-0x28(%rbp)
  mov    $0x0,%r13d
  movl   $0x0,-0x34(%rbp)
  mov    -0x48(%rbp),%rbx
  jmp    L88
L48:
  cmp    -0x28(%rbp),%r12
  jbe    L237
  call   <abort@plt>
L237:
  cmpl   $0x0,-0x34(%rbp)
  je     L124
  movzbl (%rbx),%eax
  cmp    $0x27,%al
  jne    L208
  movl   $0x0,-0x34(%rbp)
  jmp    L169
L208:
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl (%rbx),%edx
  mov    %dl,(%rax)
  jmp    L169
L124:
  movzbl (%rbx),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D69(%rip),%rax
  mov    %rax,%rdi
  call   <index@plt>
  test   %rax,%rax
  jne    L408
  movzbl (%rbx),%eax
  movsbl %al,%eax
  cmp    $0x5c,%eax
  je     L222
  cmp    $0x5c,%eax
  jg     L305
  cmp    $0x27,%eax
  je     L52
  cmp    $0x27,%eax
  jg     L305
  cmp    $0xa,%eax
  jg     L183
  cmp    $0x9,%eax
  jge    L143
  jmp    L305
L183:
  cmp    $0x20,%eax
  je     L143
  jmp    L305
L222:
  lea    0x1(%rbx),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L43
  lea    0x1(%rbx),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L43
  add    $0x1,%rbx
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl (%rbx),%edx
  mov    %dl,(%rax)
  jmp    L43
L52:
  movl   $0x1,-0x34(%rbp)
  jmp    L169
L143:
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movb   $0x0,(%rax)
  add    $0x1,%r13d
  movslq %r13d,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %r12,(%rax)
  cmp    $0x1,%r13d
  jne    L129
  mov    $0x0,%r14d
  jmp    L397
L33:
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%rdx
  lea    D106(%rip),%rax
  mov    (%rdx,%rax,1),%rdx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  je     L218
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%rdx
  lea    D106(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  movzbl (%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    %al,%dl
  jne    L402
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%rdx
  lea    D106(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L218
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  lea    0x1(%rax),%rdx
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%rcx
  lea    D106(%rip),%rax
  mov    (%rcx,%rax,1),%rax
  add    $0x1,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L218
L402:
  add    $0x1,%r14d
L397:
  movslq %r14d,%rax
  lea    0x0(,%rax,8),%rdx
  lea    D106(%rip),%rax
  mov    (%rdx,%rax,1),%rax
  test   %rax,%rax
  jne    L33
L129:
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <next_token@plt>
  cltq
  mov    %rax,%rbx
  sub    $0x1,%rbx
  jmp    L169
L305:
  mov    %r12,%rax
  lea    0x1(%rax),%r12
  movzbl (%rbx),%edx
  mov    %dl,(%rax)
  jmp    L169
L43:
  nop
L169:
  add    $0x1,%rbx
L88:
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L48
  movb   $0x0,(%r12)
  movslq %r13d,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L133
  add    $0x1,%r13d
L133:
  movslq %r13d,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L105
  mov    $0x0,%eax
  jmp    L301
L105:
  mov    -0x30(%rbp),%rax
  jmp    L301
L422:
  nop
  jmp    L340
L77:
  nop
  jmp    L340
L408:
  nop
  jmp    L340
L218:
  nop
L340:
  cmpq   $0x0,-0x30(%rbp)
  je     L365
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L365:
  mov    $0x20,%edi
  mov    $0x0,%eax
  call   <xmalloc@plt>
  cltq
  mov    %rax,-0x30(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rsi
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <variable_expand_for_file@plt>
  cltq
  mov    %rax,%rdx
  mov    -0x30(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  add    $0x8,%rax
  lea    D3(%rip),%rdx
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x30(%rbp),%rax
  add    $0x18,%rax
  movq   $0x0,(%rax)
  mov    -0x30(%rbp),%rax
L301:
  add    $0x30,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D55
data_type: string
name: extract_symbolic_data
arguments: tag: D7
data_type: string
name: extract_symbolic_data
arguments: tag: D98
data_type: string
name: extract_symbolic_data
arguments: tag: D3
data_type: string

tool: D55: $(SHELL)

tool: D7: /bin/sh

tool: D98: $(IFS)

tool: D3: -c

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