user: What would the C source look like for the assembly code provided here?

```asm
<gen_table>:
  endbr64
  push   %r15
  mov    %edi,%esi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  lea    D2(%rip),%rdi
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%r12
  call   <printf@plt>
  movl   $0x0,0x8(%rsp)
L101:
  movl   $0x0,0xc(%rsp)
  test   %ebx,%ebx
  jle    L52
L11:
  mov    0xc(%rsp),%r15d
  mov    0x8(%rsp),%edx
  lea    D13(%rip),%rdi
  xor    %eax,%eax
  mov    %r15d,%esi
  mov    %r15d,%ebp
  mov    %r15d,%r14d
  mov    %r15d,%r13d
  call   <printf@plt>
  mov    %r15d,%eax
  sar    %ebp
  and    $0x1,%r13d
  sar    $0x2,%r14d
  sar    $0x3,%eax
  and    $0x1,%ebp
  xor    %r10d,%r10d
  movl   $0x0,0x10(%rsp)
  and    $0x1,%r14d
  mov    %eax,%r15d
L5:
  movl   $0x0,0x14(%rsp)
  xor    %esi,%esi
L115:
  movl   $0x0,0x18(%rsp)
  xor    %r9d,%r9d
  nopl   0x0(%rax)
L25:
  movl   $0x0,0x1c(%rsp)
  xor    %ecx,%ecx
  jmp    L22
  nopl   0x0(%rax)
L127:
  cmp    $0x4,%ebx
  je     L107
L160:
  add    $0x1,%ecx
  mov    %ecx,0x1c(%rsp)
  cmp    $0x3,%ecx
  jg     L33
L22:
  mov    %ecx,%edx
  mov    %r10d,%eax
  mov    %esi,%r11d
  mov    %r10d,%r8d
  sar    %eax
  xor    %r9d,%edx
  sar    %r11d
  xor    %esi,%r8d
  xor    %edx,%eax
  mov    %r8d,%edi
  and    $0x1,%edx
  xor    %r11d,%eax
  and    $0x1,%edi
  not    %edx
  xor    %r8d,%eax
  mov    %r9d,%r8d
  and    %edi,%edx
  sar    %r8d
  xor    %r8d,%eax
  mov    %ecx,%r8d
  sar    %r8d
  xor    %r8d,%eax
  mov    %ecx,%r8d
  xor    %esi,%r8d
  and    $0x1,%eax
  xor    %r8d,%edx
  and    $0x1,%edx
  cmp    $0x8,%ebx
  je     L184
  cmp    $0x10,%ebx
  jne    L127
  mov    %r15d,%r8d
  xor    %esi,%r8d
  cmp    %edi,%ebp
  sete   %dil
  not    %r8d
  and    %r8d,%edi
  cmp    %edx,%r13d
  sete   %dl
  test   %dl,%dil
  je     L160
L73:
  cmp    %eax,%r14d
  jne    L160
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <classify@plt>
  cmp    0x8(%rsp),%eax
  je     L124
L151:
  mov    0x1c(%rsp),%ecx
  mov    0x18(%rsp),%r9d
  mov    0x14(%rsp),%esi
  mov    0x10(%rsp),%r10d
  add    $0x1,%ecx
  mov    %ecx,0x1c(%rsp)
  cmp    $0x3,%ecx
  jle    L22
  nopl   0x0(%rax,%rax,1)
L33:
  add    $0x1,%r9d
  mov    %r9d,0x18(%rsp)
  cmp    $0x3,%r9d
  jle    L25
  add    $0x1,%esi
  mov    %esi,0x14(%rsp)
  cmp    $0x3,%esi
  jle    L115
  add    $0x1,%r10d
  mov    %r10d,0x10(%rsp)
  cmp    $0x3,%r10d
  jle    L5
  addl   $0x1,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    %eax,%ebx
  jne    L11
L52:
  cmpl   $0x1,0x8(%rsp)
  je     L36
  movl   $0x1,0x8(%rsp)
  jmp    L101
  nopl   0x0(%rax,%rax,1)
L184:
  cmp    %edi,%ebp
  sete   %dil
  cmp    %edx,%r13d
  sete   %dl
  test   %dl,%dil
  jne    L73
  jmp    L160
  nopw   0x0(%rax,%rax,1)
L107:
  cmp    %edi,%ebp
  jne    L160
  cmp    %edx,%r13d
  jne    L160
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <classify@plt>
  cmp    0x8(%rsp),%eax
  jne    L151
L124:
  mov    0x1c(%rsp),%r8d
  mov    0x18(%rsp),%ecx
  xor    %eax,%eax
  lea    D9(%rip),%rdi
  mov    0x14(%rsp),%edx
  mov    0x10(%rsp),%esi
  call   <printf@plt>
  jmp    L151
L36:
  lea    D19(%rip),%rdi
  call   <puts@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L125
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L125:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D2
data_type: string
name: extract_symbolic_data
arguments: data_label: D13
data_type: string
name: extract_symbolic_data
arguments: data_label: D9
data_type: string
name: extract_symbolic_data
arguments: data_label: D19
data_type: string

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


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


tool: D9:  { %d, %d, %d, %d },


tool: D19: };

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");
}
```