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

```asm
<ffbnfm>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %rsi,0x8(%rsp)
  mov    %r8,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  mov    (%r8),%eax
  test   %eax,%eax
  jg     L175
  mov    %rdi,%rbp
  mov    %rdx,%r14
  mov    %rcx,%r15
  test   %rsi,%rsi
  je     L344
  movl   $0x0,(%rsi)
L344:
  test   %r14,%r14
  je     L102
  movq   $0x0,(%r14)
L102:
  test   %r15,%r15
  je     L269
  movq   $0x0,(%r15)
L269:
  mov    %rbp,%rdi
  call   <strlen@plt>
  test   %rax,%rax
  je     L85
  mov    $0x0,%esi
L327:
  cmpb   $0x20,0x0(%rbp,%rsi,1)
  jne    L157
  add    $0x1,%rsi
  cmp    %rsi,%rax
  jne    L327
L85:
  lea    D17(%rip),%rdi
  call   <ffpmsg@plt>
  mov    (%rsp),%rax
  movl   $0x105,(%rax)
  mov    $0x105,%eax
  jmp    L175
L157:
  cmp    %rsi,%rax
  je     L85
  add    %rbp,%rsi
  lea    0x20(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rdi
  call   <ffupch@plt>
  mov    $0x0,%r12d
  jmp    L234
L273:
  add    $0x1,%r12
L234:
  mov    %rbx,%r13
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L273
  test   %r12,%r12
  jne    L388
  movq   $0x1,0x18(%rsp)
L13:
  movzbl 0x0(%r13),%eax
  sub    $0x50,%eax
  cmp    $0x1,%al
  jbe    L328
  movzbl 0x0(%r13),%eax
  mov    $0x0,%ebx
  cmp    $0x55,%al
  je     L21
L143:
  sub    $0x41,%eax
  cmp    $0x17,%al
  ja     L63
  movzbl %al,%eax
  lea    D35(%rip),%rdx
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L388:
  lea    0x18(%rsp),%rdx
  lea    0x20(%rsp),%rdi
  lea    D46(%rip),%rsi
  call   <sscanf@plt>
  jmp    L13
L328:
  lea    0x1(%r13),%rdx
  movzbl 0x1(%r13),%eax
  cmp    $0x55,%al
  je     L163
  mov    %rdx,%r13
  mov    $0x1,%ebx
  jmp    L143
  mov    $0x4,%edx
  mov    $0x29,%eax
L213:
  mov    %rdx,0x10(%rsp)
  test   %ebx,%ebx
  je     L387
L354:
  neg    %eax
L387:
  mov    0x8(%rsp),%rcx
  test   %rcx,%rcx
  je     L283
  mov    %eax,(%rcx)
L283:
  test   %r14,%r14
  je     L199
  mov    0x18(%rsp),%rax
  mov    %rax,(%r14)
L199:
  test   %r15,%r15
  je     L116
  mov    0x10(%rsp),%rax
  mov    %rax,(%r15)
L116:
  mov    (%rsp),%rax
  mov    (%rax),%eax
L175:
  mov    0xc8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L307
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  mov    $0x8,%edx
  mov    $0x51,%eax
  jmp    L213
  mov    $0x4,%edx
  mov    $0x2a,%eax
  jmp    L213
  mov    $0x8,%edx
  mov    $0x52,%eax
  jmp    L213
  movzbl 0x1(%r13),%eax
  test   %al,%al
  je     L330
  cmp    $0x28,%al
  sete   %al
  movzbl %al,%eax
  lea    0x10(%rsp),%rdx
  lea    0x1(%r13,%rax,1),%rdi
  lea    D46(%rip),%rsi
  call   <sscanf@plt>
  cmp    $0x1,%eax
  je     L33
L330:
  mov    0x18(%rsp),%rdx
  mov    $0x10,%eax
  jmp    L213
L33:
  test   %ebx,%ebx
  jne    L31
  mov    $0x10,%eax
  mov    0x18(%rsp),%rcx
  cmp    %rcx,0x10(%rsp)
  jle    L387
  jmp    L330
  mov    $0x1,%edx
  mov    $0xe,%eax
  jmp    L213
  mov    $0x1,%edx
  mov    $0x1,%eax
  jmp    L213
  mov    $0x1,%edx
  mov    $0xb,%eax
  jmp    L213
  mov    $0x1,%edx
  mov    $0xc,%eax
  jmp    L213
  mov    $0x8,%edx
  mov    $0x53,%eax
  jmp    L213
  mov    $0x10,%edx
  mov    $0xa3,%eax
  jmp    L213
L63:
  lea    0x70(%rsp),%rbx
  mov    %rbp,%rcx
  lea    D28(%rip),%rdx
  mov    $0x51,%esi
  mov    %rbx,%rdi
  call   <snprintf@plt>
  mov    %rbx,%rdi
  call   <ffpmsg@plt>
  mov    (%rsp),%rax
  movl   $0x106,(%rax)
  mov    $0x106,%eax
  jmp    L175
  mov    $0x2,%edx
  mov    $0x15,%eax
  jmp    L213
  mov    $0x4,%edx
  mov    $0x28,%eax
  jmp    L213
L31:
  mov    $0x10,%eax
  jmp    L354
L163:
  movq   $0x2,0x10(%rsp)
  mov    $0x14,%eax
  jmp    L354
L21:
  movq   $0x2,0x10(%rsp)
  mov    $0x14,%eax
  jmp    L387
L307:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D17
datatype: string
name: disassemble_data
arguments: tag: D46
datatype: string
name: disassemble_data
arguments: tag: D28
datatype: string

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

tool: D46: %ld

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

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);
  }
  strcpy(temp, &tform[ii]);
  ffupch(temp);
  form = temp;
  ii = 0;
  while (isdigit((int)form[ii]))
    ii++;
  if (ii == 0)
    repeat = 1;
  else
    sscanf(form, "%ld", &repeat);
  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] == '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);
}
```