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

```asm
<write_ft_info>:
  endbr64
  push   %r15
  lea    -0x41(%rsi),%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  cmp    $0x16,%al
  ja     L58
  lea    D40(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L58:
  movsbl %sil,%esi
  lea    D24(%rip),%rdi
  xor    %r15d,%r15d
  xor    %ebx,%ebx
  call   <printf@plt>
  mov    $0x1,%edi
  xor    %r14d,%r14d
  call   <exit@plt>
  xor    %r9d,%r9d
L21:
  lea    D0(%rip),%r12
  mov    %rbp,%rdi
  lea    D9(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdx
  mov    %r9d,0xc(%rsp)
  call   <fprintf@plt>
  sub    $0x8,%rsp
  mov    %r15d,%r8d
  mov    %r14d,%ecx
  push   %rbx
  mov    0x1c(%rsp),%r9d
  mov    %r12,%rdx
  mov    %rbp,%rdi
  lea    D39(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rdi
  mov    %r13d,%ecx
  lea    D67(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  add    $0x28,%rsp
  mov    %r12,%rdx
  mov    %rbp,%rdi
  pop    %rbx
  lea    D35(%rip),%rsi
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <fprintf@plt>
  nopw   0x0(%rax,%rax,1)
  mov    $0x100,%ebx
  mov    $0x6,%r13d
  mov    $0x80,%r9d
  mov    $0x100,%r15d
  mov    $0x100,%r14d
  jmp    L21
  nopw   0x0(%rax,%rax,1)
  mov    $0x200,%ebx
  mov    $0x14,%r13d
  mov    $0x100,%r9d
  mov    $0x100,%r15d
  mov    $0x200,%r14d
  jmp    L21
  nopw   0x0(%rax,%rax,1)
  mov    $0x200,%ebx
  mov    $0x14,%r13d
  mov    $0x200,%r9d
  mov    $0x200,%r15d
  mov    $0x200,%r14d
  jmp    L21
  nopw   0x0(%rax,%rax,1)
  mov    $0x40,%ebx
  mov    $0x6,%r13d
  mov    $0x40,%r9d
  mov    $0x40,%r15d
  mov    $0x40,%r14d
  jmp    L21
  nopw   0x0(%rax,%rax,1)
  mov    $0x80,%ebx
  mov    $0x6,%r13d
  mov    $0x20,%r9d
  mov    $0x80,%r15d
  mov    $0x80,%r14d
  jmp    L21
```

tool_calls: name: disassemble_data
arguments: label: D24
data_type: string
name: disassemble_data
arguments: label: D0
data_type: string
name: disassemble_data
arguments: label: D9
data_type: string
name: disassemble_data
arguments: label: D39
data_type: string
name: disassemble_data
arguments: label: D67
data_type: string
name: disassemble_data
arguments: label: D35
data_type: string

tool: D24: setparams: Internal error: invalid class type %c


tool: D0:         

tool: D9: %sinteger nx, ny, nz, maxdim, niter_default, ntotal


tool: D39: %sparameter (nx=%d, ny=%d, nz=%d, maxdim=%d)


tool: D67: %sparameter (niter_default=%d)


tool: D35: %sparameter (ntotal=nx*ny*nz)


assistant: ```c
void write_ft_info(FILE *fp, char class) {
  int nx, ny, nz, maxdim, niter;
  if (class == 'S') {
    nx = 64;
    ny = 64;
    nz = 64;
    niter = 6;
  } else if (class == 'W') {
    nx = 128;
    ny = 128;
    nz = 32;
    niter = 6;
  } else if (class == 'A') {
    nx = 256;
    ny = 256;
    nz = 128;
    niter = 6;
  } else if (class == 'B') {
    nx = 512;
    ny = 256;
    nz = 256;
    niter = 20;
  } else if (class == 'C') {
    nx = 512;
    ny = 512;
    nz = 512;
    niter = 20;
  } else {
    printf("setparams: Internal error: invalid class type %c\n", class);
    exit(1);
  }
  maxdim = nx;
  if (ny > maxdim)
    maxdim = ny;
  if (nz > maxdim)
    maxdim = nz;
  fprintf(fp, "%sinteger nx, ny, nz, maxdim, niter_default, ntotal\n", "        ");
  fprintf(fp, "%sparameter (nx=%d, ny=%d, nz=%d, maxdim=%d)\n", "        ", nx, ny, nz, maxdim);
  fprintf(fp, "%sparameter (niter_default=%d)\n", "        ", niter);
  fprintf(fp, "%sparameter (ntotal=nx*ny*nz)\n", "        ");
}
```