user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<assign_class_by_pam>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x68,%rsp
  mov    %rdx,0x20(%rsp)
  mov    %esi,0x1c(%rsp)
  mov    %rcx,0x30(%rsp)
  call   <allocate_double_1D@plt>
  mov    %ebp,%edi
  movslq %eax,%r11
  xor    %eax,%eax
  mov    %r11,0x8(%rsp)
  call   <allocate_double_1D@plt>
  mov    %ebp,%edi
  movslq %eax,%r10
  xor    %eax,%eax
  mov    %r10,0x10(%rsp)
  call   <allocate_double_1D@plt>
  mov    $0x1,%edi
  movslq %eax,%r13
  xor    %eax,%eax
  call   <allocate_double_1D@plt>
  mov    $0x2,%edi
  cltq
  mov    %rax,0x40(%rsp)
  xor    %eax,%eax
  call   <allocate_double_1D@plt>
  mov    %ebp,%edi
  cltq
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  call   <allocate_int_1D@plt>
  mov    %ebp,%edi
  movslq %eax,%r14
  xor    %eax,%eax
  call   <allocate_int_1D@plt>
  mov    %ebp,%edi
  movslq %eax,%r15
  xor    %eax,%eax
  call   <allocate_int_1D@plt>
  mov    $0x1,%edi
  movslq %eax,%r12
  xor    %eax,%eax
  call   <allocate_int_1D@plt>
  mov    0x20(%rsp),%rdx
  cltq
  mov    %rax,0x50(%rsp)
  mov    (%rdx),%rax
  sub    $0x8,%rax
  mov    %rax,0x58(%rsp)
  test   %ebp,%ebp
  jle    L167
  mov    0x8(%rsp),%r11
  mov    0x10(%rsp),%r10
  mov    %ebp,%edx
  lea    0x0(,%rdx,8),%rax
  lea    0x0(,%rdx,4),%r9
  mov    %r11,%rdi
  mov    %r10,%rsi
  lea    0x0(%r13,%rax,1),%rcx
  mov    %rax,0x28(%rsp)
  add    %rax,%rdi
  add    %rax,%rsi
  lea    (%r9,%r15,1),%rdx
  mov    %r9,0x20(%rsp)
  lea    (%r9,%r14,1),%rax
  lea    (%r9,%r12,1),%r8
  add    %rbx,%r9
  cmp    %rdi,%r10
  mov    %r9,0x38(%rsp)
  setae  %r9b
  cmp    %rsi,%r11
  setae  %r10b
  or     %r10d,%r9d
  cmp    %r11,%rcx
  setbe  %r10b
  cmp    %r13,%rdi
  setbe  %r11b
  or     %r11d,%r10d
  and    %r9d,%r10d
  cmp    %rax,0x8(%rsp)
  setae  %r9b
  cmp    %r14,%rdi
  setbe  %r11b
  or     %r11d,%r9d
  and    %r10d,%r9d
  cmp    %rdx,0x8(%rsp)
  setae  %r10b
  cmp    %r15,%rdi
  setbe  %r11b
  or     %r11d,%r10d
  and    %r9d,%r10d
  cmp    %r8,0x8(%rsp)
  setae  %r9b
  cmp    %r12,%rdi
  setbe  %r11b
  or     %r11d,%r9d
  mov    0x8(%rsp),%r11
  and    %r10d,%r9d
  cmp    0x38(%rsp),%r11
  mov    0x10(%rsp),%r11
  setae  %r10b
  cmp    %rdi,%rbx
  setae  %dil
  or     %r10d,%edi
  and    %r9d,%edi
  cmp    %r11,%rcx
  setbe  %r9b
  cmp    %r13,%rsi
  setbe  %r10b
  or     %r10d,%r9d
  and    %edi,%r9d
  cmp    %rax,%r11
  setae  %dil
  cmp    %r14,%rsi
  setbe  %r10b
  or     %r10d,%edi
  and    %r9d,%edi
  cmp    %rdx,%r11
  setae  %r9b
  cmp    %r15,%rsi
  setbe  %r10b
  or     %r10d,%r9d
  and    %edi,%r9d
  cmp    %r8,%r11
  setae  %dil
  cmp    %r12,%rsi
  setbe  %r10b
  or     %r10d,%edi
  mov    %r9d,%r10d
  mov    %r11,%r9
  mov    0x38(%rsp),%r11
  and    %edi,%r10d
  cmp    %r11,%r9
  setae  %r9b
  cmp    %rsi,%rbx
  setae  %dil
  or     %r9d,%edi
  and    %r10d,%edi
  cmp    %rax,%r13
  setae  %sil
  cmp    %r14,%rcx
  setbe  %r9b
  or     %r9d,%esi
  and    %edi,%esi
  cmp    %rdx,%r13
  setae  %dil
  cmp    %r15,%rcx
  setbe  %r9b
  or     %r9d,%edi
  and    %esi,%edi
  cmp    %r8,%r13
  setae  %sil
  cmp    %r12,%rcx
  setbe  %r9b
  or     %r9d,%esi
  and    %edi,%esi
  cmp    %r11,%r13
  setae  %dil
  cmp    %rcx,%rbx
  setae  %cl
  or     %edi,%ecx
  and    %esi,%ecx
  cmp    %rdx,%r14
  setae  %sil
  cmp    %r15,%rax
  setbe  %dil
  or     %edi,%esi
  and    %ecx,%esi
  cmp    %r8,%r14
  setae  %cl
  cmp    %r12,%rax
  setbe  %dil
  or     %edi,%ecx
  and    %ecx,%esi
  cmp    %r11,%r14
  mov    %esi,%edi
  setae  %sil
  cmp    %rax,%rbx
  setae  %cl
  or     %esi,%ecx
  and    %edi,%ecx
  cmp    %r8,%r15
  setae  %al
  cmp    %r12,%rdx
  setbe  %sil
  or     %esi,%eax
  and    %ecx,%eax
  cmp    %r11,%r15
  setae  %cl
  cmp    %rdx,%rbx
  setae  %sil
  or     %esi,%ecx
  test   %cl,%al
  je     L160
  cmp    %r11,%r12
  setae  %al
  cmp    %r8,%rbx
  setae  %cl
  or     %cl,%al
  je     L160
  mov    0x20(%rsp),%rdx
  xor    %esi,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  mov    0x20(%rsp),%rdx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    0x20(%rsp),%rdx
  xor    %esi,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  mov    0x20(%rsp),%rdx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    0x28(%rsp),%rdx
  xor    %esi,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    0x28(%rsp),%rdx
  mov    0x10(%rsp),%rdi
  xor    %esi,%esi
  call   <memset@plt>
  mov    0x28(%rsp),%rdx
  mov    0x8(%rsp),%rdi
  xor    %esi,%esi
  call   <memset@plt>
L162:
  mov    0x1c(%rsp),%edx
  test   %edx,%edx
  jle    L9
  movslq 0x1c(%rsp),%rdx
  mov    0x30(%rsp),%rdi
  xor    %esi,%esi
  shl    $0x2,%rdx
  call   <memset@plt>
  mov    0x40(%rsp),%rcx
  mov    0x48(%rsp),%rdx
  pxor   %xmm0,%xmm0
  mov    0x50(%rsp),%r8
  movq   $0x0,(%rcx)
  movups %xmm0,(%rdx)
  movl   $0x1,(%r8)
  push   %r8
  push   %rbx
  push   0x40(%rsp)
  push   %rdx
  push   %rcx
L21:
  push   %r13
  mov    %r14,%rcx
  xor    %eax,%eax
  mov    %r12,%r9
  push   0x40(%rsp)
  mov    %r15,%r8
  mov    %ebp,%edi
  push   0x40(%rsp)
  mov    0x98(%rsp),%rdx
  mov    0x5c(%rsp),%esi
  call   <phyclust_pam@plt>
  add    $0x40,%rsp
  mov    $0x1,%ecx
  test   %ebp,%ebp
  cmovg  %ebp,%ecx
  cmp    $0x3,%ebp
  jle    L155
  mov    %ecx,%edx
  pcmpeqd %xmm1,%xmm1
  mov    %rbx,%rax
  shr    $0x2,%edx
  sub    $0x1,%edx
  shl    $0x4,%rdx
  lea    0x10(%rbx,%rdx,1),%rdx
  cs nopw 0x0(%rax,%rax,1)
L105:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  paddd  %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L105
  mov    %ecx,%edx
  and    $0xfffffffc,%edx
  and    $0x3,%ecx
  je     L152
L36:
  movslq %edx,%rax
  lea    0x1(%rdx),%ecx
  shl    $0x2,%rax
  subl   $0x1,(%rbx,%rax,1)
  cmp    %ecx,%ebp
  jle    L152
  add    $0x2,%edx
  subl   $0x1,0x4(%rbx,%rax,1)
  cmp    %edx,%ebp
  jle    L152
  subl   $0x1,0x8(%rbx,%rax,1)
L152:
  mov    0x1c(%rsp),%ecx
  test   %ecx,%ecx
  jle    L56
L201:
  mov    0x1c(%rsp),%eax
  mov    $0x1,%ecx
  test   %eax,%eax
  cmovg  %eax,%ecx
  cmp    $0x3,%eax
  jle    L45
  mov    %ecx,%edx
  mov    0x30(%rsp),%rbx
  pcmpeqd %xmm1,%xmm1
  shr    $0x2,%edx
  sub    $0x1,%edx
  mov    %rbx,%rax
  shl    $0x4,%rdx
  lea    0x10(%rbx,%rdx,1),%rdx
  nopw   0x0(%rax,%rax,1)
L178:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  paddd  %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rdx
  jne    L178
  mov    %ecx,%edx
  and    $0xfffffffc,%edx
  and    $0x3,%ecx
  je     L56
L49:
  mov    0x30(%rsp),%rbx
  movslq %edx,%rax
  mov    0x1c(%rsp),%esi
  lea    0x1(%rdx),%ecx
  shl    $0x2,%rax
  subl   $0x1,(%rbx,%rax,1)
  cmp    %esi,%ecx
  jge    L56
  add    $0x2,%edx
  subl   $0x1,0x4(%rbx,%rax,1)
  cmp    %esi,%edx
  jge    L56
  subl   $0x1,0x8(%rbx,%rax,1)
L56:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x40(%rsp),%rdi
  call   <free@plt>
  mov    0x48(%rsp),%rdi
  call   <free@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x50(%rsp),%rdi
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <free@plt>
  nopl   0x0(%rax,%rax,1)
L167:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L229
  movslq 0x1c(%rsp),%rdx
  mov    0x30(%rsp),%rdi
  xor    %esi,%esi
  shl    $0x2,%rdx
  call   <memset@plt>
  mov    0x40(%rsp),%rcx
  pxor   %xmm0,%xmm0
  mov    %ebp,%edi
  mov    0x48(%rsp),%rdx
  mov    0x50(%rsp),%r8
  mov    %r12,%r9
  xor    %eax,%eax
  movq   $0x0,(%rcx)
  movups %xmm0,(%rdx)
  movl   $0x1,(%r8)
  push   %r8
  mov    %r15,%r8
  push   %rbx
  push   0x40(%rsp)
  push   %rdx
  push   %rcx
  mov    %r14,%rcx
  push   %r13
  push   0x40(%rsp)
  push   0x40(%rsp)
  mov    0x98(%rsp),%rdx
  mov    0x5c(%rsp),%esi
  call   <phyclust_pam@plt>
  add    $0x40,%rsp
  jmp    L201
L45:
  xor    %edx,%edx
  jmp    L49
L160:
  mov    0x10(%rsp),%rsi
  mov    0x8(%rsp),%rcx
  mov    %rbx,%r9
  mov    %r15,%r10
  mov    %r14,%rdi
  mov    %r13,%rdx
  mov    %r12,%rax
  sub    %r12,%r9
  sub    %r12,%r10
  sub    %r12,%rdi
  sub    %r13,%rsi
  sub    %r13,%rcx
  cs nopw 0x0(%rax,%rax,1)
L96:
  movl   $0x0,(%r9,%rax,1)
  movl   $0x0,(%rax)
  movl   $0x0,(%r10,%rax,1)
  movl   $0x0,(%rdi,%rax,1)
  add    $0x4,%rax
  movq   $0x0,(%rdx)
  movq   $0x0,(%rsi,%rdx,1)
  movq   $0x0,(%rcx,%rdx,1)
  add    $0x8,%rdx
  cmp    %r8,%rax
  jne    L96
  jmp    L162
L155:
  xor    %edx,%edx
  jmp    L36
L229:
  mov    0x40(%rsp),%rax
  mov    0x48(%rsp),%rsi
  pxor   %xmm0,%xmm0
  mov    %ebp,%edi
  mov    0x50(%rsp),%rcx
  mov    %r12,%r9
  mov    %r15,%r8
  movq   $0x0,(%rax)
  movups %xmm0,(%rsi)
  movl   $0x1,(%rcx)
  push   %rcx
  mov    %r14,%rcx
  push   %rbx
  push   0x40(%rsp)
  push   %rsi
  push   %rax
  xor    %eax,%eax
  push   %r13
  push   0x40(%rsp)
  push   0x40(%rsp)
  mov    0x98(%rsp),%rdx
  mov    0x5c(%rsp),%esi
  call   <phyclust_pam@plt>
  add    $0x40,%rsp
  jmp    L56
L9:
  mov    0x40(%rsp),%rax
  mov    0x48(%rsp),%rsi
  pxor   %xmm0,%xmm0
  mov    0x50(%rsp),%rcx
  movq   $0x0,(%rax)
  movups %xmm0,(%rsi)
  movl   $0x1,(%rcx)
  push   %rcx
  push   %rbx
  push   0x40(%rsp)
  push   %rsi
  push   %rax
  jmp    L21
```

assistant: ```c
void assign_class_by_pam(int N_X, int K, double **EDM_LT_pam, int *center_id, int *class_id) {
  int i;
  double *dys, *radus, *damer, *avsyl, *ttsyl, *obj;
  int *nsend, *nrepr, *nelem, *nisol;
  radus = allocate_double_1D(N_X);
  damer = allocate_double_1D(N_X);
  avsyl = allocate_double_1D(N_X);
  ttsyl = allocate_double_1D(1);
  obj = allocate_double_1D(2);
  nsend = allocate_int_1D(N_X);
  nrepr = allocate_int_1D(N_X);
  nelem = allocate_int_1D(N_X);
  nisol = allocate_int_1D(1);
  dys = EDM_LT_pam[0] - 1;
  for (i = 0; i < N_X; i++) {
    nsend[i] = nrepr[i] = nelem[i] = class_id[i] = 0;
    radus[i] = damer[i] = avsyl[i] = 0;
  }
  for (i = 0; i < K; i++) {
    center_id[i] = 0;
  }
  ttsyl[0] = 0;
  obj[0] = obj[1] = 0;
  nisol[0] = 1;
  phyclust_pam(N_X, K, dys, nsend, nrepr, nelem, radus, damer, avsyl, ttsyl, obj, center_id, class_id, nisol);
  for (i = 0; i < N_X; i++) {
    class_id[i]--;
  }
  for (i = 0; i < K; i++) {
    center_id[i]--;
  }
  free(radus);
  free(damer);
  free(avsyl);
  free(ttsyl);
  free(obj);
  free(nsend);
  free(nrepr);
  free(nelem);
  free(nisol);
}
```