#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 orgBlenderNoise(float, float, float);
float BLI_hnoise(float noisesize, float x, float y, float z) {
  if (noisesize == 0.0f)
    return 0.0f;
  x = (1.0f + x) / noisesize;
  y = (1.0f + y) / noisesize;
  z = (1.0f + z) / noisesize;
  return orgBlenderNoise(x, y, z);
}


x86 assembly (clang, -O0):
<BLI_hnoise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1150 <BLI_hnoise+0x40>
jp     1150 <BLI_hnoise+0x40>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11ae <BLI_hnoise+0x9e>
movss  0xea8(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe91(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe7a(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <orgBlenderNoise@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLI_hnoise>:
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm0
jne    111e <BLI_hnoise+0xe>
jp     111e <BLI_hnoise+0xe>
xorps  %xmm0,%xmm0
ret
movss  0xeda(%rip),%xmm4
addss  %xmm4,%xmm1
divss  %xmm0,%xmm1
addss  %xmm4,%xmm2
divss  %xmm0,%xmm2
addss  %xmm4,%xmm3
divss  %xmm0,%xmm3
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <orgBlenderNoise@plt>

LLVM IR (-O0):
define float @BLI_hnoise(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
%10 = load float, float* %6
%11 = fcmp oeq float %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %4
store float 0.000000e+00, float* %5
br label %30
13: ; preds = %4
%14 = load float, float* %7
%15 = fadd float 1.000000e+00, %14
%16 = load float, float* %6
%17 = fdiv float %15, %16
store float %17, float* %7
%18 = load float, float* %8
%19 = fadd float 1.000000e+00, %18
%20 = load float, float* %6
%21 = fdiv float %19, %20
store float %21, float* %8
%22 = load float, float* %9
%23 = fadd float 1.000000e+00, %22
%24 = load float, float* %6
%25 = fdiv float %23, %24
store float %25, float* %9
%26 = load float, float* %7
%27 = load float, float* %8
%28 = load float, float* %9
%29 = call float @orgBlenderNoise(float %26, float %27, float %28)
store float %29, float* %5
br label %30
30: ; preds = %13, %12
%31 = load float, float* %5
ret float %31
}

LLVM IR (-O2):
define float @BLI_hnoise(float %0, float %1, float %2, float %3) {
%5 = fcmp oeq float %0, 0.000000e+00
br i1 %5, label %14, label %6
6: ; preds = %4
%7 = fadd float %1, 1.000000e+00
%8 = fdiv float %7, %0
%9 = fadd float %2, 1.000000e+00
%10 = fdiv float %9, %0
%11 = fadd float %3, 1.000000e+00
%12 = fdiv float %11, %0
%13 = tail call float @orgBlenderNoise(float %8, float %10, float %12)
br label %14
14: ; preds = %4, %6
%15 = phi float [ %13, %6 ], [ 0.000000e+00, %4 ]
ret float %15
}