user: 这段汇编代码用C语言表示是什么样的?

```asm
<emalg>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    0x118(%rsp),%rcx
  mov    0x110(%rsp),%eax
  mov    %edi,0x5c(%rsp)
  mov    %esi,0x78(%rsp)
  mov    0x138(%rsp),%rbp
  mov    %rcx,0x80(%rsp)
  mov    0x120(%rsp),%rcx
  mov    %edx,0x7c(%rsp)
  mov    %rcx,0x30(%rsp)
  mov    0x128(%rsp),%rcx
  mov    %r9,0x28(%rsp)
  mov    %rcx,0x38(%rsp)
  mov    0x130(%rsp),%rcx
  mov    %eax,0x48(%rsp)
  mov    %rcx,0x20(%rsp)
  test   %eax,%eax
  jne    L34
  mov    %esi,0x60(%rsp)
  mov    %edx,0x58(%rsp)
L242:
  mov    $0x4,%esi
  call   <calloc@plt>
  mov    0x60(%rsp),%ebx
  mov    %rax,%r15
  lea    0x0(,%rbx,4),%edi
  call   <malloc@plt>
  mov    %rax,0x68(%rsp)
  test   %ebx,%ebx
  jle    L52
  mov    0x60(%rsp),%esi
  mov    0x38(%rsp),%rcx
  lea    -0x1(%rsi),%edx
  lea    0x4(%rcx),%rsi
  mov    %rcx,%rax
  mov    %edx,0x74(%rsp)
  lea    (%rsi,%rdx,4),%rcx
  nopl   0x0(%rax,%rax,1)
L5:
  movslq (%rax),%rdx
  add    $0x4,%rax
  addl   $0x1,(%r15,%rdx,4)
  cmp    %rcx,%rax
  jne    L5
L92:
  mov    0x68(%rsp),%rcx
  movl   $0xa,0x70(%rsp)
  movl   $0x0,0x64(%rsp)
  mov    %rcx,%rax
  sub    %rsi,%rax
  mov    0x60(%rsp),%esi
  cmp    $0x8,%rax
  seta   %dl
  cmpl   $0x2,0x74(%rsp)
  seta   %al
  and    %eax,%edx
  mov    %esi,%eax
  and    $0xfffffffc,%esi
  shr    $0x2,%eax
  mov    %dl,0x8b(%rsp)
  mov    0x38(%rsp),%rdx
  sub    $0x1,%eax
  mov    %esi,0x8c(%rsp)
  add    $0x1,%rax
  shl    $0x4,%rax
  mov    %rax,0x90(%rsp)
  movslq %esi,%rax
  shl    $0x2,%rax
  lea    (%rdx,%rax,1),%rdi
  add    %rcx,%rax
  mov    %rax,0xa0(%rsp)
  lea    0x1(%rsi),%eax
  mov    %eax,0xc8(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rdi,0x98(%rsp)
  lea    (%rdx,%rax,1),%rdi
  add    %rcx,%rax
  mov    %rax,0xc0(%rsp)
  lea    0x2(%rsi),%eax
  mov    %eax,0xcc(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rdi,0xa8(%rsp)
  lea    (%rdx,%rax,1),%rsi
  add    %rcx,%rax
  mov    %rsi,0xb8(%rsp)
  mov    %rax,0xb0(%rsp)
  nopl   0x0(%rax,%rax,1)
L27:
  mov    0x64(%rsp),%eax
  cltd
  idivl  0x70(%rsp)
  test   %edx,%edx
  je     L136
L237:
  addl   $0x1,0x64(%rsp)
  sub    $0x8,%rsp
  mov    %r12,%rcx
  mov    %r13,%r8
  mov    0x50(%rsp),%eax
  push   %rax
  push   %rbp
  push   0x38(%rsp)
  mov    0x7c(%rsp),%ebx
  mov    0x58(%rsp),%r9
  mov    0x9c(%rsp),%edx
  mov    0x98(%rsp),%esi
  mov    %ebx,%edi
  mov    0xa0(%rsp),%rax
  call   *%rax
  mov    0x80(%rsp),%ecx
  add    $0x20,%rsp
  test   %ecx,%ecx
  jle    L12
  mov    0x74(%rsp),%eax
  movl   $0x0,0x4c(%rsp)
  xor    %r14d,%r14d
  mov    %rax,0x50(%rsp)
  movslq %ebx,%rax
  mov    %r15,%rbx
  mov    %rax,0x10(%rsp)
  mov    %rbp,%rax
  mov    %r14,%rbp
  mov    %rax,%r14
  nopl   0x0(%rax,%rax,1)
L38:
  mov    0x38(%rsp),%rax
  mov    %ebp,0x1c(%rsp)
  movslq (%rax,%rbp,4),%rax
  cmpl   $0x1,(%rbx,%rax,4)
  mov    %eax,0x18(%rsp)
  mov    %rax,%rcx
  je     L126
  sub    $0x8,%rsp
  mov    %r14,%r8
  mov    %r12,%rsi
  mov    0x50(%rsp),%eax
  push   %rax
  push   %rcx
  mov    %r13,%rcx
  push   %rbp
  mov    0x48(%rsp),%r9
  mov    0x40(%rsp),%rdx
  mov    0x78(%rsp),%edi
  mov    0x50(%rsp),%rax
  call   *%rax
  movsd  %xmm0,0x28(%rsp)
  mov    0x7c(%rsp),%edx
  add    $0x20,%rsp
  test   %edx,%edx
  jle    L126
  xor    %r15d,%r15d
  mov    %rbp,0x40(%rsp)
  mov    %r14,%rbp
  mov    %rbx,%r14
  mov    %r15,%rbx
  mov    0x58(%rsp),%r15d
  nopl   0x0(%rax,%rax,1)
L203:
  cmp    %ebx,0x18(%rsp)
  je     L180
  sub    $0x8,%rsp
  mov    %rbp,%r8
  mov    %r13,%rcx
  mov    %r12,%rsi
  mov    0x50(%rsp),%eax
  mov    %r15d,%edi
  push   %rax
  push   %rbx
  mov    0x34(%rsp),%eax
  push   %rax
  mov    0x48(%rsp),%r9
  mov    0x40(%rsp),%rdx
  mov    0x50(%rsp),%rax
  call   *%rax
  movsd  0x28(%rsp),%xmm1
  add    $0x20,%rsp
  comisd %xmm0,%xmm1
  jbe    L180
  mov    0x38(%rsp),%rax
  mov    0x40(%rsp),%rdi
  movl   $0x1,0x4c(%rsp)
  movsd  %xmm0,0x8(%rsp)
  movslq (%rax,%rdi,4),%rdx
  subl   $0x1,(%r14,%rdx,4)
  mov    %ebx,(%rax,%rdi,4)
  addl   $0x1,(%r14,%rbx,4)
L180:
  add    $0x1,%rbx
  cmp    0x10(%rsp),%rbx
  jne    L203
  mov    %r14,%rbx
  mov    %rbp,%r14
  mov    0x40(%rsp),%rbp
L126:
  lea    0x1(%rbp),%rax
  cmp    0x50(%rsp),%rbp
  je     L144
  mov    %rax,%rbp
  jmp    L38
  nopl   0x0(%rax)
L144:
  mov    0x4c(%rsp),%eax
  mov    %rbx,%r15
  mov    %r14,%rbp
  test   %eax,%eax
  je     L12
  mov    0x38(%rsp),%rdx
  mov    0x68(%rsp),%rsi
  mov    0x60(%rsp),%edi
  call   <equal_clusters@plt>
  test   %eax,%eax
  je     L27
L12:
  mov    0x68(%rsp),%rdi
  call   <free@plt>
  add    $0xd8,%rsp
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
L136:
  mov    0x60(%rsp),%esi
  test   %esi,%esi
  jle    L35
  cmpb   $0x0,0x8b(%rsp)
  je     L150
  mov    0x68(%rsp),%rdx
  mov    0x90(%rsp),%rcx
  xor    %eax,%eax
  mov    0x38(%rsp),%rsi
  nopw   0x0(%rax,%rax,1)
L76:
  movdqu (%rsi,%rax,1),%xmm2
  movups %xmm2,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L76
  mov    0x60(%rsp),%esi
  cmp    %esi,0x8c(%rsp)
  je     L35
  mov    0x98(%rsp),%rax
  mov    0xa0(%rsp),%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    0xc8(%rsp),%eax
  cmp    %eax,%esi
  jle    L35
  mov    0xa8(%rsp),%rax
  mov    0xc0(%rsp),%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    0xcc(%rsp),%eax
  cmp    %eax,%esi
  jle    L35
  mov    0xb8(%rsp),%rax
  mov    0xb0(%rsp),%rsi
  mov    (%rax),%eax
  mov    %eax,(%rsi)
L35:
  shll   0x70(%rsp)
  jmp    L237
L34:
  mov    0x78(%rsp),%eax
  mov    %edx,0x60(%rsp)
  mov    %eax,0x58(%rsp)
  jmp    L242
L150:
  mov    0x74(%rsp),%ecx
  mov    0x68(%rsp),%rsi
  xor    %eax,%eax
  mov    0x38(%rsp),%rdi
  nopl   0x0(%rax,%rax,1)
L105:
  mov    (%rdi,%rax,4),%edx
  mov    %edx,(%rsi,%rax,4)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L105
  jmp    L35
L52:
  mov    0x60(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x74(%rsp)
  mov    0x38(%rsp),%rax
  lea    0x4(%rax),%rsi
  jmp    L92
```

assistant: ```c
void emalg(int nclusters, int nrows, int ncolumns, double **data, int **mask, double weight[], int transpose, void getclustercenter(int, int, int, double **, int **, int[], double **, int **, int), double metric(int, double **, double **, int **, int **, const double[], int, int, int), int clusterid[], double **cdata, int **cmask) {
  const int nitems = (transpose == 0) ? nrows : ncolumns;
  const int ndata = (transpose == 0) ? ncolumns : nrows;
  int *cn = calloc(nclusters, sizeof(int));
  int *savedids = malloc(nitems * sizeof(int));
  int changed;
  int iteration = 0;
  int period = 10;
  int i, j;
  for (i = 0; i < nitems; i++)
    cn[clusterid[i]]++;
  do {
    if (iteration % period == 0) {
      for (i = 0; i < nitems; i++)
        savedids[i] = clusterid[i];
      period *= 2;
    }
    iteration++;
    getclustercenter(nclusters, nrows, ncolumns, data, mask, clusterid, cdata, cmask, transpose);
    changed = 0;
    for (i = 0; i < nitems; i++) {
      double distance;
      int jnow = clusterid[i];
      if (cn[jnow] == 1)
        continue;
      distance = metric(ndata, data, cdata, mask, cmask, weight, i, jnow, transpose);
      for (j = 0; j < nclusters; j++) {
        double tdistance;
        if (j == jnow)
          continue;
        tdistance = metric(ndata, data, cdata, mask, cmask, weight, i, j, transpose);
        if (tdistance < distance) {
          distance = tdistance;
          cn[clusterid[i]]--;
          clusterid[i] = j;
          cn[j]++;
          changed = 1;
        }
      }
    }
  } while (changed && !equal_clusters(nitems, savedids, clusterid));
  free(savedids);
  free(cn);
  return;
}
```