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

```asm
<wavelet_adjoint3>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,0x28(%rsp)
  mov    %rdx,(%rsp)
  mov    %ecx,%ebp
  mov    %r8d,%r13d
  mov    %r9d,%r12d
  mov    0xb8(%rsp),%r14d
  mov    %r14d,0x38(%rsp)
  mov    0xc0(%rsp),%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  lea    0x60(%rsp),%rcx
  lea    0x58(%rsp),%rdx
  lea    0x50(%rsp),%rsi
  lea    0x48(%rsp),%rdi
  mov    $0x7,%r9d
  movsbl 0xb0(%rsp),%r8d
  call   <getadjointfilter@plt>
  mov    %r14d,%eax
  cmp    %r14b,%bl
  cmovle %ebx,%eax
  lea    -0x1(%rbp),%esi
  mov    %esi,0x20(%rsp)
  lea    -0x1(%r13),%esi
  mov    %esi,0x24(%rsp)
  lea    -0x1(%r12),%esi
  mov    %esi,0x30(%rsp)
  movsbl %r14b,%ebx
  sub    $0x1,%ebx
  js     L56
  movsbl %al,%edx
  cmp    %ebx,%edx
  jg     L127
  movsbl %al,%eax
  mov    %eax,0x3c(%rsp)
  sub    $0x1,%eax
  mov    %eax,0x34(%rsp)
  mov    %ebx,%ebp
  mov    $0x0,%edi
  mov    %ebx,0x1c(%rsp)
  jmp    L82
L127:
  mov    $0x0,%r12d
  mov    $0x0,%r13d
  movq   $0x0,0x10(%rsp)
  mov    $0x0,%r14d
  movq   $0x0,0x8(%rsp)
  mov    $0x0,%r15d
  movq   $0x0,0x28(%rsp)
  mov    (%rsp),%rbp
  jmp    L28
L56:
  imul   %r13d,%ebp
  imul   %r12d,%ebp
  lea    0x0(,%rbp,4),%edx
  mov    0x28(%rsp),%rsi
  mov    (%rsp),%rdi
  call   <memcpy@plt>
  jmp    L44
L17:
  sub    $0x8,%rsp
  push   $0x1
  push   %r9
  push   %r8
  push   %rsi
  push   0x28(%rsp)
  push   %rdi
  push   %r15
  mov    0x48(%rsp),%r9
  mov    %rbx,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    0x50(%rsp),%rdi
  mov    $0x0,%eax
  call   *0x88(%rsp)
  add    $0x40,%rsp
L6:
  sub    $0x1,%ebp
  cmp    0x34(%rsp),%ebp
  je     L120
  mov    (%rsp),%rdi
L82:
  mov    0x20(%rsp),%edx
  mov    %ebp,%ecx
  sar    %cl,%edx
  lea    0x1(%rdx),%esi
  mov    0x24(%rsp),%eax
  sar    %cl,%eax
  lea    0x1(%rax),%r8d
  mov    0x30(%rsp),%r11d
  sar    %cl,%r11d
  lea    0x1(%r11),%r9d
  add    $0x2,%edx
  sar    %edx
  add    $0x2,%eax
  sar    %eax
  add    $0x2,%r11d
  sar    %r11d
  mov    %eax,%r10d
  imul   %r11d,%r10d
  mov    %r10d,%r13d
  imul   %edx,%r13d
  mov    %esi,%r15d
  sub    %edx,%r15d
  imul   %r15d,%r10d
  mov    %r8d,%r12d
  sub    %eax,%r12d
  mov    %r12d,%ecx
  imul   %r11d,%ecx
  mov    %ecx,%ebx
  imul   %edx,%ebx
  imul   %r15d,%ecx
  mov    %r9d,%r14d
  sub    %r11d,%r14d
  imul   %r14d,%eax
  mov    %eax,%r11d
  imul   %edx,%r11d
  imul   %r15d,%eax
  imul   %r14d,%r12d
  imul   %r12d,%edx
  cmp    %ebp,0x1c(%rsp)
  mov    0x28(%rsp),%r15
  cmove  %r15,%rdi
  movslq %r13d,%r13
  lea    (%r15,%r13,4),%r15
  movslq %r10d,%r10
  lea    (%r15,%r10,4),%r10
  mov    %r10,0x8(%rsp)
  movslq %ebx,%rbx
  lea    (%r10,%rbx,4),%rbx
  movslq %ecx,%rcx
  lea    (%rbx,%rcx,4),%r14
  movslq %r11d,%r11
  lea    (%r14,%r11,4),%r13
  cltq
  lea    0x0(%r13,%rax,4),%r12
  movslq %edx,%rdx
  lea    (%r12,%rdx,4),%rdx
  mov    %rdx,0x10(%rsp)
  cmp    %ebp,0x1c(%rsp)
  cmovg  (%rsp),%rdi
  test   %ebp,%ebp
  jne    L17
  sub    $0x8,%rsp
  push   $0x1
  push   %r9
  push   %r8
  push   %rsi
  push   0x28(%rsp)
  push   %rdi
  push   %r15
  mov    0x48(%rsp),%r9
  mov    %rbx,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    0x50(%rsp),%rdi
  mov    $0x0,%eax
  call   *0x98(%rsp)
  add    $0x40,%rsp
  jmp    L6
L120:
  mov    %rbx,0x28(%rsp)
  mov    0x1c(%rsp),%ebx
  movsbl 0x38(%rsp),%eax
  mov    0x3c(%rsp),%edx
  sub    %eax,%edx
  add    %edx,%ebx
  js     L44
  mov    (%rsp),%rbp
  jmp    L28
L21:
  sub    $0x8,%rsp
  push   $0x0
  push   %rcx
  push   %rdx
  push   %rax
  push   %rbp
  push   %rbp
  push   %r15
  mov    0x48(%rsp),%r9
  mov    0x68(%rsp),%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    0x50(%rsp),%rdi
  mov    $0x0,%eax
  call   *0x88(%rsp)
  add    $0x40,%rsp
  sub    $0x1,%ebx
  js     L44
L28:
  mov    0x20(%rsp),%eax
  mov    %ebx,%ecx
  sar    %cl,%eax
  add    $0x1,%eax
  mov    0x24(%rsp),%edx
  sar    %cl,%edx
  add    $0x1,%edx
  mov    0x30(%rsp),%esi
  sar    %cl,%esi
  mov    %esi,%ecx
  add    $0x1,%ecx
  test   %ebx,%ebx
  jne    L21
  sub    $0x8,%rsp
  push   $0x0
  push   %rcx
  push   %rdx
  push   %rax
  mov    0x28(%rsp),%rax
  push   %rax
  push   %rax
  push   %r15
  mov    0x48(%rsp),%r9
  mov    0x68(%rsp),%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    %r12,%rsi
  mov    0x50(%rsp),%rdi
  mov    $0x0,%eax
  call   *0x98(%rsp)
  add    $0x40,%rsp
L44:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  mov    $0x0,%eax
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L7:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int wavelet_adjoint3(float *reccovector, int colength, float *outvector, int Xlength, int Ylength, int Zlength, char Filterlength, char Levels, char Skip, char ifnotSilent) {
  float *vector = NULL;
  int scale, xlength, ylength, zlength, maxscale;
  int mxlength, mylength, mzlength;
  float *LLL = NULL, *LHH = NULL, *LLH = NULL, *LHL = NULL;
  float *HLL = NULL, *HHH = NULL, *HLH = NULL, *HHL = NULL;
  float *LLLv = NULL;
  int skipsize;
  int Size;
  int LLLsubsize;
  int LLHsubsize;
  int LHLsubsize;
  int LHHsubsize;
  int HLHsubsize;
  int HHLsubsize;
  int HHHsubsize;
  int HLLsubsize;
  int finalxlength, finalylength, finalzlength;
  int finalLLLsize;
  int ifnotallskip = 1;
  void (*adjbioD_3d)();
  void (*adjbioD_skip_3d)();
  void (*adjbioD_3d_char)();
  void (*adjbioD_skip_3d_char)();
  getadjointfilter(&adjbioD_3d, &adjbioD_skip_3d, &adjbioD_3d_char, &adjbioD_skip_3d_char, Filterlength, 7);
  Skip = (Skip < Levels ? Skip : Levels);
  Size = Xlength * Ylength * Zlength;
  xlength = 1 + ((Xlength - 1) >> Skip);
  ylength = 1 + ((Ylength - 1) >> Skip);
  zlength = 1 + ((Zlength - 1) >> Skip);
  skipsize = xlength * ylength * zlength;
  maxscale = Levels - 1;
  finalxlength = 1 + ((Xlength - 1) >> (maxscale + 1));
  finalylength = 1 + ((Ylength - 1) >> (maxscale + 1));
  finalzlength = 1 + ((Zlength - 1) >> (maxscale + 1));
  finalLLLsize = finalxlength * finalylength * finalzlength;
  if (Levels == 0)
    skipsize = Xlength * Ylength * Zlength;
  vector = outvector;
  if (maxscale < 0) {
    memcpy(outvector, reccovector, Size * sizeof(float));
    return 0;
  }
  scale = maxscale;
  LLLv = reccovector + skipsize;
  xlength = Xlength;
  ylength = Ylength;
  zlength = Zlength;
  LLLsubsize = zlength * ylength * xlength;
  while (scale >= Skip) {
    xlength = 1 + ((Xlength - 1) >> scale);
    ylength = 1 + ((Ylength - 1) >> scale);
    zlength = 1 + ((Zlength - 1) >> scale);
    mxlength = (xlength + 1) >> 1;
    mylength = (ylength + 1) >> 1;
    mzlength = (zlength + 1) >> 1;
    vector = outvector;
    LLLsubsize = mzlength * mylength * mxlength;
    LLHsubsize = mzlength * mylength * (xlength - mxlength);
    LHLsubsize = mzlength * (ylength - mylength) * mxlength;
    LHHsubsize = mzlength * (ylength - mylength) * (xlength - mxlength);
    HLLsubsize = (zlength - mzlength) * mylength * mxlength;
    HLHsubsize = (zlength - mzlength) * mylength * (xlength - mxlength);
    HHLsubsize = (zlength - mzlength) * (ylength - mylength) * mxlength;
    HHHsubsize = (zlength - mzlength) * (ylength - mylength) * (xlength - mxlength);
    if (scale == maxscale)
      LLL = reccovector;
    LLH = reccovector + LLLsubsize;
    LHL = LLH + LLHsubsize;
    LHH = LHL + LHLsubsize;
    HLL = LHH + LHHsubsize;
    HLH = HLL + HLLsubsize;
    HHL = HLH + HLHsubsize;
    HHH = HHL + HHLsubsize;
    ifnotallskip = (scale < Skip ? 0 : 1);
    if (scale < maxscale)
      LLL = outvector;
    zlength = 1 + ((Zlength - 1) >> scale);
    vector = outvector;
    if (scale == 0) {
      adjbioD_3d_char(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, outvector, xlength, ylength, zlength, ifnotallskip);
    } else {
      adjbioD_3d(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, vector, xlength, ylength, zlength, ifnotallskip);
    }
    LLL = vector;
    scale--;
  }
  LLL = outvector;
  while (scale >= 0) {
    ifnotallskip = 0;
    xlength = 1 + ((Xlength - 1) >> scale);
    ylength = 1 + ((Ylength - 1) >> scale);
    zlength = 1 + ((Zlength - 1) >> scale);
    if (scale == 0) {
      adjbioD_3d_char(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, outvector, xlength, ylength, zlength, ifnotallskip);
    } else {
      adjbioD_3d(HHH, HHL, HLH, HLL, LHH, LHL, LLH, LLL, vector, xlength, ylength, zlength, ifnotallskip);
    }
    LLL = vector;
    scale--;
  }
  return 0;
}
```