user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ffmkky>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %rdx,-0x98(%rbp)
  mov    %rcx,-0xa0(%rbp)
  mov    %r8,-0xa8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0xffffffff,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jle    L0
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%eax
  jmp    L299
L0:
  movb   $0x0,-0x50(%rbp)
  mov    -0xa0(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L208
L234:
  addl   $0x1,-0x74(%rbp)
L208:
  mov    -0x74(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L234
  mov    -0x74(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  lea    -0x50(%rbp),%rax
  mov    $0x47,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x68(%rbp)
  lea    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x70(%rbp)
  cmpq   $0x0,-0x70(%rbp)
  je     L415
  mov    -0x70(%rbp),%rax
  lea    -0x1(%rax),%rdx
  lea    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x58(%rbp)
  jmp    L30
L19:
  mov    -0x58(%rbp),%rax
  movb   $0x0,(%rax)
  subq   $0x1,-0x58(%rbp)
L30:
  mov    -0x58(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L19
  lea    -0x50(%rbp),%rdx
  mov    -0x58(%rbp),%rax
  sub    %rdx,%rax
  add    $0x1,%rax
  mov    %rax,-0x70(%rbp)
L415:
  cmpq   $0x8,-0x70(%rbp)
  ja     L95
  lea    -0x78(%rbp),%rdx
  mov    -0x88(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fftkey@plt>
  test   %rax,%rax
  jg     L95
  lea    -0x50(%rbp),%rdx
  mov    -0xa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  jmp    L187
L353:
  mov    -0xa0(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movb   $0x20,(%rax)
  addq   $0x1,-0x60(%rbp)
L187:
  cmpq   $0x7,-0x60(%rbp)
  jbe    L353
  mov    -0xa0(%rbp),%rax
  add    $0x8,%rax
  movb   $0x3d,(%rax)
  mov    -0xa0(%rbp),%rax
  add    $0x9,%rax
  movb   $0x20,(%rax)
  mov    -0xa0(%rbp),%rax
  add    $0xa,%rax
  movb   $0x0,(%rax)
  movq   $0xa,-0x70(%rbp)
  jmp    L256
L95:
  lea    -0x50(%rbp),%rax
  mov    $0x3d,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L346
  lea    D93(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  lea    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xa8(%rbp),%rax
  movl   $0xcf,(%rax)
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%eax
  jmp    L299
L346:
  movzbl -0x50(%rbp),%eax
  mov    $0x48,%edx
  cmp    %dl,%al
  jl     L394
  movzbl -0x50(%rbp),%eax
  mov    $0x48,%edx
  cmp    %dl,%al
  jg     L394
  lea    -0x50(%rbp),%rax
  mov    $0x9,%edx
  lea    D14(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L392
L394:
  movzbl -0x50(%rbp),%eax
  mov    $0x68,%edx
  cmp    %dl,%al
  jl     L370
  movzbl -0x50(%rbp),%eax
  mov    $0x68,%edx
  cmp    %dl,%al
  jg     L370
  lea    -0x50(%rbp),%rax
  mov    $0x9,%edx
  lea    D86(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L392
L370:
  mov    -0xa0(%rbp),%rax
  lea    D14(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  jmp    L403
L392:
  subq   $0x9,-0x70(%rbp)
L403:
  lea    -0x50(%rbp),%rdx
  mov    -0xa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x70(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  add    $0xc,%rax
  cmp    $0x50,%rax
  jbe    L428
  mov    -0xa0(%rbp),%rax
  lea    D34(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  addq   $0xb,-0x70(%rbp)
  jmp    L256
L428:
  mov    -0xa0(%rbp),%rax
  lea    D65(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  addq   $0xc,-0x70(%rbp)
L256:
  cmpq   $0x0,-0x68(%rbp)
  je     L395
  mov    -0x90(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x27,%al
  jne    L350
  cmpq   $0x4d,-0x70(%rbp)
  jbe    L246
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xa8(%rbp),%rax
  movl   $0xcf,(%rax)
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%eax
  jmp    L299
L246:
  mov    -0x70(%rbp),%rax
  mov    %eax,%edx
  mov    $0x50,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%rcx
  mov    -0xa0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
  mov    -0x70(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    $0x50,%edx
  cmp    %rdx,%rax
  cmova  %rdx,%rax
  mov    %rax,-0x68(%rbp)
  cmpq   $0x50,-0x68(%rbp)
  jne    L147
  mov    -0xa0(%rbp),%rax
  add    $0x4f,%rax
  movb   $0x27,(%rax)
L147:
  cmpq   $0x0,-0x98(%rbp)
  je     L414
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L414
  cmpq   $0x1d,-0x68(%rbp)
  ja     L414
  mov    -0x68(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  jmp    L161
L168:
  mov    -0xa0(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movb   $0x20,(%rax)
  addq   $0x1,-0x60(%rbp)
L161:
  cmpq   $0x1d,-0x60(%rbp)
  jbe    L168
  mov    -0xa0(%rbp),%rax
  add    $0x1e,%rax
  movb   $0x0,(%rax)
  movq   $0x1e,-0x68(%rbp)
  jmp    L414
L350:
  mov    -0x70(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  cmp    $0x50,%rax
  jbe    L76
  lea    D91(%rip),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <ffpmsg@plt>
  mov    -0xa8(%rbp),%rax
  movl   $0xcf,(%rax)
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%eax
  jmp    L299
L76:
  mov    -0x70(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  cmp    $0x1d,%rax
  ja     L16
  mov    -0x70(%rbp),%rax
  mov    %eax,%edx
  mov    -0x68(%rbp),%rax
  add    %eax,%edx
  mov    $0x1e,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0xa0(%rbp),%rax
  lea    D77(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
L16:
  mov    -0x70(%rbp),%rax
  mov    %eax,%edx
  mov    $0x50,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%rcx
  mov    -0xa0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
  mov    -0x70(%rbp),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    $0x50,%edx
  cmp    %rdx,%rax
  cmova  %rdx,%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x68(%rbp),%rax
  mov    $0x1e,%edx
  cmp    %rdx,%rax
  cmovb  %rdx,%rax
  mov    %rax,-0x68(%rbp)
L414:
  cmpq   $0x0,-0x98(%rbp)
  je     L268
  cmpq   $0x4c,-0x68(%rbp)
  ja     L268
  mov    -0x98(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L268
  mov    -0xa0(%rbp),%rax
  lea    D88(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcat@plt>
  mov    -0x68(%rbp),%rax
  mov    %eax,%edx
  mov    $0x4d,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x98(%rbp),%rcx
  mov    -0xa0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
  jmp    L268
L395:
  cmpq   $0xa,-0x70(%rbp)
  jne    L268
  mov    -0xa0(%rbp),%rax
  add    $0x8,%rax
  movb   $0x20,(%rax)
  cmpq   $0x0,-0x98(%rbp)
  je     L268
  mov    -0x70(%rbp),%rax
  mov    %eax,%edx
  mov    $0x50,%eax
  sub    %edx,%eax
  mov    %eax,%edx
  mov    -0x98(%rbp),%rcx
  mov    -0xa0(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncat@plt>
L268:
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%eax
L299:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L211
  call   <__stack_chk_fail@plt>
L211:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D93
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D14
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D86
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D34
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D65
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D91
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D77
type_infered: string
name: extract_symbolic_data
arguments: data_tag: D88
type_infered: string

tool: D93: Illegal keyword name; contains an equals sign (=)

tool: D14: HIERARCH 

tool: D86: hierarch 

tool: D34: = 

tool: D65:  = 

tool: D91: The following keyword + value is too long to fit on a card:

tool: D77:                     

tool: D88:  / 

assistant: ```c
int ffmkky(const char *keyname, char *value, const char *comm, char *card, int *status) {
  size_t namelen, len, ii;
  char tmpname[72], *cptr;
  int tstatus = -1, nblank = 0;
  if (*status > 0)
    return (*status);
  *tmpname = '\0';
  *card = '\0';
  while (*(keyname + nblank) == ' ')
    nblank++;
  strncat(tmpname, keyname + nblank, 72 - 1);
  len = strlen(value);
  namelen = strlen(tmpname);
  if (namelen) {
    cptr = tmpname + namelen - 1;
    while (*cptr == ' ') {
      *cptr = '\0';
      cptr--;
    }
    namelen = cptr - tmpname + 1;
  }
  if (namelen <= 8 && (fftkey(keyname, &tstatus) <= 0)) {
    strcat(card, tmpname);
    for (ii = namelen; ii < 8; ii++)
      card[ii] = ' ';
    card[8] = '=';
    card[9] = ' ';
    card[10] = '\0';
    namelen = 10;
  } else {
    if (strchr(tmpname, '=')) {
      ffpmsg("Illegal keyword name; contains an equals sign (=)");
      ffpmsg(tmpname);
      return (*status = 207);
    }
    if (((tmpname)[0] < ("HIERARCH ")[0] ? -1 : (tmpname)[0] > ("HIERARCH ")[0] ? 1 : strncmp((tmpname), ("HIERARCH "), (9))) && ((tmpname)[0] < ("hierarch ")[0] ? -1 : (tmpname)[0] > ("hierarch ")[0] ? 1 : strncmp((tmpname), ("hierarch "), (9))))
      strcat(card, "HIERARCH ");
    else
      namelen -= 9;
    strcat(card, tmpname);
    if (namelen + 12 + len > 80) {
      strcat(card, "= ");
      namelen += 11;
    } else {
      strcat(card, " = ");
      namelen += 12;
    }
  }
  if (len > 0) {
    if (value[0] == '\'') {
      if (namelen > 77) {
        ffpmsg("The following keyword + value is too long to fit on a card:");
        ffpmsg(keyname);
        ffpmsg(value);
        return (*status = 207);
      }
      strncat(card, value, 80 - namelen);
      len = ((80) < (namelen + len) ? (80) : (namelen + len));
      if (len == 80) {
        card[79] = '\'';
      }
      if (comm) {
        if (comm[0] != 0) {
          if (len < 30) {
            for (ii = len; ii < 30; ii++)
              card[ii] = ' ';
            card[30] = '\0';
            len = 30;
          }
        }
      }
    } else {
      if (namelen + len > 80) {
        ffpmsg("The following keyword + value is too long to fit on a card:");
        ffpmsg(keyname);
        ffpmsg(value);
        return (*status = 207);
      } else if (namelen + len < 30) {
        strncat(card, "                    ", 30 - (namelen + len));
      }
      strncat(card, value, 80 - namelen);
      len = ((80) < (namelen + len) ? (80) : (namelen + len));
      len = ((30) > (len) ? (30) : (len));
    }
    if (comm) {
      if ((len < 77) && (strlen(comm) > 0)) {
        strcat(card, " / ");
        strncat(card, comm, 77 - len);
      }
    }
  } else {
    if (namelen == 10) {
      card[8] = ' ';
      if (comm) {
        strncat(card, comm, 80 - namelen);
      }
    }
  }
  return (*status);
}
```