user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<ecc200>:
  endbr64
  push   %r15
  mov    %edx,%r10d
  mov    %rdi,%r15
  mov    $0x12d,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  movslq %esi,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x258,%rsp
  mov    %ecx,0x3c(%rsp)
  mov    %r8d,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x248(%rsp)
  xor    %eax,%eax
  lea    0x2(%rbp),%eax
  cltd
  idiv   %r10d
  mov    %eax,0x2c(%rsp)
  call   <rs_init_gf@plt>
  mov    $0x1,%esi
  mov    %ebx,%edi
  call   <rs_init_code@plt>
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  jle    L234
  imul   %ebx,%eax
  mov    %eax,%ebx
  test   %ebp,%ebp
  jg     L44
  lea    0x40(%rsp),%rax
  xor    %r13d,%r13d
  lea    0x140(%rsp),%r14
  mov    %rax,0x8(%rsp)
L185:
  movslq 0x2c(%rsp),%r12
  movslq 0x3c(%rsp),%rax
  add    %r15,%rbp
  movslq %r13d,%r8
  mov    %r13d,%r15d
  mov    %ebx,%r13d
  mov    %rbp,%rbx
  mov    %r8,%rbp
  mov    %rax,0x10(%rsp)
  mov    %r12,%rax
  mov    %r14,%r12
  mov    %rax,%r14
  nopl   (%rax)
L218:
  mov    0x8(%rsp),%rsi
  xor    %edi,%edi
  mov    %r12,%rdx
  call   <rs_encode@plt>
  cmp    %r13d,%r15d
  jge    L19
  mov    0x10(%rsp),%rax
  mov    0x28(%rsp),%ecx
  lea    (%r12,%rax,1),%rdx
  mov    %rbp,%rax
  test   %ecx,%ecx
  je     L238
  cmp    $0x7,%r15d
  jle    L184
  cs nopw 0x0(%rax,%rax,1)
L237:
  movzbl -0x1(%rdx),%esi
  sub    $0x1,%rdx
  mov    %sil,-0x8(%rbx,%rax,1)
  add    %r14,%rax
  cmp    %eax,%r13d
  jg     L237
L19:
  add    $0x1,%r15d
  add    $0x1,%rbp
  cmp    %r15d,0x2c(%rsp)
  jg     L218
L234:
  mov    0x248(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L217
  add    $0x258,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <rs_free@plt>
  nopl   0x0(%rax,%rax,1)
L238:
  movzbl -0x1(%rdx),%esi
  sub    $0x1,%rdx
  mov    %sil,(%rbx,%rax,1)
  add    %r14,%rax
  cmp    %eax,%r13d
  jg     L238
  jmp    L19
  xchg   %ax,%ax
L184:
  movzbl -0x1(%rdx),%esi
  sub    $0x1,%rdx
  mov    %sil,0x2(%rbx,%rax,1)
  add    %r14,%rax
  cmp    %eax,%r13d
  jg     L184
  jmp    L19
  nopw   0x0(%rax,%rax,1)
L44:
  movslq 0x2c(%rsp),%r12
  movslq 0x3c(%rsp),%rax
  lea    0x3f(%rsp),%r8
  lea    0x140(%rsp),%r14
  mov    %r14,%rdx
  mov    %ebp,%r14d
  cmp    %r12d,%ebp
  mov    %r12d,%ecx
  mov    %rax,0x30(%rsp)
  cmovle %ebp,%ecx
  xor    %r10d,%r10d
  mov    %ecx,0x38(%rsp)
  lea    0x40(%rsp),%rcx
  mov    %rcx,0x8(%rsp)
  movslq %ebp,%rcx
  mov    %r10,%rbp
  add    %r15,%rcx
  nopl   (%rax)
L81:
  mov    %ebp,%r13d
  mov    %rbp,%rsi
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L16:
  movzbl (%r15,%rsi,1),%r9d
  add    %r12,%rsi
  mov    %eax,%edi
  mov    %r9b,(%r8,%rax,1)
  add    $0x1,%rax
  cmp    %esi,%r14d
  jg     L16
  mov    0x8(%rsp),%rsi
  mov    %r8,0x20(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %rdx,0x10(%rsp)
  call   <rs_encode@plt>
  cmp    %ebp,%ebx
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%rcx
  mov    0x20(%rsp),%r8
  jle    L240
  mov    0x28(%rsp),%esi
  test   %esi,%esi
  jne    L84
  mov    0x30(%rsp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    %rbp,%rax
  nop
L174:
  movzbl -0x1(%rsi),%edi
  sub    $0x1,%rsi
  mov    %dil,(%rcx,%rax,1)
  add    %r12,%rax
  cmp    %eax,%ebx
  jg     L174
L240:
  add    $0x1,%r13d
  add    $0x1,%rbp
  cmp    %ebp,0x38(%rsp)
  jg     L81
L167:
  movslq %r14d,%rbp
  mov    %rdx,%r14
  cmp    %r13d,0x2c(%rsp)
  jg     L185
  jmp    L234
  nopl   0x0(%rax,%rax,1)
L84:
  mov    0x30(%rsp),%rax
  cmp    $0x7,%ebp
  lea    (%rdx,%rax,1),%rsi
  mov    %rbp,%rax
  jle    L47
  nopl   0x0(%rax)
L229:
  movzbl -0x1(%rsi),%edi
  sub    $0x1,%rsi
  mov    %dil,-0x8(%rcx,%rax,1)
  add    %r12,%rax
  cmp    %eax,%ebx
  jg     L229
  add    $0x1,%r13d
  add    $0x1,%rbp
  cmp    %ebp,0x38(%rsp)
  jg     L81
  jmp    L167
L47:
  movzbl -0x1(%rsi),%edi
  sub    $0x1,%rsi
  mov    %dil,0x2(%rcx,%rax,1)
  add    %r12,%rax
  cmp    %eax,%ebx
  jg     L47
  jmp    L240
L217:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void ecc200(unsigned char *binary, int bytes, int datablock, int rsblock, 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();
}
```