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

```asm
<transitive_closure>:
  endbr64
  mov    %esi,%eax
  lea    0x3e(%rsi),%edx
  push   %r15
  add    $0x1f,%eax
  push   %r14
  cmovns %eax,%edx
  push   %r13
  push   %r12
  sar    $0x5,%edx
  push   %rbp
  imul   %edx,%esi
  push   %rbx
  movslq %esi,%rax
  mov    %rdi,-0x10(%rsp)
  lea    (%rdi,%rax,4),%rbx
  cmp    %rbx,%rdi
  jae    L170
  movslq %edx,%rdx
  mov    %rdi,%rax
  xor    %ecx,%ecx
  lea    0x0(,%rdx,4),%rdi
  mov    %rax,-0x18(%rsp)
  mov    %rax,%r9
  lea    -0x1(%rdi),%r12
  mov    %r12,%r13
  shr    $0x2,%r13
  lea    0x4(,%r13,4),%rax
  mov    %rax,-0x20(%rsp)
  nopl   0x0(%rax)
L93:
  mov    $0x1,%ebp
  mov    -0x18(%rsp),%rdx
  mov    -0x10(%rsp),%rax
  lea    0x4(%r9),%r14
  shl    %cl,%ebp
  jmp    L28
  nop
L45:
  mov    %rsi,%rax
L144:
  add    %rdi,%rdx
  cmp    %rbx,%rax
  jae    L163
L28:
  mov    %ebp,%r8d
  and    (%rdx),%r8d
  lea    (%rax,%rdi,1),%rsi
  je     L45
  cmp    %rsi,%rax
  jae    L144
  mov    %rax,%r8
  sub    %r14,%r8
  cmp    $0x8,%r8
  jbe    L69
  cmp    $0x3,%r12
  jbe    L69
  lea    0x1(%r13),%r10
  cmp    $0xb,%r12
  jbe    L12
  mov    %r10,%r8
  xor    %esi,%esi
  shr    $0x2,%r8
  shl    $0x4,%r8
  nopl   (%rax)
L102:
  movdqu (%r9,%rsi,1),%xmm0
  movdqu (%rax,%rsi,1),%xmm2
  por    %xmm2,%xmm0
  movups %xmm0,(%rax,%rsi,1)
  add    $0x10,%rsi
  cmp    %rsi,%r8
  jne    L102
  mov    %r10,%r11
  and    $0xfffffffffffffffc,%r11
  lea    0x0(,%r11,4),%r8
  lea    (%rax,%r8,1),%rsi
  add    %r9,%r8
  cmp    %r11,%r10
  je     L50
  sub    %r11,%r10
  cmp    %r11,%r13
  je     L164
L82:
  lea    (%rax,%r11,4),%r15
  movq   (%r9,%r11,4),%xmm0
  mov    %r10,%r11
  movq   (%r15),%xmm1
  and    $0xfffffffffffffffe,%r11
  por    %xmm1,%xmm0
  movq   %xmm0,(%r15)
  lea    0x0(,%r11,4),%r15
  add    %r15,%rsi
  add    %r15,%r8
  cmp    %r11,%r10
  je     L50
L164:
  mov    (%r8),%r8d
  or     %r8d,(%rsi)
L50:
  add    -0x20(%rsp),%rax
  add    %rdi,%rdx
  cmp    %rbx,%rax
  jb     L28
L163:
  add    $0x1,%ecx
  cmp    $0x20,%ecx
  jne    L172
  addq   $0x4,-0x18(%rsp)
  xor    %ecx,%ecx
L172:
  add    %rdi,%r9
  cmp    %r9,%rbx
  ja     L93
L170:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L69:
  mov    %r9,%r10
  mov    %rax,%r8
  cs nopw 0x0(%rax,%rax,1)
L4:
  add    $0x4,%r8
  add    $0x4,%r10
  mov    -0x4(%r10),%r11d
  or     %r11d,-0x4(%r8)
  cmp    %rsi,%r8
  jb     L4
  jmp    L50
L12:
  mov    %r9,%r8
  mov    %rax,%rsi
  xor    %r11d,%r11d
  jmp    L82
```

assistant: ```c
transitive_closure(R, n) unsigned *R;
int n;
{
  register int rowsize;
  register unsigned i;
  register unsigned *rowj;
  register unsigned *rp;
  register unsigned *rend;
  register unsigned *ccol;
  register unsigned *relend;
  register unsigned *cword;
  register unsigned *rowi;
  rowsize = (((n) + (32 - 1)) / 32);
  relend = R + n * rowsize;
  cword = R;
  i = 0;
  rowi = R;
  while (rowi < relend) {
    ccol = cword;
    rowj = R;
    while (rowj < relend) {
      if (*ccol & (1 << i)) {
        rp = rowi;
        rend = rowj + rowsize;
        while (rowj < rend)
          *rowj++ |= *rp++;
      } else {
        rowj += rowsize;
      }
      ccol += rowsize;
    }
    if (++i >= 32) {
      i = 0;
      cword++;
    }
    rowi += rowsize;
  }
}
```