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

```asm
<redupe_correct_msg>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  lea    (%rbx,%rdx,1),%r13d
  sub    $0x458,%rsp
  mov    %rdi,0x8(%rsp)
  xor    %edi,%edi
  lea    0x40(%rsp),%rbp
  mov    %rcx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x448(%rsp)
  xor    %eax,%eax
  cmp    $0xff,%r13d
  setbe  %dil
  call   <assert@plt>
  movl   $0x0,0x34(%rsp)
  movl   $0x0,0x38(%rsp)
  movl   $0x0,0x3c(%rsp)
  test   %ebx,%ebx
  je     L84
  mov    0x8(%rsp),%rsi
  mov    %ebx,%edx
  mov    %rbp,%rdi
  call   <memcpy@plt>
L84:
  test   %r12d,%r12d
  je     L78
  mov    %ebx,%edi
  mov    0x10(%rsp),%rsi
  mov    %r12d,%edx
  add    %rbp,%rdi
  call   <memcpy@plt>
L78:
  lea    0x34(%rsp),%r15
  mov    %r13d,%esi
  mov    %r12d,%edx
  mov    %rbp,%rdi
  lea    0x140(%rsp),%r14
  mov    %r15,%r8
  mov    %r14,%rcx
  call   <redupe_calc_syndromes@plt>
  mov    0x34(%rsp),%esi
  test   %esi,%esi
  je     L97
  lea    0x141(%rsp),%rax
  lea    -0x1(%rsi),%edi
  mov    %r14,%r10
  xor    %edx,%edx
  mov    %rax,0x20(%rsp)
  add    %rax,%rdi
  mov    %r14,%rax
  nopl   0x0(%rax)
L91:
  movzbl (%rax),%ecx
  add    $0x1,%rax
  add    %ecx,%edx
  cmp    %rdi,%rax
  jne    L91
  mov    %r10,0x18(%rsp)
  xor    %eax,%eax
  test   %edx,%edx
  je     L1
  lea    0x240(%rsp),%r9
  lea    0x38(%rsp),%r8
  mov    %r12d,%edx
  mov    %r14,%rdi
  mov    %r9,%rcx
  mov    %r9,0x28(%rsp)
  call   <redupe_find_error_locator@plt>
  mov    0x28(%rsp),%r9
  mov    0x18(%rsp),%r10
  test   %rax,%rax
  js     L52
  mov    0x38(%rsp),%esi
  mov    %esi,%eax
  shr    %eax
  je     L118
  sub    $0x1,%eax
  lea    -0x1(%rsi,%r9,1),%edi
  lea    0x241(%rsp,%rax,1),%r8
  mov    %r9,%rax
  nopl   (%rax)
L65:
  mov    %edi,%edx
  movzbl (%rax),%ecx
  sub    %eax,%edx
  add    $0x1,%rax
  movzbl 0x240(%rsp,%rdx,1),%r11d
  mov    %r11b,-0x1(%rax)
  mov    %cl,0x240(%rsp,%rdx,1)
  cmp    %r8,%rax
  jne    L65
L118:
  lea    0x3c(%rsp),%r8
  mov    %r13d,%edx
  mov    %r9,%rdi
  mov    %r10,0x28(%rsp)
  lea    0x340(%rsp),%rcx
  mov    %rcx,0x18(%rsp)
  call   <redupe_find_errors@plt>
  mov    0x18(%rsp),%rcx
  mov    0x28(%rsp),%r10
  test   %rax,%rax
  js     L52
  mov    %rcx,%r8
  mov    0x3c(%rsp),%r9d
  mov    0x34(%rsp),%ecx
  mov    %r14,%rdx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  mov    %r10,0x18(%rsp)
  call   <redupe_correct_errata@plt>
  mov    %r15,%r8
  mov    %r14,%rcx
  mov    %r12d,%edx
  mov    %r13d,%esi
  mov    %rbp,%rdi
  call   <redupe_calc_syndromes@plt>
  mov    0x34(%rsp),%eax
  test   %eax,%eax
  je     L11
  mov    0x18(%rsp),%r10
  lea    -0x1(%rax),%ecx
  xor    %eax,%eax
  add    0x20(%rsp),%rcx
  nopl   0x0(%rax,%rax,1)
L62:
  movzbl (%r10),%edx
  add    $0x1,%r10
  add    %edx,%eax
  cmp    %rcx,%r10
  jne    L62
  test   %eax,%eax
  jne    L52
L11:
  mov    0x8(%rsp),%rdi
  mov    %ebx,%edx
  mov    %rbp,%rsi
  call   <memmove@plt>
  mov    0x10(%rsp),%rdi
  lea    0x0(%rbp,%rbx,1),%rsi
  mov    %r12d,%edx
  call   <memmove@plt>
L97:
  xor    %eax,%eax
L1:
  mov    0x448(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L12
  add    $0x458,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L52:
  mov    $0xffffffff,%eax
  jmp    L1
L12:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
__attribute__((visibility("default"))) int redupe_correct_msg(unsigned char *msg, unsigned msg_sz, unsigned nsym, unsigned char *code) {
  assert(msg_sz + nsym < 256);
  unsigned char buf[256];
  const unsigned buf_sz = msg_sz + nsym;
  unsigned char synd[256];
  unsigned synd_sz = 0;
  unsigned synd_sum = 0;
  unsigned char err_loc[256];
  unsigned err_loc_sz = 0;
  unsigned char err_pos[256];
  unsigned err_pos_sz = 0;
  for (unsigned i = 0; i < msg_sz; ++i) {
    buf[i] = msg[i];
  }
  for (unsigned i = 0; i < nsym; ++i) {
    buf[msg_sz + i] = code[i];
  }
  redupe_calc_syndromes(buf, buf_sz, nsym, synd, &synd_sz);
  for (unsigned i = 0; i < synd_sz; ++i) {
    synd_sum += synd[i];
  }
  if (synd_sum == 0) {
    return 0;
  }
  if (redupe_find_error_locator(synd, synd_sz, nsym, err_loc, &err_loc_sz) < 0) {
    return -1;
  }
  for (unsigned i = 0; i < err_loc_sz / 2; ++i) {
    unsigned char tmp = err_loc[i];
    err_loc[i] = err_loc[err_loc_sz - i - 1];
    err_loc[err_loc_sz - i - 1] = tmp;
  }
  if (redupe_find_errors(err_loc, err_loc_sz, buf_sz, err_pos, &err_pos_sz) < 0) {
    return -1;
  }
  redupe_correct_errata(buf, buf_sz, synd, synd_sz, err_pos, err_pos_sz);
  redupe_calc_syndromes(buf, buf_sz, nsym, synd, &synd_sz);
  synd_sum = 0;
  for (unsigned i = 0; i < synd_sz; ++i) {
    synd_sum += synd[i];
  }
  if (synd_sum != 0) {
    return -1;
  }
  memmove(msg, buf, msg_sz);
  memmove(code, buf + msg_sz, nsym);
  return 0;
}
```