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

```asm
<emalg>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %edx,-0x4c(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %r9,-0x68(%rbp)
  cmpl   $0x0,0x10(%rbp)
  jne    L13
  mov    -0x48(%rbp),%eax
  jmp    L130
L13:
  mov    -0x4c(%rbp),%eax
L130:
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,0x10(%rbp)
  jne    L151
  mov    -0x4c(%rbp),%eax
  jmp    L145
L151:
  mov    -0x48(%rbp),%eax
L145:
  mov    %eax,-0x28(%rbp)
  mov    -0x44(%rbp),%eax
  mov    $0x4,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x3c(%rbp)
  movl   $0xa,-0x38(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L167
L14:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  add    $0x1,%edx
  mov    %edx,(%rax)
  addl   $0x1,-0x34(%rbp)
L167:
  mov    -0x34(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L14
L33:
  mov    -0x3c(%rbp),%eax
  cltd
  idivl  -0x38(%rbp)
  mov    %edx,%eax
  test   %eax,%eax
  jne    L105
  movl   $0x0,-0x34(%rbp)
  jmp    L97
L169:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x34(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x34(%rbp)
L97:
  mov    -0x34(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L169
  shll   -0x38(%rbp)
L105:
  addl   $0x1,-0x3c(%rbp)
  mov    0x28(%rbp),%r9
  mov    -0x60(%rbp),%r8
  mov    -0x58(%rbp),%rcx
  mov    -0x4c(%rbp),%edx
  mov    -0x48(%rbp),%esi
  mov    -0x44(%rbp),%eax
  sub    $0x8,%rsp
  mov    0x10(%rbp),%edi
  push   %rdi
  push   0x38(%rbp)
  push   0x30(%rbp)
  mov    0x18(%rbp),%r10
  mov    %eax,%edi
  call   *%r10
  add    $0x20,%rsp
  movl   $0x0,-0x40(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L41
L199:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  je     L21
  mov    -0x68(%rbp),%r9
  mov    0x38(%rbp),%r8
  mov    -0x60(%rbp),%rcx
  mov    0x30(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    -0x28(%rbp),%eax
  sub    $0x8,%rsp
  mov    0x10(%rbp),%edi
  push   %rdi
  mov    -0x24(%rbp),%edi
  push   %rdi
  mov    -0x34(%rbp),%edi
  push   %rdi
  mov    0x20(%rbp),%r10
  mov    %eax,%edi
  call   *%r10
  add    $0x20,%rsp
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L163
L148:
  mov    -0x30(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  je     L131
  mov    -0x68(%rbp),%r9
  mov    0x38(%rbp),%r8
  mov    -0x60(%rbp),%rcx
  mov    0x30(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  mov    -0x28(%rbp),%eax
  sub    $0x8,%rsp
  mov    0x10(%rbp),%edi
  push   %rdi
  mov    -0x30(%rbp),%edi
  push   %rdi
  mov    -0x34(%rbp),%edi
  push   %rdi
  mov    0x20(%rbp),%r10
  mov    %eax,%edi
  call   *%r10
  add    $0x20,%rsp
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jbe    L174
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  add    $0x1,%edx
  mov    %edx,(%rax)
  movl   $0x1,-0x40(%rbp)
  jmp    L174
L131:
  nop
L174:
  addl   $0x1,-0x30(%rbp)
L163:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L148
  jmp    L171
L21:
  nop
L171:
  addl   $0x1,-0x34(%rbp)
L41:
  mov    -0x34(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L199
  cmpl   $0x0,-0x40(%rbp)
  je     L38
  mov    0x28(%rbp),%rdx
  mov    -0x10(%rbp),%rcx
  mov    -0x2c(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <equal_clusters@plt>
  test   %eax,%eax
  je     L33
L38:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

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