user: Converte this assembly snippet into its equivalent C code:

```asm
<deNoise>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  mov    %rcx,%rdx
  mov    %r8d,%ecx
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    (%rdx),%r13
  mov    0x90(%rsp),%eax
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x18(%rsp)
  mov    0xa0(%rsp),%r15
  mov    %eax,0x20(%rsp)
  mov    0x98(%rsp),%eax
  mov    %r9d,0x10(%rsp)
  mov    0xb0(%rsp),%r14
  mov    %eax,0x30(%rsp)
  mov    0xa8(%rsp),%rax
  mov    %rax,0x48(%rsp)
  test   %r13,%r13
  je     L12
L72:
  mov    (%r15),%esi
  test   %esi,%esi
  jne    L13
  mov    0x48(%rsp),%rax
  mov    (%rax),%edx
  test   %edx,%edx
  je     L58
L13:
  mov    (%r14),%eax
  test   %eax,%eax
  je     L54
  mov    0x8(%rsp),%rax
  movzwl 0x0(%r13),%edi
  mov    %r14,%rdx
  mov    %ecx,(%rsp)
  movzbl (%rax),%esi
  shl    $0x8,%edi
  movzwl %di,%edi
  shl    $0x10,%esi
  mov    %esi,(%r12)
  mov    %esi,0x28(%rsp)
  call   <LowPassMul@plt>
  mov    0x18(%rsp),%rbx
  mov    0x28(%rsp),%esi
  lea    0x1000007f(%rax),%edx
  add    $0x10007fff,%eax
  shr    $0x10,%eax
  shr    $0x8,%edx
  mov    %dx,0x0(%r13)
  mov    %al,(%rbx)
  movslq (%rsp),%rax
  mov    $0x1,%ebx
  cmp    $0x1,%eax
  mov    %rax,(%rsp)
  jle    L101
  mov    %rbx,%rbp
  mov    %esi,%ebx
  nopl   0x0(%rax,%rax,1)
L114:
  mov    0x8(%rsp),%rax
  movzwl %bx,%edi
  mov    %r15,%rdx
  movzbl (%rax,%rbp,1),%esi
  shl    $0x10,%esi
  call   <LowPassMul@plt>
  movzwl 0x0(%r13,%rbp,2),%edi
  mov    %r14,%rdx
  mov    %eax,(%r12,%rbp,4)
  mov    %eax,%esi
  mov    %eax,%ebx
  shl    $0x8,%edi
  movzwl %di,%edi
  call   <LowPassMul@plt>
  mov    0x18(%rsp),%rcx
  lea    0x1000007f(%rax),%edx
  add    $0x10007fff,%eax
  shr    $0x8,%edx
  shr    $0x10,%eax
  mov    %dx,0x0(%r13,%rbp,2)
  mov    %al,(%rcx,%rbp,1)
  add    $0x1,%rbp
  cmp    (%rsp),%rbp
  jne    L114
L101:
  movslq 0x10(%rsp),%rbx
  mov    %rbx,0x28(%rsp)
  cmp    $0x1,%ebx
  jle    L90
  movslq 0x20(%rsp),%rax
  mov    0x8(%rsp),%rbx
  movq   $0x1,0x20(%rsp)
  mov    0x18(%rsp),%rcx
  mov    %r15,0x18(%rsp)
  add    %rax,%rbx
  mov    %rax,0x40(%rsp)
  mov    (%rsp),%rax
  mov    %rbx,0x10(%rsp)
  add    %rax,%rax
  lea    0x0(%r13,%rax,1),%rbx
  mov    %rax,0x38(%rsp)
  movslq 0x30(%rsp),%rax
  mov    0x48(%rsp),%r13
  add    %rax,%rcx
  mov    %rax,0x30(%rsp)
  mov    %rcx,0x8(%rsp)
  nopl   0x0(%rax)
L23:
  mov    0x10(%rsp),%rax
  movzwl (%r12),%edi
  mov    %r13,%rdx
  mov    $0x1,%ebp
  movzbl (%rax),%r8d
  shl    $0x10,%r8d
  mov    %r8d,%esi
  mov    %r8d,%r15d
  call   <LowPassMul@plt>
  movzwl (%rbx),%edi
  mov    %r14,%rdx
  mov    %eax,(%r12)
  mov    %eax,%esi
  shl    $0x8,%edi
  movzwl %di,%edi
  call   <LowPassMul@plt>
  mov    0x8(%rsp),%rcx
  lea    0x1000007f(%rax),%edx
  add    $0x10007fff,%eax
  shr    $0x10,%eax
  shr    $0x8,%edx
  cmpq   $0x1,(%rsp)
  mov    %dx,(%rbx)
  mov    %al,(%rcx)
  mov    %rbp,%rax
  mov    %r15d,%ebp
  mov    %rax,%r15
  jle    L29
  nop
L61:
  mov    0x10(%rsp),%rax
  mov    0x18(%rsp),%rdx
  movzwl %bp,%edi
  movzbl (%rax,%r15,1),%esi
  shl    $0x10,%esi
  call   <LowPassMul@plt>
  movzwl (%r12,%r15,4),%edi
  mov    %r13,%rdx
  mov    %eax,%esi
  mov    %eax,%ebp
  call   <LowPassMul@plt>
  movzwl (%rbx,%r15,2),%edi
  mov    %r14,%rdx
  mov    %eax,(%r12,%r15,4)
  mov    %eax,%esi
  shl    $0x8,%edi
  movzwl %di,%edi
  call   <LowPassMul@plt>
  mov    0x8(%rsp),%rcx
  lea    0x1000007f(%rax),%edx
  add    $0x10007fff,%eax
  shr    $0x8,%edx
  shr    $0x10,%eax
  mov    %dx,(%rbx,%r15,2)
  mov    %al,(%rcx,%r15,1)
  add    $0x1,%r15
  cmp    (%rsp),%r15
  jne    L61
L29:
  mov    0x40(%rsp),%rdx
  addq   $0x1,0x20(%rsp)
  add    %rdx,0x10(%rsp)
  mov    0x20(%rsp),%rax
  mov    0x30(%rsp),%rdx
  add    0x38(%rsp),%rbx
  add    %rdx,0x8(%rsp)
  cmp    0x28(%rsp),%rax
  jne    L23
L90:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L54:
  mov    0x48(%rsp),%rax
  mov    %r15,0x98(%rsp)
  mov    %r12,%rdx
  mov    0x20(%rsp),%r9d
  mov    0x10(%rsp),%r8d
  mov    %rax,0xa0(%rsp)
  mov    0x30(%rsp),%eax
  mov    0x18(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  mov    %eax,0x90(%rsp)
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <deNoiseSpacial@plt>
L58:
  mov    0x30(%rsp),%eax
  mov    %r14,0x98(%rsp)
  mov    %r13,%rdx
  mov    0x20(%rsp),%r9d
  mov    0x10(%rsp),%r8d
  mov    %eax,0x90(%rsp)
  mov    0x18(%rsp),%rsi
  mov    0x8(%rsp),%rdi
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <deNoiseTemporal@plt>
L12:
  mov    %r9d,%edi
  mov    %rdx,0x28(%rsp)
  mov    %r9d,%ebp
  imul   %r8d,%edi
  mov    %r8d,(%rsp)
  add    %edi,%edi
  call   <malloc@plt>
  mov    0x28(%rsp),%rdx
  mov    (%rsp),%ecx
  mov    %rax,%rbx
  mov    %rax,%r13
  mov    %rax,(%rdx)
  movslq %ebp,%rax
  test   %rax,%rax
  jle    L72
  mov    0x8(%rsp),%rdx
  mov    %rbx,(%rsp)
  movslq %ecx,%rbp
  xor    %r10d,%r10d
  movslq 0x20(%rsp),%r11
  mov    %r12,0x28(%rsp)
  xor    %r9d,%r9d
  xor    %r8d,%r8d
  lea    0x0(%rbp,%rdx,1),%rdi
  mov    %rdx,%r13
  mov    %rax,%r12
  nopl   0x0(%rax,%rax,1)
L117:
  lea    0x0(%r13,%r9,1),%rax
  lea    (%rbx,%r10,2),%rsi
  test   %ecx,%ecx
  jle    L123
  nopl   (%rax)
L18:
  movzbl (%rax),%edx
  add    $0x1,%rax
  add    $0x2,%rsi
  shl    $0x8,%edx
  mov    %dx,-0x2(%rsi)
  cmp    %rax,%rdi
  jne    L18
L123:
  add    $0x1,%r8
  add    %r11,%r9
  add    %rbp,%r10
  add    %r11,%rdi
  cmp    %r12,%r8
  jne    L117
  mov    (%rsp),%r13
  mov    0x28(%rsp),%r12
  jmp    L72
```

assistant: ```c
void deNoise(unsigned char *Frame, unsigned char *FrameDest, unsigned int *LineAnt, unsigned short **FrameAntPtr, int W, int H, int sStride, int dStride, int *Horizontal, int *Vertical, int *Temporal) {
  long X, Y;
  long sLineOffs = 0, dLineOffs = 0;
  unsigned int PixelAnt;
  unsigned int PixelDst;
  unsigned short *FrameAnt = (*FrameAntPtr);
  if (!FrameAnt) {
    (*FrameAntPtr) = FrameAnt = (unsigned short *)malloc(W * H * sizeof(unsigned short));
    for (Y = 0; Y < H; Y++) {
      unsigned short *dst = &FrameAnt[Y * W];
      unsigned char *src = Frame + Y * sStride;
      for (X = 0; X < W; X++)
        dst[X] = src[X] << 8;
    }
  }
  if (!Horizontal[0] && !Vertical[0]) {
    deNoiseTemporal(Frame, FrameDest, FrameAnt, W, H, sStride, dStride, Temporal);
    return;
  }
  if (!Temporal[0]) {
    deNoiseSpacial(Frame, FrameDest, LineAnt, W, H, sStride, dStride, Horizontal, Vertical);
    return;
  }
  LineAnt[0] = PixelAnt = Frame[0] << 16;
  PixelDst = LowPassMul(FrameAnt[0] << 8, PixelAnt, Temporal);
  FrameAnt[0] = ((PixelDst + 0x1000007F) >> 8);
  FrameDest[0] = ((PixelDst + 0x10007FFF) >> 16);
  for (X = 1; X < W; X++) {
    LineAnt[X] = PixelAnt = LowPassMul(PixelAnt, Frame[X] << 16, Horizontal);
    PixelDst = LowPassMul(FrameAnt[X] << 8, PixelAnt, Temporal);
    FrameAnt[X] = ((PixelDst + 0x1000007F) >> 8);
    FrameDest[X] = ((PixelDst + 0x10007FFF) >> 16);
  }
  for (Y = 1; Y < H; Y++) {
    unsigned int PixelAnt;
    unsigned short *LinePrev = &FrameAnt[Y * W];
    sLineOffs += sStride, dLineOffs += dStride;
    PixelAnt = Frame[sLineOffs] << 16;
    LineAnt[0] = LowPassMul(LineAnt[0], PixelAnt, Vertical);
    PixelDst = LowPassMul(LinePrev[0] << 8, LineAnt[0], Temporal);
    LinePrev[0] = ((PixelDst + 0x1000007F) >> 8);
    FrameDest[dLineOffs] = ((PixelDst + 0x10007FFF) >> 16);
    for (X = 1; X < W; X++) {
      unsigned int PixelDst;
      PixelAnt = LowPassMul(PixelAnt, Frame[sLineOffs + X] << 16, Horizontal);
      LineAnt[X] = LowPassMul(LineAnt[X], PixelAnt, Vertical);
      PixelDst = LowPassMul(LinePrev[X] << 8, LineAnt[X], Temporal);
      LinePrev[X] = ((PixelDst + 0x1000007F) >> 8);
      FrameDest[dLineOffs + X] = ((PixelDst + 0x10007FFF) >> 16);
    }
  }
}
```