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

```asm
<parameters_prepare>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <strlen@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jne    L42
L142:
  add    $0x18,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L42:
  mov    $0x1000,%edi
  call   <malloc@plt>
  mov    %rax,0x0(%r13)
  mov    %rax,%rsi
  test   %r14d,%r14d
  jle    L11
  xor    %edx,%edx
  xor    %r8d,%r8d
  mov    $0x1,%r15d
  xor    %ebx,%ebx
  jmp    L278
  nopl   0x0(%rax)
L291:
  cmp    $0x9,%al
  je     L168
  cmp    $0x20,%al
  jne    L133
L168:
  test   %r8d,%r8d
  jne    L133
  test   %edx,%edx
  jne    L38
  nopl   (%rax)
L316:
  add    $0x1,%ebx
  cmp    %ebx,%r14d
  jle    L221
L278:
  movslq %ebx,%rcx
  movslq %r15d,%rbp
  movzbl (%r12,%rcx,1),%eax
  shl    $0x3,%rbp
  lea    -0x8(%r13,%rbp,1),%rdi
  cmp    $0x22,%al
  je     L166
  jle    L291
  cmp    $0x5c,%al
  jne    L133
  movzbl 0x1(%r12,%rcx,1),%eax
  test   %al,%al
  je     L316
  lea    0x1(%rbx),%r9d
  cmp    $0x6e,%al
  je     L239
  jg     L138
  cmp    $0x3f,%al
  je     L102
  jle    L113
  cmp    $0x5c,%al
  jne    L43
L102:
  mov    %r9d,%ebx
  movslq %edx,%rcx
  add    $0x1,%edx
  add    $0x1,%ebx
  mov    %al,(%rsi,%rcx,1)
  mov    (%rdi),%rsi
  cmp    %ebx,%r14d
  jg     L278
  nop
L221:
  movslq %edx,%rdx
  mov    %r15d,%r14d
  add    %rdx,%rsi
L217:
  movb   $0x0,(%rsi)
  mov    (%rdi),%rdi
  cmpb   $0x0,(%rdi)
  jne    L142
  call   <free@plt>
  sub    $0x1,%r14d
  jmp    L142
  cs nopw 0x0(%rax,%rax,1)
L133:
  movslq %edx,%rcx
  add    $0x1,%edx
  mov    %al,(%rsi,%rcx,1)
  mov    (%rdi),%rsi
  jmp    L316
  nopl   0x0(%rax)
L166:
  test   %r8d,%r8d
  jne    L13
  mov    $0x1,%r8d
  jmp    L316
  nopl   0x0(%rax,%rax,1)
L239:
  movslq %edx,%rax
  add    $0x1,%edx
  movb   $0xa,(%rsi,%rax,1)
  mov    (%rdi),%rsi
L43:
  mov    %r9d,%ebx
  jmp    L316
  nopl   (%rax)
L138:
  cmp    $0x74,%al
  jne    L43
  movslq %edx,%rax
  lea    0x2(%rbx),%r9d
  add    $0x1,%edx
  movb   $0x9,(%rsi,%rax,1)
  mov    (%rdi),%rsi
  movzbl 0x2(%r12,%rcx,1),%eax
  jmp    L102
  nopl   0x0(%rax,%rax,1)
L113:
  cmp    $0x22,%al
  je     L102
  cmp    $0x27,%al
  je     L102
  jmp    L43
  nopw   0x0(%rax,%rax,1)
L13:
  movslq %edx,%rdx
  mov    $0x1000,%edi
  add    $0x1,%r15d
  movb   $0x0,(%rsi,%rdx,1)
  mov    %rdx,(%rsp)
  call   <malloc@plt>
  mov    (%rsp),%rdx
  lea    0x0(%r13,%rbp,1),%rdi
  xor    %r8d,%r8d
  mov    %rax,(%rdi)
  movb   $0x0,(%rax,%rdx,1)
  xor    %edx,%edx
  mov    (%rdi),%rsi
  jmp    L316
  xchg   %ax,%ax
L38:
  movslq %edx,%rdx
  mov    $0x1000,%edi
  mov    %r8d,0xc(%rsp)
  add    $0x1,%r15d
  movb   $0x0,(%rsi,%rdx,1)
  mov    %rdx,(%rsp)
  call   <malloc@plt>
  mov    (%rsp),%rdx
  lea    0x0(%r13,%rbp,1),%rdi
  mov    0xc(%rsp),%r8d
  mov    %rax,(%rdi)
  movb   $0x0,(%rax,%rdx,1)
  xor    %edx,%edx
  mov    (%rdi),%rsi
  jmp    L316
  nopl   (%rax)
L11:
  mov    %r13,%rdi
  mov    $0x1,%r14d
  jmp    L217
```

assistant: ```c
int parameters_prepare(char *param, char *argv[]) {
  int i, param_len;
  int argc = 1;
  int quote = 0;
  int argv_len;
  param_len = strlen(param);
  if (param_len == 0)
    return 0;
  argv[0] = (char *)malloc(4096);
  argv_len = 0;
  for (i = 0; i < param_len; i++) {
    switch (param[i]) {
    case '\\':
      if (param[i + 1] != '\0') {
        switch (param[i + 1]) {
        case 'n':
          argv[argc - 1][argv_len] = '\n';
          argv_len++;
          i++;
          break;
        case 't':
          argv[argc - 1][argv_len] = '\t';
          argv_len++;
          i++;
        case '\\':
        case '\'':
        case '"':
        case '?':
          argv[argc - 1][argv_len] = param[i + 1];
          argv_len++;
          i++;
          break;
        default:
          i++;
        };
      }
      break;
    case '"':
      if (quote == 0)
        quote = 1;
      else {
        quote = 0;
        argv[argc - 1][argv_len] = '\0';
        argc++;
        argv[argc - 1] = (char *)malloc(4096);
        argv[argc - 1][argv_len] = '\0';
        argv_len = 0;
      }
      break;
    case 9:
    case 32:
      if (quote == 0) {
        if ((param[i + 1] != 32) || (param[i + 1] != 9)) {
          if (argv_len != 0) {
            argv[argc - 1][argv_len] = '\0';
            argc++;
            argv[argc - 1] = (char *)malloc(4096);
            argv[argc - 1][argv_len] = '\0';
            argv_len = 0;
          }
        }
      } else {
        argv[argc - 1][argv_len] = param[i];
        argv_len++;
      }
      break;
    default:
      argv[argc - 1][argv_len] = param[i];
      argv_len++;
      break;
    };
  }
  argv[argc - 1][argv_len] = '\0';
  if (strlen(argv[argc - 1]) == 0) {
    free(argv[argc - 1]);
    argc--;
  }
  return argc;
}
```