#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 simplexScaledNoise(const float octaves, const float persistence,
                         const float scale, const float loBound,
                         const float hiBound, const float x, const float y) {
  return simplexNoise(octaves, persistence, scale, x, y) * (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  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
movss  -0x1c(%rbp),%xmm4
call   1030 <simplexNoise@plt>
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe91(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
movss  0xe7b(%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
call   1030 <simplexNoise@plt>
movss  (%rsp),%xmm3
movaps %xmm3,%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  0xebb(%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) {
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store float %0, float* %8
store float %1, float* %9
store float %2, float* %10
store float %3, float* %11
store float %4, float* %12
store float %5, float* %13
store float %6, float* %14
%15 = load float, float* %8
%16 = load float, float* %9
%17 = load float, float* %10
%18 = load float, float* %13
%19 = load float, float* %14
%20 = call float @simplexNoise(float %15, float %16, float %17, float %18, float %19)
%21 = load float, float* %12
%22 = load float, float* %11
%23 = fsub float %21, %22
%24 = fmul float %20, %23
%25 = fdiv float %24, 2.000000e+00
%26 = load float, float* %12
%27 = load float, float* %11
%28 = fadd float %26, %27
%29 = fdiv float %28, 2.000000e+00
%30 = fadd float %25, %29
ret float %30
}

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