user: Converte this assembly snippet into its equivalent C code:

```asm
<check_arg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x2,-0xc(%rbp)
  cmpl   $0x1,-0x14(%rbp)
  jg     L195
  mov    $0x0,%eax
  call   <check_arg_error@plt>
  jmp    L195
L99:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L36
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L36
  mov    -0xc(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L127
  addl   $0x2,-0xc(%rbp)
  jmp    L195
L36:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D55(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L277
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L277
  mov    -0xc(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L290
  addl   $0x2,-0xc(%rbp)
  jmp    L195
L277:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D4(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L273
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L273
  mov    -0xc(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L203
  addl   $0x2,-0xc(%rbp)
  jmp    L195
L273:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L107
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L107
  mov    -0xc(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <check_arg_type@plt>
  test   %rax,%rax
  je     L244
  mov    -0xc(%rbp),%eax
  add    $0x2,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L303
  addl   $0x2,-0xc(%rbp)
  jmp    L195
L244:
  mov    $0x0,%eax
  call   <check_arg_error@plt>
  jmp    L195
L107:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D2(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L215
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L188
  addl   $0x1,-0xc(%rbp)
  jmp    L195
L215:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L320
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L257
  addl   $0x1,-0xc(%rbp)
  jmp    L195
L320:
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D10(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L101
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jle    L307
  addl   $0x1,-0xc(%rbp)
  jmp    L195
L101:
  mov    $0x0,%eax
  call   <check_arg_error@plt>
L195:
  mov    -0xc(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L99
  jmp    L64
L127:
  nop
  jmp    L64
L290:
  nop
  jmp    L64
L203:
  nop
  jmp    L64
L303:
  nop
  jmp    L64
L188:
  nop
  jmp    L64
L257:
  nop
  jmp    L64
L307:
  nop
L64:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D40
type_infered: string
name: disassemble_data
arguments: data_tag: D55
type_infered: string
name: disassemble_data
arguments: data_tag: D4
type_infered: string
name: disassemble_data
arguments: data_tag: D66
type_infered: string
name: disassemble_data
arguments: data_tag: D2
type_infered: string
name: disassemble_data
arguments: data_tag: D8
type_infered: string
name: disassemble_data
arguments: data_tag: D10
type_infered: string

tool: D40: -name

tool: D55: -path

tool: D4: -user

tool: D66: -type

tool: D2: -nouser

tool: D8: -print

tool: D10: -ls

assistant: ```c
void check_arg(const int argc, const char *argv[]) {
  const char *const *parms = argv;
  int parm_pos = 2;
  if (argc < 2) {
    check_arg_error();
  }
  while (parm_pos < argc) {
    if ((strcmp(parms[parm_pos], "-name") == 0) && (parm_pos + 1 < argc)) {
      if (parm_pos + 2 < argc) {
        parm_pos += 2;
      } else {
        break;
      }
    } else if ((strcmp(parms[parm_pos], "-path") == 0) && (parm_pos + 1 < argc)) {
      if (parm_pos + 2 < argc) {
        parm_pos += 2;
      } else {
        break;
      }
    } else if ((strcmp(parms[parm_pos], "-user") == 0) && (parm_pos + 1 < argc)) {
      if (parm_pos + 2 < argc) {
        parm_pos += 2;
      } else {
        break;
      }
    } else if ((strcmp(parms[parm_pos], "-type") == 0) && (parm_pos + 1 < argc)) {
      if (check_arg_type(argv[parm_pos + 1])) {
        if (parm_pos + 2 < argc) {
          parm_pos += 2;
        } else {
          break;
        }
      } else {
        check_arg_error();
      }
    } else if ((strcmp(parms[parm_pos], "-nouser") == 0)) {
      if (parm_pos + 1 < argc) {
        parm_pos++;
      } else {
        break;
      }
    } else if ((strcmp(parms[parm_pos], "-print") == 0)) {
      if (parm_pos + 1 < argc) {
        parm_pos++;
      } else {
        break;
      }
    } else if ((strcmp(parms[parm_pos], "-ls") == 0)) {
      if (parm_pos + 1 < argc) {
        parm_pos++;
      } else {
        break;
      }
    } else
      check_arg_error();
  }
}
```