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

```asm
<NURBSsurfaceBasisX4Max>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    0x118(%rsp),%rax
  mov    %edi,0x40(%rsp)
  mov    %esi,0x44(%rsp)
  mov    0x110(%rsp),%r13
  mov    %rax,0xa0(%rsp)
  mov    0x120(%rsp),%rax
  mov    %rdx,0x48(%rsp)
  mov    %rax,0x28(%rsp)
  mov    0x128(%rsp),%rax
  mov    %ecx,0x20(%rsp)
  mov    %rax,0x50(%rsp)
  mov    0x130(%rsp),%rax
  mov    %r8d,0x88(%rsp)
  mov    %rax,0x58(%rsp)
  mov    0x138(%rsp),%rax
  mov    %rax,0x60(%rsp)
  mov    0x140(%rsp),%rax
  mov    %rax,0x68(%rsp)
  mov    0x148(%rsp),%rax
  mov    %rax,0x70(%rsp)
  mov    0x150(%rsp),%rax
  mov    %rax,0x78(%rsp)
  mov    0x158(%rsp),%rax
  mov    %rax,0x80(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%r8d
  jle    L6
  lea    -0x2(%r8),%eax
  mov    %ecx,0x90(%rsp)
  mov    %r13,%r10
  mov    %rax,0x98(%rsp)
  movslq %edi,%rax
  movl   $0x0,0x94(%rsp)
  lea    (%r9,%rax,8),%r15
  lea    0x2(%rsi),%eax
  mov    %eax,0xa8(%rsp)
  lea    -0x2(%rcx),%eax
  mov    %r15,%r13
  mov    %r9,%r15
  movq   $0x0,0x18(%rsp)
  movl   $0x0,0x8c(%rsp)
  mov    %eax,0xac(%rsp)
  nopl   0x0(%rax)
L2:
  mov    0x18(%rsp),%eax
  cmpl   $0x1,0x20(%rsp)
  mov    %eax,0x24(%rsp)
  jle    L36
  mov    0xa8(%rsp),%eax
  add    0x18(%rsp),%eax
  xor    %ebx,%ebx
  cltq
  mov    0x28(%rsp),%rdi
  mov    0xa0(%rsp),%rcx
  lea    (%r10,%rax,8),%r11
  mov    0x94(%rsp),%eax
  lea    0x2(%rax,%rax,1),%eax
  cltq
  lea    (%rdi,%rax,8),%r12
  mov    0x90(%rsp),%eax
  add    %eax,%eax
  cltq
  lea    (%rdi,%rax,8),%rbp
  mov    0x8c(%rsp),%eax
  add    %eax,%eax
  cltq
  lea    0x8(%rcx,%rax,8),%r14
  mov    0xac(%rsp),%eax
  mov    %rax,0x30(%rsp)
  lea    0xb0(%rsp),%rax
  mov    %rax,0x38(%rsp)
  mov    %r10,%rax
  mov    %r13,%r10
  mov    %rax,%r13
  nopl   (%rax)
L32:
  mov    0x18(%rsp),%rax
  mov    %r11,0x10(%rsp)
  sub    $0x8,%rsp
  mov    %ebx,%esi
  movsd  -0x10(%r12),%xmm0
  addsd  (%r12),%xmm0
  mov    %r10,0x10(%rsp)
  mov    $0x6,%edx
  addsd  0x0(%rbp),%xmm0
  add    $0x10,%r12
  add    $0x10,%rbp
  add    $0x10,%r14
  addsd  0x0(%rbp),%xmm0
  mulsd  D34(%rip),%xmm0
  movsd  (%r11),%xmm1
  subsd  0x0(%r13,%rax,8),%xmm1
  movsd  %xmm0,0xb8(%rsp)
  movsd  -0x18(%r12),%xmm0
  addsd  -0x8(%r12),%xmm0
  addsd  -0x8(%rbp),%xmm0
  addsd  0x8(%rbp),%xmm0
  mulsd  D34(%rip),%xmm0
  movsd  %xmm0,0xc0(%rsp)
  movsd  0x10(%r10,%rbx,8),%xmm0
  subsd  (%r15,%rbx,8),%xmm0
  push   0x88(%rsp)
  mulsd  D18(%rip),%xmm0
  push   0x88(%rsp)
  push   0x88(%rsp)
  push   0x88(%rsp)
  push   0x88(%rsp)
  push   0x88(%rsp)
  push   0x88(%rsp)
  mulsd  D18(%rip),%xmm1
  push   0x68(%rsp)
  push   %r13
  push   %r15
  mov    0xe0(%rsp),%eax
  push   %rax
  mov    0x80(%rsp),%eax
  push   %rax
  push   0xb0(%rsp)
  mov    0xb4(%rsp),%r9d
  mov    0xb0(%rsp),%r8d
  mov    0xa8(%rsp),%rcx
  mov    0x94(%rsp),%edi
  call   <findNURBSbasisFunIso4xCP@plt>
  mov    %rbx,%rax
  add    $0x1,%rbx
  movsd  0x120(%rsp),%xmm0
  movsd  %xmm0,-0x18(%r14)
  movsd  0x128(%rsp),%xmm0
  add    $0x70,%rsp
  mov    0x8(%rsp),%r10
  mov    0x10(%rsp),%r11
  movsd  %xmm0,-0x10(%r14)
  cmp    %rax,0x30(%rsp)
  jne    L32
  mov    %r13,%rax
  mov    0x20(%rsp),%ecx
  mov    %r10,%r13
  mov    %rax,%r10
  mov    0x8c(%rsp),%eax
  lea    -0x1(%rax,%rcx,1),%eax
  mov    %eax,0x8c(%rsp)
L36:
  mov    0x18(%rsp),%rcx
  mov    0x20(%rsp),%edx
  add    %edx,0x94(%rsp)
  add    %edx,0x90(%rsp)
  lea    0x1(%rcx),%rax
  cmp    %rcx,0x98(%rsp)
  je     L6
  mov    %rax,0x18(%rsp)
  jmp    L2
L6:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L10
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L10:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D34
type_guessed: f64
name: extract_symbolic_data
arguments: data_label: D18
type_guessed: f64

tool: D34: 0.25

tool: D18: 0.1

assistant: ```c
void NURBSsurfaceBasisX4Max(int degU, int degV, double *cp, int ncp, int kcp, double *knotU, double *knotV, double *us, double *usX1max, double *basisVals, double *leftU, double *rightU, double *NU, double *leftV, double *rightV, double *NV) {
  int ii, jj, nus, orderU, orderV;
  double uv[2], stepU, stepV;
  orderU = degU + 1;
  orderV = degV + 1;
  nus = 0;
  for (ii = 0; ii <= (kcp - 2); ii++) {
    for (jj = 0; jj <= (ncp - 2); jj++) {
      uv[0] = 0.25 * (usX1max[2 * (ii * ncp + jj)] + usX1max[2 * (ii * ncp + jj + 1)] + usX1max[2 * ((ii + 1) * ncp + jj)] + usX1max[2 * ((ii + 1) * ncp + jj + 1)]);
      uv[1] = 0.25 * (usX1max[2 * (ii * ncp + jj) + 1] + usX1max[2 * (ii * ncp + jj + 1) + 1] + usX1max[2 * ((ii + 1) * ncp + jj) + 1] + usX1max[2 * ((ii + 1) * ncp + jj + 1) + 1]);
      stepU = 0.1 * (knotU[jj + 1 + orderU] - knotU[jj]);
      stepV = 0.1 * (knotV[ii + 1 + orderV] - knotV[ii]);
      findNURBSbasisFunIso4xCP(ii, jj, 6, uv, stepU, stepV, degU, degV, cp, ncp, kcp, knotU, knotV, usX1max, basisVals, leftU, rightU, NU, leftV, rightV, NV);
      us[2 * nus] = uv[0];
      us[2 * nus + 1] = uv[1];
      nus++;
    }
  }
}
```