#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 */
int /*<<< orphan*/ init();
scalar_t__ noise(double, double, double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  init();
  double x, y, z, sum = 0.0;
  for (x = -11352.57; x < 23561.57; x += .1235)
    for (y = -346.1235; y < 124.124; y += 1.4325)
      for (z = -156.235; y < 23.2345; y += 2.45)
        sum += noise(x, y, z);
  printf("%e\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea5(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1220 <main+0xf0>
movsd  0xe9a(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe95(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1204 <main+0xd4>
movsd  0xe92(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe8d(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11e8 <main+0xb8>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <noise@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe67(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    119b <main+0x6b>
jmp    11ed <main+0xbd>
movsd  0xe43(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    117b <main+0x4b>
jmp    1209 <main+0xd9>
movsd  0xe0f(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    115b <main+0x2b>
movsd  -0x28(%rbp),%xmm0
lea    0xe1c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1050 <init@plt>
movsd  0xebd(%rip),%xmm1
xorps  %xmm0,%xmm0
movsd  0xec2(%rip),%xmm3
movsd  0xec2(%rip),%xmm4
cs nopw 0x0(%rax,%rax,1)
movsd  0xea0(%rip),%xmm5
movsd  %xmm1,0x8(%rsp)
jmp    11ce <main+0x9e>
movsd  %xmm5,0x10(%rsp)
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
movapd %xmm5,%xmm1
movaps %xmm4,%xmm2
call   1040 <noise@plt>
movsd  0x10(%rsp),%xmm5
movsd  0xe87(%rip),%xmm2
movsd  0xe77(%rip),%xmm4
movsd  0xe67(%rip),%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm1
movsd  (%rsp),%xmm0
addsd  %xmm2,%xmm5
ucomisd %xmm5,%xmm3
ja     1170 <main+0x40>
addsd  0xe4c(%rip),%xmm5
movsd  0xe4c(%rip),%xmm2
ucomisd %xmm5,%xmm2
ja     11ce <main+0x9e>
addsd  0xe46(%rip),%xmm1
movsd  0xe46(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     1160 <main+0x30>
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 (...) @init()
store double 0.000000e+00, double* %5
store double 0xC0C62C48F5C28F5C, double* %2
br label %7
7: ; preds = %34, %0
%8 = load double, double* %2
%9 = fcmp olt double %8, 0x40D702647AE147AE
br i1 %9, label %10, label %37
10: ; preds = %7
store double 0xC075A1F9DB22D0E5, double* %3
br label %11
11: ; preds = %30, %10
%12 = load double, double* %3
%13 = fcmp olt double %12, 1.241240e+02
br i1 %13, label %14, label %33
14: ; preds = %11
store double -1.562350e+02, double* %4
br label %15
15: ; preds = %26, %14
%16 = load double, double* %3
%17 = fcmp olt double %16, 2.323450e+01
br i1 %17, label %18, label %29
18: ; preds = %15
%19 = load double, double* %2
%20 = load double, double* %3
%21 = load double, double* %4
%22 = call i64 @noise(double %19, double %20, double %21)
%23 = sitofp i64 %22 to double
%24 = load double, double* %5
%25 = fadd double %24, %23
store double %25, double* %5
br label %26
26: ; preds = %18
%27 = load double, double* %3
%28 = fadd double %27, 2.450000e+00
store double %28, double* %3
br label %15
29: ; preds = %15
br label %30
30: ; preds = %29
%31 = load double, double* %3
%32 = fadd double %31, 1.432500e+00
store double %32, double* %3
br label %11
33: ; preds = %11
br label %34
34: ; preds = %33
%35 = load double, double* %2
%36 = fadd double %35, 1.235000e-01
store double %36, double* %2
br label %7
37: ; preds = %7
%38 = load double, double* %5
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %38)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%e\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @init()
br label %2
2: ; preds = %0, %22
%3 = phi double [ 0.000000e+00, %0 ], [ %19, %22 ]
%4 = phi double [ 0xC0C62C48F5C28F5C, %0 ], [ %23, %22 ]
br label %5
5: ; preds = %2, %17
%6 = phi double [ %3, %2 ], [ %19, %17 ]
%7 = phi double [ 0xC075A1F9DB22D0E5, %2 ], [ %20, %17 ]
%8 = fcmp olt double %7, 2.323450e+01
br i1 %8, label %9, label %17
9: ; preds = %5, %9
%10 = phi double [ %14, %9 ], [ %6, %5 ]
%11 = phi double [ %15, %9 ], [ %7, %5 ]
%12 = tail call i64 @noise(double %4, double %11, double -1.562350e+02)
%13 = sitofp i64 %12 to double
%14 = fadd double %10, %13
%15 = fadd double %11, 2.450000e+00
%16 = fcmp olt double %15, 2.323450e+01
br i1 %16, label %9, label %17
17: ; preds = %9, %5
%18 = phi double [ %7, %5 ], [ %15, %9 ]
%19 = phi double [ %6, %5 ], [ %14, %9 ]
%20 = fadd double %18, 1.432500e+00
%21 = fcmp olt double %20, 1.241240e+02
br i1 %21, label %5, label %22
22: ; preds = %17
%23 = fadd double %4, 1.235000e-01
%24 = fcmp olt double %23, 0x40D702647AE147AE
br i1 %24, label %2, label %25
25: ; preds = %22
%26 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %19)
ret i32 0
}