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

```asm
<load_command_line>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x308,%rsp
  mov    %edi,0xc(%rsp)
  mov    (%rsi),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x2f8(%rsp)
  xor    %eax,%eax
  movl   $0x1,0x2c(%rsp)
  call   <strdup@plt>
  lea    D39(%rip),%rsi
  lea    D5(%rip),%rdi
  mov    %rax,0x0(%r13)
  call   <fopen@plt>
  test   %rax,%rax
  je     L12
  mov    %rax,%rbp
  mov    %rax,%rdi
  lea    0x2c(%rsp),%rdx
  mov    %r13,%rsi
  call   <read_options@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
L12:
  cmpl   $0x1,0xc(%rsp)
  mov    $0x1,%r12d
  jg     L114
  jmp    L100
  nopl   0x0(%rax,%rax,1)
L58:
  test   %eax,%eax
  jne    L38
  cmpb   $0x0,0x30(%rsp)
  lea    0x30(%rsp),%r8
  je     L44
L70:
  mov    %r8,%rdi
  lea    D39(%rip),%rsi
  mov    %r8,0x10(%rsp)
  call   <fopen@plt>
  mov    0x10(%rsp),%r8
  test   %rax,%rax
  mov    %rax,%r15
  je     L77
L21:
  mov    %r15,%rdi
  lea    0x2c(%rsp),%rdx
  mov    %r13,%rsi
  call   <read_options@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
L150:
  lea    0x1(%rbp,%r12,1),%r12d
  cmp    %r12d,0xc(%rsp)
  jle    L100
L114:
  movslq %r12d,%rbx
  shl    $0x3,%rbx
  lea    (%r14,%rbx,1),%r15
  mov    (%r15),%rdi
  call   <find_option@plt>
  mov    %eax,%ecx
  test   %eax,%eax
  js     L18
  movb   $0x0,0x30(%rsp)
L170:
  mov    0xc(%rsp),%edi
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %ecx,0x10(%rsp)
  call   <find_parameter_count@plt>
  mov    0x10(%rsp),%ecx
  mov    %eax,%ebp
  cmp    $0x3a,%ecx
  je     L58
  movslq 0x2c(%rsp),%rcx
  mov    (%r15),%rdi
  lea    0x1(%rcx),%eax
  mov    %rcx,0x10(%rsp)
  mov    %rcx,%r15
  mov    %eax,0x2c(%rsp)
  lea    0x0(,%rcx,8),%rax
  mov    %rax,0x18(%rsp)
  call   <strdup@plt>
  mov    0x10(%rsp),%rcx
  mov    %rax,0x0(%r13,%rcx,8)
  test   %ebp,%ebp
  jle    L150
  lea    -0x1(%rbp),%eax
  sub    0x18(%rsp),%rbx
  lea    0x2(%r15),%edx
  mov    %ebp,0x10(%rsp)
  add    %r14,%rbx
  lea    0x3(%rcx,%rax,1),%rsi
  movslq %edx,%r15
  mov    %rbx,%rbp
  mov    %rsi,%rbx
  nopl   (%rax)
L145:
  mov    -0x8(%rbp,%r15,8),%rdi
  mov    %r15d,0x2c(%rsp)
  call   <strdup@plt>
  mov    %rax,-0x8(%r13,%r15,8)
  add    $0x1,%r15
  cmp    %r15,%rbx
  jne    L145
  mov    0x10(%rsp),%ebp
  lea    0x1(%rbp,%r12,1),%r12d
  cmp    %r12d,0xc(%rsp)
  jg     L114
L100:
  mov    0x2c(%rsp),%eax
  mov    0x2f8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L112
  add    $0x308,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L18:
  lea    0x30(%rsp),%r8
  mov    (%r15),%rdi
  mov    %r8,%rsi
  call   <find_load_filename@plt>
  mov    %eax,%ecx
  jmp    L170
  nopw   0x0(%rax,%rax,1)
L38:
  lea    0x30(%rsp),%r8
  mov    0x8(%r14,%rbx,1),%rsi
  mov    %r8,%rdi
  mov    %r8,0x10(%rsp)
  call   <strcpy@plt>
  mov    0x10(%rsp),%r8
  jmp    L70
  nopl   0x0(%rax)
L44:
  mov    %r8,%rdi
  lea    D24(%rip),%rsi
  mov    %r8,0x10(%rsp)
  call   <strcpy@plt>
  mov    0x10(%rsp),%r8
  jmp    L70
  cs nopw 0x0(%rax,%rax,1)
L77:
  lea    0x100(%rsp),%r15
  mov    %r8,%rcx
  lea    D74(%rip),%rdx
  mov    %r15,%rdi
  lea    D54(%rip),%rsi
  call   <sprintf@plt>
  mov    %r15,%rdi
  lea    D39(%rip),%rsi
  call   <fopen@plt>
  mov    0x10(%rsp),%r8
  test   %rax,%rax
  mov    %rax,%r15
  jne    L21
  mov    %r8,%rsi
  lea    D40(%rip),%rdi
  call   <throw_error@plt>
  jmp    L21
L112:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D39
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D5
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D24
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D74
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D54
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D40
type_guessed: string

tool: D39: r

tool: D5: .xbattle

tool: D24: default.xbo

tool: D74: ./xbos

tool: D54: %s/%s

tool: D40: Cannot open option file %s

assistant: ```c
int load_command_line(int argc, char *const argv[], char *command_line[]) {
  int i, j, argc_new, option_index, parameter_count;
  char filename[200], alternative_filename[500];
  FILE *fp;
  argc_new = 0;
  command_line[argc_new++] = strdup(argv[0]);
  if ((fp = fopen(".xbattle", "r")) == ((void *)0)) {
  }
  if (fp) {
    read_options(fp, command_line, &argc_new);
    fclose(fp);
  }
  for (i = 1; i < argc; i++) {
    option_index = find_option(argv[i]);
    if (option_index < 0)
      option_index = find_load_filename(argv[i], filename);
    else
      filename[0] = '\0';
    parameter_count = find_parameter_count(argc, argv, i);
    if (option_index == 58) {
      if (parameter_count == 0) {
        if (filename[0] == '\0')
          strcpy(filename, "default.xbo");
      } else
        strcpy(filename, argv[i + 1]);
      if ((fp = fopen(filename, "r")) == ((void *)0)) {
        sprintf(alternative_filename, "%s/%s", "./xbos", filename);
        if ((fp = fopen(alternative_filename, "r")) == ((void *)0))
          throw_error("Cannot open option file %s", filename);
      }
      read_options(fp, command_line, &argc_new);
      fclose(fp);
    } else {
      command_line[argc_new++] = strdup(argv[i]);
      for (j = 0; j < parameter_count; j++)
        command_line[argc_new++] = strdup(argv[i + j + 1]);
    }
    i += parameter_count;
  }
  return (argc_new);
}
```