#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 */
double Noise4D(double, double, double, double);
int /*<<< orphan*/ printf(char *, double, double, double, double, double);
char *test_Noise4D() {
  double x = 0;
  double y = 0;
  double z = 0;
  double w = 0;
  printf("Noise4D(%f, %f, %f, %f): %f\n", x, y, z, w, Noise4D(x, y, z, w));
  y = -10;
  z = -2;
  printf("Noise4D(%f, %f, %f, %f): %f\n", x, y, z, w, Noise4D(x, y, z, w));
  x = -10;
  y = 0;
  z = 20;
  printf("Noise4D(%f, %f, %f, %f): %f\n", x, y, z, w, Noise4D(x, y, z, w));
  x = 0.432;
  y = -0.2376;
  z = 128.234;
  w = 578.098;
  printf("Noise4D(%f, %f, %f, %f): %f\n", x, y, z, w, Noise4D(x, y, z, w));
  return 0;
}


x86 assembly (clang, -O0):
<test_Noise4D>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <Noise4D@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm3
ff
movaps %xmm0,%xmm4
movsd  -0x88(%rbp),%xmm0
ff
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe59(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe54(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <Noise4D@plt>
movsd  -0x80(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
movaps %xmm0,%xmm4
movsd  -0x68(%rbp),%xmm0
lea    0xdf8(%rip),%rdi
call   1030 <printf@plt>
movsd  0xddb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xdbe(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <Noise4D@plt>
movsd  -0x60(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
movaps %xmm0,%xmm4
movsd  -0x48(%rbp),%xmm0
lea    0xd72(%rip),%rdi
call   1030 <printf@plt>
movsd  0xd45(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xd30(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xd1b(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xd06(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <Noise4D@plt>
movsd  -0x40(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
movaps %xmm0,%xmm4
movsd  -0x28(%rbp),%xmm0
lea    0xcda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_Noise4D>:
push   %rbx
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1040 <Noise4D@plt>
movaps %xmm0,%xmm4
lea    0xefc(%rip),%rbx
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
mov    %rbx,%rdi
call   1030 <printf@plt>
movsd  0xea8(%rip),%xmm1
movsd  0xea8(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
call   1040 <Noise4D@plt>
movaps %xmm0,%xmm4
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
mov    %rbx,%rdi
movsd  0xe81(%rip),%xmm1
movsd  0xe81(%rip),%xmm2
call   1030 <printf@plt>
movsd  0xe7c(%rip),%xmm2
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
movsd  0xe5e(%rip),%xmm0
call   1040 <Noise4D@plt>
movaps %xmm0,%xmm4
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
mov    %rbx,%rdi
movsd  0xe45(%rip),%xmm0
movsd  0xe4d(%rip),%xmm2
call   1030 <printf@plt>
movsd  0xe48(%rip),%xmm0
movsd  0xe48(%rip),%xmm1
movsd  0xe48(%rip),%xmm2
movsd  0xe48(%rip),%xmm3
call   1040 <Noise4D@plt>
movaps %xmm0,%xmm4
mov    %rbx,%rdi
movsd  0xe1d(%rip),%xmm0
movsd  0xe1d(%rip),%xmm1
movsd  0xe1d(%rip),%xmm2
movsd  0xe1d(%rip),%xmm3
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Noise4D(%f, %f, %f, %f): %f\0A\00"
define i8* @test_Noise4D() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double 0.000000e+00, double* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
store double 0.000000e+00, double* %4
%5 = load double, double* %1
%6 = load double, double* %2
%7 = load double, double* %3
%8 = load double, double* %4
%9 = load double, double* %1
%10 = load double, double* %2
%11 = load double, double* %3
%12 = load double, double* %4
%13 = call double @Noise4D(double %9, double %10, double %11, double %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %5, double %6, double %7, double %8, double %13)
store double -1.000000e+01, double* %2
store double -2.000000e+00, double* %3
%15 = load double, double* %1
%16 = load double, double* %2
%17 = load double, double* %3
%18 = load double, double* %4
%19 = load double, double* %1
%20 = load double, double* %2
%21 = load double, double* %3
%22 = load double, double* %4
%23 = call double @Noise4D(double %19, double %20, double %21, double %22)
%24 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %15, double %16, double %17, double %18, double %23)
store double -1.000000e+01, double* %1
store double 0.000000e+00, double* %2
store double 2.000000e+01, double* %3
%25 = load double, double* %1
%26 = load double, double* %2
%27 = load double, double* %3
%28 = load double, double* %4
%29 = load double, double* %1
%30 = load double, double* %2
%31 = load double, double* %3
%32 = load double, double* %4
%33 = call double @Noise4D(double %29, double %30, double %31, double %32)
%34 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %25, double %26, double %27, double %28, double %33)
store double 4.320000e-01, double* %1
store double -2.376000e-01, double* %2
store double 1.282340e+02, double* %3
store double 5.780980e+02, double* %4
%35 = load double, double* %1
%36 = load double, double* %2
%37 = load double, double* %3
%38 = load double, double* %4
%39 = load double, double* %1
%40 = load double, double* %2
%41 = load double, double* %3
%42 = load double, double* %4
%43 = call double @Noise4D(double %39, double %40, double %41, double %42)
%44 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %35, double %36, double %37, double %38, double %43)
ret i8* null
}

LLVM IR (-O2):
@.str = [29 x i8] c"Noise4D(%f, %f, %f, %f): %f\0A\00"
define noalias i8* @test_Noise4D() {
%1 = tail call double @Noise4D(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double %1)
%3 = tail call double @Noise4D(double 0.000000e+00, double -1.000000e+01, double -2.000000e+00, double 0.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 0.000000e+00, double -1.000000e+01, double -2.000000e+00, double 0.000000e+00, double %3)
%5 = tail call double @Noise4D(double -1.000000e+01, double 0.000000e+00, double 2.000000e+01, double 0.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double -1.000000e+01, double 0.000000e+00, double 2.000000e+01, double 0.000000e+00, double %5)
%7 = tail call double @Noise4D(double 4.320000e-01, double -2.376000e-01, double 1.282340e+02, double 5.780980e+02)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 4.320000e-01, double -2.376000e-01, double 1.282340e+02, double 5.780980e+02, double %7)
ret i8* null
}