user: Please show me the C implementation that matches the assembly code listed below:

```asm
<reducerankLB>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %rdi,%rbp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %rdx,%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  mov    %rdi,%r8
  mov    $0x3b9aca00,%ecx
  mov    $0xffffffff,%r10d
  mov    $0xffffffff,%edi
  mov    $0x0,%r11d
  jmp    L212
L70:
  add    $0x1,%rax
  cmp    $0x10,%rax
  je     L190
L136:
  mov    (%rsi,%rax,4),%edx
  cmp    %ecx,%edx
  jge    L70
  mov    %edx,%ecx
  mov    %eax,%r10d
  mov    %r9d,%edi
  jmp    L70
L190:
  add    $0x1,%r11d
  add    $0x40,%rbp
  cmp    $0x10,%r11d
  je     L53
L212:
  mov    %rbp,%rsi
  mov    $0x0,%eax
  mov    %r11d,%r9d
  jmp    L136
L53:
  movslq %edi,%rax
  shl    $0x6,%rax
  mov    0x18(%rsp),%rdi
  add    %rdi,%rax
  movslq %r10d,%r10
  lea    (%rdi,%r10,4),%rdi
  mov    $0x0,%edx
  mov    0x10(%rsp),%r9
L235:
  mov    (%rdi),%esi
  mov    %esi,(%r9,%rdx,1)
  mov    (%rax,%rdx,1),%esi
  sub    %ecx,%esi
  mov    %esi,(%rbx,%rdx,1)
  add    $0x40,%rdi
  add    $0x4,%rdx
  cmp    $0x40,%rdx
  jne    L235
  mov    $0x0,%eax
L163:
  movl   $0x0,0x70(%rsp,%rax,1)
  movl   $0x0,0x30(%rsp,%rax,1)
  add    $0x4,%rax
  cmp    $0x40,%rax
  jne    L163
  lea    0x30(%rsp),%rcx
  mov    %rcx,0x28(%rsp)
  lea    0x70(%rsp),%r10
  mov    %r10,0x8(%rsp)
  mov    0x10(%rsp),%r9
  mov    $0x0,%r15d
  jmp    L147
L102:
  add    $0x4,%rax
  cmp    $0x40,%rax
  je     L140
L305:
  mov    %edi,%edx
  add    (%rbx,%rax,1),%edx
  cmp    (%rsi,%rax,1),%edx
  jle    L102
  addl   $0x1,(%rcx)
  addl   $0x1,0x70(%rsp,%rax,1)
  add    $0x1,%r15d
  jmp    L102
L140:
  add    $0x4,%r9
  add    $0x4,%rcx
  add    $0x40,%r8
  cmp    %rcx,%r10
  je     L370
L147:
  mov    (%r9),%edi
  mov    %r8,%rsi
  mov    $0x0,%eax
  jmp    L305
L370:
  test   %r15d,%r15d
  jg     L92
L355:
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L99
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L172:
  add    $0x1,%rax
  cmp    $0x10,%rax
  je     L35
L381:
  mov    %eax,%esi
  mov    0x30(%rsp,%rax,4),%ecx
  cmp    %edx,%ecx
  jle    L323
  mov    %ecx,%edx
  mov    %eax,%r12d
L323:
  mov    0x70(%rsp,%rax,4),%ecx
  cmp    %edx,%ecx
  jle    L172
  lea    0x10(%rsi),%r12d
  mov    %ecx,%edx
  jmp    L172
L35:
  cmp    $0xf,%r12d
  jg     L311
  movslq %r12d,%r13
  mov    0x10(%rsp),%rax
  lea    (%rax,%r13,4),%r14
  mov    (%r14),%esi
  shl    $0x6,%r13
  add    0x18(%rsp),%r13
  mov    $0x0,%eax
  mov    $0x3b9aca00,%ebp
  mov    $0xffffffff,%edi
  jmp    L187
L333:
  add    $0x1,%rax
  cmp    $0x10,%rax
  je     L6
L187:
  mov    %esi,%edx
  add    (%rbx,%rax,4),%edx
  sub    0x0(%r13,%rax,4),%edx
  test   %edx,%edx
  jle    L333
  cmp    %ebp,%edx
  cmovl  %edx,%ebp
  cmovl  %eax,%edi
  jmp    L333
L6:
  not    %edi
  shr    $0x1f,%edi
  call   <assert@plt>
  sub    %ebp,(%r14)
  mov    $0x0,%ebp
  movslq %r12d,%r12
  jmp    L225
L357:
  add    $0x4,%rbp
  cmp    $0x40,%rbp
  je     L266
L225:
  mov    (%rbx,%rbp,1),%eax
  add    (%r14),%eax
  cmp    0x0(%r13,%rbp,1),%eax
  jne    L357
  mov    0x30(%rsp,%r12,4),%eax
  sub    $0x1,%eax
  mov    %eax,0x30(%rsp,%r12,4)
  mov    0x70(%rsp,%rbp,1),%esi
  lea    -0x1(%rsi),%edi
  mov    %edi,0x70(%rsp,%rbp,1)
  sub    $0x1,%r15d
  not    %eax
  shr    $0x1f,%eax
  mov    %r15d,%edx
  not    %edx
  shr    $0x1f,%edx
  and    %edx,%eax
  not    %edi
  shr    $0x1f,%edi
  and    %eax,%edi
  call   <assert@plt>
  jmp    L357
L311:
  lea    -0x10(%r12),%eax
  mov    %eax,0x20(%rsp)
  movslq %eax,%r12
  shl    $0x2,%r12
  lea    (%rbx,%r12,1),%r14
  mov    (%r14),%r8d
  add    0x18(%rsp),%r12
  mov    %r12,%rcx
  mov    $0x0,%edx
  mov    $0x3b9aca00,%ebp
  mov    $0xffffffff,%edi
  mov    0x10(%rsp),%r9
  jmp    L343
L77:
  add    $0x1,%rdx
  add    $0x40,%rcx
  cmp    $0x10,%rdx
  je     L254
L343:
  mov    %r8d,%eax
  add    (%r9,%rdx,4),%eax
  sub    (%rcx),%eax
  test   %eax,%eax
  jle    L77
  cmp    %ebp,%eax
  cmovl  %eax,%ebp
  cmovl  %edx,%edi
  jmp    L77
L254:
  not    %edi
  shr    $0x1f,%edi
  call   <assert@plt>
  sub    %ebp,(%r14)
  mov    0x28(%rsp),%rbp
  mov    0x10(%rsp),%r13
  movslq 0x20(%rsp),%rax
  mov    %rbx,0x20(%rsp)
  mov    %rax,%rbx
  jmp    L8
L13:
  add    $0x4,%r13
  add    $0x40,%r12
  add    $0x4,%rbp
  cmp    0x8(%rsp),%rbp
  je     L284
L8:
  mov    (%r14),%eax
  add    0x0(%r13),%eax
  cmp    (%r12),%eax
  jne    L13
  mov    0x0(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    %edi,0x0(%rbp)
  mov    0x70(%rsp,%rbx,4),%eax
  sub    $0x1,%eax
  mov    %eax,0x70(%rsp,%rbx,4)
  sub    $0x1,%r15d
  not    %eax
  shr    $0x1f,%eax
  mov    %r15d,%edx
  not    %edx
  shr    $0x1f,%edx
  and    %edx,%eax
  not    %edi
  shr    $0x1f,%edi
  and    %eax,%edi
  call   <assert@plt>
  jmp    L13
L284:
  mov    0x20(%rsp),%rbx
L266:
  test   %r15d,%r15d
  jle    L355
L92:
  mov    $0x0,%eax
  mov    $0x0,%edx
  mov    $0xffffffff,%r12d
  jmp    L381
L99:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void reducerankLB(int t[16][16], int t0[16], int t1[16]) {
  int d, i, j, dd, nd, i1, j1, nmax, dmin, imin, jmin, vmin, n0[16], n1[16];
  vmin = 1000000000;
  imin = jmin = -1;
  for (i = 0; i < 16; i++)
    for (j = 0; j < 16; j++)
      if (t[i][j] < vmin) {
        vmin = t[i][j];
        imin = i;
        jmin = j;
      }
  for (i = 0; i < 16; i++) {
    t0[i] = t[i][jmin];
    t1[i] = t[imin][i] - vmin;
  }
  nd = 0;
  for (i = 0; i < 16; i++)
    n0[i] = n1[i] = 0;
  for (i = 0; i < 16; i++)
    for (j = 0; j < 16; j++)
      if (t0[i] + t1[j] > t[i][j]) {
        n0[i]++;
        n1[j]++;
        nd++;
      }
  while (nd > 0) {
    if (0) {
      printf("             ");
      for (j = 0; j < 16; j++)
        printf(" %4d", n1[j]);
      printf("\n");
      printf("             ");
      for (j = 0; j < 16; j++)
        printf(" %4d", t1[j]);
      printf("\n");
      for (i = 0; i < 16; i++) {
        printf("%4d %4d : ", n0[i], t0[i]);
        for (j = 0; j < 16; j++)
          printf(" %4d", t0[i] + t1[j] - t[i][j]);
        printf("\n");
      }
      printf("\n");
    }
    nmax = 0;
    dd = -1;
    for (i = 0; i < 16; i++) {
      if (n0[i] > nmax) {
        nmax = n0[i];
        dd = i;
      }
      if (n1[i] > nmax) {
        nmax = n1[i];
        dd = 16 + i;
      }
    }
    if (dd < 16) {
      dmin = 1000000000;
      j1 = -1;
      for (j = 0; j < 16; j++) {
        d = (t0[dd] + t1[j]) - t[dd][j];
        if (d > 0 && d < dmin) {
          dmin = d;
          j1 = j;
        }
      }
      assert(j1 >= 0);
      t0[dd] -= dmin;
      for (j = 0; j < 16; j++)
        if (t0[dd] + t1[j] == t[dd][j]) {
          n0[dd]--;
          n1[j]--;
          nd--;
          assert(n0[dd] >= 0 && n1[j] >= 0 && nd >= 0);
        }
    } else {
      dd -= 16;
      dmin = 1000000000;
      i1 = -1;
      for (i = 0; i < 16; i++) {
        d = (t0[i] + t1[dd]) - t[i][dd];
        if (d > 0 && d < dmin) {
          dmin = d;
          i1 = i;
        }
      }
      assert(i1 >= 0);
      t1[dd] -= dmin;
      for (i = 0; i < 16; i++)
        if (t0[i] + t1[dd] == t[i][dd]) {
          n0[i]--;
          n1[dd]--;
          nd--;
          assert(n0[i] >= 0 && n1[dd] >= 0 && nd >= 0);
        }
    }
  }
}
```