user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<ffbnfm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %r8,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  mov    (%r8),%eax
  test   %eax,%eax
  jg     L216
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %rdx,%r13
  mov    %rcx,%r14
  test   %rsi,%rsi
  je     L382
  movl   $0x0,(%rsi)
L382:
  test   %r13,%r13
  je     L528
  movq   $0x0,0x0(%r13)
L528:
  test   %r14,%r14
  je     L474
  movq   $0x0,(%r14)
L474:
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %rax,%rax
  je     L155
  xor    %esi,%esi
  jmp    L82
  nopw   0x0(%rax,%rax,1)
L271:
  add    $0x1,%rsi
  cmp    %rsi,%rax
  je     L155
L82:
  cmpb   $0x20,(%r12,%rsi,1)
  je     L271
  sub    %rsi,%rax
  cmp    $0x46,%rax
  ja     L131
  lea    0x20(%rsp),%rax
  add    %r12,%rsi
  mov    %rax,%rbx
  mov    %rax,%rdi
  mov    %rax,0x8(%rsp)
  call   <strcpy@plt>
  mov    %rbx,%rdi
  call   <ffupch@plt>
  mov    %rbx,%rax
  xor    %ebx,%ebx
  jmp    L214
  nopl   0x0(%rax,%rax,1)
L196:
  add    $0x1,%rbx
L214:
  movsbl (%rax),%edi
  mov    %rax,%r15
  call   <isdigit@plt>
  mov    %rax,%r8
  lea    0x1(%r15),%rax
  test   %r8,%r8
  jne    L196
  test   %rbx,%rbx
  jne    L561
  movq   $0x1,0x18(%rsp)
L416:
  movzbl (%r15),%eax
  lea    -0x50(%rax),%edx
  cmp    $0x1,%dl
  jbe    L542
  cmp    $0x55,%al
  je     L168
  sub    $0x41,%eax
  cmp    $0x17,%al
  ja     L393
  lea    D31(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L168:
  movq   $0x2,0x10(%rsp)
  mov    $0x14,%eax
L442:
  test   %rbp,%rbp
  je     L336
  mov    %eax,0x0(%rbp)
L336:
  test   %r13,%r13
  je     L493
  mov    0x18(%rsp),%rax
  mov    %rax,0x0(%r13)
L493:
  test   %r14,%r14
  je     L518
  mov    0x10(%rsp),%rax
  mov    %rax,(%r14)
L518:
  mov    (%rsp),%rax
  mov    (%rax),%eax
L216:
  mov    0xc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L169
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L131:
  lea    D71(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%rsp),%rax
  movl   $0x105,(%rax)
  mov    $0x105,%eax
  jmp    L216
  nopl   (%rax)
L542:
  movzbl 0x1(%r15),%eax
  lea    0x1(%r15),%rsi
  cmp    $0x55,%al
  je     L118
  sub    $0x41,%eax
  cmp    $0x17,%al
  ja     L393
  lea    D28(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L561:
  mov    0x8(%rsp),%rdi
  lea    0x18(%rsp),%rdx
  lea    D17(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L416
  lea    D39(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%rsp),%rax
  movl   $0x105,(%rax)
  mov    $0x105,%eax
  jmp    L216
  nop
L118:
  movq   $0x2,0x10(%rsp)
  mov    $0x14,%eax
  neg    %eax
  jmp    L442
  nopl   (%rax)
L393:
  lea    0x70(%rsp),%rbp
  mov    %r12,%rcx
  mov    $0x51,%esi
  lea    D51(%rip),%rdx
  mov    %rbp,%rdi
  call   <snprintf@plt>
  mov    %rbp,%rdi
  call   <ffpmsg@plt>
  mov    (%rsp),%rax
  movl   $0x106,(%rax)
  mov    $0x106,%eax
  jmp    L216
  xor    %ebx,%ebx
L350:
  mov    $0x1,%edx
  mov    $0x1,%eax
  nopl   0x0(%rax)
L9:
  mov    %rdx,0x10(%rsp)
  test   %ebx,%ebx
  je     L442
  neg    %eax
  jmp    L442
  xor    %ebx,%ebx
L73:
  mov    $0x8,%edx
  mov    $0x50,%eax
  jmp    L9
  xor    %ebx,%ebx
L275:
  mov    $0x4,%edx
  mov    $0x28,%eax
  jmp    L9
  xor    %ebx,%ebx
L594:
  mov    $0x1,%edx
  mov    $0xc,%eax
  jmp    L9
  xor    %ebx,%ebx
L475:
  mov    $0x10,%edx
  mov    $0xa3,%eax
  jmp    L9
  xor    %ebx,%ebx
L446:
  mov    $0x1,%edx
  mov    $0xe,%eax
  jmp    L9
  xor    %ebx,%ebx
L397:
  mov    $0x8,%edx
  mov    $0x51,%eax
  jmp    L9
  xor    %ebx,%ebx
L539:
  mov    $0x4,%edx
  mov    $0x29,%eax
  jmp    L9
  xor    %ebx,%ebx
L358:
  mov    $0x4,%edx
  mov    $0x2a,%eax
  jmp    L9
  xor    %ebx,%ebx
L79:
  mov    $0x8,%edx
  mov    $0x52,%eax
  jmp    L9
  xor    %ebx,%ebx
L524:
  mov    $0x8,%edx
  mov    $0x53,%eax
  jmp    L9
  xor    %ebx,%ebx
L136:
  mov    $0x1,%edx
  mov    $0xb,%eax
  jmp    L9
  xor    %ebx,%ebx
L501:
  movzbl 0x1(%r15),%eax
  test   %al,%al
  je     L604
  cmp    $0x28,%al
  lea    0x10(%rsp),%rdx
  lea    D17(%rip),%rsi
  sete   %al
  movzbl %al,%eax
  lea    0x1(%r15,%rax,1),%rdi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L201
L604:
  mov    0x18(%rsp),%rdx
  mov    $0x10,%eax
  jmp    L9
  movq   $0x2,0x10(%rsp)
  mov    $0x15,%eax
  jmp    L442
  mov    $0x1,%ebx
  jmp    L475
  mov    $0x1,%ebx
  jmp    L446
  mov    $0x1,%ebx
  jmp    L397
  mov    $0x1,%ebx
  jmp    L539
  mov    $0x1,%ebx
  jmp    L358
  mov    $0x1,%ebx
  jmp    L79
  mov    $0x1,%ebx
  jmp    L524
  mov    $0x1,%ebx
  jmp    L350
  mov    $0x1,%ebx
  jmp    L73
  mov    $0x1,%ebx
  jmp    L275
  mov    $0x1,%ebx
  jmp    L594
  mov    $0x1,%ebx
  jmp    L136
  mov    %rsi,%r15
  mov    $0x1,%ebx
  jmp    L501
  movq   $0x2,0x10(%rsp)
  mov    $0x15,%eax
  neg    %eax
  jmp    L442
  nopl   0x0(%rax,%rax,1)
L155:
  lea    D2(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%rsp),%rax
  movl   $0x105,(%rax)
  mov    $0x105,%eax
  jmp    L216
L201:
  mov    $0xfffffff0,%eax
  test   %ebx,%ebx
  jne    L442
  mov    0x18(%rsp),%rax
  cmp    %rax,0x10(%rsp)
  jg     L604
  mov    $0x10,%eax
  jmp    L442
L169:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D71
data_type: string
name: parse_data
arguments: label: D17
data_type: string
name: parse_data
arguments: label: D39
data_type: string
name: parse_data
arguments: label: D51
data_type: string
name: parse_data
arguments: label: D2
data_type: string

tool: D71: Error: binary table TFORM code is too long (ffbnfm).

tool: D17: %ld

tool: D39: Error: Bad repeat format in TFORM (ffbnfm).

tool: D51: Illegal binary table TFORMn datatype: '%s' 

tool: D2: Error: binary table TFORM code is blank (ffbnfm).

assistant: ```c
int ffbnfm(char *tform, int *dtcode, long *trepeat, long *twidth, int *status) {
  size_t ii, nchar;
  int datacode, variable, iread;
  long width, repeat;
  char *form, temp[71], message[81];
  if (*status > 0)
    return (*status);
  if (dtcode)
    *dtcode = 0;
  if (trepeat)
    *trepeat = 0;
  if (twidth)
    *twidth = 0;
  nchar = strlen(tform);
  for (ii = 0; ii < nchar; ii++) {
    if (tform[ii] != ' ')
      break;
  }
  if (ii == nchar) {
    ffpmsg("Error: binary table TFORM code is blank (ffbnfm).");
    return (*status = 261);
  }
  if (nchar - ii > 71 - 1) {
    ffpmsg("Error: binary table TFORM code is too long (ffbnfm).");
    return (*status = 261);
  }
  strcpy(temp, &tform[ii]);
  ffupch(temp);
  form = temp;
  ii = 0;
  while (isdigit((int)form[ii]))
    ii++;
  if (ii == 0)
    repeat = 1;
  else {
    if (sscanf(form, "%ld", &repeat) != 1) {
      ffpmsg("Error: Bad repeat format in TFORM (ffbnfm).");
      return (*status = 261);
    }
  }
  form = form + ii;
  if (form[0] == 'P' || form[0] == 'Q') {
    variable = 1;
    form++;
  } else
    variable = 0;
  if (form[0] == 'U') {
    datacode = 20;
    width = 2;
  } else if (form[0] == 'I') {
    datacode = 21;
    width = 2;
  } else if (form[0] == 'V') {
    datacode = 40;
    width = 4;
  } else if (form[0] == 'W') {
    datacode = 80;
    width = 8;
  } else if (form[0] == 'J') {
    datacode = 41;
    width = 4;
  } else if (form[0] == 'K') {
    datacode = 81;
    width = 8;
  } else if (form[0] == 'E') {
    datacode = 42;
    width = 4;
  } else if (form[0] == 'D') {
    datacode = 82;
    width = 8;
  } else if (form[0] == 'A') {
    datacode = 16;
    iread = 0;
    if (form[1] != 0) {
      if (form[1] == '(')
        form++;
      iread = sscanf(&form[1], "%ld", &width);
    }
    if (iread != 1 || (!variable && (width > repeat)))
      width = repeat;
  } else if (form[0] == 'L') {
    datacode = 14;
    width = 1;
  } else if (form[0] == 'X') {
    datacode = 1;
    width = 1;
  } else if (form[0] == 'B') {
    datacode = 11;
    width = 1;
  } else if (form[0] == 'S') {
    datacode = 12;
    width = 1;
  } else if (form[0] == 'C') {
    datacode = 83;
    width = 8;
  } else if (form[0] == 'M') {
    datacode = 163;
    width = 16;
  } else {
    snprintf(message, 81, "Illegal binary table TFORMn datatype: \'%s\' ", tform);
    ffpmsg(message);
    return (*status = 262);
  }
  if (variable)
    datacode = datacode * (-1);
  if (dtcode)
    *dtcode = datacode;
  if (trepeat)
    *trepeat = repeat;
  if (twidth)
    *twidth = width;
  return (*status);
}
```