user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<iswt2_input4_step>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  push   %r14
  imul   %r9d,%r15d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x58,%rsp
  mov    0x90(%rsp),%rdx
  mov    0xc0(%rsp),%r12d
  mov    %rsi,0x38(%rsp)
  mov    0xb0(%rsp),%rdi
  mov    %rcx,0x48(%rsp)
  mov    %rdx,0x40(%rsp)
  mov    0x98(%rsp),%edx
  mov    %r12d,0x4(%rsp)
  lea    0x0(,%r15,8),%r12d
  mov    %edx,0x1c(%rsp)
  mov    0xa0(%rsp),%edx
  mov    %rdi,0x28(%rsp)
  mov    %r12d,%edi
  mov    %edx,0x30(%rsp)
  mov    0xa8(%rsp),%rdx
  mov    %r8d,0x18(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    0xb8(%rsp),%edx
  mov    %r9d,0x10(%rsp)
  mov    %edx,0x34(%rsp)
  call   <malloc@plt>
  mov    %r12d,%edi
  mov    %rax,%r14
  call   <malloc@plt>
  mov    0x4(%rsp),%r12d
  mov    %r15d,%ecx
  mov    %r14,%rdx
  mov    %r15d,%esi
  mov    %rax,0x8(%rsp)
  lea    -0x1(%r12),%r8d
  mov    %r8d,0x14(%rsp)
  imul   %ebp,%r8d
  imul   0x10(%rsp),%r8d
  movslq %r8d,%r8
  lea    0x0(,%r8,8),%rbp
  lea    (%rbx,%rbp,1),%rdi
  call   <verbatim_copy@plt>
  test   %r12d,%r12d
  jle    L5
  mov    0x38(%rsp),%rax
  mov    %r15d,%r12d
  add    %rbp,%r13
  xor    %ebx,%ebx
  neg    %r12d
  mov    %r15d,0x38(%rsp)
  add    %rbp,%rax
  movslq %r12d,%r12
  add    0x48(%rsp),%rbp
  lea    0x0(,%r12,8),%rdi
  mov    %rax,%r15
  mov    %r13,%rax
  mov    %r14,%r13
  mov    %rdi,%r12
  mov    %ebx,%r14d
  mov    %rax,%rbx
  nopl   0x0(%rax)
L29:
  sub    $0x8,%rsp
  mov    %rbp,%rcx
  mov    %rbx,%rdx
  mov    %r15,%rsi
  mov    0xc(%rsp),%eax
  mov    %r13,%rdi
  sub    %r14d,%eax
  push   %rax
  mov    0x44(%rsp),%eax
  push   %rax
  push   0x40(%rsp)
  push   0x40(%rsp)
  mov    0x58(%rsp),%eax
  push   %rax
  mov    0x4c(%rsp),%eax
  push   %rax
  push   0x40(%rsp)
  mov    0x50(%rsp),%r9d
  mov    0x58(%rsp),%r8d
  call   <iswt2@plt>
  add    $0x40,%rsp
  cmp    %r14d,0x14(%rsp)
  je     L17
  mov    0x38(%rsp),%ecx
  mov    0x8(%rsp),%rdi
  mov    %r13,%rdx
  mov    %ecx,%esi
  call   <verbatim_copy@plt>
L17:
  add    $0x1,%r14d
  add    %r12,%r15
  add    %r12,%rbx
  add    %r12,%rbp
  cmp    %r14d,0x4(%rsp)
  jne    L29
  mov    0x38(%rsp),%r15d
  mov    %r13,%r14
L5:
  mov    %r14,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rbx
  mov    %r15d,%ecx
  mov    %r15d,%esi
  mov    0x40(%rsp),%rdx
  mov    %rbx,%rdi
  call   <verbatim_copy@plt>
  add    $0x58,%rsp
  mov    %rbx,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
```

assistant: ```c
void iswt2_input4_step(double *matrixInApprox, double *matrixInColDetail, double *matrixInRowDetail, double *matrixInDetail, int matrixInRow, int matrixInCol, double *matrixOut, int matrixOutRow, int matrixOutCol, double *filterLow, double *filterHi, int filterLength, int step) {
  int count;
  double *matrixApproxTemp, *matrixApproxOut;
  matrixApproxTemp = malloc(matrixInRow * matrixInCol * sizeof(double));
  matrixApproxOut = malloc(matrixInRow * matrixInCol * sizeof(double));
  verbatim_copy(matrixInApprox + (step - 1) * matrixInRow * matrixInCol, matrixInRow * matrixInCol, matrixApproxTemp, matrixInRow * matrixInCol);
  for (count = 0; count < step; count++) {
    iswt2(matrixApproxTemp, matrixInColDetail + (step - count - 1) * matrixInRow * matrixInCol, matrixInRowDetail + (step - count - 1) * matrixInRow * matrixInCol, matrixInDetail + (step - count - 1) * matrixInRow * matrixInCol, matrixInRow, matrixInCol, matrixApproxOut, matrixOutRow, matrixOutCol, filterLow, filterHi, filterLength, step - count);
    if (count != (step - 1)) {
      verbatim_copy(matrixApproxOut, matrixInRow * matrixInCol, matrixApproxTemp, matrixInRow * matrixInCol);
    }
  }
  free(matrixApproxTemp);
  verbatim_copy(matrixApproxOut, matrixInRow * matrixInCol, matrixOut, matrixInRow * matrixInCol);
  free(matrixApproxOut);
  return;
}
```