user: 请从给定的汇编指令推导出C源代码:

```asm
<bspline_quad>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1f8,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %esi,0x24(%rsp)
  mov    %edx,0x28(%rsp)
  mov    %ecx,0x2c(%rsp)
  mov    0x230(%rsp),%r14d
  mov    %fs:0x28,%rax
  mov    %rax,0x1e8(%rsp)
  xor    %eax,%eax
  mov    D309(%rip),%rax
  mov    %rax,0x30(%rsp)
  mov    D265(%rip),%rax
  mov    %rax,0x38(%rsp)
  mov    D382(%rip),%rax
  mov    %rax,0x40(%rsp)
  mov    D8(%rip),%rax
  mov    %rax,0x48(%rsp)
  mov    D245(%rip),%rax
  mov    %rax,0x50(%rsp)
  mov    D243(%rip),%rax
  mov    %rax,0x58(%rsp)
  mov    D165(%rip),%rax
  mov    %rax,0x60(%rsp)
  mov    D136(%rip),%rax
  mov    %rax,0x68(%rsp)
  mov    D223(%rip),%rax
  mov    %rax,0x70(%rsp)
  mov    D102(%rip),%rax
  mov    %rax,0x78(%rsp)
  mov    D54(%rip),%rax
  mov    %rax,0x80(%rsp)
  mov    D53(%rip),%rax
  mov    %rax,0x88(%rsp)
  mov    D111(%rip),%rax
  mov    %rax,0x90(%rsp)
  mov    D72(%rip),%rax
  mov    %rax,0x98(%rsp)
  mov    D138(%rip),%rax
  mov    %rax,0xa0(%rsp)
  mov    D200(%rip),%rax
  mov    %rax,0xa8(%rsp)
  mov    D297(%rip),%rax
  mov    %rax,0xb0(%rsp)
  mov    D183(%rip),%rax
  mov    %rax,0xb8(%rsp)
  mov    D173(%rip),%rax
  mov    %rax,0xc0(%rsp)
  mov    D188(%rip),%rax
  mov    %rax,0xc8(%rsp)
  mov    D289(%rip),%rax
  mov    %rax,0xd0(%rsp)
  mov    D166(%rip),%rax
  mov    %rax,0xd8(%rsp)
  mov    D52(%rip),%rax
  mov    %rax,0xe0(%rsp)
  mov    D206(%rip),%rax
  mov    %rax,0xe8(%rsp)
  mov    D268(%rip),%rax
  mov    %rax,0xf0(%rsp)
  mov    D117(%rip),%rax
  mov    %rax,0xf8(%rsp)
  mov    D205(%rip),%rax
  mov    %rax,0x100(%rsp)
  mov    D283(%rip),%rax
  mov    %rax,0x108(%rsp)
  mov    D20(%rip),%rax
  mov    %rax,0x110(%rsp)
  mov    D320(%rip),%rax
  mov    %rax,0x118(%rsp)
  mov    D199(%rip),%rax
  mov    %rax,0x120(%rsp)
  mov    D150(%rip),%rax
  mov    %rax,0x128(%rsp)
  mov    D236(%rip),%rax
  mov    %rax,0x130(%rsp)
  mov    D321(%rip),%rax
  mov    %rax,0x138(%rsp)
  mov    D330(%rip),%rax
  mov    %rax,0x140(%rsp)
  mov    D291(%rip),%rax
  mov    %rax,0x148(%rsp)
  mov    %ecx,%eax
  mov    %edx,%ecx
  sub    %edx,%eax
  sub    $0x1,%eax
  mov    $0x0,%edx
  cmovs  %edx,%eax
  lea    0x4(%rax,%rcx,2),%edx
  lea    -0x1(%rsi),%ecx
  cmp    %esi,%edx
  cmovge %ecx,%edx
  cmp    %edx,%eax
  jge    L47
  mov    %r8d,%r12d
  mov    %r9d,%r13d
  movslq %eax,%rcx
  lea    (%rdi,%rcx,8),%rbp
  sub    %eax,%edx
  lea    -0x1(%rdx),%eax
  add    %rcx,%rax
  lea    0x8(%rdi,%rax,8),%r15
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x10(%rsp)
  lea    0xc0(%rsp),%rbx
L10:
  movsd  0x0(%rbp),%xmm1
  movsd  0x8(%rbp),%xmm0
  mov    $0x0,%eax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rsp)
L20:
  movsd  D109(%rip),%xmm0
  addsd  0x30(%rsp,%rax,1),%xmm0
  mulsd  0x8(%rsp),%xmm0
  mulsd  D210(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x150(%rsp,%rax,1)
  add    $0x8,%rax
  cmp    $0x90,%rax
  jne    L20
  lea    0x150(%rsp),%rdi
  sub    $0x8,%rsp
  push   %r14
  push   %r13
  push   %r12
  mov    0x4c(%rsp),%r9d
  mov    0x48(%rsp),%r8d
  mov    0x44(%rsp),%ecx
  mov    0x38(%rsp),%rdx
  mov    $0x12,%esi
  call   <bspline_prod@plt>
  mov    %rax,%rdi
  add    $0x20,%rsp
  mov    $0x0,%edx
  pxor   %xmm4,%xmm4
  movsd  %xmm4,(%rsp)
L59:
  movsd  (%rdi,%rdx,1),%xmm0
  mulsd  (%rdx,%rbx,1),%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x8,%rdx
  cmp    $0x90,%rdx
  jne    L59
  call   <free@plt>
  movsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  mulsd  D210(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  add    $0x8,%rbp
  cmp    %r15,%rbp
  jne    L10
L22:
  mov    0x1e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  movsd  0x10(%rsp),%xmm0
  add    $0x1f8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L47:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x10(%rsp)
  jmp    L22
L41:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D309
type_infered: byte[8]
name: parse_data
arguments: data_tag: D265
type_infered: byte[8]
name: parse_data
arguments: data_tag: D382
type_infered: byte[8]
name: parse_data
arguments: data_tag: D8
type_infered: byte[8]
name: parse_data
arguments: data_tag: D245
type_infered: byte[8]
name: parse_data
arguments: data_tag: D243
type_infered: byte[8]
name: parse_data
arguments: data_tag: D165
type_infered: byte[8]
name: parse_data
arguments: data_tag: D136
type_infered: byte[8]
name: parse_data
arguments: data_tag: D223
type_infered: byte[8]
name: parse_data
arguments: data_tag: D102
type_infered: f64
name: parse_data
arguments: data_tag: D54
type_infered: f64
name: parse_data
arguments: data_tag: D53
type_infered: f64
name: parse_data
arguments: data_tag: D111
type_infered: f64
name: parse_data
arguments: data_tag: D72
type_infered: f64
name: parse_data
arguments: data_tag: D138
type_infered: f64
name: parse_data
arguments: data_tag: D200
type_infered: f64
name: parse_data
arguments: data_tag: D297
type_infered: f64
name: parse_data
arguments: data_tag: D183
type_infered: f64
name: parse_data
arguments: data_tag: D173
type_infered: f64
name: parse_data
arguments: data_tag: D188
type_infered: f64
name: parse_data
arguments: data_tag: D289
type_infered: f64
name: parse_data
arguments: data_tag: D166
type_infered: f64
name: parse_data
arguments: data_tag: D52
type_infered: f64
name: parse_data
arguments: data_tag: D206
type_infered: f64
name: parse_data
arguments: data_tag: D268
type_infered: f64
name: parse_data
arguments: data_tag: D117
type_infered: f64
name: parse_data
arguments: data_tag: D205
type_infered: f64
name: parse_data
arguments: data_tag: D283
type_infered: f64
name: parse_data
arguments: data_tag: D20
type_infered: f64
name: parse_data
arguments: data_tag: D320
type_infered: f64
name: parse_data
arguments: data_tag: D199
type_infered: f64
name: parse_data
arguments: data_tag: D150
type_infered: f64
name: parse_data
arguments: data_tag: D236
type_infered: f64
name: parse_data
arguments: data_tag: D321
type_infered: f64
name: parse_data
arguments: data_tag: D330
type_infered: f64
name: parse_data
arguments: data_tag: D291
type_infered: f64
name: parse_data
arguments: data_tag: D109
type_infered: f32[2]
name: parse_data
arguments: data_tag: D210
type_infered: f32[2]

tool: {"D309": [0x67,0x0f,0x47,0xe0,0xe6,0xba,0xef,0xbf]}

tool: {"D265": [0x13,0x91,0x84,0x1b,0x1c,0x96,0xee,0xbf]}

tool: {"D382": [0x36,0xf3,0x3d,0x0c,0x33,0x90,0xec,0xbf]}

tool: {"D8": [0xb5,0x70,0x4d,0x76,0xf3,0xb7,0xe9,0xbf]}

tool: {"D245": [0x6f,0x5b,0xa0,0xdd,0x4c,0x22,0xe6,0xbf]}

tool: {"D243": [0x7d,0xf4,0x96,0x84,0xa4,0xe9,0xe1,0xbf]}

tool: {"D165": [0xdb,0xaa,0x24,0x8b,0x21,0x5a,0xda,0xbf]}

tool: {"D136": [0xe8,0x1a,0x6a,0x67,0xe7,0x1e,0xd0,0xbf]}

tool: {"D223": [0x09,0x40,0x88,0xb4,0xd0,0xb3,0xb5,0xbf]}

tool: D102: 0.0847750130417353

tool: D54: 0.25188622569150554

tool: D53: 0.41175116146284246

tool: D111: 0.5597708310739474

tool: D72: 0.6916870430603519

tool: D138: 0.8037049589725231

tool: D200: 0.8926024664975564

tool: D297: 0.9558239495713962

tool: D183: 0.9915651684209319

tool: D173: 0.021616013526480963

tool: D188: 0.049714548894972385

tool: D289: 0.0764257302548893

tool: D166: 0.10094204410628659

tool: D52: 0.12255520671147889

tool: D206: 0.14064291467065104

tool: D268: 0.15468467512626605

tool: D117: 0.16427648374583206

tool: D205: 0.16914238296314324

tool: D283: 0.169142382963143

tool: D20: 0.16427648374583295

tool: D320: 0.1546846751262658

tool: D199: 0.14064291467065093

tool: D150: 0.12255520671147752

tool: D236: 0.10094204410628753

tool: D321: 0.07642573025488848

tool: D330: 0.049714548894967854

tool: D291: 0.021616013526484387

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

tool: {"D210": [0.0,1.75]}

assistant: ```c
double bspline_quad(double *knots, int nknots, int m, int l, int r, int dl, int dr) {
  double *y;
  double qx[18] = {-0.9915651684209309, -0.95582394957139838, -0.89260246649755604, -0.80370495897252303, -0.69168704306035333, -0.55977083107394743, -0.41175116146284346, -0.25188622569150576, -0.084775013041735417, 0.084775013041735306, 0.25188622569150554, 0.41175116146284246, 0.55977083107394743, 0.69168704306035189, 0.80370495897252314, 0.89260246649755637, 0.95582394957139616, 0.9915651684209319};
  double qw[18] = {0.021616013526480963, 0.049714548894972385, 0.076425730254889301, 0.10094204410628659, 0.12255520671147889, 0.14064291467065104, 0.15468467512626605, 0.16427648374583206, 0.16914238296314324, 0.16914238296314299, 0.16427648374583295, 0.1546846751262658, 0.14064291467065093, 0.12255520671147752, 0.10094204410628753, 0.076425730254888483, 0.049714548894967854, 0.021616013526484387};
  double x[18];
  int nq = 18;
  int k, kk;
  int lower, upper;
  double result, a, b, partial;
  result = 0;
  lower = l - m - 1;
  if (lower < 0) {
    lower = 0;
  }
  upper = lower + 2 * m + 4;
  if (upper > nknots - 1) {
    upper = nknots - 1;
  }
  for (k = lower; k < upper; k++) {
    partial = 0.;
    a = knots[k];
    b = knots[k + 1];
    for (kk = 0; kk < nq; kk++) {
      x[kk] = (b - a) * (qx[kk] + 1) / 2. + a;
    }
    y = bspline_prod(x, nq, knots, nknots, m, l, r, dl, dr);
    for (kk = 0; kk < nq; kk++) {
      partial += y[kk] * qw[kk];
    }
    free(y);
    result += (b - a) * partial / 2.;
  }
  return (result);
}
```