#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 const simplexNoise(float const, float const, float const, float const,
                         float const, float const);
float simplexScaledNoise(const float octaves, const float persistence,
                         const float scale, const float loBound,
                         const float hiBound, const float x, const float y,
                         const float z) {
  return simplexNoise(octaves, persistence, scale, x, y, z) *
             (hiBound - loBound) / 2 +
         (hiBound + loBound) / 2;
}


x86 assembly (clang, -O0):
<simplexScaledNoise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  %xmm6,-0x1c(%rbp)
movss  %xmm7,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
movss  -0x1c(%rbp),%xmm4
movss  -0x20(%rbp),%xmm5
call   1030 <simplexNoise@plt>
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe87(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
movss  0xe71(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simplexScaledNoise>:
push   %rax
movss  %xmm4,(%rsp)
movss  %xmm3,0x4(%rsp)
movaps %xmm5,%xmm3
movaps %xmm6,%xmm4
movaps %xmm7,%xmm5
call   1030 <simplexNoise@plt>
movss  (%rsp),%xmm3
movaps %xmm3,%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  0xeb8(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
addss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @simplexScaledNoise(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7) {
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
store float %0, float* %9
store float %1, float* %10
store float %2, float* %11
store float %3, float* %12
store float %4, float* %13
store float %5, float* %14
store float %6, float* %15
store float %7, float* %16
%17 = load float, float* %9
%18 = load float, float* %10
%19 = load float, float* %11
%20 = load float, float* %14
%21 = load float, float* %15
%22 = load float, float* %16
%23 = call float @simplexNoise(float %17, float %18, float %19, float %20, float %21, float %22)
%24 = load float, float* %13
%25 = load float, float* %12
%26 = fsub float %24, %25
%27 = fmul float %23, %26
%28 = fdiv float %27, 2.000000e+00
%29 = load float, float* %13
%30 = load float, float* %12
%31 = fadd float %29, %30
%32 = fdiv float %31, 2.000000e+00
%33 = fadd float %28, %32
ret float %33
}

LLVM IR (-O2):
define float @simplexScaledNoise(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7) {
%9 = tail call float @simplexNoise(float %0, float %1, float %2, float %5, float %6, float %7)
%10 = fsub float %4, %3
%11 = fmul float %10, %9
%12 = fmul float %11, 5.000000e-01
%13 = fadd float %3, %4
%14 = fmul float %13, 5.000000e-01
%15 = fadd float %14, %12
ret float %15
}