user: What is the c source code of the assembly code below?

```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    L4
  lea    -0x1(%rdx),%eax
  xor    %r14d,%r14d
  xor    %ebx,%ebx
  lea    0x4(,%rax,4),%r15
  xchg   %ax,%ax
L285:
  test   %r12d,%r12d
  jle    L71
  movslq %r14d,%rax
  mov    %r15,%rdx
  xor    %esi,%esi
  lea    0x0(%r13,%rax,4),%rdi
  call   <memset@plt>
L71:
  add    $0x1,%ebx
  add    %r12d,%r14d
  cmp    %ebx,%ebp
  jne    L285
L4:
  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
L1:
  cmp    %ebp,%ebx
  jne    L237
  test   %r14d,%r14d
  jne    L237
  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
L191:
  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    L310
  nopw   0x0(%rax,%rax,1)
L258:
  mov    %ebx,%esi
  lea    0x2(%r14),%eax
  add    %r15d,%ebp
  sub    $0x2,%esi
  js     L95
L45:
  cmp    %eax,%edx
  jle    L95
  mov    %eax,%r14d
  mov    %esi,%ebx
L310:
  cmp    %r12d,%ebx
  jge    L258
  test   %r14d,%r14d
  js     L258
  movslq %ebp,%rax
  mov    0x0(%r13,%rax,4),%esi
  test   %esi,%esi
  jne    L258
  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    L45
L95:
  sub    $0x1,%ebx
  add    $0x5,%r14d
  mov    0x14(%rsp),%r15d
  mov    %ebx,%r11d
  imul   %edx,%r11d
  add    %r14d,%r11d
  mov    %r11d,%ebp
  jmp    L206
  nopl   0x0(%rax,%rax,1)
L112:
  lea    0x2(%rbx),%eax
  lea    -0x2(%r14),%esi
  add    %r15d,%ebp
  cmp    %eax,%r12d
  jle    L163
L198:
  test   %esi,%esi
  js     L163
  mov    %esi,%r14d
  mov    %eax,%ebx
L206:
  test   %ebx,%ebx
  js     L112
  cmp    %edx,%r14d
  jge    L112
  movslq %ebp,%rax
  mov    0x0(%r13,%rax,4),%ecx
  test   %ecx,%ecx
  jne    L112
  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     L198
  nopl   0x0(%rax)
L163:
  mov    %r12d,%ebp
  add    $0x5,%ebx
  mov    %edx,%r12d
  sub    $0x1,%r14d
  cmp    %ebx,%ebp
  jg     L1
  cmp    %r14d,%edx
  jg     L1
  imul   %edx,%ebp
  movslq %ebp,%rax
  lea    -0x4(%r13,%rax,4),%rdx
  mov    (%rdx),%eax
  test   %eax,%eax
  jne    L28
  sub    %r12d,%ebp
  movslq %ebp,%rax
  movl   $0x1,-0x8(%r13,%rax,4)
  movl   $0x1,(%rdx)
L28:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L237:
  lea    -0x2(%rbp),%eax
  cmp    %ebx,%eax
  je     L150
L207:
  lea    0x4(%rbp),%eax
  cmp    %ebx,%eax
  jne    L191
  cmp    $0x2,%r14d
  jne    L191
  test   $0x7,%r12b
  jne    L191
  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    L191
  nopl   0x0(%rax,%rax,1)
L150:
  test   %r14d,%r14d
  jne    L207
  test   $0x3,%r12b
  jne    L111
  cmpl   $0x4,0x1c(%rsp)
  jne    L191
L121:
  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    L191
L111:
  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    L191
  jmp    L121
```

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;
}
```