user: 请从给定的汇编指令推导出C源代码：

```asm
<ffpsvc>:
  endbr64
  mov    (%rcx),%eax
  test   %eax,%eax
  jg     L216
  push   %r15
  mov    %rcx,%r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  sub    $0x18,%rsp
  movb   $0x0,(%rsi)
  test   %rdx,%rdx
  je     L156
  movb   $0x0,(%rdx)
L156:
  mov    %r13,%rdi
  call   <strlen@plt>
  cmpb   $0x48,0x0(%r13)
  mov    %rax,%rbx
  je     L238
L496:
  cmp    $0x8,%rbx
  jbe    L94
  movzbl 0x0(%r13),%eax
  cmp    $0x43,%al
  je     L280
L439:
  cmp    $0x48,%al
  je     L34
L384:
  cmp    $0x45,%al
  je     L586
L148:
  cmp    $0x20,%al
  je     L107
L446:
  cmpb   $0x3d,0x8(%r13)
  je     L475
L139:
  test   %rbp,%rbp
  jne    L267
L94:
  mov    (%r15),%eax
L312:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L216:
  ret
  nopl   0x0(%rax)
L267:
  lea    0x8(%r13),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  sub    $0x9,%ebx
  js     L94
  movslq %ebx,%rax
  jmp    L404
  cs nopw 0x0(%rax,%rax,1)
L131:
  movb   $0x0,0x0(%rbp,%rax,1)
  sub    $0x1,%rax
  test   %eax,%eax
  js     L94
L404:
  cmpb   $0x20,0x0(%rbp,%rax,1)
  je     L131
  jmp    L94
  cs nopw 0x0(%rax,%rax,1)
L475:
  lea    0x8(%r13),%rdi
  mov    $0x2,%edx
  lea    D23(%rip),%rsi
  mov    $0xa,%r14d
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L139
L546:
  lea    D57(%rip),%r8
  lea    0x0(%r13,%r14,1),%rdi
  mov    %r8,%rsi
  call   <strspn@plt>
  lea    D57(%rip),%r8
  add    %rax,%r14
  cmp    %rbx,%r14
  je     L94
  lea    0x0(%r13,%r14,1),%r9
  movzbl (%r9),%eax
  cmp    $0x2f,%al
  je     L58
  cmp    $0x27,%al
  je     L466
  cmp    $0x28,%al
  jne    L449
  mov    %r9,%rdi
  lea    D79(%rip),%rsi
  mov    %r9,0x8(%rsp)
  call   <strcspn@plt>
  mov    0x8(%rsp),%rdi
  mov    %rax,%rbx
  call   <strlen@plt>
  mov    0x8(%rsp),%r9
  cmp    %rbx,%rax
  je     L415
  lea    0x1(%rbx),%rdx
  mov    %r9,%rsi
  mov    %r12,%rdi
  mov    %rdx,0x8(%rsp)
  call   <strncpy@plt>
  mov    0x8(%rsp),%rdx
  movb   $0x0,0x1(%r12,%rbx,1)
  lea    D57(%rip),%r8
  add    %rdx,%r14
L71:
  test   %rbp,%rbp
  je     L94
  lea    0x0(%r13,%r14,1),%rdi
  mov    %r8,%rsi
  call   <strspn@plt>
  add    %rax,%r14
  cmp    $0x4f,%r14
  ja     L94
  lea    0x0(%r13,%r14,1),%rsi
  cmpb   $0x2f,(%rsi)
  je     L537
L561:
  mov    %rbp,%rdi
  call   <strcat@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ecx
  sub    $0x1,%ecx
  js     L94
  cltq
  movslq %ecx,%rdx
  mov    %ecx,%ecx
  lea    -0x2(%rbp,%rax,1),%rax
  add    %rbp,%rdx
  sub    %rcx,%rax
  jmp    L261
  nopl   0x0(%rax,%rax,1)
L335:
  movb   $0x0,(%rdx)
  sub    $0x1,%rdx
  cmp    %rdx,%rax
  je     L94
L261:
  cmpb   $0x20,(%rdx)
  je     L335
  jmp    L94
  nopw   0x0(%rax,%rax,1)
L238:
  mov    $0x9,%edx
  lea    D24(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L496
  lea    D105(%rip),%rsi
  mov    %r13,%rdi
  call   <strcspn@plt>
  lea    0x1(%rax),%r14
  cmp    %rax,%rbx
  jne    L546
  cmp    $0x8,%rbx
  jbe    L94
  test   %rbp,%rbp
  je     L94
  lea    0x8(%r13),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  mov    %ebx,%eax
  sub    $0x9,%eax
  js     L94
  cltq
  jmp    L256
  xchg   %ax,%ax
L161:
  movb   $0x0,0x0(%rbp,%rax,1)
  sub    $0x1,%rax
  test   %eax,%eax
  js     L94
L256:
  cmpb   $0x20,0x0(%rbp,%rax,1)
  je     L161
  jmp    L94
  nopl   (%rax)
L226:
  cmp    %r14,%rbx
  je     L463
  cltq
  movb   $0x0,0x1(%r12,%rax,1)
L58:
  add    $0x1,%r14
  jmp    L71
  nopw   0x0(%rax,%rax,1)
L280:
  mov    $0x8,%edx
  lea    D158(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L139
  movzbl 0x0(%r13),%eax
  jmp    L439
  cs nopw 0x0(%rax,%rax,1)
L34:
  mov    $0x8,%edx
  lea    D62(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L139
  movzbl 0x0(%r13),%eax
  jmp    L384
  cs nopw 0x0(%rax,%rax,1)
L586:
  mov    $0x8,%edx
  lea    D103(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L139
  movzbl 0x0(%r13),%eax
  jmp    L148
  cs nopw 0x0(%rax,%rax,1)
L107:
  mov    $0x8,%edx
  lea    D83(%rip),%rsi
  mov    %r13,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  jne    L446
  jmp    L139
  nopl   0x0(%rax)
L466:
  add    $0x1,%r14
  movb   $0x27,(%r12)
  mov    $0x1,%eax
  cmp    %r14,%rbx
  ja     L431
  jmp    L226
L251:
  movslq %eax,%rcx
  add    $0x1,%r14
  add    $0x1,%eax
  mov    %dl,(%r12,%rcx,1)
  cmp    %r14,%rbx
  jbe    L226
L431:
  movzbl 0x0(%r13,%r14,1),%edx
  cmp    $0x27,%dl
  jne    L251
  lea    0x1(%r14),%rcx
  movslq %eax,%rdx
  lea    0x0(%r13,%rcx,1),%rsi
  add    %r12,%rdx
  cmpb   $0x27,(%rsi)
  movb   $0x27,(%rdx)
  jne    L226
  movzbl (%rsi),%edx
  add    $0x1,%eax
  mov    %rcx,%r14
  jmp    L251
  nopl   0x0(%rax,%rax,1)
L449:
  mov    %r9,%rdi
  lea    D143(%rip),%rsi
  mov    %r9,0x8(%rsp)
  call   <strcspn@plt>
  mov    0x8(%rsp),%rsi
  mov    %r12,%rdi
  mov    %rax,%rbx
  mov    %rax,%rdx
  call   <strncpy@plt>
  add    %rbx,%r14
  movb   $0x0,(%r12,%rbx,1)
  lea    D57(%rip),%r8
  jmp    L71
L537:
  lea    0x1(%r13,%r14,1),%rsi
  cmpb   $0x20,(%rsi)
  jne    L561
  lea    0x2(%r13,%r14,1),%rsi
  jmp    L561
L463:
  mov    $0x45,%edx
  lea    D28(%rip),%rdi
  cmp    %edx,%eax
  cmovg  %edx,%eax
  cltq
  movb   $0x27,(%r12,%rax,1)
  movb   $0x0,0x1(%r12,%rax,1)
  call   <ffpmsg@plt>
  mov    %r13,%rdi
  call   <ffpmsg@plt>
  lea    D57(%rip),%r8
  jmp    L71
L415:
  lea    D54(%rip),%rdi
  call   <ffpmsg@plt>
  mov    %r13,%rdi
  call   <ffpmsg@plt>
  movl   $0xcd,(%r15)
  mov    $0xcd,%eax
  jmp    L312
```

tool_calls: name: unpack_data
arguments: data_label: D23
type: string
name: unpack_data
arguments: data_label: D57
type: string
name: unpack_data
arguments: data_label: D79
type: string
name: unpack_data
arguments: data_label: D24
type: string
name: unpack_data
arguments: data_label: D105
type: string
name: unpack_data
arguments: data_label: D158
type: string
name: unpack_data
arguments: data_label: D62
type: string
name: unpack_data
arguments: data_label: D103
type: string
name: unpack_data
arguments: data_label: D83
type: string
name: unpack_data
arguments: data_label: D143
type: string
name: unpack_data
arguments: data_label: D28
type: string
name: unpack_data
arguments: data_label: D54
type: string

tool: D23: = 

tool: D57:  

tool: D79: )

tool: D24: HIERARCH 

tool: D105: =

tool: D158: COMMENT 

tool: D62: HISTORY 

tool: D103: END     

tool: D83:         

tool: D143:  /

tool: D28: This keyword string value has no closing quote:

tool: D54: This complex keyword value has no closing ')':

assistant: ```c
int ffpsvc(char *card, char *value, char *comm, int *status) {
  int jj;
  size_t ii, cardlen, nblank, valpos;
  if (*status > 0)
    return (*status);
  value[0] = '\0';
  if (comm)
    comm[0] = '\0';
  cardlen = strlen(card);
  if (((card)[0] < ("HIERARCH ")[0] ? -1 : (card)[0] > ("HIERARCH ")[0] ? 1 : strncmp((card), ("HIERARCH "), (9))) == 0) {
    valpos = strcspn(card, "=");
    if (valpos == cardlen) {
      if (comm != NULL) {
        if (cardlen > 8) {
          strcpy(comm, &card[8]);
          jj = cardlen - 8;
          for (jj--; jj >= 0; jj--) {
            if (comm[jj] == ' ')
              comm[jj] = '\0';
            else
              break;
          }
        }
      }
      return (*status);
    }
    valpos++;
  } else if (cardlen < 9 || ((card)[0] < ("COMMENT ")[0] ? -1 : (card)[0] > ("COMMENT ")[0] ? 1 : strncmp((card), ("COMMENT "), (8))) == 0 || ((card)[0] < ("HISTORY ")[0] ? -1 : (card)[0] > ("HISTORY ")[0] ? 1 : strncmp((card), ("HISTORY "), (8))) == 0 || ((card)[0] < ("END     ")[0] ? -1 : (card)[0] > ("END     ")[0] ? 1 : strncmp((card), ("END     "), (8))) == 0 || ((card)[0] < ("        ")[0] ? -1 : (card)[0] > ("        ")[0] ? 1 : strncmp((card), ("        "), (8))) == 0 || ((&card[8])[0] < ("= ")[0] ? -1 : (&card[8])[0] > ("= ")[0] ? 1 : strncmp((&card[8]), ("= "), (2))) != 0) {
    if (comm != NULL) {
      if (cardlen > 8) {
        strcpy(comm, &card[8]);
        jj = cardlen - 8;
        for (jj--; jj >= 0; jj--) {
          if (comm[jj] == ' ')
            comm[jj] = '\0';
          else
            break;
        }
      }
    }
    return (*status);
  } else {
    valpos = 10;
  }
  nblank = strspn(&card[valpos], " ");
  if (nblank + valpos == cardlen) {
    return (*status);
  }
  ii = valpos + nblank;
  if (card[ii] == '/') {
    ii++;
  } else if (card[ii] == '\'') {
    value[0] = card[ii];
    for (jj = 1, ii++; ii < cardlen; ii++, jj++) {
      if (card[ii] == '\'') {
        if (card[ii + 1] == '\'') {
          value[jj] = card[ii];
          ii++;
          jj++;
        } else {
          value[jj] = card[ii];
          break;
        }
      }
      value[jj] = card[ii];
    }
    if (ii == cardlen) {
      jj = ((jj) < (69) ? (jj) : (69));
      value[jj] = '\'';
      value[jj + 1] = '\0';
      ffpmsg("This keyword string value has no closing quote:");
      ffpmsg(card);
    } else {
      value[jj + 1] = '\0';
      ii++;
    }
  } else if (card[ii] == '(') {
    nblank = strcspn(&card[ii], ")");
    if (nblank == strlen(&card[ii])) {
      ffpmsg("This complex keyword value has no closing ')':");
      ffpmsg(card);
      return (*status = 205);
    }
    nblank++;
    strncpy(value, &card[ii], nblank);
    value[nblank] = '\0';
    ii = ii + nblank;
  } else {
    nblank = strcspn(&card[ii], " /");
    strncpy(value, &card[ii], nblank);
    value[nblank] = '\0';
    ii = ii + nblank;
  }
  if (comm) {
    nblank = strspn(&card[ii], " ");
    ii = ii + nblank;
    if (ii < 80) {
      if (card[ii] == '/') {
        ii++;
        if (card[ii] == ' ')
          ii++;
      }
      strcat(comm, &card[ii]);
      jj = strlen(comm);
      for (jj--; jj >= 0; jj--) {
        if (comm[jj] == ' ')
          comm[jj] = '\0';
        else
          break;
      }
    }
  }
  return (*status);
}
```