user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<cluster_statistics>:
  endbr64
  push   %r15
  mov    %esi,%r15d
  imul   %edx,%r15d
  push   %r14
  mov    %edx,%r14d
  push   %r13
  push   %r12
  mov    %rcx,%r12
  mov    %r15d,%edx
  push   %rbp
  mov    %rdi,%rbp
  shr    $0x1f,%edx
  push   %rbx
  mov    %esi,%ebx
  add    %r15d,%edx
  sar    %edx
  lea    0x3(%rdx),%r13d
  sub    $0x38,%rsp
  movslq %r13d,%r13
  mov    %r9,0x10(%rsp)
  shl    $0x2,%r13
  mov    %edx,0x20(%rsp)
  mov    %r13,%rdi
  mov    %r8,0x8(%rsp)
  call   <malloc@plt>
  mov    %r13,%rdi
  mov    %rax,(%rsp)
  call   <malloc@plt>
  lea    0x1(%r15),%edi
  mov    %r15d,0x1c(%rsp)
  movslq %edi,%rdi
  mov    %rax,%r13
  shl    $0x2,%rdi
  call   <malloc@plt>
  cmpl   $0xfffffffb,0x1c(%rsp)
  mov    (%rsp),%r9
  mov    0x20(%rsp),%edx
  mov    %rax,%r15
  jl     L15
  lea    0x2(%rdx),%eax
  mov    %r9,%rdi
  mov    $0xff,%esi
  mov    %r9,(%rsp)
  lea    0x4(,%rax,4),%rdx
  mov    %rdx,0x20(%rsp)
  call   <memset@plt>
  mov    0x20(%rsp),%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    (%rsp),%r9
L15:
  movslq 0x1c(%rsp),%rdi
  movl   $0x0,(%rsp)
  xor    %eax,%eax
  xor    %esi,%esi
  lea    (%r15,%rdi,4),%r8
  test   %edi,%edi
  jle    L138
  cs nopw 0x0(%rax,%rax,1)
L43:
  mov    0x0(%rbp,%rax,4),%edx
  movl   $0xffffffff,(%r15,%rax,4)
  test   %edx,%edx
  je     L38
  movslq %edx,%rcx
  lea    (%r9,%rcx,4),%r10
  movslq (%r10),%rdx
  test   %edx,%edx
  jns    L298
  mov    %esi,(%r10)
  movslq (%r9,%rcx,4),%rdx
  add    $0x1,%esi
L298:
  addl   $0x1,0x0(%r13,%rdx,4)
L38:
  add    $0x1,%rax
  cmp    %rdi,%rax
  jne    L43
  movl   $0xffffffff,(%r8)
  movslq %esi,%rdx
  mov    %rdx,%rdi
  mov    %r9,0x28(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %esi,(%rsp)
  call   <malloc@plt>
  mov    0x20(%rsp),%rdx
  mov    0x28(%rsp),%r9
  mov    %rax,%r8
  lea    0x0(,%rdx,4),%rcx
  mov    %rcx,0x20(%rsp)
  mov    (%rsp),%ecx
  test   %ecx,%ecx
  je     L165
  xor    %esi,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    0x28(%rsp),%r9
  mov    %rax,%r8
L165:
  test   %r14d,%r14d
  jle    L186
  lea    -0x1(%rbx),%eax
  lea    -0x1(%r14),%edx
  imul   %r14d,%eax
  cltq
  lea    0x0(%rbp,%rax,4),%rdi
  add    %rdx,%rax
  lea    0x4(%rbp,%rax,4),%rsi
  xor    %eax,%eax
L89:
  cltq
L20:
  movslq 0x0(%rbp,%rax,4),%rdx
  mov    %eax,%ecx
  test   %edx,%edx
  jne    L287
  add    $0x1,%rax
  cmp    %eax,%r14d
  jg     L20
L186:
  test   %ebx,%ebx
  jle    L162
  movslq %r14d,%rdi
  xor    %edx,%edx
  shl    $0x2,%rdi
  lea    0x0(%rbp,%rdi,1),%r11
L61:
  mov    %r14d,%eax
  mov    %edx,%r10d
  imul   %edx,%eax
  cltq
  lea    0x0(%rbp,%rax,4),%rax
L243:
  movslq (%rax),%rsi
  test   %esi,%esi
  jne    L274
  add    $0x1,%r10d
  add    %rdi,%rax
  cmp    %r10d,%ebx
  jg     L243
  nopl   (%rax)
L162:
  mov    %r9,%rdi
  mov    %r8,0x28(%rsp)
  call   <free@plt>
  mov    0x20(%rsp),%rbx
  movl   $0x0,(%r12)
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    0x8(%rsp),%rcx
  mov    %rbx,%rdi
  mov    %rax,(%rcx)
  call   <malloc@plt>
  mov    0x10(%rsp),%rcx
  mov    %rbx,%rdi
  mov    %rax,(%rcx)
  call   <malloc@plt>
  mov    (%rsp),%edx
  mov    0x28(%rsp),%r8
  mov    %rax,%rbx
  mov    0x70(%rsp),%rax
  test   %edx,%edx
  mov    %rbx,(%rax)
  je     L75
  mov    0x8(%rsp),%rax
  movslq (%rsp),%rcx
  mov    (%rax),%r14
  mov    0x10(%rsp),%rax
  lea    0x0(,%rcx,4),%rdx
  mov    (%rax),%rbp
  lea    (%rbx,%rdx,1),%rax
  lea    (%r14,%rdx,1),%rdi
  cmp    %rax,%rbp
  lea    0x0(%rbp,%rdx,1),%r9
  setae  %sil
  cmp    %r9,%rbx
  setae  %r10b
  or     %r10d,%esi
  cmp    %rax,%r14
  setae  %al
  cmp    %rdi,%rbx
  setae  %r10b
  or     %r10d,%eax
  test   %al,%sil
  je     L112
  cmp    %r9,%r14
  setae  %al
  cmp    %rdi,%rbp
  setae  %sil
  or     %sil,%al
  je     L112
  xor    %esi,%esi
  mov    %r14,%rdi
  mov    %rcx,0x28(%rsp)
  mov    %r8,0x20(%rsp)
  mov    %rdx,(%rsp)
  call   <memset@plt>
  mov    (%rsp),%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    (%rsp),%rdx
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    0x20(%rsp),%r8
  mov    0x28(%rsp),%rcx
L177:
  xor    %edx,%edx
  cs nopw 0x0(%rax,%rax,1)
L29:
  movslq 0x0(%r13,%rdx,4),%rax
  lea    (%r15,%rax,4),%rsi
  mov    %rax,%rdi
  movslq (%rsi),%rax
  test   %eax,%eax
  jns    L358
  movslq (%r12),%rax
  lea    0x1(%rax),%r9d
  mov    %eax,(%rsi)
  mov    %r9d,(%r12)
L358:
  mov    %edi,(%r14,%rax,4)
  movslq (%rsi),%rax
  addl   $0x1,0x0(%rbp,%rax,4)
  movslq (%rsi),%rax
  movsbl (%r8,%rdx,1),%esi
  add    $0x1,%rdx
  add    %esi,(%rbx,%rax,4)
  cmp    %rcx,%rdx
  jne    L29
L75:
  mov    %r13,%rdi
  mov    %r8,(%rsp)
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    (%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rbx
  movslq (%r12),%rsi
  mov    (%rbx),%rdi
  shl    $0x2,%rsi
  call   <realloc@plt>
  movslq (%r12),%rsi
  mov    %rax,(%rbx)
  mov    0x10(%rsp),%rbx
  shl    $0x2,%rsi
  mov    (%rbx),%rdi
  call   <realloc@plt>
  movslq (%r12),%rsi
  mov    %rax,(%rbx)
  mov    0x70(%rsp),%rax
  shl    $0x2,%rsi
  mov    (%rax),%rdi
  call   <realloc@plt>
  mov    0x70(%rsp),%rbx
  cmpq   $0x0,0x78(%rsp)
  mov    %rax,(%rbx)
  je     L303
  cmpq   $0x0,0x80(%rsp)
  je     L303
  mov    0x78(%rsp),%rax
  movl   $0x0,(%rax)
  mov    (%r12),%eax
  test   %eax,%eax
  jle    L207
  mov    0x8(%rsp),%rax
  mov    0x78(%rsp),%r8
  xor    %ecx,%ecx
  mov    (%rax),%rdi
  mov    0x10(%rsp),%rax
  mov    (%rax),%rsi
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L344:
  mov    (%rdi,%rax,4),%edx
  imul   (%rsi,%rax,4),%edx
  add    $0x1,%rax
  add    %edx,%ecx
  mov    %ecx,(%r8)
  cmp    %eax,(%r12)
  jg     L344
  sub    %ecx,0x1c(%rsp)
L207:
  mov    0x80(%rsp),%rax
  mov    0x1c(%rsp),%ebx
  mov    %ebx,(%rax)
L303:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L287:
  mov    %rdi,%rax
  jmp    L2
  nopl   (%rax)
L204:
  add    $0x4,%rax
  cmp    %rax,%rsi
  je     L226
L2:
  cmp    (%rax),%edx
  jne    L204
  movslq (%r9,%rdx,4),%rax
  movb   $0x1,(%r8,%rax,1)
  jmp    L162
  nopl   0x0(%rax,%rax,1)
L274:
  mov    %r11,%rax
  xor    %ecx,%ecx
  jmp    L239
  nop
L60:
  lea    0x1(%rcx),%edx
  add    %rdi,%rax
  cmp    %edx,%ebx
  je     L325
  mov    %edx,%ecx
L239:
  cmp    -0x4(%rax),%esi
  jne    L60
  movslq (%r9,%rsi,4),%rax
  movb   $0x1,(%r8,%rax,1)
  jmp    L162
  nop
L226:
  lea    0x1(%rcx),%eax
  cmp    %eax,%r14d
  jg     L89
  jmp    L186
  nopl   0x0(%rax)
L325:
  lea    0x1(%r10),%edx
  cmp    %ecx,%r10d
  jl     L61
  jmp    L162
L138:
  movl   $0xffffffff,(%r8)
  xor    %edi,%edi
  mov    %r9,0x28(%rsp)
  call   <malloc@plt>
  mov    0x28(%rsp),%r9
  movq   $0x0,0x20(%rsp)
  mov    %rax,%r8
  jmp    L165
L112:
  xor    %eax,%eax
  nopl   (%rax)
L174:
  movl   $0x0,(%r14,%rax,4)
  movl   $0x0,0x0(%rbp,%rax,4)
  movl   $0x0,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L174
  jmp    L177
```

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;
  }
}
```