user: Please show me the C implementation that matches the assembly code listed below:

```asm
<helper_double_16_recursive>:
  endbr64
  cmp    $0x10,%esi
  ja     L4
  push   %rbp
  lea    D7(%rip),%rdx
  mov    %esi,%esi
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  movslq (%rdx,%rsi,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  lea    0x10(%rdi),%rax
  movupd (%rdi),%xmm0
  movupd (%rax),%xmm1
  movapd %xmm0,%xmm8
  haddpd %xmm8,%xmm8
  movapd %xmm0,%xmm9
  hsubpd %xmm9,%xmm9
  blendpd $0x1,%xmm8,%xmm9
  movapd %xmm9,%xmm0
  movapd %xmm1,%xmm8
  haddpd %xmm8,%xmm8
  movapd %xmm1,%xmm9
  hsubpd %xmm9,%xmm9
  blendpd $0x1,%xmm8,%xmm9
  movapd %xmm9,%xmm1
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  addpd  %xmm1,%xmm8
  subpd  %xmm1,%xmm9
  movupd %xmm8,(%rdi)
  movupd %xmm9,(%rax)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L4:
  ret
  mov    $0xe,%esi
  lea    0x20000(%rbx),%rbp
  call   <helper_double_16_recursive>
  mov    $0xe,%esi
  mov    %rbp,%rdi
  call   <helper_double_16_recursive>
  lea    0x40000(%rbx),%rdi
  mov    $0xe,%esi
  call   <helper_double_16_recursive>
  lea    0x60000(%rbx),%rdi
  mov    $0xe,%esi
  call   <helper_double_16_recursive>
  mov    %rbx,%rax
  nopl   0x0(%rax)
L13:
  lea    0x20000(%rax),%rdx
  lea    0x40000(%rax),%rcx
  lea    0x60000(%rax),%rsi
  movupd (%rax),%xmm0
  movupd (%rdx),%xmm1
  movupd (%rcx),%xmm2
  movupd (%rsi),%xmm3
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  addpd  %xmm1,%xmm8
  subpd  %xmm1,%xmm9
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm11
  addpd  %xmm3,%xmm10
  subpd  %xmm3,%xmm11
  movapd %xmm8,%xmm0
  movapd %xmm8,%xmm2
  addpd  %xmm10,%xmm0
  subpd  %xmm10,%xmm2
  movapd %xmm9,%xmm1
  movapd %xmm9,%xmm3
  addpd  %xmm11,%xmm1
  subpd  %xmm11,%xmm3
  movupd %xmm0,(%rax)
  movupd %xmm1,(%rdx)
  movupd %xmm2,(%rcx)
  movupd %xmm3,(%rsi)
  add    $0x10,%rax
  cmp    %rbp,%rax
  jne    L13
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  mov    $0x2,%esi
  lea    0x20(%rbx),%rbp
  call   <helper_double_16_recursive>
  mov    $0x2,%esi
  mov    %rbp,%rdi
  call   <helper_double_16_recursive>
  lea    0x40(%rbx),%rdi
  mov    $0x2,%esi
  call   <helper_double_16_recursive>
  lea    0x60(%rbx),%rdi
  mov    $0x2,%esi
  call   <helper_double_16_recursive>
  lea    0x80(%rbx),%rdi
  mov    $0x2,%esi
  call   <helper_double_16_recursive>
  lea    0xa0(%rbx),%rdi
  mov    $0x2,%esi
  call   <helper_double_16_recursive>
  lea    0xc0(%rbx),%rdi
  mov    $0x2,%esi
  call   <helper_double_16_recursive>
  lea    0xe0(%rbx),%rdi
  mov    $0x2,%esi
  call   <helper_double_16_recursive>
  mov    %rbx,%rax
L22:
  lea    0x20(%rax),%rdx
  lea    0x40(%rax),%rcx
  lea    0x60(%rax),%rsi
  lea    0x80(%rax),%rdi
  lea    0xa0(%rax),%r8
  lea    0xc0(%rax),%r9
  lea    0xe0(%rax),%r10
  movupd (%rax),%xmm0
  movupd (%rdx),%xmm1
  movupd (%rcx),%xmm2
  movupd (%rsi),%xmm3
  movupd (%rdi),%xmm4
  movupd (%r8),%xmm5
  movupd (%r9),%xmm6
  movupd (%r10),%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  addpd  %xmm1,%xmm8
  subpd  %xmm1,%xmm9
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm11
  addpd  %xmm3,%xmm10
  subpd  %xmm3,%xmm11
  movapd %xmm4,%xmm12
  movapd %xmm4,%xmm13
  addpd  %xmm5,%xmm12
  subpd  %xmm5,%xmm13
  movapd %xmm6,%xmm14
  movapd %xmm6,%xmm15
  addpd  %xmm7,%xmm14
  subpd  %xmm7,%xmm15
  movapd %xmm8,%xmm0
  movapd %xmm8,%xmm2
  addpd  %xmm10,%xmm0
  subpd  %xmm10,%xmm2
  movapd %xmm9,%xmm1
  movapd %xmm9,%xmm3
  addpd  %xmm11,%xmm1
  subpd  %xmm11,%xmm3
  movapd %xmm12,%xmm4
  movapd %xmm12,%xmm6
  addpd  %xmm14,%xmm4
  subpd  %xmm14,%xmm6
  movapd %xmm13,%xmm5
  movapd %xmm13,%xmm7
  addpd  %xmm15,%xmm5
  subpd  %xmm15,%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm12
  addpd  %xmm4,%xmm8
  subpd  %xmm4,%xmm12
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm13
  addpd  %xmm5,%xmm9
  subpd  %xmm5,%xmm13
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm14
  addpd  %xmm6,%xmm10
  subpd  %xmm6,%xmm14
  movapd %xmm3,%xmm11
  movapd %xmm3,%xmm15
  addpd  %xmm7,%xmm11
  subpd  %xmm7,%xmm15
  movupd %xmm8,(%rax)
  movupd %xmm9,(%rdx)
  movupd %xmm10,(%rcx)
  movupd %xmm11,(%rsi)
  movupd %xmm12,(%rdi)
  movupd %xmm13,(%r8)
  movupd %xmm14,(%r9)
  movupd %xmm15,(%r10)
  add    $0x10,%rax
  cmp    %rax,%rbp
  jne    L22
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  mov    $0x5,%esi
  lea    0x100(%rbx),%rbp
  call   <helper_double_16_recursive>
  mov    $0x5,%esi
  mov    %rbp,%rdi
  call   <helper_double_16_recursive>
  lea    0x200(%rbx),%rdi
  mov    $0x5,%esi
  call   <helper_double_16_recursive>
  lea    0x300(%rbx),%rdi
  mov    $0x5,%esi
  call   <helper_double_16_recursive>
  lea    0x400(%rbx),%rdi
  mov    $0x5,%esi
  call   <helper_double_16_recursive>
  lea    0x500(%rbx),%rdi
  mov    $0x5,%esi
  call   <helper_double_16_recursive>
  lea    0x600(%rbx),%rdi
  mov    $0x5,%esi
  call   <helper_double_16_recursive>
  lea    0x700(%rbx),%rdi
  mov    $0x5,%esi
  call   <helper_double_16_recursive>
  mov    %rbx,%rax
  nopl   (%rax)
L50:
  lea    0x100(%rax),%rdx
  lea    0x200(%rax),%rcx
  lea    0x300(%rax),%rsi
  lea    0x400(%rax),%rdi
  lea    0x500(%rax),%r8
  lea    0x600(%rax),%r9
  lea    0x700(%rax),%r10
  movupd (%rax),%xmm0
  movupd (%rdx),%xmm1
  movupd (%rcx),%xmm2
  movupd (%rsi),%xmm3
  movupd (%rdi),%xmm4
  movupd (%r8),%xmm5
  movupd (%r9),%xmm6
  movupd (%r10),%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  addpd  %xmm1,%xmm8
  subpd  %xmm1,%xmm9
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm11
  addpd  %xmm3,%xmm10
  subpd  %xmm3,%xmm11
  movapd %xmm4,%xmm12
  movapd %xmm4,%xmm13
  addpd  %xmm5,%xmm12
  subpd  %xmm5,%xmm13
  movapd %xmm6,%xmm14
  movapd %xmm6,%xmm15
  addpd  %xmm7,%xmm14
  subpd  %xmm7,%xmm15
  movapd %xmm8,%xmm0
  movapd %xmm8,%xmm2
  addpd  %xmm10,%xmm0
  subpd  %xmm10,%xmm2
  movapd %xmm9,%xmm1
  movapd %xmm9,%xmm3
  addpd  %xmm11,%xmm1
  subpd  %xmm11,%xmm3
  movapd %xmm12,%xmm4
  movapd %xmm12,%xmm6
  addpd  %xmm14,%xmm4
  subpd  %xmm14,%xmm6
  movapd %xmm13,%xmm5
  movapd %xmm13,%xmm7
  addpd  %xmm15,%xmm5
  subpd  %xmm15,%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm12
  addpd  %xmm4,%xmm8
  subpd  %xmm4,%xmm12
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm13
  addpd  %xmm5,%xmm9
  subpd  %xmm5,%xmm13
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm14
  addpd  %xmm6,%xmm10
  subpd  %xmm6,%xmm14
  movapd %xmm3,%xmm11
  movapd %xmm3,%xmm15
  addpd  %xmm7,%xmm11
  subpd  %xmm7,%xmm15
  movupd %xmm8,(%rax)
  movupd %xmm9,(%rdx)
  movupd %xmm10,(%rcx)
  movupd %xmm11,(%rsi)
  movupd %xmm12,(%rdi)
  movupd %xmm13,(%r8)
  movupd %xmm14,(%r9)
  movupd %xmm15,(%r10)
  add    $0x10,%rax
  cmp    %rax,%rbp
  jne    L50
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  mov    $0x8,%esi
  lea    0x800(%rbx),%rbp
  call   <helper_double_16_recursive>
  mov    $0x8,%esi
  mov    %rbp,%rdi
  call   <helper_double_16_recursive>
  lea    0x1000(%rbx),%rdi
  mov    $0x8,%esi
  call   <helper_double_16_recursive>
  lea    0x1800(%rbx),%rdi
  mov    $0x8,%esi
  call   <helper_double_16_recursive>
  lea    0x2000(%rbx),%rdi
  mov    $0x8,%esi
  call   <helper_double_16_recursive>
  lea    0x2800(%rbx),%rdi
  mov    $0x8,%esi
  call   <helper_double_16_recursive>
  lea    0x3000(%rbx),%rdi
  mov    $0x8,%esi
  call   <helper_double_16_recursive>
  lea    0x3800(%rbx),%rdi
  mov    $0x8,%esi
  call   <helper_double_16_recursive>
  mov    %rbx,%rax
  nopw   0x0(%rax,%rax,1)
L51:
  lea    0x800(%rax),%rdx
  lea    0x1000(%rax),%rcx
  lea    0x1800(%rax),%rsi
  lea    0x2000(%rax),%rdi
  lea    0x2800(%rax),%r8
  lea    0x3000(%rax),%r9
  lea    0x3800(%rax),%r10
  movupd (%rax),%xmm0
  movupd (%rdx),%xmm1
  movupd (%rcx),%xmm2
  movupd (%rsi),%xmm3
  movupd (%rdi),%xmm4
  movupd (%r8),%xmm5
  movupd (%r9),%xmm6
  movupd (%r10),%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  addpd  %xmm1,%xmm8
  subpd  %xmm1,%xmm9
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm11
  addpd  %xmm3,%xmm10
  subpd  %xmm3,%xmm11
  movapd %xmm4,%xmm12
  movapd %xmm4,%xmm13
  addpd  %xmm5,%xmm12
  subpd  %xmm5,%xmm13
  movapd %xmm6,%xmm14
  movapd %xmm6,%xmm15
  addpd  %xmm7,%xmm14
  subpd  %xmm7,%xmm15
  movapd %xmm8,%xmm0
  movapd %xmm8,%xmm2
  addpd  %xmm10,%xmm0
  subpd  %xmm10,%xmm2
  movapd %xmm9,%xmm1
  movapd %xmm9,%xmm3
  addpd  %xmm11,%xmm1
  subpd  %xmm11,%xmm3
  movapd %xmm12,%xmm4
  movapd %xmm12,%xmm6
  addpd  %xmm14,%xmm4
  subpd  %xmm14,%xmm6
  movapd %xmm13,%xmm5
  movapd %xmm13,%xmm7
  addpd  %xmm15,%xmm5
  subpd  %xmm15,%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm12
  addpd  %xmm4,%xmm8
  subpd  %xmm4,%xmm12
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm13
  addpd  %xmm5,%xmm9
  subpd  %xmm5,%xmm13
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm14
  addpd  %xmm6,%xmm10
  subpd  %xmm6,%xmm14
  movapd %xmm3,%xmm11
  movapd %xmm3,%xmm15
  addpd  %xmm7,%xmm11
  subpd  %xmm7,%xmm15
  movupd %xmm8,(%rax)
  movupd %xmm9,(%rdx)
  movupd %xmm10,(%rcx)
  movupd %xmm11,(%rsi)
  movupd %xmm12,(%rdi)
  movupd %xmm13,(%r8)
  movupd %xmm14,(%r9)
  movupd %xmm15,(%r10)
  add    $0x10,%rax
  cmp    %rax,%rbp
  jne    L51
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  mov    $0xb,%esi
  lea    0x4000(%rbx),%rbp
  call   <helper_double_16_recursive>
  mov    $0xb,%esi
  mov    %rbp,%rdi
  call   <helper_double_16_recursive>
  lea    0x8000(%rbx),%rdi
  mov    $0xb,%esi
  call   <helper_double_16_recursive>
  lea    0xc000(%rbx),%rdi
  mov    $0xb,%esi
  call   <helper_double_16_recursive>
  lea    0x10000(%rbx),%rdi
  mov    $0xb,%esi
  call   <helper_double_16_recursive>
  lea    0x14000(%rbx),%rdi
  mov    $0xb,%esi
  call   <helper_double_16_recursive>
  lea    0x18000(%rbx),%rdi
  mov    $0xb,%esi
  call   <helper_double_16_recursive>
  lea    0x1c000(%rbx),%rdi
  mov    $0xb,%esi
  call   <helper_double_16_recursive>
  mov    %rbx,%rax
  nopw   0x0(%rax,%rax,1)
L5:
  lea    0x4000(%rax),%rdx
  lea    0x8000(%rax),%rcx
  lea    0xc000(%rax),%rsi
  lea    0x10000(%rax),%rdi
  lea    0x14000(%rax),%r8
  lea    0x18000(%rax),%r9
  lea    0x1c000(%rax),%r10
  movupd (%rax),%xmm0
  movupd (%rdx),%xmm1
  movupd (%rcx),%xmm2
  movupd (%rsi),%xmm3
  movupd (%rdi),%xmm4
  movupd (%r8),%xmm5
  movupd (%r9),%xmm6
  movupd (%r10),%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  addpd  %xmm1,%xmm8
  subpd  %xmm1,%xmm9
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm11
  addpd  %xmm3,%xmm10
  subpd  %xmm3,%xmm11
  movapd %xmm4,%xmm12
  movapd %xmm4,%xmm13
  addpd  %xmm5,%xmm12
  subpd  %xmm5,%xmm13
  movapd %xmm6,%xmm14
  movapd %xmm6,%xmm15
  addpd  %xmm7,%xmm14
  subpd  %xmm7,%xmm15
  movapd %xmm8,%xmm0
  movapd %xmm8,%xmm2
  addpd  %xmm10,%xmm0
  subpd  %xmm10,%xmm2
  movapd %xmm9,%xmm1
  movapd %xmm9,%xmm3
  addpd  %xmm11,%xmm1
  subpd  %xmm11,%xmm3
  movapd %xmm12,%xmm4
  movapd %xmm12,%xmm6
  addpd  %xmm14,%xmm4
  subpd  %xmm14,%xmm6
  movapd %xmm13,%xmm5
  movapd %xmm13,%xmm7
  addpd  %xmm15,%xmm5
  subpd  %xmm15,%xmm7
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm12
  addpd  %xmm4,%xmm8
  subpd  %xmm4,%xmm12
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm13
  addpd  %xmm5,%xmm9
  subpd  %xmm5,%xmm13
  movapd %xmm2,%xmm10
  movapd %xmm2,%xmm14
  addpd  %xmm6,%xmm10
  subpd  %xmm6,%xmm14
  movapd %xmm3,%xmm11
  movapd %xmm3,%xmm15
  addpd  %xmm7,%xmm11
  subpd  %xmm7,%xmm15
  movupd %xmm8,(%rax)
  movupd %xmm9,(%rdx)
  movupd %xmm10,(%rcx)
  movupd %xmm11,(%rsi)
  movupd %xmm12,(%rdi)
  movupd %xmm13,(%r8)
  movupd %xmm14,(%r9)
  movupd %xmm15,(%r10)
  add    $0x10,%rax
  cmp    %rbp,%rax
  jne    L5
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void helper_double_16_recursive(double *buf, int depth) {
  if (depth == 2) {
    for (int j = 0; j < 4; j += 4) {
      for (int k = 0; k < 2; k += 2) {
        __asm__ volatile("movupd (%0), %%xmm0\n"
                         "movupd (%1), %%xmm1\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "haddpd %%xmm8, %%xmm8\n"
                         "movapd %%xmm0, %%xmm9\n"
                         "hsubpd %%xmm9, %%xmm9\n"
                         "blendpd $1, %%xmm8, %%xmm9\n"
                         "movapd %%xmm9, %%xmm0\n"
                         "movapd %%xmm1, %%xmm8\n"
                         "haddpd %%xmm8, %%xmm8\n"
                         "movapd %%xmm1, %%xmm9\n"
                         "hsubpd %%xmm9, %%xmm9\n"
                         "blendpd $1, %%xmm8, %%xmm9\n"
                         "movapd %%xmm9, %%xmm1\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm9\n"
                         "addpd %%xmm1, %%xmm8\n"
                         "subpd %%xmm1, %%xmm9\n"
                         "movupd %%xmm8, (%0)\n"
                         "movupd %%xmm9, (%1)\n" ::"r"(buf + j + k + 0),
                         "r"(buf + j + k + 2)
                         : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
      }
    }
    return;
  }
  if (depth == 5) {
    helper_double_16_recursive(buf + 0, 2);
    helper_double_16_recursive(buf + 4, 2);
    helper_double_16_recursive(buf + 8, 2);
    helper_double_16_recursive(buf + 12, 2);
    helper_double_16_recursive(buf + 16, 2);
    helper_double_16_recursive(buf + 20, 2);
    helper_double_16_recursive(buf + 24, 2);
    helper_double_16_recursive(buf + 28, 2);
    for (int j = 0; j < 32; j += 32) {
      for (int k = 0; k < 4; k += 2) {
        __asm__ volatile("movupd (%0), %%xmm0\n"
                         "movupd (%1), %%xmm1\n"
                         "movupd (%2), %%xmm2\n"
                         "movupd (%3), %%xmm3\n"
                         "movupd (%4), %%xmm4\n"
                         "movupd (%5), %%xmm5\n"
                         "movupd (%6), %%xmm6\n"
                         "movupd (%7), %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm9\n"
                         "addpd %%xmm1, %%xmm8\n"
                         "subpd %%xmm1, %%xmm9\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm11\n"
                         "addpd %%xmm3, %%xmm10\n"
                         "subpd %%xmm3, %%xmm11\n"
                         "movapd %%xmm4, %%xmm12\n"
                         "movapd %%xmm4, %%xmm13\n"
                         "addpd %%xmm5, %%xmm12\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm6, %%xmm14\n"
                         "movapd %%xmm6, %%xmm15\n"
                         "addpd %%xmm7, %%xmm14\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movapd %%xmm8, %%xmm0\n"
                         "movapd %%xmm8, %%xmm2\n"
                         "addpd %%xmm10, %%xmm0\n"
                         "subpd %%xmm10, %%xmm2\n"
                         "movapd %%xmm9, %%xmm1\n"
                         "movapd %%xmm9, %%xmm3\n"
                         "addpd %%xmm11, %%xmm1\n"
                         "subpd %%xmm11, %%xmm3\n"
                         "movapd %%xmm12, %%xmm4\n"
                         "movapd %%xmm12, %%xmm6\n"
                         "addpd %%xmm14, %%xmm4\n"
                         "subpd %%xmm14, %%xmm6\n"
                         "movapd %%xmm13, %%xmm5\n"
                         "movapd %%xmm13, %%xmm7\n"
                         "addpd %%xmm15, %%xmm5\n"
                         "subpd %%xmm15, %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm12\n"
                         "addpd %%xmm4, %%xmm8\n"
                         "subpd %%xmm4, %%xmm12\n"
                         "movapd %%xmm1, %%xmm9\n"
                         "movapd %%xmm1, %%xmm13\n"
                         "addpd %%xmm5, %%xmm9\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm14\n"
                         "addpd %%xmm6, %%xmm10\n"
                         "subpd %%xmm6, %%xmm14\n"
                         "movapd %%xmm3, %%xmm11\n"
                         "movapd %%xmm3, %%xmm15\n"
                         "addpd %%xmm7, %%xmm11\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movupd %%xmm8, (%0)\n"
                         "movupd %%xmm9, (%1)\n"
                         "movupd %%xmm10, (%2)\n"
                         "movupd %%xmm11, (%3)\n"
                         "movupd %%xmm12, (%4)\n"
                         "movupd %%xmm13, (%5)\n"
                         "movupd %%xmm14, (%6)\n"
                         "movupd %%xmm15, (%7)\n" ::"r"(buf + j + k + 0),
                         "r"(buf + j + k + 4), "r"(buf + j + k + 8), "r"(buf + j + k + 12), "r"(buf + j + k + 16), "r"(buf + j + k + 20), "r"(buf + j + k + 24), "r"(buf + j + k + 28)
                         : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
      }
    }
    return;
  }
  if (depth == 8) {
    helper_double_16_recursive(buf + 0, 5);
    helper_double_16_recursive(buf + 32, 5);
    helper_double_16_recursive(buf + 64, 5);
    helper_double_16_recursive(buf + 96, 5);
    helper_double_16_recursive(buf + 128, 5);
    helper_double_16_recursive(buf + 160, 5);
    helper_double_16_recursive(buf + 192, 5);
    helper_double_16_recursive(buf + 224, 5);
    for (int j = 0; j < 256; j += 256) {
      for (int k = 0; k < 32; k += 2) {
        __asm__ volatile("movupd (%0), %%xmm0\n"
                         "movupd (%1), %%xmm1\n"
                         "movupd (%2), %%xmm2\n"
                         "movupd (%3), %%xmm3\n"
                         "movupd (%4), %%xmm4\n"
                         "movupd (%5), %%xmm5\n"
                         "movupd (%6), %%xmm6\n"
                         "movupd (%7), %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm9\n"
                         "addpd %%xmm1, %%xmm8\n"
                         "subpd %%xmm1, %%xmm9\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm11\n"
                         "addpd %%xmm3, %%xmm10\n"
                         "subpd %%xmm3, %%xmm11\n"
                         "movapd %%xmm4, %%xmm12\n"
                         "movapd %%xmm4, %%xmm13\n"
                         "addpd %%xmm5, %%xmm12\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm6, %%xmm14\n"
                         "movapd %%xmm6, %%xmm15\n"
                         "addpd %%xmm7, %%xmm14\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movapd %%xmm8, %%xmm0\n"
                         "movapd %%xmm8, %%xmm2\n"
                         "addpd %%xmm10, %%xmm0\n"
                         "subpd %%xmm10, %%xmm2\n"
                         "movapd %%xmm9, %%xmm1\n"
                         "movapd %%xmm9, %%xmm3\n"
                         "addpd %%xmm11, %%xmm1\n"
                         "subpd %%xmm11, %%xmm3\n"
                         "movapd %%xmm12, %%xmm4\n"
                         "movapd %%xmm12, %%xmm6\n"
                         "addpd %%xmm14, %%xmm4\n"
                         "subpd %%xmm14, %%xmm6\n"
                         "movapd %%xmm13, %%xmm5\n"
                         "movapd %%xmm13, %%xmm7\n"
                         "addpd %%xmm15, %%xmm5\n"
                         "subpd %%xmm15, %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm12\n"
                         "addpd %%xmm4, %%xmm8\n"
                         "subpd %%xmm4, %%xmm12\n"
                         "movapd %%xmm1, %%xmm9\n"
                         "movapd %%xmm1, %%xmm13\n"
                         "addpd %%xmm5, %%xmm9\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm14\n"
                         "addpd %%xmm6, %%xmm10\n"
                         "subpd %%xmm6, %%xmm14\n"
                         "movapd %%xmm3, %%xmm11\n"
                         "movapd %%xmm3, %%xmm15\n"
                         "addpd %%xmm7, %%xmm11\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movupd %%xmm8, (%0)\n"
                         "movupd %%xmm9, (%1)\n"
                         "movupd %%xmm10, (%2)\n"
                         "movupd %%xmm11, (%3)\n"
                         "movupd %%xmm12, (%4)\n"
                         "movupd %%xmm13, (%5)\n"
                         "movupd %%xmm14, (%6)\n"
                         "movupd %%xmm15, (%7)\n" ::"r"(buf + j + k + 0),
                         "r"(buf + j + k + 32), "r"(buf + j + k + 64), "r"(buf + j + k + 96), "r"(buf + j + k + 128), "r"(buf + j + k + 160), "r"(buf + j + k + 192), "r"(buf + j + k + 224)
                         : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
      }
    }
    return;
  }
  if (depth == 11) {
    helper_double_16_recursive(buf + 0, 8);
    helper_double_16_recursive(buf + 256, 8);
    helper_double_16_recursive(buf + 512, 8);
    helper_double_16_recursive(buf + 768, 8);
    helper_double_16_recursive(buf + 1024, 8);
    helper_double_16_recursive(buf + 1280, 8);
    helper_double_16_recursive(buf + 1536, 8);
    helper_double_16_recursive(buf + 1792, 8);
    for (int j = 0; j < 2048; j += 2048) {
      for (int k = 0; k < 256; k += 2) {
        __asm__ volatile("movupd (%0), %%xmm0\n"
                         "movupd (%1), %%xmm1\n"
                         "movupd (%2), %%xmm2\n"
                         "movupd (%3), %%xmm3\n"
                         "movupd (%4), %%xmm4\n"
                         "movupd (%5), %%xmm5\n"
                         "movupd (%6), %%xmm6\n"
                         "movupd (%7), %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm9\n"
                         "addpd %%xmm1, %%xmm8\n"
                         "subpd %%xmm1, %%xmm9\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm11\n"
                         "addpd %%xmm3, %%xmm10\n"
                         "subpd %%xmm3, %%xmm11\n"
                         "movapd %%xmm4, %%xmm12\n"
                         "movapd %%xmm4, %%xmm13\n"
                         "addpd %%xmm5, %%xmm12\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm6, %%xmm14\n"
                         "movapd %%xmm6, %%xmm15\n"
                         "addpd %%xmm7, %%xmm14\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movapd %%xmm8, %%xmm0\n"
                         "movapd %%xmm8, %%xmm2\n"
                         "addpd %%xmm10, %%xmm0\n"
                         "subpd %%xmm10, %%xmm2\n"
                         "movapd %%xmm9, %%xmm1\n"
                         "movapd %%xmm9, %%xmm3\n"
                         "addpd %%xmm11, %%xmm1\n"
                         "subpd %%xmm11, %%xmm3\n"
                         "movapd %%xmm12, %%xmm4\n"
                         "movapd %%xmm12, %%xmm6\n"
                         "addpd %%xmm14, %%xmm4\n"
                         "subpd %%xmm14, %%xmm6\n"
                         "movapd %%xmm13, %%xmm5\n"
                         "movapd %%xmm13, %%xmm7\n"
                         "addpd %%xmm15, %%xmm5\n"
                         "subpd %%xmm15, %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm12\n"
                         "addpd %%xmm4, %%xmm8\n"
                         "subpd %%xmm4, %%xmm12\n"
                         "movapd %%xmm1, %%xmm9\n"
                         "movapd %%xmm1, %%xmm13\n"
                         "addpd %%xmm5, %%xmm9\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm14\n"
                         "addpd %%xmm6, %%xmm10\n"
                         "subpd %%xmm6, %%xmm14\n"
                         "movapd %%xmm3, %%xmm11\n"
                         "movapd %%xmm3, %%xmm15\n"
                         "addpd %%xmm7, %%xmm11\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movupd %%xmm8, (%0)\n"
                         "movupd %%xmm9, (%1)\n"
                         "movupd %%xmm10, (%2)\n"
                         "movupd %%xmm11, (%3)\n"
                         "movupd %%xmm12, (%4)\n"
                         "movupd %%xmm13, (%5)\n"
                         "movupd %%xmm14, (%6)\n"
                         "movupd %%xmm15, (%7)\n" ::"r"(buf + j + k + 0),
                         "r"(buf + j + k + 256), "r"(buf + j + k + 512), "r"(buf + j + k + 768), "r"(buf + j + k + 1024), "r"(buf + j + k + 1280), "r"(buf + j + k + 1536), "r"(buf + j + k + 1792)
                         : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
      }
    }
    return;
  }
  if (depth == 14) {
    helper_double_16_recursive(buf + 0, 11);
    helper_double_16_recursive(buf + 2048, 11);
    helper_double_16_recursive(buf + 4096, 11);
    helper_double_16_recursive(buf + 6144, 11);
    helper_double_16_recursive(buf + 8192, 11);
    helper_double_16_recursive(buf + 10240, 11);
    helper_double_16_recursive(buf + 12288, 11);
    helper_double_16_recursive(buf + 14336, 11);
    for (int j = 0; j < 16384; j += 16384) {
      for (int k = 0; k < 2048; k += 2) {
        __asm__ volatile("movupd (%0), %%xmm0\n"
                         "movupd (%1), %%xmm1\n"
                         "movupd (%2), %%xmm2\n"
                         "movupd (%3), %%xmm3\n"
                         "movupd (%4), %%xmm4\n"
                         "movupd (%5), %%xmm5\n"
                         "movupd (%6), %%xmm6\n"
                         "movupd (%7), %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm9\n"
                         "addpd %%xmm1, %%xmm8\n"
                         "subpd %%xmm1, %%xmm9\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm11\n"
                         "addpd %%xmm3, %%xmm10\n"
                         "subpd %%xmm3, %%xmm11\n"
                         "movapd %%xmm4, %%xmm12\n"
                         "movapd %%xmm4, %%xmm13\n"
                         "addpd %%xmm5, %%xmm12\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm6, %%xmm14\n"
                         "movapd %%xmm6, %%xmm15\n"
                         "addpd %%xmm7, %%xmm14\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movapd %%xmm8, %%xmm0\n"
                         "movapd %%xmm8, %%xmm2\n"
                         "addpd %%xmm10, %%xmm0\n"
                         "subpd %%xmm10, %%xmm2\n"
                         "movapd %%xmm9, %%xmm1\n"
                         "movapd %%xmm9, %%xmm3\n"
                         "addpd %%xmm11, %%xmm1\n"
                         "subpd %%xmm11, %%xmm3\n"
                         "movapd %%xmm12, %%xmm4\n"
                         "movapd %%xmm12, %%xmm6\n"
                         "addpd %%xmm14, %%xmm4\n"
                         "subpd %%xmm14, %%xmm6\n"
                         "movapd %%xmm13, %%xmm5\n"
                         "movapd %%xmm13, %%xmm7\n"
                         "addpd %%xmm15, %%xmm5\n"
                         "subpd %%xmm15, %%xmm7\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm12\n"
                         "addpd %%xmm4, %%xmm8\n"
                         "subpd %%xmm4, %%xmm12\n"
                         "movapd %%xmm1, %%xmm9\n"
                         "movapd %%xmm1, %%xmm13\n"
                         "addpd %%xmm5, %%xmm9\n"
                         "subpd %%xmm5, %%xmm13\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm14\n"
                         "addpd %%xmm6, %%xmm10\n"
                         "subpd %%xmm6, %%xmm14\n"
                         "movapd %%xmm3, %%xmm11\n"
                         "movapd %%xmm3, %%xmm15\n"
                         "addpd %%xmm7, %%xmm11\n"
                         "subpd %%xmm7, %%xmm15\n"
                         "movupd %%xmm8, (%0)\n"
                         "movupd %%xmm9, (%1)\n"
                         "movupd %%xmm10, (%2)\n"
                         "movupd %%xmm11, (%3)\n"
                         "movupd %%xmm12, (%4)\n"
                         "movupd %%xmm13, (%5)\n"
                         "movupd %%xmm14, (%6)\n"
                         "movupd %%xmm15, (%7)\n" ::"r"(buf + j + k + 0),
                         "r"(buf + j + k + 2048), "r"(buf + j + k + 4096), "r"(buf + j + k + 6144), "r"(buf + j + k + 8192), "r"(buf + j + k + 10240), "r"(buf + j + k + 12288), "r"(buf + j + k + 14336)
                         : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
      }
    }
    return;
  }
  if (depth == 16) {
    helper_double_16_recursive(buf + 0, 14);
    helper_double_16_recursive(buf + 16384, 14);
    helper_double_16_recursive(buf + 32768, 14);
    helper_double_16_recursive(buf + 49152, 14);
    for (int j = 0; j < 65536; j += 65536) {
      for (int k = 0; k < 16384; k += 2) {
        __asm__ volatile("movupd (%0), %%xmm0\n"
                         "movupd (%1), %%xmm1\n"
                         "movupd (%2), %%xmm2\n"
                         "movupd (%3), %%xmm3\n"
                         "movapd %%xmm0, %%xmm8\n"
                         "movapd %%xmm0, %%xmm9\n"
                         "addpd %%xmm1, %%xmm8\n"
                         "subpd %%xmm1, %%xmm9\n"
                         "movapd %%xmm2, %%xmm10\n"
                         "movapd %%xmm2, %%xmm11\n"
                         "addpd %%xmm3, %%xmm10\n"
                         "subpd %%xmm3, %%xmm11\n"
                         "movapd %%xmm8, %%xmm0\n"
                         "movapd %%xmm8, %%xmm2\n"
                         "addpd %%xmm10, %%xmm0\n"
                         "subpd %%xmm10, %%xmm2\n"
                         "movapd %%xmm9, %%xmm1\n"
                         "movapd %%xmm9, %%xmm3\n"
                         "addpd %%xmm11, %%xmm1\n"
                         "subpd %%xmm11, %%xmm3\n"
                         "movupd %%xmm0, (%0)\n"
                         "movupd %%xmm1, (%1)\n"
                         "movupd %%xmm2, (%2)\n"
                         "movupd %%xmm3, (%3)\n" ::"r"(buf + j + k + 0),
                         "r"(buf + j + k + 16384), "r"(buf + j + k + 32768), "r"(buf + j + k + 49152)
                         : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
      }
    }
    return;
  }
}
```