user: Converte this assembly snippet into its equivalent C code:

```asm
<transitive_closure>:
  endbr64
  mov    %esi,%eax
  push   %r15
  imul   %esi,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  cltq
  push   %rbx
  lea    (%rdi,%rax,4),%rbx
  mov    %rdi,-0x10(%rsp)
  cmp    %rbx,%rdi
  jae    L117
  movslq %esi,%rsi
  mov    %rdi,%rax
  xor    %ecx,%ecx
  lea    0x0(,%rsi,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)
  nopw   0x0(%rax,%rax,1)
L42:
  mov    $0x1,%ebp
  mov    -0x18(%rsp),%rdx
  mov    -0x10(%rsp),%rax
  lea    0x4(%r9),%r14
  shl    %cl,%ebp
  jmp    L14
  nopw   0x0(%rax,%rax,1)
L143:
  mov    %rsi,%rax
L164:
  add    %rdi,%rdx
  cmp    %rbx,%rax
  jae    L161
L14:
  mov    %ebp,%r8d
  and    (%rdx),%r8d
  lea    (%rax,%rdi,1),%rsi
  je     L143
  cmp    %rsi,%rax
  jae    L164
  mov    %rax,%r8
  sub    %r14,%r8
  cmp    $0x8,%r8
  jbe    L17
  cmp    $0x3,%r12
  jbe    L17
  lea    0x1(%r13),%r10
  cmp    $0xb,%r12
  jbe    L171
  mov    %r10,%r8
  xor    %esi,%esi
  shr    $0x2,%r8
  shl    $0x4,%r8
  nopl   (%rax)
L132:
  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    L132
  mov    %r10,%r11
  and    $0xfffffffffffffffc,%r11
  lea    0x0(,%r11,4),%r8
  lea    (%rax,%r8,1),%rsi
  add    %r9,%r8
  cmp    %r11,%r10
  je     L149
  sub    %r11,%r10
  cmp    %r11,%r13
  je     L20
L133:
  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     L149
L20:
  mov    (%r8),%r8d
  or     %r8d,(%rsi)
L149:
  add    -0x20(%rsp),%rax
  add    %rdi,%rdx
  cmp    %rbx,%rax
  jb     L14
L161:
  add    $0x1,%ecx
  cmp    $0x20,%ecx
  jne    L70
  addq   $0x4,-0x18(%rsp)
  xor    %ecx,%ecx
L70:
  add    %rdi,%r9
  cmp    %r9,%rbx
  ja     L42
L117:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L17:
  mov    %r9,%r10
  mov    %rax,%r8
  cs nopw 0x0(%rax,%rax,1)
L26:
  add    $0x4,%r8
  add    $0x4,%r10
  mov    -0x4(%r10),%r11d
  or     %r11d,-0x4(%r8)
  cmp    %rsi,%r8
  jb     L26
  jmp    L149
L171:
  mov    %r9,%r8
  mov    %rax,%rsi
  xor    %r11d,%r11d
  jmp    L133
```

assistant: ```c
void transitive_closure(unsigned *R, int n) {
  int rowsize;
  unsigned i;
  unsigned *rowj;
  unsigned *rp;
  unsigned *rend;
  unsigned *ccol;
  unsigned *relend;
  unsigned *cword;
  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;
  }
}
```