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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  cmpl   $0x1,-0x14(%rbp)
  jg     L17
  mov    $0x0,%eax
  call   <print_help@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L17:
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D34(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L106
  mov    $0x1,%edi
  call   <ipod_set_backlight@plt>
  lea    D71(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L8
L106:
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D26(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L55
  mov    $0x0,%edi
  call   <ipod_set_backlight@plt>
  lea    D54(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L8
L55:
  cmpl   $0x3,-0x14(%rbp)
  jne    L65
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D83(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L65
  mov    $0x0,%eax
  call   <ipod_generation@plt>
  sar    $0x10,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0xc,-0x8(%rbp)
  je     L111
  cmpl   $0xb,-0x8(%rbp)
  jne    L89
L111:
  mov    -0x20(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  je     L50
  cmpl   $0x0,-0x4(%rbp)
  jle    L50
  cmpl   $0x20,-0x4(%rbp)
  jle    L59
L50:
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  call   <print_help@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L90
L59:
  mov    $0x1,%edi
  call   <ipod_set_backlight@plt>
  lea    D71(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <ipod_set_brightness@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  lea    D81(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L90
L89:
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L8
L90:
  jmp    L8
L65:
  mov    $0x0,%eax
  call   <print_help@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L8:
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D34
type: string
name: disassemble_data
arguments: data_label: D71
type: string
name: disassemble_data
arguments: data_label: D26
type: string
name: disassemble_data
arguments: data_label: D54
type: string
name: disassemble_data
arguments: data_label: D83
type: string
name: disassemble_data
arguments: data_label: D61
type: string
name: disassemble_data
arguments: data_label: D81
type: string
name: disassemble_data
arguments: data_label: D52
type: string

tool: D34: on

tool: D71: Backlight turned on.

tool: D26: off

tool: D54: Backlight turned off.

tool: D83: brightness

tool: D61: Please specify a valid brightness level between 1 and 32.

tool: D81: Backlight brightness level set to %i.


tool: D52: Sorry, backlight brightness levels can only be changed for iPod nanos and videos.

assistant: ```c
int main(int argc, char *argv[]) {
  if (argc < 2) {
    print_help();
    exit(1);
  }
  if (strcmp(argv[1], "on") == 0) {
    ipod_set_backlight(1);
    printf("Backlight turned on.\n");
    exit(0);
  } else if (strcmp(argv[1], "off") == 0) {
    ipod_set_backlight(0);
    printf("Backlight turned off.\n");
    exit(0);
  } else if (argc == 3 && strcmp(argv[1], "brightness") == 0) {
    int hw_ver = ipod_generation() >> 16;
    if (hw_ver == 0xC || hw_ver == 0xB) {
      int brightness = atoi(argv[2]);
      if (!brightness || brightness < 1 || brightness > 32) {
        printf("Please specify a valid brightness level between 1 and 32.\n");
        print_help();
        exit(1);
      } else {
        ipod_set_backlight(1);
        printf("Backlight turned on.\n");
        ipod_set_brightness(brightness);
        printf("Backlight brightness level set to %i.\n", brightness);
        exit(0);
      }
    } else {
      printf("Sorry, backlight brightness levels can only be changed for iPod nanos and videos.\n");
      exit(1);
    }
  } else {
    print_help();
    exit(1);
  }
}
```