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

```asm
<EigenTridagQLImplicit>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%r15
  mov    %rsi,%r14
  mov    %edx,%r12d
  mov    %rcx,0x40(%rsp)
  cmp    $0x1,%edx
  jle    L147
  mov    %rsi,%rax
  lea    -0x2(%rdx),%edx
  lea    0x8(%rsi,%rdx,8),%rdx
L247:
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L247
  movslq %r12d,%rax
  movq   $0x0,-0x8(%r14,%rax,8)
L69:
  movslq %r12d,%rax
  lea    0x0(,%rax,8),%r13
  mov    $0x0,%ebp
  movl   $0x0,0x5c(%rsp)
  mov    %r15,%rdi
  mov    %rbp,%r15
  mov    %r13,%rbp
  mov    %r12d,%eax
  mov    %r14,%r12
  mov    %eax,%r14d
  mov    %rdi,%r13
  jmp    L66
L147:
  movslq %edx,%rax
  movq   $0x0,-0x8(%rsi,%rax,8)
  je     L69
  movl   $0x0,0x5c(%rsp)
L203:
  mov    0x5c(%rsp),%eax
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L224:
  subl   $0x1,0x58(%rsp)
  je     L304
  movsd  0x8(%r13,%r15,8),%xmm0
  movapd %xmm0,%xmm1
  subsd  0x0(%r13,%r15,8),%xmm1
  movsd  (%r12,%r15,8),%xmm0
  addsd  %xmm0,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  movapd %xmm1,%xmm4
  andpd  D59(%rip),%xmm4
  movsd  %xmm4,0x10(%rsp)
  comisd D22(%rip),%xmm4
  jbe    L40
  movsd  D22(%rip),%xmm2
  mulsd  %xmm1,%xmm1
  movapd %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
L274:
  movslq %ebx,%rax
  mov    %rax,0x48(%rsp)
  movsd  0x0(%r13,%rax,8),%xmm3
  subsd  0x0(%r13,%r15,8),%xmm3
  movsd  (%r12,%r15,8),%xmm0
  movapd %xmm2,%xmm1
  andpd  D59(%rip),%xmm1
  movsd  0x8(%rsp),%xmm4
  comisd D17(%rip),%xmm4
  jb     L175
L251:
  addsd  0x8(%rsp),%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm3
  movsd  %xmm3,0x8(%rsp)
  sub    $0x1,%ebx
  cmp    0x2c(%rsp),%ebx
  jl     L229
  movslq %ebx,%rbx
  movsd  D22(%rip),%xmm4
  pxor   %xmm3,%xmm3
  movsd  %xmm3,0x18(%rsp)
  movapd %xmm4,%xmm3
  mov    %r15,0x50(%rsp)
  jmp    L145
L40:
  movsd  0x8(%rsp),%xmm3
  movapd %xmm3,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  D22(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  movapd %xmm0,%xmm2
  jmp    L274
L175:
  xorpd  D61(%rip),%xmm1
  jmp    L251
L202:
  movsd  0x8(%rsp),%xmm0
  divsd  0x10(%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  D22(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  movsd  0x30(%rsp),%xmm6
  mulsd  %xmm0,%xmm6
L205:
  lea    0x8(,%rbx,8),%rax
  movsd  %xmm6,0x8(%r12,%rbx,8)
  ucomisd D17(%rip),%xmm6
  jp     L116
  je     L94
L116:
  movsd  0x10(%rsp),%xmm3
  divsd  %xmm6,%xmm3
  movsd  0x8(%rsp),%xmm4
  divsd  %xmm6,%xmm4
  movsd  0x8(%r13,%rbx,8),%xmm0
  subsd  0x18(%rsp),%xmm0
  movsd  0x0(%r13,%rbx,8),%xmm6
  subsd  %xmm0,%xmm6
  mulsd  %xmm3,%xmm6
  movapd %xmm4,%xmm1
  addsd  %xmm4,%xmm1
  movsd  0x20(%rsp),%xmm5
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm6
  movapd %xmm3,%xmm7
  mulsd  %xmm6,%xmm7
  movsd  %xmm7,0x18(%rsp)
  addsd  %xmm7,%xmm0
  movsd  %xmm0,0x8(%r13,%rbx,8)
  movapd %xmm4,%xmm0
  mulsd  %xmm6,%xmm0
  subsd  %xmm5,%xmm0
  movsd  %xmm0,0x8(%rsp)
  mov    0x40(%rsp),%rsi
  lea    -0x8(%rsi,%rax,1),%rax
  mov    $0x0,%edx
L255:
  movsd  0x8(%rax),%xmm1
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  movapd %xmm4,%xmm5
  mulsd  %xmm1,%xmm5
  addsd  %xmm5,%xmm2
  movsd  %xmm2,0x8(%rax)
  mulsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%edx
  add    %rbp,%rax
  cmp    %edx,%r14d
  jg     L255
  lea    -0x1(%r15),%eax
  mov    %eax,0x28(%rsp)
  sub    $0x1,%rbx
  cmp    %ebx,0x2c(%rsp)
  jg     L86
L145:
  mov    %ebx,%r15d
  mov    %ebx,0x28(%rsp)
  movsd  (%r12,%rbx,8),%xmm0
  movapd %xmm3,%xmm7
  mulsd  %xmm0,%xmm7
  movsd  %xmm7,0x10(%rsp)
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,0x20(%rsp)
  andpd  D59(%rip),%xmm7
  movsd  %xmm7,0x30(%rsp)
  movsd  0x8(%rsp),%xmm6
  andpd  D59(%rip),%xmm6
  movsd  %xmm6,0x38(%rsp)
  comisd %xmm6,%xmm7
  ja     L202
  movsd  0x8(%rsp),%xmm7
  ucomisd D17(%rip),%xmm7
  jp     L160
  jne    L160
  mov    0x50(%rsp),%r15
  add    $0x1,%rbx
  lea    0x0(,%rbx,8),%rax
  movq   $0x0,(%r12,%rbx,8)
  pxor   %xmm6,%xmm6
L280:
  add    %r13,%rax
  movsd  (%rax),%xmm0
  subsd  0x18(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x48(%rsp),%rax
  movq   $0x0,(%r12,%rax,8)
L311:
  ucomisd D17(%rip),%xmm6
  setnp  %al
  mov    $0x0,%edx
  cmovne %edx,%eax
  test   %al,%al
  je     L180
  mov    0x2c(%rsp),%esi
  cmp    %esi,0x28(%rsp)
  jge    L303
L180:
  movsd  0x0(%r13,%r15,8),%xmm0
  subsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x0(%r13,%r15,8)
  movsd  0x8(%rsp),%xmm3
  movsd  %xmm3,(%r12,%r15,8)
  mov    0x48(%rsp),%rax
  movq   $0x0,(%r12,%rax,8)
L303:
  lea    -0x1(%r14),%ecx
  mov    %r15d,0x2c(%rsp)
  cmp    %r15d,%ecx
  jle    L93
  mov    %r15,%rax
L176:
  mov    %eax,%edx
  mov    %eax,%ebx
  movsd  0x0(%r13,%rax,8),%xmm0
  andpd  D59(%rip),%xmm0
  movsd  0x8(%r13,%rax,8),%xmm1
  andpd  D59(%rip),%xmm1
  addsd  %xmm1,%xmm0
  movsd  (%r12,%rax,8),%xmm1
  andpd  D59(%rip),%xmm1
  addsd  %xmm0,%xmm1
  ucomisd %xmm0,%xmm1
  jp     L119
  je     L143
L119:
  lea    0x1(%rdx),%ebx
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L176
L143:
  cmp    0x2c(%rsp),%ebx
  jne    L224
L93:
  add    $0x1,%r15
  cmp    %r15d,%r14d
  jle    L203
L66:
  movl   $0x1f,0x58(%rsp)
  jmp    L303
L160:
  movsd  0x10(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  D22(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  movsd  0x38(%rsp),%xmm6
  mulsd  %xmm0,%xmm6
  jmp    L205
L94:
  mov    0x50(%rsp),%r15
  jmp    L280
L86:
  mov    0x50(%rsp),%r15
  jmp    L311
L229:
  pxor   %xmm3,%xmm3
  movsd  %xmm3,0x18(%rsp)
  jmp    L180
L304:
  movl   $0xffffffff,0x5c(%rsp)
  jmp    L93
```

tool_calls: name: parse_data
arguments: label: D59
datatype: qword[2]
name: parse_data
arguments: label: D22
datatype: f32[4]
name: parse_data
arguments: label: D17
datatype: f32[4]
name: parse_data
arguments: label: D61
datatype: f32[4]

tool: {"D59": [0x7fffffffffffffff,0x0000000000000000]}

tool: {"D22": [0.0,1.875,0.0,0.0]}

tool: {"D17": [0.0,0.0,0.0,-0.0]}

tool: {"D61": [0.0,-0.0,0.0,0.0]}

assistant: ```c
int EigenTridagQLImplicit(double d[], double e[], int n, double z[]) {
  int m, j, iter, niter = 30, status = 0, i, k;
  double s, r, p, g, f, dd, c, b, aa, bb;
  for (i = 1; i < n; i++)
    e[i - 1] = e[i];
  e[n - 1] = 0;
  for (j = 0; j < n; j++) {
    iter = 0;
    do {
      for (m = j; m < n - 1; m++) {
        dd = fabs(d[m]) + fabs(d[m + 1]);
        if (fabs(e[m]) + dd == dd)
          break;
      }
      if (m != j) {
        if (iter++ == niter) {
          status = -1;
          break;
        }
        g = (d[j + 1] - d[j]) / (2 * e[j]);
        if ((aa = fabs(g)) > 1)
          r = aa * sqrt(1 + 1 / (g * g));
        else
          r = sqrt(1 + g * g);
        g = d[m] - d[j] + e[j] / (g + ((g) >= 0.0 ? fabs(r) : -fabs(r)));
        s = c = 1;
        p = 0;
        for (i = m - 1; i >= j; i--) {
          f = s * e[i];
          b = c * e[i];
          aa = fabs(f);
          bb = fabs(g);
          if (aa > bb) {
            bb /= aa;
            r = aa * sqrt(1 + bb * bb);
          } else if (bb == 0)
            r = 0;
          else {
            aa /= bb;
            r = bb * sqrt(1 + aa * aa);
          }
          e[i + 1] = r;
          if (r == 0) {
            d[i + 1] -= p;
            e[m] = 0;
            break;
          }
          s = f / r;
          c = g / r;
          g = d[i + 1] - p;
          r = (d[i] - g) * s + 2 * c * b;
          d[i + 1] = g + (p = s * r);
          g = c * r - b;
          for (k = 0; k < n; k++) {
            f = z[k * n + i + 1];
            z[k * n + i + 1] = s * z[k * n + i] + c * f;
            z[k * n + i] = c * z[k * n + i] - s * f;
          }
        }
        if (r == 0 && i >= j)
          continue;
        d[j] -= p;
        e[j] = g;
        e[m] = 0;
      }
    } while (m != j);
  }
  return (status);
}
```