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

```asm
<ecc200placement>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r15
  mov    %esi,%r12d
  mov    %edx,%r13d
  test   %esi,%esi
  jle    L132
  mov    $0x0,%esi
  mov    $0x0,%ecx
  lea    -0x1(%rdx),%r8d
  lea    0x4(%rdi),%rdi
  jmp    L151
L240:
  movslq %esi,%rdx
  lea    (%r15,%rdx,4),%rax
  add    %r8,%rdx
  lea    (%rdi,%rdx,4),%rdx
L318:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L318
L270:
  add    $0x1,%ecx
  add    %r13d,%esi
  cmp    %ecx,%r12d
  je     L132
L151:
  test   %r13d,%r13d
  jg     L240
  jmp    L270
L132:
  mov    %r13d,%eax
  sar    $0x1f,%eax
  shr    $0x1d,%eax
  lea    0x0(%r13,%rax,1),%edx
  and    $0x7,%edx
  sub    %eax,%edx
  mov    %edx,0x1c(%rsp)
  mov    %r13d,%eax
  neg    %eax
  lea    0x2(%rax,%rax,1),%eax
  mov    %eax,0x10(%rsp)
  lea    -0x2(%r13,%r13,1),%eax
  mov    %eax,0xc(%rsp)
  mov    $0x1,%r9d
  mov    $0x0,%ebp
  mov    $0x4,%ebx
  lea    -0x2(%r12),%eax
  mov    %eax,0x18(%rsp)
  jmp    L26
L367:
  lea    0x1(%r9),%r14d
  mov    %r9d,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <ecc200placementcornerA@plt>
  mov    %r14d,%r9d
L145:
  mov    %ebx,%r14d
  imul   %r13d,%r14d
  add    %ebp,%r14d
  jmp    L79
L16:
  test   $0x3,%r13b
  jne    L311
L30:
  cmpl   $0x4,0x1c(%rsp)
  je     L211
L305:
  mov    $0x0,%ebp
  jmp    L145
L311:
  lea    0x1(%r9),%ebp
  mov    %r9d,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <ecc200placementcornerB@plt>
  mov    %ebp,%r9d
  jmp    L30
L211:
  lea    0x1(%r9),%ebp
  mov    %r9d,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <ecc200placementcornerC@plt>
  mov    %ebp,%r9d
  jmp    L305
L126:
  lea    0x2(%rbp),%eax
  add    0x10(%rsp),%r14d
  mov    %ebx,%edx
  sub    $0x2,%edx
  js     L8
  cmp    %eax,%r13d
  jle    L8
  mov    %eax,%ebp
  mov    %edx,%ebx
L79:
  cmp    %r12d,%ebx
  jge    L126
  test   %ebp,%ebp
  js     L126
  movslq %r14d,%rax
  cmpl   $0x0,(%r15,%rax,4)
  jne    L126
  lea    0x1(%r9),%eax
  mov    %eax,0x14(%rsp)
  mov    %ebp,%r8d
  mov    %ebx,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <ecc200placementblock@plt>
  mov    0x14(%rsp),%r9d
  jmp    L126
L8:
  sub    $0x1,%ebx
  add    $0x5,%ebp
  mov    %ebx,%r14d
  imul   %r13d,%r14d
  add    %ebp,%r14d
  jmp    L33
L144:
  lea    0x2(%rbx),%eax
  lea    -0x2(%rbp),%edx
  add    0xc(%rsp),%r14d
  cmp    %eax,%r12d
  jle    L158
  test   %edx,%edx
  js     L158
  mov    %edx,%ebp
  mov    %eax,%ebx
L33:
  test   %ebx,%ebx
  js     L144
  cmp    %r13d,%ebp
  jge    L144
  movslq %r14d,%rax
  cmpl   $0x0,(%r15,%rax,4)
  jne    L144
  lea    0x1(%r9),%eax
  mov    %eax,0x14(%rsp)
  mov    %ebp,%r8d
  mov    %ebx,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <ecc200placementblock@plt>
  mov    0x14(%rsp),%r9d
  jmp    L144
L158:
  add    $0x5,%ebx
  sub    $0x1,%ebp
  cmp    %ebx,%r12d
  jg     L26
  cmp    %ebp,%r13d
  jle    L125
L26:
  test   %ebp,%ebp
  sete   %al
  cmp    %r12d,%ebx
  jne    L95
  test   %al,%al
  jne    L367
L95:
  cmp    %ebx,0x18(%rsp)
  jne    L253
  test   %al,%al
  jne    L16
L253:
  lea    0x4(%r12),%eax
  cmp    %ebx,%eax
  jne    L145
  cmp    $0x2,%ebp
  jne    L145
  mov    $0x2,%ebp
  test   $0x7,%r13b
  jne    L145
  lea    0x1(%r9),%ebp
  mov    %r9d,%ecx
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %r15,%rdi
  call   <ecc200placementcornerD@plt>
  mov    %ebp,%r9d
  mov    $0x2,%ebp
  jmp    L145
L125:
  imul   %r13d,%r12d
  movslq %r12d,%rax
  lea    -0x4(%r15,%rax,4),%rdx
  cmpl   $0x0,(%rdx)
  jne    L360
  sub    %r13d,%r12d
  movslq %r12d,%rax
  movl   $0x1,-0x8(%r15,%rax,4)
  movl   $0x1,(%rdx)
L360:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void ecc200placement(int *array, const int NR, const 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;
}
```