user: 请将以下的汇编代码转换成C语言代码：

```asm
<ffmkky>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %rdi,0x30(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %rdx,0x28(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r8,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  movl   $0xffffffff,0x4c(%rsp)
  mov    (%r8),%eax
  test   %eax,%eax
  jg     L40
  movb   $0x0,0x50(%rsp)
  movb   $0x0,0xa0(%rsp)
  movb   $0x0,(%rcx)
  cmpb   $0x20,(%rdi)
  jne    L692
  lea    0x1(%rdi),%rax
L311:
  mov    %rax,%rsi
  add    $0x1,%rax
  cmpb   $0x20,-0x1(%rax)
  je     L311
L288:
  lea    0x50(%rsp),%rbx
  mov    $0x4a,%edx
  mov    %rbx,%rdi
  call   <strncat@plt>
  mov    0x10(%rsp),%rdi
  call   <strlen@plt>
  mov    %eax,0x3c(%rsp)
  cltq
  mov    %rax,0x20(%rsp)
  mov    %rbx,%rdi
  call   <strlen@plt>
  movslq %eax,%rbp
  test   %rbp,%rbp
  je     L345
  lea    0x4f(%rsp,%rbp,1),%rbp
  cmpb   $0x20,0x0(%rbp)
  jne    L662
L428:
  movb   $0x0,0x0(%rbp)
  sub    $0x1,%rbp
  cmpb   $0x20,0x0(%rbp)
  je     L428
L662:
  lea    0x50(%rsp),%rdi
  sub    %rdi,%rbp
  add    $0x1,%rbp
  mov    $0x3d,%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L407
  cmp    $0x8,%rbp
  jbe    L102
L350:
  cmpb   $0x48,0x50(%rsp)
  je     L165
L342:
  cmpb   $0x68,0x50(%rsp)
  je     L143
L213:
  lea    0x50(%rsp),%rsi
  lea    0xa0(%rsp),%rbx
  mov    $0x4a,%edx
  mov    %rbx,%rdi
  call   <strncat@plt>
  lea    D20(%rip),%rsi
  mov    %rbx,%rdi
  call   <strtok@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L596
  mov    $0x0,%r13d
  mov    $0x0,%r14d
  mov    $0x0,%r12d
  lea    D20(%rip),%r15
  jmp    L179
L692:
  mov    0x30(%rsp),%rsi
  jmp    L288
L407:
  lea    D88(%rip),%rdi
  call   <ffpmsg@plt>
  lea    0x50(%rsp),%rdi
  call   <ffpmsg@plt>
  mov    0x18(%rsp),%rax
  movl   $0xcf,(%rax)
  mov    $0xcf,%eax
  jmp    L40
L102:
  lea    0x4c(%rsp),%rsi
  lea    0x50(%rsp),%rdi
  call   <fftkey@plt>
  test   %rax,%rax
  jg     L350
  lea    0x50(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <strcat@plt>
  cmp    $0x7,%rbp
  ja     L693
  jmp    L89
L165:
  lea    0x50(%rsp),%rdi
  mov    $0x9,%edx
  lea    D19(%rip),%rsi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L212
  jmp    L342
L143:
  lea    0x50(%rsp),%rdi
  mov    $0x9,%edx
  lea    D170(%rip),%rsi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L213
L212:
  lea    0x50(%rsp),%rsi
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strcat@plt>
  mov    0x20(%rsp),%rax
  lea    0x3(%rax,%rbp,1),%rax
  cmp    $0x50,%rax
  jbe    L24
  lea    D153(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    0x2(%rbp),%rbx
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  jmp    L211
L24:
  lea    D172(%rip),%rsi
  mov    0x8(%rsp),%rdi
  call   <strcat@plt>
  lea    0x3(%rbp),%rbx
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  jmp    L211
L656:
  movl   $0xffffffff,0x4c(%rsp)
  lea    0x4c(%rsp),%rsi
  mov    %rbx,%rdi
  call   <fftkey@plt>
  test   %rax,%rax
  mov    $0x1,%eax
  cmovg  %eax,%r13d
  mov    %r15,%rsi
  mov    $0x0,%edi
  call   <strtok@plt>
  mov    %rax,%rbx
  add    $0x1,%r12d
  test   %rax,%rax
  je     L577
L179:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    %r14d,%eax
  jle    L656
  mov    %rbx,%rdi
  call   <strlen@plt>
  mov    %eax,%r14d
  jmp    L656
L577:
  movl   $0xffffffff,0x4c(%rsp)
  test   %r12d,%r12d
  jle    L590
  lea    0xb(%rbp),%rbx
  cmp    $0x50,%rbx
  ja     L67
  lea    D19(%rip),%rsi
  mov    0x8(%rsp),%r15
  mov    %r15,%rdi
  call   <strcat@plt>
  lea    0x50(%rsp),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  mov    0x20(%rsp),%rax
  lea    0xc(%rax,%rbp,1),%rax
  cmp    $0x50,%rax
  jbe    L547
  lea    D153(%rip),%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
L211:
  cmpq   $0x0,0x20(%rsp)
  je     L373
  mov    0x10(%rsp),%rax
  cmpb   $0x27,(%rax)
  je     L436
L406:
  mov    0x20(%rsp),%rbp
  add    %rbx,%rbp
  cmp    $0x50,%rbp
  ja     L427
  cmp    $0x1d,%rbp
  jbe    L55
L542:
  mov    $0x50,%edx
  sub    %ebx,%edx
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <strncat@plt>
  mov    $0x50,%eax
  cmp    %rax,%rbp
  cmova  %rax,%rbp
  mov    $0x1e,%eax
  cmp    %rax,%rbp
  cmovb  %rax,%rbp
L210:
  cmp    $0x4c,%rbp
  ja     L99
  cmpq   $0x0,0x28(%rsp)
  je     L99
L16:
  mov    0x28(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L99
  lea    D113(%rip),%rsi
  mov    0x8(%rsp),%r14
  mov    %r14,%rdi
  call   <strcat@plt>
  mov    $0x4d,%edx
  sub    %ebp,%edx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <strncat@plt>
  jmp    L99
L67:
  lea    D9(%rip),%rdi
  call   <ffpmsg@plt>
  mov    0x30(%rsp),%rdi
  call   <ffpmsg@plt>
  mov    0x18(%rsp),%rax
  movl   $0xcf,(%rax)
  mov    $0xcf,%eax
  jmp    L40
L547:
  lea    D172(%rip),%rsi
  mov    0x8(%rsp),%rdi
  call   <strcat@plt>
  lea    0xc(%rbp),%rbx
  jmp    L211
L294:
  lea    D105(%rip),%rdi
  call   <ffpmsg@plt>
  lea    0x50(%rsp),%rdi
  call   <ffpmsg@plt>
  mov    0x18(%rsp),%rax
  movl   $0xcf,(%rax)
  mov    $0xcf,%eax
  jmp    L40
L436:
  cmp    $0x4d,%rbx
  ja     L273
L148:
  mov    $0x50,%edx
  sub    %ebx,%edx
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%r14
  mov    %r14,%rdi
  call   <strncat@plt>
  mov    0x20(%rsp),%rax
  add    %rbx,%rax
  mov    $0x50,%ebp
  cmp    %rbp,%rax
  cmovbe %rax,%rbp
  cmp    $0x4f,%rax
  jbe    L22
  movb   $0x27,0x4f(%r14)
  cmpq   $0x0,0x28(%rsp)
  jne    L210
  jmp    L99
L273:
  lea    D15(%rip),%rdi
  call   <ffpmsg@plt>
  mov    0x30(%rsp),%rdi
  call   <ffpmsg@plt>
  mov    0x10(%rsp),%rdi
  call   <ffpmsg@plt>
  mov    0x18(%rsp),%rax
  movl   $0xcf,(%rax)
  mov    $0xcf,%eax
  jmp    L40
L510:
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0xa,%ebx
  jmp    L148
L22:
  mov    0x28(%rsp),%rdx
  test   %rdx,%rdx
  je     L99
  cmpb   $0x0,(%rdx)
  je     L210
  cmp    $0x1d,%rax
  ja     L210
L499:
  mov    0x8(%rsp),%rax
  movb   $0x20,(%rax,%rbp,1)
  add    $0x1,%rbp
  cmp    $0x1d,%rbp
  jbe    L499
  movb   $0x0,0x1e(%rax)
  mov    $0x1e,%ebp
  jmp    L16
L427:
  lea    D15(%rip),%rdi
  call   <ffpmsg@plt>
  mov    0x30(%rsp),%rdi
  call   <ffpmsg@plt>
  mov    0x10(%rsp),%rdi
  call   <ffpmsg@plt>
  mov    0x18(%rsp),%rax
  movl   $0xcf,(%rax)
  mov    $0xcf,%eax
  jmp    L40
L55:
  mov    $0x1e,%edx
  sub    0x3c(%rsp),%edx
  sub    %ebx,%edx
  lea    D166(%rip),%rsi
  mov    0x8(%rsp),%rdi
  call   <strncat@plt>
  jmp    L542
L373:
  cmp    $0xa,%rbx
  je     L549
L99:
  cmp    $0x1,%r12d
  je     L10
  cmp    $0x1,%r13d
  je     L10
L634:
  mov    0x18(%rsp),%rax
  mov    (%rax),%eax
L40:
  mov    0xf8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L384
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L549:
  mov    0x8(%rsp),%rax
  movb   $0x20,0x8(%rax)
  cmpq   $0x0,0x28(%rsp)
  je     L99
L412:
  mov    $0x46,%edx
  mov    0x28(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <strncat@plt>
  jmp    L99
L10:
  lea    D123(%rip),%rdi
  call   <ffpmsg@plt>
  mov    0x8(%rsp),%rdi
  call   <ffpmsg@plt>
  jmp    L634
L596:
  movl   $0xffffffff,0x4c(%rsp)
  mov    $0x0,%r13d
  mov    $0x0,%r12d
L590:
  lea    0x4c(%rsp),%rsi
  lea    0x50(%rsp),%rdi
  call   <fftkey@plt>
  test   %rax,%rax
  jg     L294
  lea    0x50(%rsp),%rsi
  mov    $0x4a,%edx
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strncat@plt>
  lea    D153(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcat@plt>
  lea    0x2(%rbp),%rbx
  jmp    L211
L345:
  lea    0x50(%rsp),%rdi
  mov    $0x3d,%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L407
  lea    0x4c(%rsp),%rsi
  lea    0x50(%rsp),%rdi
  call   <fftkey@plt>
  test   %rax,%rax
  jg     L350
  lea    0x50(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  call   <strcat@plt>
L89:
  mov    0x8(%rsp),%rax
  add    %rax,%rbp
  add    $0x8,%rax
L594:
  movb   $0x20,0x0(%rbp)
  add    $0x1,%rbp
  cmp    %rax,%rbp
  jne    L594
L693:
  mov    0x8(%rsp),%rax
  movb   $0x3d,0x8(%rax)
  movb   $0x20,0x9(%rax)
  movb   $0x0,0xa(%rax)
  cmpq   $0x0,0x20(%rsp)
  jne    L618
  mov    0x8(%rsp),%rax
  movb   $0x20,0x8(%rax)
  cmpq   $0x0,0x28(%rsp)
  je     L634
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  jmp    L412
L618:
  mov    0x10(%rsp),%rax
  cmpb   $0x27,(%rax)
  je     L510
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0xa,%ebx
  jmp    L406
L384:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D20
type_infered: string
name: read_data
arguments: data_tag: D88
type_infered: string
name: read_data
arguments: data_tag: D19
type_infered: string
name: read_data
arguments: data_tag: D170
type_infered: string
name: read_data
arguments: data_tag: D153
type_infered: string
name: read_data
arguments: data_tag: D172
type_infered: string
name: read_data
arguments: data_tag: D113
type_infered: string
name: read_data
arguments: data_tag: D9
type_infered: string
name: read_data
arguments: data_tag: D105
type_infered: string
name: read_data
arguments: data_tag: D15
type_infered: string
name: read_data
arguments: data_tag: D166
type_infered: string
name: read_data
arguments: data_tag: D123
type_infered: string

tool: D20:  

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

tool: D19: HIERARCH 

tool: D170: hierarch 

tool: D153: = 

tool: D172:  = 

tool: D113:  / 

tool: D9: The following keyword is too long to fit on a card:

tool: D105: Illegal keyword name:

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

tool: D166:                     

tool: D123: Warning: the following keyword does not conform to the HIERARCH convention

assistant: ```c
int ffmkky(const char *keyname, char *value, const char *comm, char *card, int *status) {
  size_t namelen, len, ii;
  char tmpname[75], tmpname2[75], *cptr;
  char *saveptr;
  int tstatus = -1, nblank = 0, ntoken = 0, maxlen = 0, specialchar = 0;
  if (*status > 0)
    return (*status);
  *tmpname = '\0';
  *tmpname2 = '\0';
  *card = '\0';
  while (*(keyname + nblank) == ' ')
    nblank++;
  strncat(tmpname, keyname + nblank, 75 - 1);
  len = strlen(value);
  namelen = strlen(tmpname);
  if (namelen) {
    cptr = tmpname + namelen - 1;
    while (*cptr == ' ') {
      *cptr = '\0';
      cptr--;
    }
    namelen = cptr - tmpname + 1;
  }
  if (strchr(tmpname, '=')) {
    ffpmsg("Illegal keyword name; contains an equals sign (=)");
    ffpmsg(tmpname);
    return (*status = 207);
  }
  if (namelen <= 8 && fftkey(tmpname, &tstatus) <= 0) {
    strcat(card, tmpname);
    for (ii = namelen; ii < 8; ii++)
      card[ii] = ' ';
    card[8] = '=';
    card[9] = ' ';
    card[10] = '\0';
    namelen = 10;
  } else if ((((tmpname)[0] < ("HIERARCH ")[0] ? -1 : (tmpname)[0] > ("HIERARCH ")[0] ? 1 : strncmp((tmpname), ("HIERARCH "), (9))) == 0) || (((tmpname)[0] < ("hierarch ")[0] ? -1 : (tmpname)[0] > ("hierarch ")[0] ? 1 : strncmp((tmpname), ("hierarch "), (9))) == 0)) {
    strcat(card, tmpname);
    if (namelen + 3 + len > 80) {
      strcat(card, "= ");
      namelen += 2;
    } else {
      strcat(card, " = ");
      namelen += 3;
    }
  } else {
    strncat(tmpname2, tmpname, 75 - 1);
    cptr = strtok(tmpname2, " ");
    while (cptr) {
      if (strlen(cptr) > maxlen)
        maxlen = strlen(cptr);
      tstatus = -1;
      if (fftkey(cptr, &tstatus) > 0)
        specialchar = 1;
      cptr = strtok(NULL, " ");
      ntoken++;
    }
    tstatus = -1;
    if (ntoken > 0) {
      if (namelen + 11 > 81 - 1) {
        ffpmsg("The following keyword is too long to fit on a card:");
        ffpmsg(keyname);
        return (*status = 207);
      }
      strcat(card, "HIERARCH ");
      strcat(card, tmpname);
      namelen += 9;
      if (namelen + 3 + len > 80) {
        strcat(card, "= ");
        namelen += 2;
      } else {
        strcat(card, " = ");
        namelen += 3;
      }
    } else if ((fftkey(tmpname, &tstatus) <= 0)) {
      strncat(card, tmpname, 75 - 1);
      strcat(card, "= ");
      namelen += 2;
    } else {
      ffpmsg("Illegal keyword name:");
      ffpmsg(tmpname);
      return (*status = 207);
    }
  }
  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);
      }
    }
  }
  if (ntoken == 1 || specialchar == 1) {
    ffpmsg("Warning: the following keyword does not conform to the HIERARCH convention");
    ffpmsg(card);
  }
  return (*status);
}
```