user: What is the c source code of the assembly code below:

```asm
<dwt_decode_53>:
  endbr64
  push   %r12
  mov    %rdi,%rax
  mov    %edx,%edi
  push   %rbp
  push   %rbx
  test   %ecx,%ecx
  jne    L348
  mov    %ecx,%r8d
  test   %esi,%esi
  jg     L591
  cmp    $0x1,%edx
  jle    L47
L591:
  test   %edi,%edi
  jle    L270
  lea    -0x1(%rsi,%rsi,1),%edx
  movslq %edx,%rdx
  lea    (%rax,%rdx,4),%r11
  test   %esi,%esi
  jle    L222
  cmp    %esi,%edi
  mov    %esi,%r12d
  mov    %rax,%rdx
  mov    $0x1,%ebx
  cmovle %edi,%r12d
  xor    %ecx,%ecx
  jmp    L469
  nopl   (%rax)
L463:
  cmp    %ecx,%esi
  jl     L559
  mov    -0x4(%rdx),%ebp
L48:
  mov    %ebx,%r10d
  mov    (%rax,%r10,4),%r10d
L415:
  lea    0x2(%rbp,%r10,1),%r10d
  add    $0x1,%ecx
  add    $0x8,%rdx
  add    $0x2,%ebx
  sar    $0x2,%r10d
  sub    %r10d,%r9d
  mov    %r9d,-0x8(%rdx)
  cmp    %r12d,%ecx
  jge    L96
L469:
  mov    (%rdx),%r9d
  test   %ecx,%ecx
  jne    L463
  mov    0x4(%rax),%ebp
  jmp    L48
  nopl   0x0(%rax)
L348:
  test   %edx,%edx
  jne    L605
  cmp    $0x1,%esi
  jne    L605
  mov    (%rax),%ecx
  mov    %ecx,%edx
  shr    $0x1f,%edx
  add    %ecx,%edx
  sar    %edx
  mov    %edx,(%rax)
L47:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L605:
  test   %edi,%edi
  jle    L173
  lea    -0x2(%rsi,%rsi,1),%edx
  movslq %edx,%rdx
  lea    (%rax,%rdx,4),%r9
  test   %esi,%esi
  jle    L236
  cmp    %esi,%edi
  mov    %esi,%r11d
  lea    0x4(%rax),%r8
  cmovle %edi,%r11d
  xor    %edx,%edx
  jmp    L172
  nopl   0x0(%rax)
L438:
  add    (%r9),%ecx
L52:
  add    $0x2,%ecx
  add    $0x8,%r8
  sar    $0x2,%ecx
  sub    %ecx,%r10d
  mov    %r10d,-0x8(%r8)
  cmp    %r11d,%edx
  jge    L425
L172:
  add    $0x1,%edx
  mov    (%r8),%r10d
  mov    -0x4(%r8),%ecx
  cmp    %esi,%edx
  jge    L438
  lea    (%rdx,%rdx,1),%ebx
  movslq %ebx,%rbx
  add    (%rax,%rbx,4),%ecx
  jmp    L52
  cs nopw 0x0(%rax,%rax,1)
L559:
  mov    (%r11),%r10d
  mov    %r10d,%ebp
  jmp    L415
  nopl   0x0(%rax,%rax,1)
L222:
  xor    %ecx,%ecx
L235:
  movslq %ecx,%rdx
  lea    -0x1(%rcx,%rcx,1),%r10d
  jmp    L67
  nopl   0x0(%rax)
L3:
  cmp    %esi,%edx
  jle    L555
  mov    (%r11),%r9d
  mov    %r9d,%ebx
L232:
  lea    0x2(%rbx,%r9,1),%r9d
  add    $0x2,%r10d
  sar    $0x2,%r9d
  sub    %r9d,%ecx
  mov    %ecx,(%rax,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,%edi
  jle    L100
L67:
  mov    (%rax,%rdx,8),%ecx
  test   %edx,%edx
  jne    L3
  mov    0x4(%rax),%ebx
  mov    (%r11),%r9d
  jmp    L232
  nopl   0x0(%rax,%rax,1)
L555:
  movslq %r10d,%r9
  mov    (%rax,%r9,4),%ebx
  mov    (%r11),%r9d
  jmp    L232
  nopl   0x0(%rax)
L96:
  cmp    %ecx,%edi
  jg     L235
L178:
  lea    -0x2(%rdi,%rdi,1),%edx
  cmp    %esi,%edi
  lea    0x4(%rax),%r9
  mov    %esi,%r11d
  movslq %edx,%rdx
  cmovle %edi,%r11d
  lea    (%rax,%rdx,4),%rcx
  jmp    L405
  xchg   %ax,%ax
L600:
  add    (%rcx),%edx
L419:
  sar    %edx
  add    $0x8,%r9
  add    %r10d,%edx
  mov    %edx,-0x8(%r9)
  cmp    %r11d,%r8d
  jge    L374
L405:
  add    $0x1,%r8d
  mov    (%r9),%r10d
  mov    -0x4(%r9),%edx
  cmp    %edi,%r8d
  jge    L600
  lea    (%r8,%r8,1),%ebx
  movslq %ebx,%rbx
  add    (%rax,%rbx,4),%edx
  jmp    L419
L374:
  cmp    %esi,%r8d
  jge    L47
L455:
  add    $0x1,%r8d
  movslq %r8d,%r8
  jmp    L440
  nopw   0x0(%rax,%rax,1)
L371:
  add    %edx,%edx
L530:
  sar    %edx
  add    %r9d,%edx
  mov    %edx,-0x4(%rax,%r8,8)
  add    $0x1,%r8
  lea    -0x1(%r8),%edx
  cmp    %edx,%esi
  jle    L47
L440:
  mov    -0x4(%rax,%r8,8),%r9d
  mov    (%rcx),%edx
  cmp    %r8d,%edi
  jle    L371
  lea    (%r8,%r8,1),%r10d
  movslq %r10d,%r10
  add    (%rax,%r10,4),%edx
  jmp    L530
  nopl   (%rax)
L236:
  xor    %edx,%edx
L288:
  add    $0x1,%edx
  movslq %edx,%rdx
  nopl   0x0(%rax,%rax,1)
L175:
  mov    -0x4(%rax,%rdx,8),%r8d
  mov    (%r9),%ecx
  cmp    %edx,%esi
  jg     L474
  lea    0x2(%rcx,%rcx,1),%ecx
  sar    $0x2,%ecx
  sub    %ecx,%r8d
  mov    %r8d,-0x4(%rax,%rdx,8)
  add    $0x1,%rdx
  lea    -0x1(%rdx),%ecx
  cmp    %ecx,%edi
  jg     L175
  test   %esi,%esi
  jle    L47
L204:
  lea    -0x1(%rdi,%rdi,1),%edx
  cmp    %esi,%edi
  mov    %esi,%ebx
  mov    %rax,%rcx
  movslq %edx,%rdx
  cmovle %edi,%ebx
  xor    %r8d,%r8d
  lea    (%rax,%rdx,4),%r9
  jmp    L507
  nopl   0x0(%rax,%rax,1)
L609:
  cmp    %r8d,%edi
  jge    L312
  mov    (%r9),%edx
L280:
  add    %r11d,%edx
  add    $0x1,%r8d
  add    $0x8,%rcx
  sar    %edx
  add    %r10d,%edx
  mov    %edx,-0x8(%rcx)
  cmp    %r8d,%ebx
  jle    L596
L507:
  mov    (%rcx),%r10d
  mov    0x4(%rcx),%r11d
  test   %r8d,%r8d
  jne    L609
  mov    0x4(%rax),%edx
  jmp    L280
  nopl   0x0(%rax)
L474:
  lea    (%rdx,%rdx,1),%r10d
  movslq %r10d,%r10
  add    (%rax,%r10,4),%ecx
  add    $0x2,%ecx
  sar    $0x2,%ecx
  sub    %ecx,%r8d
  mov    %r8d,-0x4(%rax,%rdx,8)
  add    $0x1,%rdx
  lea    -0x1(%rdx),%ecx
  cmp    %edi,%ecx
  jl     L175
  test   %esi,%esi
  jg     L204
  jmp    L47
  nopl   (%rax)
L425:
  cmp    %edi,%edx
  jl     L288
  jmp    L204
  nopl   (%rax)
L312:
  mov    -0x4(%rcx),%edx
  jmp    L280
  nopl   (%rax)
L596:
  cmp    %r8d,%esi
  jle    L47
L330:
  movslq %r8d,%rcx
  lea    -0x1(%r8,%r8,1),%r10d
  jmp    L58
  nopl   0x0(%rax,%rax,1)
L106:
  mov    %r8d,%edx
  cmp    %ecx,%edi
  jl     L252
  movslq %r10d,%rdx
  mov    (%rax,%rdx,4),%edx
L252:
  add    %r8d,%edx
  add    $0x2,%r10d
  sar    %edx
  add    %r11d,%edx
  mov    %edx,(%rax,%rcx,8)
  add    $0x1,%rcx
  cmp    %ecx,%esi
  jle    L47
L58:
  mov    (%rax,%rcx,8),%r11d
  mov    (%r9),%r8d
  test   %ecx,%ecx
  jne    L106
  mov    0x4(%rax),%edx
  jmp    L252
  nopl   0x0(%rax,%rax,1)
L100:
  test   %esi,%esi
  jg     L178
  jmp    L47
  nopl   (%rax)
L270:
  test   %esi,%esi
  jle    L47
  lea    -0x2(%rdi,%rdi,1),%edx
  movslq %edx,%rdx
  lea    (%rax,%rdx,4),%rcx
  jmp    L455
  nopl   0x0(%rax,%rax,1)
L173:
  test   %esi,%esi
  jle    L47
  lea    -0x1(%rdi,%rdi,1),%edx
  xor    %r8d,%r8d
  movslq %edx,%rdx
  lea    (%rax,%rdx,4),%r9
  jmp    L330
```

assistant: ```c
void dwt_decode_53(int *a, int dn, int sn, int cas) {
  int i;
  if (!cas) {
    if ((dn > 0) || (sn > 1)) {
      for (i = 0; i < sn; i++) {
        a[(i)*2] -= (((i - 1) < 0 ? a[(1 + (0) * 2)] : ((i - 1) >= dn ? a[(1 + (dn - 1) * 2)] : a[(1 + (i - 1) * 2)])) + ((i) < 0 ? a[(1 + (0) * 2)] : ((i) >= dn ? a[(1 + (dn - 1) * 2)] : a[(1 + (i)*2)])) + 2) >> 2;
      }
      for (i = 0; i < dn; i++) {
        a[(1 + (i)*2)] += (((i) < 0 ? a[(0) * 2] : ((i) >= sn ? a[(sn - 1) * 2] : a[(i)*2])) + ((i + 1) < 0 ? a[(0) * 2] : ((i + 1) >= sn ? a[(sn - 1) * 2] : a[(i + 1) * 2]))) >> 1;
      }
    }
  } else {
    if (!sn && dn == 1) {
      a[(0) * 2] /= 2;
    } else {
      for (i = 0; i < sn; i++) {
        a[(1 + (i)*2)] -= (((i) < 0 ? a[(0) * 2] : ((i) >= dn ? a[(dn - 1) * 2] : a[(i)*2])) + ((i + 1) < 0 ? a[(0) * 2] : ((i + 1) >= dn ? a[(dn - 1) * 2] : a[(i + 1) * 2])) + 2) >> 2;
      }
      for (i = 0; i < dn; i++) {
        a[(i)*2] += (((i) < 0 ? a[(1 + (0) * 2)] : ((i) >= sn ? a[(1 + (sn - 1) * 2)] : a[(1 + (i)*2)])) + ((i - 1) < 0 ? a[(1 + (0) * 2)] : ((i - 1) >= sn ? a[(1 + (sn - 1) * 2)] : a[(1 + (i - 1) * 2)]))) >> 1;
      }
    }
  }
}
```