user: Please show me the C implementation that matches the assembly code listed below:

```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    $0x8,%rsp
  cmp    $0x16,%al
  ja     L50
  lea    D29(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L50:
  movsbl %sil,%esi
  lea    D4(%rip),%rdi
  xor    %ebx,%ebx
  xor    %r15d,%r15d
  call   <printf@plt>
  mov    $0x1,%edi
  xor    %r13d,%r13d
  xor    %r14d,%r14d
  call   <exit@plt>
  xor    %edx,%edx
L52:
  mov    %rbp,%rdi
  lea    D54(%rip),%rsi
  call   <fprintf@plt>
  mov    %ebx,%edx
  mov    %rbp,%rdi
  lea    D26(%rip),%rsi
  call   <fprintf@plt>
  mov    %r15d,%edx
  mov    %rbp,%rdi
  lea    D74(%rip),%rsi
  call   <fprintf@plt>
  mov    %r14d,%edx
  mov    %rbp,%rdi
  lea    D43(%rip),%rsi
  call   <fprintf@plt>
  mov    %r12d,%edx
  mov    %rbp,%rdi
  lea    D25(%rip),%rsi
  call   <fprintf@plt>
  add    $0x8,%rsp
  mov    %r13d,%edx
  mov    %rbp,%rdi
  pop    %rbx
  lea    D35(%rip),%rsi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <fprintf@plt>
  nopl   (%rax)
  mov    $0x100,%r14d
  mov    $0x100,%ebx
  mov    $0x100,%edx
  mov    $0x800000,%r13d
  mov    $0x6,%r12d
  mov    $0x80,%r15d
  jmp    L52
  nopw   0x0(%rax,%rax,1)
  mov    $0x200,%r14d
  mov    $0x100,%ebx
  mov    $0x200,%edx
  mov    $0x2000000,%r13d
  mov    $0x14,%r12d
  mov    $0x100,%r15d
  jmp    L52
  nopw   0x0(%rax,%rax,1)
  mov    $0x200,%r14d
  mov    $0x200,%ebx
  mov    $0x200,%edx
  mov    $0x8000000,%r13d
  mov    $0x14,%r12d
  mov    $0x200,%r15d
  jmp    L52
  nopw   0x0(%rax,%rax,1)
  mov    $0x40,%r14d
  mov    $0x40,%ebx
  mov    $0x40,%edx
  mov    $0x40000,%r13d
  mov    $0x6,%r12d
  mov    $0x40,%r15d
  jmp    L52
  nopw   0x0(%rax,%rax,1)
  mov    $0x80,%r14d
  mov    $0x80,%ebx
  mov    $0x80,%edx
  mov    $0x80000,%r13d
  mov    $0x6,%r12d
  mov    $0x20,%r15d
  jmp    L52
```

tool_calls: name: unpack_data
arguments: data_label: D4
datatype: string
name: unpack_data
arguments: data_label: D54
datatype: string
name: unpack_data
arguments: data_label: D26
datatype: string
name: unpack_data
arguments: data_label: D74
datatype: string
name: unpack_data
arguments: data_label: D43
datatype: string
name: unpack_data
arguments: data_label: D25
datatype: string
name: unpack_data
arguments: data_label: D35
datatype: string

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


tool: D54: #define	NX	%d


tool: D26: #define	NY	%d


tool: D74: #define	NZ	%d


tool: D43: #define	MAXDIM	%d


tool: D25: #define	NITER_DEFAULT	%d


tool: D35: #define	NTOTAL	%d


assistant: ```c
void write_ft_info(FILE *fp, char class) {
  int nx, ny, nz, maxdim, niter, np_min;
  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, "#define\tNX\t%d\n", nx);
  fprintf(fp, "#define\tNY\t%d\n", ny);
  fprintf(fp, "#define\tNZ\t%d\n", nz);
  fprintf(fp, "#define\tMAXDIM\t%d\n", maxdim);
  fprintf(fp, "#define\tNITER_DEFAULT\t%d\n", niter);
  fprintf(fp, "#define\tNTOTAL\t%d\n", nx * ny * nz);
}
```