user: Translate the below assembly code into C programming language:

```asm
<searchwhatis>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x148,%rsp
  mov    %rdi,%r12
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %rcx,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  movabs $0x100100000200,%r13
  movabs $0x110100000600,%r14
  jmp    L100
L136:
  bt     %rax,%r13
  jae    L9
L177:
  mov    %r12,%rdi
  call   <fgetc@plt>
  mov    %eax,%ebx
  cmp    $0x2c,%eax
  jbe    L136
L9:
  mov    %ebx,%eax
  and    $0xfffffffb,%eax
  cmp    $0x28,%eax
  je     L65
  mov    0x8(%rsp),%rbp
  cmp    $0xa,%ebx
  je     L65
L109:
  mov    D20(%rip),%rax
  cmp    %ebx,(%rax)
  je     L298
  lea    0x12f(%rsp),%rax
  cmp    %rax,%rbp
  jae    L196
  mov    %bl,0x0(%rbp)
  lea    0x1(%rbp),%rbp
L196:
  mov    %r12,%rdi
  call   <getc@plt>
  mov    %eax,%ebx
  cmp    $0x2c,%eax
  ja     L109
  bt     %rax,%r14
  jae    L109
L298:
  movb   $0x0,0x0(%rbp)
  cmpl   $0x0,0x14(%rsp)
  jne    L68
L84:
  mov    0x18(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmove  %eax,%r15d
  cmp    $0x28,%ebx
  je     L28
  cmp    $0xa,%ebx
  je     L28
  movl   $0x0,0x14(%rsp)
  mov    D20(%rip),%rax
  cmp    %ebx,(%rax)
  je     L362
L168:
  cmp    $0x2c,%ebx
  ja     L9
  bt     %rbx,%r13
  jb     L177
  jmp    L9
L68:
  mov    0x8(%rsp),%rsi
  lea    D50(%rip),%rdi
  call   <strcpy@plt>
  jmp    L84
L377:
  movb   $0x0,0x0(%rbp)
  lea    D39(%rip),%rdx
  cmp    %rdx,%rbp
  je     L166
  test   %al,%al
  jne    L166
  mov    $0x29,%ebx
  jmp    L339
L166:
  mov    $0x0,%r15d
L339:
  mov    D20(%rip),%rax
  mov    (%rax),%eax
  cmp    $0xa,%ebx
  je     L364
  cmp    %eax,%ebx
  je     L364
L239:
  mov    %r12,%rdi
  call   <getc@plt>
  mov    %eax,%ebx
  mov    D20(%rip),%rax
  mov    (%rax),%eax
  cmp    $0xa,%ebx
  je     L364
  cmp    %ebx,%eax
  jne    L239
L364:
  cmp    %ebx,%eax
  je     L293
  test   %r15d,%r15d
  jne    L293
L100:
  mov    %r12,%rdi
  call   <fgetc@plt>
  mov    %eax,%ebx
  movl   $0x1,0x14(%rsp)
  mov    $0x0,%r15d
  lea    0x30(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L168
L293:
  test   %r15d,%r15d
  je     L249
  mov    0x20(%rsp),%rax
  lea    D50(%rip),%rcx
  mov    %rcx,(%rax)
  mov    0x28(%rsp),%rax
  lea    D39(%rip),%rcx
  mov    %rcx,(%rax)
L249:
  mov    D20(%rip),%rax
  cmp    %ebx,(%rax)
  mov    $0xffffffff,%eax
  cmove  %eax,%r15d
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L111
  mov    %r15d,%eax
  add    $0x148,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L171:
  movb   $0x0,0x0(%rbp)
L362:
  mov    D20(%rip),%rax
  mov    (%rax),%eax
  mov    $0x0,%r15d
  jmp    L364
L269:
  mov    D20(%rip),%rax
  mov    (%rax),%eax
  mov    $0x0,%r15d
  jmp    L364
L28:
  lea    D39(%rip),%rbp
  cmp    $0x28,%ebx
  jne    L269
L174:
  mov    %r12,%rdi
  call   <fgetc@plt>
  mov    %eax,%ebx
  cmp    $0x29,%eax
  setne  %al
  cmp    $0xa,%ebx
  je     L377
  test   %al,%al
  je     L377
  mov    D20(%rip),%rax
  cmp    %ebx,(%rax)
  je     L171
  lea    -0x41(%rbx),%edx
  lea    0x20(%rbx),%eax
  cmp    $0x1a,%edx
  cmovb  %eax,%ebx
  lea    D19(%rip),%rax
  cmp    %rax,%rbp
  jae    L174
  add    $0x1,%rbp
  mov    %bl,-0x1(%rbp)
  jmp    L174
L65:
  mov    0x8(%rsp),%rbp
  jmp    L298
L111:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int searchwhatis(FILE *wf, char *title, char **ppage, char **psection) {
  static char page[256], section[32];
  char alias[256];
  int found = 0;
  int c;
  do {
    int first = 1;
    char *pc = section;
    c = fgetc(wf);
    do {
      char *pa = alias;
      while (c == ' ' || c == '\t' || c == ',')
        c = fgetc(wf);
      while (c != ' ' && c != '\t' && c != ',' && c != '(' && c != '\n' && c != EOF) {
        if (pa < ((alias) + (sizeof(alias) / sizeof((alias)[0]))) - 1)
          *pa++ = c;
        c = getc(wf);
      }
      *pa = 0;
      if (first) {
        strcpy(page, alias);
        first = 0;
      }
      if (strcmp(alias, title) == 0)
        found = 1;
    } while (c != '(' && c != '\n' && c != EOF);
    if (c != '(') {
      found = 0;
    } else {
      while ((c = fgetc(wf)) != ')' && c != '\n' && c != EOF) {
        if ('A' <= c && c <= 'Z')
          c = c - 'A' + 'a';
        if (pc < ((section) + (sizeof(section) / sizeof((section)[0]))) - 1)
          *pc++ = c;
      }
      *pc = 0;
      if (c != ')' || pc == section)
        found = 0;
    }
    while (c != EOF && c != '\n')
      c = getc(wf);
  } while (!found && c != EOF);
  if (found) {
    *ppage = page;
    *psection = section;
  }
  return c == EOF ? -1 : found;
}
```