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

```asm
<write_lu_info>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,%eax
  mov    %al,-0x40(%rbp)
  cmpb   $0x53,-0x40(%rbp)
  jne    L138
  movl   $0xc,-0x18(%rbp)
  lea    D25(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x32,-0x1c(%rbp)
  jmp    L40
L138:
  cmpb   $0x57,-0x40(%rbp)
  jne    L34
  movl   $0x21,-0x18(%rbp)
  lea    D106(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x12c,-0x1c(%rbp)
  jmp    L40
L34:
  cmpb   $0x41,-0x40(%rbp)
  jne    L16
  movl   $0x40,-0x18(%rbp)
  lea    D28(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0xfa,-0x1c(%rbp)
  jmp    L40
L16:
  cmpb   $0x42,-0x40(%rbp)
  jne    L25
  movl   $0x66,-0x18(%rbp)
  lea    D28(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0xfa,-0x1c(%rbp)
  jmp    L40
L25:
  cmpb   $0x43,-0x40(%rbp)
  jne    L139
  movl   $0xa2,-0x18(%rbp)
  lea    D28(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0xfa,-0x1c(%rbp)
  jmp    L40
L139:
  cmpb   $0x44,-0x40(%rbp)
  jne    L126
  movl   $0x198,-0x18(%rbp)
  lea    D44(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x12c,-0x1c(%rbp)
  jmp    L40
L126:
  cmpb   $0x45,-0x40(%rbp)
  jne    L124
  movl   $0x3fc,-0x18(%rbp)
  lea    D25(%rip),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x12c,-0x1c(%rbp)
  jmp    L40
L124:
  movsbl -0x40(%rbp),%eax
  mov    %eax,%esi
  lea    D108(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L40:
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edi
  call   <isqrt2@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x3c(%rbp),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  imul   -0x10(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  jle    L112
  addl   $0x1,-0x24(%rbp)
L112:
  mov    -0x18(%rbp),%eax
  cltd
  idivl  -0xc(%rbp)
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  imul   -0xc(%rbp),%eax
  cmp    %eax,-0x18(%rbp)
  jle    L118
  addl   $0x1,-0x20(%rbp)
L118:
  mov    -0x3c(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D36(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x10(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D127(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x18(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D20(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x18(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D104(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x18(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D29(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x20(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D78(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x38(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x16,%edx
  mov    $0x1,%esi
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  mov    -0x1c(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D48(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x14(%rbp),%edx
  mov    -0x38(%rbp),%rax
  lea    D72(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x8(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  lea    D133(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D25
type: string
name: parse_data
arguments: data_label: D106
type: string
name: parse_data
arguments: data_label: D28
type: string
name: parse_data
arguments: data_label: D44
type: string
name: parse_data
arguments: data_label: D108
type: string
name: parse_data
arguments: data_label: D36
type: string
name: parse_data
arguments: data_label: D127
type: string
name: parse_data
arguments: data_label: D20
type: string
name: parse_data
arguments: data_label: D104
type: string
name: parse_data
arguments: data_label: D5
type: string
name: parse_data
arguments: data_label: D29
type: string
name: parse_data
arguments: data_label: D78
type: string
name: parse_data
arguments: data_label: D87
type: string
name: parse_data
arguments: data_label: D48
type: string
name: parse_data
arguments: data_label: D72
type: string
name: parse_data
arguments: data_label: D133
type: string

tool: D25: 0.5e0

tool: D106: 1.5e-3

tool: D28: 2.0e0

tool: D44: 1.0e0

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


tool: D36: #define nnodes_compiled  %d


tool: D127: #define nnodes_xdim      %d


tool: D20: #define isiz01  %d


tool: D104: #define isiz02  %d


tool: D5: #define isiz03  %d


tool: D29: #define isiz1  %d


tool: D78: #define isiz2  %d


tool: D87: #define isiz3  isiz03


tool: D48: #define itmax_default  %d


tool: D72: #define inorm_default  %d


tool: D133: #define dt_default  %s


assistant: ```c
void write_lu_info(FILE *fp, int nprocs, char class) {
  int isiz1, isiz2, itmax, inorm, problem_size;
  int xdiv, ydiv;
  char *dt_default;
  if (class == 'S') {
    problem_size = 12;
    dt_default = "0.5e0";
    itmax = 50;
  } else if (class == 'W') {
    problem_size = 33;
    dt_default = "1.5e-3";
    itmax = 300;
  } else if (class == 'A') {
    problem_size = 64;
    dt_default = "2.0e0";
    itmax = 250;
  } else if (class == 'B') {
    problem_size = 102;
    dt_default = "2.0e0";
    itmax = 250;
  } else if (class == 'C') {
    problem_size = 162;
    dt_default = "2.0e0";
    itmax = 250;
  } else if (class == 'D') {
    problem_size = 408;
    dt_default = "1.0e0";
    itmax = 300;
  } else if (class == 'E') {
    problem_size = 1020;
    dt_default = "0.5e0";
    itmax = 300;
  } else {
    printf("setparams: Internal error: invalid class %c\n", class);
    exit(1);
  }
  inorm = itmax;
  xdiv = isqrt2(nprocs);
  ydiv = nprocs / xdiv;
  isiz1 = problem_size / xdiv;
  if (isiz1 * xdiv < problem_size)
    isiz1++;
  isiz2 = problem_size / ydiv;
  if (isiz2 * ydiv < problem_size)
    isiz2++;
  fprintf(fp, "#define nnodes_compiled  %d\n", nprocs);
  fprintf(fp, "#define nnodes_xdim      %d\n", xdiv);
  fprintf(fp, "#define isiz01  %d\n", problem_size);
  fprintf(fp, "#define isiz02  %d\n", problem_size);
  fprintf(fp, "#define isiz03  %d\n", problem_size);
  fprintf(fp, "#define isiz1  %d\n", isiz1);
  fprintf(fp, "#define isiz2  %d\n", isiz2);
  fprintf(fp, "#define isiz3  isiz03\n");
  fprintf(fp, "#define itmax_default  %d\n", itmax);
  fprintf(fp, "#define inorm_default  %d\n", inorm);
  fprintf(fp, "#define dt_default  %s\n", dt_default);
}
```