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

```asm
<daubechies4>:
  endbr64
  cmp    $0x3,%esi
  jg     L28
  ret
  nopw   0x0(%rax,%rax,1)
L28:
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  lea    0x0(,%rsi,8),%edi
  call   <malloc@plt>
  movslq %ebp,%r9
  mov    %ebp,%r10d
  shl    $0x3,%r9
  mov    %rax,%rdi
  sar    %r10d
  lea    -0x8(%rbx,%r9,1),%r11
  test   %r12d,%r12d
  js     L58
  lea    -0x4(%rbp),%ecx
  movsd  D60(%rip),%xmm4
  movsd  D61(%rip),%xmm3
  mov    %rbx,%rax
  shr    %ecx
  movsd  D73(%rip),%xmm2
  movsd  D18(%rip),%xmm1
  mov    %rdi,%rdx
  lea    0x1(%rcx),%esi
  mov    %rsi,%rcx
  lea    (%rdi,%rsi,8),%r8
  movslq %r10d,%rsi
  shl    $0x3,%rsi
  nopw   0x0(%rax,%rax,1)
L30:
  movsd  (%rax),%xmm0
  movsd  0x8(%rax),%xmm5
  add    $0x10,%rax
  mulsd  %xmm3,%xmm5
  mulsd  %xmm4,%xmm0
  addsd  %xmm5,%xmm0
  movsd  (%rax),%xmm5
  mulsd  %xmm2,%xmm5
  addsd  %xmm5,%xmm0
  movsd  0x8(%rax),%xmm5
  mulsd  %xmm1,%xmm5
  addsd  %xmm5,%xmm0
  movsd  %xmm0,(%rdx)
  movsd  -0x10(%rax),%xmm0
  movsd  -0x8(%rax),%xmm5
  mulsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm5
  subsd  %xmm5,%xmm0
  movsd  (%rax),%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm5,%xmm0
  movsd  0x8(%rax),%xmm5
  mulsd  %xmm4,%xmm5
  subsd  %xmm5,%xmm0
  movsd  %xmm0,(%rsi,%rdx,1)
  add    $0x8,%rdx
  cmp    %rdx,%r8
  jne    L30
  lea    -0x10(%rbx,%r9,1),%rax
  movsd  (%r11),%xmm5
  movslq %ecx,%rdx
  add    %r10d,%ecx
  movsd  (%rax),%xmm0
  movslq %ecx,%rcx
  mulsd  %xmm3,%xmm5
  mulsd  %xmm4,%xmm0
  addsd  %xmm5,%xmm0
  movsd  (%rbx),%xmm5
  mulsd  %xmm2,%xmm5
  addsd  %xmm5,%xmm0
  movsd  0x8(%rbx),%xmm5
  mulsd  %xmm1,%xmm5
  addsd  %xmm5,%xmm0
  movsd  %xmm0,(%rdi,%rdx,8)
  mulsd  (%rax),%xmm1
  mulsd  (%r11),%xmm2
  mulsd  (%rbx),%xmm3
  mulsd  0x8(%rbx),%xmm4
  subsd  %xmm2,%xmm1
  addsd  %xmm3,%xmm1
  subsd  %xmm4,%xmm1
  movsd  %xmm1,(%rdi,%rcx,8)
L15:
  mov    %ebp,%ebp
  mov    %rdi,%rax
  sub    %rdi,%rbx
  lea    (%rdi,%rbp,8),%rdx
  nopl   0x0(%rax,%rax,1)
L56:
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rbx,%rax,1)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L56
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    1060 <free@plt>
  nopl   0x0(%rax,%rax,1)
L58:
  movslq %r10d,%rax
  movsd  (%r11),%xmm1
  lea    -0x2(%r10),%esi
  lea    0x10(%rdi),%rcx
  shl    $0x3,%rax
  movsd  D73(%rip),%xmm2
  movsd  D61(%rip),%xmm3
  lea    0x8(%rbx,%rsi,8),%rsi
  lea    -0x8(%rbx,%rax,1),%rdx
  movsd  D60(%rip),%xmm4
  add    %rbx,%rax
  movsd  (%rdx),%xmm0
  mulsd  %xmm3,%xmm1
  movsd  (%rax),%xmm5
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  (%rbx),%xmm1
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  movsd  D18(%rip),%xmm1
  mulsd  %xmm1,%xmm5
  addsd  %xmm5,%xmm0
  movsd  %xmm0,(%rdi)
  movsd  (%rdx),%xmm0
  movsd  (%r11),%xmm5
  mov    %rbx,%rdx
  mulsd  %xmm4,%xmm5
  mulsd  %xmm1,%xmm0
  subsd  %xmm5,%xmm0
  movsd  (%rbx),%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm5,%xmm0
  movsd  (%rax),%xmm5
  mulsd  %xmm2,%xmm5
  subsd  %xmm5,%xmm0
  movsd  %xmm0,0x8(%rdi)
  nopw   0x0(%rax,%rax,1)
L11:
  movsd  (%rdx),%xmm0
  movsd  (%rax),%xmm5
  add    $0x8,%rdx
  add    $0x8,%rax
  add    $0x10,%rcx
  mulsd  %xmm3,%xmm5
  mulsd  %xmm2,%xmm0
  addsd  %xmm5,%xmm0
  movsd  (%rdx),%xmm5
  mulsd  %xmm4,%xmm5
  addsd  %xmm5,%xmm0
  movsd  (%rax),%xmm5
  mulsd  %xmm1,%xmm5
  addsd  %xmm5,%xmm0
  movsd  %xmm0,-0x10(%rcx)
  movsd  -0x8(%rdx),%xmm0
  movsd  -0x8(%rax),%xmm5
  mulsd  %xmm1,%xmm0
  mulsd  %xmm4,%xmm5
  subsd  %xmm5,%xmm0
  movsd  (%rdx),%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm5,%xmm0
  movsd  (%rax),%xmm5
  mulsd  %xmm2,%xmm5
  subsd  %xmm5,%xmm0
  movsd  %xmm0,-0x8(%rcx)
  cmp    %rdx,%rsi
  jne    L11
  jmp    L15
```

tool_calls: name: extract_symbolic_data
arguments: tag: D60
type: f64
name: extract_symbolic_data
arguments: tag: D61
type: f64
name: extract_symbolic_data
arguments: tag: D73
type: f64
name: extract_symbolic_data
arguments: tag: D18
type: byte[8]

tool: D60: 0.4829629131445341

tool: D61: 0.8365163037378077

tool: D73: 0.2241438680420134

tool: {"D18": [0x8f,0x06,0x93,0xc1,0x7d,0x90,0xc0,0xbf]}

assistant: ```c
void daubechies4(double *a, const int n, const int isign) {
  const double C0 = 0.4829629131445341, C1 = 0.83651630373780772, C2 = 0.22414386804201339, C3 = -0.12940952255126034;
  int nh, i, j;
  double *dwt;
  if (n < 4)
    return;
  dwt = (double *)malloc(n * sizeof(double));
  nh = n >> 1;
  if (isign >= 0) {
    for (j = 0, i = 0; j < n - 3; j += 2) {
      dwt[i] = C0 * a[j] + C1 * a[j + 1] + C2 * a[j + 2] + C3 * a[j + 3];
      dwt[i + nh] = C3 * a[j] - C2 * a[j + 1] + C1 * a[j + 2] - C0 * a[j + 3];
      i++;
    }
    dwt[i] = C0 * a[n - 2] + C1 * a[n - 1] + C2 * a[0] + C3 * a[1];
    dwt[i + nh] = C3 * a[n - 2] - C2 * a[n - 1] + C1 * a[0] - C0 * a[1];
  } else {
    dwt[0] = C2 * a[nh - 1] + C1 * a[n - 1] + C0 * a[0] + C3 * a[nh];
    dwt[1] = C3 * a[nh - 1] - C0 * a[n - 1] + C1 * a[0] - C2 * a[nh];
    for (i = 0, j = 2; i < nh - 1; i++) {
      dwt[j++] = C2 * a[i] + C1 * a[i + nh] + C0 * a[i + 1] + C3 * a[i + nh + 1];
      dwt[j++] = C3 * a[i] - C0 * a[i + nh] + C1 * a[i + 1] - C2 * a[i + nh + 1];
    }
  }
  for (i = 0; i < n; i++)
    a[i] = dwt[i];
  free(dwt);
  return;
}
```