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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  lea    0xe(%rsp),%rsi
  lea    D81(%rip),%rdi
  call   <scanf@plt>
  cmpb   $0x68,0xe(%rsp)
  je     L155
L161:
  cmpb   $0x64,0xe(%rsp)
  je     L47
L149:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  mov    $0x0,%eax
  add    $0x40,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L155:
  lea    0xf(%rsp),%rsi
  lea    D81(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  lea    0x29(%rsp),%rsi
  lea    D98(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl 0x2b(%rsp),%esi
  lea    -0x61(%rsi),%eax
  cmp    $0x19,%al
  ja     L139
  movsbl %sil,%esi
  sub    $0x57,%esi
L198:
  movzbl 0x2a(%rsp),%eax
  lea    -0x61(%rax),%edx
  cmp    $0x19,%dl
  ja     L238
  movsbl %al,%eax
  sub    $0x57,%eax
  shl    $0x4,%eax
  add    %eax,%esi
L231:
  movzbl 0x2d(%rsp),%eax
  lea    -0x61(%rax),%edx
  cmp    $0x19,%dl
  ja     L53
  movsbl %al,%edx
  sub    $0x57,%edx
L201:
  movzbl 0x2c(%rsp),%eax
  lea    -0x61(%rax),%ecx
  cmp    $0x19,%cl
  ja     L68
  movsbl %al,%eax
  sub    $0x57,%eax
  shl    $0x4,%eax
  add    %eax,%edx
L107:
  movzbl 0x2f(%rsp),%eax
  lea    -0x61(%rax),%ecx
  cmp    $0x19,%cl
  ja     L225
  movsbl %al,%ecx
  sub    $0x57,%ecx
L182:
  movzbl 0x2e(%rsp),%eax
  lea    -0x61(%rax),%edi
  cmp    $0x19,%dil
  ja     L213
  movsbl %al,%eax
  sub    $0x57,%eax
  shl    $0x4,%eax
  add    %eax,%ecx
L235:
  lea    D55(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L161
L139:
  movsbl %sil,%esi
  sub    $0x30,%esi
  jmp    L198
L238:
  movsbl %al,%eax
  sub    $0x30,%eax
  shl    $0x4,%eax
  add    %eax,%esi
  jmp    L231
L53:
  movsbl %al,%edx
  sub    $0x30,%edx
  jmp    L201
L68:
  movsbl %al,%eax
  sub    $0x30,%eax
  shl    $0x4,%eax
  add    %eax,%edx
  jmp    L107
L225:
  movsbl %al,%ecx
  sub    $0x30,%ecx
  jmp    L182
L213:
  movsbl %al,%eax
  sub    $0x30,%eax
  shl    $0x4,%eax
  add    %eax,%ecx
  jmp    L235
L47:
  lea    0x10(%rsp),%rbx
  lea    0x1c(%rsp),%r14
  lea    D68(%rip),%r13
  lea    0xf(%rsp),%r12
  lea    D81(%rip),%rbp
L178:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  add    $0x4,%rbx
  cmp    %r14,%rbx
  jne    L178
  mov    0x10(%rsp),%esi
  test   %esi,%esi
  jne    L183
  mov    $0x0,%edx
  lea    D50(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L125:
  mov    0x14(%rsp),%esi
  test   %esi,%esi
  jne    L202
  mov    $0x0,%edx
  lea    D36(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L45:
  mov    0x18(%rsp),%esi
  test   %esi,%esi
  jne    L190
  mov    $0x0,%edx
  lea    D36(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L149
L183:
  lea    D66(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L125
L202:
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L45
L190:
  lea    D14(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L149
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D81
type: string
name: extract_symbolic_data
arguments: tag: D98
type: string
name: extract_symbolic_data
arguments: tag: D55
type: string
name: extract_symbolic_data
arguments: tag: D68
type: string
name: extract_symbolic_data
arguments: tag: D50
type: string
name: extract_symbolic_data
arguments: tag: D36
type: string
name: extract_symbolic_data
arguments: tag: D66
type: string
name: extract_symbolic_data
arguments: tag: D14
type: string

tool: D81: %c

tool: D98: %[^
]s

tool: D55: rgb(%d, %d, %d)

tool: D68: %d

tool: D50: #%x%x

tool: D36: %x%x

tool: D66: #%x

tool: D14: %x

assistant: ```c
int main() {
  char input;
  scanf("%c", &input);
  if (input == 'h') {
    char help;
    scanf("%c", &help);
    char input_string[15];
    scanf("%[^\n]s", input_string);
    int red = 0, green = 0, blue = 0;
    if (input_string[2] > 96 && input_string[2] < 123)
      red = input_string[2] - 87;
    else
      red = input_string[2] - 48;
    if (input_string[1] > 96 && input_string[1] < 123)
      red = red + (input_string[1] - 87) * 16;
    else
      red = red + (input_string[1] - 48) * 16;
    if (input_string[4] > 96 && input_string[4] < 123)
      green = input_string[4] - 87;
    else
      green = input_string[4] - 48;
    if (input_string[3] > 96 && input_string[3] < 123)
      green = green + (input_string[3] - 87) * 16;
    else
      green = green + (input_string[3] - 48) * 16;
    if (input_string[6] > 96 && input_string[6] < 123)
      blue = input_string[6] - 87;
    else
      blue = input_string[6] - 48;
    if (input_string[5] > 96 && input_string[5] < 123)
      blue = blue + (input_string[5] - 87) * 16;
    else
      blue = blue + (input_string[5] - 48) * 16;
    printf("rgb(%d, %d, %d)", red, green, blue);
  }
  if (input == 'd') {
    char comma;
    int numbers[5];
    for (int counter = 0; counter < 3; counter++) {
      scanf("%d", &numbers[counter]);
      scanf("%c", &comma);
    }
    if (numbers[0] == 0)
      printf("#%x%x", numbers[0], numbers[0]);
    else
      printf("#%x", numbers[0]);
    if (numbers[1] == 0)
      printf("%x%x", numbers[1], numbers[1]);
    else
      printf("%x", numbers[1]);
    if (numbers[2] == 0)
      printf("%x%x", numbers[2], numbers[2]);
    else
      printf("%x", numbers[2]);
  }
  return 0;
}
```