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

```asm
<get_keyword_visual>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %rdi,-0xb8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xa4(%rbp)
  jmp    L59
L138:
  addl   $0x1,-0xa4(%rbp)
L59:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L138
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x21,%al
  je     L114
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L114:
  addl   $0x1,-0xa4(%rbp)
  movl   $0x0,-0xa0(%rbp)
  jmp    L48
L170:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0xa0(%rbp),%eax
  cltq
  mov    %dl,-0x90(%rbp,%rax,1)
  addl   $0x1,-0xa4(%rbp)
  addl   $0x1,-0xa0(%rbp)
L48:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L1
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L1
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L170
L1:
  movl   $0x0,-0x98(%rbp)
  mov    -0xa0(%rbp),%eax
  cltq
  movb   $0x0,-0x90(%rbp,%rax,1)
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x94(%rbp)
  movl   $0x0,-0x9c(%rbp)
  jmp    L57
L213:
  mov    -0x9c(%rbp),%eax
  cltq
  movzbl -0x90(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  mov    %al,-0x90(%rbp,%rdx,1)
  addl   $0x1,-0x9c(%rbp)
L57:
  mov    -0x9c(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jl     L213
  lea    -0x90(%rbp),%rax
  mov    $0x6,%edx
  lea    D86(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L33
  lea    -0x90(%rbp),%rax
  mov    $0x6,%edx
  lea    D94(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L33
  movl   $0x0,-0x98(%rbp)
  mov    -0x98(%rbp),%eax
  jmp    L8
L85:
  addl   $0x1,-0xa4(%rbp)
L33:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L37
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L85
L37:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L295
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L295:
  addl   $0x1,-0xa4(%rbp)
  jmp    L270
L18:
  addl   $0x1,-0xa4(%rbp)
L270:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  jne    L181
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L18
L181:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L275
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
L275:
  movl   $0x0,-0xa0(%rbp)
  jmp    L17
L314:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0xa0(%rbp),%eax
  cltq
  mov    %dl,-0x90(%rbp,%rax,1)
  addl   $0x1,-0xa4(%rbp)
  addl   $0x1,-0xa0(%rbp)
L17:
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L304
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2c,%al
  je     L304
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x3d,%al
  je     L304
  mov    -0xa4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L314
L304:
  mov    -0xa0(%rbp),%eax
  cltq
  movb   $0x0,-0x90(%rbp,%rax,1)
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x94(%rbp)
  movl   $0x0,-0x9c(%rbp)
  jmp    L60
L292:
  mov    -0x9c(%rbp),%eax
  cltq
  movzbl -0x90(%rbp,%rax,1),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <tolower@plt>
  mov    -0x9c(%rbp),%edx
  movslq %edx,%rdx
  mov    %al,-0x90(%rbp,%rdx,1)
  addl   $0x1,-0x9c(%rbp)
L60:
  mov    -0x9c(%rbp),%eax
  cmp    -0x94(%rbp),%eax
  jl     L292
  lea    -0x90(%rbp),%rax
  mov    $0x3,%edx
  lea    D45(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L61
  lea    -0x90(%rbp),%rax
  mov    $0x3,%edx
  lea    D8(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L216
L61:
  movl   $0x1,-0x98(%rbp)
  mov    -0x98(%rbp),%eax
  jmp    L8
L216:
  lea    -0x90(%rbp),%rax
  mov    $0x3,%edx
  lea    D69(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L56
  lea    -0x90(%rbp),%rax
  mov    $0x3,%edx
  lea    D89(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L83
L56:
  movl   $0x2,-0x98(%rbp)
  mov    -0x98(%rbp),%eax
  jmp    L8
L83:
  lea    D96(%rip),%rax
  mov    %rax,%rdi
  call   <HECMW_vis_print_exit@plt>
  mov    -0x98(%rbp),%eax
L8:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L151
  call   <__stack_chk_fail@plt>
L151:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D36
type_guessed: string
name: unpack_data
arguments: data_label: D86
type_guessed: string
name: unpack_data
arguments: data_label: D94
type_guessed: string
name: unpack_data
arguments: data_label: D17
type_guessed: string
name: unpack_data
arguments: data_label: D45
type_guessed: string
name: unpack_data
arguments: data_label: D8
type_guessed: string
name: unpack_data
arguments: data_label: D69
type_guessed: string
name: unpack_data
arguments: data_label: D89
type_guessed: string
name: unpack_data
arguments: data_label: D96
type_guessed: string

tool: D36: ERROR: HEC-MW-VIS-E0002: The control parameter format error: should start from !

tool: D86: VISUAL

tool: D94: visual

tool: D17: ERROR: HEC-MW-VIS-E0006:The control parameter format error: visual ID

tool: D45: PSR

tool: D8: psr

tool: D69: PVR

tool: D89: pvr

tool: D96: ERROR: HEC-MW-VIS-E0007:The control parameter format error: method only can be PSR or PVR

assistant: ```c
int get_keyword_visual(char *buf) {
  int i, j, ii, len_tmp;
  int flag;
  char para[128];
  i = 0;
  while (buf[i] == ' ')
    i++;
  if (buf[i] != '!')
    HECMW_vis_print_exit("ERROR: HEC-MW-VIS-E0002: The control parameter format error: should "
                         "start from !");
  i = i + 1;
  j = 0;
  while ((buf[i] != ' ') && (buf[i] != ',') && (buf[i] != '\n')) {
    para[j] = buf[i];
    i++;
    j++;
  }
  flag = 0;
  para[j] = '\0';
  len_tmp = strlen(para);
  for (ii = 0; ii < len_tmp; ii++) {
    para[ii] = tolower(para[ii]);
  }
  if ((strncmp(para, "VISUAL", 6) != 0) && (strncmp(para, "visual", 6) != 0)) {
    flag = 0;
    return (flag);
  }
  while ((buf[i] != '=') && (buf[i] != '\n'))
    i++;
  if (buf[i] == '\n')
    HECMW_vis_print_exit("ERROR: HEC-MW-VIS-E0006:The control parameter format error: visual "
                         "ID");
  i++;
  while ((buf[i] == ' ') && (buf[i] != '\n'))
    i++;
  if (buf[i] == '\n')
    HECMW_vis_print_exit("ERROR: HEC-MW-VIS-E0006:The control parameter format error: visual "
                         "ID");
  j = 0;
  while ((buf[i] != ' ') && (buf[i] != ',') && (buf[i] != '=') && (buf[i] != '\n')) {
    para[j] = buf[i];
    i++;
    j++;
  }
  para[j] = '\0';
  len_tmp = strlen(para);
  for (ii = 0; ii < len_tmp; ii++) {
    para[ii] = tolower(para[ii]);
  }
  if ((strncmp(para, "PSR", 3) == 0) || (strncmp(para, "psr", 3) == 0)) {
    flag = 1;
    return (flag);
  }
  if ((strncmp(para, "PVR", 3) == 0) || (strncmp(para, "pvr", 3) == 0)) {
    flag = 2;
    return (flag);
  }
  HECMW_vis_print_exit("ERROR: HEC-MW-VIS-E0007:The control parameter format error: method only "
                       "can be PSR or PVR");
  return (flag);
}
```