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

```asm
<ibase>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x1c(%rsp)
  mov    %rsi,%r13
  mov    %rdx,0x10(%rsp)
  cmp    $0x5,%edi
  jle    L38
L156:
  mov    $0x1,%ebx
  movl   $0xffffffff,0x18(%rsp)
  movl   $0xffffffff,0xc(%rsp)
  lea    D33(%rip),%r14
  lea    D36(%rip),%r15
  jmp    L99
L38:
  mov    %rdx,%rdi
  call   <noArgument@plt>
  jmp    L156
L92:
  mov    $0x0,%eax
  call   <baseNotSupported@plt>
L171:
  add    $0x1,%ebx
  cmp    $0x3,%ebx
  jg     L87
L99:
  movslq %ebx,%rbp
  shl    $0x3,%rbp
  lea    0x0(%r13,%rbp,1),%r12
  mov    %r14,%rsi
  mov    (%r12),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L17
  add    $0x1,%ebx
  lea    0x8(%r13,%rbp,1),%rbp
  mov    0x0(%rbp),%rdi
  call   <atoi@plt>
  cmp    $0x24,%eax
  jg     L92
  mov    0x0(%rbp),%rdi
  call   <atoi@plt>
  cmp    $0x1,%eax
  jle    L92
  mov    0x0(%rbp),%rdi
  call   <atoi@plt>
  mov    %eax,0xc(%rsp)
  jmp    L171
L17:
  mov    %r15,%rsi
  mov    (%r12),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L8
  add    $0x1,%ebx
  lea    0x8(%r13,%rbp,1),%rbp
  mov    0x0(%rbp),%rdi
  call   <atoi@plt>
  cmp    $0x24,%eax
  jg     L105
  mov    0x0(%rbp),%rdi
  call   <atoi@plt>
  cmp    $0x1,%eax
  jg     L56
L105:
  mov    $0x0,%eax
  call   <baseNotSupported@plt>
  jmp    L171
L56:
  mov    0x0(%rbp),%rdi
  call   <atoi@plt>
  mov    %eax,0x18(%rsp)
  jmp    L171
L8:
  lea    D35(%rip),%rsi
  mov    (%r12),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L63
  mov    0x10(%rsp),%rdi
  call   <invalidArgument@plt>
  jmp    L171
L63:
  mov    0x10(%rsp),%rdi
  call   <showUsage@plt>
  jmp    L152
L87:
  mov    0x18(%rsp),%edx
  mov    0xc(%rsp),%esi
  lea    D20(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x1c(%rsp),%eax
  cmp    %ebx,%eax
  jle    L159
  movslq %ebx,%rdx
  lea    0x0(%r13,%rdx,8),%rbp
  sub    $0x1,%eax
  sub    %ebx,%eax
  add    %rdx,%rax
  lea    0x8(%r13,%rax,8),%rbx
L144:
  mov    0x18(%rsp),%edx
  mov    0xc(%rsp),%esi
  mov    0x0(%rbp),%rdi
  call   <convertBase@plt>
  add    $0x8,%rbp
  cmp    %rbx,%rbp
  jne    L144
L159:
  mov    $0xa,%edi
  call   <putchar@plt>
L152:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: tag: D33
data_type: string
name: unpack_data
arguments: tag: D36
data_type: string
name: unpack_data
arguments: tag: D35
data_type: string
name: unpack_data
arguments: tag: D20
data_type: string

tool: D33: -i

tool: D36: -o

tool: D35: -h

tool: D20: Base %d to %d, output: 

assistant: ```c
void ibase(int argc, char **argv, char *applet) {
  int in_base = -1, out_base = -1;
  bool pr_help = false;
  int arg = 0;
  if (argc < 6) {
    noArgument(applet);
  }
  for (arg = 1; arg < 4; arg++) {
    if (strcmp(argv[arg], "-i") == 0) {
      arg++;
      if (atoi(argv[arg]) <= 36 && atoi(argv[arg]) > 1) {
        in_base = atoi(argv[arg]);
      } else {
        baseNotSupported();
      }
    } else if (strcmp(argv[arg], "-o") == 0) {
      arg++;
      if (atoi(argv[arg]) <= 36 && atoi(argv[arg]) > 1) {
        out_base = atoi(argv[arg]);
      } else {
        baseNotSupported();
      }
    } else if (strcmp(argv[arg], "-h") == 0) {
      showUsage(applet);
      return;
    } else {
      invalidArgument(applet);
    }
  }
  if (!pr_help) {
    printf("Base %d to %d, output:\x20", in_base, out_base);
    for (; arg < argc; arg++) {
      convertBase(argv[arg], in_base, out_base);
    }
    printf("\n");
  } else {
    showUsage(applet);
  }
}
```