user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<maiseg>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm6
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x3b8,%rsp
  mov    %rdi,0x28(%rsp)
  mov    %rsi,0x30(%rsp)
  movsd  %xmm0,(%rsp)
  pxor   %xmm0,%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x3a8(%rsp)
  xor    %eax,%eax
  comisd %xmm6,%xmm0
  ja     L208
  movsd  D1(%rip),%xmm7
  comisd %xmm7,%xmm6
  movsd  %xmm7,0x10(%rsp)
  jbe    L121
L113:
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  call   <mexErrMsgTxt@plt>
L121:
  movsd  (%rsp),%xmm6
  comisd D26(%rip),%xmm6
  jbe    L201
  movsd  0x10(%rsp),%xmm4
  movl   $0x1,0x3c(%rsp)
  subsd  %xmm6,%xmm4
  movsd  %xmm4,(%rsp)
L176:
  pxor   %xmm0,%xmm0
  lea    0x40(%rsp),%r12
  mov    $0x1,%r13d
  movaps %xmm0,0x40(%rsp)
  mov    %r12,%rbp
  movaps %xmm0,0x50(%rsp)
  movaps %xmm0,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
  movaps %xmm0,0x80(%rsp)
  movaps %xmm0,0x90(%rsp)
  movaps %xmm0,0xa0(%rsp)
  movaps %xmm0,0xb0(%rsp)
  movaps %xmm0,0xc0(%rsp)
  movaps %xmm0,0xd0(%rsp)
  movaps %xmm0,0xe0(%rsp)
  movaps %xmm0,0xf0(%rsp)
  movaps %xmm0,0x100(%rsp)
  movaps %xmm0,0x110(%rsp)
  movaps %xmm0,0x120(%rsp)
  movaps %xmm0,0x130(%rsp)
  movaps %xmm0,0x140(%rsp)
  movaps %xmm0,0x150(%rsp)
  movaps %xmm0,0x280(%rsp)
  movaps %xmm0,0x290(%rsp)
  movaps %xmm0,0x2a0(%rsp)
  movaps %xmm0,0x2b0(%rsp)
  movaps %xmm0,0x2c0(%rsp)
  movaps %xmm0,0x2d0(%rsp)
  movaps %xmm0,0x2e0(%rsp)
  movaps %xmm0,0x2f0(%rsp)
  movaps %xmm0,0x300(%rsp)
  movaps %xmm0,0x310(%rsp)
  movaps %xmm0,0x320(%rsp)
  movaps %xmm0,0x330(%rsp)
  movaps %xmm0,0x340(%rsp)
  movaps %xmm0,0x350(%rsp)
  movaps %xmm0,0x360(%rsp)
  mov    %r12,0x20(%rsp)
  movaps %xmm0,0x370(%rsp)
  movaps %xmm0,0x380(%rsp)
  movaps %xmm0,0x390(%rsp)
  movaps %xmm0,0x160(%rsp)
  movaps %xmm0,0x170(%rsp)
  movaps %xmm0,0x180(%rsp)
  movaps %xmm0,0x190(%rsp)
  movaps %xmm0,0x1a0(%rsp)
  movaps %xmm0,0x1b0(%rsp)
  movaps %xmm0,0x1c0(%rsp)
  movaps %xmm0,0x1d0(%rsp)
  movaps %xmm0,0x1e0(%rsp)
  movaps %xmm0,0x1f0(%rsp)
  movaps %xmm0,0x200(%rsp)
  movaps %xmm0,0x210(%rsp)
  movaps %xmm0,0x220(%rsp)
  movaps %xmm0,0x230(%rsp)
  movaps %xmm0,0x240(%rsp)
  movaps %xmm0,0x250(%rsp)
  movaps %xmm0,0x260(%rsp)
  movaps %xmm0,0x270(%rsp)
L126:
  pxor   %xmm7,%xmm7
  mov    %r12,%r15
  mov    $0xfffffffe,%r14d
  cvtsi2sd %r13d,%xmm7
  movsd  %xmm7,0x8(%rsp)
L196:
  mov    %r14d,%edi
  mov    %r13d,%esi
  xor    %eax,%eax
  add    $0x30,%r15
  call   <aipow@plt>
  lea    -0x1(%r14),%edi
  mov    %r13d,%esi
  add    $0x1,%r14d
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <aipow@plt>
  pxor   %xmm0,%xmm0
  sub    %eax,%ebx
  cvtsi2sd %ebx,%xmm0
  divsd  0x8(%rsp),%xmm0
  movsd  %xmm0,-0x30(%r15)
  cmp    $0x1,%r14d
  jne    L196
  add    $0x1,%r13d
  add    $0x8,%r12
  cmp    $0x4,%r13d
  jne    L126
  mov    0x20(%rsp),%r12
  mov    $0x1,%r13d
L116:
  mov    %r13d,%esi
  mov    $0x2,%edi
  xor    %eax,%eax
  add    $0x8,%r12
  call   <aipow@plt>
  mov    %r13d,%esi
  mov    $0x1,%edi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <aipow@plt>
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  mov    %r13d,%esi
  sub    %eax,%ebx
  cvtsi2sd %r13d,%xmm1
  mov    $0x3,%edi
  xor    %eax,%eax
  cvtsi2sd %ebx,%xmm0
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0xd0(%r12)
  call   <aipow@plt>
  mov    %r13d,%esi
  mov    $0x2,%edi
  add    $0x1,%r13d
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <aipow@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm1
  sub    %eax,%ebx
  cvtsi2sd %ebx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x100(%r12)
  cmp    $0x4,%r13d
  jne    L116
  mov    $0x1,%ebx
L23:
  pxor   %xmm1,%xmm1
  movsd  (%rsp),%xmm0
  add    $0x8,%rbp
  cvtsi2sd %ebx,%xmm1
  add    $0x1,%ebx
  movsd  %xmm1,0x8(%rsp)
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x88(%rbp)
  movsd  (%rsp),%xmm0
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm2
  movsd  0x10(%rsp),%xmm0
  subsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0xa0(%rbp)
  cmp    $0x4,%ebx
  jne    L23
  mov    0x20(%rsp),%rdi
  mov    $0x6,%esi
  xor    %eax,%eax
  mov    $0x1,%r13d
  call   <matinv@plt>
L78:
  pxor   %xmm7,%xmm7
  lea    -0x1(%r13),%ebp
  mov    $0x2,%r12d
  mov    $0xffffffff,%r14d
  cvtsi2sd %r13d,%xmm7
  movslq %ebp,%rbp
  movsd  %xmm7,0x8(%rsp)
L177:
  mov    %r14d,%edi
  mov    %r13d,%esi
  xor    %eax,%eax
  call   <aipow@plt>
  lea    -0x1(%r14),%edi
  mov    %r13d,%esi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <aipow@plt>
  mov    %r13d,%esi
  mov    $0x2,%edi
  mov    %eax,%r15d
  xor    %eax,%eax
  call   <aipow@plt>
  sub    %r15d,%ebx
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm1
  mulsd  0x8(%rsp),%xmm1
  lea    0x1(%r14),%edx
  add    %ebx,%ebx
  cvtsi2sd %ebx,%xmm0
  movslq %edx,%rdx
  xor    %r14d,%r14d
  lea    (%rdx,%rdx,2),%rdx
  lea    0x0(%rbp,%rdx,2),%rdx
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x280(%rsp,%rdx,8)
  cmp    $0x1,%r12d
  jne    L185
  add    $0x1,%r13d
  cmp    $0x4,%r13d
  jne    L78
  lea    0x280(%rsp),%rax
  lea    0x298(%rsp),%r12
  mov    $0x1,%ebp
  mov    %rax,0x18(%rsp)
L102:
  pxor   %xmm7,%xmm7
  mov    %r12,%r14
  mov    $0x2,%r13d
  cvtsi2sd %ebp,%xmm7
  movsd  %xmm7,0x8(%rsp)
L22:
  mov    %r13d,%edi
  mov    %ebp,%esi
  xor    %eax,%eax
  add    $0x30,%r14
  call   <aipow@plt>
  lea    -0x1(%r13),%edi
  mov    %ebp,%esi
  add    $0x1,%r13d
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <aipow@plt>
  mov    %ebp,%esi
  mov    $0x2,%edi
  mov    %eax,%r15d
  xor    %eax,%eax
  call   <aipow@plt>
  sub    %r15d,%ebx
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm1
  mulsd  0x8(%rsp),%xmm1
  add    %ebx,%ebx
  cvtsi2sd %ebx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x60(%r14)
  cmp    $0x5,%r13d
  jne    L22
  mov    0x18(%rsp),%rbx
  mov    $0x1,%r13d
L37:
  pxor   %xmm1,%xmm1
  movsd  (%rsp),%xmm0
  add    $0x8,%rbx
  cvtsi2sd %r13d,%xmm1
  add    $0x1,%r13d
  movsd  %xmm1,0x8(%rsp)
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm1
  mov    D26(%rip),%rax
  addsd  %xmm0,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x58(%rbx)
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  %xmm0,0x10(%rsp)
  movsd  (%rsp),%xmm0
  call   <pow@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  subsd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  addsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x70(%rbx)
  cmp    $0x4,%r13d
  jne    L37
  add    $0x1,%ebp
  add    $0x8,%r12
  cmp    $0x4,%ebp
  jne    L102
  mov    0x20(%rsp),%rcx
  mov    0x18(%rsp),%rdi
  mov    $0x6,%edx
  xor    %eax,%eax
  lea    0x160(%rsp),%r9
  mov    $0x6,%r8d
  mov    $0x6,%esi
  call   <matmpy@plt>
  mov    0x3c(%rsp),%eax
  mov    0x28(%rsp),%rcx
  test   %eax,%eax
  jne    L60
  mov    0x30(%rsp),%rdx
  lea    0x2f(%rcx),%rax
  sub    %rdx,%rax
  cmp    $0x5e,%rax
  jbe    L39
  movdqa 0x1c0(%rsp),%xmm5
  mov    %rcx,%rax
  movdqa 0x1e0(%rsp),%xmm4
  movdqa 0x1f0(%rsp),%xmm3
  movups %xmm5,(%rcx)
  movdqa 0x1d0(%rsp),%xmm5
  movups %xmm4,0x20(%rcx)
  movdqa 0x210(%rsp),%xmm4
  movups %xmm5,0x10(%rcx)
  movdqa 0x200(%rsp),%xmm5
  movups %xmm3,(%rdx)
  movups %xmm5,0x10(%rdx)
  movups %xmm4,0x20(%rdx)
L146:
  movq   $0x0,0x30(%rax)
  mov    0x30(%rsp),%rax
  movq   $0x0,0x30(%rax)
L209:
  mov    0x3a8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L55
  add    $0x3b8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L185:
  mov    $0x1,%r12d
  jmp    L177
  nopl   0x0(%rax,%rax,1)
L201:
  movl   $0x0,0x3c(%rsp)
  jmp    L176
  nopl   (%rax)
L60:
  mov    0x30(%rsp),%rsi
  lea    0x8(%rcx),%rdx
  movq   $0x0,(%rcx)
  lea    0x10(%rsi),%rax
  movq   $0x0,(%rsi)
  cmp    %rax,%rdx
  je     L128
  movapd 0x1e0(%rsp),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,0x8(%rsi)
  movapd 0x210(%rsp),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,0x8(%rcx)
  movapd 0x1d0(%rsp),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,0x18(%rsi)
  movapd 0x200(%rsp),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,0x18(%rcx)
  movapd 0x1c0(%rsp),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,0x28(%rsi)
  movapd 0x1f0(%rsp),%xmm0
  shufpd $0x1,%xmm0,%xmm0
  movups %xmm0,0x28(%rcx)
  jmp    L209
L208:
  movsd  D1(%rip),%xmm3
  movsd  %xmm3,0x10(%rsp)
  jmp    L113
L128:
  movsd  0x1e8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsi)
  movsd  0x218(%rsp),%xmm0
  movsd  %xmm0,0x8(%rcx)
  movsd  0x1e0(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsi)
  movsd  0x210(%rsp),%xmm0
  movsd  %xmm0,0x10(%rcx)
  movsd  0x1d8(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsi)
  movsd  0x208(%rsp),%xmm0
  movsd  %xmm0,0x18(%rcx)
  movsd  0x1d0(%rsp),%xmm0
  movsd  %xmm0,0x20(%rsi)
  movsd  0x200(%rsp),%xmm0
  movsd  %xmm0,0x20(%rcx)
  movsd  0x1c8(%rsp),%xmm0
  movsd  %xmm0,0x28(%rsi)
  movsd  0x1f8(%rsp),%xmm0
  movsd  %xmm0,0x28(%rcx)
  movsd  0x1c0(%rsp),%xmm0
  movsd  %xmm0,0x30(%rsi)
  movsd  0x1f0(%rsp),%xmm0
  movsd  %xmm0,0x30(%rcx)
  jmp    L209
L39:
  movsd  0x1c0(%rsp),%xmm0
  mov    %rcx,%rax
  movsd  %xmm0,(%rcx)
  mov    0x30(%rsp),%rcx
  movsd  0x1f0(%rsp),%xmm0
  movsd  %xmm0,(%rcx)
  movsd  0x1c8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0x1f8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rcx)
  movsd  0x1d0(%rsp),%xmm0
  movsd  %xmm0,0x10(%rax)
  movsd  0x200(%rsp),%xmm0
  movsd  %xmm0,0x10(%rcx)
  movsd  0x1d8(%rsp),%xmm0
  movsd  %xmm0,0x18(%rax)
  movsd  0x208(%rsp),%xmm0
  movsd  %xmm0,0x18(%rcx)
  movsd  0x1e0(%rsp),%xmm0
  movsd  %xmm0,0x20(%rax)
  movsd  0x210(%rsp),%xmm0
  movsd  %xmm0,0x20(%rcx)
  movsd  0x1e8(%rsp),%xmm0
  movsd  %xmm0,0x28(%rax)
  movsd  0x218(%rsp),%xmm0
  movsd  %xmm0,0x28(%rcx)
  jmp    L146
L55:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D1
data_type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D11
data_type: string
name: extract_symbolic_data
arguments: data_tag: D26
data_type: f32

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

tool: D11: eta0 out of range in maiseg

tool: D26: 0

assistant: ```c
void maiseg(eta0, SegFiltLeft, SegFiltRight) double eta0, SegFiltLeft[], SegFiltRight[];
{
  int flip;
  int lp1, kp1, kpp1, kpp2, ll;
  double Mmat[2 * 2 + 2][2 * 2 + 2], Pmat[2 * 2 + 2][2 * 2 + 2], Jmat[2 * 2 + 2][2 * 2 + 2];
  if ((2 % 2) || 2 < 2) {
    mexErrMsgTxt("D must be an even integer >= 2 in maiseg");
  }
  if (eta0 < 0 || eta0 > 1) {
    mexErrMsgTxt("eta0 out of range in maiseg");
  }
  if (eta0 > .5) {
    flip = 1;
    eta0 = 1 - eta0;
  } else
    flip = 0;
  for (kp1 = 0; kp1 < 2 * 2 + 2; kp1++)
    for (lp1 = 0; lp1 < 2 * 2 + 2; lp1++)
      Mmat[kp1][lp1] = 0.;
  for (kp1 = 0; kp1 < 2 * 2 + 2; kp1++)
    for (lp1 = 0; lp1 < 2 * 2 + 2; lp1++)
      Jmat[kp1][lp1] = 0.;
  for (kp1 = 0; kp1 < 2 * 2 + 2; kp1++)
    for (lp1 = 0; lp1 < 2 * 2 + 2; lp1++)
      Pmat[kp1][lp1] = 0.;
  for (kp1 = 1; kp1 <= (2 + 1); kp1++) {
    for (lp1 = -2; lp1 <= 0; lp1++) {
      Mmat[2 + lp1][kp1 - 1] = (aipow(lp1, kp1) - aipow(lp1 - 1, kp1)) / ((double)kp1);
    }
  }
  for (kp1 = 1; kp1 <= (2 + 1); kp1++)
    for (lp1 = 2; lp1 <= (2 + 1); lp1++)
      Mmat[2 + lp1][2 + kp1] = (aipow(lp1, kp1) - aipow(lp1 - 1, kp1)) / ((double)kp1);
  for (kp1 = 1; kp1 <= (2 + 1); kp1++) {
    Mmat[2 + 1][kp1 - 1] = (pow(eta0, kp1)) / ((double)kp1);
    Mmat[2 + 1][2 + kp1] = (1 - pow(eta0, kp1)) / ((double)kp1);
  }
  matinv(&(Mmat[0][0]), 2 * 2 + 2);
  for (kpp1 = 1; kpp1 <= (2 + 1); kpp1++) {
    for (lp1 = (-2 + 1); lp1 <= 0; lp1++) {
      Jmat[2 + lp1 - 1][kpp1 - 1] = 2 * (aipow(lp1, kpp1) - aipow(lp1 - 1, kpp1)) / (aipow(2, kpp1) * (double)kpp1);
    }
  }
  for (kpp2 = 1; kpp2 <= (2 + 1); kpp2++) {
    for (lp1 = 2; lp1 <= (2 + 2); lp1++)
      Jmat[2 + lp1 - 1][2 + kpp2] = 2 * (aipow(lp1, kpp2) - aipow(lp1 - 1, kpp2)) / (aipow(2, kpp2) * (double)kpp2);
    for (kpp1 = 1; kpp1 <= (2 + 1); kpp1++) {
      Jmat[2][kpp1 - 1] = 2 * (pow(eta0, kpp1)) / ((double)kpp1);
      Jmat[2][2 + kpp1] = 2 * (pow(.5, kpp1) - pow(eta0, kpp1)) / ((double)kpp1);
    }
  }
  matmpy(&(Jmat[0][0]), 2 * 2 + 2, 2 * 2 + 2, &(Mmat[0][0]), 2 * 2 + 2, &(Pmat[0][0]));
  if (flip == 0) {
    for (ll = 0; ll < 2 * 2 + 2; ll++) {
      SegFiltLeft[ll] = Pmat[2][ll];
      SegFiltRight[ll] = Pmat[2 + 1][ll];
    }
    SegFiltLeft[2 * 2 + 2] = 0.0;
    SegFiltRight[2 * 2 + 2] = 0.0;
  } else {
    SegFiltLeft[0] = 0.0;
    SegFiltRight[0] = 0.0;
    for (ll = 0; ll < 2 * 2 + 2; ll++) {
      SegFiltRight[ll + 1] = Pmat[2][2 * 2 + 1 - ll];
      SegFiltLeft[ll + 1] = Pmat[2 + 1][2 * 2 + 1 - ll];
    }
  }
}
```