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

; 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"

%"class.pgo::PerlinNoise::PerlinNoise" = type { [256 x i32], [4 x [2 x double]], [16 x [3 x double]], [32 x [4 x double]] }

@__const.PerlinNoise.g = external hidden unnamed_addr constant [4 x [2 x i32]], align 16
@__const.PerlinNoise.g.1 = external hidden unnamed_addr constant [16 x [3 x i32]], align 16
@__const.PerlinNoise.g.2 = external hidden unnamed_addr constant [32 x [4 x i32]], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3pgo11PerlinNoise11PerlinNoiseC2Ev(ptr noundef nonnull align 8 dereferenceable(2496) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca [4 x [2 x i32]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca [16 x [3 x i32]], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca [32 x [4 x i32]], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  call void @_ZN3pgo11PerlinNoise11PerlinNoise24generatePermutationTableEv(ptr noundef nonnull align 8 dereferenceable(2496) %13)
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %3, ptr align 16 @__const.PerlinNoise.g, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %43, %1
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 4
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %46

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %39, %18
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = icmp slt i32 %20, 2
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %42

23:                                               ; preds = %19
  %24 = load i32, ptr %4, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [4 x [2 x i32]], ptr %3, i64 0, i64 %25
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [2 x i32], ptr %26, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = sitofp i32 %30 to double
  %32 = getelementptr inbounds %"class.pgo::PerlinNoise::PerlinNoise", ptr %13, i32 0, i32 1
  %33 = load i32, ptr %4, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [4 x [2 x double]], ptr %32, i64 0, i64 %34
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [2 x double], ptr %35, i64 0, i64 %37
  store double %31, ptr %38, align 8, !tbaa !11
  br label %39

39:                                               ; preds = %23
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %6, align 4, !tbaa !9
  br label %19, !llvm.loop !13

42:                                               ; preds = %22
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %4, align 4, !tbaa !9
  br label %14, !llvm.loop !15

46:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 192, ptr %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.PerlinNoise.g.1, i64 192, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %76, %46
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = icmp slt i32 %48, 16
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %79

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %72, %51
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = icmp slt i32 %53, 3
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %75

56:                                               ; preds = %52
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [16 x [3 x i32]], ptr %7, i64 0, i64 %58
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [3 x i32], ptr %59, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = sitofp i32 %63 to double
  %65 = getelementptr inbounds %"class.pgo::PerlinNoise::PerlinNoise", ptr %13, i32 0, i32 2
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [16 x [3 x double]], ptr %65, i64 0, i64 %67
  %69 = load i32, ptr %9, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [3 x double], ptr %68, i64 0, i64 %70
  store double %64, ptr %71, align 8, !tbaa !11
  br label %72

72:                                               ; preds = %56
  %73 = load i32, ptr %9, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %9, align 4, !tbaa !9
  br label %52, !llvm.loop !16

75:                                               ; preds = %55
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %8, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %8, align 4, !tbaa !9
  br label %47, !llvm.loop !17

79:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 192, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 512, ptr %10) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.PerlinNoise.g.2, i64 512, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %109, %79
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = icmp slt i32 %81, 32
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %112

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %105, %84
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = icmp slt i32 %86, 4
  br i1 %87, label %89, label %88

88:                                               ; preds = %85
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %108

89:                                               ; preds = %85
  %90 = load i32, ptr %11, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [32 x [4 x i32]], ptr %10, i64 0, i64 %91
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [4 x i32], ptr %92, i64 0, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = sitofp i32 %96 to double
  %98 = getelementptr inbounds %"class.pgo::PerlinNoise::PerlinNoise", ptr %13, i32 0, i32 3
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [32 x [4 x double]], ptr %98, i64 0, i64 %100
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [4 x double], ptr %101, i64 0, i64 %103
  store double %97, ptr %104, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %89
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %12, align 4, !tbaa !9
  br label %85, !llvm.loop !18

108:                                              ; preds = %88
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %11, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %11, align 4, !tbaa !9
  br label %80, !llvm.loop !19

112:                                              ; preds = %83
  call void @llvm.lifetime.end.p0(i64 512, ptr %10) #4
  ret void
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

attributes #0 = { mustprogress 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


; 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"

@__const.PerlinNoise.g = external hidden unnamed_addr constant [4 x [2 x i32]], align 16
@__const.PerlinNoise.g.1 = external hidden unnamed_addr constant [16 x [3 x i32]], align 16
@__const.PerlinNoise.g.2 = external hidden unnamed_addr constant [32 x [4 x i32]], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3pgo11PerlinNoise11PerlinNoiseC2Ev(ptr noundef nonnull align 8 dereferenceable(2496) %0) unnamed_addr #0 align 2 {
.preheader32:
  tail call void @_ZN3pgo11PerlinNoise11PerlinNoise24generatePermutationTableEv(ptr noundef nonnull align 8 dereferenceable(2496) %0)
  %1 = getelementptr inbounds i8, ptr %0, i64 1024
  %2 = load <2 x i32>, ptr @__const.PerlinNoise.g, align 16, !tbaa !5
  %3 = sitofp <2 x i32> %2 to <2 x double>
  store <2 x double> %3, ptr %1, align 8, !tbaa !9
  %4 = getelementptr inbounds i8, ptr %0, i64 1040
  %5 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g, i64 8), align 8, !tbaa !5
  %6 = sitofp <2 x i32> %5 to <2 x double>
  store <2 x double> %6, ptr %4, align 8, !tbaa !9
  %7 = getelementptr inbounds i8, ptr %0, i64 1056
  %8 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g, i64 16), align 16, !tbaa !5
  %9 = sitofp <2 x i32> %8 to <2 x double>
  store <2 x double> %9, ptr %7, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %0, i64 1072
  %11 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g, i64 24), align 8, !tbaa !5
  %12 = sitofp <2 x i32> %11 to <2 x double>
  store <2 x double> %12, ptr %10, align 8, !tbaa !9
  %13 = getelementptr inbounds i8, ptr %0, i64 1088
  %14 = load <2 x i32>, ptr @__const.PerlinNoise.g.1, align 16, !tbaa !5
  %15 = sitofp <2 x i32> %14 to <2 x double>
  store <2 x double> %15, ptr %13, align 8, !tbaa !9
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 8), align 8, !tbaa !5
  %17 = sitofp i32 %16 to double
  %18 = getelementptr inbounds i8, ptr %0, i64 1104
  store double %17, ptr %18, align 8, !tbaa !9
  %19 = getelementptr inbounds i8, ptr %0, i64 1112
  %20 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 12), align 4, !tbaa !5
  %21 = sitofp <2 x i32> %20 to <2 x double>
  store <2 x double> %21, ptr %19, align 8, !tbaa !9
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 20), align 4, !tbaa !5
  %23 = sitofp i32 %22 to double
  %24 = getelementptr inbounds i8, ptr %0, i64 1128
  store double %23, ptr %24, align 8, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %0, i64 1136
  %26 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 24), align 8, !tbaa !5
  %27 = sitofp <2 x i32> %26 to <2 x double>
  store <2 x double> %27, ptr %25, align 8, !tbaa !9
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 32), align 16, !tbaa !5
  %29 = sitofp i32 %28 to double
  %30 = getelementptr inbounds i8, ptr %0, i64 1152
  store double %29, ptr %30, align 8, !tbaa !9
  %31 = getelementptr inbounds i8, ptr %0, i64 1160
  %32 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 36), align 4, !tbaa !5
  %33 = sitofp <2 x i32> %32 to <2 x double>
  store <2 x double> %33, ptr %31, align 8, !tbaa !9
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 44), align 4, !tbaa !5
  %35 = sitofp i32 %34 to double
  %36 = getelementptr inbounds i8, ptr %0, i64 1176
  store double %35, ptr %36, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %0, i64 1184
  %38 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 48), align 16, !tbaa !5
  %39 = sitofp <2 x i32> %38 to <2 x double>
  store <2 x double> %39, ptr %37, align 8, !tbaa !9
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 56), align 8, !tbaa !5
  %41 = sitofp i32 %40 to double
  %42 = getelementptr inbounds i8, ptr %0, i64 1200
  store double %41, ptr %42, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %0, i64 1208
  %44 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 60), align 4, !tbaa !5
  %45 = sitofp <2 x i32> %44 to <2 x double>
  store <2 x double> %45, ptr %43, align 8, !tbaa !9
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 68), align 4, !tbaa !5
  %47 = sitofp i32 %46 to double
  %48 = getelementptr inbounds i8, ptr %0, i64 1224
  store double %47, ptr %48, align 8, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %0, i64 1232
  %50 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 72), align 8, !tbaa !5
  %51 = sitofp <2 x i32> %50 to <2 x double>
  store <2 x double> %51, ptr %49, align 8, !tbaa !9
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 80), align 16, !tbaa !5
  %53 = sitofp i32 %52 to double
  %54 = getelementptr inbounds i8, ptr %0, i64 1248
  store double %53, ptr %54, align 8, !tbaa !9
  %55 = getelementptr inbounds i8, ptr %0, i64 1256
  %56 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 84), align 4, !tbaa !5
  %57 = sitofp <2 x i32> %56 to <2 x double>
  store <2 x double> %57, ptr %55, align 8, !tbaa !9
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 92), align 4, !tbaa !5
  %59 = sitofp i32 %58 to double
  %60 = getelementptr inbounds i8, ptr %0, i64 1272
  store double %59, ptr %60, align 8, !tbaa !9
  %61 = getelementptr inbounds i8, ptr %0, i64 1280
  %62 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 96), align 16, !tbaa !5
  %63 = sitofp <2 x i32> %62 to <2 x double>
  store <2 x double> %63, ptr %61, align 8, !tbaa !9
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 104), align 8, !tbaa !5
  %65 = sitofp i32 %64 to double
  %66 = getelementptr inbounds i8, ptr %0, i64 1296
  store double %65, ptr %66, align 8, !tbaa !9
  %67 = getelementptr inbounds i8, ptr %0, i64 1304
  %68 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 108), align 4, !tbaa !5
  %69 = sitofp <2 x i32> %68 to <2 x double>
  store <2 x double> %69, ptr %67, align 8, !tbaa !9
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 116), align 4, !tbaa !5
  %71 = sitofp i32 %70 to double
  %72 = getelementptr inbounds i8, ptr %0, i64 1320
  store double %71, ptr %72, align 8, !tbaa !9
  %73 = getelementptr inbounds i8, ptr %0, i64 1328
  %74 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 120), align 8, !tbaa !5
  %75 = sitofp <2 x i32> %74 to <2 x double>
  store <2 x double> %75, ptr %73, align 8, !tbaa !9
  %76 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 128), align 16, !tbaa !5
  %77 = sitofp i32 %76 to double
  %78 = getelementptr inbounds i8, ptr %0, i64 1344
  store double %77, ptr %78, align 8, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %0, i64 1352
  %80 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 132), align 4, !tbaa !5
  %81 = sitofp <2 x i32> %80 to <2 x double>
  store <2 x double> %81, ptr %79, align 8, !tbaa !9
  %82 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 140), align 4, !tbaa !5
  %83 = sitofp i32 %82 to double
  %84 = getelementptr inbounds i8, ptr %0, i64 1368
  store double %83, ptr %84, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %0, i64 1376
  %86 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 144), align 16, !tbaa !5
  %87 = sitofp <2 x i32> %86 to <2 x double>
  store <2 x double> %87, ptr %85, align 8, !tbaa !9
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 152), align 8, !tbaa !5
  %89 = sitofp i32 %88 to double
  %90 = getelementptr inbounds i8, ptr %0, i64 1392
  store double %89, ptr %90, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %0, i64 1400
  %92 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 156), align 4, !tbaa !5
  %93 = sitofp <2 x i32> %92 to <2 x double>
  store <2 x double> %93, ptr %91, align 8, !tbaa !9
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 164), align 4, !tbaa !5
  %95 = sitofp i32 %94 to double
  %96 = getelementptr inbounds i8, ptr %0, i64 1416
  store double %95, ptr %96, align 8, !tbaa !9
  %97 = getelementptr inbounds i8, ptr %0, i64 1424
  %98 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 168), align 8, !tbaa !5
  %99 = sitofp <2 x i32> %98 to <2 x double>
  store <2 x double> %99, ptr %97, align 8, !tbaa !9
  %100 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 176), align 16, !tbaa !5
  %101 = sitofp i32 %100 to double
  %102 = getelementptr inbounds i8, ptr %0, i64 1440
  store double %101, ptr %102, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %0, i64 1448
  %104 = load <2 x i32>, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 180), align 4, !tbaa !5
  %105 = sitofp <2 x i32> %104 to <2 x double>
  store <2 x double> %105, ptr %103, align 8, !tbaa !9
  %106 = load i32, ptr getelementptr inbounds (i8, ptr @__const.PerlinNoise.g.1, i64 188), align 4, !tbaa !5
  %107 = sitofp i32 %106 to double
  %108 = getelementptr inbounds i8, ptr %0, i64 1464
  store double %107, ptr %108, align 8, !tbaa !9
  %109 = getelementptr inbounds i8, ptr %0, i64 1472
  br label %.preheader

.preheader:                                       ; preds = %.preheader, %.preheader32
  %indvars.iv47 = phi i64 [ 0, %.preheader32 ], [ %indvars.iv.next48.1, %.preheader ]
  %110 = getelementptr inbounds [32 x [4 x i32]], ptr @__const.PerlinNoise.g.2, i64 0, i64 %indvars.iv47, i64 0
  %111 = getelementptr inbounds [32 x [4 x double]], ptr %109, i64 0, i64 %indvars.iv47, i64 0
  %112 = load <2 x i32>, ptr %110, align 16, !tbaa !5
  %113 = sitofp <2 x i32> %112 to <2 x double>
  store <2 x double> %113, ptr %111, align 8, !tbaa !9
  %114 = getelementptr inbounds [32 x [4 x i32]], ptr @__const.PerlinNoise.g.2, i64 0, i64 %indvars.iv47, i64 2
  %115 = getelementptr inbounds [32 x [4 x double]], ptr %109, i64 0, i64 %indvars.iv47, i64 2
  %116 = load <2 x i32>, ptr %114, align 8, !tbaa !5
  %117 = sitofp <2 x i32> %116 to <2 x double>
  store <2 x double> %117, ptr %115, align 8, !tbaa !9
  %indvars.iv.next48 = or disjoint i64 %indvars.iv47, 1
  %118 = getelementptr inbounds [32 x [4 x i32]], ptr @__const.PerlinNoise.g.2, i64 0, i64 %indvars.iv.next48, i64 0
  %119 = getelementptr inbounds [32 x [4 x double]], ptr %109, i64 0, i64 %indvars.iv.next48, i64 0
  %120 = load <2 x i32>, ptr %118, align 16, !tbaa !5
  %121 = sitofp <2 x i32> %120 to <2 x double>
  store <2 x double> %121, ptr %119, align 8, !tbaa !9
  %122 = getelementptr inbounds [32 x [4 x i32]], ptr @__const.PerlinNoise.g.2, i64 0, i64 %indvars.iv.next48, i64 2
  %123 = getelementptr inbounds [32 x [4 x double]], ptr %109, i64 0, i64 %indvars.iv.next48, i64 2
  %124 = load <2 x i32>, ptr %122, align 8, !tbaa !5
  %125 = sitofp <2 x i32> %124 to <2 x double>
  store <2 x double> %125, ptr %123, align 8, !tbaa !9
  %indvars.iv.next48.1 = add nuw nsw i64 %indvars.iv47, 2
  %exitcond50.not.1 = icmp eq i64 %indvars.iv.next48.1, 32
  br i1 %exitcond50.not.1, label %126, label %.preheader, !llvm.loop !11

126:                                              ; preds = %.preheader
  ret void
}

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

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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass