user: 请从给定的汇编指令推导出C源代码：

```asm
<rs_parse_cmdline>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    %r9,-0x40(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jg     L105
  mov    $0x0,%eax
  jmp    L20
L105:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L0
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L58
L0:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x23,%eax
  jmp    L20
L58:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L50
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D37(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L112
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x21,%eax
  jmp    L20
L112:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D21(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  test   %eax,%eax
  jne    L163
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x40,%eax
  jmp    L20
L163:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rcx
  lea    D24(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <rs_error@plt>
  mov    $0x3f,%eax
  jmp    L20
L50:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  cmpb   $0x3a,-0x9(%rbp)
  je     L118
  movsbl -0x9(%rbp),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L55
L118:
  movsbl -0x9(%rbp),%eax
  mov    %eax,%ecx
  lea    D31(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <rs_error@plt>
  mov    $0x3f,%eax
  jmp    L20
L55:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x3a,%al
  jne    L31
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    $0x1,%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L65
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    $0x1,%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  movsbl -0x9(%rbp),%eax
  jmp    L20
L65:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x2(%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jge    L17
  movsbl -0x9(%rbp),%eax
  mov    %eax,%ecx
  lea    D44(%rip),%rax
  mov    %rax,%rdx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <rs_error@plt>
  mov    $0x3f,%eax
  jmp    L20
L17:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
  movsbl -0x9(%rbp),%eax
  jmp    L20
L31:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    $0x1,%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L15
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L148
L15:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
L148:
  mov    -0x40(%rbp),%rax
  movq   $0x0,(%rax)
  movsbl -0x9(%rbp),%eax
L20:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D37
data_type: string
name: unpack_data
arguments: data_label: D21
data_type: string
name: unpack_data
arguments: data_label: D24
data_type: string
name: unpack_data
arguments: data_label: D31
data_type: string
name: unpack_data
arguments: data_label: D44
data_type: string

tool: D37: --help

tool: D21: --version

tool: D24: unrecognized option %s (try --help)

tool: D31: unrecognized option -%c (try --help)

tool: D44: -%c: requires an argument

assistant: ```c
int rs_parse_cmdline(int argc, char **argv, const char *optstring, int *i, int *j, const char **arg) {
  char c;
  char *p;
  if (*i >= argc)
    return 0;
  if (argv[*i][0] != '-' || argv[*i][1] == 0) {
    *arg = argv[*i];
    (*i)++;
    *j = 1;
    return '#';
  }
  if (argv[*i][1] == '-') {
    if (!strcasecmp(argv[*i], "--help")) {
      (*i)++;
      *j = 1;
      return '!';
    } else if (!strcasecmp(argv[*i], "--version")) {
      (*i)++;
      *j = 1;
      return '@';
    } else {
      rs_error(NULL, NULL, "unrecognized option %s (try --help)", argv[*i]);
      return '?';
    }
  }
  c = argv[*i][*j];
  if (c == ':' || !(p = strchr(optstring, c))) {
    rs_error(NULL, NULL, "unrecognized option -%c (try --help)", c);
    return '?';
  }
  if (p[1] == ':') {
    if (argv[*i][*j + 1]) {
      *arg = &argv[*i][*j + 1];
      (*i)++;
      *j = 1;
      return c;
    } else {
      (*i) += 2;
      *j = 1;
      if (*i > argc) {
        rs_error(NULL, NULL, "-%c: requires an argument", c);
        return '?';
      }
      *arg = argv[*i - 1];
      return c;
    }
  } else {
    if (argv[*i][*j + 1]) {
      (*j)++;
    } else {
      (*i)++;
      *j = 1;
    }
    *arg = NULL;
    return c;
  }
}
```