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

```asm
<args>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdx,0x20(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r9,0x18(%rsp)
  cmp    $0x1,%edi
  jle    L275
  mov    %edi,%eax
  lea    0x8(%rsi),%rbx
  lea    D171(%rip),%rbp
  sub    $0x2,%eax
  lea    D45(%rip),%r12
  lea    D185(%rip),%r13
  lea    0x10(%rsi,%rax,8),%r14
  lea    D42(%rip),%r15
  jmp    L262
  nopl   0x0(%rax,%rax,1)
L99:
  mov    (%rbx),%rdi
  lea    D8(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L195
  mov    0x8(%rsp),%rax
  movl   $0x1,(%rax)
L274:
  add    $0x8,%rbx
  cmp    %r14,%rbx
  je     L275
L262:
  mov    (%rbx),%rdi
  mov    %rbp,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L174
  mov    (%rbx),%rdi
  mov    %r12,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L179
  mov    (%rbx),%rdi
  mov    $0x8,%edx
  mov    %r13,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L99
  mov    (%rbx),%rdi
  mov    $0x6,%edx
  mov    %r15,%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L251
  mov    (%rbx),%rdi
  lea    D87(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L23
  mov    0x10(%rsp),%rax
  add    $0x8,%rbx
  movb   $0xff,(%rax)
  cmp    %r14,%rbx
  jne    L262
L275:
  add    $0x38,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L251:
  mov    (%rbx),%rdi
  mov    $0x7,%edx
  lea    D163(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L137
  mov    (%rbx),%rdi
  mov    $0x8,%edx
  lea    D55(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L271
  mov    0x18(%rsp),%rax
  movl   $0x1,(%rax)
  jmp    L274
  cs nopw 0x0(%rax,%rax,1)
L195:
  mov    (%rbx),%rdi
  lea    D203(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L73
  mov    0x8(%rsp),%rax
  movl   $0x2,(%rax)
  jmp    L274
  nopl   0x0(%rax,%rax,1)
L137:
  mov    (%rbx),%rdi
  mov    $0xb,%edx
  lea    D94(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L70
  mov    (%rbx),%rdi
  mov    $0xb,%edx
  lea    D134(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L194
L70:
  mov    (%rbx),%rdi
  call   <strlen@plt>
  lea    -0xa(%rax),%edi
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    (%rbx),%rax
  mov    %rdi,0x28(%rsp)
  lea    0xb(%rax),%rsi
  call   <strcpy@plt>
  mov    0x28(%rsp),%rdi
  call   <atoi@plt>
  mov    0x70(%rsp),%rcx
  mov    %eax,(%rcx)
  jmp    L274
  nopl   0x0(%rax)
L23:
  mov    (%rbx),%rdi
  lea    D133(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L139
  mov    0x10(%rsp),%rax
  movb   $0x0,(%rax)
  jmp    L274
  nopl   0x0(%rax)
L194:
  mov    (%rbx),%rsi
  mov    0x20(%rsp),%rdi
  call   <strcpy@plt>
  jmp    L274
  nopw   0x0(%rax,%rax,1)
L139:
  mov    (%rbx),%rdi
  lea    D197(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L248
  mov    0x10(%rsp),%rax
  movb   $0x1,(%rax)
  jmp    L274
  nopl   (%rax)
L73:
  mov    (%rbx),%rdi
  lea    D20(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L253
  mov    0x8(%rsp),%rax
  movl   $0x3,(%rax)
  jmp    L274
L271:
  mov    (%rbx),%rdi
  mov    $0x8,%edx
  lea    D59(%rip),%rsi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L274
  mov    0x18(%rsp),%rax
  movl   $0x0,(%rax)
  jmp    L274
  nopl   (%rax)
L174:
  lea    D3(%rip),%rdi
  call   <printf@plt>
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L179:
  lea    D152(%rip),%rdi
  call   <printf@plt>
  lea    D184(%rip),%rdi
  call   <printf@plt>
  lea    D18(%rip),%rdi
  call   <printf@plt>
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L248:
  lea    D190(%rip),%rdi
  call   <printf@plt>
  jmp    L274
  cs nopw 0x0(%rax,%rax,1)
L253:
  lea    D120(%rip),%rdi
  call   <printf@plt>
  jmp    L274
```

tool_calls: name: unpack_data
arguments: tag: D171
type_guessed: string
name: unpack_data
arguments: tag: D45
type_guessed: string
name: unpack_data
arguments: tag: D185
type_guessed: string
name: unpack_data
arguments: tag: D42
type_guessed: string
name: unpack_data
arguments: tag: D8
type_guessed: string
name: unpack_data
arguments: tag: D87
type_guessed: string
name: unpack_data
arguments: tag: D163
type_guessed: string
name: unpack_data
arguments: tag: D55
type_guessed: string
name: unpack_data
arguments: tag: D203
type_guessed: string
name: unpack_data
arguments: tag: D94
type_guessed: string
name: unpack_data
arguments: tag: D134
type_guessed: string
name: unpack_data
arguments: tag: D133
type_guessed: string
name: unpack_data
arguments: tag: D197
type_guessed: string
name: unpack_data
arguments: tag: D20
type_guessed: string
name: unpack_data
arguments: tag: D59
type_guessed: string
name: unpack_data
arguments: tag: D3
type_guessed: string
name: unpack_data
arguments: tag: D152
type_guessed: string
name: unpack_data
arguments: tag: D184
type_guessed: string
name: unpack_data
arguments: tag: D18
type_guessed: string
name: unpack_data
arguments: tag: D190
type_guessed: string
name: unpack_data
arguments: tag: D120
type_guessed: string

tool: D171: --version

tool: D45: --help

tool: D185: --width=

tool: D42: --eof=

tool: D8: --width=32

tool: D87: --eof=-1

tool: D163: --wrap=

tool: D55: --wrap=y

tool: D203: --width=16

tool: D94: --fwdbound=

tool: D134: --revbound=

tool: D133: --eof=0

tool: D197: --eof=nochg

tool: D20: --width=8

tool: D59: --wrap=n

tool: D3: BestFriend brainfuck interpreter


tool: D152: Usage: bestfriend [FILE]


tool: D184: Runs FILE as a brainfuck program.


tool: D18: If multiple FILEs are given, the last will be run.


tool: D190: Invalid EOF behaviour, defaulting to -1.


tool: D120: Invalid cell width, defaulting to 32-bit.


assistant: ```c
bool args(int argc, char **argv, char *bfpath, int *cwidth, char *eofval, bool *wrap, int *max_fwdsize, int *max_revsize) {
  char *temp;
  for (int i = 1; i < argc; i++) {
    if (strcmp(argv[i], "--version") == 0) {
      printf("BestFriend brainfuck interpreter\n");
      return false;
    } else if (strcmp(argv[i], "--help") == 0) {
      printf("Usage: bestfriend [FILE]\n");
      printf("Runs FILE as a brainfuck program.\n");
      printf("If multiple FILEs are given, the last will be run.\n");
      return false;
    } else if (strncmp(argv[i], "--width=", 8) == 0) {
      if (strcmp(argv[i], "--width=32") == 0) {
        *cwidth = 1;
      } else if (strcmp(argv[i], "--width=16") == 0) {
        *cwidth = 2;
      } else if (strcmp(argv[i], "--width=8") == 0) {
        *cwidth = 3;
      } else {
        printf("Invalid cell width, defaulting to 32-bit.\n");
      }
    } else if (strncmp(argv[i], "--eof=", 6) == 0) {
      if (strcmp(argv[i], "--eof=-1") == 0) {
        *eofval = -1;
      } else if (strcmp(argv[i], "--eof=0") == 0) {
        *eofval = 0;
      } else if (strcmp(argv[i], "--eof=nochg") == 0) {
        *eofval = 1;
      } else {
        printf("Invalid EOF behaviour, defaulting to -1.\n");
      }
    } else if (strncmp(argv[i], "--wrap=", 7) == 0) {
      if (strncmp(argv[i], "--wrap=y", 8) == 0) {
        *wrap = true;
      } else if (strncmp(argv[i], "--wrap=n", 8) == 0) {
        *wrap = false;
      }
    } else if (strncmp(argv[i], "--fwdbound=", 11) == 0) {
      temp = malloc((strlen(argv[i]) - 10) * sizeof(char));
      strcpy(temp, argv[i] + 11);
      *max_fwdsize = atoi(temp);
    } else if (strncmp(argv[i], "--revbound=", 11) == 0) {
      temp = malloc((strlen(argv[i]) - 10) * sizeof(char));
      strcpy(temp, argv[i] + 11);
      *max_fwdsize = atoi(temp);
    } else {
      strcpy(bfpath, argv[i]);
    }
  }
  return true;
}
```