user: 请将以下的汇编代码转换成C语言代码:

```asm
<lineSearchUpdateOffsetNURBS>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %edi,%r14d
  mov    %esi,0x2c(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rcx,%rbx
  mov    %r8d,%r15d
  mov    %r8d,0x28(%rsp)
  mov    %r9d,0x68(%rsp)
  mov    0xe8(%rsp),%r13
  mov    0xf0(%rsp),%rcx
  mov    0x100(%rsp),%rbp
  mov    0x108(%rsp),%rsi
  imul   %r9d,%r15d
  lea    -0x8(%r15,%r15,1),%eax
  cmpl   $0x0,0xd8(%rsp)
  jle    L210
  mov    %rcx,%rdx
  mov    0xd8(%rsp),%edi
  lea    -0x1(%rdi),%edi
  lea    0x8(%rcx,%rdi,8),%rdi
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x60(%rsp)
L121:
  movsd  (%rdx),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  0x60(%rsp),%xmm0
  movsd  %xmm0,0x60(%rsp)
  add    $0x8,%rdx
  cmp    %rdi,%rdx
  jne    L121
L36:
  test   %eax,%eax
  jle    L37
  mov    %eax,%edx
  mov    $0x0,%eax
  pxor   %xmm0,%xmm0
L246:
  movsd  0x0(%rbp,%rax,8),%xmm1
  mulsd  (%rsi,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L246
L123:
  mulsd  D11(%rip),%xmm0
  movsd  %xmm0,0x70(%rsp)
  movslq 0xd8(%rsp),%rax
  lea    (%rcx,%rax,8),%rax
  mov    %rax,0x78(%rsp)
  mov    0xd8(%rsp),%eax
  lea    -0x1(%rax),%eax
  shl    $0x4,%rax
  mov    0xd0(%rsp),%rcx
  lea    0x10(%rcx,%rax,1),%rax
  mov    %rax,0x50(%rsp)
  mov    0x2c(%rsp),%eax
  mov    0x138(%rsp),%rcx
  lea    0x8(%rcx,%rax,8),%rax
  mov    %rax,0x8(%rsp)
  movl   $0x32,0x6c(%rsp)
  movsd  D18(%rip),%xmm6
  movsd  %xmm6,0x48(%rsp)
  mov    0xf8(%rsp),%rax
  add    $0x4,%rax
  mov    %rax,0x58(%rsp)
  jmp    L247
L210:
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x60(%rsp)
  jmp    L36
L37:
  pxor   %xmm0,%xmm0
  jmp    L123
L7:
  movsd  (%r9),%xmm0
  mulsd  (%rdi),%xmm0
  movapd %xmm0,%xmm1
  mulsd  (%rdx),%xmm1
  addsd  %xmm1,%xmm3
  movapd %xmm0,%xmm1
  mulsd  0x8(%rdx),%xmm1
  addsd  %xmm1,%xmm6
  movapd %xmm0,%xmm1
  mulsd  0x10(%rdx),%xmm1
  addsd  %xmm1,%xmm5
  mulsd  0x18(%rdx),%xmm0
  addsd  %xmm0,%xmm4
L61:
  add    $0x4,%rsi
  add    $0x8,%rdi
  add    $0x20,%rdx
  add    $0x3,%r8d
  cmp    %r10,%rsi
  je     L189
L212:
  mov    (%rsi),%eax
  cmp    %r15d,%eax
  jge    L7
  add    %eax,%eax
  movslq %eax,%rcx
  movapd %xmm7,%xmm1
  mulsd  0x8(%rbp,%rcx,8),%xmm1
  addsd  0x18(%rdx),%xmm1
  movsd  (%r9),%xmm0
  mulsd  (%rdi),%xmm0
  mulsd  %xmm0,%xmm1
  movslq %r8d,%rax
  movapd %xmm7,%xmm0
  mulsd  0x0(%rbp,%rcx,8),%xmm0
  movapd %xmm0,%xmm2
  mulsd  0x0(%r13,%rax,8),%xmm2
  addsd  (%rbx,%rax,8),%xmm2
  mulsd  %xmm1,%xmm2
  addsd  %xmm2,%xmm3
  movapd %xmm0,%xmm2
  mulsd  0x8(%r13,%rax,8),%xmm2
  addsd  0x8(%rbx,%rax,8),%xmm2
  mulsd  %xmm1,%xmm2
  addsd  %xmm2,%xmm6
  mulsd  0x10(%r13,%rax,8),%xmm0
  addsd  0x10(%rbx,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm5
  addsd  %xmm1,%xmm4
  jmp    L61
L189:
  add    $0x8,%r9
  add    0x28(%rsp),%r11d
  cmp    0x8(%rsp),%r9
  je     L40
L73:
  test   %r14d,%r14d
  js     L189
  movslq %r11d,%rax
  mov    0xf8(%rsp),%rcx
  lea    (%rcx,%rax,4),%rsi
  mov    0x120(%rsp),%rdi
  mov    %rax,%rdx
  shl    $0x5,%rdx
  add    0x18(%rsp),%rdx
  lea    (%r11,%r11,2),%r8d
  add    0x10(%rsp),%rax
  lea    (%r12,%rax,4),%r10
  jmp    L212
L95:
  pxor   %xmm4,%xmm4
  movapd %xmm4,%xmm5
  movapd %xmm4,%xmm6
  movapd %xmm4,%xmm3
L40:
  mov    0x38(%rsp),%r12
  mulsd  (%r12),%xmm3
  mulsd  0x8(%r12),%xmm6
  addsd  %xmm6,%xmm3
  mulsd  0x10(%r12),%xmm5
  addsd  %xmm5,%xmm3
  divsd  %xmm4,%xmm3
  mov    0x40(%rsp),%rax
  addsd  (%rax),%xmm3
  movapd %xmm3,%xmm0
  call   <pwr2@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  0x30(%rsp),%xmm0
  movsd  %xmm0,0x30(%rsp)
  addq   $0x10,0x20(%rsp)
  mov    0x20(%rsp),%rcx
  add    $0x18,%r12
  mov    %r12,0x38(%rsp)
  addq   $0x8,0x40(%rsp)
  cmp    0x50(%rsp),%rcx
  je     L45
L229:
  mov    0xc0(%rsp),%rdx
  mov    0x20(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    %r14d,%esi
  mov    0x28(%rsp),%edi
  call   <FindSpan@plt>
  mov    %eax,%r12d
  mov    0x118(%rsp),%r9
  mov    0x110(%rsp),%r8
  mov    0x120(%rsp),%rcx
  mov    0xc0(%rsp),%rdx
  mov    %r14d,%esi
  mov    0x20(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    %r12d,%edi
  call   <BasisFuns@plt>
  sub    %r14d,%r12d
  mov    %r12d,0x10(%rsp)
  mov    0x20(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  mov    0xc8(%rsp),%rdx
  mov    0x2c(%rsp),%esi
  mov    0x68(%rsp),%edi
  call   <FindSpan@plt>
  mov    %eax,%r12d
  mov    0x20(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  mov    0x130(%rsp),%r9
  mov    0x128(%rsp),%r8
  mov    0x138(%rsp),%rcx
  mov    0xc8(%rsp),%rdx
  mov    0x2c(%rsp),%esi
  mov    %r12d,%edi
  call   <BasisFuns@plt>
  mov    0x2c(%rsp),%eax
  sub    %eax,%r12d
  test   %eax,%eax
  js     L95
  imul   0x28(%rsp),%r12d
  mov    0x10(%rsp),%r11d
  add    %r12d,%r11d
  mov    0x138(%rsp),%r9
  pxor   %xmm4,%xmm4
  movapd %xmm4,%xmm5
  movapd %xmm4,%xmm6
  movapd %xmm4,%xmm3
  mov    %r14d,%r12d
  movsd  0x48(%rsp),%xmm7
  mov    %r12,0x10(%rsp)
  mov    0x58(%rsp),%r12
  jmp    L73
L79:
  movsd  0x60(%rsp),%xmm0
  subsd  0x30(%rsp),%xmm0
  test   %r15d,%r15d
  jle    L74
  mov    0xf8(%rsp),%rdx
  mov    0x18(%rsp),%rax
  lea    (%r15,%r15,2),%edi
  mov    $0x0,%esi
  movsd  0x48(%rsp),%xmm2
  jmp    L154
L188:
  add    $0x4,%rdx
  add    $0x3,%esi
  add    $0x20,%rax
  cmp    %esi,%edi
  je     L74
L154:
  mov    (%rdx),%ecx
  cmp    %r15d,%ecx
  jge    L188
  movslq %esi,%r9
  lea    0x0(,%r9,8),%r11
  lea    (%rbx,%r11,1),%r8
  add    %ecx,%ecx
  movslq %ecx,%rcx
  movapd %xmm2,%xmm1
  mulsd  0x0(%rbp,%rcx,8),%xmm1
  mulsd  0x0(%r13,%r9,8),%xmm1
  addsd  (%r8),%xmm1
  movsd  %xmm1,(%r8)
  lea    0x8(%rbx,%r11,1),%r10
  mov    (%rdx),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  movapd %xmm2,%xmm1
  mulsd  0x0(%rbp,%rcx,8),%xmm1
  mulsd  0x8(%r13,%r11,1),%xmm1
  addsd  (%r10),%xmm1
  movsd  %xmm1,(%r10)
  lea    0x10(%rbx,%r11,1),%r9
  mov    (%rdx),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  movapd %xmm2,%xmm1
  mulsd  0x0(%rbp,%rcx,8),%xmm1
  mulsd  0x10(%r13,%r11,1),%xmm1
  addsd  (%r9),%xmm1
  movsd  %xmm1,(%r9)
  mov    (%rdx),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  movapd %xmm2,%xmm1
  mulsd  0x8(%rbp,%rcx,8),%xmm1
  addsd  0x18(%rax),%xmm1
  movsd  %xmm1,0x18(%rax)
  movapd %xmm1,%xmm3
  mulsd  (%r8),%xmm3
  movsd  %xmm3,(%rax)
  movapd %xmm1,%xmm3
  mulsd  (%r10),%xmm3
  movsd  %xmm3,0x8(%rax)
  mulsd  (%r9),%xmm1
  movsd  %xmm1,0x10(%rax)
  jmp    L188
L202:
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x30(%rsp)
L45:
  movsd  0x70(%rsp),%xmm0
  mulsd  0x48(%rsp),%xmm0
  addsd  0x60(%rsp),%xmm0
  comisd 0x30(%rsp),%xmm0
  ja     L79
  movsd  0x48(%rsp),%xmm6
  mulsd  D11(%rip),%xmm6
  movsd  %xmm6,0x48(%rsp)
  subl   $0x1,0x6c(%rsp)
  je     L105
L247:
  cmpl   $0x0,0xd8(%rsp)
  jle    L202
  mov    0xe0(%rsp),%rax
  mov    %rax,0x38(%rsp)
  mov    0x78(%rsp),%rax
  mov    %rax,0x40(%rsp)
  mov    0xd0(%rsp),%r12
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x30(%rsp)
  mov    %r12,0x20(%rsp)
  jmp    L229
L105:
  pxor   %xmm0,%xmm0
L74:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D11
datatype: f64
name: parse_data
arguments: data_tag: D18
datatype: f64

tool: D11: 0.5

tool: D18: 1

assistant: ```c
double lineSearchUpdateOffsetNURBS(int degU, int degV, double *cpw, double *cp, int ncp, int kcp, double *knotU, double *knotV, double *us, int nus, double *dirOffset, double *cpDir, double *sgnDistDiff, int *matInds, double *gnDir, double *gradIent, double *leftU, double *rightU, double *NU, double *leftV, double *rightV, double *NV) {
  int i, j, ii, itr, twoii, threeii, spanU, spanV, ind, ind2, fourncp, myint, numCP, numRows, orderU, orderV, cpInd;
  double bspnt[4], f0, scfp0, falpha, fdiff = 0.0, alpha = 1.0;
  fourncp = 4 * ncp;
  orderU = degU + 1;
  orderV = degV + 1;
  numCP = ncp * kcp;
  numRows = 2 * (numCP - 4);
  f0 = 0.0;
  for (ii = 0; ii < nus; ii++) {
    f0 += sgnDistDiff[ii] * sgnDistDiff[ii];
  }
  scfp0 = 0.0;
  for (ii = 0; ii < numRows; ii++) {
    scfp0 += gnDir[ii] * gradIent[ii];
  }
  scfp0 = 0.5 * scfp0;
  for (itr = 0; itr < 50; itr++) {
    falpha = 0.0;
    for (ii = 0; ii < nus; ii++) {
      twoii = 2 * ii;
      threeii = 3 * ii;
      spanU = FindSpan(ncp, degU, us[twoii], knotU);
      BasisFuns(spanU, us[twoii], degU, knotU, NU, leftU, rightU);
      ind = spanU - degU;
      spanV = FindSpan(kcp, degV, us[twoii + 1], knotV);
      BasisFuns(spanV, us[twoii + 1], degV, knotV, NV, leftV, rightV);
      ind2 = spanV - degV;
      myint = ind2 * fourncp + ind * 4;
      bspnt[0] = 0.0;
      bspnt[1] = 0.0;
      bspnt[2] = 0.0;
      bspnt[3] = 0.0;
      for (i = 0; i <= degV; i++) {
        for (j = 0; j <= degU; j++) {
          cpInd = (ind2 + i) * ncp + ind + j;
          if (matInds[cpInd] < numCP) {
            bspnt[0] += NV[i] * NU[j] * (cpw[4 * cpInd + 3] + alpha * gnDir[2 * matInds[cpInd] + 1]) * (cp[3 * cpInd] + alpha * gnDir[2 * matInds[cpInd]] * cpDir[3 * cpInd]);
            bspnt[1] += NV[i] * NU[j] * (cpw[4 * cpInd + 3] + alpha * gnDir[2 * matInds[cpInd] + 1]) * (cp[3 * cpInd + 1] + alpha * gnDir[2 * matInds[cpInd]] * cpDir[3 * cpInd + 1]);
            bspnt[2] += NV[i] * NU[j] * (cpw[4 * cpInd + 3] + alpha * gnDir[2 * matInds[cpInd] + 1]) * (cp[3 * cpInd + 2] + alpha * gnDir[2 * matInds[cpInd]] * cpDir[3 * cpInd + 2]);
            bspnt[3] += NV[i] * NU[j] * (cpw[4 * cpInd + 3] + alpha * gnDir[2 * matInds[cpInd] + 1]);
          } else {
            bspnt[0] += NV[i] * NU[j] * cpw[4 * cpInd];
            bspnt[1] += NV[i] * NU[j] * cpw[4 * cpInd + 1];
            bspnt[2] += NV[i] * NU[j] * cpw[4 * cpInd + 2];
            bspnt[3] += NV[i] * NU[j] * cpw[4 * cpInd + 3];
          }
        }
      }
      falpha += pwr2((dirOffset[threeii] * bspnt[0] + dirOffset[threeii + 1] * bspnt[1] + dirOffset[threeii + 2] * bspnt[2]) / bspnt[3] + sgnDistDiff[ii + nus]);
    }
    if (falpha < (f0 + alpha * scfp0)) {
      fdiff = f0 - falpha;
      for (cpInd = 0; cpInd < numCP; cpInd++) {
        if (matInds[cpInd] < numCP) {
          cp[3 * cpInd] += alpha * gnDir[2 * matInds[cpInd]] * cpDir[3 * cpInd];
          cp[3 * cpInd + 1] += alpha * gnDir[2 * matInds[cpInd]] * cpDir[3 * cpInd + 1];
          cp[3 * cpInd + 2] += alpha * gnDir[2 * matInds[cpInd]] * cpDir[3 * cpInd + 2];
          cpw[4 * cpInd + 3] += alpha * gnDir[2 * matInds[cpInd] + 1];
          cpw[4 * cpInd] = cpw[4 * cpInd + 3] * cp[3 * cpInd];
          cpw[4 * cpInd + 1] = cpw[4 * cpInd + 3] * cp[3 * cpInd + 1];
          cpw[4 * cpInd + 2] = cpw[4 * cpInd + 3] * cp[3 * cpInd + 2];
        }
      }
      break;
    } else {
      alpha = 0.5 * alpha;
    }
  }
  return (fdiff);
}
```