user: Translate the below assembly code into C programming language:

```asm
<interpshc>:
  endbr64
  movapd %xmm0,%xmm4
  pxor   %xmm0,%xmm0
  mov    %rcx,%r9
  push   %r13
  cvtsi2sd %edi,%xmm0
  lea    0x2(%rdi),%ecx
  push   %r12
  subsd  %xmm1,%xmm4
  subsd  %xmm1,%xmm2
  push   %rbp
  imul   %edi,%ecx
  push   %rbx
  divsd  %xmm2,%xmm4
  ucomisd %xmm3,%xmm0
  jp     L12
  jne    L12
L39:
  mov    %edi,(%r9)
  test   %ecx,%ecx
  jle    L68
  lea    0x8(%rsi),%rax
  cmp    %rax,%r8
  lea    0x8(%rdx),%rax
  setne  %dil
  cmp    %rax,%r8
  setne  %al
  test   %al,%dil
  je     L238
  cmp    $0x1,%ecx
  je     L238
  mov    %ecx,%edi
  movapd %xmm4,%xmm0
  xor    %eax,%eax
  shr    %edi
  unpcklpd %xmm0,%xmm0
  shl    $0x4,%rdi
  nop
L227:
  movupd (%rsi,%rax,1),%xmm5
  movupd (%rdx,%rax,1),%xmm1
  subpd  %xmm5,%xmm1
  mulpd  %xmm0,%xmm1
  addpd  %xmm5,%xmm1
  movups %xmm1,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdi
  jne    L227
  mov    %ecx,%eax
  or     $0x1,%eax
  and    $0x1,%ecx
  je     L68
  cltq
  shl    $0x3,%rax
  movsd  -0x8(%rsi,%rax,1),%xmm1
  movsd  -0x8(%rdx,%rax,1),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r8,%rax,1)
L68:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L12:
  movsd  D5(%rip),%xmm1
  comisd %xmm3,%xmm0
  addsd  %xmm3,%xmm1
  mulsd  %xmm3,%xmm1
  cvttsd2si %xmm1,%r10d
  jbe    L32
  lea    0x1(%r10),%eax
  cmp    %ecx,%eax
  jg     L79
  movslq %r10d,%r11
  mov    %ecx,%ebp
  lea    0x0(,%r11,8),%rbx
  sub    %r10d,%ebp
  add    $0x1,%r11
  lea    (%r8,%rbx,1),%r12
  lea    0x8(%rsi,%rbx,1),%r13
  cmp    %r13,%r12
  je     L78
  lea    -0x1(%rbp),%r13d
  cmp    $0x1,%r13d
  jbe    L78
  lea    (%rsi,%rbx,1),%r11
  mov    %ebp,%ebx
  movapd %xmm4,%xmm2
  xor    %ecx,%ecx
  shr    %ebx
  unpcklpd %xmm2,%xmm2
  shl    $0x4,%rbx
  nopl   (%rax)
L203:
  movupd (%r11,%rcx,1),%xmm1
  movupd (%r11,%rcx,1),%xmm0
  mulpd  %xmm2,%xmm1
  subpd  %xmm1,%xmm0
  movups %xmm0,(%r12,%rcx,1)
  add    $0x10,%rcx
  cmp    %rcx,%rbx
  jne    L203
  mov    %ebp,%ecx
  and    $0xfffffffe,%ecx
  add    %ecx,%eax
  cmp    %ecx,%ebp
  je     L79
  cltq
  shl    $0x3,%rax
  movsd  -0x8(%rsi,%rax,1),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r8,%rax,1)
L79:
  mov    %r10d,%ecx
  jmp    L39
  nopl   0x0(%rax)
L32:
  lea    0x1(%rcx),%edi
  cmp    %r10d,%edi
  jg     L146
  movslq %ecx,%rax
  mov    %r10d,%ebx
  lea    0x0(,%rax,8),%r11
  sub    %ecx,%ebx
  add    $0x1,%rax
  lea    (%r8,%r11,1),%rbp
  lea    0x8(%rdx,%r11,1),%r12
  cmp    %r12,%rbp
  je     L36
  lea    -0x1(%rbx),%r12d
  cmp    $0x1,%r12d
  jbe    L36
  lea    (%rdx,%r11,1),%r10
  mov    %ebx,%r11d
  movapd %xmm4,%xmm1
  xor    %eax,%eax
  shr    %r11d
  unpcklpd %xmm1,%xmm1
  shl    $0x4,%r11
L199:
  movupd (%r10,%rax,1),%xmm0
  mulpd  %xmm1,%xmm0
  movups %xmm0,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %r11,%rax
  jne    L199
  mov    %ebx,%r10d
  and    $0xfffffffe,%r10d
  lea    (%r10,%rdi,1),%eax
  cmp    %r10d,%ebx
  je     L146
  cltq
  movsd  -0x8(%rdx,%rax,8),%xmm0
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,-0x8(%r8,%rax,8)
L146:
  cvttsd2si %xmm3,%edi
  jmp    L39
  nopl   0x0(%rax)
L36:
  movsd  -0x8(%rdx,%rax,8),%xmm0
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,-0x8(%r8,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r10d
  jge    L36
  jmp    L146
  nopl   0x0(%rax)
L78:
  movsd  -0x8(%rsi,%r11,8),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r8,%r11,8)
  add    $0x1,%r11
  cmp    %r11d,%ecx
  jge    L78
  jmp    L79
L238:
  movslq %ecx,%rcx
  xor    %eax,%eax
  nopl   (%rax)
L234:
  movsd  (%rsi,%rax,8),%xmm1
  movsd  (%rdx,%rax,8),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%r8,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L234
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D5
type: byte[8]

tool: {"D5": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

assistant: ```c
int interpshc(double date, double dte1, int nmax1, double *gh1, double dte2, double nmax2, double *gh2, int *nmax, double *gh) {
  int i, k, l;
  double factor;
  --gh;
  --gh2;
  --gh1;
  factor = (date - dte1) / (dte2 - dte1);
  if (nmax1 == nmax2) {
    k = nmax1 * (nmax1 + 2);
    *nmax = nmax1;
  } else if (nmax1 > nmax2) {
    k = nmax2 * (nmax2 + 2);
    l = nmax1 * (nmax1 + 2);
    for (i = k + 1; i <= l; ++i) {
      gh[i] = gh1[i] + factor * (-gh1[i]);
    }
    *nmax = nmax1;
  } else {
    k = nmax1 * (nmax1 + 2);
    l = nmax2 * (nmax2 + 2);
    for (i = k + 1; i <= l; ++i) {
      gh[i] = factor * gh2[i];
    }
    *nmax = nmax2;
  }
  for (i = 1; i <= k; ++i) {
    gh[i] = gh1[i] + factor * (gh2[i] - gh1[i]);
  }
  return 0;
}
```