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

```asm
<mark_cluster_numbers>:
  endbr64
  push   %r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x88,%rsp
  mov    %rsi,(%rsp)
  mov    %ebx,%esi
  mov    %rdx,0x8(%rsp)
  mov    %r8d,%edx
  mov    %ecx,0x14(%rsp)
  mov    $0xffffffff,%ecx
  mov    %r9,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  call   <fill_matrix@plt>
  test   %ebx,%ebx
  jle    L4
  movslq %ebx,%rax
  movl   $0x0,0x10(%rsp)
  xor    %r13d,%r13d
  movslq %r14d,%r15
  mov    %rax,0x30(%rsp)
  lea    0x50(%rsp),%rax
  mov    %rax,0x20(%rsp)
  lea    0x48(%rsp),%rax
  mov    %rax,0x28(%rsp)
L85:
  mov    %r13d,0x1c(%rsp)
  xor    %ebx,%ebx
  test   %r14d,%r14d
  jg     L82
  jmp    L109
  nopl   0x0(%rax)
L127:
  add    $0x1,%rbx
  cmp    %rbx,%r15
  je     L109
L82:
  mov    (%r12,%r13,8),%rax
  mov    (%rax,%rbx,4),%r8d
  test   %r8d,%r8d
  jns    L127
  mov    0x1c(%rsp),%eax
  mov    %ebx,0x4c(%rsp)
  sub    $0x8,%rsp
  mov    %r14d,%ecx
  mov    %eax,0x50(%rsp)
  lea    0x4c(%rsp),%rax
  push   %rax
  mov    0x30(%rsp),%rbp
  mov    0x10(%rsp),%rdi
  mov    0x38(%rsp),%r8
  mov    0x24(%rsp),%edx
  mov    0x18(%rsp),%rsi
  mov    %rbp,%r9
  call   <get_bonded_neighbors@plt>
  mov    0x20(%rsp),%ecx
  mov    (%r12,%r13,8),%rax
  mov    %ecx,(%rax,%rbx,4)
  pop    %rcx
  pop    %rsi
  mov    0x44(%rsp),%edi
  test   %edi,%edi
  jle    L40
  mov    %rbp,%r9
  xor    %ebp,%ebp
  mov    %r14d,%r8d
  mov    %r12,%r14
  mov    %rbx,%r12
  mov    %ebp,%ebx
  mov    %r9,%rbp
L121:
  movslq 0x0(%rbp),%rax
  movslq 0x4(%rbp),%rdx
  mov    (%r14,%rax,8),%rax
  cmpl   $0xffffffff,(%rax,%rdx,4)
  je     L17
L23:
  add    $0x1,%ebx
  add    $0x8,%rbp
  cmp    %ebx,0x44(%rsp)
  jg     L121
  mov    %r12,%rbx
  mov    %r14,%r12
  mov    %r8d,%r14d
L40:
  add    $0x1,%rbx
  addl   $0x1,0x10(%rsp)
  cmp    %rbx,%r15
  jne    L82
  nopl   (%rax)
L109:
  add    $0x1,%r13
  cmp    %r13,0x30(%rsp)
  jne    L85
L64:
  mov    0x38(%rsp),%rax
  test   %rax,%rax
  je     L10
  mov    0x10(%rsp),%edi
  mov    %edi,(%rax)
L10:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L63
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L17:
  sub    $0x8,%rsp
  mov    %rbp,%r9
  mov    %r14,%rdi
  mov    0x18(%rsp),%eax
  push   %rax
  mov    0x24(%rsp),%ecx
  mov    0x18(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    %r8d,0x28(%rsp)
  call   <mark_one_cluster_aux@plt>
  pop    %rax
  pop    %rdx
  mov    0x18(%rsp),%r8d
  jmp    L23
L4:
  movl   $0x0,0x10(%rsp)
  jmp    L64
L63:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void mark_cluster_numbers(int **site_marks, int **vbonds, int **hbonds, int M, int N, int *pnum_clusters) {
  int neighbors[4][2];
  int numnei;
  int i, j, m;
  int A[2];
  int cluster_number = 0;
  fill_matrix(site_marks, M, N, -1);
  for (i = 0; i < M; i++) {
    for (j = 0; j < N; j++) {
      if (site_marks[i][j] >= 0)
        continue;
      A[0] = i;
      A[1] = j;
      get_bonded_neighbors(vbonds, hbonds, M, N, A, neighbors, &numnei);
      site_marks[i][j] = cluster_number;
      for (m = 0; m < numnei; m++) {
        int Bi = neighbors[m][0];
        int Bj = neighbors[m][1];
        if (site_marks[Bi][Bj] == -1) {
          mark_one_cluster_aux(site_marks, vbonds, hbonds, M, N, neighbors[m], cluster_number);
        }
      }
      cluster_number++;
    }
  }
  if (pnum_clusters)
    *pnum_clusters = cluster_number;
}
```