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

```asm
<bch_enc>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  mov    $0x50,%edx
  push   %rbx
  mov    %esi,%ebx
  xor    %esi,%esi
  sub    $0x138,%rsp
  lea    0xd0(%rsp),%rdi
  lea    0x80(%rsp),%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x128(%rsp)
  xor    %eax,%eax
  call   <memset@plt>
  xor    %esi,%esi
  mov    %r14,%rdi
  mov    $0x50,%edx
  call   <memset@plt>
  mov    %ebp,%edi
  shl    $0x3,%edi
  js     L81
  cmp    $0x1,%ebp
  je     L157
  movl   $0x1,0xd0(%rsp)
  test   %ebp,%ebp
  je     L81
  movabs $0x100000001,%rax
  movabs $0x100000000,%rdx
  movq   $0x1,0xd4(%rsp)
  movq   $0x0,0xdc(%rsp)
  mov    %rax,0xe4(%rsp)
  mov    %rdx,0xec(%rsp)
  cmp    $0x1,%ebp
  je     L81
  mov    %rax,0xf4(%rsp)
  movq   $0x1,0xfc(%rsp)
  mov    %rax,0x104(%rsp)
  mov    %rdx,0x10c(%rsp)
  cmp    $0x2,%ebp
  je     L81
  movl   $0xffffffd0,0x114(%rsp)
L81:
  test   %ebx,%ebx
  jle    L240
  mov    %ebx,%r11d
  lea    -0x1(%rdi),%ecx
  sub    %edi,%r11d
  test   %r11d,%r11d
  jle    L130
  lea    -0x4(%rdi),%r8d
  lea    -0x5(%rdi),%eax
  cmp    %r11d,%ebx
  mov    %r13,0x38(%rsp)
  lea    -0x9(%rdi),%r12d
  mov    %eax,0x20(%rsp)
  lea    -0x6(%rdi),%edx
  cmovle %ebx,%r11d
  mov    %r12d,0x34(%rsp)
  movslq %r8d,%r12
  lea    -0xa(%rdi),%eax
  mov    %r13,%r9
  mov    %r8d,0x8(%rsp)
  movslq 0x20(%rsp),%r8
  lea    -0x7(%rdi),%r10d
  lea    -0x8(%rdi),%ebp
  mov    %edx,0x10(%rsp)
  lea    -0x2(%rdi),%esi
  lea    -0x3(%rdi),%r15d
  movslq %ecx,%rdx
  mov    %r8,0x28(%rsp)
  movslq 0x10(%rsp),%r8
  mov    %eax,0x54(%rsp)
  lea    -0xb(%rdi),%eax
  mov    %r10d,0x24(%rsp)
  movslq %esi,%r10
  mov    %eax,0x58(%rsp)
  lea    -0xc(%rdi),%eax
  mov    %r8,0x18(%rsp)
  movslq 0x24(%rsp),%r8
  mov    %eax,0x5c(%rsp)
  lea    -0xd(%rdi),%eax
  mov    %ebp,0x30(%rsp)
  movslq %r15d,%rbp
  mov    %eax,0x60(%rsp)
  lea    -0xe(%rdi),%eax
  mov    %r8,0x40(%rsp)
  movslq 0x30(%rsp),%r8
  mov    %eax,0x64(%rsp)
  lea    -0xf(%rdi),%eax
  mov    %eax,0x68(%rsp)
  lea    -0x10(%rdi),%eax
  sub    $0x11,%edi
  mov    %r8,0x48(%rsp)
  movslq 0x34(%rsp),%r8
  movslq %edi,%rdi
  mov    %rdi,0x78(%rsp)
  mov    %r8,0x70(%rsp)
  mov    %ebx,0x50(%rsp)
  mov    %eax,0x6c(%rsp)
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L190:
  mov    (%r9),%r8d
  xor    0x80(%rsp,%rdx,4),%r8d
  test   %ecx,%ecx
  js     L193
  mov    0xd0(%rsp,%rdx,4),%edi
  imul   %r8d,%edi
  xor    0x80(%rsp,%r10,4),%edi
  mov    %edi,0x80(%rsp,%rdx,4)
  mov    0xd0(%rsp,%r10,4),%edi
  imul   %r8d,%edi
  test   %esi,%esi
  je     L243
  xor    0x80(%rsp,%rbp,4),%edi
  mov    %edi,0x80(%rsp,%r10,4)
  mov    0xd0(%rsp,%rbp,4),%edi
  imul   %r8d,%edi
  test   %r15d,%r15d
  je     L243
  xor    0x80(%rsp,%r12,4),%edi
  mov    0x8(%rsp),%r13d
  mov    %edi,0x80(%rsp,%rbp,4)
  mov    0xd0(%rsp,%r12,4),%edi
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  mov    0x28(%rsp),%r13
  mov    0x20(%rsp),%ebx
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%r12,4)
  mov    0xd0(%rsp,%r13,4),%edi
  imul   %r8d,%edi
  test   %ebx,%ebx
  je     L243
  mov    0x18(%rsp),%rbx
  xor    0x80(%rsp,%rbx,4),%edi
  mov    0x18(%rsp),%rbx
  mov    %edi,0x80(%rsp,%r13,4)
  mov    0x10(%rsp),%r13d
  mov    0xd0(%rsp,%rbx,4),%edi
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  mov    0x40(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x24(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  mov    0x48(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x30(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  mov    0x70(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x34(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  movslq 0x54(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x54(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  movslq 0x58(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x58(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  movslq 0x5c(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x5c(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  movslq 0x60(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x60(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  movslq 0x64(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x64(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  movslq 0x68(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x68(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  movslq 0x6c(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  mov    %r13,%rbx
  mov    0x6c(%rsp),%r13d
  imul   %r8d,%edi
  test   %r13d,%r13d
  je     L243
  mov    0x78(%rsp),%r13
  xor    0x80(%rsp,%r13,4),%edi
  mov    %edi,0x80(%rsp,%rbx,4)
  mov    0xd0(%rsp,%r13,4),%edi
  imul   %r8d,%edi
  cs nopw 0x0(%rax,%rax,1)
L243:
  mov    %edi,0x80(%rsp)
L193:
  add    $0x1,%eax
  add    $0x4,%r9
  cmp    %r11d,%eax
  jl     L190
  mov    0x50(%rsp),%ebx
  mov    0x38(%rsp),%r13
  cmp    %eax,%ebx
  jle    L240
L303:
  lea    0x0(,%rdx,4),%rdi
  mov    %ecx,%r10d
  mov    %ecx,%r12d
  cltq
  lea    -0x10(%r14,%rdi,1),%r9
  lea    -0xc(%r14,%rdi,1),%r8
  mov    %ecx,%edi
  shr    $0x2,%r10d
  and    $0x3,%edi
  and    $0xfffffffc,%r12d
  cmp    $0x2,%esi
  mov    %rax,0x8(%rsp)
  cmovbe %ecx,%edi
  lea    -0x2(%rdi),%r15d
  lea    -0x3(%rdi),%r14d
  movslq %r15d,%rax
  movslq %r14d,%r14
  lea    -0x1(%rdi),%ebp
  mov    %r15d,0x20(%rsp)
  mov    %rax,0x10(%rsp)
  mov    0x8(%rsp),%rax
  movslq %ebp,%r11
  movslq %edi,%rdi
  mov    %r14,0x8(%rsp)
  mov    0x10(%rsp),%r15
  nopw   0x0(%rax,%rax,1)
L324:
  mov    0x80(%rsp,%rdx,4),%r14d
  mov    %r14d,0x0(%r13,%rax,4)
  test   %ecx,%ecx
  js     L29
  cmp    $0x2,%esi
  jbe    L0
  movdqu (%r9),%xmm0
  movups %xmm0,(%r8)
  cmp    $0x1,%r10d
  jbe    L334
  movdqu -0x10(%r9),%xmm1
  movups %xmm1,-0x10(%r8)
  cmp    $0x2,%r10d
  je     L334
  movdqu -0x20(%r9),%xmm2
  movups %xmm2,-0x20(%r8)
  cmp    $0x3,%r10d
  je     L334
  movdqu -0x30(%r9),%xmm3
  movups %xmm3,-0x30(%r8)
L334:
  cmp    %r12d,%ecx
  je     L53
L0:
  mov    0x80(%rsp,%r11,4),%r14d
  mov    %r14d,0x80(%rsp,%rdi,4)
  test   %ebp,%ebp
  je     L53
  mov    0x80(%rsp,%r15,4),%r14d
  mov    %r14d,0x80(%rsp,%r11,4)
  mov    0x20(%rsp),%r14d
  test   %r14d,%r14d
  je     L53
  mov    0x8(%rsp),%r14
  mov    0x80(%rsp,%r14,4),%r14d
  mov    %r14d,0x80(%rsp,%r15,4)
L53:
  movl   $0x0,0x80(%rsp)
L29:
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L324
L240:
  mov    0x128(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L306
  add    $0x138,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L130:
  xor    %eax,%eax
  lea    -0x2(%rdi),%esi
  movslq %ecx,%rdx
  jmp    L303
L157:
  movabs $0x100000001,%rax
  movq   $0x1,0xd0(%rsp)
  mov    %rax,0xd8(%rsp)
  movq   $0x1,0xe0(%rsp)
  movq   $0x0,0xe8(%rsp)
  movl   $0x1,0xf0(%rsp)
  jmp    L81
L306:
  call   <__stack_chk_fail@plt>
```

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