; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision/Shape (HeightFieldShape)

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

%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::HeightFieldShape" = type <{ %"class.JPH::Shape.base", [6 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", i32, i32, i32, i32, i32, i8, i8, i16, i16, [6 x i8], ptr, ptr, ptr, %"class.JPH::Array.9", %"class.JPH::Array.6", i32, [4 x i8] }>
%"class.JPH::Shape.base" = type <{ ptr, %"class.JPH::RefTarget.12", [4 x i8], i64, i8, i8 }>
%"class.JPH::RefTarget.12" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Vec3" = type { %union.anon.3 }
%union.anon.3 = type { <4 x float> }
%"class.JPH::Array.9" = type { i64, i64, ptr }
%"class.JPH::Array.6" = type { i64, i64, ptr }

@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [63 x i8], align 1

; 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH16HeightFieldShape22GetBlockOffsetAndScaleEjjjjRfS1_(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH16HeightFieldShape15GetHeightSampleEjj(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, i64 noundef %6) #5 align 2 {
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.JPH::AssertLastParam", align 1
  %16 = alloca %"struct.JPH::AssertLastParam", align 1
  %17 = alloca %"struct.JPH::AssertLastParam", align 1
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i8, align 1
  %38 = alloca float, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  store i64 %6, ptr %14, align 8, !tbaa !11
  %39 = load ptr, ptr %8, align 8
  %40 = load i32, ptr %11, align 4, !tbaa !9
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %45, label %42

42:                                               ; preds = %7
  %43 = load i32, ptr %12, align 4, !tbaa !9
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %42, %7
  br label %260

46:                                               ; preds = %42
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %50 = load i32, ptr %49, align 4, !tbaa !13
  %51 = urem i32 %48, %50
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %59

53:                                               ; preds = %47
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %56 = load i32, ptr %55, align 4, !tbaa !13
  %57 = urem i32 %54, %56
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %62, label %59

59:                                               ; preds = %53, %47
  %60 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.21, ptr noundef @.str.2, i32 noundef 937)
  br i1 %60, label %61, label %62

61:                                               ; preds = %59
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !25
  br label %62

62:                                               ; preds = %61, %59, %53
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 4
  %67 = load i32, ptr %66, align 16, !tbaa !26
  %68 = icmp ult i32 %65, %67
  br i1 %68, label %69, label %74

69:                                               ; preds = %64
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 4
  %72 = load i32, ptr %71, align 16, !tbaa !26
  %73 = icmp ult i32 %70, %72
  br i1 %73, label %77, label %74

74:                                               ; preds = %69, %64
  %75 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.22, ptr noundef @.str.2, i32 noundef 938)
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !27
  br label %77

77:                                               ; preds = %76, %74, %69
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %9, align 4, !tbaa !9
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = add i32 %80, %81
  %83 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 4
  %84 = load i32, ptr %83, align 16, !tbaa !26
  %85 = icmp ule i32 %82, %84
  br i1 %85, label %86, label %93

86:                                               ; preds = %79
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = add i32 %87, %88
  %90 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 4
  %91 = load i32, ptr %90, align 16, !tbaa !26
  %92 = icmp ule i32 %89, %91
  br i1 %92, label %96, label %93

93:                                               ; preds = %86, %79
  %94 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.23, ptr noundef @.str.2, i32 noundef 939)
  br i1 %94, label %95, label %96

95:                                               ; preds = %93
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !28
  br label %96

96:                                               ; preds = %95, %93, %86
  br label %97

97:                                               ; preds = %96
  %98 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 6
  %99 = load i32, ptr %98, align 8, !tbaa !29
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %132

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %102 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 2
  %103 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %102)
  store float %103, ptr %18, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %125, %101
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = icmp ult i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 8, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %131

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

110:                                              ; preds = %121, %109
  %111 = load i32, ptr %21, align 4, !tbaa !9
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = icmp ult i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 11, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %124

115:                                              ; preds = %110
  %116 = load float, ptr %18, align 4, !tbaa !30
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = load i32, ptr %21, align 4, !tbaa !9
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds float, ptr %117, i64 %119
  store float %116, ptr %120, align 4, !tbaa !30
  br label %121

121:                                              ; preds = %115
  %122 = load i32, ptr %21, align 4, !tbaa !9
  %123 = add i32 %122, 1
  store i32 %123, ptr %21, align 4, !tbaa !9
  br label %110, !llvm.loop !32

124:                                              ; preds = %114
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %19, align 4, !tbaa !9
  %127 = add i32 %126, 1
  store i32 %127, ptr %19, align 4, !tbaa !9
  %128 = load i64, ptr %14, align 8, !tbaa !11
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = getelementptr inbounds float, ptr %129, i64 %128
  store ptr %130, ptr %13, align 8, !tbaa !5
  br label %104, !llvm.loop !34

131:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %260

132:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %133 = call noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176) %39)
  store i32 %133, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %134 = load i32, ptr %22, align 4, !tbaa !9
  %135 = load i32, ptr %22, align 4, !tbaa !9
  %136 = call noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef %135)
  call void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef %134, i32 noundef %136, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %139 = load i32, ptr %138, align 4, !tbaa !13
  %140 = udiv i32 %137, %139
  store i32 %140, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %141 = load i32, ptr %10, align 4, !tbaa !9
  %142 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %143 = load i32, ptr %142, align 4, !tbaa !13
  %144 = udiv i32 %141, %143
  store i32 %144, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %147 = load i32, ptr %146, align 4, !tbaa !13
  %148 = udiv i32 %145, %147
  store i32 %148, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %149 = load i32, ptr %12, align 4, !tbaa !9
  %150 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %151 = load i32, ptr %150, align 4, !tbaa !13
  %152 = udiv i32 %149, %151
  store i32 %152, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %256, %132
  %154 = load i32, ptr %29, align 4, !tbaa !9
  %155 = load i32, ptr %28, align 4, !tbaa !9
  %156 = icmp ult i32 %154, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %153
  store i32 14, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %259

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

159:                                              ; preds = %252, %158
  %160 = load i32, ptr %30, align 4, !tbaa !9
  %161 = load i32, ptr %27, align 4, !tbaa !9
  %162 = icmp ult i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 17, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %255

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %165 = load i32, ptr %25, align 4, !tbaa !9
  %166 = load i32, ptr %30, align 4, !tbaa !9
  %167 = add i32 %165, %166
  %168 = load i32, ptr %26, align 4, !tbaa !9
  %169 = load i32, ptr %29, align 4, !tbaa !9
  %170 = add i32 %168, %169
  %171 = load i32, ptr %23, align 4, !tbaa !9
  %172 = load i32, ptr %24, align 4, !tbaa !9
  call void @_ZNK3JPH16HeightFieldShape22GetBlockOffsetAndScaleEjjjjRfS1_(ptr noundef nonnull align 16 dereferenceable(176) %39, i32 noundef %167, i32 noundef %170, i32 noundef %171, i32 noundef %172, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %173 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 3
  %174 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %173)
  %175 = load float, ptr %32, align 4, !tbaa !30
  %176 = fmul float %175, %174
  store float %176, ptr %32, align 4, !tbaa !30
  %177 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 2
  %178 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %177)
  %179 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 3
  %180 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %179)
  %181 = load float, ptr %31, align 4, !tbaa !30
  %182 = call float @llvm.fmuladd.f32(float %180, float %181, float %178)
  %183 = load float, ptr %32, align 4, !tbaa !30
  %184 = call float @llvm.fmuladd.f32(float 5.000000e-01, float %183, float %182)
  store float %184, ptr %31, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %248, %164
  %186 = load i32, ptr %33, align 4, !tbaa !9
  %187 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %188 = load i32, ptr %187, align 4, !tbaa !13
  %189 = icmp ult i32 %186, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %185
  store i32 20, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %251

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

192:                                              ; preds = %244, %191
  %193 = load i32, ptr %34, align 4, !tbaa !9
  %194 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %195 = load i32, ptr %194, align 4, !tbaa !13
  %196 = icmp ult i32 %193, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %192
  store i32 23, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %247

198:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  %199 = load i32, ptr %30, align 4, !tbaa !9
  %200 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %201 = load i32, ptr %200, align 4, !tbaa !13
  %202 = mul i32 %199, %201
  %203 = load i32, ptr %34, align 4, !tbaa !9
  %204 = add i32 %202, %203
  store i32 %204, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  %205 = load i32, ptr %29, align 4, !tbaa !9
  %206 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 5
  %207 = load i32, ptr %206, align 4, !tbaa !13
  %208 = mul i32 %205, %207
  %209 = load i32, ptr %33, align 4, !tbaa !9
  %210 = add i32 %208, %209
  store i32 %210, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #6
  %211 = load i32, ptr %9, align 4, !tbaa !9
  %212 = load i32, ptr %35, align 4, !tbaa !9
  %213 = add i32 %211, %212
  %214 = load i32, ptr %10, align 4, !tbaa !9
  %215 = load i32, ptr %36, align 4, !tbaa !9
  %216 = add i32 %214, %215
  %217 = call noundef zeroext i8 @_ZNK3JPH16HeightFieldShape15GetHeightSampleEjj(ptr noundef nonnull align 16 dereferenceable(176) %39, i32 noundef %213, i32 noundef %216)
  store i8 %217, ptr %37, align 1, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  %218 = load i8, ptr %37, align 1, !tbaa !35
  %219 = zext i8 %218 to i32
  %220 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %39, i32 0, i32 10
  %221 = load i8, ptr %220, align 1, !tbaa !36
  %222 = zext i8 %221 to i32
  %223 = icmp ne i32 %219, %222
  br i1 %223, label %224, label %231

224:                                              ; preds = %198
  %225 = load float, ptr %31, align 4, !tbaa !30
  %226 = load i8, ptr %37, align 1, !tbaa !35
  %227 = zext i8 %226 to i32
  %228 = sitofp i32 %227 to float
  %229 = load float, ptr %32, align 4, !tbaa !30
  %230 = call float @llvm.fmuladd.f32(float %228, float %229, float %225)
  br label %232

231:                                              ; preds = %198
  br label %232

232:                                              ; preds = %231, %224
  %233 = phi float [ %230, %224 ], [ 0x47EFFFFFE0000000, %231 ]
  store float %233, ptr %38, align 4, !tbaa !30
  %234 = load float, ptr %38, align 4, !tbaa !30
  %235 = load ptr, ptr %13, align 8, !tbaa !5
  %236 = load i32, ptr %36, align 4, !tbaa !9
  %237 = zext i32 %236 to i64
  %238 = load i64, ptr %14, align 8, !tbaa !11
  %239 = mul nsw i64 %237, %238
  %240 = load i32, ptr %35, align 4, !tbaa !9
  %241 = zext i32 %240 to i64
  %242 = add nsw i64 %239, %241
  %243 = getelementptr inbounds float, ptr %235, i64 %242
  store float %234, ptr %243, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %244

244:                                              ; preds = %232
  %245 = load i32, ptr %34, align 4, !tbaa !9
  %246 = add i32 %245, 1
  store i32 %246, ptr %34, align 4, !tbaa !9
  br label %192, !llvm.loop !37

247:                                              ; preds = %197
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %33, align 4, !tbaa !9
  %250 = add i32 %249, 1
  store i32 %250, ptr %33, align 4, !tbaa !9
  br label %185, !llvm.loop !38

251:                                              ; preds = %190
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %252

252:                                              ; preds = %251
  %253 = load i32, ptr %30, align 4, !tbaa !9
  %254 = add i32 %253, 1
  store i32 %254, ptr %30, align 4, !tbaa !9
  br label %159, !llvm.loop !39

255:                                              ; preds = %163
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %29, align 4, !tbaa !9
  %258 = add i32 %257, 1
  store i32 %258, ptr %29, align 4, !tbaa !9
  br label %153, !llvm.loop !40

259:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %260

260:                                              ; preds = %259, %131, %45
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #2 = { alwaysinline 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 #3 = { inlinehint 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 68}
!14 = !{!"_ZTSN3JPH16HeightFieldShapeE", !15, i64 0, !21, i64 32, !21, i64 48, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !7, i64 84, !7, i64 85, !22, i64 86, !22, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !23, i64 120, !24, i64 144, !10, i64 168}
!15 = !{!"_ZTSN3JPH5ShapeE", !16, i64 8, !12, i64 16, !19, i64 24, !20, i64 25}
!16 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!19 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!20 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!21 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !12, i64 0, !12, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !12, i64 0, !12, i64 8, !6, i64 16}
!25 = !{i64 2158615249}
!26 = !{!14, !10, i64 64}
!27 = !{i64 2158615639}
!28 = !{i64 2158616073}
!29 = !{!14, !10, i64 72}
!30 = !{!31, !31, i64 0}
!31 = !{!"float", !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}
!35 = !{!7, !7, i64 0}
!36 = !{!14, !7, i64 85}
!37 = distinct !{!37, !33}
!38 = distinct !{!38, !33}
!39 = distinct !{!39, !33}
!40 = distinct !{!40, !33}


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

@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [63 x i8], align 1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH16HeightFieldShape22GetBlockOffsetAndScaleEjjjjRfS1_(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH16HeightFieldShape15GetHeightSampleEjj(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr nocapture noundef writeonly %5, i64 noundef %6) local_unnamed_addr #5 align 2 {
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = icmp eq i32 %3, 0
  %13 = icmp eq i32 %4, 0
  %or.cond = or i1 %12, %13
  br i1 %or.cond, label %.loopexit, label %14

14:                                               ; preds = %7
  %15 = getelementptr inbounds i8, ptr %0, i64 68
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = urem i32 %1, %16
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %22

19:                                               ; preds = %14
  %20 = urem i32 %2, %16
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %25, label %22

22:                                               ; preds = %19, %14
  %23 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.2, i32 noundef 937)
  br i1 %23, label %24, label %25

24:                                               ; preds = %22
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !22
  br label %25

25:                                               ; preds = %24, %22, %19
  %26 = getelementptr inbounds i8, ptr %0, i64 64
  %27 = load i32, ptr %26, align 16, !tbaa !23
  %28 = icmp ugt i32 %27, %1
  %29 = icmp ugt i32 %27, %2
  %or.cond71 = and i1 %28, %29
  br i1 %or.cond71, label %33, label %30

30:                                               ; preds = %25
  %31 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.2, i32 noundef 938)
  br i1 %31, label %32, label %33

32:                                               ; preds = %30
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !24
  br label %33

33:                                               ; preds = %25, %32, %30
  %34 = add i32 %3, %1
  %35 = load i32, ptr %26, align 16, !tbaa !23
  %.not = icmp ugt i32 %34, %35
  %36 = add i32 %4, %2
  %.not69 = icmp ugt i32 %36, %35
  %or.cond72 = or i1 %.not, %.not69
  br i1 %or.cond72, label %37, label %40

37:                                               ; preds = %33
  %38 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.2, i32 noundef 939)
  br i1 %38, label %39, label %40

39:                                               ; preds = %37
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !25
  br label %40

40:                                               ; preds = %33, %37, %39
  %41 = getelementptr inbounds i8, ptr %0, i64 72
  %42 = load i32, ptr %41, align 8, !tbaa !26
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %.preheader.us.preheader, label %52

.preheader.us.preheader:                          ; preds = %40
  %44 = getelementptr inbounds i8, ptr %0, i64 32
  %45 = tail call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %44)
  %wide.trip.count = zext i32 %3 to i64
  %min.iters.check = icmp ult i32 %3, 8
  %n.vec = and i64 %wide.trip.count, 4294967288
  %broadcast.splatinsert = insertelement <4 x float> poison, float %45, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us92
  %.090.us = phi ptr [ %51, %._crit_edge.us92 ], [ %5, %.preheader.us.preheader ]
  %.05789.us = phi i32 [ %50, %._crit_edge.us92 ], [ 0, %.preheader.us.preheader ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader.us ]
  %46 = getelementptr inbounds float, ptr %.090.us, i64 %index
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  store <4 x float> %broadcast.splat, ptr %46, align 4, !tbaa !27
  store <4 x float> %broadcast.splat, ptr %47, align 4, !tbaa !27
  %index.next = add nuw i64 %index, 8
  %48 = icmp eq i64 %index.next, %n.vec
  br i1 %48, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us92, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %49 = getelementptr inbounds float, ptr %.090.us, i64 %indvars.iv
  store float %45, ptr %49, align 4, !tbaa !27
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us92, label %scalar.ph, !llvm.loop !33

._crit_edge.us92:                                 ; preds = %scalar.ph, %middle.block
  %50 = add nuw i32 %.05789.us, 1
  %51 = getelementptr inbounds float, ptr %.090.us, i64 %6
  %exitcond104.not = icmp eq i32 %50, %4
  br i1 %exitcond104.not, label %.loopexit, label %.preheader.us, !llvm.loop !34

52:                                               ; preds = %40
  %53 = tail call noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %54 = tail call noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef %53)
  call void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef %53, i32 noundef %54, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %55 = load i32, ptr %15, align 4, !tbaa !5
  %56 = udiv i32 %1, %55
  %57 = udiv i32 %2, %55
  %58 = udiv i32 %3, %55
  %59 = udiv i32 %4, %55
  %.not93 = icmp ugt i32 %55, %4
  br i1 %.not93, label %._crit_edge83, label %.preheader74.lr.ph

.preheader74.lr.ph:                               ; preds = %52
  %.not94 = icmp ugt i32 %55, %3
  %60 = getelementptr inbounds i8, ptr %0, i64 48
  %61 = getelementptr inbounds i8, ptr %0, i64 32
  %62 = getelementptr inbounds i8, ptr %0, i64 85
  br i1 %.not94, label %._crit_edge83, label %.preheader74.us

.preheader74.us:                                  ; preds = %.preheader74.lr.ph, %._crit_edge81.us
  %.06282.us = phi i32 [ %107, %._crit_edge81.us ], [ 0, %.preheader74.lr.ph ]
  %63 = add i32 %.06282.us, %57
  br label %64

64:                                               ; preds = %.preheader74.us, %._crit_edge77.us
  %.06178.us = phi i32 [ 0, %.preheader74.us ], [ %78, %._crit_edge77.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %65 = add i32 %.06178.us, %56
  %66 = load i32, ptr %8, align 4, !tbaa !35
  %67 = load i32, ptr %9, align 4, !tbaa !35
  call void @_ZNK3JPH16HeightFieldShape22GetBlockOffsetAndScaleEjjjjRfS1_(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %65, i32 noundef %63, i32 noundef %66, i32 noundef %67, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %68 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %60)
  %69 = load float, ptr %11, align 4, !tbaa !27
  %70 = fmul float %68, %69
  store float %70, ptr %11, align 4, !tbaa !27
  %71 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %61)
  %72 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %60)
  %73 = load float, ptr %10, align 4, !tbaa !27
  %74 = call float @llvm.fmuladd.f32(float %72, float %73, float %71)
  %75 = load float, ptr %11, align 4, !tbaa !27
  %76 = call float @llvm.fmuladd.f32(float %75, float 5.000000e-01, float %74)
  store float %76, ptr %10, align 4, !tbaa !27
  %77 = load i32, ptr %15, align 4, !tbaa !5
  %.not95 = icmp eq i32 %77, 0
  br i1 %.not95, label %._crit_edge77.us, label %.lr.ph.us.preheader

._crit_edge77.us:                                 ; preds = %._crit_edge.us, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  %78 = add nuw i32 %.06178.us, 1
  %79 = icmp ult i32 %78, %58
  br i1 %79, label %64, label %._crit_edge81.us, !llvm.loop !36

._crit_edge.us:                                   ; preds = %96
  %80 = add nuw i32 %.06076.us85, 1
  %81 = icmp ult i32 %80, %104
  br i1 %81, label %.lr.ph.us.preheader, label %._crit_edge77.us, !llvm.loop !37

.lr.ph.us:                                        ; preds = %.lr.ph.us.preheader, %96
  %82 = phi i32 [ %104, %96 ], [ %106, %.lr.ph.us.preheader ]
  %.05975.us = phi i32 [ %103, %96 ], [ 0, %.lr.ph.us.preheader ]
  %83 = mul i32 %82, %.06178.us
  %84 = add i32 %83, %.05975.us
  %85 = mul i32 %82, %.06282.us
  %86 = add i32 %85, %.06076.us85
  %87 = add i32 %84, %1
  %88 = add i32 %86, %2
  %89 = call noundef zeroext i8 @_ZNK3JPH16HeightFieldShape15GetHeightSampleEjj(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %87, i32 noundef %88)
  %90 = load i8, ptr %62, align 1, !tbaa !39
  %.not70.us = icmp eq i8 %89, %90
  br i1 %.not70.us, label %96, label %91

91:                                               ; preds = %.lr.ph.us
  %92 = load float, ptr %10, align 4, !tbaa !27
  %93 = uitofp i8 %89 to float
  %94 = load float, ptr %11, align 4, !tbaa !27
  %95 = call float @llvm.fmuladd.f32(float %93, float %94, float %92)
  br label %96

96:                                               ; preds = %91, %.lr.ph.us
  %97 = phi float [ %95, %91 ], [ 0x47EFFFFFE0000000, %.lr.ph.us ]
  %98 = zext i32 %86 to i64
  %99 = mul nsw i64 %98, %6
  %100 = zext i32 %84 to i64
  %101 = getelementptr float, ptr %5, i64 %99
  %102 = getelementptr float, ptr %101, i64 %100
  store float %97, ptr %102, align 4, !tbaa !27
  %103 = add nuw i32 %.05975.us, 1
  %104 = load i32, ptr %15, align 4, !tbaa !5
  %105 = icmp ult i32 %103, %104
  br i1 %105, label %.lr.ph.us, label %._crit_edge.us, !llvm.loop !40

.lr.ph.us.preheader:                              ; preds = %64, %._crit_edge.us
  %106 = phi i32 [ %104, %._crit_edge.us ], [ %77, %64 ]
  %.06076.us85 = phi i32 [ %80, %._crit_edge.us ], [ 0, %64 ]
  br label %.lr.ph.us

._crit_edge81.us:                                 ; preds = %._crit_edge77.us
  %107 = add nuw i32 %.06282.us, 1
  %108 = icmp ult i32 %107, %59
  br i1 %108, label %.preheader74.us, label %._crit_edge83, !llvm.loop !41

._crit_edge83:                                    ; preds = %._crit_edge81.us, %.preheader74.lr.ph, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge.us92, %7, %._crit_edge83
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 #2 = { alwaysinline 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 #3 = { inlinehint 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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, !11, i64 68}
!6 = !{!"_ZTSN3JPH16HeightFieldShapeE", !7, i64 0, !17, i64 32, !17, i64 48, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !12, i64 84, !12, i64 85, !18, i64 86, !18, i64 88, !19, i64 96, !19, i64 104, !19, i64 112, !20, i64 120, !21, i64 144, !11, i64 168}
!7 = !{!"_ZTSN3JPH5ShapeE", !8, i64 8, !14, i64 16, !15, i64 24, !16, i64 25}
!8 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !9, i64 0}
!9 = !{!"_ZTSSt6atomicIjE", !10, i64 0}
!10 = !{!"_ZTSSt13__atomic_baseIjE", !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"long", !12, i64 0}
!15 = !{!"_ZTSN3JPH10EShapeTypeE", !12, i64 0}
!16 = !{!"_ZTSN3JPH13EShapeSubTypeE", !12, i64 0}
!17 = !{!"_ZTSN3JPH4Vec3E", !12, i64 0}
!18 = !{!"short", !12, i64 0}
!19 = !{!"any pointer", !12, i64 0}
!20 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !14, i64 0, !14, i64 8, !19, i64 16}
!21 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !14, i64 0, !14, i64 8, !19, i64 16}
!22 = !{i64 2158615249}
!23 = !{!6, !11, i64 64}
!24 = !{i64 2158615639}
!25 = !{i64 2158616073}
!26 = !{!6, !11, i64 72}
!27 = !{!28, !28, i64 0}
!28 = !{!"float", !12, i64 0}
!29 = distinct !{!29, !30, !31, !32}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!"llvm.loop.isvectorized", i32 1}
!32 = !{!"llvm.loop.unroll.runtime.disable"}
!33 = distinct !{!33, !30, !32, !31}
!34 = distinct !{!34, !30}
!35 = !{!11, !11, i64 0}
!36 = distinct !{!36, !30}
!37 = distinct !{!37, !30, !38}
!38 = !{!"llvm.loop.unswitch.partial.disable"}
!39 = !{!6, !12, i64 85}
!40 = distinct !{!40, !30}
!41 = distinct !{!41, !30}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass