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

```asm
<gen_table>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %edi,-0xa4(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0xa4(%rbp),%eax
  mov    %eax,%esi
  lea    D26(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x8c(%rbp)
  jmp    L305
L22:
  movl   $0x0,-0x98(%rbp)
  jmp    L53
L7:
  mov    -0x8c(%rbp),%edx
  mov    -0x98(%rbp),%eax
  mov    %eax,%esi
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x98(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x98(%rbp),%eax
  sar    %eax
  and    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x98(%rbp),%eax
  sar    $0x2,%eax
  and    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x98(%rbp),%eax
  sar    $0x3,%eax
  and    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  movl   $0x0,-0x70(%rbp)
  jmp    L48
L106:
  movl   $0x0,-0x6c(%rbp)
  jmp    L109
L218:
  movl   $0x0,-0x68(%rbp)
  jmp    L166
L35:
  movl   $0x0,-0x64(%rbp)
  jmp    L320
L37:
  movl   $0x0,-0x90(%rbp)
  jmp    L285
L41:
  mov    -0x90(%rbp),%eax
  cltq
  mov    -0x70(%rbp,%rax,8),%eax
  mov    %eax,-0x88(%rbp)
  mov    -0x90(%rbp),%eax
  cltq
  mov    -0x6c(%rbp,%rax,8),%eax
  mov    %eax,-0x84(%rbp)
  mov    -0x88(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x80(%rbp)
  mov    -0x88(%rbp),%eax
  sar    %eax
  and    $0x1,%eax
  mov    %eax,-0x7c(%rbp)
  mov    -0x84(%rbp),%eax
  and    $0x1,%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x84(%rbp),%eax
  sar    %eax
  and    $0x1,%eax
  mov    %eax,-0x74(%rbp)
  mov    -0x7c(%rbp),%eax
  xor    -0x74(%rbp),%eax
  xor    -0x78(%rbp),%eax
  xor    -0x80(%rbp),%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  sub    $0x18,%rax
  mov    %edx,(%rax)
  mov    -0x90(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  lea    -0x1c(%rax),%rdx
  mov    -0x78(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x78(%rbp),%eax
  xor    -0x80(%rbp),%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%eax
  movslq %eax,%rcx
  mov    %rcx,%rax
  add    %rax,%rax
  add    %rcx,%rax
  shl    $0x2,%rax
  add    %rbp,%rax
  sub    $0x20,%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x90(%rbp)
L285:
  cmpl   $0x1,-0x90(%rbp)
  jle    L41
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  xor    %edx,%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x54(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x14(%rbp),%eax
  not    %eax
  and    %edx,%eax
  and    $0x1,%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  xor    %eax,%edx
  mov    -0x10(%rbp),%eax
  xor    %edx,%eax
  mov    %eax,-0x5c(%rbp)
  movl   $0x0,-0x94(%rbp)
  cmpl   $0x10,-0xa4(%rbp)
  je     L162
  cmpl   $0x10,-0xa4(%rbp)
  jg     L142
  cmpl   $0x4,-0xa4(%rbp)
  je     L180
  cmpl   $0x8,-0xa4(%rbp)
  je     L141
  jmp    L142
L180:
  mov    -0x3c(%rbp),%edx
  mov    -0x5c(%rbp),%eax
  cmp    %eax,%edx
  jne    L111
  mov    -0x38(%rbp),%edx
  mov    -0x58(%rbp),%eax
  cmp    %eax,%edx
  jne    L111
  mov    $0x1,%eax
  jmp    L85
L111:
  mov    $0x0,%eax
L85:
  mov    %eax,-0x94(%rbp)
  jmp    L142
L141:
  mov    -0x3c(%rbp),%edx
  mov    -0x5c(%rbp),%eax
  cmp    %eax,%edx
  jne    L182
  mov    -0x38(%rbp),%edx
  mov    -0x58(%rbp),%eax
  cmp    %eax,%edx
  jne    L182
  mov    -0x30(%rbp),%edx
  mov    -0x50(%rbp),%eax
  cmp    %eax,%edx
  jne    L182
  mov    $0x1,%eax
  jmp    L143
L182:
  mov    $0x0,%eax
L143:
  mov    %eax,-0x94(%rbp)
  jmp    L142
L162:
  mov    -0x3c(%rbp),%edx
  mov    -0x5c(%rbp),%eax
  cmp    %eax,%edx
  jne    L19
  mov    -0x38(%rbp),%edx
  mov    -0x58(%rbp),%eax
  cmp    %eax,%edx
  jne    L19
  mov    -0x34(%rbp),%edx
  mov    -0x54(%rbp),%eax
  cmp    %eax,%edx
  jne    L19
  mov    -0x30(%rbp),%edx
  mov    -0x50(%rbp),%eax
  cmp    %eax,%edx
  jne    L19
  mov    $0x1,%eax
  jmp    L235
L19:
  mov    $0x0,%eax
L235:
  mov    %eax,-0x94(%rbp)
  nop
L142:
  cmpl   $0x0,-0x94(%rbp)
  je     L314
  lea    -0x70(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <classify@plt>
  cmp    %eax,-0x8c(%rbp)
  jne    L314
  mov    -0x64(%rbp),%esi
  mov    -0x68(%rbp),%ecx
  mov    -0x6c(%rbp),%edx
  mov    -0x70(%rbp),%eax
  mov    %esi,%r8d
  mov    %eax,%esi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L314:
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x64(%rbp)
L320:
  mov    -0x64(%rbp),%eax
  cmp    $0x3,%eax
  jle    L37
  mov    -0x68(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x68(%rbp)
L166:
  mov    -0x68(%rbp),%eax
  cmp    $0x3,%eax
  jle    L35
  mov    -0x6c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x6c(%rbp)
L109:
  mov    -0x6c(%rbp),%eax
  cmp    $0x3,%eax
  jle    L218
  mov    -0x70(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x70(%rbp)
L48:
  mov    -0x70(%rbp),%eax
  cmp    $0x3,%eax
  jle    L106
  addl   $0x1,-0x98(%rbp)
L53:
  mov    -0x98(%rbp),%eax
  cmp    -0xa4(%rbp),%eax
  jl     L7
  addl   $0x1,-0x8c(%rbp)
L305:
  cmpl   $0x1,-0x8c(%rbp)
  jle    L22
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L73
  call   <__stack_chk_fail@plt>
L73:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D26
type: string
name: disassemble_data
arguments: data_label: D39
type: string
name: disassemble_data
arguments: data_label: D12
type: string
name: disassemble_data
arguments: data_label: D14
type: string

tool: D26: u8 trellis_trans_%d[256][4] = {


tool: D39:  /* trans=%d y0=%d */


tool: D12:  { %d, %d, %d, %d },


tool: D14: };

assistant: ```c
void gen_table(int nb_trans) {
  int Y[5], Yt[5], trans, ss[2][3], xx[2][2];
  int res, i, y0;
  printf("u8 trellis_trans_%d[256][4] = {\n", nb_trans);
  for (y0 = 0; y0 < 2; y0++) {
    for (trans = 0; trans < nb_trans; trans++) {
      printf(" /* trans=%d y0=%d */\n", trans, y0);
      Yt[1] = trans & 1;
      Yt[2] = (trans >> 1) & 1;
      Yt[4] = (trans >> 2) & 1;
      Yt[3] = (trans >> 3) & 1;
      for (xx[0][0] = 0; xx[0][0] < 4; xx[0][0]++)
        for (xx[0][1] = 0; xx[0][1] < 4; xx[0][1]++)
          for (xx[1][0] = 0; xx[1][0] < 4; xx[1][0]++)
            for (xx[1][1] = 0; xx[1][1] < 4; xx[1][1]++) {
              for (i = 0; i < 2; i++) {
                int x, y, y0, x0, y1, x1;
                x = xx[i][0];
                y = xx[i][1];
                x0 = x & 1;
                x1 = ((x & 2) >> 1);
                y0 = y & 1;
                y1 = ((y & 2) >> 1);
                ss[i][2] = x1 ^ y1 ^ y0 ^ x0;
                ss[i][1] = y0;
                ss[i][0] = y0 ^ x0;
              }
              Y[4] = ss[0][2] ^ ss[1][2];
              Y[3] = ss[0][1];
              Y[2] = ss[0][0];
              Y[1] = (ss[0][0] & ~ss[1][0] & 1) ^ ss[0][1] ^ ss[1][1];
              res = 0;
              switch (nb_trans) {
              case 4:
                res = (Yt[1] == Y[1] && Yt[2] == Y[2]);
                break;
              case 8:
                res = (Yt[1] == Y[1] && Yt[2] == Y[2] && Yt[4] == Y[4]);
                break;
              case 16:
                res = (Yt[1] == Y[1] && Yt[2] == Y[2] && Yt[3] == Y[3] && Yt[4] == Y[4]);
                break;
              }
              if (res && classify(xx) == y0) {
                printf(" { %d, %d, %d, %d },\n", xx[0][0], xx[0][1], xx[1][0], xx[1][1]);
              }
            }
    }
  }
  printf("};\n");
}
```