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

```asm
<redupe_correct_errata>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x648,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %esi,0x1c(%rsp)
  mov    %rdx,%rbp
  mov    %ecx,%ebx
  mov    %r8,0x8(%rsp)
  mov    %r9d,%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x638(%rsp)
  xor    %eax,%eax
  test   %r9d,%r9d
  je     L127
  mov    %esi,%edi
  mov    %r9d,%esi
  mov    %edi,%ecx
  sub    $0x1,%ecx
L124:
  mov    0x8(%rsp),%rdi
  mov    %ecx,%edx
  sub    (%rdi,%rax,1),%dl
  mov    %dl,0x30(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L124
L127:
  movl   $0x0,0x24(%rsp)
  lea    0x24(%rsp),%rcx
  lea    0x130(%rsp),%rdx
  lea    0x30(%rsp),%rdi
  mov    %r14d,%esi
  call   <redupe_find_errata_locator@plt>
  mov    %ebx,0x28(%rsp)
  test   %ebx,%ebx
  je     L66
  lea    -0x1(%rbx),%esi
  add    $0x2,%rsi
  mov    $0x1,%eax
L43:
  mov    %ebx,%edx
  sub    %eax,%edx
  movzbl -0x1(%rbp,%rax,1),%ecx
  mov    %cl,0x230(%rsp,%rdx,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L43
L66:
  movl   $0x0,0x2c(%rsp)
  mov    0x24(%rsp),%ecx
  lea    0x130(%rsp),%rdx
  lea    0x230(%rsp),%rdi
  sub    $0x8,%rsp
  lea    0x34(%rsp),%rax
  push   %rax
  lea    0x340(%rsp),%r9
  lea    -0x1(%rcx),%r8d
  mov    %ebx,%esi
  call   <redupe_find_error_evaluator@plt>
  mov    0x3c(%rsp),%r8d
  mov    %r8d,%r9d
  shr    %r9d
  add    $0x10,%rsp
  cmp    $0x1,%r8d
  jbe    L71
  lea    0x330(%rsp),%rdx
  mov    $0x0,%eax
  sub    $0x1,%r8d
L51:
  movzbl (%rdx),%esi
  mov    %r8d,%ecx
  sub    %eax,%ecx
  movzbl 0x330(%rsp,%rcx,1),%edi
  mov    %dil,(%rdx)
  mov    %sil,0x330(%rsp,%rcx,1)
  add    $0x1,%eax
  add    $0x1,%rdx
  cmp    %r9d,%eax
  jb     L51
L71:
  test   %r14d,%r14d
  je     L119
  mov    %r14d,%r14d
  mov    $0x0,%ebx
  lea    0x30(%rsp),%rbp
L22:
  movzbl (%rbx,%rbp,1),%esi
  sub    $0xff,%esi
  mov    $0x2,%edi
  call   <redupe_gf_pow@plt>
  mov    %al,0x430(%rsp,%rbx,1)
  add    $0x1,%rbx
  cmp    %rbx,%r14
  jne    L22
  lea    0x530(%rsp),%rdi
  mov    $0x100,%edx
  mov    $0x0,%esi
  call   <memset@plt>
  mov    $0x0,%r12d
  lea    0x430(%rsp),%r15
  jmp    L160
L143:
  movzbl (%rbx,%r15,1),%esi
  movzbl %r13b,%edi
  call   <redupe_gf_mul@plt>
  movzbl %al,%esi
  mov    $0x1,%edi
  call   <redupe_gf_sub@plt>
  movzbl %bpl,%edi
  movzbl %al,%esi
  call   <redupe_gf_mul@plt>
  mov    %eax,%ebp
L17:
  add    $0x1,%rbx
  cmp    %r14,%rbx
  je     L33
L81:
  cmp    %r12d,%ebx
  jne    L143
  jmp    L17
L33:
  mov    0x2c(%rsp),%r8d
  mov    %r8d,0x28(%rsp)
  test   %r8d,%r8d
  je     L18
  lea    0x330(%rsp),%rdx
  lea    -0x1(%r8),%esi
  mov    %esi,%eax
  lea    0x331(%rsp,%rax,1),%rdi
  mov    %rdx,%rax
  add    %edx,%esi
L38:
  mov    %esi,%edx
  sub    %eax,%edx
  movzbl (%rax),%ecx
  mov    %cl,0x230(%rsp,%rdx,1)
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L38
L18:
  movzbl %r13b,%edx
  lea    0x230(%rsp),%rdi
  mov    %r8d,%esi
  call   <redupe_gf_poly_eval@plt>
  movzbl %al,%ebx
  mov    $0x1,%esi
  mov    0x18(%rsp),%edi
  call   <redupe_gf_pow@plt>
  movzbl %al,%edi
  mov    %ebx,%esi
  call   <redupe_gf_mul@plt>
  mov    0x8(%rsp),%rcx
  movzbl (%rcx,%r12,1),%ebx
  movzbl %bpl,%esi
  movzbl %al,%edi
  call   <redupe_gf_div@plt>
  movslq %ebx,%rbx
  mov    %al,0x530(%rsp,%rbx,1)
  add    $0x1,%r12
  cmp    %r14,%r12
  je     L55
L160:
  movzbl (%r12,%r15,1),%eax
  mov    %eax,0x18(%rsp)
  mov    %eax,%edi
  call   <redupe_gf_inv@plt>
  mov    %eax,%r13d
  mov    $0x0,%ebx
  mov    $0x1,%ebp
  jmp    L81
L119:
  lea    0x530(%rsp),%rdi
  mov    $0x100,%edx
  mov    $0x0,%esi
  call   <memset@plt>
L55:
  mov    0x1c(%rsp),%r15d
  mov    %r15d,0x28(%rsp)
  lea    0x230(%rsp),%rbx
  mov    %r15d,%edx
  mov    0x10(%rsp),%r14
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <memmove@plt>
  lea    0x530(%rsp),%rdx
  lea    0x28(%rsp),%r9
  mov    %r14,%r8
  mov    %r15d,%ecx
  mov    0x28(%rsp),%esi
  mov    %rbx,%rdi
  call   <redupe_gf_poly_add@plt>
  mov    0x638(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L155
  add    $0x648,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L155:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void redupe_correct_errata(unsigned char *msg, unsigned msg_sz, const unsigned char *synd, unsigned synd_sz, const unsigned char *err_pos, unsigned err_pos_sz) {
  unsigned char coef_pos[256];
  unsigned coef_pos_sz = err_pos_sz;
  for (unsigned i = 0; i < coef_pos_sz; ++i) {
    coef_pos[i] = msg_sz - 1 - err_pos[i];
  }
  unsigned char err_loc[256];
  unsigned err_loc_sz = 0;
  redupe_find_errata_locator(coef_pos, coef_pos_sz, err_loc, &err_loc_sz);
  unsigned char tmp[256];
  unsigned tmp_sz = synd_sz;
  for (unsigned i = 0; i < synd_sz; ++i) {
    tmp[synd_sz - i - 1] = synd[i];
  }
  unsigned char err_eval[256];
  unsigned err_eval_sz = 0;
  redupe_find_error_evaluator(tmp, tmp_sz, err_loc, err_loc_sz, err_loc_sz - 1, err_eval, &err_eval_sz);
  for (unsigned i = 0; i < err_eval_sz / 2; ++i) {
    unsigned char t = err_eval[i];
    err_eval[i] = err_eval[err_eval_sz - i - 1];
    err_eval[err_eval_sz - i - 1] = t;
  }
  unsigned char X[256];
  unsigned X_sz = coef_pos_sz;
  for (unsigned i = 0; i < coef_pos_sz; ++i) {
    int l = 255 - coef_pos[i];
    X[i] = redupe_gf_pow(2, -l);
  }
  unsigned char E[256];
  unsigned E_sz = msg_sz;
  memset(E, 0, sizeof(E));
  for (unsigned i = 0; i < X_sz; ++i) {
    unsigned char xinv = redupe_gf_inv(X[i]);
    unsigned char err_loc_prime = 1;
    for (unsigned j = 0; j < X_sz; ++j) {
      if (j == i) {
        continue;
      }
      unsigned char t = redupe_gf_mul(xinv, X[j]);
      t = redupe_gf_sub(1, t);
      err_loc_prime = redupe_gf_mul(err_loc_prime, t);
    }
    tmp_sz = err_eval_sz;
    for (unsigned j = 0; j < err_eval_sz; ++j) {
      tmp[tmp_sz - j - 1] = err_eval[j];
    }
    unsigned char y = redupe_gf_poly_eval(tmp, tmp_sz, xinv);
    y = redupe_gf_mul(redupe_gf_pow(X[i], 1), y);
    E[err_pos[i]] = redupe_gf_div(y, err_loc_prime);
  }
  tmp_sz = msg_sz;
  memmove(tmp, msg, msg_sz);
  redupe_gf_poly_add(tmp, tmp_sz, E, E_sz, msg, &tmp_sz);
}
```