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    D19(%rip),%rsi
  lea    D61(%rip),%rdi
  mov    %rax,0x0(%r13)
  call   <fopen@plt>
  test   %rax,%rax
  je     L66
  mov    %rax,%rbp
  mov    %rax,%rdi
  lea    0x2c(%rsp),%rdx
  mov    %r13,%rsi
  call   <read_options@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
L66:
  cmpl   $0x1,0xc(%rsp)
  mov    $0x1,%r12d
  jg     L109
  jmp    L125
  nopl   0x0(%rax,%rax,1)
L39:
  test   %eax,%eax
  jne    L59
  cmpb   $0x0,0x30(%rsp)
  lea    0x30(%rsp),%r8
  je     L40
L2:
  mov    %r8,%rdi
  lea    D19(%rip),%rsi
  mov    %r8,0x10(%rsp)
  call   <fopen@plt>
  mov    0x10(%rsp),%r8
  test   %rax,%rax
  mov    %rax,%r15
  je     L53
L178:
  mov    %r15,%rdi
  lea    0x2c(%rsp),%rdx
  mov    %r13,%rsi
  call   <read_options@plt>
  mov    %r15,%rdi
  call   <fclose@plt>
L169:
  lea    0x1(%rbp,%r12,1),%r12d
  cmp    %r12d,0xc(%rsp)
  jle    L125
L109:
  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     L126
  movb   $0x0,0x30(%rsp)
L157:
  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     L39
  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    L169
  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)
L95:
  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    L95
  mov    0x10(%rsp),%ebp
  lea    0x1(%rbp,%r12,1),%r12d
  cmp    %r12d,0xc(%rsp)
  jg     L109
L125:
  mov    0x2c(%rsp),%eax
  mov    0x2f8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L51
  add    $0x308,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L126:
  lea    0x30(%rsp),%r8
  mov    (%r15),%rdi
  mov    %r8,%rsi
  call   <find_load_filename@plt>
  mov    %eax,%ecx
  jmp    L157
  nopw   0x0(%rax,%rax,1)
L59:
  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    L2
  nopl   0x0(%rax)
L40:
  mov    %r8,%rdi
  lea    D2(%rip),%rsi
  mov    %r8,0x10(%rsp)
  call   <strcpy@plt>
  mov    0x10(%rsp),%r8
  jmp    L2
  cs nopw 0x0(%rax,%rax,1)
L53:
  lea    0x100(%rsp),%r15
  mov    %r8,%rcx
  lea    D49(%rip),%rdx
  mov    %r15,%rdi
  lea    D51(%rip),%rsi
  call   <sprintf@plt>
  mov    %r15,%rdi
  lea    D19(%rip),%rsi
  call   <fopen@plt>
  mov    0x10(%rsp),%r8
  test   %rax,%rax
  mov    %rax,%r15
  jne    L178
  mov    %r8,%rsi
  lea    D76(%rip),%rdi
  call   <throw_error@plt>
  jmp    L178
L51:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D19
type_infered: string
name: extract_symbolic_data
arguments: data_label: D61
type_infered: string
name: extract_symbolic_data
arguments: data_label: D2
type_infered: string
name: extract_symbolic_data
arguments: data_label: D49
type_infered: string
name: extract_symbolic_data
arguments: data_label: D51
type_infered: string
name: extract_symbolic_data
arguments: data_label: D76
type_infered: string

tool: D19: r

tool: D61: .xbattle

tool: D2: default.xbo

tool: D49: ./xbos

tool: D51: %s/%s

tool: D76: 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);
}
```