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

```asm
<write_sp_info>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  mov    %esi,%edi
  push   %rbx
  sub    $0x8,%rsp
  call   <isqrt@plt>
  mov    %eax,%r15d
  cmp    $0x53,%r12b
  je     L29
  lea    -0x41(%r12),%eax
  cmp    $0x16,%al
  ja     L6
  lea    D80(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
L29:
  lea    D118(%rip),%r13
  mov    $0x64,%r14d
  mov    $0xc,%ebx
L7:
  lea    D18(%rip),%r12
  mov    %rbp,%rdi
  lea    D129(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdx
  call   <fprintf@plt>
  mov    %r15d,%ecx
  mov    %r14d,%r9d
  mov    %ebx,%r8d
  mov    %r12,%rdx
  mov    %rbp,%rdi
  lea    D87(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %r12,%rdx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D17(%rip),%rsi
  call   <fprintf@plt>
  add    $0x8,%rsp
  mov    %r13,%rcx
  mov    %r12,%rdx
  pop    %rbx
  mov    %rbp,%rdi
  lea    D71(%rip),%rsi
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <fprintf@plt>
  nopl   0x0(%rax,%rax,1)
L6:
  movsbl %r12b,%esi
  lea    D11(%rip),%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L7
  nopw   0x0(%rax,%rax,1)
  lea    D108(%rip),%r13
  mov    $0x1f4,%r14d
  mov    $0x198,%ebx
  jmp    L7
  nopw   0x0(%rax,%rax,1)
  lea    D98(%rip),%r13
  mov    $0x190,%r14d
  mov    $0xa2,%ebx
  jmp    L7
  nopw   0x0(%rax,%rax,1)
  lea    D82(%rip),%r13
  mov    $0x190,%r14d
  mov    $0x66,%ebx
  jmp    L7
  nopw   0x0(%rax,%rax,1)
  lea    D8(%rip),%r13
  mov    $0x190,%r14d
  mov    $0x24,%ebx
  jmp    L7
  nopw   0x0(%rax,%rax,1)
  lea    D8(%rip),%r13
  mov    $0x190,%r14d
  mov    $0x40,%ebx
  jmp    L7
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D118
type: string
name: extract_symbolic_data
arguments: data_tag: D18
type: string
name: extract_symbolic_data
arguments: data_tag: D129
type: string
name: extract_symbolic_data
arguments: data_tag: D87
type: string
name: extract_symbolic_data
arguments: data_tag: D17
type: string
name: extract_symbolic_data
arguments: data_tag: D71
type: string
name: extract_symbolic_data
arguments: data_tag: D11
type: string
name: extract_symbolic_data
arguments: data_tag: D108
type: string
name: extract_symbolic_data
arguments: data_tag: D98
type: string
name: extract_symbolic_data
arguments: data_tag: D82
type: string
name: extract_symbolic_data
arguments: data_tag: D8
type: string

tool: D118: 0.015d0

tool: D18:         

tool: D129: %sinteger maxcells, problem_size, niter_default


tool: D87: %sparameter (maxcells=%d, problem_size=%d, niter_default=%d)


tool: D17: %sdouble precision dt_default


tool: D71: %sparameter (dt_default = %s)


tool: D11: setparams: Internal error: invalid class %c


tool: D108: 0.00030d0

tool: D98: 0.00067d0

tool: D82: 0.001d0

tool: D8: 0.0015d0

assistant: ```c
void write_sp_info(FILE *fp, int nprocs, char class) {
  int maxcells, problem_size, niter;
  char *dt;
  maxcells = isqrt(nprocs);
  if (class == 'S') {
    problem_size = 12;
    dt = "0.015d0";
    niter = 100;
  } else if (class == 'W') {
    problem_size = 36;
    dt = "0.0015d0";
    niter = 400;
  } else if (class == 'A') {
    problem_size = 64;
    dt = "0.0015d0";
    niter = 400;
  } else if (class == 'B') {
    problem_size = 102;
    dt = "0.001d0";
    niter = 400;
  } else if (class == 'C') {
    problem_size = 162;
    dt = "0.00067d0";
    niter = 400;
  } else if (class == 'D') {
    problem_size = 408;
    dt = "0.00030d0";
    niter = 500;
  } else {
    printf("setparams: Internal error: invalid class %c\n", class);
    exit(1);
  }
  fprintf(fp, "%sinteger maxcells, problem_size, niter_default\n", "        ");
  fprintf(fp, "%sparameter (maxcells=%d, problem_size=%d, niter_default=%d)\n", "        ", maxcells, problem_size, niter);
  fprintf(fp, "%sdouble precision dt_default\n", "        ");
  fprintf(fp, "%sparameter (dt_default = %s)\n", "        ", dt);
}
```