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

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x3,%esi
  mov    $0x1,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%r13
  movq   $0xffffffffffffffe9,0x20(%rsp)
  call   <lvector@plt>
  mov    $0x400,%esi
  mov    $0x1,%edi
  mov    %rax,%r15
  call   <vector@plt>
  mov    $0x400,%esi
  mov    $0x1,%edi
  mov    %rax,%r12
  call   <vector@plt>
  movdqa D56(%rip),%xmm0
  mov    $0x10,%edx
  movq   $0x10,0x18(%r15)
  movq   $0x0,0x18(%rsp)
  mov    %rax,%rbp
  mov    $0x8,%eax
  movups %xmm0,0x8(%r15)
  xchg   %ax,%ax
L78:
  test   %rax,%rax
  je     L56
  movq   $0x1,0x10(%rsp)
  mov    0x8(%r15),%rsi
  cs nopw 0x0(%rax,%rax,1)
L5:
  test   %rsi,%rsi
  je     L42
  mov    $0x1,%r14d
  nop
L41:
  imul   0x18(%rsp),%rax
  mov    0x10(%rsp),%rdi
  lea    -0x1(%rdi,%rax,1),%rdx
  mov    %r13,%rdi
  imul   %rsi,%rdx
  add    %r14,%rdx
  add    $0x1,%r14
  lea    (%rdx,%rdx,1),%rbx
  mov    %rdx,0x8(%rsp)
  call   <ran1@plt>
  pxor   %xmm0,%xmm0
  sub    $0x1,%rbx
  mov    %r13,%rdi
  lea    -0x1(%rax,%rax,1),%eax
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,(%r12,%rbx,4)
  movss  %xmm0,0x0(%rbp,%rbx,4)
  call   <ran1@plt>
  pxor   %xmm0,%xmm0
  mov    0x8(%rsp),%rdx
  mov    0x8(%r15),%rsi
  lea    -0x1(%rax,%rax,1),%eax
  cvtsi2ss %eax,%xmm0
  mov    0x10(%r15),%rax
  movss  %xmm0,(%r12,%rdx,8)
  movss  %xmm0,0x0(%rbp,%rdx,8)
  cmp    %r14,%rsi
  jae    L41
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rcx
  cmp    %rax,%rcx
  jbe    L5
L2:
  mov    0x18(%r15),%rdx
L56:
  mov    0x18(%rsp),%rsi
  lea    0x1(%rsi),%rcx
  add    $0x2,%rsi
  cmp    %rdx,%rsi
  ja     L86
  mov    %rcx,0x18(%rsp)
  jmp    L78
  xchg   %ax,%ax
L42:
  mov    0x10(%rsp),%r14
  nopl   (%rax)
L3:
  add    $0x1,%r14
  cmp    %rax,%r14
  jbe    L3
  jmp    L2
L86:
  mov    $0x1,%ecx
  mov    $0x3,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  call   <fourn@plt>
  mov    $0xffffffff,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  mov    $0x3,%edx
  mov    $0x1,%ebx
  lea    D97(%rip),%r13
  call   <fourn@plt>
  lea    D32(%rip),%rdi
  call   <puts@plt>
  lea    D64(%rip),%rcx
  xor    %eax,%eax
  lea    D4(%rip),%rdx
  lea    D101(%rip),%rsi
  lea    D90(%rip),%rdi
  call   <printf@plt>
  sub    $0x8,%rsp
  xor    %eax,%eax
  lea    D16(%rip),%rdx
  push   %rdx
  lea    D20(%rip),%r9
  mov    %rdx,%r8
  lea    D78(%rip),%rdi
  mov    %r9,%rsi
  mov    %r9,%rcx
  call   <printf@plt>
  pop    %rax
  pop    %rdx
L74:
  lea    -0x1(%rbx),%rax
  mov    %r13,%rdi
  imul   0x10(%r15),%rax
  lea    -0x1(%rax,%rbx,2),%rax
  imul   0x8(%r15),%rax
  lea    (%rax,%rbx,4),%rax
  add    $0x1,%rbx
  movss  0x0(%rbp,%rax,8),%xmm1
  movss  (%r12,%rax,8),%xmm3
  lea    -0x1(%rax,%rax,1),%rax
  movss  0x0(%rbp,%rax,4),%xmm0
  movss  (%r12,%rax,4),%xmm2
  mov    $0x6,%eax
  movaps %xmm1,%xmm5
  cvtss2sd %xmm1,%xmm1
  divss  %xmm3,%xmm5
  movaps %xmm0,%xmm4
  cvtss2sd %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm0
  divss  %xmm2,%xmm4
  cvtss2sd %xmm2,%xmm2
  cvtss2sd %xmm5,%xmm5
  cvtss2sd %xmm4,%xmm4
  call   <printf@plt>
  cmp    $0x5,%rbx
  jne    L74
  mov    0x8(%r15),%rsi
  imul   0x10(%r15),%rsi
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  imul   0x18(%r15),%rsi
  call   <printf@plt>
  mov    $0x400,%edx
  mov    $0x1,%esi
  mov    %rbp,%rdi
  call   <free_vector@plt>
  mov    $0x400,%edx
  mov    $0x1,%esi
  mov    %r12,%rdi
  call   <free_vector@plt>
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  call   <free_lvector@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L46:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D56
data_type: byte[16]
name: unpack_data
arguments: label: D97
data_type: string
name: unpack_data
arguments: label: D32
data_type: string
name: unpack_data
arguments: label: D64
data_type: string
name: unpack_data
arguments: label: D4
data_type: string
name: unpack_data
arguments: label: D101
data_type: string
name: unpack_data
arguments: label: D90
data_type: string
name: unpack_data
arguments: label: D16
data_type: string
name: unpack_data
arguments: label: D20
data_type: string
name: unpack_data
arguments: label: D78
data_type: string
name: unpack_data
arguments: label: D28
data_type: string

tool: {"D56": [0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D97: %12.2f %12.2f %10.2f %12.2f %14.2f %12.2f


tool: D32: Double 3-dimensional transform


tool: D64: Ratio

tool: D4: Original data

tool: D101: Double transf.

tool: D90: %22s %24s %20s


tool: D16: imag.

tool: D20: real

tool: D78: %10s %13s %12s %13s %11s %13s



tool: D28: 
The product of transform lengths is: %4lu


assistant: ```c
int main(void) {
  int isign;
  long idum = (-23);
  unsigned long i, j, k, l, ndum = 2, *nn;
  float *data1, *data2;
  nn = lvector(1, 3);
  data1 = vector(1, 1024);
  data2 = vector(1, 1024);
  for (i = 1; i <= 3; i++)
    nn[i] = (ndum <<= 1);
  for (i = 1; i <= nn[3]; i++)
    for (j = 1; j <= nn[2]; j++)
      for (k = 1; k <= nn[1]; k++) {
        l = k + (j - 1) * nn[1] + (i - 1) * nn[2] * nn[1];
        l = (l << 1) - 1;
        data2[l] = data1[l] = 2 * ran1(&idum) - 1;
        l++;
        data2[l] = data1[l] = 2 * ran1(&idum) - 1;
      }
  isign = 1;
  fourn(data2, nn, 3, isign);
  isign = -1;
  fourn(data2, nn, 3, isign);
  printf("Double 3-dimensional transform\n\n");
  printf("%22s %24s %20s\n", "Double transf.", "Original data", "Ratio");
  printf("%10s %13s %12s %13s %11s %13s\n\n", "real", "imag.", "real", "imag.", "real", "imag.");
  for (i = 1; i <= 4; i++) {
    k = 2 * (j = 2 * i);
    l = k + (j - 1) * nn[1] + (i - 1) * nn[2] * nn[1];
    l = (l << 1) - 1;
    printf("%12.2f %12.2f %10.2f %12.2f %14.2f %12.2f\n", data2[l], data2[l + 1], data1[l], data1[l + 1], data2[l] / data1[l], data2[l + 1] / data1[l + 1]);
  }
  printf("\nThe product of transform lengths is: %4lu\n", nn[1] * nn[2] * nn[3]);
  free_vector(data2, 1, 1024);
  free_vector(data1, 1, 1024);
  free_lvector(nn, 1, 3);
  return 0;
}
```