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

```asm
<qrbdi>:
  endbr64
  movsd  (%rdi),%xmm2
  movq   D35(%rip),%xmm3
  andpd  %xmm3,%xmm2
  cmp    $0x1,%edx
  jle    L135
  push   %r15
  movslq %edx,%r11
  mov    $0x1,%eax
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x68,%rsp
  nopl   0x0(%rax)
L159:
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  -0x8(%r12,%rax,8),%xmm1
  add    $0x1,%rax
  andpd  %xmm3,%xmm0
  andpd  %xmm3,%xmm1
  addsd  %xmm1,%xmm0
  maxsd  %xmm2,%xmm0
  movapd %xmm0,%xmm2
  cmp    %rax,%r11
  jne    L159
  imul   $0x64,%edx,%eax
  mulsd  D27(%rip),%xmm2
  pxor   %xmm5,%xmm5
  xor    %r8d,%r8d
  mov    %eax,0x4(%rsp)
L178:
  lea    -0x1(%rdx),%ecx
  movslq %ecx,%rbx
  cs nopw 0x0(%rax,%rax,1)
L51:
  movsd  -0x8(%r12,%rbx,8),%xmm1
  mov    %ebx,%r15d
  lea    0x0(,%rbx,8),%r13
  movapd %xmm1,%xmm0
  andpd  %xmm3,%xmm0
  comisd %xmm0,%xmm2
  ja     L275
  movsd  -0x8(%rbp,%rbx,8),%xmm0
  andpd  %xmm3,%xmm0
  comisd %xmm0,%xmm2
  ja     L27
  sub    $0x1,%rbx
  jne    L51
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %r13d,%r13d
  mov    $0x1,%r10d
  xor    %r15d,%r15d
L267:
  shl    $0x3,%r11
  movsd  (%rdi),%xmm1
  lea    -0x8(%rbp,%r11,1),%rax
  lea    -0x10(%r12,%r11,1),%rdi
  movsd  (%rax),%xmm6
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm4
  movsd  (%rdi),%xmm0
  subsd  %xmm6,%xmm4
  addsd  %xmm6,%xmm8
  mulsd  %xmm0,%xmm0
  mulsd  %xmm4,%xmm8
  movsd  (%rsi),%xmm4
  movapd %xmm4,%xmm9
  mulsd  %xmm1,%xmm9
  subsd  %xmm0,%xmm8
  movapd %xmm9,%xmm7
  movapd %xmm8,%xmm0
  addsd  %xmm9,%xmm7
  mulsd  %xmm8,%xmm0
  mulsd  %xmm7,%xmm7
  addsd  %xmm0,%xmm7
  ucomisd %xmm7,%xmm5
  ja     L192
  sqrtsd %xmm7,%xmm7
L38:
  comisd %xmm5,%xmm7
  ja     L173
L134:
  movsd  %xmm6,(%rdi)
  andpd  %xmm3,%xmm6
  ucomisd %xmm6,%xmm2
  movsd  %xmm1,(%rax)
  cmova  %ecx,%edx
  xor    %eax,%eax
  cmp    %r10d,%edx
  sete   %al
  add    $0x1,%r8d
  sub    %eax,%edx
  cmp    $0x1,%edx
  jle    L14
  cmp    %r8d,0x4(%rsp)
  jle    L14
  movslq %edx,%r11
  jmp    L178
  nopl   0x0(%rax)
L275:
  lea    0x0(%rbp,%r13,1),%rdi
  lea    (%r12,%r13,1),%rsi
  lea    0x1(%rbx),%r10d
  jmp    L267
  nopw   0x0(%rax,%rax,1)
L27:
  lea    0x0(%rbp,%r13,1),%rdi
  lea    (%r12,%r13,1),%rsi
  lea    0x1(%rbx),%r10d
  cmp    %edx,%ebx
  jge    L267
  movslq %ebx,%r9
  movapd %xmm5,%xmm6
  lea    0x0(,%r9,8),%r14
  lea    0x0(%rbp,%r14,1),%rax
  add    %r12,%r14
  mov    %rax,0x8(%rsp)
  mov    %ecx,%eax
  sub    %ebx,%eax
  add    %rax,%r9
  mov    D13(%rip),%rax
  lea    (%r12,%r9,8),%r9
  movq   %rax,%xmm4
  mov    0x8(%rsp),%rax
  jmp    L28
  nopw   0x0(%rax,%rax,1)
L17:
  sqrtsd %xmm0,%xmm0
L257:
  movsd  %xmm0,(%rax)
  divsd  %xmm0,%xmm4
  movapd %xmm7,%xmm6
  add    $0x8,%rax
  divsd  %xmm0,%xmm6
  cmp    %r14,%r9
  je     L267
  movsd  (%r14),%xmm1
  add    $0x8,%r14
L28:
  mulsd  %xmm1,%xmm4
  movsd  (%rax),%xmm7
  mulsd  %xmm6,%xmm1
  movapd %xmm4,%xmm0
  movsd  %xmm1,-0x8(%r14)
  mulsd  %xmm4,%xmm0
  movapd %xmm7,%xmm1
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm5
  jbe    L17
  mov    %ecx,0x5c(%rsp)
  mov    %r11,0x50(%rsp)
  mov    %edx,0x48(%rsp)
  mov    %r8d,0x58(%rsp)
  mov    %r10d,0x40(%rsp)
  mov    %rsi,0x38(%rsp)
  mov    %rdi,0x30(%rsp)
  mov    %rax,0x28(%rsp)
  mov    %r9,0x20(%rsp)
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm7,0x10(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <sqrt@plt>
  mov    0x5c(%rsp),%ecx
  mov    0x50(%rsp),%r11
  pxor   %xmm5,%xmm5
  mov    0x48(%rsp),%edx
  mov    0x58(%rsp),%r8d
  mov    0x40(%rsp),%r10d
  mov    0x38(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  mov    0x28(%rsp),%rax
  mov    0x20(%rsp),%r9
  movsd  0x18(%rsp),%xmm2
  movq   D35(%rip),%xmm3
  movsd  0x10(%rsp),%xmm7
  movsd  0x8(%rsp),%xmm4
  jmp    L257
  cs nopw 0x0(%rax,%rax,1)
L173:
  movapd %xmm7,%xmm0
  addsd  %xmm7,%xmm8
  addsd  %xmm7,%xmm0
  divsd  %xmm0,%xmm8
  ucomisd %xmm8,%xmm5
  ja     L35
  sqrtsd %xmm8,%xmm8
L195:
  ucomisd %xmm5,%xmm8
  jp     L208
  mov    D13(%rip),%rsi
  movq   %rsi,%xmm0
  je     L138
L208:
  mulsd  %xmm8,%xmm7
  movapd %xmm9,%xmm0
  divsd  %xmm7,%xmm0
L138:
  cmp    %ecx,%r15d
  jge    L134
  lea    0x1(%r15),%r14d
  movslq %r14d,%r14
  jmp    L199
  nopw   0x0(%rax,%rax,1)
L89:
  mov    %r14,%rbx
  add    $0x1,%r14
L199:
  movapd %xmm4,%xmm6
  movapd %xmm8,%xmm7
  lea    0x8(%rbp,%rbx,8),%rbx
  mulsd  %xmm0,%xmm6
  mulsd  %xmm1,%xmm7
  mulsd  %xmm0,%xmm1
  mulsd  (%rbx),%xmm0
  mulsd  %xmm8,%xmm4
  addsd  %xmm6,%xmm7
  movapd %xmm0,%xmm9
  mulsd  %xmm0,%xmm0
  movapd %xmm7,%xmm6
  subsd  %xmm1,%xmm4
  mulsd  %xmm7,%xmm6
  addsd  %xmm0,%xmm6
  ucomisd %xmm6,%xmm5
  ja     L113
  sqrtsd %xmm6,%xmm6
L165:
  divsd  %xmm6,%xmm7
  movapd %xmm9,%xmm0
  movsd  %xmm6,0x0(%rbp,%r13,1)
  movsd  (%rbx),%xmm1
  mulsd  %xmm8,%xmm1
  divsd  %xmm6,%xmm0
  movapd %xmm4,%xmm6
  mulsd  %xmm7,%xmm6
  movapd %xmm7,%xmm8
  movapd %xmm1,%xmm7
  mulsd  %xmm8,%xmm1
  mulsd  %xmm0,%xmm7
  mulsd  %xmm0,%xmm4
  addsd  %xmm7,%xmm6
  subsd  %xmm4,%xmm1
  cmp    %r14d,%ecx
  jle    L134
  movsd  (%r12,%r14,8),%xmm4
  lea    0x0(,%r14,8),%r13
  cmp    %r14d,%r15d
  jge    L89
  mulsd  %xmm4,%xmm0
  movapd %xmm6,%xmm7
  mulsd  %xmm6,%xmm7
  movapd %xmm0,%xmm9
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm7
  ucomisd %xmm7,%xmm5
  ja     L71
  sqrtsd %xmm7,%xmm7
L62:
  divsd  %xmm7,%xmm6
  movapd %xmm9,%xmm0
  movsd  %xmm7,-0x8(%r12,%r14,8)
  mulsd  %xmm8,%xmm4
  divsd  %xmm7,%xmm0
  movapd %xmm6,%xmm8
  jmp    L89
  nopw   0x0(%rax,%rax,1)
L14:
  add    $0x68,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L135:
  xor    %eax,%eax
  ret
L113:
  movapd %xmm6,%xmm0
  mov    %ecx,0x50(%rsp)
  mov    %edx,0x48(%rsp)
  mov    %r8d,0x58(%rsp)
  mov    %r10d,0x40(%rsp)
  mov    %rdi,0x30(%rsp)
  mov    %rax,0x28(%rsp)
  movsd  %xmm2,0x38(%rsp)
  movsd  %xmm8,0x20(%rsp)
  movsd  %xmm9,0x18(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm7,0x8(%rsp)
  call   <sqrt@plt>
  mov    0x50(%rsp),%ecx
  mov    0x48(%rsp),%edx
  pxor   %xmm5,%xmm5
  mov    0x58(%rsp),%r8d
  mov    0x40(%rsp),%r10d
  movapd %xmm0,%xmm6
  movsd  0x38(%rsp),%xmm2
  mov    0x30(%rsp),%rdi
  mov    0x28(%rsp),%rax
  movq   D35(%rip),%xmm3
  movsd  0x20(%rsp),%xmm8
  movsd  0x18(%rsp),%xmm9
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm7
  jmp    L165
L192:
  movapd %xmm7,%xmm0
  mov    %edx,0x5c(%rsp)
  mov    %r8d,0x50(%rsp)
  mov    %ecx,0x58(%rsp)
  mov    %r10d,0x40(%rsp)
  mov    %rdi,0x10(%rsp)
  mov    %rax,0x8(%rsp)
  movsd  %xmm2,0x48(%rsp)
  movsd  %xmm4,0x38(%rsp)
  movsd  %xmm9,0x30(%rsp)
  movsd  %xmm8,0x28(%rsp)
  movsd  %xmm1,0x20(%rsp)
  movsd  %xmm6,0x18(%rsp)
  call   <sqrt@plt>
  mov    0x5c(%rsp),%edx
  mov    0x50(%rsp),%r8d
  pxor   %xmm5,%xmm5
  movsd  0x48(%rsp),%xmm2
  mov    0x58(%rsp),%ecx
  movapd %xmm0,%xmm7
  movq   D35(%rip),%xmm3
  mov    0x40(%rsp),%r10d
  movsd  0x38(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm9
  movsd  0x28(%rsp),%xmm8
  movsd  0x20(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm6
  mov    0x10(%rsp),%rdi
  mov    0x8(%rsp),%rax
  jmp    L38
L71:
  movapd %xmm7,%xmm0
  mov    %ecx,0x5c(%rsp)
  mov    %edx,0x50(%rsp)
  mov    %r8d,0x48(%rsp)
  mov    %r10d,0x58(%rsp)
  mov    %rdi,0x38(%rsp)
  mov    %rax,0x30(%rsp)
  movsd  %xmm2,0x40(%rsp)
  movsd  %xmm9,0x28(%rsp)
  movsd  %xmm8,0x20(%rsp)
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  call   <sqrt@plt>
  mov    0x5c(%rsp),%ecx
  mov    0x50(%rsp),%edx
  pxor   %xmm5,%xmm5
  mov    0x48(%rsp),%r8d
  mov    0x58(%rsp),%r10d
  movapd %xmm0,%xmm7
  movsd  0x40(%rsp),%xmm2
  mov    0x38(%rsp),%rdi
  mov    0x30(%rsp),%rax
  movq   D35(%rip),%xmm3
  movsd  0x28(%rsp),%xmm9
  movsd  0x20(%rsp),%xmm8
  movsd  0x18(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm6
  jmp    L62
L35:
  movapd %xmm8,%xmm0
  mov    %edx,0x5c(%rsp)
  mov    %r8d,0x50(%rsp)
  mov    %ecx,0x58(%rsp)
  mov    %r10d,0x40(%rsp)
  mov    %rdi,0x10(%rsp)
  mov    %rax,0x8(%rsp)
  movsd  %xmm2,0x48(%rsp)
  movsd  %xmm4,0x38(%rsp)
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm9,0x28(%rsp)
  movsd  %xmm1,0x20(%rsp)
  movsd  %xmm6,0x18(%rsp)
  call   <sqrt@plt>
  mov    0x5c(%rsp),%edx
  mov    0x50(%rsp),%r8d
  pxor   %xmm5,%xmm5
  movsd  0x48(%rsp),%xmm2
  mov    0x58(%rsp),%ecx
  movapd %xmm0,%xmm8
  movq   D35(%rip),%xmm3
  mov    0x40(%rsp),%r10d
  movsd  0x38(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm9
  movsd  0x20(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm6
  mov    0x10(%rsp),%rdi
  mov    0x8(%rsp),%rax
  jmp    L195
```

tool_calls: name: disassemble_data
arguments: tag: D35
datatype: qword
name: disassemble_data
arguments: tag: D27
datatype: byte[8]
name: disassemble_data
arguments: tag: D13
datatype: f64

tool: D35: 9223372036854775807

tool: {"D27": [0x16,0x56,0xe7,0x9e,0xaf,0x03,0xd2,0x3c]}

tool: D13: 1

assistant: ```c
int qrbdi(double *dm, double *em, int m) {
  int i, j, k, n;
  double u, x, y, a, b, c, s, t;
  for (j = 1, t = fabs(dm[0]); j < m; ++j)
    if ((s = fabs(dm[j]) + fabs(em[j - 1])) > t)
      t = s;
  t *= 1.e-15;
  n = 100 * m;
  for (j = 0; m > 1 && j < n; ++j) {
    for (k = m - 1; k > 0; --k) {
      if (fabs(em[k - 1]) < t)
        break;
      if (fabs(dm[k - 1]) < t) {
        for (i = k, s = 1., c = 0.; i < m; ++i) {
          a = s * em[i - 1];
          b = dm[i];
          em[i - 1] *= c;
          dm[i] = u = sqrt(a * a + b * b);
          s = -a / u;
          c = b / u;
        }
        break;
      }
    }
    y = dm[k];
    x = dm[m - 1];
    u = em[m - 2];
    a = (y + x) * (y - x) - u * u;
    s = y * em[k];
    b = s + s;
    u = sqrt(a * a + b * b);
    if (u > 0.) {
      c = sqrt((u + a) / (u + u));
      if (c != 0.)
        s /= (c * u);
      else
        s = 1.;
      for (i = k; i < m - 1; ++i) {
        b = em[i];
        if (i > k) {
          a = s * em[i];
          b *= c;
          em[i - 1] = u = sqrt(x * x + a * a);
          c = x / u;
          s = a / u;
        }
        a = c * y + s * b;
        b = c * b - s * y;
        s *= dm[i + 1];
        dm[i] = u = sqrt(a * a + s * s);
        y = c * dm[i + 1];
        c = a / u;
        s /= u;
        x = c * b + s * y;
        y = c * y - s * b;
      }
    }
    em[m - 2] = x;
    dm[m - 1] = y;
    if (fabs(x) < t)
      --m;
    if (m == k + 1)
      --m;
  }
  return j;
}
```