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

```asm
<lin_hgN>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %ecx,-0x6c(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  D5(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  D5(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x50(%rbp)
  jmp    L75
L45:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x78(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x78(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  mov    -0x78(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x78(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x80(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm1
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x80(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L24
L23:
  mov    -0x4c(%rbp),%eax
  cltq
  movsd  -0x20(%rbp,%rax,8),%xmm0
  mov    -0x60(%rbp),%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
  addq   $0x18,-0x60(%rbp)
L24:
  cmpl   $0x2,-0x4c(%rbp)
  jle    L23
  subq   $0x40,-0x60(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L18
L16:
  mov    -0x60(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
  addq   $0x18,-0x60(%rbp)
L18:
  cmpl   $0x2,-0x4c(%rbp)
  jle    L16
  subq   $0x40,-0x60(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L19
L142:
  movsd  -0x40(%rbp),%xmm0
  movq   D15(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  movsd  -0x20(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x60(%rbp),%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
  addq   $0x18,-0x60(%rbp)
L19:
  cmpl   $0x2,-0x4c(%rbp)
  jle    L142
  subq   $0x10,-0x60(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L32
L43:
  mov    -0x60(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
  addq   $0x18,-0x60(%rbp)
L32:
  cmpl   $0x2,-0x4c(%rbp)
  jle    L43
  subq   $0x40,-0x60(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L109
L122:
  mov    -0x4c(%rbp),%eax
  cltq
  movsd  -0x20(%rbp,%rax,8),%xmm0
  mov    -0x60(%rbp),%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
  addq   $0x18,-0x60(%rbp)
L109:
  cmpl   $0x2,-0x4c(%rbp)
  jle    L122
  subq   $0x40,-0x60(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L112
L118:
  movsd  -0x38(%rbp),%xmm0
  movq   D15(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  movsd  -0x20(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x60(%rbp),%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4c(%rbp)
  addq   $0x18,-0x60(%rbp)
L112:
  cmpl   $0x2,-0x4c(%rbp)
  jle    L118
  subq   $0x10,-0x60(%rbp)
  addl   $0x1,-0x50(%rbp)
L75:
  mov    -0x50(%rbp),%eax
  cmp    -0x6c(%rbp),%eax
  jl     L45
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L137
  call   <__stack_chk_fail@plt>
L137:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D5
type: byte[8]
name: retrieve_data
arguments: tag: D15
type: byte[8]

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

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

assistant: ```c
void lin_hgN(const double *u, double *p, const int *inl, int len, double *A1, double *A2) {
  const double *s;
  double a[3], b[3];
  int i, j;
  a[2] = 1;
  b[2] = 1;
  for (i = 0; i < len; i++) {
    s = u + 6 * inl[i];
    a[0] = *(s)*A1[0] + A1[1];
    a[1] = *(s + 1) * A1[0] + A1[2];
    b[0] = *(s + 3) * A2[0] + A2[1];
    b[1] = *(s + 4) * A2[0] + A2[2];
    for (j = 0; j < 3; j++, p += 3)
      *p = b[j];
    p -= 8;
    for (j = 0; j < 3; j++, p += 3)
      *p = 0;
    p -= 8;
    for (j = 0; j < 3; j++, p += 3)
      *p = -a[0] * b[j];
    p -= 2;
    for (j = 0; j < 3; j++, p += 3)
      *p = 0;
    p -= 8;
    for (j = 0; j < 3; j++, p += 3)
      *p = b[j];
    p -= 8;
    for (j = 0; j < 3; j++, p += 3)
      *p = -a[1] * b[j];
    p -= 2;
  }
}
```