user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  movl   $0x0,-0x34(%rbp)
  cmpl   $0x1,-0x44(%rbp)
  jle    L17
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D125(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L34
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D97(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L120
L34:
  movl   $0x1,-0x34(%rbp)
  jmp    L17
L120:
  movl   $0x1,-0x30(%rbp)
  jmp    L24
L72:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  lea    D31(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L40
  mov    -0x30(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L61
L40:
  addl   $0x1,-0x30(%rbp)
L24:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L72
L61:
  cmpl   $0x2,-0x34(%rbp)
  jle    L17
  lea    D94(%rip),%rax
  mov    %rax,-0x28(%rbp)
  lea    D36(%rip),%rax
  mov    %rax,-0x20(%rbp)
  lea    D117(%rip),%rax
  mov    %rax,-0x18(%rbp)
  lea    D71(%rip),%rax
  mov    %rax,-0x10(%rbp)
  movl   $0x1,-0x2c(%rbp)
  jmp    L13
L153:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    D40(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L33
  mov    -0x8(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L118
L33:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <putenv@plt>
L118:
  mov    -0x8(%rbp),%rax
  lea    D109(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L137
  mov    -0x8(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L125
L137:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <putenv@plt>
L125:
  mov    -0x8(%rbp),%rax
  lea    D77(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L84
  mov    -0x8(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L102
L84:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <putenv@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <putenv@plt>
L102:
  addl   $0x1,-0x2c(%rbp)
L13:
  mov    -0x2c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L153
L17:
  mov    -0x50(%rbp),%rdx
  mov    -0x44(%rbp),%ecx
  mov    -0x34(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <rcmdfn@plt>
  mov    %eax,%edi
  call   <exit@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D125
type_infered: string
name: disassemble_data
arguments: data_tag: D97
type_infered: string
name: disassemble_data
arguments: data_tag: D31
type_infered: string
name: disassemble_data
arguments: data_tag: D94
type_infered: string
name: disassemble_data
arguments: data_tag: D36
type_infered: string
name: disassemble_data
arguments: data_tag: D117
type_infered: string
name: disassemble_data
arguments: data_tag: D71
type_infered: string
name: disassemble_data
arguments: data_tag: D40
type_infered: string
name: disassemble_data
arguments: data_tag: D6
type_infered: string
name: disassemble_data
arguments: data_tag: D109
type_infered: string
name: disassemble_data
arguments: data_tag: D77
type_infered: string

tool: D125: -h

tool: D97: --help

tool: D31: CMD

tool: D94: R_PROFILE_USER=

tool: D36: R_RPOFILE=

tool: D117: R_ENVIRON=

tool: D71: R_ENVIRON_USER=

tool: D40: --no-init-file

tool: D6: --vanilla

tool: D109: --no-site-file

tool: D77: --no-environ

assistant: ```c
int main(int argc, char **argv) {
  int cmdarg = 0;
  if (argc > 1) {
    if (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)
      cmdarg = 1;
    else {
      for (int i = 1; i < argc; i++)
        if (strcmp(argv[i], "CMD") == 0) {
          cmdarg = i + 1;
          break;
        }
      if (cmdarg >= 3) {
        char *Init = "R_PROFILE_USER=\r", *Site = "R_RPOFILE=\r", *Env1 = "R_ENVIRON=\r", *Env2 = "R_ENVIRON_USER=\r";
        for (int i = 1; i < cmdarg; i++) {
          char *a = argv[i];
          if (strcmp(a, "--no-init-file") == 0 || strcmp(a, "--vanilla") == 0)
            putenv(Init);
          if (strcmp(a, "--no-site-file") == 0 || strcmp(a, "--vanilla") == 0)
            putenv(Site);
          if (strcmp(a, "--no-environ") == 0 || strcmp(a, "--vanilla") == 0) {
            putenv(Env1);
            putenv(Env2);
          }
        }
      }
    }
  }
  exit(rcmdfn(cmdarg, argc, argv));
}
```