user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x8,%rsp
  cmp    $0x1,%edi
  jle    L71
L84:
  mov    0x8(%rbx),%rdi
  lea    D66(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L13
  mov    $0x1,%edi
  call   <ipod_set_backlight@plt>
  lea    D14(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
L56:
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  ret
L13:
  mov    0x8(%rbx),%rdi
  lea    D89(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L106
  cmp    $0x3,%ebp
  je     L24
L85:
  xor    %eax,%eax
  call   <print_help@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L56
L71:
  xor    %eax,%eax
  call   <print_help@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L84
L106:
  xor    %edi,%edi
  call   <ipod_set_backlight@plt>
  lea    D30(%rip),%rdi
  call   <puts@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L56
L24:
  mov    0x8(%rbx),%rdi
  lea    D53(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L85
  call   <ipod_generation@plt>
  sar    $0x10,%eax
  sub    $0xb,%eax
  cmp    $0x1,%eax
  jbe    L116
  lea    D27(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L56
L116:
  mov    0x10(%rbx),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  lea    -0x1(%rax),%eax
  cmp    $0x1f,%eax
  jbe    L113
  lea    D41(%rip),%rdi
  call   <puts@plt>
  xor    %eax,%eax
  call   <print_help@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L56
L113:
  mov    $0x1,%edi
  call   <ipod_set_backlight@plt>
  lea    D14(%rip),%rdi
  call   <puts@plt>
  mov    %ebp,%edi
  call   <ipod_set_brightness@plt>
  mov    %ebp,%esi
  lea    D29(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L56
```

tool_calls: name: disassemble_data
arguments: data_label: D66
type_infered: string
name: disassemble_data
arguments: data_label: D14
type_infered: string
name: disassemble_data
arguments: data_label: D89
type_infered: string
name: disassemble_data
arguments: data_label: D30
type_infered: string
name: disassemble_data
arguments: data_label: D53
type_infered: string
name: disassemble_data
arguments: data_label: D27
type_infered: string
name: disassemble_data
arguments: data_label: D41
type_infered: string
name: disassemble_data
arguments: data_label: D29
type_infered: string

tool: D66: on

tool: D14: Backlight turned on.

tool: D89: off

tool: D30: Backlight turned off.

tool: D53: brightness

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

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

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


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);
  }
}
```