#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float ***f3tensor(int, int, int, int, int, int);
int /*<<< orphan*/ free_f3tensor(float ***, int, int, int, int, int, int);
int /*<<< orphan*/ free_matrix(float **, int, int, int, int);
float **matrix(int, int, int, int);
int main(void) {
  void rlft3(float ***data, float **speq, unsigned long nn1, unsigned long nn2,
             unsigned long nn3, int isign);
  int j;
  float ***data, **speq;
  data = f3tensor(1, 32, 1, 64, 1, 16);
  speq = matrix(1, 32, 1, 2 * 64);
  rlft3(data, speq, 32, 64, 16, 1);
  free_matrix(speq, 1, 32, 1, 2 * 64);
  free_f3tensor(data, 1, 32, 1, 64, 1, 16);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%r8d
mov    $0x20,%esi
mov    $0x40,%ecx
mov    $0x10,%r9d
mov    %r8d,%edi
mov    %r8d,%edx
call   1040 <f3tensor@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%edx
mov    $0x20,%esi
mov    $0x80,%ecx
mov    %edx,%edi
call   1060 <matrix@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x20,%edx
mov    $0x40,%ecx
mov    $0x10,%r8d
mov    $0x1,%r9d
call   1030 <rlft3@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x20,%edx
mov    $0x80,%r8d
mov    %ecx,%esi
call   1050 <free_matrix@plt>
mov    -0x10(%rbp),%rdi
mov    $0x1,%r9d
mov    $0x20,%edx
mov    $0x40,%r8d
mov    %r9d,%esi
mov    %r9d,%ecx
movl   $0x10,(%rsp)
call   1070 <free_f3tensor@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%edi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0x40,%ecx
mov    $0x1,%r8d
mov    $0x10,%r9d
call   1040 <f3tensor@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0x80,%ecx
call   1060 <matrix@plt>
mov    %rax,%rbx
mov    $0x20,%edx
mov    $0x40,%ecx
mov    $0x10,%r8d
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0x1,%r9d
call   1030 <rlft3@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x20,%edx
mov    $0x1,%ecx
mov    $0x80,%r8d
call   1050 <free_matrix@plt>
movl   $0x10,(%rsp)
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x20,%edx
mov    $0x1,%ecx
mov    $0x40,%r8d
mov    $0x1,%r9d
call   1070 <free_f3tensor@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float***
%4 = alloca float**
store i32 0, i32* %1
%5 = call float*** @f3tensor(i32 1, i32 32, i32 1, i32 64, i32 1, i32 16)
store float*** %5, float**** %3
%6 = call float** @matrix(i32 1, i32 32, i32 1, i32 128)
store float** %6, float*** %4
%7 = load float***, float**** %3
%8 = load float**, float*** %4
%9 = load float**, float*** %4
%10 = call i32 @free_matrix(float** %9, i32 1, i32 32, i32 1, i32 128)
%11 = load float***, float**** %3
%12 = call i32 @free_f3tensor(float*** %11, i32 1, i32 32, i32 1, i32 64, i32 1, i32 16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float*** @f3tensor(i32 1, i32 32, i32 1, i32 64, i32 1, i32 16)
%2 = tail call float** @matrix(i32 1, i32 32, i32 1, i32 128)
tail call void @rlft3(float*** %1, float** %2, i64 32, i64 64, i64 16, i32 1)
%3 = tail call i32 @free_matrix(float** %2, i32 1, i32 32, i32 1, i32 128)
%4 = tail call i32 @free_f3tensor(float*** %1, i32 1, i32 32, i32 1, i32 64, i32 1, i32 16)
ret i32 0
}