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

```asm
<get_equations>:
  endbr64
  push   %r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rcx,%rbp
  push   %rbx
  mov    %r8,%rbx
  sub    $0x188,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x178(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L52
L155:
  test   %r12,%r12
  je     L85
L72:
  test   %r14d,%r14d
  jle    L15
  test   %rbp,%rbp
  je     L68
L24:
  test   %rbx,%rbx
  je     L88
L111:
  mov    %r14d,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <vgg_conditioner_from_points@plt>
  test   %r14d,%r14d
  jle    L92
  lea    -0x1(%r14),%eax
  movq   D29(%rip),%xmm4
  mov    %r13,%rdx
  lea    0xa0(%rsp),%r15
  shl    $0x4,%rax
  lea    0xe8(%rsp),%r14
  add    %r13,%rax
  lea    0x50(%rsp),%r13
  mov    %rax,0x20(%rsp)
  lea    0x30(%rsp),%rax
  mov    %rax,0x28(%rsp)
  nopl   (%rax)
L69:
  movsd  0x0(%rbp),%xmm6
  movsd  0x8(%rbp),%xmm3
  mov    %r13,%rsi
  mov    %rdx,0x18(%rsp)
  movsd  (%rdx),%xmm0
  movsd  0x8(%rdx),%xmm7
  movapd %xmm6,%xmm1
  movapd %xmm3,%xmm2
  movsd  0x18(%rbp),%xmm5
  movsd  0x8(%r12),%xmm8
  mulsd  %xmm7,%xmm2
  mov    0x28(%rsp),%rdi
  mulsd  %xmm0,%xmm1
  mulsd  %xmm5,%xmm0
  mulsd  %xmm8,%xmm6
  mulsd  %xmm8,%xmm5
  addsd  %xmm2,%xmm1
  movsd  0x20(%rbp),%xmm2
  addsd  0x10(%rbp),%xmm1
  mulsd  %xmm2,%xmm7
  movsd  %xmm1,0x10(%rsp)
  addsd  %xmm7,%xmm0
  movsd  (%r12),%xmm7
  addsd  0x28(%rbp),%xmm0
  mulsd  %xmm7,%xmm3
  mulsd  %xmm7,%xmm2
  movsd  %xmm0,0x8(%rsp)
  subsd  %xmm6,%xmm3
  subsd  %xmm5,%xmm2
  movsd  %xmm3,0x38(%rsp)
  mulsd  %xmm0,%xmm3
  movapd %xmm2,%xmm5
  mulsd  %xmm1,%xmm2
  xorpd  %xmm4,%xmm5
  movsd  %xmm5,0x30(%rsp)
  subsd  %xmm3,%xmm2
  movsd  %xmm2,0x40(%rsp)
  call   <antisym@plt>
  mov    0x18(%rsp),%rdx
  xor    %eax,%eax
  movq   D29(%rip),%xmm4
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm0
  nopl   (%rax)
L126:
  movsd  0x0(%r13,%rax,1),%xmm2
  mulsd  %xmm1,%xmm2
  movsd  %xmm2,(%r15,%rax,1)
  add    $0x8,%rax
  cmp    $0x48,%rax
  jne    L126
  xor    %eax,%eax
  nopl   (%rax)
L48:
  movsd  0x0(%r13,%rax,1),%xmm2
  mulsd  %xmm0,%xmm2
  movsd  %xmm2,(%r14,%rax,1)
  add    $0x8,%rax
  cmp    $0x48,%rax
  jne    L48
  movdqa 0x50(%rsp),%xmm6
  movdqa 0x70(%rsp),%xmm7
  add    $0x10,%r12
  add    $0xc0,%rbx
  movsd  0xa0(%rsp),%xmm2
  mov    0x90(%rsp),%rax
  movaps %xmm6,0x130(%rsp)
  movdqa 0x60(%rsp),%xmm6
  xorpd  %xmm4,%xmm2
  mov    %rax,0x170(%rsp)
  movsd  %xmm2,-0xc0(%rbx)
  movsd  0xb8(%rsp),%xmm2
  addsd  0xe8(%rsp),%xmm2
  movaps %xmm6,0x140(%rsp)
  movdqa 0x80(%rsp),%xmm6
  movaps %xmm7,0x150(%rsp)
  xorpd  %xmm4,%xmm2
  movaps %xmm6,0x160(%rsp)
  movsd  %xmm2,-0xb8(%rbx)
  movsd  0xd0(%rsp),%xmm2
  addsd  0x130(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0xb0(%rbx)
  movsd  0x100(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0xa8(%rbx)
  movsd  0x118(%rsp),%xmm2
  addsd  0x148(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0xa0(%rbx)
  movsd  0x160(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x98(%rbx)
  movsd  0xa8(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x90(%rbx)
  movsd  0xc0(%rsp),%xmm2
  addsd  0xf0(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x88(%rbx)
  movsd  0xd8(%rsp),%xmm2
  addsd  0x138(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x80(%rbx)
  mov    D41(%rip),%rax
  movsd  0x108(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  mov    %rax,-0x8(%rbx)
  lea    0x10(%rdx),%rax
  movsd  %xmm2,-0x78(%rbx)
  movsd  0x120(%rsp),%xmm2
  addsd  0x150(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x70(%rbx)
  movsd  0x168(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x68(%rbx)
  movsd  0xb0(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x60(%rbx)
  movsd  0xc8(%rsp),%xmm2
  addsd  0xf8(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x58(%rbx)
  movsd  0xe0(%rsp),%xmm2
  addsd  0x140(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x50(%rbx)
  movsd  0x110(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x48(%rbx)
  movsd  0x128(%rsp),%xmm2
  addsd  0x158(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x40(%rbx)
  movsd  0x170(%rsp),%xmm2
  xorpd  %xmm4,%xmm2
  movsd  %xmm2,-0x38(%rbx)
  movapd %xmm1,%xmm2
  mulsd  %xmm1,%xmm2
  addsd  %xmm1,%xmm1
  movsd  %xmm1,-0x20(%rbx)
  movsd  %xmm2,-0x30(%rbx)
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm1
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbx)
  movsd  %xmm2,-0x28(%rbx)
  movsd  %xmm1,-0x18(%rbx)
  cmp    0x20(%rsp),%rdx
  je     L92
  mov    %rax,%rdx
  jmp    L69
  nopl   (%rax)
L92:
  mov    0x178(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  add    $0x188,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L15:
  lea    D75(%rip),%rdi
  call   <error@plt>
  test   %rbp,%rbp
  jne    L24
L68:
  lea    D48(%rip),%rdi
  call   <error@plt>
  test   %rbx,%rbx
  jne    L111
L88:
  lea    D69(%rip),%rdi
  call   <error@plt>
  jmp    L111
L85:
  lea    D3(%rip),%rdi
  call   <error@plt>
  jmp    L72
L52:
  lea    D79(%rip),%rdi
  call   <error@plt>
  jmp    L155
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D29
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D41
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D75
datatype: string
name: disassemble_data
arguments: data_tag: D48
datatype: string
name: disassemble_data
arguments: data_tag: D69
datatype: string
name: disassemble_data
arguments: data_tag: D3
datatype: string
name: disassemble_data
arguments: data_tag: D79
datatype: string

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

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

tool: D75: get_equations: invalid points size.

tool: D48: get_equations: invalid normalization matrix.

tool: D69: get_equations: invalid memory buffer.

tool: D3: get_equations: invalid input grad

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