user: What is the c source code of the assembly code below:

```asm
<assign_class_by_k_medoids>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %esi,%r15d
  mov    %rdx,-0x60(%rbp)
  mov    %rcx,%rbx
  mov    %r8,%r13
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L83:
  cmp    %rdx,%rsp
  je     L184
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L83
L184:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L4
  orq    $0x0,-0x8(%rsp,%rax,1)
L4:
  mov    %rsp,%r12
  movslq -0x54(%rbp),%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffffff0,%rdx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L215:
  cmp    %rcx,%rsp
  je     L46
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L215
L46:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L178
  orq    $0x0,-0x8(%rsp,%rax,1)
L178:
  mov    %rsp,%r14
  movq   $0x0,-0x48(%rbp)
  movq   $0x0,-0x40(%rbp)
  mov    %rbx,%rdx
  mov    %r15d,%esi
  mov    -0x54(%rbp),%edi
  call   <srswor@plt>
  lea    -0x48(%rbp),%r9
  mov    %r13,%r8
  mov    %rbx,%rcx
  mov    -0x60(%rbp),%rdx
  mov    %r15d,%esi
  mov    -0x54(%rbp),%edi
  call   <assign_class_id_compute_total_cost@plt>
  movl   $0x64,-0x58(%rbp)
  lea    -0x40(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  jmp    L136
L36:
  subl   $0x1,-0x58(%rbp)
  je     L138
L136:
  mov    %r12,%r9
  mov    %r13,%r8
  mov    %rbx,%rcx
  mov    -0x60(%rbp),%rdx
  mov    %r15d,%esi
  mov    -0x54(%rbp),%edi
  call   <classify_by_EDM@plt>
  mov    -0x68(%rbp),%r9
  mov    %r14,%r8
  mov    %r12,%rcx
  mov    -0x60(%rbp),%rdx
  mov    %r15d,%esi
  mov    -0x54(%rbp),%edi
  call   <assign_class_id_compute_total_cost@plt>
  movsd  -0x40(%rbp),%xmm0
  movsd  -0x48(%rbp),%xmm1
  comisd %xmm0,%xmm1
  jbe    L138
  movsd  %xmm0,-0x48(%rbp)
  test   %r15d,%r15d
  jle    L21
  mov    %r15d,%ecx
  mov    $0x0,%eax
L23:
  mov    (%r12,%rax,4),%edx
  mov    %edx,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L23
L21:
  mov    -0x54(%rbp),%eax
  test   %eax,%eax
  jle    L36
  mov    %eax,%ecx
  mov    $0x0,%eax
L196:
  mov    (%r14,%rax,4),%edx
  mov    %edx,0x0(%r13,%rax,4)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L196
  jmp    L36
L138:
  mov    -0x54(%rbp),%eax
  test   %eax,%eax
  jle    L107
  mov    %r13,%rdi
  lea    -0x1(%rax),%eax
  lea    0x4(%r13,%rax,4),%r9
  mov    %r15d,%esi
  jmp    L214
L37:
  mov    %eax,(%r8)
L61:
  add    $0x4,%rdi
  cmp    %r9,%rdi
  je     L107
L214:
  test   %r15d,%r15d
  jle    L61
  mov    %rdi,%r8
  mov    (%rdi),%edx
  mov    $0x0,%eax
L209:
  cmp    (%rbx,%rax,4),%edx
  je     L37
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L209
  jmp    L61
L107:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L0:
  call   <__stack_chk_fail@plt>
```

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