user: Converte this assembly snippet into its equivalent C code:

```asm
<mi_d>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x198,%rsp
  mov    0x1d0(%rsp),%rax
  mov    %esi,0x8c(%rsp)
  mov    %edx,0xcc(%rsp)
  mov    %ecx,0xc8(%rsp)
  mov    %r8,0x108(%rsp)
  mov    %r9,0x70(%rsp)
  mov    %rax,0x148(%rsp)
  movsd  %xmm0,0x20(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm2,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x188(%rsp)
  xor    %eax,%eax
  lea    0x1(%rcx),%eax
  cltq
  lea    0x0(,%rax,4),%r14
  mov    %r14,%rdi
  call   <malloc@plt>
  mov    %rax,0xa0(%rsp)
  lea    0x1(%rbx),%eax
  movslq %eax,%rbx
  mov    %eax,0x30(%rsp)
  shl    $0x3,%rbx
  mov    %rbx,%rdi
  call   <malloc@plt>
  pxor   %xmm5,%xmm5
  pxor   %xmm7,%xmm7
  movsd  D17(%rip),%xmm4
  cvtsi2sd %ebp,%xmm5
  mov    %rax,0x100(%rsp)
  mov    $0x1,%eax
  movsd  0x8(%rsp),%xmm3
  cvtsi2sd %r13d,%xmm7
  mov    %eax,0x150(%rsp)
  movsd  0x10(%rsp),%xmm1
  movapd %xmm5,%xmm0
  mulsd  %xmm4,%xmm0
  movapd %xmm7,%xmm6
  movsd  %xmm7,0x130(%rsp)
  unpcklpd %xmm6,%xmm6
  movaps %xmm6,0x110(%rsp)
  comisd %xmm0,%xmm7
  jbe    L210
L153:
  movsd  0x130(%rsp),%xmm6
  add    %eax,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movapd %xmm2,%xmm0
  mulsd  %xmm4,%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm5,%xmm0
  comisd %xmm0,%xmm6
  ja     L153
  movsd  D23(%rip),%xmm0
  cltq
  mov    %rax,%rsi
  lea    0x0(,%rax,8),%rcx
  mov    %eax,0x150(%rsp)
  shl    $0x2,%rax
  divsd  %xmm2,%xmm0
  sar    $0x2,%esi
  mov    %rcx,0x10(%rsp)
  mov    %rax,0x18(%rsp)
  mov    %esi,0x8(%rsp)
  movsd  %xmm0,0x138(%rsp)
L28:
  mov    0xcc(%rsp),%ebp
  pxor   %xmm2,%xmm2
  subsd  0x20(%rsp),%xmm1
  sub    $0x8,%rbx
  subsd  0x28(%rsp),%xmm3
  movslq 0x8c(%rsp),%rsi
  mov    %rbx,%rdi
  xor    %r12d,%r12d
  lea    -0x5(%rbp),%eax
  cvtsi2sd %eax,%xmm2
  movapd %xmm1,%xmm0
  mov    %rsi,0x120(%rsp)
  unpcklpd %xmm3,%xmm0
  mov    %eax,0x88(%rsp)
  unpcklpd %xmm2,%xmm2
  divpd  %xmm0,%xmm2
  movlpd %xmm2,0xb0(%rsp)
  movaps %xmm2,0x170(%rsp)
  call   <malloc@plt>
  mov    %rbx,%rdi
  mov    %rax,0x50(%rsp)
  call   <malloc@plt>
  mov    %rbx,%rdi
  mov    %rax,0x58(%rsp)
  call   <malloc@plt>
  movslq %ebp,%rsi
  mov    %rax,0x60(%rsp)
  mov    0x8c(%rsp),%eax
  lea    0x0(,%rsi,4),%rbp
  mov    %rsi,0x168(%rsp)
  lea    -0x10(%rbp),%r13
  test   %eax,%eax
  jle    L287
L134:
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    0x50(%rsp),%rsi
  mov    %rbp,%rdi
  mov    %rax,(%rsi,%r12,8)
  call   <malloc@plt>
  mov    0x58(%rsp),%rsi
  mov    %r13,%rdi
  mov    %rax,(%rsi,%r12,8)
  call   <malloc@plt>
  mov    0x60(%rsp),%rsi
  mov    %rax,(%rsi,%r12,8)
  add    $0x1,%r12
  cmp    0x120(%rsp),%r12
  jne    L134
L287:
  mov    0x10(%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    %rax,0xe0(%rsp)
  mov    %rax,0x160(%rsp)
  mov    0x150(%rsp),%eax
  lea    0x0(%r13,%rax,8),%rax
  mov    %rax,0x140(%rsp)
L251:
  mov    0x18(%rsp),%rdi
  add    $0x8,%r13
  call   <malloc@plt>
  mov    %rax,-0x8(%r13)
  cmp    0x140(%rsp),%r13
  jne    L251
  mov    %rbp,%rdi
  xor    %r12d,%r12d
  call   <malloc@plt>
  mov    %rax,0xe8(%rsp)
  movslq 0xc8(%rsp),%rax
  lea    0x0(,%rax,8),%r13
  mov    %rax,0x158(%rsp)
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    %r13,%rdi
  mov    %rax,0x90(%rsp)
  call   <malloc@plt>
  mov    %r13,%rdi
  mov    %rax,0x80(%rsp)
  call   <malloc@plt>
  mov    %r13,%rdi
  mov    %rax,0xf0(%rsp)
  call   <malloc@plt>
  lea    -0x4(%r14),%rdi
  mov    %rax,0x98(%rsp)
  call   <malloc@plt>
  mov    0x120(%rsp),%rsi
  mov    0xc8(%rsp),%r14d
  mov    %rax,0x128(%rsp)
  lea    0x0(,%rsi,4),%rbp
  test   %r14d,%r14d
  jle    L363
L148:
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    0x90(%rsp),%rsi
  mov    %rbp,%rdi
  mov    %rax,(%rsi,%r12,8)
  call   <malloc@plt>
  mov    0xf0(%rsp),%rsi
  mov    %rbp,%rdi
  mov    %rax,(%rsi,%r12,8)
  call   <malloc@plt>
  mov    0x98(%rsp),%rsi
  mov    %rax,(%rsi,%r12,8)
  mov    0x108(%rsp),%rax
  movq   $0x0,(%rax,%r12,8)
  add    $0x1,%r12
  cmp    0x158(%rsp),%r12
  jne    L148
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    %r13,%rdi
  mov    %rax,0xd0(%rsp)
  call   <malloc@plt>
  sub    $0x8,%rsp
  xor    %ecx,%ecx
  mov    %r15,%rdi
  mov    %rax,0xe0(%rsp)
  mov    $0x1,%r8d
  push   0xf0(%rsp)
  push   0xf0(%rsp)
  mov    0x20(%rsp),%eax
  push   %rax
  mov    0xac(%rsp),%ebx
  xor    %eax,%eax
  mov    0x170(%rsp),%r9d
  mov    0xec(%rsp),%edx
  mov    %ebx,%esi
  call   <make_box2@plt>
  add    $0x20,%rsp
  test   %ebx,%ebx
  jle    L407
L135:
  mov    0x30(%rsp),%ebx
  mov    0x50(%rsp),%r12
  mov    $0x1,%ebp
  movsd  0xb0(%rsp),%xmm0
  jmp    L268
L442:
  and    $0x1,%eax
  movsd  0x170(%rsp,%rax,8),%xmm0
L268:
  mov    0x60(%rsp),%rax
  mov    -0x8(%r12,%rbp,8),%rcx
  mov    -0x8(%r15,%rbp,8),%rdi
  mov    0x88(%rsp),%edx
  mov    -0x8(%rax,%rbp,8),%r9
  mov    0x58(%rsp),%rax
  mov    0xcc(%rsp),%esi
  mov    -0x8(%rax,%rbp,8),%r8
  mov    $0x1,%eax
  call   <make_box1@plt>
  mov    %ebp,%eax
  add    $0x1,%rbp
  cmp    %rbx,%rbp
  jne    L442
  mov    0xc8(%rsp),%r11d
  test   %r11d,%r11d
  jle    L303
L407:
  mov    0xc8(%rsp),%r12d
  mov    0xd8(%rsp),%rdi
  xor    %esi,%esi
  shl    $0x3,%r12
  mov    %r12,%rdx
  call   <memset@plt>
  mov    0xd0(%rsp),%rdi
  mov    %r12,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  mov    0xcc(%rsp),%r10d
  test   %r10d,%r10d
  jle    L444
L78:
  mov    0xc8(%rsp),%eax
  mov    0x80(%rsp),%rsi
  movq   $0x0,0xf8(%rsp)
  sub    $0x1,%eax
  mov    %rax,0xb8(%rsp)
  lea    0x8(%rsi,%rax,8),%rax
  mov    %rax,0xa8(%rsp)
  mov    0x8c(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x154(%rsp)
  mov    %rax,0x68(%rsp)
  lea    0x8(,%rax,8),%rax
  mov    %rax,0xc0(%rsp)
L129:
  mov    0xf8(%rsp),%rax
  mov    0x8c(%rsp),%edi
  mov    %eax,%r14d
  lea    0x0(,%rax,8),%rcx
  xor    %eax,%eax
  test   %edi,%edi
  jle    L240
  mov    0x100(%rsp),%rsi
  mov    0x68(%rsp),%rdi
  nopl   0x0(%rax)
L162:
  mov    (%r15,%rax,8),%rdx
  movsd  (%rdx,%rcx,1),%xmm0
  mov    %rax,%rdx
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rdi,%rdx
  jne    L162
L240:
  mov    0xa0(%rsp),%rbp
  mov    %r14d,%r8d
  xor    %edx,%edx
  mov    %r15,%rdi
  mov    $0x1,%ecx
  mov    $0x1,%eax
  push   %rbp
  push   0xf0(%rsp)
  push   0xf0(%rsp)
  mov    0xe0(%rsp),%ebx
  push   %rbx
  mov    0x170(%rsp),%r9d
  movsd  0x158(%rsp),%xmm0
  mov    0xac(%rsp),%esi
  call   <neiK@plt>
  add    $0x20,%rsp
  test   %ebx,%ebx
  jle    L423
  mov    0x128(%rsp),%r12
  mov    %r14d,0x10(%rsp)
  lea    0x8(%rbp),%rbx
  mov    0x90(%rsp),%r13
  mov    0x80(%rsp),%rax
  mov    %r12,0x20(%rsp)
  mov    %r12,%r8
  mov    0x100(%rsp),%r14
  mov    0x68(%rsp),%r12
  mov    %r13,%rbp
  mov    %rax,%r13
L345:
  mov    0x8c(%rsp),%r9d
  movq   $0x0,0x0(%r13)
  movl   $0xffffffff,(%r8)
  test   %r9d,%r9d
  jle    L300
  mov    0x0(%rbp),%rdi
  mov    0xc0(%rsp),%rdx
  xor    %esi,%esi
  mov    %r8,0x8(%rsp)
  call   <memset@plt>
  mov    0x8(%rsp),%r8
  xor    %ecx,%ecx
  pxor   %xmm4,%xmm4
  mov    %rax,%rdi
  mov    0xa0(%rsp),%rax
  movq   D39(%rip),%xmm3
  lea    0x4(%rax),%r11
  nopw   0x0(%rax,%rax,1)
L60:
  movsd  (%r14,%rcx,8),%xmm2
  mov    (%r15,%rcx,8),%rdx
  mov    %ecx,%esi
  mov    %r11,%rax
  pxor   %xmm1,%xmm1
  nopl   0x0(%rax,%rax,1)
L273:
  movslq (%rax),%r9
  movapd %xmm2,%xmm0
  subsd  (%rdx,%r9,8),%xmm0
  andpd  %xmm3,%xmm0
  comisd %xmm1,%xmm0
  jbe    L173
  movsd  %xmm0,(%rdi,%rcx,8)
  movapd %xmm0,%xmm1
L173:
  add    $0x4,%rax
  cmp    %rax,%rbx
  jne    L273
  comisd %xmm4,%xmm1
  jbe    L98
  mov    %esi,(%r8)
  movapd %xmm1,%xmm4
  movsd  %xmm1,0x0(%r13)
L98:
  lea    0x1(%rcx),%rax
  cmp    %r12,%rcx
  je     L300
  mov    %rax,%rcx
  jmp    L60
  nopw   0x0(%rax,%rax,1)
L300:
  add    $0x8,%r13
  add    $0x4,%r8
  add    $0x4,%rbx
  add    $0x8,%rbp
  cmp    %r13,0xa8(%rsp)
  jne    L345
  mov    0x8c(%rsp),%r8d
  mov    0x10(%rsp),%r14d
  test   %r8d,%r8d
  jle    L423
  mov    0xd8(%rsp),%rax
  mov    %r14d,0x18(%rsp)
  movq   $0x0,0x78(%rsp)
  mov    %rax,0x28(%rsp)
  mov    0xf0(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    0xd0(%rsp),%rax
  mov    %rax,0x38(%rsp)
  mov    0x78(%rsp),%rax
  cs nopw 0x0(%rax,%rax,1)
L419:
  mov    0x90(%rsp),%rsi
  xor    %ebx,%ebx
  movsd  0xb0(%rsp),%xmm0
  mov    (%rsi,%rax,8),%rsi
  mov    %rsi,0x40(%rsp)
  mov    0x98(%rsp),%rsi
  mov    (%rsi,%rax,8),%rax
  mov    %rax,0x48(%rsp)
  jmp    L324
  nop
L127:
  mov    (%rax),%rax
  mov    %ebp,(%rax,%rbx,4)
  mov    0x70(%rsp),%rax
  movsd  (%rax,%rbp,8),%xmm0
  mov    0x38(%rsp),%rax
  movsd  (%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  mov    0x28(%rsp),%rax
  addsd  (%rax),%xmm0
L219:
  movsd  %xmm0,(%rax)
  lea    0x1(%rbx),%rdx
  lea    0x1(%rbx),%eax
  cmp    0x68(%rsp),%rbx
  je     L437
  and    $0x1,%eax
  mov    %rdx,%rbx
  movsd  0x170(%rsp,%rax,8),%xmm0
L324:
  mov    0x60(%rsp),%rax
  mov    (%r15,%rbx,8),%rdi
  movsd  %xmm0,0x8(%rsp)
  lea    0x0(,%rbx,4),%r14
  mov    0x88(%rsp),%edx
  mov    0x18(%rsp),%esi
  mov    (%rax,%rbx,8),%r9
  mov    0x58(%rsp),%rax
  mov    (%rax,%rbx,8),%r13
  mov    0x50(%rsp),%rax
  mov    %r9,0x10(%rsp)
  mov    (%rax,%rbx,8),%r12
  mov    0x40(%rsp),%rax
  mov    %r13,%r8
  movsd  (%rax,%rbx,8),%xmm1
  mov    %r12,%rcx
  mov    $0x2,%eax
  call   <neiE1@plt>
  movsd  0x8(%rsp),%xmm0
  mov    0x10(%rsp),%r9
  movslq %eax,%rbp
  mov    0x48(%rsp),%rax
  mov    %ebp,(%rax,%rbx,4)
  mov    0x20(%rsp),%rax
  cmp    %ebx,(%rax)
  mov    0x30(%rsp),%rax
  je     L127
  mov    0x78(%rsp),%rsi
  add    (%rax),%r14
  mov    %r13,%r8
  mov    %r12,%rcx
  mov    0x80(%rsp),%rax
  mov    (%r15,%rbx,8),%rdi
  mov    0x88(%rsp),%edx
  movsd  (%rax,%rsi,8),%xmm1
  mov    0x18(%rsp),%esi
  mov    $0x2,%eax
  call   <neiE1@plt>
  mov    0x38(%rsp),%rsi
  mov    0x70(%rsp),%rdi
  mov    %eax,(%r14)
  cltq
  movsd  (%rsi),%xmm0
  addsd  0x8(%rdi,%rax,8),%xmm0
  mov    0x28(%rsp),%rax
  movsd  %xmm0,(%rsi)
  movsd  (%rax),%xmm0
  addsd  (%rdi,%rbp,8),%xmm0
  jmp    L219
  nopw   0x0(%rax,%rax,1)
L437:
  mov    0x78(%rsp),%rsi
  addq   $0x8,0x28(%rsp)
  addq   $0x8,0x30(%rsp)
  addq   $0x8,0x38(%rsp)
  lea    0x1(%rsi),%rax
  addq   $0x4,0x20(%rsp)
  cmp    %rsi,0xb8(%rsp)
  je     L423
  mov    %rax,0x78(%rsp)
  jmp    L419
L423:
  addq   $0x1,0xf8(%rsp)
  mov    0xf8(%rsp),%rax
  cmp    %eax,0xcc(%rsp)
  jg     L129
  mov    0xc8(%rsp),%esi
  test   %esi,%esi
  jle    L400
L428:
  mov    0x70(%rsp),%r9
  pxor   %xmm1,%xmm1
  mov    $0x1,%ecx
  mov    0x168(%rsp),%rax
  cvtsi2sdl 0x154(%rsp),%xmm1
  mulsd  (%r9,%rax,8),%xmm1
  mov    0xc8(%rsp),%eax
  test   %eax,%eax
  cmovg  %eax,%ecx
  unpcklpd %xmm1,%xmm1
  cmp    $0x3,%eax
  jle    L335
  mov    %ecx,%edx
  mov    0xd0(%rsp),%rsi
  mov    0xd8(%rsp),%rdi
  xor    %eax,%eax
  shr    $0x2,%edx
  mov    0x108(%rsp),%r8
  mov    0x148(%rsp),%r10
  shl    $0x5,%rdx
L312:
  movapd 0x110(%rsp),%xmm7
  movupd (%rsi,%rax,1),%xmm2
  movupd 0x10(%rsi,%rax,1),%xmm3
  movupd 0x8(%r9,%rax,1),%xmm0
  divpd  %xmm7,%xmm2
  movupd 0x10(%rdi,%rax,1),%xmm4
  addpd  %xmm1,%xmm0
  divpd  %xmm7,%xmm3
  subpd  %xmm2,%xmm0
  movups %xmm2,(%rsi,%rax,1)
  movupd 0x18(%r9,%rax,1),%xmm2
  addpd  %xmm1,%xmm2
  cvtpd2ps %xmm0,%xmm0
  divpd  %xmm7,%xmm4
  subpd  %xmm3,%xmm2
  movups %xmm3,0x10(%rsi,%rax,1)
  movupd (%rdi,%rax,1),%xmm3
  cvtpd2ps %xmm2,%xmm2
  movlhps %xmm2,%xmm0
  movupd 0x8(%r10,%rax,1),%xmm2
  addpd  %xmm1,%xmm2
  divpd  %xmm7,%xmm3
  movups %xmm4,0x10(%rdi,%rax,1)
  subpd  %xmm3,%xmm2
  movups %xmm3,(%rdi,%rax,1)
  movupd 0x18(%r10,%rax,1),%xmm3
  addpd  %xmm1,%xmm3
  cvtpd2ps %xmm2,%xmm2
  subpd  %xmm4,%xmm3
  cvtpd2ps %xmm3,%xmm3
  movlhps %xmm3,%xmm2
  movaps %xmm0,%xmm3
  unpcklps %xmm2,%xmm3
  unpckhps %xmm2,%xmm0
  movups %xmm3,(%r8,%rax,1)
  movups %xmm0,0x10(%r8,%rax,1)
  add    $0x20,%rax
  cmp    %rdx,%rax
  jne    L312
  mov    %ecx,%edx
  and    $0xfffffffc,%edx
  and    $0x3,%ecx
  je     L400
L341:
  movslq %edx,%rcx
  mov    0xd0(%rsp),%rbx
  movsd  0x130(%rsp),%xmm5
  lea    0x0(,%rcx,8),%rax
  mov    0xd8(%rsp),%rdi
  movapd 0x110(%rsp),%xmm6
  lea    (%rbx,%rax,1),%rsi
  mov    0x148(%rsp),%r10
  mov    0x70(%rsp),%r11
  movsd  (%rsi),%xmm2
  mov    0x108(%rsp),%r8
  movsd  0x8(%r10,%rax,1),%xmm7
  mov    0xc8(%rsp),%r15d
  movapd %xmm2,%xmm0
  movhpd (%rdi,%rax,1),%xmm2
  divsd  %xmm5,%xmm0
  movsd  %xmm7,0x8(%rsp)
  divpd  %xmm6,%xmm2
  movsd  %xmm0,(%rsi)
  movsd  0x8(%r11,%rax,1),%xmm0
  lea    0x8(%rax),%rsi
  unpcklpd %xmm7,%xmm0
  addpd  %xmm1,%xmm0
  subpd  %xmm2,%xmm0
  movhpd %xmm2,(%rdi,%rax,1)
  cvtpd2ps %xmm0,%xmm0
  movlps %xmm0,(%r8,%rcx,8)
  lea    0x1(%rdx),%ecx
  cmp    %ecx,%r15d
  jle    L400
  lea    (%rbx,%rsi,1),%rcx
  movsd  0x10(%r10,%rax,1),%xmm7
  add    $0x2,%edx
  movsd  (%rcx),%xmm2
  movsd  %xmm7,0x8(%rsp)
  movapd %xmm2,%xmm0
  movhpd 0x8(%rdi,%rax,1),%xmm2
  divsd  %xmm5,%xmm0
  divpd  %xmm6,%xmm2
  movsd  %xmm0,(%rcx)
  movsd  0x10(%r11,%rax,1),%xmm0
  lea    0x10(%rax),%rcx
  unpcklpd %xmm7,%xmm0
  addpd  %xmm1,%xmm0
  subpd  %xmm2,%xmm0
  movhpd %xmm2,0x8(%rdi,%rax,1)
  cvtpd2ps %xmm0,%xmm0
  movlps %xmm0,0x8(%r8,%rax,1)
  cmp    %edx,%r15d
  jle    L400
  lea    (%rbx,%rcx,1),%rdx
  movsd  0x18(%r10,%rax,1),%xmm3
  movsd  (%rdx),%xmm2
  movapd %xmm2,%xmm0
  movhpd 0x10(%rdi,%rax,1),%xmm2
  divsd  %xmm5,%xmm0
  divpd  %xmm6,%xmm2
  movsd  %xmm0,(%rdx)
  movsd  0x18(%r11,%rax,1),%xmm0
  unpcklpd %xmm3,%xmm0
  addpd  %xmm1,%xmm0
  subpd  %xmm2,%xmm0
  movhpd %xmm2,0x10(%rdi,%rax,1)
  cvtpd2ps %xmm0,%xmm0
  movlps %xmm0,0x10(%r8,%rax,1)
L400:
  mov    0x100(%rsp),%rdi
  call   <free@plt>
  mov    0xa0(%rsp),%rdi
  call   <free@plt>
  mov    0x160(%rsp),%rbx
L236:
  mov    (%rbx),%rdi
  add    $0x8,%rbx
  call   <free@plt>
  cmp    0x140(%rsp),%rbx
  jne    L236
  mov    0xe0(%rsp),%rdi
  xor    %ebx,%ebx
  call   <free@plt>
  mov    0xe8(%rsp),%rdi
  call   <free@plt>
  mov    0x8c(%rsp),%ecx
  test   %ecx,%ecx
  jle    L187
  mov    0x50(%rsp),%rbp
  mov    0x58(%rsp),%r12
  mov    0x60(%rsp),%r13
L27:
  mov    0x0(%rbp,%rbx,8),%rdi
  call   <free@plt>
  mov    (%r12,%rbx,8),%rdi
  call   <free@plt>
  mov    0x0(%r13,%rbx,8),%rdi
  add    $0x1,%rbx
  call   <free@plt>
  cmp    0x120(%rsp),%rbx
  jne    L27
L187:
  mov    0x50(%rsp),%rdi
  xor    %ebx,%ebx
  call   <free@plt>
  mov    0x58(%rsp),%rdi
  call   <free@plt>
  mov    0x60(%rsp),%rdi
  call   <free@plt>
  mov    0xc8(%rsp),%edx
  test   %edx,%edx
  jle    L146
  mov    0x90(%rsp),%rbp
  mov    0xf0(%rsp),%r12
  mov    0x98(%rsp),%r13
L476:
  mov    0x0(%rbp,%rbx,8),%rdi
  call   <free@plt>
  mov    (%r12,%rbx,8),%rdi
  call   <free@plt>
  mov    0x0(%r13,%rbx,8),%rdi
  add    $0x1,%rbx
  call   <free@plt>
  cmp    0x158(%rsp),%rbx
  jne    L476
L146:
  mov    0x90(%rsp),%rdi
  call   <free@plt>
  mov    0xf0(%rsp),%rdi
  call   <free@plt>
  mov    0x98(%rsp),%rdi
  call   <free@plt>
  mov    0x80(%rsp),%rdi
  call   <free@plt>
  mov    0x128(%rsp),%rdi
  call   <free@plt>
  mov    0xd0(%rsp),%rdi
  call   <free@plt>
  mov    0x188(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L71
  mov    0xd8(%rsp),%rdi
  add    $0x198,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <free@plt>
L210:
  movsd  D23(%rip),%xmm5
  movl   $0x0,0x8(%rsp)
  movq   $0x4,0x18(%rsp)
  movq   $0x8,0x10(%rsp)
  movsd  %xmm5,0x138(%rsp)
  jmp    L28
L363:
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    %r13,%rdi
  mov    %rax,0xd0(%rsp)
  call   <malloc@plt>
  sub    $0x8,%rsp
  xor    %ecx,%ecx
  mov    %r15,%rdi
  mov    %rax,0xe0(%rsp)
  mov    $0x1,%r8d
  push   0xf0(%rsp)
  push   0xf0(%rsp)
  mov    0x20(%rsp),%eax
  push   %rax
  mov    0xac(%rsp),%ebx
  xor    %eax,%eax
  mov    0x170(%rsp),%r9d
  mov    0xec(%rsp),%edx
  mov    %ebx,%esi
  call   <make_box2@plt>
  add    $0x20,%rsp
  test   %ebx,%ebx
  jg     L135
L303:
  mov    0xcc(%rsp),%eax
  test   %eax,%eax
  jg     L78
  jmp    L400
L444:
  mov    0x8c(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x154(%rsp)
  jmp    L428
L335:
  xor    %edx,%edx
  jmp    L341
L71:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D17
type: f64
name: retrieve_data
arguments: label: D23
type: f64
name: retrieve_data
arguments: label: D39
type: qword

tool: D17: 0.5

tool: D23: 4

tool: D39: 9223372036854775807

assistant: ```c
void mi_d(double **x, int dim, int N, int K, float *mi_cr, double *psi, double *phi, double minx, double maxx, double miny, double maxy) {
  int i, k, ik, **n1, **n2;
  double *xc, dx;
  double **eps, *Eps;
  int *maxdim;
  double *dxy1, *dxy2;
  int *nn;
  int d;
  int BOX, BOX1;
  int **box, *lis;
  int **box1;
  int **lis1;
  int **mxi;
  double epsilon;
  int inveps;
  double scal[2];
  nn = (int *)malloc((K + 1) * sizeof(int));
  xc = (double *)malloc((dim + 1) * sizeof(double));
  BOX = 1;
  while (0.5 * BOX * BOX * K < N)
    BOX *= 2;
  epsilon = 4.0 / BOX;
  inveps = BOX / 4;
  BOX1 = N - 5;
  scal[0] = BOX1 / (maxx - minx);
  scal[1] = BOX1 / (maxy - miny);
  box1 = (int **)malloc((dim) * sizeof(int *));
  lis1 = (int **)malloc((dim) * sizeof(int *));
  mxi = (int **)malloc((dim) * sizeof(int *));
  for (d = 0; d < dim; d++) {
    box1[d] = (int *)malloc((BOX1 + 1) * sizeof(int));
    lis1[d] = (int *)malloc((N) * sizeof(int));
    mxi[d] = (int *)malloc((BOX1 + 1) * 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((K) * sizeof(double *));
  Eps = (double *)malloc((K) * sizeof(double));
  n1 = (int **)malloc((K) * sizeof(int *));
  n2 = (int **)malloc((K) * sizeof(int *));
  maxdim = (int *)malloc((K) * sizeof(int));
  for (ik = 0; ik < K; ik++) {
    eps[ik] = (double *)malloc((dim) * sizeof(double));
    n1[ik] = (int *)malloc((dim) * sizeof(int));
    n2[ik] = (int *)malloc((dim) * sizeof(int));
    mi_cr[ik * 2] = 0;
    mi_cr[ik * 2 + 1] = 0;
  }
  dxy1 = (double *)malloc((K) * sizeof(double));
  dxy2 = (double *)malloc((K) * sizeof(double));
  make_box2(x, dim, N, 0, 1, BOX, inveps, box, lis);
  for (d = 0; d < dim; d++) {
    make_box1(x[d], N, scal[d & 1], BOX1, box1[d], lis1[d], mxi[d]);
  }
  for (ik = 0; ik < K; ik++) {
    dxy1[ik] = dxy2[ik] = 0.0;
  }
  for (i = 0; i < N; i++) {
    for (d = 0; d < dim; d++)
      xc[d] = x[d][i];
    neiK(x, dim, 0, 1, i, BOX, epsilon, K, box, lis, nn);
    for (ik = 0; ik < K; ik++) {
      Eps[ik] = 0;
      maxdim[ik] = -1;
      for (d = 0; d < dim; d++) {
        eps[ik][d] = 0;
        for (k = 1; k <= ik + 1; k++) {
          if ((dx = fabs(xc[d] - x[d][nn[k]])) > eps[ik][d])
            eps[ik][d] = dx;
        }
        if (eps[ik][d] > Eps[ik]) {
          Eps[ik] = eps[ik][d];
          maxdim[ik] = d;
        }
      }
    }
    for (ik = 0; ik < K; ik++) {
      for (d = 0; d < dim; d++) {
        n2[ik][d] = neiE1(x[d], i, scal[d & 1], BOX1, eps[ik][d], box1[d], lis1[d], mxi[d]);
        if (d == maxdim[ik]) {
          n1[ik][d] = n2[ik][d];
          dxy1[ik] += psi[n1[ik][d]];
        } else {
          n1[ik][d] = neiE1(x[d], i, scal[d & 1], BOX1, Eps[ik], box1[d], lis1[d], mxi[d]);
          dxy1[ik] += psi[n1[ik][d] + 1];
        }
        dxy2[ik] += psi[n2[ik][d]];
      }
    }
  }
  for (ik = 0; ik < K; ik++) {
    dxy1[ik] /= N;
    mi_cr[ik * 2] = (float)((dim - 1) * psi[N] + psi[ik + 1] - dxy1[ik]);
    dxy2[ik] /= N;
    mi_cr[ik * 2 + 1] = (float)((dim - 1) * psi[N] + phi[ik + 1] - dxy2[ik]);
  }
  free(xc);
  free(nn);
  for (i = 0; i < BOX; i++)
    free(box[i]);
  free(box);
  free(lis);
  for (d = 0; d < dim; d++) {
    free(box1[d]);
    free(lis1[d]);
    free(mxi[d]);
  }
  free(box1);
  free(lis1);
  free(mxi);
  for (ik = 0; ik < K; ik++) {
    free(eps[ik]);
    free(n1[ik]);
    free(n2[ik]);
  }
  free(eps);
  free(n1);
  free(n2);
  free(Eps);
  free(maxdim);
  free(dxy1);
  free(dxy2);
}
```