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

```asm
<redr_embed>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    %edx,%edi
  push   %rbp
  imul   %esi,%edi
  mov    %ecx,%ebp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x118,%rsp
  mov    0x150(%rsp),%rax
  mov    %edi,0x50(%rsp)
  mov    %esi,0x68(%rsp)
  mov    %rax,0x30(%rsp)
  mov    0x158(%rsp),%rax
  mov    %edx,0x4c(%rsp)
  mov    %rax,0xe0(%rsp)
  lea    -0x1(%rdx),%eax
  mov    %eax,0x108(%rsp)
  imul   %ecx,%eax
  mov    %r8d,0xb0(%rsp)
  sub    %eax,%r15d
  movslq %edi,%rax
  lea    0x0(,%rax,8),%rdi
  mov    %r15d,0x6c(%rsp)
  mov    %rax,0xb8(%rsp)
  call   <malloc@plt>
  mov    %rax,%r14
  movslq %r15d,%rax
  mov    0x50(%rsp),%r15d
  mov    %rax,0xa0(%rsp)
  lea    0x0(,%rax,8),%r13
  test   %r15d,%r15d
  jle    L377
  xor    %r15d,%r15d
L169:
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    %rax,(%r14,%r15,8)
  mov    %rax,%rdi
  mov    %r15d,%eax
  add    $0x1,%r15
  cltd
  idivl  0x4c(%rsp)
  movslq %eax,%rcx
  mov    %edx,%eax
  imul   %ebp,%eax
  mov    (%r12,%rcx,8),%rdx
  cltq
  lea    (%rdx,%rax,8),%rsi
  mov    %r13,%rdx
  call   <memcpy@plt>
  cmp    0xb8(%rsp),%r15
  jne    L169
L377:
  movslq 0x68(%rsp),%rax
  mov    %rax,0x90(%rsp)
  mov    %rax,%r15
  shl    $0x3,%rax
  mov    %rax,%rdi
  mov    %rax,(%rsp)
  call   <malloc@plt>
  mov    %rax,0x58(%rsp)
  test   %r15d,%r15d
  jle    L54
  movslq 0x4c(%rsp),%rax
  mov    0x58(%rsp),%rdi
  movl   $0x0,0x10(%rsp)
  shl    $0x3,%rax
  mov    %rdi,0x8(%rsp)
  mov    %rax,0x18(%rsp)
  mov    0x68(%rsp),%eax
  lea    (%rdi,%rax,8),%rax
  mov    %rax,0x20(%rsp)
  mov    0x108(%rsp),%eax
  add    $0x1,%rax
  mov    %rax,0x28(%rsp)
L341:
  mov    0x18(%rsp),%rdi
  call   <malloc@plt>
  mov    0x4c(%rsp),%r12d
  mov    %rax,%rbp
  mov    0x8(%rsp),%rax
  mov    %rbp,(%rax)
  test   %r12d,%r12d
  jle    L286
  movslq 0x10(%rsp),%rax
  lea    (%r14,%rax,8),%r12
  mov    0x28(%rsp),%rax
  lea    0x0(%rbp,%rax,8),%r15
  nopw   0x0(%rax,%rax,1)
L90:
  mov    %r13,%rdi
  add    $0x8,%rbp
  add    $0x8,%r12
  call   <malloc@plt>
  mov    -0x8(%r12),%rsi
  mov    %r13,%rdx
  mov    %rax,-0x8(%rbp)
  mov    %rax,%rdi
  call   <memcpy@plt>
  cmp    %r15,%rbp
  jne    L90
L286:
  addq   $0x8,0x8(%rsp)
  mov    0x4c(%rsp),%edi
  mov    0x8(%rsp),%rax
  add    %edi,0x10(%rsp)
  cmp    0x20(%rsp),%rax
  jne    L341
L54:
  mov    0xa0(%rsp),%rax
  lea    0x1(%rbx),%r12d
  movslq %r12d,%rbp
  shl    $0x2,%rax
  mov    %rax,%rdi
  mov    %rax,0x38(%rsp)
  call   <malloc@plt>
  mov    %rax,0x70(%rsp)
  lea    0x0(,%rbp,8),%rax
  mov    %rax,%rdi
  mov    %rax,0xc0(%rsp)
  call   <malloc@plt>
  mov    %rax,0x78(%rsp)
  mov    0x68(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x88(%rsp)
  test   %ebx,%ebx
  jle    L285
  pxor   %xmm7,%xmm7
  mov    0x30(%rsp),%rdx
  mov    %r12d,%r12d
  mov    $0x1,%eax
  cvtsi2sdl 0x88(%rsp),%xmm7
  movsd  %xmm7,0x98(%rsp)
L165:
  pxor   %xmm0,%xmm0
  mov    0x78(%rsp),%rdi
  movsd  0x98(%rsp),%xmm1
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  movsd  (%rdx,%rax,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L165
L93:
  lea    0x0(,%rbp,4),%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    0x50(%rsp),%eax
  lea    0x1(%rax),%edi
  movslq %edi,%rdi
  shl    $0x3,%rdi
  call   <malloc@plt>
  pxor   %xmm4,%xmm4
  movsd  D22(%rip),%xmm3
  pxor   %xmm2,%xmm2
  cvtsi2sd %ebx,%xmm4
  mov    %rax,%rbp
  movl   $0x1,0x54(%rsp)
  mov    $0x1,%eax
  cvtsi2sdl 0xb0(%rsp),%xmm2
  movapd %xmm4,%xmm0
  mulsd  %xmm3,%xmm0
  comisd %xmm0,%xmm2
  jbe    L98
L256:
  add    %eax,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movapd %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  %xmm4,%xmm0
  comisd %xmm0,%xmm2
  ja     L256
  movsd  D32(%rip),%xmm0
  cltq
  mov    %rax,%rsi
  lea    0x0(,%rax,8),%rdi
  mov    %eax,0x54(%rsp)
  lea    0x0(,%rax,4),%r15
  divsd  %xmm1,%xmm0
  sar    $0x2,%esi
  mov    %rdi,0x20(%rsp)
  mov    %esi,0x40(%rsp)
  movsd  %xmm0,0x28(%rsp)
L141:
  mov    (%rsp),%rdi
  call   <malloc@plt>
  mov    (%rsp),%rdi
  mov    %rax,0x10(%rsp)
  mov    %rax,%r13
  call   <malloc@plt>
  mov    0x68(%rsp),%esi
  mov    %rax,0x18(%rsp)
  test   %esi,%esi
  jle    L332
  mov    %rax,0x60(%rsp)
  mov    %esi,%eax
  mov    %r13,%rdi
  shl    $0x3,%rax
  mov    %r13,0x8(%rsp)
  add    %rax,%rdi
  mov    %rax,0xc8(%rsp)
  mov    0x54(%rsp),%eax
  mov    %rdi,0x80(%rsp)
  mov    %rax,0xa8(%rsp)
  shl    $0x3,%rax
  mov    %rax,0xd0(%rsp)
  mov    %ebx,0xd8(%rsp)
L268:
  mov    0x20(%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    0x8(%rsp),%rax
  mov    %rdx,%rbx
  mov    %rdx,(%rax)
  mov    0xd0(%rsp),%rax
  lea    (%rdx,%rax,1),%r13
  nopl   0x0(%rax)
L365:
  mov    %r15,%rdi
  add    $0x8,%rbx
  call   <malloc@plt>
  mov    %rax,-0x8(%rbx)
  cmp    %r13,%rbx
  jne    L365
  mov    0x38(%rsp),%rdi
  call   <malloc@plt>
  mov    0x60(%rsp),%rbx
  addq   $0x8,0x8(%rsp)
  mov    %rax,(%rbx)
  add    $0x8,%rbx
  mov    0x8(%rsp),%rax
  mov    %rbx,0x60(%rsp)
  cmp    0x80(%rsp),%rax
  jne    L268
  mov    (%rsp),%rdi
  mov    0xd8(%rsp),%ebx
  call   <malloc@plt>
  mov    0xc8(%rsp),%rdi
  mov    %rax,0x60(%rsp)
  mov    %rax,%r13
  add    %rax,%rdi
  mov    %rdi,0x8(%rsp)
L63:
  mov    0x38(%rsp),%rdi
  add    $0x8,%r13
  call   <malloc@plt>
  mov    %rax,-0x8(%r13)
  cmp    0x8(%rsp),%r13
  jne    L63
L7:
  mov    0x20(%rsp),%rdi
  call   <malloc@plt>
  mov    0xa8(%rsp),%rsi
  mov    %rax,0x80(%rsp)
  mov    %rax,%r13
  shl    $0x3,%rsi
  mov    %rax,0xd8(%rsp)
  add    %rsi,%rax
  mov    %rsi,0xd0(%rsp)
  mov    %rax,0xa8(%rsp)
L116:
  mov    %r15,%rdi
  add    $0x8,%r13
  call   <malloc@plt>
  mov    %rax,-0x8(%r13)
  cmp    %r13,0xa8(%rsp)
  jne    L116
  movslq 0xb0(%rsp),%rdi
  xor    %r13d,%r13d
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    (%rsp),%rdi
  mov    %rax,0xb0(%rsp)
  mov    %rax,%r15
  call   <malloc@plt>
  mov    %rax,0x20(%rsp)
  mov    0x90(%rsp),%rax
  lea    0x0(,%rax,4),%rdi
  call   <malloc@plt>
  xor    %ecx,%ecx
  mov    %r14,%rdi
  mov    %rax,0x38(%rsp)
  push   %r15
  push   0x88(%rsp)
  push   0x80(%rsp)
  mov    0x58(%rsp),%eax
  push   %rax
  mov    0x74(%rsp),%r9d
  xor    %eax,%eax
  mov    0x6c(%rsp),%r8d
  mov    0x8c(%rsp),%edx
  mov    0x70(%rsp),%esi
  call   <make_box2ind@plt>
  add    $0x20,%rsp
  mov    0x68(%rsp),%r11d
  mov    0x58(%rsp),%r15
  test   %r11d,%r11d
  jle    L252
L88:
  mov    0x18(%rsp),%rax
  mov    (%r15,%r13,8),%rdi
  xor    %ecx,%ecx
  push   (%rax,%r13,8)
  mov    0x18(%rsp),%rax
  push   (%rax,%r13,8)
  mov    0x70(%rsp),%rax
  push   (%rax,%r13,8)
  mov    0x58(%rsp),%eax
  add    $0x1,%r13
  push   %rax
  mov    0x74(%rsp),%r9d
  xor    %eax,%eax
  mov    0x128(%rsp),%r8d
  mov    0x8c(%rsp),%edx
  mov    0x6c(%rsp),%esi
  call   <make_box2ind@plt>
  add    $0x20,%rsp
  cmp    %r13,0x90(%rsp)
  jne    L88
L252:
  mov    0x6c(%rsp),%r10d
  test   %r10d,%r10d
  jle    L344
  mov    0x20(%rsp),%rsi
  mov    0x4c(%rsp),%r11d
  pxor   %xmm3,%xmm3
  movq   $0x0,0x8(%rsp)
  mov    0xa0(%rsp),%rax
  shl    $0x2,%rax
  mov    %rax,0xc8(%rsp)
  mov    0x88(%rsp),%eax
  mov    %rax,0x40(%rsp)
  lea    0x8(%rsi,%rax,8),%rax
  mov    %rax,0x88(%rsp)
  lea    -0x1(%rbx),%eax
  lea    0x8(%r12,%rax,4),%r13
L131:
  mov    0x70(%rsp),%rax
  mov    0x8(%rsp),%rsi
  movslq (%rax,%rsi,1),%rcx
  mov    0x50(%rsp),%esi
  xor    %eax,%eax
  mov    %rcx,%r8
  shl    $0x3,%rcx
  test   %esi,%esi
  jle    L100
  mov    0xb8(%rsp),%rsi
  nopl   0x0(%rax)
L31:
  mov    (%r14,%rax,8),%rdx
  movsd  (%rdx,%rcx,1),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L31
L100:
  mov    %r11d,%ecx
  xor    %edx,%edx
  mov    %r14,%rdi
  mov    $0x1,%eax
  movsd  %xmm3,0xe8(%rsp)
  push   %r12
  push   0xb8(%rsp)
  push   0x90(%rsp)
  push   %rbx
  movsd  0x48(%rsp),%xmm0
  mov    0x74(%rsp),%r9d
  mov    0x70(%rsp),%esi
  mov    %r11d,0x20(%rsp)
  call   <neiK@plt>
  add    $0x20,%rsp
  mov    0x68(%rsp),%r9d
  movq   D7(%rip),%xmm2
  movsd  0xe8(%rsp),%xmm3
  mov    (%rsp),%r11d
  test   %r9d,%r9d
  jle    L196
  mov    0x20(%rsp),%rdx
  mov    0x88(%rsp),%r9
  mov    %r11d,%edi
  xor    %r8d,%r8d
  nopw   0x0(%rax,%rax,1)
L231:
  movq   $0x0,(%rdx)
  mov    %r8d,%esi
  test   %r11d,%r11d
  jle    L101
  nopw   0x0(%rax,%rax,1)
L387:
  test   %ebx,%ebx
  jle    L129
  movslq %esi,%rax
  movsd  0x0(%rbp,%rax,8),%xmm1
  mov    (%r14,%rax,8),%rcx
  lea    0x4(%r12),%rax
  cs nopw 0x0(%rax,%rax,1)
L39:
  movslq (%rax),%r10
  movapd %xmm1,%xmm0
  subsd  (%rcx,%r10,8),%xmm0
  andpd  %xmm2,%xmm0
  comisd (%rdx),%xmm0
  jbe    L119
  movsd  %xmm0,(%rdx)
L119:
  add    $0x4,%rax
  cmp    %rax,%r13
  jne    L39
L129:
  add    $0x1,%esi
  cmp    %esi,%edi
  jne    L387
L101:
  add    $0x8,%rdx
  add    %r11d,%edi
  add    %r11d,%r8d
  cmp    %rdx,%r9
  jne    L231
  xor    %r15d,%r15d
  mov    %r12,0xf0(%rsp)
  mov    %rbp,0xf8(%rsp)
  mov    %r15,%r12
  mov    0x58(%rsp),%rbp
  mov    %r13,0x100(%rsp)
  mov    0x108(%rsp),%r15d
  mov    %ebx,0x10c(%rsp)
  mov    0x54(%rsp),%r13d
  mov    0x60(%rsp),%rbx
  mov    %r14,0xe8(%rsp)
  mov    %r11d,%r14d
  nopl   0x0(%rax)
L56:
  mov    0x8(%rsp),%rdi
  mov    (%rbx,%r12,8),%rax
  movsd  %xmm3,(%rsp)
  xor    %edx,%edx
  mov    %r14d,%r8d
  mov    %r13d,%r9d
  mov    %r15d,%ecx
  mov    (%rax,%rdi,1),%esi
  mov    0x18(%rsp),%rax
  mov    0x0(%rbp,%r12,8),%rdi
  push   (%rax,%r12,8)
  mov    0x18(%rsp),%rax
  push   (%rax,%r12,8)
  mov    0x30(%rsp),%rax
  movsd  0x38(%rsp),%xmm0
  movsd  (%rax,%r12,8),%xmm1
  mov    $0x2,%eax
  call   <neiE@plt>
  mov    0x48(%rsp),%rdi
  movsd  0x10(%rsp),%xmm3
  mov    %eax,(%rdi,%r12,4)
  mov    0x40(%rsp),%rdi
  cltq
  addsd  (%rdi,%rax,8),%xmm3
  mov    %r12,%rax
  pop    %rdi
  add    $0x1,%r12
  pop    %r8
  cmp    %rax,0x40(%rsp)
  jne    L56
  mov    %r14d,%r11d
  mov    0xf0(%rsp),%r12
  mov    0xf8(%rsp),%rbp
  mov    0x100(%rsp),%r13
  mov    0xe8(%rsp),%r14
  mov    0x10c(%rsp),%ebx
L196:
  addq   $0x4,0x8(%rsp)
  mov    0x8(%rsp),%rax
  cmp    %rax,0xc8(%rsp)
  jne    L131
L162:
  pxor   %xmm1,%xmm1
  mov    0x30(%rsp),%rax
  mov    0xa0(%rsp),%rbx
  cvtsi2sdl 0x6c(%rsp),%xmm1
  mov    0x50(%rsp),%ecx
  movsd  0x98(%rsp),%xmm0
  mulsd  (%rax,%rbx,8),%xmm0
  mov    0x78(%rsp),%rax
  mov    0xc0(%rsp),%rbx
  divsd  %xmm1,%xmm3
  addsd  -0x8(%rax,%rbx,1),%xmm0
  mov    0xe0(%rsp),%rax
  subsd  %xmm3,%xmm0
  movsd  %xmm0,(%rax)
  test   %ecx,%ecx
  jle    L322
  mov    0x50(%rsp),%eax
  mov    %r14,%r15
  lea    (%r14,%rax,8),%r13
L140:
  mov    (%r15),%rdi
  add    $0x8,%r15
  call   <free@plt>
  cmp    %r15,%r13
  jne    L140
L322:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x68(%rsp),%edx
  test   %edx,%edx
  jle    L257
  mov    0x108(%rsp),%eax
  xor    %r14d,%r14d
  add    $0x1,%rax
  mov    %rax,(%rsp)
L133:
  mov    0x4c(%rsp),%eax
  test   %eax,%eax
  jle    L239
  mov    0x58(%rsp),%rax
  mov    (%rax,%r14,8),%r13
  mov    (%rsp),%rax
  lea    0x0(%r13,%rax,8),%rbx
  nopl   (%rax)
L284:
  mov    0x0(%r13),%rdi
  add    $0x8,%r13
  call   <free@plt>
  cmp    %r13,%rbx
  jne    L284
L239:
  mov    0x10(%rsp),%rax
  mov    (%rax,%r14,8),%r13
  mov    0xd0(%rsp),%rax
  mov    %r13,%r15
  lea    (%rax,%r13,1),%rbx
  nopw   0x0(%rax,%rax,1)
L194:
  mov    (%r15),%rdi
  add    $0x8,%r15
  call   <free@plt>
  cmp    %rbx,%r15
  jne    L194
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rax
  mov    (%rax,%r14,8),%rdi
  call   <free@plt>
  mov    0x58(%rsp),%rax
  mov    (%rax,%r14,8),%rdi
  call   <free@plt>
  mov    0x60(%rsp),%rax
  mov    (%rax,%r14,8),%rdi
  add    $0x1,%r14
  call   <free@plt>
  cmp    %r14,0x90(%rsp)
  jne    L133
L257:
  mov    0x58(%rsp),%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  mov    0x60(%rsp),%rdi
  call   <free@plt>
  mov    0x70(%rsp),%rdi
  call   <free@plt>
  mov    0x78(%rsp),%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0xd8(%rsp),%rbx
L266:
  mov    (%rbx),%rdi
  add    $0x8,%rbx
  call   <free@plt>
  cmp    %rbx,0xa8(%rsp)
  jne    L266
  mov    0x80(%rsp),%rdi
  call   <free@plt>
  mov    0xb0(%rsp),%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  call   <free@plt>
  mov    0x38(%rsp),%rdi
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <free@plt>
L285:
  pxor   %xmm5,%xmm5
  cvtsi2sd %eax,%xmm5
  movsd  %xmm5,0x98(%rsp)
  jmp    L93
L98:
  movsd  D32(%rip),%xmm6
  movl   $0x0,0x40(%rsp)
  mov    $0x4,%r15d
  movq   $0x8,0x20(%rsp)
  movsd  %xmm6,0x28(%rsp)
  jmp    L141
L332:
  mov    (%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,0x60(%rsp)
  mov    0x54(%rsp),%eax
  mov    %rax,0xa8(%rsp)
  jmp    L7
L344:
  pxor   %xmm3,%xmm3
  jmp    L162
```

tool_calls: name: parse_data
arguments: label: D22
data_type: f64
name: parse_data
arguments: label: D32
data_type: f64
name: parse_data
arguments: label: D7
data_type: qword

tool: D22: 0.5

tool: D32: 4

tool: D7: 9223372036854775807

assistant: ```c
void redr_embed(double **x, int dim, int edim, int tau, int N, int K, double *psi, double *mir) {
  int i, k, *n2;
  double *xc, dx;
  double *eps;
  double dxy2;
  int *nn;
  int d, de;
  int N_;
  double **xx;
  double ***xxx;
  int BOX;
  int **box, *lis;
  int ***boxxx;
  int **lisxx;
  double epsilon;
  int inveps;
  int *ind;
  int **indxx;
  double *phi;
  N_ = N - (edim - 1) * tau;
  xx = (double **)malloc(dim * edim * sizeof(double *));
  for (d = 0; d < dim * edim; d++) {
    xx[d] = (double *)malloc(N_ * sizeof(double));
    memcpy(xx[d], x[d / edim] + tau * (d % edim), N_ * sizeof(double));
  }
  xxx = (double ***)malloc(dim * sizeof(double **));
  for (d = 0; d < dim; d++) {
    xxx[d] = (double **)malloc(edim * sizeof(double *));
    for (de = 0; de < edim; de++) {
      xxx[d][de] = (double *)malloc(N_ * sizeof(double));
      memcpy(xxx[d][de], xx[d * edim + de], N_ * sizeof(double));
    }
  }
  ind = (int *)malloc(N_ * sizeof(int));
  phi = (double *)malloc((K + 1) * sizeof(double));
  for (i = 1; i <= K; i++)
    phi[i] = psi[i] - (dim - 1) / ((double)i);
  nn = (int *)malloc((K + 1) * sizeof(int));
  xc = (double *)malloc((dim * edim + 1) * sizeof(double));
  BOX = 1;
  while (0.5 * BOX * BOX * K < N)
    BOX *= 2;
  epsilon = 4.0 / BOX;
  inveps = BOX / 4;
  boxxx = (int ***)malloc(dim * sizeof(int **));
  lisxx = (int **)malloc(dim * sizeof(int *));
  for (d = 0; d < dim; d++) {
    boxxx[d] = (int **)malloc(BOX * sizeof(int *));
    for (i = 0; i < BOX; i++)
      boxxx[d][i] = (int *)malloc(BOX * sizeof(int));
    lisxx[d] = (int *)malloc(N_ * sizeof(int));
  }
  indxx = (int **)malloc(dim * sizeof(int *));
  for (d = 0; d < dim; d++) {
    indxx[d] = (int *)malloc(N_ * sizeof(int));
  }
  box = (int **)malloc(BOX * sizeof(int *));
  for (i = 0; i < BOX; i++)
    box[i] = (int *)malloc(BOX * sizeof(int));
  lis = (int *)malloc(N * sizeof(int));
  eps = (double *)malloc(dim * sizeof(double));
  n2 = (int *)malloc(dim * sizeof(int));
  make_box2ind(xx, dim * edim, N_, 0, edim, BOX, inveps, ind, box, lis);
  for (d = 0; d < dim; d++)
    make_box2ind(xxx[d], edim, N_, 0, edim - 1, BOX, inveps, indxx[d], boxxx[d], lisxx[d]);
  dxy2 = 0.0;
  for (i = 0; i < N_; i++) {
    for (d = 0; d < dim * edim; d++)
      xc[d] = xx[d][ind[i]];
    neiK(xx, dim * edim, 0, edim, ind[i], BOX, epsilon, K, box, lis, nn);
    for (d = 0; d < dim; d++) {
      eps[d] = 0;
      for (de = 0; de < edim; de++)
        for (k = 1; k <= K; k++)
          if ((dx = fabs(xc[d * edim + de] - xx[d * edim + de][nn[k]])) > eps[d])
            eps[d] = dx;
    }
    for (d = 0; d < dim; d++) {
      n2[d] = neiE(xxx[d], indxx[d][i], 0, edim - 1, edim, BOX, epsilon, eps[d], boxxx[d], lisxx[d]);
      dxy2 += psi[n2[d]];
    }
  }
  dxy2 /= N_;
  *mir = (dim - 1) * psi[N_] + phi[K] - dxy2;
  for (d = 0; d < dim * edim; d++)
    free(xx[d]);
  free(xx);
  for (d = 0; d < dim; d++) {
    for (de = 0; de < edim; de++)
      free(xxx[d][de]);
    for (i = 0; i < BOX; i++)
      free(boxxx[d][i]);
    free(boxxx[d]);
    free(lisxx[d]);
    free(xxx[d]);
    free(indxx[d]);
  }
  free(xxx);
  free(boxxx);
  free(lisxx);
  free(indxx);
  free(ind);
  free(phi);
  free(nn);
  free(xc);
  for (i = 0; i < BOX; i++)
    free(box[i]);
  free(box);
  free(lis);
  free(eps);
  free(n2);
}
```