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

```asm
<get_equations>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  mov    %r8,%r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L76
L40:
  test   %r12,%r12
  je     L30
L25:
  test   %ebx,%ebx
  jle    L26
  test   %r15,%r15
  je     L111
L9:
  test   %r14,%r14
  je     L10
L31:
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <vgg_conditioner_from_points@plt>
  test   %ebx,%ebx
  jle    L52
  lea    -0x1(%rbx),%eax
  lea    0x40(%rsp),%r13
  shl    $0x4,%rax
  add    %rbp,%rax
  mov    %rax,0x10(%rsp)
  lea    0x20(%rsp),%rax
  mov    %rax,0x18(%rsp)
  nopl   (%rax)
L56:
  movsd  (%r15),%xmm6
  movsd  0x0(%rbp),%xmm0
  mov    %r13,%rsi
  mov    %rbp,%rbx
  movsd  0x8(%r15),%xmm3
  movsd  0x8(%rbp),%xmm7
  add    $0x10,%r12
  add    $0x10,%rbp
  movapd %xmm6,%xmm1
  movsd  0x18(%r15),%xmm5
  movsd  -0x8(%r12),%xmm8
  add    $0xc0,%r14
  mulsd  %xmm0,%xmm1
  movapd %xmm3,%xmm2
  mov    0x18(%rsp),%rdi
  mulsd  %xmm7,%xmm2
  mulsd  %xmm5,%xmm0
  mulsd  %xmm8,%xmm5
  mulsd  %xmm8,%xmm6
  addsd  %xmm2,%xmm1
  movsd  0x20(%r15),%xmm2
  addsd  0x10(%r15),%xmm1
  mulsd  %xmm2,%xmm7
  movsd  %xmm1,0x8(%rsp)
  addsd  %xmm7,%xmm0
  movsd  -0x10(%r12),%xmm7
  addsd  0x28(%r15),%xmm0
  mulsd  %xmm7,%xmm2
  mulsd  %xmm7,%xmm3
  movsd  %xmm0,(%rsp)
  subsd  %xmm5,%xmm2
  subsd  %xmm6,%xmm3
  movapd %xmm2,%xmm5
  xorpd  D30(%rip),%xmm5
  mulsd  %xmm1,%xmm2
  unpcklpd %xmm3,%xmm5
  mulsd  %xmm0,%xmm3
  movaps %xmm5,0x20(%rsp)
  subsd  %xmm3,%xmm2
  movsd  %xmm2,0x30(%rsp)
  call   <antisym@plt>
  movsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  movsd  0x40(%rsp),%xmm12
  movsd  0x58(%rsp),%xmm11
  movapd %xmm0,%xmm13
  movapd %xmm1,%xmm14
  movapd %xmm1,%xmm2
  movapd D58(%rip),%xmm4
  mulsd  %xmm12,%xmm13
  movsd  0x70(%rsp),%xmm10
  movsd  0x48(%rsp),%xmm9
  mulsd  %xmm11,%xmm14
  movsd  0x60(%rsp),%xmm8
  movsd  0x78(%rsp),%xmm7
  mulsd  %xmm12,%xmm2
  movsd  0x50(%rsp),%xmm6
  movsd  0x68(%rsp),%xmm5
  movsd  0x80(%rsp),%xmm3
  mov    D4(%rip),%rax
  mov    %rax,-0x8(%r14)
  addsd  %xmm14,%xmm13
  unpcklpd %xmm13,%xmm2
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0xc0(%r14)
  movapd %xmm1,%xmm2
  mulsd  %xmm10,%xmm2
  addsd  %xmm12,%xmm2
  movapd %xmm0,%xmm12
  mulsd  %xmm11,%xmm12
  unpcklpd %xmm12,%xmm2
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0xb0(%r14)
  movapd %xmm0,%xmm2
  mulsd  %xmm10,%xmm2
  addsd  %xmm11,%xmm2
  movapd %xmm1,%xmm11
  mulsd  %xmm8,%xmm11
  unpcklpd %xmm10,%xmm2
  movapd %xmm0,%xmm10
  mulsd  %xmm9,%xmm10
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0xa0(%r14)
  movapd %xmm1,%xmm2
  mulsd  %xmm9,%xmm2
  addsd  %xmm11,%xmm10
  unpcklpd %xmm10,%xmm2
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0x90(%r14)
  movapd %xmm1,%xmm2
  mulsd  %xmm7,%xmm2
  addsd  %xmm9,%xmm2
  movapd %xmm0,%xmm9
  mulsd  %xmm8,%xmm9
  unpcklpd %xmm9,%xmm2
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0x80(%r14)
  movapd %xmm0,%xmm2
  mulsd  %xmm7,%xmm2
  addsd  %xmm8,%xmm2
  movapd %xmm1,%xmm8
  mulsd  %xmm5,%xmm8
  unpcklpd %xmm7,%xmm2
  movapd %xmm0,%xmm7
  mulsd  %xmm6,%xmm7
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0x70(%r14)
  movapd %xmm1,%xmm2
  mulsd  %xmm6,%xmm2
  addsd  %xmm8,%xmm7
  unpcklpd %xmm7,%xmm2
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0x60(%r14)
  movapd %xmm1,%xmm2
  mulsd  %xmm3,%xmm2
  addsd  %xmm6,%xmm2
  movapd %xmm0,%xmm6
  mulsd  %xmm5,%xmm6
  unpcklpd %xmm6,%xmm2
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0x50(%r14)
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  addsd  %xmm5,%xmm2
  unpcklpd %xmm3,%xmm2
  xorpd  %xmm4,%xmm2
  movups %xmm2,-0x40(%r14)
  movapd %xmm1,%xmm2
  addsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm1
  movapd %xmm2,%xmm3
  mulsd  %xmm0,%xmm3
  unpcklpd %xmm3,%xmm1
  movups %xmm1,-0x30(%r14)
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x10(%r14)
  unpcklpd %xmm1,%xmm2
  movups %xmm2,-0x20(%r14)
  cmp    %rbx,0x10(%rsp)
  jne    L56
L52:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L103
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L26:
  lea    D72(%rip),%rdi
  call   <error@plt>
  test   %r15,%r15
  jne    L9
L111:
  lea    D67(%rip),%rdi
  call   <error@plt>
  test   %r14,%r14
  jne    L31
L10:
  lea    D31(%rip),%rdi
  call   <error@plt>
  jmp    L31
L30:
  lea    D79(%rip),%rdi
  call   <error@plt>
  jmp    L25
L76:
  lea    D53(%rip),%rdi
  call   <error@plt>
  jmp    L40
L103:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D30
datatype: byte[16]
name: parse_data
arguments: tag: D58
datatype: byte[16]
name: parse_data
arguments: tag: D4
datatype: byte[8]
name: parse_data
arguments: tag: D72
datatype: string
name: parse_data
arguments: tag: D67
datatype: string
name: parse_data
arguments: tag: D31
datatype: string
name: parse_data
arguments: tag: D79
datatype: string
name: parse_data
arguments: tag: D53
datatype: string

tool: {"D30": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D58": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: {"D4": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D72: get_equations: invalid points size.

tool: D67: get_equations: invalid normalization matrix.

tool: D31: get_equations: invalid memory buffer.

tool: D79: get_equations: invalid input grad

tool: D53: get_equations: invalid points list.

assistant: ```c
void get_equations(double *pts, double *grad, int pts_size, double *vgg, double *buff) {
  int i, j;
  double K[27];
  double asym[9];
  int idx;
  double crosspr[3];
  double pnormx, pnormy, dirnormx, dirnormy;
  if (pts == NULL)
    error("get_equations: invalid points list.");
  if (grad == NULL)
    error("get_equations: invalid input grad");
  if (pts_size <= 0)
    error("get_equations: invalid points size.");
  if (vgg == NULL)
    error("get_equations: invalid normalization matrix.");
  if (buff == NULL)
    error("get_equations: invalid memory buffer.");
  vgg_conditioner_from_points(vgg, pts, pts_size);
  for (i = 0; i < pts_size; i++) {
    idx = i * 4 * 6;
    pnormx = vgg[0] * pts[2 * i] + vgg[1] * pts[2 * i + 1] + vgg[2];
    pnormy = vgg[3] * pts[2 * i] + vgg[4] * pts[2 * i + 1] + vgg[5];
    dirnormx = -vgg[0] * grad[2 * i + 1] + vgg[1] * grad[2 * i];
    dirnormy = -vgg[3] * grad[2 * i + 1] + vgg[4] * grad[2 * i];
    crosspr[0] = -dirnormy;
    crosspr[1] = dirnormx;
    crosspr[2] = pnormx * dirnormy - pnormy * dirnormx;
    antisym(crosspr, asym);
    for (j = 0; j < 9; j++)
      K[j] = asym[j] * pnormx;
    for (j = 0; j < 9; j++)
      K[j + 9] = asym[j] * pnormy;
    for (j = 0; j < 9; j++)
      K[j + 18] = asym[j];
    buff[idx] = -K[0];
    buff[idx + 1] = -(K[3] + K[9]);
    buff[idx + 2] = -(K[6] + K[18]);
    buff[idx + 3] = -K[12];
    buff[idx + 4] = -(K[15] + K[21]);
    buff[idx + 5] = -K[24];
    buff[idx + 6] = -K[1];
    buff[idx + 6 + 1] = -(K[4] + K[10]);
    buff[idx + 6 + 2] = -(K[7] + K[19]);
    buff[idx + 6 + 3] = -K[13];
    buff[idx + 6 + 4] = -(K[16] + K[22]);
    buff[idx + 6 + 5] = -K[25];
    buff[idx + 12] = -K[2];
    buff[idx + 12 + 1] = -(K[5] + K[11]);
    buff[idx + 12 + 2] = -(K[8] + K[20]);
    buff[idx + 12 + 3] = -K[14];
    buff[idx + 12 + 4] = -(K[17] + K[23]);
    buff[idx + 12 + 5] = -K[26];
    buff[idx + 18] = pnormx * pnormx;
    buff[idx + 19] = 2 * pnormx * pnormy;
    buff[idx + 20] = 2 * pnormx;
    buff[idx + 21] = pnormy * pnormy;
    buff[idx + 22] = 2 * pnormy;
    buff[idx + 23] = 1;
  }
}
```