user: Converte this assembly snippet into its equivalent C code:

```asm
<ecc200>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x240,%rsp
  mov    %rdi,-0x228(%rbp)
  mov    %esi,-0x22c(%rbp)
  mov    %edx,-0x230(%rbp)
  mov    %ecx,-0x234(%rbp)
  mov    %r8d,-0x238(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x22c(%rbp),%eax
  add    $0x2,%eax
  cltd
  idivl  -0x230(%rbp)
  mov    %eax,-0x214(%rbp)
  mov    $0x12d,%edi
  call   <rs_init_gf@plt>
  mov    -0x234(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <rs_init_code@plt>
  movl   $0x0,-0x220(%rbp)
  jmp    L33
L50:
  movl   $0x0,-0x218(%rbp)
  mov    -0x220(%rbp),%eax
  mov    %eax,-0x21c(%rbp)
  jmp    L64
L81:
  mov    -0x21c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x228(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x218(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x218(%rbp)
  movzbl (%rcx),%edx
  cltq
  mov    %dl,-0x210(%rbp,%rax,1)
  mov    -0x214(%rbp),%eax
  add    %eax,-0x21c(%rbp)
L64:
  mov    -0x21c(%rbp),%eax
  cmp    -0x22c(%rbp),%eax
  jl     L81
  lea    -0x110(%rbp),%rdx
  lea    -0x210(%rbp),%rcx
  mov    -0x218(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <rs_encode@plt>
  mov    -0x234(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x218(%rbp)
  mov    -0x220(%rbp),%eax
  mov    %eax,-0x21c(%rbp)
  jmp    L13
L27:
  cmpl   $0x0,-0x238(%rbp)
  je     L65
  cmpl   $0x7,-0x220(%rbp)
  jg     L32
  mov    -0x218(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x218(%rbp)
  mov    -0x22c(%rbp),%ecx
  mov    -0x21c(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  lea    0x2(%rdx),%rcx
  mov    -0x228(%rbp),%rdx
  add    %rcx,%rdx
  cltq
  movzbl -0x110(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  jmp    L102
L32:
  mov    -0x218(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x218(%rbp)
  mov    -0x22c(%rbp),%ecx
  mov    -0x21c(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  lea    -0x8(%rdx),%rcx
  mov    -0x228(%rbp),%rdx
  add    %rcx,%rdx
  cltq
  movzbl -0x110(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
  jmp    L102
L65:
  mov    -0x218(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x218(%rbp)
  mov    -0x22c(%rbp),%ecx
  mov    -0x21c(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rcx
  mov    -0x228(%rbp),%rdx
  add    %rcx,%rdx
  cltq
  movzbl -0x110(%rbp,%rax,1),%eax
  mov    %al,(%rdx)
L102:
  mov    -0x214(%rbp),%eax
  add    %eax,-0x21c(%rbp)
L13:
  mov    -0x234(%rbp),%eax
  imul   -0x214(%rbp),%eax
  cmp    %eax,-0x21c(%rbp)
  jl     L27
  addl   $0x1,-0x220(%rbp)
L33:
  mov    -0x220(%rbp),%eax
  cmp    -0x214(%rbp),%eax
  jl     L50
  mov    $0x0,%eax
  call   <rs_free@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L38
  call   <__stack_chk_fail@plt>
L38:
  leave
  ret
```

assistant: ```c
void ecc200(unsigned char *binary, const int bytes, const int datablock, const int rsblock, const int skew) {
  int blocks = (bytes + 2) / datablock, b;
  int n, p;
  rs_init_gf(0x12d);
  rs_init_code(rsblock, 1);
  for (b = 0; b < blocks; b++) {
    unsigned char buf[256], ecc[256];
    p = 0;
    for (n = b; n < bytes; n += blocks)
      buf[p++] = binary[n];
    rs_encode(p, buf, ecc);
    p = rsblock - 1;
    for (n = b; n < rsblock * blocks; n += blocks) {
      if (skew) {
        if (b < 8) {
          binary[bytes + n + 2] = ecc[p--];
        } else {
          binary[bytes + n - 8] = ecc[p--];
        }
      } else {
        binary[bytes + n] = ecc[p--];
      }
    }
  }
  rs_free();
}
```