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

```asm
<fn_invFHaarWT2p2_I16>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r10
  mov    %edx,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %edx,%eax
  lea    0xf(%rax,%rax,1),%rax
  shr    $0x4,%rax
  shl    $0x4,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  mov    %rsp,%rdx
  sub    %rsi,%rdx
L108:
  cmp    %rdx,%rsp
  je     L134
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L108
L134:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L90
  orq    $0x0,-0x8(%rsp,%rdx,1)
L90:
  mov    %rsp,%rsi
  mov    %r13d,%edi
  shr    %edi
  test   %ecx,%ecx
  je     L96
  cmp    $0x1,%ecx
  jne    L18
  test   %r13d,%r13d
  je     L96
  mov    $0x0,%eax
L187:
  mov    %eax,%ecx
  shr    %ecx
  mov    %eax,%edx
  lea    (%r12,%rdx,2),%r8
  lea    (%rdi,%rcx,1),%edx
  movzwl (%r10,%rdx,2),%edx
  mov    %dx,(%r8)
  lea    0x1(%rax),%esi
  lea    (%r12,%rsi,2),%rsi
  mov    %dx,(%rsi)
  mov    %ecx,%ecx
  lea    (%r10,%rcx,2),%rcx
  add    (%rcx),%dx
  mov    %dx,(%r8)
  movzwl (%rcx),%edx
  sub    %dx,(%rsi)
  add    $0x2,%eax
  cmp    %eax,%r13d
  ja     L187
L96:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L28
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L18:
  mov    %r13d,%r9d
  shr    %cl,%r9d
  mov    %r13d,%r11d
  sub    %r9d,%r11d
  add    %r9d,%r9d
  je     L188
  mov    $0x0,%eax
L154:
  mov    %eax,%edx
  shr    %edx
  lea    (%rdx,%r11,1),%edx
  movzwl (%r10,%rdx,2),%edx
  mov    %eax,%r8d
  mov    %dx,(%rsi,%r8,2)
  lea    0x1(%rax),%r8d
  mov    %dx,(%rsi,%r8,2)
  add    $0x2,%eax
  cmp    %r9d,%eax
  jb     L154
  mov    %r13d,%r11d
  sub    %r9d,%r11d
  mov    $0x0,%eax
L5:
  mov    %eax,%edx
  shr    %edx
  lea    (%rdx,%r11,1),%edx
  movzwl (%r10,%rdx,2),%r8d
  mov    %eax,%edx
  add    %r8w,(%rsi,%rdx,2)
  lea    0x1(%rax),%edx
  sub    %r8w,(%rsi,%rdx,2)
  add    $0x2,%eax
  cmp    %r9d,%eax
  jb     L5
L188:
  mov    %rsi,%r11
  lea    -0x1(%rcx),%r15d
  cmp    $0x1,%r15d
  jbe    L119
  mov    %edi,%edi
  lea    (%rsi,%rdi,2),%rsi
  mov    $0x1,%r14d
  jmp    L6
L116:
  mov    %r11,%rax
  mov    %rsi,%r11
  mov    %rax,%rsi
L6:
  add    %r9d,%r9d
  mov    %r13d,%ebx
  sub    %r9d,%ebx
  test   %r9d,%r9d
  je     L115
  mov    $0x0,%eax
L99:
  mov    %eax,%edi
  shr    %edi
  mov    %edi,%edx
  movzwl (%r11,%rdx,2),%edx
  lea    0x1(%rax),%ecx
  lea    (%rsi,%rcx,2),%rcx
  mov    %dx,(%rcx)
  lea    (%rdi,%rbx,1),%edi
  movzwl (%r10,%rdi,2),%edi
  mov    %eax,%r8d
  add    %edi,%edx
  mov    %dx,(%rsi,%r8,2)
  sub    %di,(%rcx)
  add    $0x2,%eax
  cmp    %eax,%r9d
  ja     L99
L115:
  add    $0x1,%r14d
  cmp    %r15d,%r14d
  jne    L116
L119:
  test   %r13d,%r13d
  je     L96
  mov    $0x0,%eax
L53:
  mov    %eax,%ecx
  shr    %ecx
  mov    %ecx,%ecx
  mov    %eax,%edx
  lea    (%r12,%rdx,2),%r8
  movzwl (%rsi,%rcx,2),%edx
  mov    %dx,(%r8)
  lea    0x1(%rax),%edi
  lea    (%r12,%rdi,2),%rdi
  mov    %dx,(%rdi)
  lea    (%r10,%rcx,2),%rcx
  add    (%rcx),%dx
  mov    %dx,(%r8)
  movzwl (%rcx),%edx
  sub    %dx,(%rdi)
  add    $0x2,%eax
  cmp    %eax,%r13d
  ja     L53
  jmp    L96
L28:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void fn_invFHaarWT2p2_I16(short *ai_da, short *ai_ka, const unsigned int const cuci_N, const unsigned int const cuic_w) {
  short ai_buff[cuci_N];
  unsigned int ui_j;
  unsigned int ui_i;
  unsigned int ui_step = 0;
  unsigned int ui_ord = cuci_N;
  short *pi_p1 = &ai_buff[0];
  short *pi_p2 = &ai_buff[cuci_N >> 1];
  short *pi_temp;
  switch (cuic_w) {
  case 0:
    break;
  case 1:
    for (ui_j = 0; ui_j < cuci_N; ui_j = ui_j + 2) {
      ai_da[ui_j] = ai_ka[(ui_j >> 1) + (cuci_N >> 1)];
      ai_da[ui_j + 1] = ai_ka[(ui_j >> 1) + (cuci_N >> 1)];
      ai_da[ui_j] = ai_da[ui_j] + ai_ka[(ui_j >> 1)];
      ai_da[ui_j + 1] = ai_da[ui_j + 1] - ai_ka[(ui_j >> 1)];
    }
    break;
  default:
    ui_ord = ui_ord >> cuic_w;
    ui_step = cuci_N - ui_ord;
    for (ui_j = 0; ui_j < (ui_ord << 1); ui_j = ui_j + 2) {
      ai_buff[ui_j] = ai_ka[(ui_j >> 1) + ui_step];
      ai_buff[ui_j + 1] = ai_ka[(ui_j >> 1) + ui_step];
    }
    ui_ord = ui_ord << 1;
    ui_step = cuci_N - ui_ord;
    for (ui_j = 0; ui_j < ui_ord; ui_j = ui_j + 2) {
      ai_buff[ui_j] = ai_buff[ui_j] + ai_ka[(ui_j >> 1) + ui_step];
      ai_buff[ui_j + 1] = ai_buff[ui_j + 1] - ai_ka[(ui_j >> 1) + ui_step];
    }
    for (ui_i = 1; ui_i < (cuic_w - 1); ui_i++) {
      ui_ord = ui_ord << 1;
      ui_step = cuci_N - ui_ord;
      for (ui_j = 0; ui_j < ui_ord; ui_j = ui_j + 2) {
        pi_p2[ui_j] = pi_p1[ui_j >> 1];
        pi_p2[ui_j + 1] = pi_p1[ui_j >> 1];
        pi_p2[ui_j] = pi_p2[ui_j] + ai_ka[(ui_j >> 1) + ui_step];
        pi_p2[ui_j + 1] = pi_p2[ui_j + 1] - ai_ka[(ui_j >> 1) + ui_step];
      }
      pi_temp = pi_p1;
      pi_p1 = pi_p2;
      pi_p2 = pi_temp;
    }
    for (ui_j = 0; ui_j < cuci_N; ui_j = ui_j + 2) {
      ai_da[ui_j] = pi_p1[ui_j >> 1];
      ai_da[ui_j + 1] = pi_p1[ui_j >> 1];
      ai_da[ui_j] = ai_da[ui_j] + ai_ka[ui_j >> 1];
      ai_da[ui_j + 1] = ai_da[ui_j + 1] - ai_ka[ui_j >> 1];
    }
    break;
  }
  return;
}
```