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

```asm
<fwt53>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r15
  mov    %edx,%ebx
  mov    %ecx,%r13d
  mov    %edx,%r14d
  imul   %ecx,%r14d
  shl    $0x3,%r14d
  mov    %r14d,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %r14d,%edx
  mov    %r15,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  test   %r13d,%r13d
  jle    L131
  movslq %ebx,%rsi
  lea    0x0(,%rsi,8),%r14
  lea    -0x3(%rbx),%r10d
  shr    %r10d
  mov    %r10d,%r10d
  add    %r10,%r10
  mov    %rbp,%rcx
  mov    $0x0,%r8d
  mov    $0x0,%r9d
  lea    0x10(%rbp),%r11
  movsd  D27(%rip),%xmm2
  movsd  D17(%rip),%xmm1
  movsd  D23(%rip),%xmm3
  jmp    L71
L92:
  mov    %edx,%r9d
L71:
  cmp    $0x2,%ebx
  jle    L132
  lea    (%r10,%r8,1),%rax
  lea    (%r11,%rax,8),%rdx
  mov    %rcx,%rax
L11:
  movsd  (%rax),%xmm0
  addsd  0x10(%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  0x8(%rax),%xmm0
  movsd  %xmm0,0x8(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L11
L132:
  mov    %rcx,%rdi
  movsd  -0x8(%rcx,%rsi,8),%xmm0
  subsd  -0x10(%rcx,%rsi,8),%xmm0
  movsd  %xmm0,-0x8(%rcx,%rsi,8)
  cmp    $0x2,%ebx
  jle    L42
  lea    (%r10,%r8,1),%rax
  lea    (%r11,%rax,8),%rdx
  mov    %rcx,%rax
L114:
  movsd  0x8(%rax),%xmm0
  addsd  0x18(%rax),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  0x10(%rax),%xmm0
  movsd  %xmm0,0x10(%rax)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L114
L42:
  movapd %xmm3,%xmm0
  mulsd  0x8(%rdi),%xmm0
  addsd  (%rdi),%xmm0
  movsd  %xmm0,(%rdi)
  lea    0x1(%r9),%edx
  add    %r14,%rcx
  add    %rsi,%r8
  cmp    %edx,%r13d
  jne    L92
  mov    %ebx,%r8d
  shr    $0x1f,%r8d
  add    %ebx,%r8d
  sar    %r8d
  mov    $0x0,%r10d
  mov    $0x0,%edi
  movsd  D0(%rip),%xmm2
  movsd  D28(%rip),%xmm1
  jmp    L106
L77:
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  add    %r8d,%eax
  imul   %edx,%eax
  add    %edi,%eax
  cltq
  movslq %esi,%r11
  movapd %xmm2,%xmm0
  mulsd  0x0(%rbp,%r11,8),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
L46:
  add    $0x1,%ecx
  add    $0x1,%esi
  cmp    %ecx,%ebx
  je     L56
L53:
  test   $0x1,%cl
  jne    L77
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  imul   %edx,%eax
  add    %edi,%eax
  cltq
  movslq %esi,%r11
  movapd %xmm1,%xmm0
  mulsd  0x0(%rbp,%r11,8),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
  jmp    L46
L56:
  lea    0x1(%rdi),%eax
  add    %ebx,%r10d
  cmp    %edi,%r9d
  je     L131
  mov    %eax,%edi
L106:
  test   %ebx,%ebx
  jle    L56
  mov    %r10d,%esi
  mov    $0x0,%ecx
  jmp    L53
L131:
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D27
type_guessed: byte[8]
name: extract_symbolic_data
arguments: tag: D17
type_guessed: f64
name: extract_symbolic_data
arguments: tag: D23
type_guessed: f64
name: extract_symbolic_data
arguments: tag: D0
type_guessed: byte[8]
name: extract_symbolic_data
arguments: tag: D28
type_guessed: byte[8]

tool: {"D27": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf]}

tool: D17: 0.25

tool: D23: 0.5

tool: {"D0": [0xcd,0x3b,0x7f,0x66,0x9e,0xa0,0xe6,0x3f]}

tool: {"D28": [0xcd,0x3b,0x7f,0x66,0x9e,0xa0,0xf6,0x3f]}

assistant: ```c
void fwt53(double *wav, const double *x, const int nx, const int ny) {
  const double a0 = -0.5;
  const double a1 = 0.25;
  const double s0 = sqrt(2.0);
  const double s1 = sqrt(2.0) * 0.5;
  register int i, j, off;
  double *tempx = malloc(nx * ny * sizeof(double));
  memcpy(tempx, x, nx * ny * sizeof(double));
  for (j = 0; j < ny; ++j) {
    off = nx * j;
    for (i = 1; i < nx - 1; i += 2) {
      tempx[off + i] += a0 * (tempx[off + i - 1] + tempx[off + i + 1]);
    }
    tempx[off + nx - 1] += 2 * a0 * tempx[off + nx - 2];
    for (i = 2; i < nx; i += 2) {
      tempx[off + i] += a1 * (tempx[off + i - 1] + tempx[off + i + 1]);
    }
    tempx[off] += 2 * a1 * tempx[off + 1];
  }
  for (j = 0; j < ny; ++j) {
    off = nx * j;
    for (i = 0; i < nx; ++i) {
      if (i % 2 == 0)
        wav[(i / 2) * ny + j] = s0 * tempx[off + i];
      else
        wav[(nx / 2 + i / 2) * ny + j] = s1 * tempx[off + i];
    }
  }
  free(tempx);
}
```