#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);
  float ***data, **speq;
  data = f3tensor(1, 1, 1, 256, 1, 256);
  speq = matrix(1, 1, 1, 2 * 256);
  rlft3(data, speq, 1, 256, 256, 1);
  rlft3(data, speq, 1, 256, 256, -1);
  free_matrix(speq, 1, 1, 1, 2 * 256);
  free_f3tensor(data, 1, 1, 1, 256, 1, 256);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%r8d
mov    $0x100,%r9d
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r9d,%ecx
call   1040 <f3tensor@plt>
mov    %rax,-0x10(%rbp)
mov    $0x1,%edx
mov    $0x200,%ecx
mov    %edx,%edi
mov    %edx,%esi
call   1060 <matrix@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
mov    $0x100,%r8d
mov    $0x1,%r9d
mov    %r8,%rcx
call   1030 <rlft3@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
mov    $0x100,%r8d
mov    $0xffffffff,%r9d
mov    %r8,%rcx
call   1030 <rlft3@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x200,%r8d
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <free_matrix@plt>
mov    -0x10(%rbp),%rdi
mov    $0x1,%r9d
mov    $0x100,%r8d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
movl   $0x100,(%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    $0x1,%esi
mov    $0x1,%edx
mov    $0x100,%ecx
mov    $0x1,%r8d
mov    $0x100,%r9d
call   1040 <f3tensor@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x200,%ecx
call   1060 <matrix@plt>
mov    %rax,%rbx
mov    $0x1,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0x1,%r9d
call   1030 <rlft3@plt>
mov    $0x1,%edx
mov    $0x100,%ecx
mov    $0x100,%r8d
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0xffffffff,%r9d
call   1030 <rlft3@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x200,%r8d
call   1050 <free_matrix@plt>
movl   $0x100,(%rsp)
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x100,%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 float***
%3 = alloca float**
store i32 0, i32* %1
%4 = call float*** @f3tensor(i32 1, i32 1, i32 1, i32 256, i32 1, i32 256)
store float*** %4, float**** %2
%5 = call float** @matrix(i32 1, i32 1, i32 1, i32 512)
store float** %5, float*** %3
%6 = load float***, float**** %2
%7 = load float**, float*** %3
%8 = load float***, float**** %2
%9 = load float**, float*** %3
%10 = load float**, float*** %3
%11 = call i32 @free_matrix(float** %10, i32 1, i32 1, i32 1, i32 512)
%12 = load float***, float**** %2
%13 = call i32 @free_f3tensor(float*** %12, i32 1, i32 1, i32 1, i32 256, i32 1, i32 256)
ret i32 0
}

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