; LLVM IR from bohanwang/libpgo :: src/core/perlinNoise/perlinNoise.ll (ZN3pgo11PerlinNoise11PerlinNoise7noise4DEPd)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise17computeFadeCurvesEd(ptr noundef nonnull align 8 dereferenceable(2496), double noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496), double noundef, double noundef, double noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496), i32 noundef, double noundef, double noundef, double noundef, double noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise7noise4DEPd(ptr noundef nonnull align 8 dereferenceable(2496) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [4 x i32], align 16
  %6 = alloca [4 x double], align 16
  %7 = alloca [4 x double], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %31 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %87, %2
  %33 = load i32, ptr %8, align 4, !tbaa !9
  %34 = icmp slt i32 %33, 4
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  br label %90

36:                                               ; preds = %32
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %37, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !11
  %42 = fcmp ogt double %41, 0.000000e+00
  br i1 %42, label %43, label %53

43:                                               ; preds = %36
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds double, ptr %44, i64 %46
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = fptosi double %48 to i32
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 %51
  store i32 %49, ptr %52, align 4, !tbaa !9
  br label %64

53:                                               ; preds = %36
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds double, ptr %54, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = fsub double %58, 1.000000e+00
  %60 = fptosi double %59 to i32
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 %62
  store i32 %60, ptr %63, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %53, %43
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds double, ptr %65, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !11
  %70 = load i32, ptr %8, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = sitofp i32 %73 to double
  %75 = fsub double %69, %74
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 %77
  store double %75, ptr %78, align 8, !tbaa !11
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !11
  %83 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise17computeFadeCurvesEd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %82)
  %84 = load i32, ptr %8, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 %85
  store double %83, ptr %86, align 8, !tbaa !11
  br label %87

87:                                               ; preds = %64
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %8, align 4, !tbaa !9
  br label %32, !llvm.loop !13

90:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  %91 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 0
  %92 = load i32, ptr %91, align 16, !tbaa !9
  %93 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %92)
  %94 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 1
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = add nsw i32 %93, %95
  store i32 %96, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  %97 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 0
  %98 = load i32, ptr %97, align 16, !tbaa !9
  %99 = add nsw i32 %98, 1
  %100 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %99)
  %101 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 1
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = add nsw i32 %100, %102
  store i32 %103, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %104)
  %106 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 2
  %107 = load i32, ptr %106, align 8, !tbaa !9
  %108 = add nsw i32 %105, %107
  store i32 %108, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  %111 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %110)
  %112 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 2
  %113 = load i32, ptr %112, align 8, !tbaa !9
  %114 = add nsw i32 %111, %113
  store i32 %114, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %115)
  %117 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 2
  %118 = load i32, ptr %117, align 8, !tbaa !9
  %119 = add nsw i32 %116, %118
  store i32 %119, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %120 = load i32, ptr %10, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  %122 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %121)
  %123 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 2
  %124 = load i32, ptr %123, align 8, !tbaa !9
  %125 = add nsw i32 %122, %124
  store i32 %125, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  %126 = load i32, ptr %11, align 4, !tbaa !9
  %127 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %126)
  %128 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = add nsw i32 %127, %129
  store i32 %130, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  %133 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %132)
  %134 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = add nsw i32 %133, %135
  store i32 %136, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  %137 = load i32, ptr %12, align 4, !tbaa !9
  %138 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %137)
  %139 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %140 = load i32, ptr %139, align 4, !tbaa !9
  %141 = add nsw i32 %138, %140
  store i32 %141, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  %142 = load i32, ptr %12, align 4, !tbaa !9
  %143 = add nsw i32 %142, 1
  %144 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %143)
  %145 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = add nsw i32 %144, %146
  store i32 %147, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #2
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %148)
  %150 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = add nsw i32 %149, %151
  store i32 %152, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #2
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  %155 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %154)
  %156 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %157 = load i32, ptr %156, align 4, !tbaa !9
  %158 = add nsw i32 %155, %157
  store i32 %158, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #2
  %159 = load i32, ptr %14, align 4, !tbaa !9
  %160 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %159)
  %161 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = add nsw i32 %160, %162
  store i32 %163, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #2
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  %166 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %165)
  %167 = getelementptr inbounds [4 x i32], ptr %5, i64 0, i64 3
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = add nsw i32 %166, %168
  store i32 %169, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #2
  %170 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %171 = load double, ptr %170, align 16, !tbaa !11
  %172 = load i32, ptr %15, align 4, !tbaa !9
  %173 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %172)
  %174 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %175 = load double, ptr %174, align 16, !tbaa !11
  %176 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %177 = load double, ptr %176, align 8, !tbaa !11
  %178 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %179 = load double, ptr %178, align 16, !tbaa !11
  %180 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %181 = load double, ptr %180, align 8, !tbaa !11
  %182 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %173, double noundef %175, double noundef %177, double noundef %179, double noundef %181)
  %183 = load i32, ptr %19, align 4, !tbaa !9
  %184 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %183)
  %185 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %186 = load double, ptr %185, align 16, !tbaa !11
  %187 = fsub double %186, 1.000000e+00
  %188 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %189 = load double, ptr %188, align 8, !tbaa !11
  %190 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %191 = load double, ptr %190, align 16, !tbaa !11
  %192 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %193 = load double, ptr %192, align 8, !tbaa !11
  %194 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %184, double noundef %187, double noundef %189, double noundef %191, double noundef %193)
  %195 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %171, double noundef %182, double noundef %194)
  store double %195, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #2
  %196 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %197 = load double, ptr %196, align 16, !tbaa !11
  %198 = load i32, ptr %17, align 4, !tbaa !9
  %199 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %198)
  %200 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %201 = load double, ptr %200, align 16, !tbaa !11
  %202 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %203 = load double, ptr %202, align 8, !tbaa !11
  %204 = fsub double %203, 1.000000e+00
  %205 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %206 = load double, ptr %205, align 16, !tbaa !11
  %207 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %208 = load double, ptr %207, align 8, !tbaa !11
  %209 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %199, double noundef %201, double noundef %204, double noundef %206, double noundef %208)
  %210 = load i32, ptr %21, align 4, !tbaa !9
  %211 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %210)
  %212 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %213 = load double, ptr %212, align 16, !tbaa !11
  %214 = fsub double %213, 1.000000e+00
  %215 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %216 = load double, ptr %215, align 8, !tbaa !11
  %217 = fsub double %216, 1.000000e+00
  %218 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %219 = load double, ptr %218, align 16, !tbaa !11
  %220 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %221 = load double, ptr %220, align 8, !tbaa !11
  %222 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %211, double noundef %214, double noundef %217, double noundef %219, double noundef %221)
  %223 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %197, double noundef %209, double noundef %222)
  store double %223, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #2
  %224 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %225 = load double, ptr %224, align 16, !tbaa !11
  %226 = load i32, ptr %16, align 4, !tbaa !9
  %227 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %226)
  %228 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %229 = load double, ptr %228, align 16, !tbaa !11
  %230 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %231 = load double, ptr %230, align 8, !tbaa !11
  %232 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %233 = load double, ptr %232, align 16, !tbaa !11
  %234 = fsub double %233, 1.000000e+00
  %235 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %236 = load double, ptr %235, align 8, !tbaa !11
  %237 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %227, double noundef %229, double noundef %231, double noundef %234, double noundef %236)
  %238 = load i32, ptr %20, align 4, !tbaa !9
  %239 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %238)
  %240 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %241 = load double, ptr %240, align 16, !tbaa !11
  %242 = fsub double %241, 1.000000e+00
  %243 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %244 = load double, ptr %243, align 8, !tbaa !11
  %245 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %246 = load double, ptr %245, align 16, !tbaa !11
  %247 = fsub double %246, 1.000000e+00
  %248 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %249 = load double, ptr %248, align 8, !tbaa !11
  %250 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %239, double noundef %242, double noundef %244, double noundef %247, double noundef %249)
  %251 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %225, double noundef %237, double noundef %250)
  store double %251, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #2
  %252 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %253 = load double, ptr %252, align 16, !tbaa !11
  %254 = load i32, ptr %18, align 4, !tbaa !9
  %255 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %254)
  %256 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %257 = load double, ptr %256, align 16, !tbaa !11
  %258 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %259 = load double, ptr %258, align 8, !tbaa !11
  %260 = fsub double %259, 1.000000e+00
  %261 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %262 = load double, ptr %261, align 16, !tbaa !11
  %263 = fsub double %262, 1.000000e+00
  %264 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %265 = load double, ptr %264, align 8, !tbaa !11
  %266 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %255, double noundef %257, double noundef %260, double noundef %263, double noundef %265)
  %267 = load i32, ptr %22, align 4, !tbaa !9
  %268 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %267)
  %269 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %270 = load double, ptr %269, align 16, !tbaa !11
  %271 = fsub double %270, 1.000000e+00
  %272 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %273 = load double, ptr %272, align 8, !tbaa !11
  %274 = fsub double %273, 1.000000e+00
  %275 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %276 = load double, ptr %275, align 16, !tbaa !11
  %277 = fsub double %276, 1.000000e+00
  %278 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %279 = load double, ptr %278, align 8, !tbaa !11
  %280 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %268, double noundef %271, double noundef %274, double noundef %277, double noundef %279)
  %281 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %253, double noundef %266, double noundef %280)
  store double %281, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #2
  %282 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %283 = load double, ptr %282, align 16, !tbaa !11
  %284 = load i32, ptr %15, align 4, !tbaa !9
  %285 = add nsw i32 %284, 1
  %286 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %285)
  %287 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %288 = load double, ptr %287, align 16, !tbaa !11
  %289 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %290 = load double, ptr %289, align 8, !tbaa !11
  %291 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %292 = load double, ptr %291, align 16, !tbaa !11
  %293 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %294 = load double, ptr %293, align 8, !tbaa !11
  %295 = fsub double %294, 1.000000e+00
  %296 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %286, double noundef %288, double noundef %290, double noundef %292, double noundef %295)
  %297 = load i32, ptr %19, align 4, !tbaa !9
  %298 = add nsw i32 %297, 1
  %299 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %298)
  %300 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %301 = load double, ptr %300, align 16, !tbaa !11
  %302 = fsub double %301, 1.000000e+00
  %303 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %304 = load double, ptr %303, align 8, !tbaa !11
  %305 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %306 = load double, ptr %305, align 16, !tbaa !11
  %307 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %308 = load double, ptr %307, align 8, !tbaa !11
  %309 = fsub double %308, 1.000000e+00
  %310 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %299, double noundef %302, double noundef %304, double noundef %306, double noundef %309)
  %311 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %283, double noundef %296, double noundef %310)
  store double %311, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #2
  %312 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %313 = load double, ptr %312, align 16, !tbaa !11
  %314 = load i32, ptr %17, align 4, !tbaa !9
  %315 = add nsw i32 %314, 1
  %316 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %315)
  %317 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %318 = load double, ptr %317, align 16, !tbaa !11
  %319 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %320 = load double, ptr %319, align 8, !tbaa !11
  %321 = fsub double %320, 1.000000e+00
  %322 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %323 = load double, ptr %322, align 16, !tbaa !11
  %324 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %325 = load double, ptr %324, align 8, !tbaa !11
  %326 = fsub double %325, 1.000000e+00
  %327 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %316, double noundef %318, double noundef %321, double noundef %323, double noundef %326)
  %328 = load i32, ptr %21, align 4, !tbaa !9
  %329 = add nsw i32 %328, 1
  %330 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %329)
  %331 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %332 = load double, ptr %331, align 16, !tbaa !11
  %333 = fsub double %332, 1.000000e+00
  %334 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %335 = load double, ptr %334, align 8, !tbaa !11
  %336 = fsub double %335, 1.000000e+00
  %337 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %338 = load double, ptr %337, align 16, !tbaa !11
  %339 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %340 = load double, ptr %339, align 8, !tbaa !11
  %341 = fsub double %340, 1.000000e+00
  %342 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %330, double noundef %333, double noundef %336, double noundef %338, double noundef %341)
  %343 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %313, double noundef %327, double noundef %342)
  store double %343, ptr %28, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #2
  %344 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %345 = load double, ptr %344, align 16, !tbaa !11
  %346 = load i32, ptr %16, align 4, !tbaa !9
  %347 = add nsw i32 %346, 1
  %348 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %347)
  %349 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %350 = load double, ptr %349, align 16, !tbaa !11
  %351 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %352 = load double, ptr %351, align 8, !tbaa !11
  %353 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %354 = load double, ptr %353, align 16, !tbaa !11
  %355 = fsub double %354, 1.000000e+00
  %356 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %357 = load double, ptr %356, align 8, !tbaa !11
  %358 = fsub double %357, 1.000000e+00
  %359 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %348, double noundef %350, double noundef %352, double noundef %355, double noundef %358)
  %360 = load i32, ptr %20, align 4, !tbaa !9
  %361 = add nsw i32 %360, 1
  %362 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %361)
  %363 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %364 = load double, ptr %363, align 16, !tbaa !11
  %365 = fsub double %364, 1.000000e+00
  %366 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %367 = load double, ptr %366, align 8, !tbaa !11
  %368 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %369 = load double, ptr %368, align 16, !tbaa !11
  %370 = fsub double %369, 1.000000e+00
  %371 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %372 = load double, ptr %371, align 8, !tbaa !11
  %373 = fsub double %372, 1.000000e+00
  %374 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %362, double noundef %365, double noundef %367, double noundef %370, double noundef %373)
  %375 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %345, double noundef %359, double noundef %374)
  store double %375, ptr %29, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #2
  %376 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 0
  %377 = load double, ptr %376, align 16, !tbaa !11
  %378 = load i32, ptr %18, align 4, !tbaa !9
  %379 = add nsw i32 %378, 1
  %380 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %379)
  %381 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %382 = load double, ptr %381, align 16, !tbaa !11
  %383 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %384 = load double, ptr %383, align 8, !tbaa !11
  %385 = fsub double %384, 1.000000e+00
  %386 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %387 = load double, ptr %386, align 16, !tbaa !11
  %388 = fsub double %387, 1.000000e+00
  %389 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %390 = load double, ptr %389, align 8, !tbaa !11
  %391 = fsub double %390, 1.000000e+00
  %392 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %380, double noundef %382, double noundef %385, double noundef %388, double noundef %391)
  %393 = load i32, ptr %22, align 4, !tbaa !9
  %394 = add nsw i32 %393, 1
  %395 = call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %394)
  %396 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 0
  %397 = load double, ptr %396, align 16, !tbaa !11
  %398 = fsub double %397, 1.000000e+00
  %399 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 1
  %400 = load double, ptr %399, align 8, !tbaa !11
  %401 = fsub double %400, 1.000000e+00
  %402 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 2
  %403 = load double, ptr %402, align 16, !tbaa !11
  %404 = fsub double %403, 1.000000e+00
  %405 = getelementptr inbounds [4 x double], ptr %6, i64 0, i64 3
  %406 = load double, ptr %405, align 8, !tbaa !11
  %407 = fsub double %406, 1.000000e+00
  %408 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, i32 noundef %395, double noundef %398, double noundef %401, double noundef %404, double noundef %407)
  %409 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %377, double noundef %392, double noundef %408)
  store double %409, ptr %30, align 8, !tbaa !11
  %410 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 3
  %411 = load double, ptr %410, align 8, !tbaa !11
  %412 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 2
  %413 = load double, ptr %412, align 16, !tbaa !11
  %414 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 1
  %415 = load double, ptr %414, align 8, !tbaa !11
  %416 = load double, ptr %23, align 8, !tbaa !11
  %417 = load double, ptr %24, align 8, !tbaa !11
  %418 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %415, double noundef %416, double noundef %417)
  %419 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 1
  %420 = load double, ptr %419, align 8, !tbaa !11
  %421 = load double, ptr %25, align 8, !tbaa !11
  %422 = load double, ptr %26, align 8, !tbaa !11
  %423 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %420, double noundef %421, double noundef %422)
  %424 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %413, double noundef %418, double noundef %423)
  %425 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 2
  %426 = load double, ptr %425, align 16, !tbaa !11
  %427 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 1
  %428 = load double, ptr %427, align 8, !tbaa !11
  %429 = load double, ptr %27, align 8, !tbaa !11
  %430 = load double, ptr %28, align 8, !tbaa !11
  %431 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %428, double noundef %429, double noundef %430)
  %432 = getelementptr inbounds [4 x double], ptr %7, i64 0, i64 1
  %433 = load double, ptr %432, align 8, !tbaa !11
  %434 = load double, ptr %29, align 8, !tbaa !11
  %435 = load double, ptr %30, align 8, !tbaa !11
  %436 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %433, double noundef %434, double noundef %435)
  %437 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %426, double noundef %431, double noundef %436)
  %438 = call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %31, double noundef %411, double noundef %424, double noundef %437)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #2
  ret double %438
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise17computeFadeCurvesEd(ptr noundef nonnull align 8 dereferenceable(2496), double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496), double noundef, double noundef, double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496), i32 noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN3pgo11PerlinNoise11PerlinNoise7noise4DEPd(ptr noundef nonnull align 8 dereferenceable(2496) %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 align 2 {
  %3 = load double, ptr %1, align 8, !tbaa !5
  %4 = fcmp ogt double %3, 0.000000e+00
  %5 = fadd double %3, -1.000000e+00
  %.sroa.059.0.in = select i1 %4, double %3, double %5
  %.sroa.059.0 = fptosi double %.sroa.059.0.in to i32
  %6 = sitofp i32 %.sroa.059.0 to double
  %7 = fsub double %3, %6
  %8 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise17computeFadeCurvesEd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %7)
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load double, ptr %9, align 8, !tbaa !5
  %11 = fcmp ogt double %10, 0.000000e+00
  %12 = fadd double %10, -1.000000e+00
  %.sroa.661.0.in = select i1 %11, double %10, double %12
  %.sroa.661.0 = fptosi double %.sroa.661.0.in to i32
  %13 = sitofp i32 %.sroa.661.0 to double
  %14 = fsub double %10, %13
  %15 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise17computeFadeCurvesEd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %14)
  %16 = getelementptr inbounds i8, ptr %1, i64 16
  %17 = load double, ptr %16, align 8, !tbaa !5
  %18 = fcmp ogt double %17, 0.000000e+00
  %19 = fadd double %17, -1.000000e+00
  %.sroa.10.0.in = select i1 %18, double %17, double %19
  %.sroa.10.0 = fptosi double %.sroa.10.0.in to i32
  %20 = sitofp i32 %.sroa.10.0 to double
  %21 = fsub double %17, %20
  %22 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise17computeFadeCurvesEd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %21)
  %23 = getelementptr inbounds i8, ptr %1, i64 24
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = fcmp ogt double %24, 0.000000e+00
  %26 = fadd double %24, -1.000000e+00
  %.sroa.14.0.in = select i1 %25, double %24, double %26
  %.sroa.14.0 = fptosi double %.sroa.14.0.in to i32
  %27 = sitofp i32 %.sroa.14.0 to double
  %28 = fsub double %24, %27
  %29 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise17computeFadeCurvesEd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %28)
  %30 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %.sroa.059.0)
  %31 = add nsw i32 %30, %.sroa.661.0
  %32 = add nsw i32 %.sroa.059.0, 1
  %33 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %32)
  %34 = add nsw i32 %33, %.sroa.661.0
  %35 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %31)
  %36 = add nsw i32 %35, %.sroa.10.0
  %37 = add nsw i32 %31, 1
  %38 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %37)
  %39 = add nsw i32 %38, %.sroa.10.0
  %40 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %34)
  %41 = add nsw i32 %40, %.sroa.10.0
  %42 = add nsw i32 %34, 1
  %43 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %42)
  %44 = add nsw i32 %43, %.sroa.10.0
  %45 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %36)
  %46 = add nsw i32 %45, %.sroa.14.0
  %47 = add nsw i32 %36, 1
  %48 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %47)
  %49 = add nsw i32 %48, %.sroa.14.0
  %50 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %39)
  %51 = add nsw i32 %50, %.sroa.14.0
  %52 = add nsw i32 %39, 1
  %53 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %52)
  %54 = add nsw i32 %53, %.sroa.14.0
  %55 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %41)
  %56 = add nsw i32 %55, %.sroa.14.0
  %57 = add nsw i32 %41, 1
  %58 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %57)
  %59 = add nsw i32 %58, %.sroa.14.0
  %60 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %44)
  %61 = add nsw i32 %60, %.sroa.14.0
  %62 = add nsw i32 %44, 1
  %63 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %62)
  %64 = add nsw i32 %63, %.sroa.14.0
  %65 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %46)
  %66 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %65, double noundef %7, double noundef %14, double noundef %21, double noundef %28)
  %67 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %56)
  %68 = fadd double %7, -1.000000e+00
  %69 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %67, double noundef %68, double noundef %14, double noundef %21, double noundef %28)
  %70 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %66, double noundef %69)
  %71 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %51)
  %72 = fadd double %14, -1.000000e+00
  %73 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %71, double noundef %7, double noundef %72, double noundef %21, double noundef %28)
  %74 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %61)
  %75 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %74, double noundef %68, double noundef %72, double noundef %21, double noundef %28)
  %76 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %73, double noundef %75)
  %77 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %49)
  %78 = fadd double %21, -1.000000e+00
  %79 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %77, double noundef %7, double noundef %14, double noundef %78, double noundef %28)
  %80 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %59)
  %81 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %80, double noundef %68, double noundef %14, double noundef %78, double noundef %28)
  %82 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %79, double noundef %81)
  %83 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %54)
  %84 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %83, double noundef %7, double noundef %72, double noundef %78, double noundef %28)
  %85 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %64)
  %86 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %85, double noundef %68, double noundef %72, double noundef %78, double noundef %28)
  %87 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %84, double noundef %86)
  %88 = add nsw i32 %46, 1
  %89 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %88)
  %90 = fadd double %28, -1.000000e+00
  %91 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %89, double noundef %7, double noundef %14, double noundef %21, double noundef %90)
  %92 = add nsw i32 %56, 1
  %93 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %92)
  %94 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %93, double noundef %68, double noundef %14, double noundef %21, double noundef %90)
  %95 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %91, double noundef %94)
  %96 = add nsw i32 %51, 1
  %97 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %96)
  %98 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %97, double noundef %7, double noundef %72, double noundef %21, double noundef %90)
  %99 = add nsw i32 %61, 1
  %100 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %99)
  %101 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %100, double noundef %68, double noundef %72, double noundef %21, double noundef %90)
  %102 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %98, double noundef %101)
  %103 = add nsw i32 %49, 1
  %104 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %103)
  %105 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %104, double noundef %7, double noundef %14, double noundef %78, double noundef %90)
  %106 = add nsw i32 %59, 1
  %107 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %106)
  %108 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %107, double noundef %68, double noundef %14, double noundef %78, double noundef %90)
  %109 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %105, double noundef %108)
  %110 = add nsw i32 %54, 1
  %111 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %110)
  %112 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %111, double noundef %7, double noundef %72, double noundef %78, double noundef %90)
  %113 = add nsw i32 %64, 1
  %114 = tail call noundef i32 @_ZN3pgo11PerlinNoise11PerlinNoise14getPermutationEi(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %113)
  %115 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise10gradient4DEidddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, i32 noundef %114, double noundef %68, double noundef %72, double noundef %78, double noundef %90)
  %116 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %8, double noundef %112, double noundef %115)
  %117 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %15, double noundef %70, double noundef %76)
  %118 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %15, double noundef %82, double noundef %87)
  %119 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %22, double noundef %117, double noundef %118)
  %120 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %15, double noundef %95, double noundef %102)
  %121 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %15, double noundef %109, double noundef %116)
  %122 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %22, double noundef %120, double noundef %121)
  %123 = tail call noundef double @_ZN3pgo11PerlinNoise11PerlinNoise19linearInterpolationEddd(ptr noundef nonnull align 8 dereferenceable(2496) %0, double noundef %29, double noundef %119, double noundef %122)
  ret double %123
}

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass