; 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 }
%"struct.JPH::HeightFieldShape::RangeBlock" = type { [4 x i16], [4 x i16] }

@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [34 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
@.str.24 = external hidden unnamed_addr constant [23 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: 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) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5floorf(float noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef, float noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16)) #5 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: alwaysinline mustprogress uwtable
declare dso_local noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) #6

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

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

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

; 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShape10SetHeightsEjjjjPKflRNS_13TempAllocatorEf(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, ptr noundef nonnull align 8 dereferenceable(8) %7, float noundef %8) #4 align 2 {
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca float, align 4
  %19 = alloca %"struct.JPH::AssertLastParam", align 1
  %20 = alloca %"struct.JPH::AssertLastParam", align 1
  %21 = alloca %"struct.JPH::AssertLastParam", align 1
  %22 = alloca %"struct.JPH::AssertLastParam", align 1
  %23 = alloca i8, align 1
  %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 ptr, align 8
  %31 = alloca i64, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca i32, align 4
  %62 = alloca i32, align 4
  %63 = alloca i32, align 4
  %64 = alloca float, align 4
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  %67 = alloca ptr, align 8
  %68 = alloca i32, align 4
  %69 = alloca float, align 4
  %70 = alloca float, align 4
  %71 = alloca float, align 4
  %72 = alloca float, align 4
  %73 = alloca i32, align 4
  %74 = alloca i32, align 4
  %75 = alloca float, align 4
  %76 = alloca i8, align 1
  %77 = alloca i32, align 4
  %78 = alloca i32, align 4
  %79 = alloca i32, align 4
  %80 = alloca %"struct.JPH::AssertLastParam", align 1
  %81 = alloca ptr, align 8
  %82 = alloca i16, align 2
  %83 = alloca i32, align 4
  %84 = alloca i32, align 4
  %85 = alloca i32, align 4
  %86 = alloca i32, align 4
  %87 = alloca i32, align 4
  %88 = alloca i32, align 4
  %89 = alloca i32, align 4
  %90 = alloca i32, align 4
  %91 = alloca i32, align 4
  %92 = alloca i32, align 4
  %93 = alloca i32, align 4
  %94 = alloca i32, align 4
  %95 = alloca i32, align 4
  %96 = alloca i32, align 4
  %97 = alloca ptr, align 8
  %98 = alloca i32, align 4
  %99 = alloca i16, align 2
  %100 = alloca i16, align 2
  %101 = alloca i32, align 4
  %102 = alloca ptr, align 8
  %103 = alloca i32, align 4
  %104 = alloca i32, align 4
  %105 = alloca i32, align 4
  %106 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !9
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  store i32 %4, ptr %14, align 4, !tbaa !9
  store ptr %5, ptr %15, align 8, !tbaa !5
  store i64 %6, ptr %16, align 8, !tbaa !11
  store ptr %7, ptr %17, align 8, !tbaa !5
  store float %8, ptr %18, align 4, !tbaa !13
  %107 = load ptr, ptr %10, align 8
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = icmp eq i32 %108, 0
  br i1 %109, label %113, label %110

110:                                              ; preds = %9
  %111 = load i32, ptr %14, align 4, !tbaa !9
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %114

113:                                              ; preds = %110, %9
  br label %894

114:                                              ; preds = %110
  br label %115

115:                                              ; preds = %114
  %116 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 6
  %117 = load i32, ptr %116, align 8, !tbaa !15
  %118 = icmp ugt i32 %117, 0
  br i1 %118, label %122, label %119

119:                                              ; preds = %115
  %120 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.24, ptr noundef @.str.2, i32 noundef 998)
  br i1 %120, label %121, label %122

121:                                              ; preds = %119
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !27
  br label %122

122:                                              ; preds = %121, %119, %115
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %127 = load i32, ptr %126, align 4, !tbaa !28
  %128 = urem i32 %125, %127
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %136

130:                                              ; preds = %124
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %133 = load i32, ptr %132, align 4, !tbaa !28
  %134 = urem i32 %131, %133
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %139, label %136

136:                                              ; preds = %130, %124
  %137 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.21, ptr noundef @.str.2, i32 noundef 999)
  br i1 %137, label %138, label %139

138:                                              ; preds = %136
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !29
  br label %139

139:                                              ; preds = %138, %136, %130
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %11, align 4, !tbaa !9
  %143 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %144 = load i32, ptr %143, align 16, !tbaa !30
  %145 = icmp ult i32 %142, %144
  br i1 %145, label %146, label %151

146:                                              ; preds = %141
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %149 = load i32, ptr %148, align 16, !tbaa !30
  %150 = icmp ult i32 %147, %149
  br i1 %150, label %154, label %151

151:                                              ; preds = %146, %141
  %152 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.22, ptr noundef @.str.2, i32 noundef 1000)
  br i1 %152, label %153, label %154

153:                                              ; preds = %151
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !31
  br label %154

154:                                              ; preds = %153, %151, %146
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %11, align 4, !tbaa !9
  %158 = load i32, ptr %13, align 4, !tbaa !9
  %159 = add i32 %157, %158
  %160 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %161 = load i32, ptr %160, align 16, !tbaa !30
  %162 = icmp ule i32 %159, %161
  br i1 %162, label %163, label %170

163:                                              ; preds = %156
  %164 = load i32, ptr %12, align 4, !tbaa !9
  %165 = load i32, ptr %14, align 4, !tbaa !9
  %166 = add i32 %164, %165
  %167 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %168 = load i32, ptr %167, align 16, !tbaa !30
  %169 = icmp ule i32 %166, %168
  br i1 %169, label %173, label %170

170:                                              ; preds = %163, %156
  %171 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.23, ptr noundef @.str.2, i32 noundef 1001)
  br i1 %171, label %172, label %173

172:                                              ; preds = %170
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !32
  br label %173

173:                                              ; preds = %172, %170, %163
  br label %174

174:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #8
  store i8 0, ptr %23, align 1, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %175 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %175, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %176 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %176, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %177 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %177, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %178 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %178, ptr %27, align 4, !tbaa !9
  %179 = load i32, ptr %11, align 4, !tbaa !9
  %180 = icmp ugt i32 %179, 0
  br i1 %180, label %181, label %190

181:                                              ; preds = %174
  %182 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %183 = load i32, ptr %182, align 4, !tbaa !28
  %184 = load i32, ptr %24, align 4, !tbaa !9
  %185 = sub i32 %184, %183
  store i32 %185, ptr %24, align 4, !tbaa !9
  %186 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %187 = load i32, ptr %186, align 4, !tbaa !28
  %188 = load i32, ptr %26, align 4, !tbaa !9
  %189 = add i32 %188, %187
  store i32 %189, ptr %26, align 4, !tbaa !9
  store i8 1, ptr %23, align 1, !tbaa !33
  br label %190

190:                                              ; preds = %181, %174
  %191 = load i32, ptr %12, align 4, !tbaa !9
  %192 = icmp ugt i32 %191, 0
  br i1 %192, label %193, label %202

193:                                              ; preds = %190
  %194 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %195 = load i32, ptr %194, align 4, !tbaa !28
  %196 = load i32, ptr %25, align 4, !tbaa !9
  %197 = sub i32 %196, %195
  store i32 %197, ptr %25, align 4, !tbaa !9
  %198 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %199 = load i32, ptr %198, align 4, !tbaa !28
  %200 = load i32, ptr %27, align 4, !tbaa !9
  %201 = add i32 %200, %199
  store i32 %201, ptr %27, align 4, !tbaa !9
  store i8 1, ptr %23, align 1, !tbaa !33
  br label %202

202:                                              ; preds = %193, %190
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %203 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %203, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %204 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %204, ptr %29, align 4, !tbaa !9
  %205 = load i32, ptr %11, align 4, !tbaa !9
  %206 = load i32, ptr %13, align 4, !tbaa !9
  %207 = add i32 %205, %206
  %208 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %209 = load i32, ptr %208, align 16, !tbaa !30
  %210 = icmp ult i32 %207, %209
  br i1 %210, label %211, label %216

211:                                              ; preds = %202
  %212 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %213 = load i32, ptr %212, align 4, !tbaa !28
  %214 = load i32, ptr %28, align 4, !tbaa !9
  %215 = add i32 %214, %213
  store i32 %215, ptr %28, align 4, !tbaa !9
  store i8 1, ptr %23, align 1, !tbaa !33
  br label %216

216:                                              ; preds = %211, %202
  %217 = load i32, ptr %12, align 4, !tbaa !9
  %218 = load i32, ptr %14, align 4, !tbaa !9
  %219 = add i32 %217, %218
  %220 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %221 = load i32, ptr %220, align 16, !tbaa !30
  %222 = icmp ult i32 %219, %221
  br i1 %222, label %223, label %228

223:                                              ; preds = %216
  %224 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %225 = load i32, ptr %224, align 4, !tbaa !28
  %226 = load i32, ptr %29, align 4, !tbaa !9
  %227 = add i32 %226, %225
  store i32 %227, ptr %29, align 4, !tbaa !9
  store i8 1, ptr %23, align 1, !tbaa !33
  br label %228

228:                                              ; preds = %223, %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %229 = load i8, ptr %23, align 1, !tbaa !33, !range !35, !noundef !36
  %230 = trunc i8 %229 to i1
  br i1 %230, label %231, label %341

231:                                              ; preds = %228
  %232 = load ptr, ptr %17, align 8, !tbaa !5
  %233 = load i32, ptr %28, align 4, !tbaa !9
  %234 = load i32, ptr %29, align 4, !tbaa !9
  %235 = mul i32 %233, %234
  %236 = zext i32 %235 to i64
  %237 = mul i64 %236, 4
  %238 = trunc i64 %237 to i32
  %239 = load ptr, ptr %232, align 8, !tbaa !37
  %240 = getelementptr inbounds ptr, ptr %239, i64 2
  %241 = load ptr, ptr %240, align 8
  %242 = call noundef ptr %241(ptr noundef nonnull align 8 dereferenceable(8) %232, i32 noundef %238)
  store ptr %242, ptr %32, align 8, !tbaa !5
  %243 = load ptr, ptr %32, align 8, !tbaa !5
  store ptr %243, ptr %30, align 8, !tbaa !5
  %244 = load i32, ptr %28, align 4, !tbaa !9
  %245 = zext i32 %244 to i64
  store i64 %245, ptr %31, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %246 = load i32, ptr %11, align 4, !tbaa !9
  %247 = load i32, ptr %24, align 4, !tbaa !9
  %248 = sub i32 %246, %247
  store i32 %248, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %249 = load i32, ptr %12, align 4, !tbaa !9
  %250 = load i32, ptr %25, align 4, !tbaa !9
  %251 = sub i32 %249, %250
  store i32 %251, ptr %34, align 4, !tbaa !9
  %252 = load i32, ptr %24, align 4, !tbaa !9
  %253 = load i32, ptr %25, align 4, !tbaa !9
  %254 = load i32, ptr %28, align 4, !tbaa !9
  %255 = load i32, ptr %34, align 4, !tbaa !9
  %256 = load ptr, ptr %32, align 8, !tbaa !5
  %257 = load i32, ptr %28, align 4, !tbaa !9
  %258 = zext i32 %257 to i64
  call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %252, i32 noundef %253, i32 noundef %254, i32 noundef %255, ptr noundef %256, i64 noundef %258)
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #8
  %259 = load ptr, ptr %32, align 8, !tbaa !5
  %260 = load i32, ptr %34, align 4, !tbaa !9
  %261 = load i32, ptr %28, align 4, !tbaa !9
  %262 = mul i32 %260, %261
  %263 = zext i32 %262 to i64
  %264 = getelementptr inbounds float, ptr %259, i64 %263
  store ptr %264, ptr %35, align 8, !tbaa !5
  %265 = load i32, ptr %24, align 4, !tbaa !9
  %266 = load i32, ptr %12, align 4, !tbaa !9
  %267 = load i32, ptr %33, align 4, !tbaa !9
  %268 = load i32, ptr %14, align 4, !tbaa !9
  %269 = load ptr, ptr %35, align 8, !tbaa !5
  %270 = load i32, ptr %28, align 4, !tbaa !9
  %271 = zext i32 %270 to i64
  call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %265, i32 noundef %266, i32 noundef %267, i32 noundef %268, ptr noundef %269, i64 noundef %271)
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %272 = load ptr, ptr %35, align 8, !tbaa !5
  %273 = load i32, ptr %33, align 4, !tbaa !9
  %274 = zext i32 %273 to i64
  %275 = getelementptr inbounds float, ptr %272, i64 %274
  store ptr %275, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  store i32 0, ptr %37, align 4, !tbaa !9
  br label %276

276:                                              ; preds = %287, %231
  %277 = load i32, ptr %37, align 4, !tbaa !9
  %278 = load i32, ptr %14, align 4, !tbaa !9
  %279 = icmp ult i32 %277, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %276
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %297

281:                                              ; preds = %276
  %282 = load ptr, ptr %36, align 8, !tbaa !5
  %283 = load ptr, ptr %15, align 8, !tbaa !5
  %284 = load i32, ptr %13, align 4, !tbaa !9
  %285 = zext i32 %284 to i64
  %286 = mul i64 %285, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %282, ptr align 4 %283, i64 %286, i1 false)
  br label %287

287:                                              ; preds = %281
  %288 = load i32, ptr %37, align 4, !tbaa !9
  %289 = add i32 %288, 1
  store i32 %289, ptr %37, align 4, !tbaa !9
  %290 = load i32, ptr %28, align 4, !tbaa !9
  %291 = load ptr, ptr %36, align 8, !tbaa !5
  %292 = zext i32 %290 to i64
  %293 = getelementptr inbounds float, ptr %291, i64 %292
  store ptr %293, ptr %36, align 8, !tbaa !5
  %294 = load i64, ptr %16, align 8, !tbaa !11
  %295 = load ptr, ptr %15, align 8, !tbaa !5
  %296 = getelementptr inbounds float, ptr %295, i64 %294
  store ptr %296, ptr %15, align 8, !tbaa !5
  br label %276, !llvm.loop !39

297:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  %298 = load i32, ptr %11, align 4, !tbaa !9
  %299 = load i32, ptr %13, align 4, !tbaa !9
  %300 = add i32 %298, %299
  store i32 %300, ptr %38, align 4, !tbaa !9
  %301 = load i32, ptr %38, align 4, !tbaa !9
  %302 = load i32, ptr %12, align 4, !tbaa !9
  %303 = load i32, ptr %24, align 4, !tbaa !9
  %304 = load i32, ptr %28, align 4, !tbaa !9
  %305 = add i32 %303, %304
  %306 = load i32, ptr %38, align 4, !tbaa !9
  %307 = sub i32 %305, %306
  %308 = load i32, ptr %14, align 4, !tbaa !9
  %309 = load ptr, ptr %35, align 8, !tbaa !5
  %310 = load i32, ptr %38, align 4, !tbaa !9
  %311 = zext i32 %310 to i64
  %312 = getelementptr inbounds float, ptr %309, i64 %311
  %313 = load i32, ptr %24, align 4, !tbaa !9
  %314 = zext i32 %313 to i64
  %315 = sub i64 0, %314
  %316 = getelementptr inbounds float, ptr %312, i64 %315
  %317 = load i32, ptr %28, align 4, !tbaa !9
  %318 = zext i32 %317 to i64
  call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %301, i32 noundef %302, i32 noundef %307, i32 noundef %308, ptr noundef %316, i64 noundef %318)
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %319 = load i32, ptr %12, align 4, !tbaa !9
  %320 = load i32, ptr %14, align 4, !tbaa !9
  %321 = add i32 %319, %320
  store i32 %321, ptr %39, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %322 = load ptr, ptr %32, align 8, !tbaa !5
  %323 = load i32, ptr %39, align 4, !tbaa !9
  %324 = load i32, ptr %25, align 4, !tbaa !9
  %325 = sub i32 %323, %324
  %326 = load i32, ptr %28, align 4, !tbaa !9
  %327 = mul i32 %325, %326
  %328 = zext i32 %327 to i64
  %329 = getelementptr inbounds float, ptr %322, i64 %328
  store ptr %329, ptr %40, align 8, !tbaa !5
  %330 = load i32, ptr %24, align 4, !tbaa !9
  %331 = load i32, ptr %39, align 4, !tbaa !9
  %332 = load i32, ptr %28, align 4, !tbaa !9
  %333 = load i32, ptr %25, align 4, !tbaa !9
  %334 = load i32, ptr %29, align 4, !tbaa !9
  %335 = add i32 %333, %334
  %336 = load i32, ptr %39, align 4, !tbaa !9
  %337 = sub i32 %335, %336
  %338 = load ptr, ptr %40, align 8, !tbaa !5
  %339 = load i32, ptr %28, align 4, !tbaa !9
  %340 = zext i32 %339 to i64
  call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %330, i32 noundef %331, i32 noundef %332, i32 noundef %337, ptr noundef %338, i64 noundef %340)
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %344

341:                                              ; preds = %228
  %342 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %342, ptr %30, align 8, !tbaa !5
  %343 = load i64, ptr %16, align 8, !tbaa !11
  store i64 %343, ptr %31, align 8, !tbaa !11
  store ptr null, ptr %32, align 8, !tbaa !5
  br label %344

344:                                              ; preds = %341, %297
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %345 = call noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176) %107)
  store i32 %345, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  %346 = load i32, ptr %41, align 4, !tbaa !9
  %347 = call noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef %346)
  store i32 %347, ptr %44, align 4, !tbaa !9
  %348 = load i32, ptr %41, align 4, !tbaa !9
  %349 = load i32, ptr %44, align 4, !tbaa !9
  call void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef %348, i32 noundef %349, ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %43)
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  %350 = load i32, ptr %24, align 4, !tbaa !9
  %351 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %352 = load i32, ptr %351, align 4, !tbaa !28
  %353 = udiv i32 %350, %352
  store i32 %353, ptr %45, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  %354 = load i32, ptr %25, align 4, !tbaa !9
  %355 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %356 = load i32, ptr %355, align 4, !tbaa !28
  %357 = udiv i32 %354, %356
  store i32 %357, ptr %46, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  %358 = load i32, ptr %26, align 4, !tbaa !9
  %359 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %360 = load i32, ptr %359, align 4, !tbaa !28
  %361 = udiv i32 %358, %360
  store i32 %361, ptr %47, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  %362 = load i32, ptr %27, align 4, !tbaa !9
  %363 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %364 = load i32, ptr %363, align 4, !tbaa !28
  %365 = udiv i32 %362, %364
  store i32 %365, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  store i32 0, ptr %49, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  store i32 0, ptr %50, align 4, !tbaa !9
  br label %366

366:                                              ; preds = %648, %344
  %367 = load i32, ptr %49, align 4, !tbaa !9
  %368 = load i32, ptr %48, align 4, !tbaa !9
  %369 = icmp ult i32 %367, %368
  br i1 %369, label %371, label %370

370:                                              ; preds = %366
  store i32 13, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  br label %655

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

372:                                              ; preds = %640, %371
  %373 = load i32, ptr %52, align 4, !tbaa !9
  %374 = load i32, ptr %47, align 4, !tbaa !9
  %375 = icmp ult i32 %373, %374
  br i1 %375, label %377, label %376

376:                                              ; preds = %372
  store i32 16, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #8
  br label %647

377:                                              ; preds = %372
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #8
  store i32 65535, ptr %54, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #8
  store i32 0, ptr %55, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #8
  %378 = load i32, ptr %53, align 4, !tbaa !9
  %379 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %380 = load i32, ptr %379, align 4, !tbaa !28
  %381 = add i32 %378, %380
  %382 = add i32 %381, 1
  store i32 %382, ptr %57, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #8
  %383 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %384 = load i32, ptr %383, align 16, !tbaa !30
  %385 = load i32, ptr %24, align 4, !tbaa !9
  %386 = sub i32 %384, %385
  store i32 %386, ptr %58, align 4, !tbaa !9
  %387 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %57, ptr noundef nonnull align 4 dereferenceable(4) %58)
  %388 = load i32, ptr %387, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #8
  store i32 %388, ptr %56, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #8
  %389 = load i32, ptr %50, align 4, !tbaa !9
  %390 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %391 = load i32, ptr %390, align 4, !tbaa !28
  %392 = add i32 %389, %391
  %393 = add i32 %392, 1
  store i32 %393, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #8
  %394 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %395 = load i32, ptr %394, align 16, !tbaa !30
  %396 = load i32, ptr %25, align 4, !tbaa !9
  %397 = sub i32 %395, %396
  store i32 %397, ptr %61, align 4, !tbaa !9
  %398 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %60, ptr noundef nonnull align 4 dereferenceable(4) %61)
  %399 = load i32, ptr %398, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #8
  store i32 %399, ptr %59, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #8
  %400 = load i32, ptr %50, align 4, !tbaa !9
  store i32 %400, ptr %62, align 4, !tbaa !9
  br label %401

401:                                              ; preds = %448, %377
  %402 = load i32, ptr %62, align 4, !tbaa !9
  %403 = load i32, ptr %59, align 4, !tbaa !9
  %404 = icmp ult i32 %402, %403
  br i1 %404, label %406, label %405

405:                                              ; preds = %401
  store i32 19, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #8
  br label %451

406:                                              ; preds = %401
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #8
  %407 = load i32, ptr %53, align 4, !tbaa !9
  store i32 %407, ptr %63, align 4, !tbaa !9
  br label %408

408:                                              ; preds = %444, %406
  %409 = load i32, ptr %63, align 4, !tbaa !9
  %410 = load i32, ptr %56, align 4, !tbaa !9
  %411 = icmp ult i32 %409, %410
  br i1 %411, label %413, label %412

412:                                              ; preds = %408
  store i32 22, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #8
  br label %447

413:                                              ; preds = %408
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #8
  %414 = load ptr, ptr %30, align 8, !tbaa !5
  %415 = load i32, ptr %62, align 4, !tbaa !9
  %416 = zext i32 %415 to i64
  %417 = load i64, ptr %31, align 8, !tbaa !11
  %418 = mul nsw i64 %416, %417
  %419 = load i32, ptr %63, align 4, !tbaa !9
  %420 = zext i32 %419 to i64
  %421 = add nsw i64 %418, %420
  %422 = getelementptr inbounds float, ptr %414, i64 %421
  %423 = load float, ptr %422, align 4, !tbaa !13
  store float %423, ptr %64, align 4, !tbaa !13
  %424 = load float, ptr %64, align 4, !tbaa !13
  %425 = fcmp une float %424, 0x47EFFFFFE0000000
  br i1 %425, label %426, label %443

426:                                              ; preds = %413
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #8
  %427 = load float, ptr %64, align 4, !tbaa !13
  %428 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 2
  %429 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %428)
  %430 = fsub float %427, %429
  %431 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 3
  %432 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %431)
  %433 = fdiv float %430, %432
  %434 = call noundef float @_ZSt5floorf(float noundef %433)
  %435 = fptosi float %434 to i32
  %436 = call noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %435, i32 noundef 0, i32 noundef 65533)
  store i32 %436, ptr %65, align 4, !tbaa !9
  %437 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %54, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %438 = load i32, ptr %437, align 4, !tbaa !9
  store i32 %438, ptr %54, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #8
  %439 = load i32, ptr %65, align 4, !tbaa !9
  %440 = add nsw i32 %439, 1
  store i32 %440, ptr %66, align 4, !tbaa !9
  %441 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %55, ptr noundef nonnull align 4 dereferenceable(4) %66)
  %442 = load i32, ptr %441, align 4, !tbaa !9
  store i32 %442, ptr %55, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #8
  br label %443

443:                                              ; preds = %426, %413
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #8
  br label %444

444:                                              ; preds = %443
  %445 = load i32, ptr %63, align 4, !tbaa !9
  %446 = add i32 %445, 1
  store i32 %446, ptr %63, align 4, !tbaa !9
  br label %408, !llvm.loop !41

447:                                              ; preds = %412
  br label %448

448:                                              ; preds = %447
  %449 = load i32, ptr %62, align 4, !tbaa !9
  %450 = add i32 %449, 1
  store i32 %450, ptr %62, align 4, !tbaa !9
  br label %401, !llvm.loop !42

451:                                              ; preds = %405
  %452 = load i32, ptr %54, align 4, !tbaa !9
  %453 = load i32, ptr %55, align 4, !tbaa !9
  %454 = icmp sgt i32 %452, %453
  br i1 %454, label %455, label %456

455:                                              ; preds = %451
  store i32 65535, ptr %55, align 4, !tbaa !9
  store i32 65535, ptr %54, align 4, !tbaa !9
  br label %456

456:                                              ; preds = %455, %451
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #8
  %457 = load i32, ptr %45, align 4, !tbaa !9
  %458 = load i32, ptr %52, align 4, !tbaa !9
  %459 = add i32 %457, %458
  %460 = load i32, ptr %46, align 4, !tbaa !9
  %461 = load i32, ptr %49, align 4, !tbaa !9
  %462 = add i32 %460, %461
  %463 = load i32, ptr %42, align 4, !tbaa !9
  %464 = load i32, ptr %43, align 4, !tbaa !9
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %459, i32 noundef %462, i32 noundef %463, i32 noundef %464, ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 4 dereferenceable(4) %68)
  %465 = load i32, ptr %54, align 4, !tbaa !9
  %466 = trunc i32 %465 to i16
  %467 = load ptr, ptr %67, align 8, !tbaa !5
  %468 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %467, i32 0, i32 0
  %469 = load i32, ptr %68, align 4, !tbaa !9
  %470 = zext i32 %469 to i64
  %471 = getelementptr inbounds [4 x i16], ptr %468, i64 0, i64 %470
  store i16 %466, ptr %471, align 2, !tbaa !43
  %472 = load i32, ptr %55, align 4, !tbaa !9
  %473 = trunc i32 %472 to i16
  %474 = load ptr, ptr %67, align 8, !tbaa !5
  %475 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %474, i32 0, i32 1
  %476 = load i32, ptr %68, align 4, !tbaa !9
  %477 = zext i32 %476 to i64
  %478 = getelementptr inbounds [4 x i16], ptr %475, i64 0, i64 %477
  store i16 %473, ptr %478, align 2, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #8
  %479 = load i32, ptr %54, align 4, !tbaa !9
  %480 = sitofp i32 %479 to float
  store float %480, ptr %69, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %70) #8
  %481 = load i32, ptr %55, align 4, !tbaa !9
  %482 = load i32, ptr %54, align 4, !tbaa !9
  %483 = sub nsw i32 %481, %482
  %484 = sitofp i32 %483 to float
  %485 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 10
  %486 = load i8, ptr %485, align 1, !tbaa !44
  %487 = uitofp i8 %486 to float
  %488 = fdiv float %484, %487
  store float %488, ptr %70, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %71) #8
  %489 = load float, ptr %70, align 4, !tbaa !13
  %490 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 3
  %491 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %490)
  %492 = fmul float %489, %491
  store float %492, ptr %71, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #8
  %493 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 2
  %494 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %493)
  %495 = load float, ptr %69, align 4, !tbaa !13
  %496 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 3
  %497 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %496)
  %498 = call float @llvm.fmuladd.f32(float %495, float %497, float %494)
  store float %498, ptr %72, align 4, !tbaa !13
  %499 = load i32, ptr %53, align 4, !tbaa !9
  %500 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %501 = load i32, ptr %500, align 4, !tbaa !28
  %502 = add i32 %499, %501
  store i32 %502, ptr %56, align 4, !tbaa !9
  %503 = load i32, ptr %50, align 4, !tbaa !9
  %504 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %505 = load i32, ptr %504, align 4, !tbaa !28
  %506 = add i32 %503, %505
  store i32 %506, ptr %59, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %73) #8
  %507 = load i32, ptr %50, align 4, !tbaa !9
  store i32 %507, ptr %73, align 4, !tbaa !9
  br label %508

508:                                              ; preds = %636, %456
  %509 = load i32, ptr %73, align 4, !tbaa !9
  %510 = load i32, ptr %59, align 4, !tbaa !9
  %511 = icmp ult i32 %509, %510
  br i1 %511, label %513, label %512

512:                                              ; preds = %508
  store i32 25, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #8
  br label %639

513:                                              ; preds = %508
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #8
  %514 = load i32, ptr %53, align 4, !tbaa !9
  store i32 %514, ptr %74, align 4, !tbaa !9
  br label %515

515:                                              ; preds = %632, %513
  %516 = load i32, ptr %74, align 4, !tbaa !9
  %517 = load i32, ptr %56, align 4, !tbaa !9
  %518 = icmp ult i32 %516, %517
  br i1 %518, label %520, label %519

519:                                              ; preds = %515
  store i32 28, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #8
  br label %635

520:                                              ; preds = %515
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #8
  %521 = load ptr, ptr %30, align 8, !tbaa !5
  %522 = load i32, ptr %73, align 4, !tbaa !9
  %523 = zext i32 %522 to i64
  %524 = load i64, ptr %31, align 8, !tbaa !11
  %525 = mul nsw i64 %523, %524
  %526 = load i32, ptr %74, align 4, !tbaa !9
  %527 = zext i32 %526 to i64
  %528 = add nsw i64 %525, %527
  %529 = getelementptr inbounds float, ptr %521, i64 %528
  %530 = load float, ptr %529, align 4, !tbaa !13
  store float %530, ptr %75, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %76) #8
  %531 = load float, ptr %75, align 4, !tbaa !13
  %532 = fcmp une float %531, 0x47EFFFFFE0000000
  br i1 %532, label %533, label %547

533:                                              ; preds = %520
  %534 = load float, ptr %75, align 4, !tbaa !13
  %535 = load float, ptr %72, align 4, !tbaa !13
  %536 = fsub float %534, %535
  %537 = load float, ptr %71, align 4, !tbaa !13
  %538 = fdiv float %536, %537
  %539 = call noundef float @_ZSt5floorf(float noundef %538)
  %540 = fptosi float %539 to i32
  %541 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 10
  %542 = load i8, ptr %541, align 1, !tbaa !44
  %543 = zext i8 %542 to i32
  %544 = sub nsw i32 %543, 1
  %545 = call noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %540, i32 noundef 0, i32 noundef %544)
  %546 = trunc i32 %545 to i8
  br label %550

547:                                              ; preds = %520
  %548 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 10
  %549 = load i8, ptr %548, align 1, !tbaa !44
  br label %550

550:                                              ; preds = %547, %533
  %551 = phi i8 [ %546, %533 ], [ %549, %547 ]
  store i8 %551, ptr %76, align 1, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #8
  %552 = load i32, ptr %25, align 4, !tbaa !9
  %553 = load i32, ptr %73, align 4, !tbaa !9
  %554 = add i32 %552, %553
  %555 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %556 = load i32, ptr %555, align 16, !tbaa !30
  %557 = mul i32 %554, %556
  %558 = load i32, ptr %24, align 4, !tbaa !9
  %559 = add i32 %557, %558
  %560 = load i32, ptr %74, align 4, !tbaa !9
  %561 = add i32 %559, %560
  %562 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 9
  %563 = load i8, ptr %562, align 4, !tbaa !46
  %564 = zext i8 %563 to i32
  %565 = mul i32 %561, %564
  store i32 %565, ptr %77, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %78) #8
  %566 = load i32, ptr %77, align 4, !tbaa !9
  %567 = lshr i32 %566, 3
  store i32 %567, ptr %78, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #8
  %568 = load i32, ptr %77, align 4, !tbaa !9
  %569 = and i32 %568, 7
  store i32 %569, ptr %79, align 4, !tbaa !9
  br label %570

570:                                              ; preds = %550
  %571 = load i32, ptr %78, align 4, !tbaa !9
  %572 = add i32 %571, 1
  %573 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 6
  %574 = load i32, ptr %573, align 8, !tbaa !15
  %575 = icmp ult i32 %572, %574
  br i1 %575, label %579, label %576

576:                                              ; preds = %570
  %577 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.20, ptr noundef @.str.2, i32 noundef 1140)
  br i1 %577, label %578, label %579

578:                                              ; preds = %576
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !47
  br label %579

579:                                              ; preds = %578, %576, %570
  br label %580

580:                                              ; preds = %579
  br label %581

581:                                              ; preds = %580
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #8
  %582 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 15
  %583 = load ptr, ptr %582, align 8, !tbaa !48
  %584 = load i32, ptr %78, align 4, !tbaa !9
  %585 = zext i32 %584 to i64
  %586 = getelementptr inbounds i8, ptr %583, i64 %585
  store ptr %586, ptr %81, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %82) #8
  %587 = load ptr, ptr %81, align 8, !tbaa !5
  %588 = getelementptr inbounds i8, ptr %587, i64 0
  %589 = load i8, ptr %588, align 1, !tbaa !45
  %590 = zext i8 %589 to i16
  %591 = zext i16 %590 to i32
  %592 = load ptr, ptr %81, align 8, !tbaa !5
  %593 = getelementptr inbounds i8, ptr %592, i64 1
  %594 = load i8, ptr %593, align 1, !tbaa !45
  %595 = zext i8 %594 to i16
  %596 = zext i16 %595 to i32
  %597 = shl i32 %596, 8
  %598 = trunc i32 %597 to i16
  %599 = zext i16 %598 to i32
  %600 = or i32 %591, %599
  %601 = trunc i32 %600 to i16
  store i16 %601, ptr %82, align 2, !tbaa !43
  %602 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 10
  %603 = load i8, ptr %602, align 1, !tbaa !44
  %604 = zext i8 %603 to i16
  %605 = zext i16 %604 to i32
  %606 = load i32, ptr %79, align 4, !tbaa !9
  %607 = shl i32 %605, %606
  %608 = xor i32 %607, -1
  %609 = load i16, ptr %82, align 2, !tbaa !43
  %610 = zext i16 %609 to i32
  %611 = and i32 %610, %608
  %612 = trunc i32 %611 to i16
  store i16 %612, ptr %82, align 2, !tbaa !43
  %613 = load i8, ptr %76, align 1, !tbaa !45
  %614 = zext i8 %613 to i16
  %615 = zext i16 %614 to i32
  %616 = load i32, ptr %79, align 4, !tbaa !9
  %617 = shl i32 %615, %616
  %618 = load i16, ptr %82, align 2, !tbaa !43
  %619 = zext i16 %618 to i32
  %620 = or i32 %619, %617
  %621 = trunc i32 %620 to i16
  store i16 %621, ptr %82, align 2, !tbaa !43
  %622 = load i16, ptr %82, align 2, !tbaa !43
  %623 = trunc i16 %622 to i8
  %624 = load ptr, ptr %81, align 8, !tbaa !5
  %625 = getelementptr inbounds i8, ptr %624, i64 0
  store i8 %623, ptr %625, align 1, !tbaa !45
  %626 = load i16, ptr %82, align 2, !tbaa !43
  %627 = zext i16 %626 to i32
  %628 = ashr i32 %627, 8
  %629 = trunc i32 %628 to i8
  %630 = load ptr, ptr %81, align 8, !tbaa !5
  %631 = getelementptr inbounds i8, ptr %630, i64 1
  store i8 %629, ptr %631, align 1, !tbaa !45
  call void @llvm.lifetime.end.p0(i64 2, ptr %82) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %76) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #8
  br label %632

632:                                              ; preds = %581
  %633 = load i32, ptr %74, align 4, !tbaa !9
  %634 = add i32 %633, 1
  store i32 %634, ptr %74, align 4, !tbaa !9
  br label %515, !llvm.loop !49

635:                                              ; preds = %519
  br label %636

636:                                              ; preds = %635
  %637 = load i32, ptr %73, align 4, !tbaa !9
  %638 = add i32 %637, 1
  store i32 %638, ptr %73, align 4, !tbaa !9
  br label %508, !llvm.loop !50

639:                                              ; preds = %512
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #8
  br label %640

640:                                              ; preds = %639
  %641 = load i32, ptr %52, align 4, !tbaa !9
  %642 = add i32 %641, 1
  store i32 %642, ptr %52, align 4, !tbaa !9
  %643 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %644 = load i32, ptr %643, align 4, !tbaa !28
  %645 = load i32, ptr %53, align 4, !tbaa !9
  %646 = add i32 %645, %644
  store i32 %646, ptr %53, align 4, !tbaa !9
  br label %372, !llvm.loop !51

647:                                              ; preds = %376
  br label %648

648:                                              ; preds = %647
  %649 = load i32, ptr %49, align 4, !tbaa !9
  %650 = add i32 %649, 1
  store i32 %650, ptr %49, align 4, !tbaa !9
  %651 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 5
  %652 = load i32, ptr %651, align 4, !tbaa !28
  %653 = load i32, ptr %50, align 4, !tbaa !9
  %654 = add i32 %653, %652
  store i32 %654, ptr %50, align 4, !tbaa !9
  br label %366, !llvm.loop !52

655:                                              ; preds = %370
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #8
  %656 = load i32, ptr %11, align 4, !tbaa !9
  %657 = icmp ugt i32 %656, 1
  br i1 %657, label %658, label %661

658:                                              ; preds = %655
  %659 = load i32, ptr %11, align 4, !tbaa !9
  %660 = sub i32 %659, 2
  br label %662

661:                                              ; preds = %655
  br label %662

662:                                              ; preds = %661, %658
  %663 = phi i32 [ %660, %658 ], [ 0, %661 ]
  store i32 %663, ptr %83, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %84) #8
  %664 = load i32, ptr %12, align 4, !tbaa !9
  %665 = icmp ugt i32 %664, 1
  br i1 %665, label %666, label %669

666:                                              ; preds = %662
  %667 = load i32, ptr %12, align 4, !tbaa !9
  %668 = sub i32 %667, 2
  br label %670

669:                                              ; preds = %662
  br label %670

670:                                              ; preds = %669, %666
  %671 = phi i32 [ %668, %666 ], [ 0, %669 ]
  store i32 %671, ptr %84, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %85) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #8
  %672 = load i32, ptr %11, align 4, !tbaa !9
  %673 = load i32, ptr %13, align 4, !tbaa !9
  %674 = add i32 %672, %673
  %675 = add i32 %674, 1
  store i32 %675, ptr %86, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #8
  %676 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %677 = load i32, ptr %676, align 16, !tbaa !30
  %678 = sub i32 %677, 1
  store i32 %678, ptr %87, align 4, !tbaa !9
  %679 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 4 dereferenceable(4) %87)
  %680 = load i32, ptr %679, align 4, !tbaa !9
  %681 = load i32, ptr %83, align 4, !tbaa !9
  %682 = sub i32 %680, %681
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #8
  store i32 %682, ptr %85, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %88) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #8
  %683 = load i32, ptr %12, align 4, !tbaa !9
  %684 = load i32, ptr %14, align 4, !tbaa !9
  %685 = add i32 %683, %684
  %686 = add i32 %685, 1
  store i32 %686, ptr %89, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %90) #8
  %687 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 4
  %688 = load i32, ptr %687, align 16, !tbaa !30
  %689 = sub i32 %688, 1
  store i32 %689, ptr %90, align 4, !tbaa !9
  %690 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %89, ptr noundef nonnull align 4 dereferenceable(4) %90)
  %691 = load i32, ptr %690, align 4, !tbaa !9
  %692 = load i32, ptr %84, align 4, !tbaa !9
  %693 = sub i32 %691, %692
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #8
  store i32 %693, ptr %88, align 4, !tbaa !9
  %694 = load i32, ptr %83, align 4, !tbaa !9
  %695 = load i32, ptr %84, align 4, !tbaa !9
  %696 = load i32, ptr %85, align 4, !tbaa !9
  %697 = load i32, ptr %88, align 4, !tbaa !9
  %698 = load ptr, ptr %30, align 8, !tbaa !5
  %699 = load i32, ptr %24, align 4, !tbaa !9
  %700 = load i32, ptr %25, align 4, !tbaa !9
  %701 = load i64, ptr %31, align 8, !tbaa !11
  %702 = load float, ptr %18, align 4, !tbaa !13
  %703 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %694, i32 noundef %695, i32 noundef %696, i32 noundef %697, ptr noundef %698, i32 noundef %699, i32 noundef %700, i64 noundef %701, float noundef 1.000000e+00, float noundef %702, ptr noundef nonnull align 8 dereferenceable(8) %703)
  %704 = load ptr, ptr %32, align 8, !tbaa !5
  %705 = icmp ne ptr %704, null
  br i1 %705, label %706, label %718

706:                                              ; preds = %670
  %707 = load ptr, ptr %17, align 8, !tbaa !5
  %708 = load ptr, ptr %32, align 8, !tbaa !5
  %709 = load i32, ptr %28, align 4, !tbaa !9
  %710 = load i32, ptr %29, align 4, !tbaa !9
  %711 = mul i32 %709, %710
  %712 = zext i32 %711 to i64
  %713 = mul i64 %712, 4
  %714 = trunc i64 %713 to i32
  %715 = load ptr, ptr %707, align 8, !tbaa !37
  %716 = getelementptr inbounds ptr, ptr %715, i64 3
  %717 = load ptr, ptr %716, align 8
  call void %717(ptr noundef nonnull align 8 dereferenceable(8) %707, ptr noundef %708, i32 noundef %714)
  br label %718

718:                                              ; preds = %706, %670
  br label %719

719:                                              ; preds = %827, %718
  %720 = load i32, ptr %44, align 4, !tbaa !9
  %721 = icmp ugt i32 %720, 1
  br i1 %721, label %722, label %848

722:                                              ; preds = %719
  call void @llvm.lifetime.start.p0(i64 4, ptr %91) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %92) #8
  %723 = load i32, ptr %41, align 4, !tbaa !9
  %724 = lshr i32 %723, 1
  %725 = load i32, ptr %44, align 4, !tbaa !9
  %726 = sub i32 %725, 1
  call void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef %724, i32 noundef %726, ptr noundef nonnull align 4 dereferenceable(4) %91, ptr noundef nonnull align 4 dereferenceable(4) %92)
  %727 = load i32, ptr %45, align 4, !tbaa !9
  %728 = and i32 %727, 1
  %729 = icmp ne i32 %728, 0
  br i1 %729, label %730, label %735

730:                                              ; preds = %722
  %731 = load i32, ptr %45, align 4, !tbaa !9
  %732 = add i32 %731, -1
  store i32 %732, ptr %45, align 4, !tbaa !9
  %733 = load i32, ptr %47, align 4, !tbaa !9
  %734 = add i32 %733, 1
  store i32 %734, ptr %47, align 4, !tbaa !9
  br label %735

735:                                              ; preds = %730, %722
  %736 = load i32, ptr %46, align 4, !tbaa !9
  %737 = and i32 %736, 1
  %738 = icmp ne i32 %737, 0
  br i1 %738, label %739, label %744

739:                                              ; preds = %735
  %740 = load i32, ptr %46, align 4, !tbaa !9
  %741 = add i32 %740, -1
  store i32 %741, ptr %46, align 4, !tbaa !9
  %742 = load i32, ptr %48, align 4, !tbaa !9
  %743 = add i32 %742, 1
  store i32 %743, ptr %48, align 4, !tbaa !9
  br label %744

744:                                              ; preds = %739, %735
  call void @llvm.lifetime.start.p0(i64 4, ptr %93) #8
  %745 = load i32, ptr %45, align 4, !tbaa !9
  %746 = load i32, ptr %47, align 4, !tbaa !9
  %747 = add i32 %745, %746
  store i32 %747, ptr %93, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %94) #8
  %748 = load i32, ptr %46, align 4, !tbaa !9
  %749 = load i32, ptr %48, align 4, !tbaa !9
  %750 = add i32 %748, %749
  store i32 %750, ptr %94, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %95) #8
  %751 = load i32, ptr %46, align 4, !tbaa !9
  store i32 %751, ptr %95, align 4, !tbaa !9
  br label %752

752:                                              ; preds = %824, %744
  %753 = load i32, ptr %95, align 4, !tbaa !9
  %754 = load i32, ptr %94, align 4, !tbaa !9
  %755 = icmp ult i32 %753, %754
  br i1 %755, label %757, label %756

756:                                              ; preds = %752
  store i32 35, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %95) #8
  br label %827

757:                                              ; preds = %752
  call void @llvm.lifetime.start.p0(i64 4, ptr %96) #8
  %758 = load i32, ptr %45, align 4, !tbaa !9
  store i32 %758, ptr %96, align 4, !tbaa !9
  br label %759

759:                                              ; preds = %820, %757
  %760 = load i32, ptr %96, align 4, !tbaa !9
  %761 = load i32, ptr %93, align 4, !tbaa !9
  %762 = icmp ult i32 %760, %761
  br i1 %762, label %764, label %763

763:                                              ; preds = %759
  store i32 38, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %96) #8
  br label %823

764:                                              ; preds = %759
  call void @llvm.lifetime.start.p0(i64 8, ptr %97) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %98) #8
  %765 = load i32, ptr %96, align 4, !tbaa !9
  %766 = load i32, ptr %95, align 4, !tbaa !9
  %767 = load i32, ptr %42, align 4, !tbaa !9
  %768 = load i32, ptr %43, align 4, !tbaa !9
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %765, i32 noundef %766, i32 noundef %767, i32 noundef %768, ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull align 4 dereferenceable(4) %98)
  call void @llvm.lifetime.start.p0(i64 2, ptr %99) #8
  store i16 -1, ptr %99, align 2, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 2, ptr %100) #8
  store i16 0, ptr %100, align 2, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %101) #8
  store i32 0, ptr %101, align 4, !tbaa !9
  br label %769

769:                                              ; preds = %798, %764
  %770 = load i32, ptr %101, align 4, !tbaa !9
  %771 = icmp ult i32 %770, 4
  br i1 %771, label %773, label %772

772:                                              ; preds = %769
  store i32 41, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #8
  br label %801

773:                                              ; preds = %769
  %774 = load ptr, ptr %97, align 8, !tbaa !5
  %775 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %774, i32 0, i32 0
  %776 = load i32, ptr %101, align 4, !tbaa !9
  %777 = zext i32 %776 to i64
  %778 = getelementptr inbounds [4 x i16], ptr %775, i64 0, i64 %777
  %779 = load i16, ptr %778, align 2, !tbaa !43
  %780 = zext i16 %779 to i32
  %781 = icmp ne i32 %780, 65535
  br i1 %781, label %782, label %797

782:                                              ; preds = %773
  %783 = load ptr, ptr %97, align 8, !tbaa !5
  %784 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %783, i32 0, i32 0
  %785 = load i32, ptr %101, align 4, !tbaa !9
  %786 = zext i32 %785 to i64
  %787 = getelementptr inbounds [4 x i16], ptr %784, i64 0, i64 %786
  %788 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %99, ptr noundef nonnull align 2 dereferenceable(2) %787)
  %789 = load i16, ptr %788, align 2, !tbaa !43
  store i16 %789, ptr %99, align 2, !tbaa !43
  %790 = load ptr, ptr %97, align 8, !tbaa !5
  %791 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %790, i32 0, i32 1
  %792 = load i32, ptr %101, align 4, !tbaa !9
  %793 = zext i32 %792 to i64
  %794 = getelementptr inbounds [4 x i16], ptr %791, i64 0, i64 %793
  %795 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %100, ptr noundef nonnull align 2 dereferenceable(2) %794)
  %796 = load i16, ptr %795, align 2, !tbaa !43
  store i16 %796, ptr %100, align 2, !tbaa !43
  br label %797

797:                                              ; preds = %782, %773
  br label %798

798:                                              ; preds = %797
  %799 = load i32, ptr %101, align 4, !tbaa !9
  %800 = add i32 %799, 1
  store i32 %800, ptr %101, align 4, !tbaa !9
  br label %769, !llvm.loop !53

801:                                              ; preds = %772
  call void @llvm.lifetime.start.p0(i64 8, ptr %102) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %103) #8
  %802 = load i32, ptr %96, align 4, !tbaa !9
  %803 = lshr i32 %802, 1
  %804 = load i32, ptr %95, align 4, !tbaa !9
  %805 = lshr i32 %804, 1
  %806 = load i32, ptr %91, align 4, !tbaa !9
  %807 = load i32, ptr %92, align 4, !tbaa !9
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %803, i32 noundef %805, i32 noundef %806, i32 noundef %807, ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull align 4 dereferenceable(4) %103)
  %808 = load i16, ptr %99, align 2, !tbaa !43
  %809 = load ptr, ptr %102, align 8, !tbaa !5
  %810 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %809, i32 0, i32 0
  %811 = load i32, ptr %103, align 4, !tbaa !9
  %812 = zext i32 %811 to i64
  %813 = getelementptr inbounds [4 x i16], ptr %810, i64 0, i64 %812
  store i16 %808, ptr %813, align 2, !tbaa !43
  %814 = load i16, ptr %100, align 2, !tbaa !43
  %815 = load ptr, ptr %102, align 8, !tbaa !5
  %816 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %815, i32 0, i32 1
  %817 = load i32, ptr %103, align 4, !tbaa !9
  %818 = zext i32 %817 to i64
  %819 = getelementptr inbounds [4 x i16], ptr %816, i64 0, i64 %818
  store i16 %814, ptr %819, align 2, !tbaa !43
  call void @llvm.lifetime.end.p0(i64 4, ptr %103) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %102) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %100) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr %99) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %98) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %97) #8
  br label %820

820:                                              ; preds = %801
  %821 = load i32, ptr %96, align 4, !tbaa !9
  %822 = add i32 %821, 2
  store i32 %822, ptr %96, align 4, !tbaa !9
  br label %759, !llvm.loop !54

823:                                              ; preds = %763
  br label %824

824:                                              ; preds = %823
  %825 = load i32, ptr %95, align 4, !tbaa !9
  %826 = add i32 %825, 2
  store i32 %826, ptr %95, align 4, !tbaa !9
  br label %752, !llvm.loop !55

827:                                              ; preds = %756
  %828 = load i32, ptr %44, align 4, !tbaa !9
  %829 = add i32 %828, -1
  store i32 %829, ptr %44, align 4, !tbaa !9
  %830 = load i32, ptr %41, align 4, !tbaa !9
  %831 = lshr i32 %830, 1
  store i32 %831, ptr %41, align 4, !tbaa !9
  %832 = load i32, ptr %45, align 4, !tbaa !9
  %833 = lshr i32 %832, 1
  store i32 %833, ptr %45, align 4, !tbaa !9
  %834 = load i32, ptr %46, align 4, !tbaa !9
  %835 = lshr i32 %834, 1
  store i32 %835, ptr %46, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %104) #8
  %836 = load i32, ptr %47, align 4, !tbaa !9
  %837 = add i32 %836, 1
  %838 = lshr i32 %837, 1
  store i32 %838, ptr %104, align 4, !tbaa !9
  %839 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %104, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %840 = load i32, ptr %839, align 4, !tbaa !9
  store i32 %840, ptr %47, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %104) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %105) #8
  %841 = load i32, ptr %48, align 4, !tbaa !9
  %842 = add i32 %841, 1
  %843 = lshr i32 %842, 1
  store i32 %843, ptr %105, align 4, !tbaa !9
  %844 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %105, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %845 = load i32, ptr %844, align 4, !tbaa !9
  store i32 %845, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %105) #8
  %846 = load i32, ptr %91, align 4, !tbaa !9
  store i32 %846, ptr %42, align 4, !tbaa !9
  %847 = load i32, ptr %92, align 4, !tbaa !9
  store i32 %847, ptr %43, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %94) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #8
  br label %719, !llvm.loop !56

848:                                              ; preds = %719
  %849 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 11
  store i16 -1, ptr %849, align 2, !tbaa !57
  %850 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 12
  store i16 0, ptr %850, align 8, !tbaa !58
  call void @llvm.lifetime.start.p0(i64 4, ptr %106) #8
  store i32 0, ptr %106, align 4, !tbaa !9
  br label %851

851:                                              ; preds = %890, %848
  %852 = load i32, ptr %106, align 4, !tbaa !9
  %853 = icmp ult i32 %852, 4
  br i1 %853, label %855, label %854

854:                                              ; preds = %851
  store i32 44, ptr %51, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %106) #8
  br label %893

855:                                              ; preds = %851
  %856 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 14
  %857 = load ptr, ptr %856, align 16, !tbaa !59
  %858 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %857, i64 0
  %859 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %858, i32 0, i32 0
  %860 = load i32, ptr %106, align 4, !tbaa !9
  %861 = zext i32 %860 to i64
  %862 = getelementptr inbounds [4 x i16], ptr %859, i64 0, i64 %861
  %863 = load i16, ptr %862, align 2, !tbaa !43
  %864 = zext i16 %863 to i32
  %865 = icmp ne i32 %864, 65535
  br i1 %865, label %866, label %889

866:                                              ; preds = %855
  %867 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 11
  %868 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 14
  %869 = load ptr, ptr %868, align 16, !tbaa !59
  %870 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %869, i64 0
  %871 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %870, i32 0, i32 0
  %872 = load i32, ptr %106, align 4, !tbaa !9
  %873 = zext i32 %872 to i64
  %874 = getelementptr inbounds [4 x i16], ptr %871, i64 0, i64 %873
  %875 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %867, ptr noundef nonnull align 2 dereferenceable(2) %874)
  %876 = load i16, ptr %875, align 2, !tbaa !43
  %877 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 11
  store i16 %876, ptr %877, align 2, !tbaa !57
  %878 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 12
  %879 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 14
  %880 = load ptr, ptr %879, align 16, !tbaa !59
  %881 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %880, i64 0
  %882 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %881, i32 0, i32 1
  %883 = load i32, ptr %106, align 4, !tbaa !9
  %884 = zext i32 %883 to i64
  %885 = getelementptr inbounds [4 x i16], ptr %882, i64 0, i64 %884
  %886 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %878, ptr noundef nonnull align 2 dereferenceable(2) %885)
  %887 = load i16, ptr %886, align 2, !tbaa !43
  %888 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 12
  store i16 %887, ptr %888, align 8, !tbaa !58
  br label %889

889:                                              ; preds = %866, %855
  br label %890

890:                                              ; preds = %889
  %891 = load i32, ptr %106, align 4, !tbaa !9
  %892 = add i32 %891, 1
  store i32 %892, ptr %106, align 4, !tbaa !9
  br label %851, !llvm.loop !60

893:                                              ; preds = %854
  call void @llvm.lifetime.end.p0(i64 4, ptr %88) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  br label %894

894:                                              ; preds = %893, %113
  ret void
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 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 #5 = { 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 #6 = { alwaysinline 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !10, i64 72}
!16 = !{!"_ZTSN3JPH16HeightFieldShapeE", !17, i64 0, !23, i64 32, !23, i64 48, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !7, i64 84, !7, i64 85, !24, i64 86, !24, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !25, i64 120, !26, i64 144, !10, i64 168}
!17 = !{!"_ZTSN3JPH5ShapeE", !18, i64 8, !12, i64 16, !21, i64 24, !22, i64 25}
!18 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !19, i64 0}
!19 = !{!"_ZTSSt6atomicIjE", !20, i64 0}
!20 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!21 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!22 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!23 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!24 = !{!"short", !7, i64 0}
!25 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !12, i64 0, !12, i64 8, !6, i64 16}
!26 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !12, i64 0, !12, i64 8, !6, i64 16}
!27 = !{i64 2158616427}
!28 = !{!16, !10, i64 68}
!29 = !{i64 2158616829}
!30 = !{!16, !10, i64 64}
!31 = !{i64 2158617220}
!32 = !{i64 2158617655}
!33 = !{!34, !34, i64 0}
!34 = !{!"bool", !7, i64 0}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = !{!38, !38, i64 0}
!38 = !{!"vtable pointer", !8, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}
!42 = distinct !{!42, !40}
!43 = !{!24, !24, i64 0}
!44 = !{!16, !7, i64 85}
!45 = !{!7, !7, i64 0}
!46 = !{!16, !7, i64 84}
!47 = !{i64 2158618032}
!48 = !{!16, !6, i64 104}
!49 = distinct !{!49, !40}
!50 = distinct !{!50, !40}
!51 = distinct !{!51, !40}
!52 = distinct !{!52, !40}
!53 = distinct !{!53, !40}
!54 = distinct !{!54, !40}
!55 = distinct !{!55, !40}
!56 = distinct !{!56, !40}
!57 = !{!16, !24, i64 86}
!58 = !{!16, !24, i64 88}
!59 = !{!16, !6, i64 96}
!60 = distinct !{!60, !40}


; 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.20 = external hidden unnamed_addr constant [34 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
@.str.24 = external hidden unnamed_addr constant [23 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: mustprogress 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) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5floorf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, i64 noundef, float noundef, float noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #5 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: alwaysinline mustprogress uwtable
declare dso_local noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

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

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

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

; 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176), i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShape10SetHeightsEjjjjPKflRNS_13TempAllocatorEf(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, ptr noundef nonnull align 8 dereferenceable(8) %7, float noundef %8) local_unnamed_addr #4 align 2 {
  %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 ptr, align 8
  %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 ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i16, align 2
  %32 = alloca i16, align 2
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = icmp eq i32 %3, 0
  %38 = icmp eq i32 %4, 0
  %or.cond = or i1 %37, %38
  br i1 %or.cond, label %435, label %39

39:                                               ; preds = %9
  %40 = getelementptr inbounds i8, ptr %0, i64 72
  %41 = load i32, ptr %40, align 8, !tbaa !5
  %.not = icmp eq i32 %41, 0
  br i1 %.not, label %42, label %45

42:                                               ; preds = %39
  %43 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.2, i32 noundef 998)
  br i1 %43, label %44, label %45

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

45:                                               ; preds = %44, %42, %39
  %46 = getelementptr inbounds i8, ptr %0, i64 68
  %47 = load i32, ptr %46, align 4, !tbaa !23
  %48 = urem i32 %1, %47
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %50, label %53

50:                                               ; preds = %45
  %51 = urem i32 %2, %47
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %56, label %53

53:                                               ; preds = %50, %45
  %54 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.2, i32 noundef 999)
  br i1 %54, label %55, label %56

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

56:                                               ; preds = %55, %53, %50
  %57 = getelementptr inbounds i8, ptr %0, i64 64
  %58 = load i32, ptr %57, align 16, !tbaa !25
  %59 = icmp ugt i32 %58, %1
  %60 = icmp ugt i32 %58, %2
  %or.cond285 = and i1 %59, %60
  br i1 %or.cond285, label %64, label %61

61:                                               ; preds = %56
  %62 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.2, i32 noundef 1000)
  br i1 %62, label %63, label %64

63:                                               ; preds = %61
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !26
  br label %64

64:                                               ; preds = %56, %63, %61
  %65 = add i32 %3, %1
  %66 = load i32, ptr %57, align 16, !tbaa !25
  %.not276 = icmp ugt i32 %65, %66
  %67 = add i32 %4, %2
  %.not277 = icmp ugt i32 %67, %66
  %or.cond286 = or i1 %.not276, %.not277
  br i1 %or.cond286, label %68, label %71

68:                                               ; preds = %64
  %69 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.2, i32 noundef 1001)
  br i1 %69, label %70, label %71

70:                                               ; preds = %68
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !27
  br label %71

71:                                               ; preds = %64, %68, %70
  %.not278.not = icmp eq i32 %1, 0
  %72 = load i32, ptr %46, align 4
  %73 = sub i32 %1, %72
  %74 = select i1 %.not278.not, i32 0, i32 %72
  %.0239 = add i32 %74, %3
  %.0237 = select i1 %.not278.not, i32 0, i32 %73
  %.not279.not = icmp eq i32 %2, 0
  %75 = sub i32 %2, %72
  %76 = select i1 %.not279.not, i32 0, i32 %72
  %.0240 = add i32 %76, %4
  %.0238 = select i1 %.not279.not, i32 0, i32 %75
  %77 = or i32 %2, %1
  %.1 = icmp ne i32 %77, 0
  %78 = load i32, ptr %57, align 16, !tbaa !25
  %79 = icmp ult i32 %65, %78
  %80 = select i1 %79, i32 %72, i32 0
  %.0241 = add i32 %80, %.0239
  %.2 = or i1 %.1, %79
  %81 = icmp ult i32 %67, %78
  %82 = select i1 %81, i32 %72, i32 0
  %.0242 = add i32 %82, %.0240
  %.3 = or i1 %81, %.2
  br i1 %.3, label %.lr.ph, label %125

.lr.ph:                                           ; preds = %71
  %83 = mul i32 %.0241, %.0242
  %84 = shl i32 %83, 2
  %85 = load ptr, ptr %7, align 8, !tbaa !28
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  %87 = load ptr, ptr %86, align 8
  %88 = tail call noundef ptr %87(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef %84)
  %89 = zext i32 %.0241 to i64
  %90 = sub i32 %1, %.0237
  %91 = sub i32 %2, %.0238
  tail call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %.0237, i32 noundef %.0238, i32 noundef %.0241, i32 noundef %91, ptr noundef %88, i64 noundef %89)
  %92 = mul i32 %.0241, %91
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds float, ptr %88, i64 %93
  tail call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %.0237, i32 noundef %2, i32 noundef %90, i32 noundef %4, ptr noundef %94, i64 noundef %89)
  %95 = zext i32 %90 to i64
  %96 = getelementptr inbounds float, ptr %94, i64 %95
  %97 = zext i32 %3 to i64
  %98 = shl nuw nsw i64 %97, 2
  %99 = add i32 %4, -1
  %xtraiter = and i32 %4, 3
  %100 = icmp ult i32 %99, 3
  br i1 %100, label %._crit_edge.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i32 %4, -4
  br label %116

._crit_edge.unr-lcssa:                            ; preds = %116, %.lr.ph
  %.0235293.unr = phi ptr [ %5, %.lr.ph ], [ %124, %116 ]
  %.0246292.unr = phi ptr [ %96, %.lr.ph ], [ %123, %116 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa, %.epil.preheader
  %.0235293.epil = phi ptr [ %102, %.epil.preheader ], [ %.0235293.unr, %._crit_edge.unr-lcssa ]
  %.0246292.epil = phi ptr [ %101, %.epil.preheader ], [ %.0246292.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.unr-lcssa ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.0246292.epil, ptr align 4 %.0235293.epil, i64 %98, i1 false)
  %101 = getelementptr inbounds float, ptr %.0246292.epil, i64 %89
  %102 = getelementptr inbounds float, ptr %.0235293.epil, i64 %6
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !30

._crit_edge:                                      ; preds = %.epil.preheader, %._crit_edge.unr-lcssa
  %103 = sub i32 %.0237, %65
  %104 = add i32 %103, %.0241
  %105 = zext i32 %65 to i64
  %106 = getelementptr inbounds float, ptr %94, i64 %105
  %107 = zext i32 %.0237 to i64
  %108 = sub nsw i64 0, %107
  %109 = getelementptr inbounds float, ptr %106, i64 %108
  tail call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %65, i32 noundef %2, i32 noundef %104, i32 noundef %4, ptr noundef %109, i64 noundef %89)
  %110 = sub i32 %67, %.0238
  %111 = mul i32 %.0241, %110
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds float, ptr %88, i64 %112
  %114 = sub i32 %.0238, %67
  %115 = add i32 %114, %.0242
  tail call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %.0237, i32 noundef %67, i32 noundef %.0241, i32 noundef %115, ptr noundef %113, i64 noundef %89)
  br label %125

116:                                              ; preds = %116, %.lr.ph.new
  %.0235293 = phi ptr [ %5, %.lr.ph.new ], [ %124, %116 ]
  %.0246292 = phi ptr [ %96, %.lr.ph.new ], [ %123, %116 ]
  %niter = phi i32 [ 0, %.lr.ph.new ], [ %niter.next.3, %116 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.0246292, ptr align 4 %.0235293, i64 %98, i1 false)
  %117 = getelementptr inbounds float, ptr %.0246292, i64 %89
  %118 = getelementptr inbounds float, ptr %.0235293, i64 %6
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %117, ptr align 4 %118, i64 %98, i1 false)
  %119 = getelementptr inbounds float, ptr %117, i64 %89
  %120 = getelementptr inbounds float, ptr %118, i64 %6
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %119, ptr align 4 %120, i64 %98, i1 false)
  %121 = getelementptr inbounds float, ptr %119, i64 %89
  %122 = getelementptr inbounds float, ptr %120, i64 %6
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %121, ptr align 4 %122, i64 %98, i1 false)
  %123 = getelementptr inbounds float, ptr %121, i64 %89
  %124 = getelementptr inbounds float, ptr %122, i64 %6
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3 = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %116, !llvm.loop !32

125:                                              ; preds = %71, %._crit_edge
  %.0245 = phi ptr [ %88, %._crit_edge ], [ null, %71 ]
  %.0244 = phi i64 [ %89, %._crit_edge ], [ %6, %71 ]
  %.0243 = phi ptr [ %88, %._crit_edge ], [ %5, %71 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  %126 = tail call noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176) %0)
  store i32 %126, ptr %10, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %127 = tail call noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef %126)
  call void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef %126, i32 noundef %127, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %128 = load i32, ptr %46, align 4, !tbaa !23
  %129 = udiv i32 %.0237, %128
  %130 = udiv i32 %.0238, %128
  %131 = udiv i32 %.0239, %128
  %132 = udiv i32 %.0240, %128
  %.not336 = icmp ugt i32 %128, %.0240
  br i1 %.not336, label %._crit_edge311, label %.preheader290.lr.ph

.preheader290.lr.ph:                              ; preds = %125
  %.not337 = icmp ugt i32 %128, %.0239
  %133 = getelementptr inbounds i8, ptr %0, i64 32
  %134 = getelementptr inbounds i8, ptr %0, i64 48
  %135 = getelementptr inbounds i8, ptr %0, i64 85
  %136 = getelementptr inbounds i8, ptr %0, i64 84
  %137 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %.not337, label %._crit_edge311, label %.preheader290.us

.preheader290.us:                                 ; preds = %.preheader290.lr.ph, %._crit_edge308.us
  %138 = phi i32 [ %192, %._crit_edge308.us ], [ %128, %.preheader290.lr.ph ]
  %.0263310.us = phi i32 [ %275, %._crit_edge308.us ], [ 0, %.preheader290.lr.ph ]
  %.0264309.us = phi i32 [ %274, %._crit_edge308.us ], [ 0, %.preheader290.lr.ph ]
  %139 = add i32 %.0263310.us, 1
  %140 = add i32 %.0264309.us, %130
  %141 = zext i32 %.0263310.us to i64
  br label %142

142:                                              ; preds = %.preheader290.us, %._crit_edge303.us
  %143 = phi i32 [ %138, %.preheader290.us ], [ %192, %._crit_edge303.us ]
  %.0261305.us = phi i32 [ 0, %.preheader290.us ], [ %.pre-phi, %._crit_edge303.us ]
  %.0262304.us = phi i32 [ 0, %.preheader290.us ], [ %193, %._crit_edge303.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  store i32 65535, ptr %13, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  store i32 0, ptr %14, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  %144 = add i32 %.0261305.us, 1
  %145 = add i32 %144, %143
  store i32 %145, ptr %15, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  %146 = load i32, ptr %57, align 16, !tbaa !25
  %147 = sub i32 %146, %.0237
  store i32 %147, ptr %16, align 4, !tbaa !34
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %149 = load i32, ptr %148, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  %150 = load i32, ptr %46, align 4, !tbaa !23
  %151 = add i32 %139, %150
  store i32 %151, ptr %17, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  %152 = load i32, ptr %57, align 16, !tbaa !25
  %153 = sub i32 %152, %.0238
  store i32 %153, ptr %18, align 4, !tbaa !34
  %154 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %155 = load i32, ptr %154, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  %156 = icmp ult i32 %.0263310.us, %155
  %157 = icmp ult i32 %.0261305.us, %149
  %or.cond373 = select i1 %156, i1 %157, i1 false
  br i1 %or.cond373, label %.preheader289.us.us.preheader, label %._crit_edge298.us

._crit_edge298.us:                                ; preds = %._crit_edge296.us.us, %142
  %158 = load i32, ptr %13, align 4, !tbaa !34
  %159 = load i32, ptr %14, align 4, !tbaa !34
  %160 = icmp sgt i32 %158, %159
  br i1 %160, label %161, label %162

161:                                              ; preds = %._crit_edge298.us
  store i32 65535, ptr %14, align 4, !tbaa !34
  store i32 65535, ptr %13, align 4, !tbaa !34
  br label %162

162:                                              ; preds = %161, %._crit_edge298.us
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #8
  %163 = add i32 %.0262304.us, %129
  %164 = load i32, ptr %11, align 4, !tbaa !34
  %165 = load i32, ptr %12, align 4, !tbaa !34
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %163, i32 noundef %140, i32 noundef %164, i32 noundef %165, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %166 = load i32, ptr %13, align 4, !tbaa !34
  %167 = trunc i32 %166 to i16
  %168 = load ptr, ptr %21, align 8, !tbaa !35
  %169 = load i32, ptr %22, align 4, !tbaa !34
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds [4 x i16], ptr %168, i64 0, i64 %170
  store i16 %167, ptr %171, align 2, !tbaa !36
  %172 = load i32, ptr %14, align 4, !tbaa !34
  %173 = trunc i32 %172 to i16
  %174 = getelementptr inbounds i8, ptr %168, i64 8
  %175 = getelementptr inbounds [4 x i16], ptr %174, i64 0, i64 %170
  store i16 %173, ptr %175, align 2, !tbaa !36
  %176 = sitofp i32 %166 to float
  %177 = sub nsw i32 %172, %166
  %178 = sitofp i32 %177 to float
  %179 = load i8, ptr %135, align 1, !tbaa !37
  %180 = uitofp i8 %179 to float
  %181 = fdiv float %178, %180
  %182 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %134)
  %183 = fmul float %182, %181
  %184 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %133)
  %185 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %134)
  %186 = call float @llvm.fmuladd.f32(float %176, float %185, float %184)
  %187 = load i32, ptr %46, align 4, !tbaa !23
  %188 = add i32 %187, %.0261305.us
  %189 = add i32 %187, %.0263310.us
  %190 = icmp ult i32 %.0263310.us, %189
  %191 = icmp ult i32 %.0261305.us, %188
  %or.cond374 = select i1 %190, i1 %191, i1 false
  br i1 %or.cond374, label %.preheader288.us.us.preheader, label %._crit_edge303.us

._crit_edge303.us.loopexit:                       ; preds = %._crit_edge301.us.us
  %.pre = load i32, ptr %46, align 4, !tbaa !23
  %.pre372 = add i32 %.pre, %.0261305.us
  br label %._crit_edge303.us

._crit_edge303.us:                                ; preds = %._crit_edge303.us.loopexit, %162
  %.pre-phi = phi i32 [ %.pre372, %._crit_edge303.us.loopexit ], [ %188, %162 ]
  %192 = phi i32 [ %.pre, %._crit_edge303.us.loopexit ], [ %187, %162 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  %193 = add nuw i32 %.0262304.us, 1
  %194 = icmp ult i32 %193, %131
  br i1 %194, label %142, label %._crit_edge308.us, !llvm.loop !38

.preheader289.us.us.preheader:                    ; preds = %142
  %195 = zext i32 %.0261305.us to i64
  %wide.trip.count = zext i32 %155 to i64
  br label %.preheader289.us.us

.preheader289.us.us:                              ; preds = %.preheader289.us.us.preheader, %._crit_edge296.us.us
  %indvars.iv344 = phi i64 [ %141, %.preheader289.us.us.preheader ], [ %indvars.iv.next345, %._crit_edge296.us.us ]
  %196 = mul nsw i64 %.0244, %indvars.iv344
  br label %197

197:                                              ; preds = %216, %.preheader289.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %216 ], [ %195, %.preheader289.us.us ]
  %198 = add nsw i64 %196, %indvars.iv
  %199 = getelementptr inbounds float, ptr %.0243, i64 %198
  %200 = load float, ptr %199, align 4, !tbaa !39
  %201 = fcmp une float %200, 0x47EFFFFFE0000000
  br i1 %201, label %202, label %216

202:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #8
  %203 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %133)
  %204 = fsub float %200, %203
  %205 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %134)
  %206 = fdiv float %204, %205
  %207 = call noundef float @_ZSt5floorf(float noundef %206)
  %208 = fptosi float %207 to i32
  %209 = call noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %208, i32 noundef 0, i32 noundef 65533)
  store i32 %209, ptr %19, align 4, !tbaa !34
  %210 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %211 = load i32, ptr %210, align 4, !tbaa !34
  store i32 %211, ptr %13, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #8
  %212 = load i32, ptr %19, align 4, !tbaa !34
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %20, align 4, !tbaa !34
  %214 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %215 = load i32, ptr %214, align 4, !tbaa !34
  store i32 %215, ptr %14, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #8
  br label %216

216:                                              ; preds = %202, %197
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond343.not = icmp eq i32 %149, %lftr.wideiv
  br i1 %exitcond343.not, label %._crit_edge296.us.us, label %197, !llvm.loop !41

._crit_edge296.us.us:                             ; preds = %216
  %indvars.iv.next345 = add nuw nsw i64 %indvars.iv344, 1
  %exitcond347.not = icmp eq i64 %indvars.iv.next345, %wide.trip.count
  br i1 %exitcond347.not, label %._crit_edge298.us, label %.preheader289.us.us, !llvm.loop !42

.preheader288.us.us.preheader:                    ; preds = %162
  %217 = zext i32 %.0261305.us to i64
  %wide.trip.count356 = zext i32 %189 to i64
  br label %.preheader288.us.us

.preheader288.us.us:                              ; preds = %.preheader288.us.us.preheader, %._crit_edge301.us.us
  %indvars.iv353 = phi i64 [ %141, %.preheader288.us.us.preheader ], [ %indvars.iv.next354, %._crit_edge301.us.us ]
  %218 = mul nsw i64 %.0244, %indvars.iv353
  %219 = trunc nuw i64 %indvars.iv353 to i32
  %220 = add i32 %.0238, %219
  br label %221

221:                                              ; preds = %256, %.preheader288.us.us
  %indvars.iv348 = phi i64 [ %indvars.iv.next349, %256 ], [ %217, %.preheader288.us.us ]
  %222 = add nsw i64 %218, %indvars.iv348
  %223 = getelementptr inbounds float, ptr %.0243, i64 %222
  %224 = load float, ptr %223, align 4, !tbaa !39
  %225 = fcmp une float %224, 0x47EFFFFFE0000000
  br i1 %225, label %228, label %226

226:                                              ; preds = %221
  %227 = load i8, ptr %135, align 1, !tbaa !37
  br label %238

228:                                              ; preds = %221
  %229 = fsub float %224, %186
  %230 = fdiv float %229, %183
  %231 = call noundef float @_ZSt5floorf(float noundef %230)
  %232 = fptosi float %231 to i32
  %233 = load i8, ptr %135, align 1, !tbaa !37
  %234 = zext i8 %233 to i32
  %235 = add nsw i32 %234, -1
  %236 = call noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %232, i32 noundef 0, i32 noundef %235)
  %237 = trunc i32 %236 to i8
  br label %238

238:                                              ; preds = %228, %226
  %239 = phi i8 [ %237, %228 ], [ %227, %226 ]
  %240 = load i32, ptr %57, align 16, !tbaa !25
  %241 = mul i32 %240, %220
  %242 = trunc nuw i64 %indvars.iv348 to i32
  %243 = add i32 %.0237, %242
  %244 = add i32 %243, %241
  %245 = load i8, ptr %136, align 4, !tbaa !43
  %246 = zext i8 %245 to i32
  %247 = mul i32 %244, %246
  %248 = lshr i32 %247, 3
  %249 = and i32 %247, 7
  %250 = add nuw nsw i32 %248, 1
  %251 = load i32, ptr %40, align 8, !tbaa !5
  %252 = icmp ult i32 %250, %251
  br i1 %252, label %256, label %253

253:                                              ; preds = %238
  %254 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.2, i32 noundef 1140)
  br i1 %254, label %255, label %256

255:                                              ; preds = %253
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !44
  br label %256

256:                                              ; preds = %255, %253, %238
  %257 = load ptr, ptr %137, align 8, !tbaa !45
  %258 = zext nneg i32 %248 to i64
  %259 = getelementptr inbounds i8, ptr %257, i64 %258
  %260 = load i16, ptr %259, align 1
  %261 = zext i16 %260 to i32
  %262 = getelementptr inbounds i8, ptr %259, i64 1
  %263 = load i8, ptr %135, align 1, !tbaa !37
  %264 = zext i8 %263 to i32
  %265 = shl nuw nsw i32 %264, %249
  %266 = xor i32 %265, -1
  %267 = and i32 %266, %261
  %268 = zext i8 %239 to i32
  %269 = shl nuw nsw i32 %268, %249
  %270 = or i32 %267, %269
  %271 = trunc i32 %270 to i8
  store i8 %271, ptr %259, align 1, !tbaa !46
  %272 = lshr i32 %270, 8
  %273 = trunc nuw i32 %272 to i8
  store i8 %273, ptr %262, align 1, !tbaa !46
  %indvars.iv.next349 = add nuw nsw i64 %indvars.iv348, 1
  %lftr.wideiv351 = trunc i64 %indvars.iv.next349 to i32
  %exitcond352.not = icmp eq i32 %188, %lftr.wideiv351
  br i1 %exitcond352.not, label %._crit_edge301.us.us, label %221, !llvm.loop !47

._crit_edge301.us.us:                             ; preds = %256
  %indvars.iv.next354 = add nuw nsw i64 %indvars.iv353, 1
  %exitcond357.not = icmp eq i64 %indvars.iv.next354, %wide.trip.count356
  br i1 %exitcond357.not, label %._crit_edge303.us.loopexit, label %.preheader288.us.us, !llvm.loop !48

._crit_edge308.us:                                ; preds = %._crit_edge303.us
  %274 = add nuw i32 %.0264309.us, 1
  %275 = add i32 %192, %.0263310.us
  %276 = icmp ult i32 %274, %132
  br i1 %276, label %.preheader290.us, label %._crit_edge311, !llvm.loop !49

._crit_edge311:                                   ; preds = %._crit_edge308.us, %.preheader290.lr.ph, %125
  %277 = icmp ugt i32 %1, 1
  %278 = add i32 %1, -2
  %279 = select i1 %277, i32 %278, i32 0
  %280 = icmp ugt i32 %2, 1
  %281 = add i32 %2, -2
  %282 = select i1 %280, i32 %281, i32 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #8
  %283 = add i32 %65, 1
  store i32 %283, ptr %23, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #8
  %284 = load i32, ptr %57, align 16, !tbaa !25
  %285 = add i32 %284, -1
  store i32 %285, ptr %24, align 4, !tbaa !34
  %286 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %287 = load i32, ptr %286, align 4, !tbaa !34
  %288 = sub i32 %287, %279
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #8
  %289 = add i32 %67, 1
  store i32 %289, ptr %25, align 4, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #8
  %290 = load i32, ptr %57, align 16, !tbaa !25
  %291 = add i32 %290, -1
  store i32 %291, ptr %26, align 4, !tbaa !34
  %292 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %293 = load i32, ptr %292, align 4, !tbaa !34
  %294 = sub i32 %293, %282
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #8
  call void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %279, i32 noundef %282, i32 noundef %288, i32 noundef %294, ptr noundef %.0243, i32 noundef %.0237, i32 noundef %.0238, i64 noundef %.0244, float noundef 1.000000e+00, float noundef %8, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %.not280 = icmp eq ptr %.0245, null
  br i1 %.not280, label %301, label %295

295:                                              ; preds = %._crit_edge311
  %296 = mul i32 %.0241, %.0242
  %297 = shl i32 %296, 2
  %298 = load ptr, ptr %7, align 8, !tbaa !28
  %299 = getelementptr inbounds i8, ptr %298, i64 24
  %300 = load ptr, ptr %299, align 8
  call void %300(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %.0245, i32 noundef %297)
  br label %301

301:                                              ; preds = %295, %._crit_edge311
  %302 = icmp ugt i32 %127, 1
  br i1 %302, label %.lr.ph332, label %._crit_edge333

.lr.ph332:                                        ; preds = %301, %._crit_edge325
  %.0250330 = phi i32 [ %305, %._crit_edge325 ], [ %127, %301 ]
  %.0251329 = phi i32 [ %376, %._crit_edge325 ], [ %129, %301 ]
  %.0253328 = phi i32 [ %377, %._crit_edge325 ], [ %130, %301 ]
  %.0255327 = phi i32 [ %381, %._crit_edge325 ], [ %131, %301 ]
  %.0257326 = phi i32 [ %385, %._crit_edge325 ], [ %132, %301 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #8
  %303 = load i32, ptr %10, align 4, !tbaa !34
  %304 = lshr i32 %303, 1
  %305 = add i32 %.0250330, -1
  call void @_ZN3JPH16HeightFieldShape29sGetRangeBlockOffsetAndStrideEjjRjS1_(i32 noundef %304, i32 noundef %305, ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %306 = and i32 %.0251329, 1
  %.1256 = add i32 %306, %.0255327
  %.1252 = and i32 %.0251329, -2
  %307 = and i32 %.0253328, 1
  %.1258 = add i32 %307, %.0257326
  %.1254 = and i32 %.0253328, -2
  %308 = add i32 %.1256, %.1252
  %309 = add i32 %.1258, %.1254
  %310 = icmp ult i32 %.1254, %309
  %311 = icmp ult i32 %.1252, %308
  %or.cond375 = select i1 %310, i1 %311, i1 false
  br i1 %or.cond375, label %.preheader.us, label %._crit_edge325

.preheader.us:                                    ; preds = %.lr.ph332, %._crit_edge323.us
  %.0234324.us = phi i32 [ %372, %._crit_edge323.us ], [ %.1254, %.lr.ph332 ]
  %312 = lshr exact i32 %.0234324.us, 1
  br label %313

313:                                              ; preds = %.preheader.us, %358
  %.0233321.us = phi i32 [ %.1252, %.preheader.us ], [ %370, %358 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #8
  %314 = load i32, ptr %11, align 4, !tbaa !34
  %315 = load i32, ptr %12, align 4, !tbaa !34
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %.0233321.us, i32 noundef %.0234324.us, i32 noundef %314, i32 noundef %315, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30)
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %31) #8
  store i16 -1, ptr %31, align 2, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %32) #8
  store i16 0, ptr %32, align 2, !tbaa !36
  %316 = load ptr, ptr %29, align 8, !tbaa !35
  %317 = load i16, ptr %316, align 2, !tbaa !36
  %.not284.us = icmp eq i16 %317, -1
  br i1 %.not284.us, label %325, label %318

318:                                              ; preds = %313
  %319 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %31, ptr noundef nonnull align 2 dereferenceable(2) %316)
  %320 = load i16, ptr %319, align 2, !tbaa !36
  store i16 %320, ptr %31, align 2, !tbaa !36
  %321 = load ptr, ptr %29, align 8, !tbaa !35
  %322 = getelementptr inbounds i8, ptr %321, i64 8
  %323 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %32, ptr noundef nonnull align 2 dereferenceable(2) %322)
  %324 = load i16, ptr %323, align 2, !tbaa !36
  store i16 %324, ptr %32, align 2, !tbaa !36
  %.pre366 = load ptr, ptr %29, align 8, !tbaa !35
  br label %325

325:                                              ; preds = %318, %313
  %326 = phi ptr [ %.pre366, %318 ], [ %316, %313 ]
  %327 = getelementptr inbounds i8, ptr %326, i64 2
  %328 = load i16, ptr %327, align 2, !tbaa !36
  %.not284.us.1 = icmp eq i16 %328, -1
  br i1 %.not284.us.1, label %336, label %329

329:                                              ; preds = %325
  %330 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %31, ptr noundef nonnull align 2 dereferenceable(2) %327)
  %331 = load i16, ptr %330, align 2, !tbaa !36
  store i16 %331, ptr %31, align 2, !tbaa !36
  %332 = load ptr, ptr %29, align 8, !tbaa !35
  %333 = getelementptr inbounds i8, ptr %332, i64 10
  %334 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %32, ptr noundef nonnull align 2 dereferenceable(2) %333)
  %335 = load i16, ptr %334, align 2, !tbaa !36
  store i16 %335, ptr %32, align 2, !tbaa !36
  %.pre367 = load ptr, ptr %29, align 8, !tbaa !35
  br label %336

336:                                              ; preds = %329, %325
  %337 = phi ptr [ %.pre367, %329 ], [ %326, %325 ]
  %338 = getelementptr inbounds i8, ptr %337, i64 4
  %339 = load i16, ptr %338, align 2, !tbaa !36
  %.not284.us.2 = icmp eq i16 %339, -1
  br i1 %.not284.us.2, label %347, label %340

340:                                              ; preds = %336
  %341 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %31, ptr noundef nonnull align 2 dereferenceable(2) %338)
  %342 = load i16, ptr %341, align 2, !tbaa !36
  store i16 %342, ptr %31, align 2, !tbaa !36
  %343 = load ptr, ptr %29, align 8, !tbaa !35
  %344 = getelementptr inbounds i8, ptr %343, i64 12
  %345 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %32, ptr noundef nonnull align 2 dereferenceable(2) %344)
  %346 = load i16, ptr %345, align 2, !tbaa !36
  store i16 %346, ptr %32, align 2, !tbaa !36
  %.pre368 = load ptr, ptr %29, align 8, !tbaa !35
  br label %347

347:                                              ; preds = %340, %336
  %348 = phi ptr [ %.pre368, %340 ], [ %337, %336 ]
  %349 = getelementptr inbounds i8, ptr %348, i64 6
  %350 = load i16, ptr %349, align 2, !tbaa !36
  %.not284.us.3 = icmp eq i16 %350, -1
  br i1 %.not284.us.3, label %358, label %351

351:                                              ; preds = %347
  %352 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %31, ptr noundef nonnull align 2 dereferenceable(2) %349)
  %353 = load i16, ptr %352, align 2, !tbaa !36
  store i16 %353, ptr %31, align 2, !tbaa !36
  %354 = load ptr, ptr %29, align 8, !tbaa !35
  %355 = getelementptr inbounds i8, ptr %354, i64 14
  %356 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %32, ptr noundef nonnull align 2 dereferenceable(2) %355)
  %357 = load i16, ptr %356, align 2, !tbaa !36
  store i16 %357, ptr %32, align 2, !tbaa !36
  br label %358

358:                                              ; preds = %351, %347
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #8
  %359 = lshr exact i32 %.0233321.us, 1
  %360 = load i32, ptr %27, align 4, !tbaa !34
  %361 = load i32, ptr %28, align 4, !tbaa !34
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %359, i32 noundef %312, i32 noundef %360, i32 noundef %361, ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %362 = load i16, ptr %31, align 2, !tbaa !36
  %363 = load ptr, ptr %33, align 8, !tbaa !35
  %364 = load i32, ptr %34, align 4, !tbaa !34
  %365 = zext i32 %364 to i64
  %366 = getelementptr inbounds [4 x i16], ptr %363, i64 0, i64 %365
  store i16 %362, ptr %366, align 2, !tbaa !36
  %367 = load i16, ptr %32, align 2, !tbaa !36
  %368 = getelementptr inbounds i8, ptr %363, i64 8
  %369 = getelementptr inbounds [4 x i16], ptr %368, i64 0, i64 %365
  store i16 %367, ptr %369, align 2, !tbaa !36
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %32) #8
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #8
  %370 = add i32 %.0233321.us, 2
  %371 = icmp ult i32 %370, %308
  br i1 %371, label %313, label %._crit_edge323.us, !llvm.loop !50

._crit_edge323.us:                                ; preds = %358
  %372 = add i32 %.0234324.us, 2
  %373 = icmp ult i32 %372, %309
  br i1 %373, label %.preheader.us, label %._crit_edge325, !llvm.loop !51

._crit_edge325:                                   ; preds = %._crit_edge323.us, %.lr.ph332
  %374 = load i32, ptr %10, align 4, !tbaa !34
  %375 = lshr i32 %374, 1
  store i32 %375, ptr %10, align 4, !tbaa !34
  %376 = lshr i32 %.0251329, 1
  %377 = lshr i32 %.0253328, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #8
  %378 = add i32 %.1256, 1
  %379 = lshr i32 %378, 1
  store i32 %379, ptr %35, align 4, !tbaa !34
  %380 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %381 = load i32, ptr %380, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %36) #8
  %382 = add i32 %.1258, 1
  %383 = lshr i32 %382, 1
  store i32 %383, ptr %36, align 4, !tbaa !34
  %384 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %385 = load i32, ptr %384, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #8
  %386 = load i32, ptr %27, align 4, !tbaa !34
  store i32 %386, ptr %11, align 4, !tbaa !34
  %387 = load i32, ptr %28, align 4, !tbaa !34
  store i32 %387, ptr %12, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #8
  %388 = icmp ugt i32 %305, 1
  br i1 %388, label %.lr.ph332, label %._crit_edge333, !llvm.loop !52

._crit_edge333:                                   ; preds = %._crit_edge325, %301
  %389 = getelementptr inbounds i8, ptr %0, i64 86
  store i16 -1, ptr %389, align 2, !tbaa !53
  %390 = getelementptr inbounds i8, ptr %0, i64 88
  store i16 0, ptr %390, align 8, !tbaa !54
  %391 = getelementptr inbounds i8, ptr %0, i64 96
  %392 = load ptr, ptr %391, align 16, !tbaa !55
  %393 = load i16, ptr %392, align 2, !tbaa !36
  %.not281 = icmp eq i16 %393, -1
  br i1 %.not281, label %401, label %394

394:                                              ; preds = %._crit_edge333
  %395 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %389, ptr noundef nonnull align 2 dereferenceable(2) %392)
  %396 = load i16, ptr %395, align 2, !tbaa !36
  store i16 %396, ptr %389, align 2, !tbaa !53
  %397 = load ptr, ptr %391, align 16, !tbaa !55
  %398 = getelementptr inbounds i8, ptr %397, i64 8
  %399 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %390, ptr noundef nonnull align 2 dereferenceable(2) %398)
  %400 = load i16, ptr %399, align 2, !tbaa !36
  store i16 %400, ptr %390, align 8, !tbaa !54
  %.pre369 = load ptr, ptr %391, align 16, !tbaa !55
  br label %401

401:                                              ; preds = %._crit_edge333, %394
  %402 = phi ptr [ %392, %._crit_edge333 ], [ %.pre369, %394 ]
  %403 = getelementptr inbounds i8, ptr %402, i64 2
  %404 = load i16, ptr %403, align 2, !tbaa !36
  %.not281.1 = icmp eq i16 %404, -1
  br i1 %.not281.1, label %412, label %405

405:                                              ; preds = %401
  %406 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %389, ptr noundef nonnull align 2 dereferenceable(2) %403)
  %407 = load i16, ptr %406, align 2, !tbaa !36
  store i16 %407, ptr %389, align 2, !tbaa !53
  %408 = load ptr, ptr %391, align 16, !tbaa !55
  %409 = getelementptr inbounds i8, ptr %408, i64 10
  %410 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %390, ptr noundef nonnull align 2 dereferenceable(2) %409)
  %411 = load i16, ptr %410, align 2, !tbaa !36
  store i16 %411, ptr %390, align 8, !tbaa !54
  %.pre370 = load ptr, ptr %391, align 16, !tbaa !55
  br label %412

412:                                              ; preds = %405, %401
  %413 = phi ptr [ %.pre370, %405 ], [ %402, %401 ]
  %414 = getelementptr inbounds i8, ptr %413, i64 4
  %415 = load i16, ptr %414, align 2, !tbaa !36
  %.not281.2 = icmp eq i16 %415, -1
  br i1 %.not281.2, label %423, label %416

416:                                              ; preds = %412
  %417 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %389, ptr noundef nonnull align 2 dereferenceable(2) %414)
  %418 = load i16, ptr %417, align 2, !tbaa !36
  store i16 %418, ptr %389, align 2, !tbaa !53
  %419 = load ptr, ptr %391, align 16, !tbaa !55
  %420 = getelementptr inbounds i8, ptr %419, i64 12
  %421 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %390, ptr noundef nonnull align 2 dereferenceable(2) %420)
  %422 = load i16, ptr %421, align 2, !tbaa !36
  store i16 %422, ptr %390, align 8, !tbaa !54
  %.pre371 = load ptr, ptr %391, align 16, !tbaa !55
  br label %423

423:                                              ; preds = %416, %412
  %424 = phi ptr [ %.pre371, %416 ], [ %413, %412 ]
  %425 = getelementptr inbounds i8, ptr %424, i64 6
  %426 = load i16, ptr %425, align 2, !tbaa !36
  %.not281.3 = icmp eq i16 %426, -1
  br i1 %.not281.3, label %434, label %427

427:                                              ; preds = %423
  %428 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %389, ptr noundef nonnull align 2 dereferenceable(2) %425)
  %429 = load i16, ptr %428, align 2, !tbaa !36
  store i16 %429, ptr %389, align 2, !tbaa !53
  %430 = load ptr, ptr %391, align 16, !tbaa !55
  %431 = getelementptr inbounds i8, ptr %430, i64 14
  %432 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %390, ptr noundef nonnull align 2 dereferenceable(2) %431)
  %433 = load i16, ptr %432, align 2, !tbaa !36
  store i16 %433, ptr %390, align 8, !tbaa !54
  br label %434

434:                                              ; preds = %427, %423
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %435

435:                                              ; preds = %9, %434
  ret void
}

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 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 #5 = { 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 #6 = { alwaysinline 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 #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 72}
!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 2158616427}
!23 = !{!6, !11, i64 68}
!24 = !{i64 2158616829}
!25 = !{!6, !11, i64 64}
!26 = !{i64 2158617220}
!27 = !{i64 2158617655}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !13, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!11, !11, i64 0}
!35 = !{!19, !19, i64 0}
!36 = !{!18, !18, i64 0}
!37 = !{!6, !12, i64 85}
!38 = distinct !{!38, !33}
!39 = !{!40, !40, i64 0}
!40 = !{!"float", !12, i64 0}
!41 = distinct !{!41, !33}
!42 = distinct !{!42, !33}
!43 = !{!6, !12, i64 84}
!44 = !{i64 2158618032}
!45 = !{!6, !19, i64 104}
!46 = !{!12, !12, i64 0}
!47 = distinct !{!47, !33}
!48 = distinct !{!48, !33}
!49 = distinct !{!49, !33}
!50 = distinct !{!50, !33}
!51 = distinct !{!51, !33}
!52 = distinct !{!52, !33}
!53 = !{!6, !18, i64 86}
!54 = !{!6, !18, i64 88}
!55 = !{!6, !19, i64 96}


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