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

```asm
<distance_to_vslice>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %esi,-0x68(%rbp)
  mov    %edx,-0x6c(%rbp)
  mov    %ecx,-0x70(%rbp)
  mov    %r8d,-0x74(%rbp)
  movss  %xmm0,-0x78(%rbp)
  movss  %xmm1,-0x7c(%rbp)
  movss  %xmm2,-0x80(%rbp)
  movss  %xmm3,-0x84(%rbp)
  mov    %r9,-0x90(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x3c(%rbp),%r9
  lea    -0x40(%rbp),%r8
  lea    -0x44(%rbp),%rcx
  lea    -0x48(%rbp),%rdx
  lea    -0x4c(%rbp),%rsi
  mov    -0x64(%rbp),%eax
  sub    $0x8,%rsp
  lea    -0x38(%rbp),%rdi
  push   %rdi
  mov    %eax,%edi
  call   <vis5d_get_sizePRIME@plt>
  add    $0x10,%rsp
  movss  D12(%rip),%xmm0
  movss  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x68(%rbp),%xmm0
  movss  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x6c(%rbp),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L79
L37:
  cmpl   $0x3,-0x24(%rbp)
  je     L150
  cmpl   $0x3,-0x24(%rbp)
  jg     L116
  cmpl   $0x2,-0x24(%rbp)
  je     L78
  cmpl   $0x2,-0x24(%rbp)
  jg     L116
  cmpl   $0x0,-0x24(%rbp)
  je     L156
  cmpl   $0x1,-0x24(%rbp)
  je     L24
  jmp    L116
L156:
  movss  -0x78(%rbp),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x44(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  jmp    L116
L24:
  movss  -0x80(%rbp),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movss  -0x84(%rbp),%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x44(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  jmp    L116
L78:
  movss  -0x78(%rbp),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movss  -0x7c(%rbp),%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x40(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  jmp    L116
L150:
  movss  -0x80(%rbp),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movss  -0x84(%rbp),%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x40(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  nop
L116:
  lea    -0x14(%rbp),%rax
  lea    0x8(%rax),%r9
  lea    -0x14(%rbp),%rax
  lea    0x4(%rax),%r8
  lea    -0x14(%rbp),%rcx
  movss  -0x2c(%rbp),%xmm1
  movss  -0x30(%rbp),%xmm0
  mov    -0x34(%rbp),%edi
  mov    -0x74(%rbp),%edx
  mov    -0x70(%rbp),%esi
  mov    -0x64(%rbp),%eax
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %edi,%xmm0
  mov    %eax,%edi
  call   <vis5d_gridPRIME_to_xyzPRIME@plt>
  lea    -0x54(%rbp),%rcx
  lea    -0x58(%rbp),%rdx
  lea    -0x14(%rbp),%rsi
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <vis5d_project@plt>
  movss  -0x58(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  -0x20(%rbp),%xmm1
  movss  -0x58(%rbp),%xmm0
  subss  -0x20(%rbp),%xmm0
  mulss  %xmm0,%xmm1
  movss  -0x54(%rbp),%xmm0
  movaps %xmm0,%xmm2
  subss  -0x1c(%rbp),%xmm2
  movss  -0x54(%rbp),%xmm0
  subss  -0x1c(%rbp),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  -0x28(%rbp),%xmm0
  comiss -0x18(%rbp),%xmm0
  jbe    L34
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,-0x28(%rbp)
  mov    -0x90(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
L34:
  addl   $0x1,-0x24(%rbp)
L79:
  cmpl   $0x3,-0x24(%rbp)
  jle    L37
  lea    -0x50(%rbp),%rdx
  mov    -0x64(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <vis5d_get_curved@plt>
  mov    -0x50(%rbp),%eax
  test   %eax,%eax
  jne    L29
  movl   $0x4,-0x24(%rbp)
  jmp    L165
L160:
  movss  -0x7c(%rbp),%xmm0
  addss  -0x84(%rbp),%xmm0
  movss  D15(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x30(%rbp)
  movss  -0x78(%rbp),%xmm0
  addss  -0x80(%rbp),%xmm0
  movss  D15(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x34(%rbp)
  cmpl   $0x4,-0x24(%rbp)
  jne    L146
  mov    -0x44(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  jmp    L40
L146:
  mov    -0x40(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x2c(%rbp)
L40:
  lea    -0x14(%rbp),%rax
  lea    0x8(%rax),%r9
  lea    -0x14(%rbp),%rax
  lea    0x4(%rax),%r8
  lea    -0x14(%rbp),%rcx
  movss  -0x2c(%rbp),%xmm1
  movss  -0x30(%rbp),%xmm0
  mov    -0x34(%rbp),%edi
  mov    -0x74(%rbp),%edx
  mov    -0x70(%rbp),%esi
  mov    -0x64(%rbp),%eax
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %edi,%xmm0
  mov    %eax,%edi
  call   <vis5d_gridPRIME_to_xyzPRIME@plt>
  lea    -0x54(%rbp),%rcx
  lea    -0x58(%rbp),%rdx
  lea    -0x14(%rbp),%rsi
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <vis5d_project@plt>
  movss  -0x58(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  -0x20(%rbp),%xmm1
  movss  -0x58(%rbp),%xmm0
  subss  -0x20(%rbp),%xmm0
  mulss  %xmm0,%xmm1
  movss  -0x54(%rbp),%xmm0
  movaps %xmm0,%xmm2
  subss  -0x1c(%rbp),%xmm2
  movss  -0x54(%rbp),%xmm0
  subss  -0x1c(%rbp),%xmm0
  mulss  %xmm2,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  -0x28(%rbp),%xmm0
  comiss -0x18(%rbp),%xmm0
  jbe    L198
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,-0x28(%rbp)
  mov    -0x90(%rbp),%rax
  mov    -0x24(%rbp),%edx
  mov    %edx,(%rax)
L198:
  addl   $0x1,-0x24(%rbp)
L165:
  cmpl   $0x5,-0x24(%rbp)
  jle    L160
L29:
  movss  -0x28(%rbp),%xmm0
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L74
  call   <__stack_chk_fail@plt>
L74:
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D12
type_infered: f32
name: read_data
arguments: label: D15
type_infered: f32

tool: D12: 1000000

tool: D15: 2

assistant: ```c
float distance_to_vslice(int index, int curx, int cury, int time, int var, float r1, float c1, float r2, float c2, int *corner) {
  float cx, cy;
  float px, py;
  float r, c, l;
  float dist, neardist, p[3];
  int i;
  int curved;
  int Nr, Nc, Nl, LowLev, MaxNlVar, WindNl, WindLow;
  vis5d_get_sizePRIME(index, &Nr, &Nc, &Nl, &LowLev, &WindNl, &WindLow);
  neardist = 1000000.0;
  cx = (float)curx;
  cy = (float)cury;
  for (i = 0; i < 4; i++) {
    switch (i) {
    case 0:
      r = r1;
      c = c1;
      l = (float)(Nl - 1 + LowLev);
      break;
    case 1:
      r = r2;
      c = c2;
      l = (float)(Nl - 1 + LowLev);
      break;
    case 2:
      r = r1;
      c = c1;
      l = (float)LowLev;
      break;
    case 3:
      r = r2;
      c = c2;
      l = (float)LowLev;
      break;
    }
    vis5d_gridPRIME_to_xyzPRIME(index, time, var, r, c, l, &p[0], &p[1], &p[2]);
    vis5d_project(index, p, &px, &py);
    dist = (px - cx) * (px - cx) + (py - cy) * (py - cy);
    if (dist < neardist) {
      neardist = dist;
      *corner = i;
    }
  }
  vis5d_get_curved(index, &curved);
  if (curved == 0) {
    for (i = 4; i < 6; i++) {
      c = (c1 + c2) / 2.0;
      r = (r1 + r2) / 2.0;
      if (i == 4) {
        l = (float)(Nl - 1 + LowLev);
      } else {
        l = (float)LowLev;
      }
      vis5d_gridPRIME_to_xyzPRIME(index, time, var, r, c, l, &p[0], &p[1], &p[2]);
      vis5d_project(index, p, &px, &py);
      dist = (px - cx) * (px - cx) + (py - cy) * (py - cy);
      if (dist < neardist) {
        neardist = dist;
        *corner = i;
      }
    }
  }
  return neardist;
}
```