user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<lineSearchUpdateOffsetNURBS>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  push   %r14
  imul   %r9d,%r15d
  push   %r13
  mov    %edi,%r13d
  push   %r12
  push   %rbp
  lea    -0x8(%r15,%r15,1),%eax
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x98,%rsp
  mov    %esi,0x40(%rsp)
  mov    0xe8(%rsp),%esi
  mov    %rdx,0x18(%rsp)
  mov    0xf8(%rsp),%rbp
  mov    %r8d,0x8c(%rsp)
  mov    0x100(%rsp),%rdx
  mov    %r9d,0x64(%rsp)
  mov    0x110(%rsp),%r11
  mov    0x118(%rsp),%rcx
  mov    0x130(%rsp),%r12
  test   %esi,%esi
  jle    L130
  cmpl   $0x1,0xe8(%rsp)
  je     L82
  mov    0xe8(%rsp),%edi
  pxor   %xmm8,%xmm8
  mov    %rdx,%rsi
  movsd  %xmm8,0x70(%rsp)
  shr    %edi
  sub    $0x1,%edi
  shl    $0x4,%rdi
  lea    0x10(%rdx,%rdi,1),%rdi
L20:
  movupd (%rsi),%xmm0
  movsd  0x70(%rsp),%xmm1
  add    $0x10,%rsi
  mulpd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x70(%rsp)
  cmp    %rsi,%rdi
  jne    L20
  mov    0xe8(%rsp),%esi
  and    $0xfffffffe,%esi
  testb  $0x1,0xe8(%rsp)
  je     L33
L67:
  movslq %esi,%rsi
  movsd  (%rdx,%rsi,8),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  0x70(%rsp),%xmm0
  movsd  %xmm0,0x70(%rsp)
L33:
  test   %eax,%eax
  jle    L205
L17:
  shr    %eax
  xor    %esi,%esi
  movapd %xmm8,%xmm0
  shl    $0x4,%rax
L248:
  movupd (%rcx,%rsi,1),%xmm2
  movupd (%r11,%rsi,1),%xmm6
  add    $0x10,%rsi
  mulpd  %xmm6,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rsi,%rax
  jne    L248
  mulsd  D28(%rip),%xmm0
  movsd  %xmm0,0x78(%rsp)
L234:
  movslq 0xe8(%rsp),%rax
  mov    %r13d,0xc(%rsp)
  movslq %r13d,%r10
  mov    %r11,%r14
  mov    0xe0(%rsp),%rsi
  movsd  D25(%rip),%xmm7
  movl   $0x32,0x88(%rsp)
  lea    (%rdx,%rax,8),%rax
  mov    %rax,0x80(%rsp)
  mov    0xe8(%rsp),%eax
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x10(%rsi,%rax,1),%rax
  mov    0x148(%rsp),%rsi
  mov    %rax,0x58(%rsp)
  mov    0x40(%rsp),%eax
  lea    0x8(%rsi,%rax,8),%rax
  mov    %rax,0x10(%rsp)
L184:
  mov    0xe8(%rsp),%eax
  test   %eax,%eax
  jle    L204
  mov    0xf0(%rsp),%rax
  mov    %r10,%r13
  mov    0x8c(%rsp),%r10d
  movsd  %xmm8,0x30(%rsp)
  movsd  %xmm7,0x68(%rsp)
  mov    %rax,0x28(%rsp)
  mov    0x80(%rsp),%rax
  mov    %rax,0x38(%rsp)
  mov    0xe0(%rsp),%rax
  mov    %rax,0x20(%rsp)
  nopl   0x0(%rax,%rax,1)
L23:
  mov    0x20(%rsp),%rax
  mov    0xc(%rsp),%esi
  mov    %r10d,%edi
  mov    %r10d,0x48(%rsp)
  mov    0xd0(%rsp),%rdx
  movsd  %xmm8,0x50(%rsp)
  movsd  (%rax),%xmm0
  call   <FindSpan@plt>
  mov    0x128(%rsp),%r9
  mov    0xc(%rsp),%esi
  mov    %r12,%rcx
  mov    %eax,%edi
  mov    0x20(%rsp),%rax
  mov    0x120(%rsp),%r8
  mov    0xd0(%rsp),%rdx
  mov    %edi,0x44(%rsp)
  movsd  (%rax),%xmm0
  call   <BasisFuns@plt>
  mov    0x20(%rsp),%rax
  mov    0x44(%rsp),%edi
  sub    0xc(%rsp),%edi
  mov    0xd8(%rsp),%rdx
  movsd  0x8(%rax),%xmm0
  mov    0x40(%rsp),%esi
  mov    %edi,0x60(%rsp)
  mov    0x64(%rsp),%edi
  call   <FindSpan@plt>
  mov    0x140(%rsp),%r9
  mov    0x138(%rsp),%r8
  mov    %eax,%edi
  mov    0x20(%rsp),%rax
  mov    0x148(%rsp),%rcx
  mov    0xd8(%rsp),%rdx
  mov    0x40(%rsp),%esi
  mov    %edi,0x44(%rsp)
  movsd  0x8(%rax),%xmm0
  call   <BasisFuns@plt>
  mov    0x40(%rsp),%eax
  mov    0x44(%rsp),%edi
  mov    0x48(%rsp),%r10d
  movsd  0x50(%rsp),%xmm8
  sub    %eax,%edi
  test   %eax,%eax
  js     L188
  imul   %r10d,%edi
  mov    0x60(%rsp),%r9d
  movapd %xmm8,%xmm6
  mov    0x148(%rsp),%r11
  movsd  0x68(%rsp),%xmm7
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movapd %xmm8,%xmm3
  add    %edi,%r9d
  nopl   0x0(%rax)
L194:
  mov    0xc(%rsp),%edx
  test   %edx,%edx
  js     L73
  movslq %r9d,%rax
  movsd  (%r11),%xmm9
  lea    (%r9,%r9,2),%edi
  xor    %edx,%edx
  mov    0x108(%rsp),%rsi
  mov    %rax,%rcx
  shl    $0x5,%rcx
  add    0x18(%rsp),%rcx
  lea    (%rsi,%rax,4),%r8
  jmp    L111
  nopw   0x0(%rax,%rax,1)
L53:
  add    %eax,%eax
  add    $0x20,%rcx
  movslq %eax,%rsi
  movslq %edi,%rax
  add    $0x3,%edi
  movsd  0x8(%r14,%rsi,8),%xmm2
  mulsd  %xmm7,%xmm2
  addsd  %xmm2,%xmm1
  movsd  0x0(%rbp,%rax,8),%xmm2
  mulsd  %xmm1,%xmm0
  movsd  (%r14,%rsi,8),%xmm1
  mulsd  %xmm7,%xmm1
  addsd  %xmm0,%xmm6
  mulsd  %xmm1,%xmm2
  addsd  (%rbx,%rax,8),%xmm2
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm3
  movsd  0x8(%rbp,%rax,8),%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  0x10(%rbp,%rax,8),%xmm1
  addsd  0x8(%rbx,%rax,8),%xmm2
  addsd  0x10(%rbx,%rax,8),%xmm1
  lea    0x1(%rdx),%rax
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm1
  addsd  %xmm2,%xmm5
  addsd  %xmm1,%xmm4
  cmp    %r13,%rdx
  je     L73
L71:
  mov    %rax,%rdx
L111:
  movsd  (%r12,%rdx,8),%xmm0
  mov    (%r8,%rdx,4),%eax
  movsd  0x18(%rcx),%xmm1
  mulsd  %xmm9,%xmm0
  cmp    %r15d,%eax
  jl     L53
  movsd  (%rcx),%xmm2
  lea    0x1(%rdx),%rax
  add    $0x20,%rcx
  add    $0x3,%edi
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm3
  movsd  -0x18(%rcx),%xmm2
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm5
  movsd  -0x10(%rcx),%xmm2
  mulsd  %xmm0,%xmm2
  mulsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm4
  addsd  %xmm0,%xmm6
  cmp    %r13,%rdx
  jne    L71
L73:
  add    %r10d,%r9d
  add    $0x8,%r11
  cmp    %r11,0x10(%rsp)
  jne    L194
L57:
  mov    0x28(%rsp),%rax
  mov    0x38(%rsp),%rsi
  mov    %r10d,0x44(%rsp)
  movsd  %xmm8,0x48(%rsp)
  mulsd  (%rax),%xmm3
  mulsd  0x8(%rax),%xmm5
  mulsd  0x10(%rax),%xmm4
  addsd  %xmm5,%xmm3
  addsd  %xmm4,%xmm3
  divsd  %xmm6,%xmm3
  addsd  (%rsi),%xmm3
  movapd %xmm3,%xmm0
  call   <pwr2@plt>
  pxor   %xmm0,%xmm0
  mov    0x44(%rsp),%r10d
  addq   $0x10,0x20(%rsp)
  cvtsi2sd %rax,%xmm0
  addsd  0x30(%rsp),%xmm0
  addq   $0x18,0x28(%rsp)
  addq   $0x8,0x38(%rsp)
  mov    0x20(%rsp),%rdi
  cmp    %rdi,0x58(%rsp)
  movsd  0x48(%rsp),%xmm8
  movsd  %xmm0,0x30(%rsp)
  jne    L23
  movsd  0x68(%rsp),%xmm7
  mov    %r13,%r10
L26:
  movsd  0x78(%rsp),%xmm0
  mulsd  %xmm7,%xmm0
  addsd  0x70(%rsp),%xmm0
  comisd 0x30(%rsp),%xmm0
  ja     L27
  mulsd  D28(%rip),%xmm7
  subl   $0x1,0x88(%rsp)
  jne    L184
L49:
  add    $0x98,%rsp
  movapd %xmm8,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L188:
  movapd %xmm8,%xmm6
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movapd %xmm8,%xmm3
  jmp    L57
L204:
  movsd  %xmm8,0x30(%rsp)
  jmp    L26
L27:
  movsd  0x70(%rsp),%xmm8
  mov    %r14,%r11
  subsd  0x30(%rsp),%xmm8
  test   %r15d,%r15d
  jle    L49
  mov    0x108(%rsp),%rsi
  mov    0x18(%rsp),%rax
  lea    (%r15,%r15,2),%r9d
  xor    %ecx,%ecx
L243:
  mov    (%rsi),%edx
  cmp    %r15d,%edx
  jge    L85
  add    %edx,%edx
  movslq %ecx,%rdi
  movslq %edx,%rdx
  lea    0x0(,%rdi,8),%r12
  lea    (%r11,%rdx,8),%r13
  lea    (%rbx,%r12,1),%r10
  movsd  0x0(%r13),%xmm0
  lea    0x8(%rbx,%r12,1),%r8
  mulsd  %xmm7,%xmm0
  mulsd  0x0(%rbp,%rdi,8),%xmm0
  lea    0x10(%rbx,%r12,1),%rdi
  addsd  (%r10),%xmm0
  movsd  %xmm0,(%r10)
  movsd  0x0(%r13),%xmm0
  mulsd  %xmm7,%xmm0
  mulsd  0x8(%rbp,%r12,1),%xmm0
  addsd  (%r8),%xmm0
  movsd  %xmm0,(%r8)
  movsd  0x0(%r13),%xmm0
  mulsd  %xmm7,%xmm0
  mulsd  0x10(%rbp,%r12,1),%xmm0
  addsd  (%rdi),%xmm0
  movsd  %xmm0,(%rdi)
  movsd  0x8(%r11,%rdx,8),%xmm0
  mulsd  %xmm7,%xmm0
  addsd  0x18(%rax),%xmm0
  movsd  %xmm0,0x18(%rax)
  movsd  (%r10),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  movsd  (%r8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rax)
  mulsd  (%rdi),%xmm0
  movsd  %xmm0,0x10(%rax)
L85:
  add    $0x3,%ecx
  add    $0x4,%rsi
  add    $0x20,%rax
  cmp    %r9d,%ecx
  jne    L243
  jmp    L49
L130:
  pxor   %xmm8,%xmm8
  movsd  %xmm8,0x70(%rsp)
  test   %eax,%eax
  jg     L17
L205:
  movsd  %xmm8,0x78(%rsp)
  jmp    L234
L82:
  pxor   %xmm8,%xmm8
  xor    %esi,%esi
  movsd  %xmm8,0x70(%rsp)
  jmp    L67
```

tool_calls: name: unpack_data
arguments: tag: D28
type_guessed: f64
name: unpack_data
arguments: tag: D25
type_guessed: f64

tool: D28: 0.5

tool: D25: 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);
}
```