user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<ecc200placement>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  sub    $0x28,%rsp
  test   %esi,%esi
  jle    L285
  lea    -0x1(%rdx),%eax
  xor    %r14d,%r14d
  xor    %ebx,%ebx
  lea    0x4(,%rax,4),%r15
  xchg   %ax,%ax
L319:
  test   %r12d,%r12d
  jle    L251
  movslq %r14d,%rax
  mov    %r15,%rdx
  xor    %esi,%esi
  lea    0x0(%r13,%rax,4),%rdi
  call   <memset@plt>
L251:
  add    $0x1,%ebx
  add    %r12d,%r14d
  cmp    %ebx,%ebp
  jne    L319
L285:
  mov    %r12d,%eax
  lea    -0x2(%r12,%r12,1),%r14d
  xor    %r8d,%r8d
  mov    $0x4,%ebx
  sar    $0x1f,%eax
  mov    $0x1,%r9d
  shr    $0x1d,%eax
  lea    (%r12,%rax,1),%edx
  and    $0x7,%edx
  sub    %eax,%edx
  mov    %r12d,%eax
  neg    %eax
  mov    %edx,0x1c(%rsp)
  lea    0x2(%rax,%rax,1),%r15d
  mov    %r15d,0x18(%rsp)
  mov    %r14d,%r15d
  mov    %r8d,%r14d
  nop
L23:
  cmp    %ebp,%ebx
  jne    L282
  test   %r14d,%r14d
  jne    L282
  lea    0x1(%r9),%r14d
  mov    %r9d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  call   <ecc200placementcornerA@plt>
  mov    %r14d,%r9d
  xor    %r14d,%r14d
L175:
  mov    %ebx,%r11d
  mov    %r15d,0x14(%rsp)
  mov    %r12d,%edx
  mov    0x18(%rsp),%r15d
  imul   %r12d,%r11d
  mov    %ebp,%r12d
  add    %r14d,%r11d
  mov    %r11d,%ebp
  jmp    L54
  nopw   0x0(%rax,%rax,1)
L265:
  mov    %ebx,%esi
  lea    0x2(%r14),%eax
  add    %r15d,%ebp
  sub    $0x2,%esi
  js     L136
L26:
  cmp    %eax,%edx
  jle    L136
  mov    %eax,%r14d
  mov    %esi,%ebx
L54:
  cmp    %r12d,%ebx
  jge    L265
  test   %r14d,%r14d
  js     L265
  movslq %ebp,%rax
  mov    0x0(%r13,%rax,4),%esi
  test   %esi,%esi
  jne    L265
  lea    0x1(%r9),%eax
  mov    %r12d,%esi
  mov    %r14d,%r8d
  mov    %ebx,%ecx
  mov    %r13,%rdi
  mov    %edx,0x10(%rsp)
  add    %r15d,%ebp
  mov    %eax,0xc(%rsp)
  call   <ecc200placementblock@plt>
  mov    %ebx,%esi
  mov    0xc(%rsp),%r9d
  mov    0x10(%rsp),%edx
  lea    0x2(%r14),%eax
  sub    $0x2,%esi
  jns    L26
L136:
  sub    $0x1,%ebx
  add    $0x5,%r14d
  mov    0x14(%rsp),%r15d
  mov    %ebx,%r11d
  imul   %edx,%r11d
  add    %r14d,%r11d
  mov    %r11d,%ebp
  jmp    L51
  nopl   0x0(%rax,%rax,1)
L132:
  lea    0x2(%rbx),%eax
  lea    -0x2(%r14),%esi
  add    %r15d,%ebp
  cmp    %eax,%r12d
  jle    L263
L113:
  test   %esi,%esi
  js     L263
  mov    %esi,%r14d
  mov    %eax,%ebx
L51:
  test   %ebx,%ebx
  js     L132
  cmp    %edx,%r14d
  jge    L132
  movslq %ebp,%rax
  mov    0x0(%r13,%rax,4),%ecx
  test   %ecx,%ecx
  jne    L132
  lea    0x1(%r9),%eax
  mov    %r12d,%esi
  mov    %r14d,%r8d
  mov    %ebx,%ecx
  mov    %r13,%rdi
  mov    %edx,0x10(%rsp)
  add    %r15d,%ebp
  mov    %eax,0xc(%rsp)
  call   <ecc200placementblock@plt>
  lea    0x2(%rbx),%eax
  mov    0x10(%rsp),%edx
  lea    -0x2(%r14),%esi
  mov    0xc(%rsp),%r9d
  cmp    %eax,%r12d
  jg     L113
  nopl   0x0(%rax)
L263:
  mov    %r12d,%ebp
  add    $0x5,%ebx
  mov    %edx,%r12d
  sub    $0x1,%r14d
  cmp    %ebx,%ebp
  jg     L23
  cmp    %r14d,%edx
  jg     L23
  imul   %edx,%ebp
  movslq %ebp,%rax
  lea    -0x4(%r13,%rax,4),%rdx
  mov    (%rdx),%eax
  test   %eax,%eax
  jne    L267
  sub    %r12d,%ebp
  movslq %ebp,%rax
  movl   $0x1,-0x8(%r13,%rax,4)
  movl   $0x1,(%rdx)
L267:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L282:
  lea    -0x2(%rbp),%eax
  cmp    %ebx,%eax
  je     L19
L308:
  lea    0x4(%rbp),%eax
  cmp    %ebx,%eax
  jne    L175
  cmp    $0x2,%r14d
  jne    L175
  test   $0x7,%r12b
  jne    L175
  lea    0x1(%r9),%eax
  mov    %r9d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %eax,0xc(%rsp)
  call   <ecc200placementcornerD@plt>
  mov    0xc(%rsp),%r9d
  jmp    L175
  nopl   0x0(%rax,%rax,1)
L19:
  test   %r14d,%r14d
  jne    L308
  test   $0x3,%r12b
  jne    L189
  cmpl   $0x4,0x1c(%rsp)
  jne    L175
L31:
  lea    0x1(%r9),%eax
  mov    %r9d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %eax,0xc(%rsp)
  call   <ecc200placementcornerC@plt>
  mov    0xc(%rsp),%r9d
  jmp    L175
L189:
  lea    0x1(%r9),%eax
  mov    %r9d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r13,%rdi
  mov    %eax,0xc(%rsp)
  call   <ecc200placementcornerB@plt>
  cmpl   $0x4,0x1c(%rsp)
  mov    0xc(%rsp),%r9d
  jne    L175
  jmp    L31
```

assistant: ```c
void ecc200placement(int *array, int NR, int NC) {
  int r, c, p;
  for (r = 0; r < NR; r++)
    for (c = 0; c < NC; c++)
      array[r * NC + c] = 0;
  p = 1;
  r = 4;
  c = 0;
  do {
    if (r == NR && !c)
      ecc200placementcornerA(array, NR, NC, p++);
    if (r == NR - 2 && !c && NC % 4)
      ecc200placementcornerB(array, NR, NC, p++);
    if (r == NR - 2 && !c && (NC % 8) == 4)
      ecc200placementcornerC(array, NR, NC, p++);
    if (r == NR + 4 && c == 2 && !(NC % 8))
      ecc200placementcornerD(array, NR, NC, p++);
    do {
      if (r < NR && c >= 0 && !array[r * NC + c])
        ecc200placementblock(array, NR, NC, r, c, p++);
      r -= 2;
      c += 2;
    } while (r >= 0 && c < NC);
    r++;
    c += 3;
    do {
      if (r >= 0 && c < NC && !array[r * NC + c])
        ecc200placementblock(array, NR, NC, r, c, p++);
      r += 2;
      c -= 2;
    } while (r < NR && c >= 0);
    r += 3;
    c++;
  } while (r < NR || c < NC);
  if (!array[NR * NC - 1])
    array[NR * NC - 1] = array[NR * NC - NC - 2] = 1;
}
```