user: Translate the below assembly code into C programming language:

```asm
<cluster_statistics>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %r9,-0x68(%rbp)
  mov    -0x4c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  movl   $0x0,-0x28(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x3,%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x3,%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L300
L135:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L300:
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  add    $0x2,%eax
  cmp    %eax,-0x30(%rbp)
  jle    L135
  movl   $0x0,-0x30(%rbp)
  jmp    L125
L234:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L36
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L64
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x28(%rbp)
L64:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  jmp    L274
L36:
  nop
L274:
  addl   $0x1,-0x30(%rbp)
L125:
  mov    -0x30(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L234
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movl   $0xffffffff,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L323
L216:
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L323:
  mov    -0x30(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L216
  movb   $0x0,-0x31(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L156
L364:
  cmpb   $0x0,-0x31(%rbp)
  jne    L174
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L16
  movl   $0x0,-0x2c(%rbp)
  jmp    L342
L65:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x2c(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L286
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x1,(%rax)
  movb   $0x1,-0x31(%rbp)
  jmp    L215
L286:
  addl   $0x1,-0x2c(%rbp)
L342:
  mov    -0x2c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L65
  jmp    L215
L16:
  nop
L215:
  addl   $0x1,-0x30(%rbp)
L156:
  mov    -0x30(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L364
  jmp    L220
L174:
  nop
L220:
  movl   $0x0,-0x30(%rbp)
  jmp    L39
L91:
  cmpb   $0x0,-0x31(%rbp)
  jne    L173
  mov    -0x30(%rbp),%eax
  imul   -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  je     L253
  movl   $0x0,-0x2c(%rbp)
  jmp    L378
L34:
  mov    -0x30(%rbp),%eax
  imul   -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x2c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x50(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L207
  mov    -0x30(%rbp),%eax
  imul   -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x1,(%rax)
  movb   $0x1,-0x31(%rbp)
  jmp    L31
L207:
  addl   $0x1,-0x2c(%rbp)
L378:
  mov    -0x2c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L34
  jmp    L31
L253:
  nop
L31:
  addl   $0x1,-0x30(%rbp)
L39:
  mov    -0x30(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L91
  jmp    L126
L173:
  nop
L126:
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x58(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    -0x60(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    -0x68(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    0x10(%rbp),%rax
  mov    %rdx,(%rax)
  movl   $0x0,-0x30(%rbp)
  jmp    L132
L82:
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  mov    0x10(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x30(%rbp)
L132:
  mov    -0x30(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L82
  movl   $0x0,-0x30(%rbp)
  jmp    L225
L145:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L166
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
L166:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x10(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x10(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  add    $0x1,%edx
  mov    %edx,(%rax)
  mov    0x10(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    0x10(%rbp),%rax
  mov    (%rax),%rsi
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  mov    -0x18(%rbp),%rax
  add    %rdi,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdi
  mov    -0x10(%rbp),%rax
  add    %rdi,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L225:
  mov    -0x30(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L145
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    -0x60(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    -0x68(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x10(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    0x10(%rbp),%rdx
  mov    %rax,(%rdx)
  cmpq   $0x0,0x18(%rbp)
  je     L149
  cmpq   $0x0,0x20(%rbp)
  je     L149
  mov    0x18(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x0,-0x30(%rbp)
  jmp    L299
L375:
  mov    0x18(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rsi
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  imul   %edx,%eax
  lea    (%rcx,%rax,1),%edx
  mov    0x18(%rbp),%rax
  mov    %edx,(%rax)
  addl   $0x1,-0x30(%rbp)
L299:
  mov    -0x58(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L375
  mov    0x18(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x24(%rbp),%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    0x20(%rbp),%rax
  mov    %edx,(%rax)
L149:
  nop
  leave
  ret
```

assistant: ```c
void cluster_statistics(const int *lattice, int rows, int columns, int *cluster_sizes_total_count, int **cluster_sizes, int **cluster_sizes_counts, int **cluster_sizes_percolated, int *filled_count, int *empty_count) {
  int i;
  int j;
  char percolated;
  int lattice_size;
  int cluster_labels_total_count;
  int *cluster_labels_indices;
  int *cluster_labels_sizes;
  char *cluster_labels_percolated;
  int *cluster_sizes_indices;
  lattice_size = rows * columns;
  cluster_labels_total_count = 0;
  cluster_labels_indices = (int *)malloc((lattice_size / 2 + 3) * sizeof(int));
  cluster_labels_sizes = (int *)malloc((lattice_size / 2 + 3) * sizeof(int));
  cluster_sizes_indices = (int *)malloc((lattice_size + 1) * sizeof(int));
  for (i = 0; i < lattice_size / 2 + 3; i++) {
    cluster_labels_indices[i] = -1;
    cluster_labels_sizes[i] = 0;
  }
  for (i = 0; i < lattice_size; i++) {
    cluster_sizes_indices[i] = -1;
    if (lattice[i] == 0) {
      continue;
    }
    if (cluster_labels_indices[lattice[i]] < 0) {
      cluster_labels_indices[lattice[i]] = cluster_labels_total_count;
      cluster_labels_total_count++;
    }
    cluster_labels_sizes[cluster_labels_indices[lattice[i]]] += 1;
  }
  cluster_sizes_indices[lattice_size] = -1;
  cluster_labels_percolated = (char *)malloc(cluster_labels_total_count * sizeof(char));
  for (i = 0; i < cluster_labels_total_count; i++) {
    cluster_labels_percolated[i] = 0;
  }
  percolated = 0;
  for (i = 0; i < columns; i++) {
    if (percolated) {
      break;
    }
    if (lattice[i] == 0) {
      continue;
    }
    for (j = 0; j < columns; j++) {
      if (lattice[i] == lattice[(rows - 1) * columns + j]) {
        cluster_labels_percolated[cluster_labels_indices[lattice[i]]] = 1;
        percolated = 1;
        break;
      }
    }
  }
  for (i = 0; i < rows; i++) {
    if (percolated) {
      break;
    }
    if (lattice[i * columns] == 0) {
      continue;
    }
    for (j = 0; j < rows; j++) {
      if (lattice[i * columns] == lattice[j * columns + columns - 1]) {
        cluster_labels_percolated[cluster_labels_indices[lattice[i * columns]]] = 1;
        percolated = 1;
        break;
      }
    }
  }
  free(cluster_labels_indices);
  *cluster_sizes_total_count = 0;
  *cluster_sizes = (int *)malloc(cluster_labels_total_count * sizeof(int));
  *cluster_sizes_counts = (int *)malloc(cluster_labels_total_count * sizeof(int));
  *cluster_sizes_percolated = (int *)malloc(cluster_labels_total_count * sizeof(int));
  for (i = 0; i < cluster_labels_total_count; i++) {
    (*cluster_sizes)[i] = 0;
    (*cluster_sizes_counts)[i] = 0;
    (*cluster_sizes_percolated)[i] = 0;
  }
  for (i = 0; i < cluster_labels_total_count; i++) {
    if (cluster_sizes_indices[cluster_labels_sizes[i]] < 0) {
      cluster_sizes_indices[cluster_labels_sizes[i]] = *cluster_sizes_total_count;
      (*cluster_sizes_total_count) += 1;
    }
    (*cluster_sizes)[cluster_sizes_indices[cluster_labels_sizes[i]]] = cluster_labels_sizes[i];
    (*cluster_sizes_counts)[cluster_sizes_indices[cluster_labels_sizes[i]]] += 1;
    (*cluster_sizes_percolated)[cluster_sizes_indices[cluster_labels_sizes[i]]] += cluster_labels_percolated[i];
  }
  free(cluster_labels_sizes);
  free(cluster_sizes_indices);
  free(cluster_labels_percolated);
  *cluster_sizes = realloc(*cluster_sizes, (*cluster_sizes_total_count) * sizeof(int));
  *cluster_sizes_counts = realloc(*cluster_sizes_counts, (*cluster_sizes_total_count) * sizeof(int));
  *cluster_sizes_percolated = realloc(*cluster_sizes_percolated, (*cluster_sizes_total_count) * sizeof(int));
  if (filled_count && empty_count) {
    *filled_count = 0;
    for (i = 0; i < *cluster_sizes_total_count; i++) {
      *filled_count += ((*cluster_sizes)[i]) * ((*cluster_sizes_counts)[i]);
    }
    *empty_count = lattice_size - *filled_count;
  }
}
```