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

```asm
<lcd_test>:
  endbr64
  push   %r15
  xor    %eax,%eax
  lea    D1(%rip),%r15
  push   %r14
  lea    D75(%rip),%r14
  push   %r13
  lea    D82(%rip),%r13
  push   %r12
  push   %rbp
  lea    D63(%rip),%rbp
  push   %rbx
  lea    D17(%rip),%rbx
  sub    $0x8,%rsp
  call   <lcd_init@plt>
  nopl   0x0(%rax)
L79:
  mov    %r15,%rdi
  call   <printf@plt>
  mov    %r14,%rdi
  call   <printf@plt>
  mov    %r13,%rdi
  call   <printf@plt>
  lea    D127(%rip),%rdi
  call   <printf@plt>
  lea    D58(%rip),%rdi
  call   <printf@plt>
  lea    D62(%rip),%rdi
  call   <printf@plt>
  lea    D131(%rip),%rdi
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L80:
  xor    %eax,%eax
  call   <getc@plt>
  mov    %eax,%r12d
  cmp    $0xa,%al
  je     L101
  cmp    $0xd,%al
  je     L101
  movzbl %al,%edi
  call   <putc@plt>
  lea    -0x42(%r12),%edx
  cmp    $0x2f,%dl
  ja     L79
  movzbl %dl,%edx
  movslq (%rbx,%rdx,4),%rax
  add    %rbx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
  mov    D100(%rip),%esi
  xor    %eax,%eax
  test   %esi,%esi
  je     L60
  call   <lcd_off@plt>
  lea    D32(%rip),%rdi
  call   <printf@plt>
L47:
  mov    D100(%rip),%ecx
  xor    %eax,%eax
  test   %ecx,%ecx
  sete   %al
  mov    %eax,D128(%rip)
  jmp    L79
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <draw_line@plt>
  jmp    L79
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <display_red@plt>
  jmp    L79
  nopl   0x0(%rax)
  xor    %eax,%eax
  call   <displaycon_on@plt>
  lea    D128(%rip),%rdi
  call   <printf@plt>
  mov    D24(%rip),%edx
  xor    %eax,%eax
  test   %edx,%edx
  sete   %al
  mov    %eax,D87(%rip)
  jmp    L79
  nopl   0x0(%rax,%rax,1)
  xor    %eax,%eax
  call   <pwm_menu@plt>
  jmp    L79
  nopl   0x0(%rax)
L101:
  mov    %rbp,%rdi
  call   <printf@plt>
  jmp    L80
L60:
  call   <lcd_on@plt>
  lea    D87(%rip),%rdi
  call   <printf@plt>
  jmp    L47
```

tool_calls: name: parse_data
arguments: data_label: D1
type_guessed: string
name: parse_data
arguments: data_label: D75
type_guessed: string
name: parse_data
arguments: data_label: D82
type_guessed: string
name: parse_data
arguments: data_label: D63
type_guessed: string
name: parse_data
arguments: data_label: D127
type_guessed: string
name: parse_data
arguments: data_label: D58
type_guessed: string
name: parse_data
arguments: data_label: D62
type_guessed: string
name: parse_data
arguments: data_label: D131
type_guessed: string
name: parse_data
arguments: data_label: D32
type_guessed: string
name: parse_data
arguments: data_label: D128
type_guessed: string
name: parse_data
arguments: data_label: D87
type_guessed: string

tool: D1: ********LCD TEST MENU********


tool: D75: [L] enable/disable LCD


tool: D82: [B] enable/disable back light


tool: D63: 


tool: D127: [C] enable/disable s3c6410 display controller


tool: D58: [D] display color


tool: D62: [I]  draw line


tool: D131: [Q] quit


tool: D32: LCD off


tool: D128: Display controller on


tool: D87: LCD on


assistant: ```c
void lcd_test(void) {
  unsigned char c;
  static int lcdon = 0;
  static int blon = 0;
  static int dispon = 0;
  lcd_init();
  while (1) {
    printf("********LCD TEST MENU********\n\r");
    printf("[L] enable/disable LCD\n\r");
    printf("[B] enable/disable back light\n\r");
    printf("[C] enable/disable s3c6410 display controller\n\r");
    printf("[D] display color\n\r");
    printf("[I]  draw line\n\r");
    printf("[Q] quit\n\r");
    do {
      c = getc();
      if (c == '\n' || c == '\r') {
        printf("\n\r");
      } else {
        putc(c);
      }
    } while (c == '\n' || c == '\r');
    switch (c) {
    case 'l':
    case 'L': {
      if (lcdon) {
        lcd_off();
        printf("LCD off\n\r");
      } else {
        lcd_on();
        printf("LCD on\n\r");
      }
      lcdon = !lcdon;
      break;
    }
    case 'b':
    case 'B': {
      pwm_menu();
      break;
    }
    case 'c':
    case 'C': {
      if (dispon) {
        displaycon_off();
        printf("Display controller off\n\r");
      } else {
        displaycon_on();
        printf("Display controller on\n\r");
      }
      blon = !blon;
      break;
    }
    case 'd':
    case 'D': {
      display_red();
      break;
    }
    case 'i':
    case 'I': {
      draw_line();
      break;
    }
    case 'q':
    case 'Q': {
      return;
      break;
    }
    }
  }
}
```