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


x86 assembly (clang, -O0):
<scaled_octave_noise_4d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0x10(%rbp),%xmm8
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
movss  0x10(%rbp),%xmm6
call   1030 <octave_noise_4d@plt>
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe7c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
addss  -0x10(%rbp),%xmm1
movss  0xe66(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

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

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

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