user: What is the c source code of the assembly code below?

```asm
<qfits_getcomment>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  test   %rdi,%rdi
  je     L129
  mov    $0x4,%edx
  lea    D31(%rip),%rsi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  je     L198
  mov    $0x8,%edx
  lea    D33(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  je     L198
  mov    $0x8,%edx
  lea    D4(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  je     L198
  mov    $0x8,%edx
  lea    D41(%rip),%rsi
  mov    %rbx,%rdi
  call   <strncmp@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  je     L198
  mov    $0x51,%edx
  mov    $0x0,%esi
  lea    D46(%rip),%rdi
  call   <memset@plt>
  cmpb   $0x3d,(%rbx)
  je     L126
  mov    $0x1,%edx
L140:
  mov    %edx,%eax
  cmpb   $0x3d,(%rbx,%rdx,1)
  setne  %sil
  cmp    $0x4f,%edx
  setle  %cl
  add    $0x1,%rdx
  test   %cl,%sil
  jne    L140
  cmp    $0x4f,%eax
  jg     L38
  add    $0x1,%eax
  cmp    $0x4f,%eax
  jg     L125
L90:
  cltq
  mov    $0x0,%esi
  jmp    L200
L126:
  mov    $0x1,%eax
  jmp    L90
L252:
  xor    $0x1,%esi
L49:
  add    $0x1,%rax
  cmp    $0x4f,%eax
  jg     L111
L200:
  movzbl (%rbx,%rax,1),%ecx
  cmp    $0x27,%cl
  je     L252
  test   %esi,%esi
  jne    L49
  cmp    $0x2f,%cl
  jne    L49
  cmp    $0x4f,%eax
  jg     L206
  lea    0x1(%rax),%ecx
  movslq %ecx,%rsi
  add    %rbx,%rsi
  cmpb   $0x20,(%rsi)
  jne    L133
  lea    0x2(%rax),%eax
  cltq
L19:
  mov    %eax,%ecx
  lea    (%rbx,%rax,1),%rsi
  add    $0x1,%rax
  cmpb   $0x20,-0x1(%rbx,%rax,1)
  je     L19
L133:
  cmpb   $0x20,0x4f(%rbx)
  jne    L259
  mov    $0x4e,%eax
L141:
  mov    %eax,%edx
  sub    $0x1,%rax
  cmpb   $0x20,0x1(%rbx,%rax,1)
  je     L141
L57:
  mov    $0x0,%eax
  cmp    %edx,%ecx
  jg     L198
  sub    %ecx,%edx
  lea    0x1(%rdx),%ebp
  mov    %ebp,%edx
  lea    D46(%rip),%rbx
  mov    %rbx,%rdi
  call   <strncpy@plt>
  movslq %ebp,%rbp
  movb   $0x0,(%rbx,%rbp,1)
  mov    %rbx,%rax
  jmp    L198
L111:
  mov    $0x0,%eax
  jmp    L198
L259:
  mov    $0x4f,%edx
  jmp    L57
L129:
  mov    %rdi,%rax
L198:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L38:
  mov    $0x0,%eax
  jmp    L198
L125:
  mov    $0x0,%eax
  jmp    L198
L206:
  mov    $0x0,%eax
  jmp    L198
```

tool_calls: name: read_data
arguments: label: D31
data_type: string
name: read_data
arguments: label: D33
data_type: string
name: read_data
arguments: label: D4
data_type: string
name: read_data
arguments: label: D41
data_type: string

tool: D31: END 

tool: D33: HISTORY 

tool: D4: COMMENT 

tool: D41:         

assistant: ```c
char *qfits_getcomment(const char *line) {
  static char comment[81];
  int i;
  int from, to;
  int inq;
  if (line == NULL) {
    return NULL;
  }
  if (!strncmp(line, "END ", 4))
    return NULL;
  if (!strncmp(line, "HISTORY ", 8))
    return NULL;
  if (!strncmp(line, "COMMENT ", 8))
    return NULL;
  if (!strncmp(line, "        ", 8))
    return NULL;
  memset(comment, 0, 81);
  i = 0;
  while (line[i] != '=' && i < 80)
    i++;
  if (i >= 80) {
    return NULL;
  }
  i++;
  inq = 0;
  while (i < 80) {
    if (line[i] == '\'')
      inq = !inq;
    if (line[i] == '/')
      if (!inq)
        break;
    i++;
  }
  if (i >= 80) {
    return NULL;
  }
  i++;
  while (line[i] == ' ')
    i++;
  from = i;
  to = 79;
  while (line[to] == ' ')
    to--;
  if (to < from) {
    return NULL;
  }
  strncpy(comment, line + from, to - from + 1);
  comment[to - from + 1] = (char)0;
  return comment;
}
```