user: What is the c source code of the assembly code below?

```asm
<bch_enc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %rdi,-0xe8(%rbp)
  mov    %esi,-0xec(%rbp)
  mov    %edx,-0xf0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movabs $0x3030303131313031,%rax
  mov    %rax,-0x2a(%rbp)
  movw   $0x31,-0x22(%rbp)
  movabs $0x3031313030303131,%rax
  movabs $0x3031313031313131,%rdx
  mov    %rax,-0x20(%rbp)
  mov    %rdx,-0x18(%rbp)
  movw   $0x31,-0x10(%rbp)
  lea    -0x80(%rbp),%rax
  mov    $0x50,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  lea    -0xd0(%rbp),%rax
  mov    $0x50,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0xf0(%rbp),%eax
  shl    $0x3,%eax
  mov    %eax,-0xd8(%rbp)
  movl   $0x0,-0xe0(%rbp)
  jmp    L96
L38:
  cmpl   $0x1,-0xf0(%rbp)
  jne    L27
  mov    -0xe0(%rbp),%eax
  cltq
  movzbl -0x2a(%rbp,%rax,1),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  jmp    L71
L27:
  mov    -0xe0(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
L71:
  mov    -0xe0(%rbp),%edx
  movslq %edx,%rdx
  mov    %eax,-0x80(%rbp,%rdx,4)
  addl   $0x1,-0xe0(%rbp)
L96:
  mov    -0xd8(%rbp),%eax
  cmp    -0xe0(%rbp),%eax
  jge    L38
  movl   $0x0,-0xe0(%rbp)
  jmp    L19
L77:
  mov    -0xec(%rbp),%eax
  sub    -0xd8(%rbp),%eax
  cmp    %eax,-0xe0(%rbp)
  jge    L126
  mov    -0xe0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  jmp    L51
L126:
  mov    -0xd8(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
L51:
  mov    -0xe0(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xe8(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,(%rdx)
  mov    -0xec(%rbp),%eax
  sub    -0xd8(%rbp),%eax
  cmp    %eax,-0xe0(%rbp)
  jge    L106
  mov    -0xe0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0xd8(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  xor    %edx,%eax
  jmp    L69
L106:
  mov    $0x0,%eax
L69:
  mov    %eax,-0xd4(%rbp)
  mov    -0xd8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xdc(%rbp)
  jmp    L35
L99:
  mov    -0xdc(%rbp),%eax
  cltq
  mov    -0x80(%rbp,%rax,4),%eax
  imul   -0xd4(%rbp),%eax
  mov    %eax,%edx
  cmpl   $0x0,-0xdc(%rbp)
  je     L130
  mov    -0xdc(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  jmp    L98
L130:
  mov    $0x0,%eax
L98:
  xor    %eax,%edx
  mov    -0xdc(%rbp),%eax
  cltq
  mov    %edx,-0xd0(%rbp,%rax,4)
  subl   $0x1,-0xdc(%rbp)
L35:
  cmpl   $0x0,-0xdc(%rbp)
  jns    L99
  addl   $0x1,-0xe0(%rbp)
L19:
  mov    -0xe0(%rbp),%eax
  cmp    -0xec(%rbp),%eax
  jl     L77
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L105
  call   <__stack_chk_fail@plt>
L105:
  leave
  ret
```

assistant: ```c
void bch_enc(int c[255], int n, int t) {
  int i, j, r, gate;
  int b[20], g[20];
  char gs1[] = "101110001";
  char gs2[] = "11000110111101101";
  memset(g, 0, 20 * sizeof(int));
  memset(b, 0, 20 * sizeof(int));
  r = t * 8;
  for (i = 0; i < r + 1; i++) {
    g[i] = (t == 1 ? gs1[i] : gs2[i]) - '0';
  }
  for (i = 0; i < n; i++) {
    c[i] = i < n - r ? c[i] : b[r - 1];
    gate = i < n - r ? c[i] ^ b[r - 1] : 0;
    for (j = r - 1; j >= 0; j--)
      b[j] = gate * g[j] ^ (j == 0 ? 0 : b[j - 1]);
  }
}
```