user: What would the C source look like for the assembly code provided here?

```asm
<kmeans_enhanced>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x38,%rsp
  mov    (%rcx),%ecx
  mov    (%rdx),%edx
  mov    (%rsi),%esi
  mov    0x70(%rsp),%r15
  mov    %r8,0x18(%rsp)
  mov    (%r8),%r8d
  mov    0x78(%rsp),%rbp
  mov    %rdi,0x28(%rsp)
  mov    %r9,0x20(%rsp)
  call   <clusters_init@plt>
  mov    %rax,%r13
  mov    0x20(%rsp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jle    L6
  xor    %r11d,%r11d
  mov    %r12,0x8(%rsp)
  mov    %r15,%r12
  mov    %rbp,%r15
  mov    %rbx,0x10(%rsp)
  mov    %r11d,%ebp
  mov    0x28(%rsp),%rbx
  jmp    L80
  nopl   (%rax)
L101:
  test   %eax,%eax
  je     L64
L80:
  sub    $0x8,%rsp
  mov    (%r14),%esi
  mov    %rbx,%rdi
  mov    %r13,%r9
  push   %rbp
  add    $0x1,%ebp
  push   %r15
  mov    (%r12),%eax
  push   %rax
  mov    0x38(%rsp),%rax
  mov    (%rax),%r8d
  mov    0x30(%rsp),%rax
  mov    (%rax),%ecx
  mov    0x28(%rsp),%rax
  mov    (%rax),%edx
  call   <kmeans_enhanced_it@plt>
  mov    0x40(%rsp),%rdi
  add    $0x20,%rsp
  cmp    %ebp,(%rdi)
  jg     L101
L64:
  mov    0x8(%rsp),%r12
  mov    0x10(%rsp),%rbx
  mov    %r15,%rbp
L6:
  mov    (%r14),%edi
  test   %edi,%edi
  jle    L32
  mov    (%r12),%ecx
  xor    %r8d,%r8d
  nopl   0x0(%rax,%rax,1)
L42:
  test   %ecx,%ecx
  jle    L87
  mov    (%rbx),%eax
  xor    %r9d,%r9d
  nopl   0x0(%rax)
L72:
  mov    %ecx,%edx
  imul   %r8d,%edx
  add    %r9d,%edx
  movslq %edx,%rdx
  lea    0x0(%rbp,%rdx,4),%rsi
  movslq (%rsi),%rdx
  test   %eax,%eax
  jle    L87
  mov    0x0(%r13,%rdx,8),%rdi
  mov    $0x1,%ecx
  mov    (%rdi),%eax
  mov    %eax,(%rsi)
  mov    (%rbx),%eax
  cmp    $0x1,%eax
  jle    L66
  nopl   (%rax)
L106:
  mov    (%r12),%edx
  mov    (%r14),%eax
  mov    (%rdi,%rcx,4),%esi
  imul   %edx,%eax
  imul   %r8d,%edx
  imul   %ecx,%eax
  add    $0x1,%rcx
  add    %r9d,%edx
  add    %edx,%eax
  cltq
  mov    %esi,0x0(%rbp,%rax,4)
  mov    (%rbx),%eax
  cmp    %ecx,%eax
  jg     L106
L66:
  mov    (%r12),%ecx
  add    $0x1,%r9d
  mov    (%r14),%edi
  cmp    %ecx,%r9d
  jl     L72
L87:
  add    $0x1,%r8d
  cmp    %edi,%r8d
  jl     L42
L32:
  mov    0x18(%rsp),%rax
  mov    %r13,%rdi
  mov    (%rax),%esi
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <clusters_destroy@plt>
```

assistant: ```c
void kmeans_enhanced(int *image, int *width, int *height, int *depth, int *k, int *maxit, int *mean_colors, int *ret) {
  int **clusters;
  int i = 0, j = 0, d = 0;
  int changed = 1;
  clusters = clusters_init(image, *width, *height, *depth, *k);
  i = 0;
  while (i < *maxit && changed) {
    changed = kmeans_enhanced_it(image, *width, *height, *depth, *k, clusters, *mean_colors, ret, i);
    i++;
  }
  for (i = 0; i < *width; i++) {
    for (j = 0; j < *height; j++) {
      int cluster = ret[((*height) * (i) + (j) + (*width) * (*height) * (0))];
      for (d = 0; d < *depth; d++) {
        ret[((*height) * (i) + (j) + (*width) * (*height) * (d))] = (*mean_colors) ? clusters[cluster][d] : clusters[cluster][d];
      }
    }
  }
  clusters = clusters_destroy(clusters, *k);
}
```