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

```asm
<assign_class_by_k_medoids>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,-0x84(%rbp)
  mov    %esi,-0x88(%rbp)
  mov    %rdx,-0x90(%rbp)
  mov    %rcx,-0x98(%rbp)
  mov    %r8,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0x64,-0x6c(%rbp)
  mov    -0x88(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L171:
  cmp    %rdx,%rsp
  je     L14
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L171
L14:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L123
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L123:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x84(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L5:
  cmp    %rdx,%rsp
  je     L182
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L5
L182:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L99
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L99:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x98(%rbp),%rdx
  mov    -0x88(%rbp),%ecx
  mov    -0x84(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <srswor@plt>
  lea    -0x68(%rbp),%r8
  mov    -0xa0(%rbp),%rdi
  mov    -0x98(%rbp),%rcx
  mov    -0x90(%rbp),%rdx
  mov    -0x88(%rbp),%esi
  mov    -0x84(%rbp),%eax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <assign_class_id_compute_total_cost@plt>
  movl   $0x0,-0x78(%rbp)
  jmp    L125
L177:
  mov    -0x50(%rbp),%r8
  mov    -0xa0(%rbp),%rdi
  mov    -0x98(%rbp),%rcx
  mov    -0x90(%rbp),%rdx
  mov    -0x88(%rbp),%esi
  mov    -0x84(%rbp),%eax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <classify_by_EDM@plt>
  lea    -0x60(%rbp),%r8
  mov    -0x40(%rbp),%rdi
  mov    -0x50(%rbp),%rcx
  mov    -0x90(%rbp),%rdx
  mov    -0x88(%rbp),%esi
  mov    -0x84(%rbp),%eax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <assign_class_id_compute_total_cost@plt>
  movsd  -0x60(%rbp),%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L32
  jmp    L105
L32:
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movl   $0x0,-0x70(%rbp)
  jmp    L69
L175:
  mov    -0x70(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x98(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x50(%rbp),%rax
  mov    -0x70(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,(%rcx)
  addl   $0x1,-0x70(%rbp)
L69:
  mov    -0x70(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L175
  movl   $0x0,-0x74(%rbp)
  jmp    L151
L157:
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa0(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x40(%rbp),%rax
  mov    -0x74(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,4),%eax
  mov    %eax,(%rcx)
  addl   $0x1,-0x74(%rbp)
L151:
  mov    -0x74(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L157
  addl   $0x1,-0x78(%rbp)
L125:
  mov    -0x78(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jl     L177
L105:
  movl   $0x0,-0x74(%rbp)
  jmp    L77
L146:
  movl   $0x0,-0x70(%rbp)
  jmp    L88
L164:
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x70(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x98(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jne    L30
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rax,%rdx
  mov    -0x70(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L107
L30:
  addl   $0x1,-0x70(%rbp)
L88:
  mov    -0x70(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L164
L107:
  addl   $0x1,-0x74(%rbp)
L77:
  mov    -0x74(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L146
  mov    %rbx,%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L113
  call   <__stack_chk_fail@plt>
L113:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void assign_class_by_k_medoids(int N_X, int K, double **EDM, int *center_id, int *class_id) {
  int max_kmed_iter = 100;
  int i, n_X, k;
  int new_center_id[K], new_class_id[N_X];
  double total_cost = 0.0, new_total_cost = 0.0;
  srswor(N_X, K, center_id);
  assign_class_id_compute_total_cost(N_X, K, EDM, center_id, class_id, &total_cost);
  for (i = 0; i < max_kmed_iter; i++) {
    classify_by_EDM(N_X, K, EDM, center_id, class_id, new_center_id);
    assign_class_id_compute_total_cost(N_X, K, EDM, new_center_id, new_class_id, &new_total_cost);
    if (new_total_cost < total_cost) {
      total_cost = new_total_cost;
      for (k = 0; k < K; k++) {
        center_id[k] = new_center_id[k];
      }
      for (n_X = 0; n_X < N_X; n_X++) {
        class_id[n_X] = new_class_id[n_X];
      }
    } else {
      break;
    }
  }
  for (n_X = 0; n_X < N_X; n_X++) {
    for (k = 0; k < K; k++) {
      if (class_id[n_X] == center_id[k]) {
        class_id[n_X] = k;
        break;
      }
    }
  }
}
```