; LLVM IR from zig-gamedev/zphysics :: libs/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 [109 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 %908

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 962)
  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 963)
  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 964)
  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 965)
  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 1104)
  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 = %841, %718
  %720 = load i32, ptr %44, align 4, !tbaa !9
  %721 = icmp ugt i32 %720, 1
  br i1 %721, label %722, label %862

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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %93) #8
  %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 %739

730:                                              ; preds = %722
  %731 = load i32, ptr %45, align 4, !tbaa !9
  %732 = load i32, ptr %47, align 4, !tbaa !9
  %733 = add i32 %731, %732
  %734 = load i32, ptr %41, align 4, !tbaa !9
  %735 = icmp ult i32 %733, %734
  br i1 %735, label %736, label %739

736:                                              ; preds = %730
  %737 = load i32, ptr %47, align 4, !tbaa !9
  %738 = add i32 %737, 1
  br label %741

739:                                              ; preds = %730, %722
  %740 = load i32, ptr %47, align 4, !tbaa !9
  br label %741

741:                                              ; preds = %739, %736
  %742 = phi i32 [ %738, %736 ], [ %740, %739 ]
  store i32 %742, ptr %93, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %94) #8
  %743 = load i32, ptr %46, align 4, !tbaa !9
  %744 = and i32 %743, 1
  %745 = icmp ne i32 %744, 0
  br i1 %745, label %746, label %755

746:                                              ; preds = %741
  %747 = load i32, ptr %46, align 4, !tbaa !9
  %748 = load i32, ptr %48, align 4, !tbaa !9
  %749 = add i32 %747, %748
  %750 = load i32, ptr %41, align 4, !tbaa !9
  %751 = icmp ult i32 %749, %750
  br i1 %751, label %752, label %755

752:                                              ; preds = %746
  %753 = load i32, ptr %48, align 4, !tbaa !9
  %754 = add i32 %753, 1
  br label %757

755:                                              ; preds = %746, %741
  %756 = load i32, ptr %48, align 4, !tbaa !9
  br label %757

757:                                              ; preds = %755, %752
  %758 = phi i32 [ %754, %752 ], [ %756, %755 ]
  store i32 %758, ptr %94, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %95) #8
  store i32 0, ptr %95, align 4, !tbaa !9
  br label %759

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

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

764:                                              ; preds = %759
  call void @llvm.lifetime.start.p0(i64 4, ptr %96) #8
  store i32 0, ptr %96, align 4, !tbaa !9
  br label %765

765:                                              ; preds = %834, %764
  %766 = load i32, ptr %96, align 4, !tbaa !9
  %767 = load i32, ptr %93, align 4, !tbaa !9
  %768 = icmp ult i32 %766, %767
  br i1 %768, label %770, label %769

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

770:                                              ; preds = %765
  call void @llvm.lifetime.start.p0(i64 8, ptr %97) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %98) #8
  %771 = load i32, ptr %45, align 4, !tbaa !9
  %772 = load i32, ptr %96, align 4, !tbaa !9
  %773 = add i32 %771, %772
  %774 = load i32, ptr %46, align 4, !tbaa !9
  %775 = load i32, ptr %95, align 4, !tbaa !9
  %776 = add i32 %774, %775
  %777 = load i32, ptr %42, align 4, !tbaa !9
  %778 = load i32, ptr %43, align 4, !tbaa !9
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %773, i32 noundef %776, i32 noundef %777, i32 noundef %778, 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 %779

779:                                              ; preds = %808, %770
  %780 = load i32, ptr %101, align 4, !tbaa !9
  %781 = icmp ult i32 %780, 4
  br i1 %781, label %783, label %782

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

783:                                              ; preds = %779
  %784 = load ptr, ptr %97, align 8, !tbaa !5
  %785 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %784, i32 0, i32 0
  %786 = load i32, ptr %101, align 4, !tbaa !9
  %787 = zext i32 %786 to i64
  %788 = getelementptr inbounds [4 x i16], ptr %785, i64 0, i64 %787
  %789 = load i16, ptr %788, align 2, !tbaa !43
  %790 = zext i16 %789 to i32
  %791 = icmp ne i32 %790, 65535
  br i1 %791, label %792, label %807

792:                                              ; preds = %783
  %793 = load ptr, ptr %97, align 8, !tbaa !5
  %794 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %793, i32 0, i32 0
  %795 = load i32, ptr %101, align 4, !tbaa !9
  %796 = zext i32 %795 to i64
  %797 = getelementptr inbounds [4 x i16], ptr %794, i64 0, i64 %796
  %798 = 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) %797)
  %799 = load i16, ptr %798, align 2, !tbaa !43
  store i16 %799, ptr %99, align 2, !tbaa !43
  %800 = load ptr, ptr %97, align 8, !tbaa !5
  %801 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %800, i32 0, i32 1
  %802 = load i32, ptr %101, align 4, !tbaa !9
  %803 = zext i32 %802 to i64
  %804 = getelementptr inbounds [4 x i16], ptr %801, i64 0, i64 %803
  %805 = 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) %804)
  %806 = load i16, ptr %805, align 2, !tbaa !43
  store i16 %806, ptr %100, align 2, !tbaa !43
  br label %807

807:                                              ; preds = %792, %783
  br label %808

808:                                              ; preds = %807
  %809 = load i32, ptr %101, align 4, !tbaa !9
  %810 = add i32 %809, 1
  store i32 %810, ptr %101, align 4, !tbaa !9
  br label %779, !llvm.loop !53

811:                                              ; preds = %782
  call void @llvm.lifetime.start.p0(i64 8, ptr %102) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %103) #8
  %812 = load i32, ptr %45, align 4, !tbaa !9
  %813 = load i32, ptr %96, align 4, !tbaa !9
  %814 = add i32 %812, %813
  %815 = lshr i32 %814, 1
  %816 = load i32, ptr %46, align 4, !tbaa !9
  %817 = load i32, ptr %95, align 4, !tbaa !9
  %818 = add i32 %816, %817
  %819 = lshr i32 %818, 1
  %820 = load i32, ptr %91, align 4, !tbaa !9
  %821 = load i32, ptr %92, align 4, !tbaa !9
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %107, i32 noundef %815, i32 noundef %819, i32 noundef %820, i32 noundef %821, ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull align 4 dereferenceable(4) %103)
  %822 = load i16, ptr %99, align 2, !tbaa !43
  %823 = load ptr, ptr %102, align 8, !tbaa !5
  %824 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %823, i32 0, i32 0
  %825 = load i32, ptr %103, align 4, !tbaa !9
  %826 = zext i32 %825 to i64
  %827 = getelementptr inbounds [4 x i16], ptr %824, i64 0, i64 %826
  store i16 %822, ptr %827, align 2, !tbaa !43
  %828 = load i16, ptr %100, align 2, !tbaa !43
  %829 = load ptr, ptr %102, align 8, !tbaa !5
  %830 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %829, i32 0, i32 1
  %831 = load i32, ptr %103, align 4, !tbaa !9
  %832 = zext i32 %831 to i64
  %833 = getelementptr inbounds [4 x i16], ptr %830, i64 0, i64 %832
  store i16 %828, ptr %833, 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 %834

834:                                              ; preds = %811
  %835 = load i32, ptr %96, align 4, !tbaa !9
  %836 = add i32 %835, 2
  store i32 %836, ptr %96, align 4, !tbaa !9
  br label %765, !llvm.loop !54

837:                                              ; preds = %769
  br label %838

838:                                              ; preds = %837
  %839 = load i32, ptr %95, align 4, !tbaa !9
  %840 = add i32 %839, 2
  store i32 %840, ptr %95, align 4, !tbaa !9
  br label %759, !llvm.loop !55

841:                                              ; preds = %763
  %842 = load i32, ptr %44, align 4, !tbaa !9
  %843 = add i32 %842, -1
  store i32 %843, ptr %44, align 4, !tbaa !9
  %844 = load i32, ptr %41, align 4, !tbaa !9
  %845 = lshr i32 %844, 1
  store i32 %845, ptr %41, align 4, !tbaa !9
  %846 = load i32, ptr %45, align 4, !tbaa !9
  %847 = lshr i32 %846, 1
  store i32 %847, ptr %45, align 4, !tbaa !9
  %848 = load i32, ptr %46, align 4, !tbaa !9
  %849 = lshr i32 %848, 1
  store i32 %849, ptr %46, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %104) #8
  %850 = load i32, ptr %47, align 4, !tbaa !9
  %851 = add i32 %850, 1
  %852 = lshr i32 %851, 1
  store i32 %852, ptr %104, align 4, !tbaa !9
  %853 = 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)
  %854 = load i32, ptr %853, align 4, !tbaa !9
  store i32 %854, 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
  %855 = load i32, ptr %48, align 4, !tbaa !9
  %856 = add i32 %855, 1
  %857 = lshr i32 %856, 1
  store i32 %857, ptr %105, align 4, !tbaa !9
  %858 = 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)
  %859 = load i32, ptr %858, align 4, !tbaa !9
  store i32 %859, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %105) #8
  %860 = load i32, ptr %91, align 4, !tbaa !9
  store i32 %860, ptr %42, align 4, !tbaa !9
  %861 = load i32, ptr %92, align 4, !tbaa !9
  store i32 %861, 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

862:                                              ; preds = %719
  %863 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 11
  store i16 -1, ptr %863, align 2, !tbaa !57
  %864 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 12
  store i16 0, ptr %864, 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 %865

865:                                              ; preds = %904, %862
  %866 = load i32, ptr %106, align 4, !tbaa !9
  %867 = icmp ult i32 %866, 4
  br i1 %867, label %869, label %868

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

869:                                              ; preds = %865
  %870 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 14
  %871 = load ptr, ptr %870, align 16, !tbaa !59
  %872 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %871, i64 0
  %873 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %872, i32 0, i32 0
  %874 = load i32, ptr %106, align 4, !tbaa !9
  %875 = zext i32 %874 to i64
  %876 = getelementptr inbounds [4 x i16], ptr %873, i64 0, i64 %875
  %877 = load i16, ptr %876, align 2, !tbaa !43
  %878 = zext i16 %877 to i32
  %879 = icmp ne i32 %878, 65535
  br i1 %879, label %880, label %903

880:                                              ; preds = %869
  %881 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 11
  %882 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 14
  %883 = load ptr, ptr %882, align 16, !tbaa !59
  %884 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %883, i64 0
  %885 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %884, i32 0, i32 0
  %886 = load i32, ptr %106, align 4, !tbaa !9
  %887 = zext i32 %886 to i64
  %888 = getelementptr inbounds [4 x i16], ptr %885, i64 0, i64 %887
  %889 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %881, ptr noundef nonnull align 2 dereferenceable(2) %888)
  %890 = load i16, ptr %889, align 2, !tbaa !43
  %891 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 11
  store i16 %890, ptr %891, align 2, !tbaa !57
  %892 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 12
  %893 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 14
  %894 = load ptr, ptr %893, align 16, !tbaa !59
  %895 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %894, i64 0
  %896 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %895, i32 0, i32 1
  %897 = load i32, ptr %106, align 4, !tbaa !9
  %898 = zext i32 %897 to i64
  %899 = getelementptr inbounds [4 x i16], ptr %896, i64 0, i64 %898
  %900 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %892, ptr noundef nonnull align 2 dereferenceable(2) %899)
  %901 = load i16, ptr %900, align 2, !tbaa !43
  %902 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %107, i32 0, i32 12
  store i16 %901, ptr %902, align 8, !tbaa !58
  br label %903

903:                                              ; preds = %880, %869
  br label %904

904:                                              ; preds = %903
  %905 = load i32, ptr %106, align 4, !tbaa !9
  %906 = add i32 %905, 1
  store i32 %906, ptr %106, align 4, !tbaa !9
  br label %865, !llvm.loop !60

907:                                              ; preds = %868
  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 %908

908:                                              ; preds = %907, %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 2158410596}
!28 = !{!16, !10, i64 68}
!29 = !{i64 2158411005}
!30 = !{!16, !10, i64 64}
!31 = !{i64 2158411402}
!32 = !{i64 2158411843}
!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 2158412227}
!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 [109 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 %447, 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 962)
  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 963)
  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.cond283 = and i1 %59, %60
  br i1 %or.cond283, 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 964)
  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
  %.not274 = icmp ugt i32 %65, %66
  %67 = add i32 %4, %2
  %.not275 = icmp ugt i32 %67, %66
  %or.cond284 = or i1 %.not274, %.not275
  br i1 %or.cond284, 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 965)
  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
  %.not276.not = icmp eq i32 %1, 0
  %72 = load i32, ptr %46, align 4
  %73 = sub i32 %1, %72
  %74 = select i1 %.not276.not, i32 0, i32 %72
  %.0241 = add i32 %74, %3
  %.0239 = select i1 %.not276.not, i32 0, i32 %73
  %.not277.not = icmp eq i32 %2, 0
  %75 = sub i32 %2, %72
  %76 = select i1 %.not277.not, i32 0, i32 %72
  %.0242 = add i32 %76, %4
  %.0240 = select i1 %.not277.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
  %.0243 = add i32 %80, %.0241
  %.2 = or i1 %.1, %79
  %81 = icmp ult i32 %67, %78
  %82 = select i1 %81, i32 %72, i32 0
  %.0244 = add i32 %82, %.0242
  %.3 = or i1 %81, %.2
  br i1 %.3, label %.lr.ph, label %125

.lr.ph:                                           ; preds = %71
  %83 = mul i32 %.0243, %.0244
  %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 %.0243 to i64
  %90 = sub i32 %1, %.0239
  %91 = sub i32 %2, %.0240
  tail call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %.0239, i32 noundef %.0240, i32 noundef %.0243, i32 noundef %91, ptr noundef %88, i64 noundef %89)
  %92 = mul i32 %.0243, %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 %.0239, 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
  %.0237292.unr = phi ptr [ %5, %.lr.ph ], [ %124, %116 ]
  %.0248291.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
  %.0237292.epil = phi ptr [ %102, %.epil.preheader ], [ %.0237292.unr, %._crit_edge.unr-lcssa ]
  %.0248291.epil = phi ptr [ %101, %.epil.preheader ], [ %.0248291.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 %.0248291.epil, ptr align 4 %.0237292.epil, i64 %98, i1 false)
  %101 = getelementptr inbounds float, ptr %.0248291.epil, i64 %89
  %102 = getelementptr inbounds float, ptr %.0237292.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 %.0239, %65
  %104 = add i32 %103, %.0243
  %105 = zext i32 %65 to i64
  %106 = getelementptr inbounds float, ptr %94, i64 %105
  %107 = zext i32 %.0239 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, %.0240
  %111 = mul i32 %.0243, %110
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds float, ptr %88, i64 %112
  %114 = sub i32 %.0240, %67
  %115 = add i32 %114, %.0244
  tail call void @_ZNK3JPH16HeightFieldShape10GetHeightsEjjjjPfl(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %.0239, i32 noundef %67, i32 noundef %.0243, i32 noundef %115, ptr noundef %113, i64 noundef %89)
  br label %125

116:                                              ; preds = %116, %.lr.ph.new
  %.0237292 = phi ptr [ %5, %.lr.ph.new ], [ %124, %116 ]
  %.0248291 = 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 %.0248291, ptr align 4 %.0237292, i64 %98, i1 false)
  %117 = getelementptr inbounds float, ptr %.0248291, i64 %89
  %118 = getelementptr inbounds float, ptr %.0237292, 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
  %.0247 = phi ptr [ %88, %._crit_edge ], [ null, %71 ]
  %.0246 = phi i64 [ %89, %._crit_edge ], [ %6, %71 ]
  %.0245 = 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 %.0239, %128
  %130 = udiv i32 %.0240, %128
  %131 = udiv i32 %.0241, %128
  %132 = udiv i32 %.0242, %128
  %.not337 = icmp ugt i32 %128, %.0242
  br i1 %.not337, label %._crit_edge310, label %.preheader289.lr.ph

.preheader289.lr.ph:                              ; preds = %125
  %.not338 = icmp ugt i32 %128, %.0241
  %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 %.not338, label %._crit_edge310, label %.preheader289.us

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

142:                                              ; preds = %.preheader289.us, %._crit_edge302.us
  %143 = phi i32 [ %138, %.preheader289.us ], [ %192, %._crit_edge302.us ]
  %.0259304.us = phi i32 [ 0, %.preheader289.us ], [ %.pre-phi, %._crit_edge302.us ]
  %.0260303.us = phi i32 [ 0, %.preheader289.us ], [ %193, %._crit_edge302.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 %.0259304.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, %.0239
  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, %.0240
  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 %.0261309.us, %155
  %157 = icmp ult i32 %.0259304.us, %149
  %or.cond376 = select i1 %156, i1 %157, i1 false
  br i1 %or.cond376, label %.preheader288.us.us.preheader, label %._crit_edge297.us

._crit_edge297.us:                                ; preds = %._crit_edge295.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_edge297.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_edge297.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 %.0260303.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, %.0259304.us
  %189 = add i32 %187, %.0261309.us
  %190 = icmp ult i32 %.0261309.us, %189
  %191 = icmp ult i32 %.0259304.us, %188
  %or.cond377 = select i1 %190, i1 %191, i1 false
  br i1 %or.cond377, label %.preheader287.us.us.preheader, label %._crit_edge302.us

._crit_edge302.us.loopexit:                       ; preds = %._crit_edge300.us.us
  %.pre = load i32, ptr %46, align 4, !tbaa !23
  %.pre375 = add i32 %.pre, %.0259304.us
  br label %._crit_edge302.us

._crit_edge302.us:                                ; preds = %._crit_edge302.us.loopexit, %162
  %.pre-phi = phi i32 [ %.pre375, %._crit_edge302.us.loopexit ], [ %188, %162 ]
  %192 = phi i32 [ %.pre, %._crit_edge302.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 %.0260303.us, 1
  %194 = icmp ult i32 %193, %131
  br i1 %194, label %142, label %._crit_edge307.us, !llvm.loop !38

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

.preheader288.us.us:                              ; preds = %.preheader288.us.us.preheader, %._crit_edge295.us.us
  %indvars.iv347 = phi i64 [ %141, %.preheader288.us.us.preheader ], [ %indvars.iv.next348, %._crit_edge295.us.us ]
  %196 = mul nsw i64 %.0246, %indvars.iv347
  br label %197

197:                                              ; preds = %216, %.preheader288.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %216 ], [ %195, %.preheader288.us.us ]
  %198 = add nsw i64 %196, %indvars.iv
  %199 = getelementptr inbounds float, ptr %.0245, 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
  %exitcond346.not = icmp eq i32 %149, %lftr.wideiv
  br i1 %exitcond346.not, label %._crit_edge295.us.us, label %197, !llvm.loop !41

._crit_edge295.us.us:                             ; preds = %216
  %indvars.iv.next348 = add nuw nsw i64 %indvars.iv347, 1
  %exitcond350.not = icmp eq i64 %indvars.iv.next348, %wide.trip.count
  br i1 %exitcond350.not, label %._crit_edge297.us, label %.preheader288.us.us, !llvm.loop !42

.preheader287.us.us.preheader:                    ; preds = %162
  %217 = zext i32 %.0259304.us to i64
  %wide.trip.count359 = zext i32 %189 to i64
  br label %.preheader287.us.us

.preheader287.us.us:                              ; preds = %.preheader287.us.us.preheader, %._crit_edge300.us.us
  %indvars.iv356 = phi i64 [ %141, %.preheader287.us.us.preheader ], [ %indvars.iv.next357, %._crit_edge300.us.us ]
  %218 = mul nsw i64 %.0246, %indvars.iv356
  %219 = trunc nuw i64 %indvars.iv356 to i32
  %220 = add i32 %.0240, %219
  br label %221

221:                                              ; preds = %256, %.preheader287.us.us
  %indvars.iv351 = phi i64 [ %indvars.iv.next352, %256 ], [ %217, %.preheader287.us.us ]
  %222 = add nsw i64 %218, %indvars.iv351
  %223 = getelementptr inbounds float, ptr %.0245, 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.iv351 to i32
  %243 = add i32 %.0239, %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 1104)
  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.next352 = add nuw nsw i64 %indvars.iv351, 1
  %lftr.wideiv354 = trunc i64 %indvars.iv.next352 to i32
  %exitcond355.not = icmp eq i32 %188, %lftr.wideiv354
  br i1 %exitcond355.not, label %._crit_edge300.us.us, label %221, !llvm.loop !47

._crit_edge300.us.us:                             ; preds = %256
  %indvars.iv.next357 = add nuw nsw i64 %indvars.iv356, 1
  %exitcond360.not = icmp eq i64 %indvars.iv.next357, %wide.trip.count359
  br i1 %exitcond360.not, label %._crit_edge302.us.loopexit, label %.preheader287.us.us, !llvm.loop !48

._crit_edge307.us:                                ; preds = %._crit_edge302.us
  %274 = add nuw i32 %.0262308.us, 1
  %275 = add i32 %192, %.0261309.us
  %276 = icmp ult i32 %274, %132
  br i1 %276, label %.preheader289.us, label %._crit_edge310, !llvm.loop !49

._crit_edge310:                                   ; preds = %._crit_edge307.us, %.preheader289.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 %.0245, i32 noundef %.0239, i32 noundef %.0240, i64 noundef %.0246, float noundef 1.000000e+00, float noundef %8, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %.not278 = icmp eq ptr %.0247, null
  br i1 %.not278, label %301, label %295

295:                                              ; preds = %._crit_edge310
  %296 = mul i32 %.0243, %.0244
  %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 %.0247, i32 noundef %297)
  br label %301

301:                                              ; preds = %295, %._crit_edge310
  %302 = icmp ugt i32 %127, 1
  br i1 %302, label %.lr.ph333, label %._crit_edge334

.lr.ph333:                                        ; preds = %301, %._crit_edge324
  %.0252331 = phi i32 [ %305, %._crit_edge324 ], [ %127, %301 ]
  %.0253329 = phi i32 [ %388, %._crit_edge324 ], [ %129, %301 ]
  %.0254327 = phi i32 [ %389, %._crit_edge324 ], [ %130, %301 ]
  %.0255326 = phi i32 [ %393, %._crit_edge324 ], [ %131, %301 ]
  %.0256325 = phi i32 [ %397, %._crit_edge324 ], [ %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 %.0252331, -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 %.0253329, 1
  %.not280 = icmp eq i32 %306, 0
  br i1 %.not280, label %312, label %307

307:                                              ; preds = %.lr.ph333
  %308 = add i32 %.0253329, %.0255326
  %309 = load i32, ptr %10, align 4, !tbaa !34
  %310 = icmp ult i32 %308, %309
  %311 = zext i1 %310 to i32
  %spec.select = add i32 %.0255326, %311
  br label %312

312:                                              ; preds = %307, %.lr.ph333
  %313 = phi i32 [ %.0255326, %.lr.ph333 ], [ %spec.select, %307 ]
  %314 = and i32 %.0254327, 1
  %.not281 = icmp eq i32 %314, 0
  br i1 %.not281, label %320, label %315

315:                                              ; preds = %312
  %316 = add i32 %.0254327, %.0256325
  %317 = load i32, ptr %10, align 4, !tbaa !34
  %318 = icmp ult i32 %316, %317
  %319 = zext i1 %318 to i32
  %spec.select285 = add i32 %.0256325, %319
  br label %320

320:                                              ; preds = %315, %312
  %321 = phi i32 [ %.0256325, %312 ], [ %spec.select285, %315 ]
  %.not339 = icmp eq i32 %321, 0
  %.not340 = icmp eq i32 %313, 0
  %or.cond378 = select i1 %.not339, i1 true, i1 %.not340
  br i1 %or.cond378, label %._crit_edge324, label %.preheader.us

.preheader.us:                                    ; preds = %320, %._crit_edge322.us
  %.0236323.us = phi i32 [ %384, %._crit_edge322.us ], [ 0, %320 ]
  %322 = add i32 %.0236323.us, %.0254327
  %323 = lshr i32 %322, 1
  br label %324

324:                                              ; preds = %.preheader.us, %370
  %.0235320.us = phi i32 [ 0, %.preheader.us ], [ %382, %370 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #8
  %325 = add i32 %.0235320.us, %.0253329
  %326 = load i32, ptr %11, align 4, !tbaa !34
  %327 = load i32, ptr %12, align 4, !tbaa !34
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %325, i32 noundef %322, i32 noundef %326, i32 noundef %327, 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
  %328 = load ptr, ptr %29, align 8, !tbaa !35
  %329 = load i16, ptr %328, align 2, !tbaa !36
  %.not282.us = icmp eq i16 %329, -1
  br i1 %.not282.us, label %337, label %330

330:                                              ; preds = %324
  %331 = 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) %328)
  %332 = load i16, ptr %331, align 2, !tbaa !36
  store i16 %332, ptr %31, align 2, !tbaa !36
  %333 = load ptr, ptr %29, align 8, !tbaa !35
  %334 = getelementptr inbounds i8, ptr %333, i64 8
  %335 = 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) %334)
  %336 = load i16, ptr %335, align 2, !tbaa !36
  store i16 %336, ptr %32, align 2, !tbaa !36
  %.pre369 = load ptr, ptr %29, align 8, !tbaa !35
  br label %337

337:                                              ; preds = %330, %324
  %338 = phi ptr [ %.pre369, %330 ], [ %328, %324 ]
  %339 = getelementptr inbounds i8, ptr %338, i64 2
  %340 = load i16, ptr %339, align 2, !tbaa !36
  %.not282.us.1 = icmp eq i16 %340, -1
  br i1 %.not282.us.1, label %348, label %341

341:                                              ; preds = %337
  %342 = 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) %339)
  %343 = load i16, ptr %342, align 2, !tbaa !36
  store i16 %343, ptr %31, align 2, !tbaa !36
  %344 = load ptr, ptr %29, align 8, !tbaa !35
  %345 = getelementptr inbounds i8, ptr %344, i64 10
  %346 = 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) %345)
  %347 = load i16, ptr %346, align 2, !tbaa !36
  store i16 %347, ptr %32, align 2, !tbaa !36
  %.pre370 = load ptr, ptr %29, align 8, !tbaa !35
  br label %348

348:                                              ; preds = %341, %337
  %349 = phi ptr [ %.pre370, %341 ], [ %338, %337 ]
  %350 = getelementptr inbounds i8, ptr %349, i64 4
  %351 = load i16, ptr %350, align 2, !tbaa !36
  %.not282.us.2 = icmp eq i16 %351, -1
  br i1 %.not282.us.2, label %359, label %352

352:                                              ; preds = %348
  %353 = 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) %350)
  %354 = load i16, ptr %353, align 2, !tbaa !36
  store i16 %354, ptr %31, align 2, !tbaa !36
  %355 = load ptr, ptr %29, align 8, !tbaa !35
  %356 = getelementptr inbounds i8, ptr %355, i64 12
  %357 = 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) %356)
  %358 = load i16, ptr %357, align 2, !tbaa !36
  store i16 %358, ptr %32, align 2, !tbaa !36
  %.pre371 = load ptr, ptr %29, align 8, !tbaa !35
  br label %359

359:                                              ; preds = %352, %348
  %360 = phi ptr [ %.pre371, %352 ], [ %349, %348 ]
  %361 = getelementptr inbounds i8, ptr %360, i64 6
  %362 = load i16, ptr %361, align 2, !tbaa !36
  %.not282.us.3 = icmp eq i16 %362, -1
  br i1 %.not282.us.3, label %370, label %363

363:                                              ; preds = %359
  %364 = 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) %361)
  %365 = load i16, ptr %364, align 2, !tbaa !36
  store i16 %365, ptr %31, align 2, !tbaa !36
  %366 = load ptr, ptr %29, align 8, !tbaa !35
  %367 = getelementptr inbounds i8, ptr %366, i64 14
  %368 = 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) %367)
  %369 = load i16, ptr %368, align 2, !tbaa !36
  store i16 %369, ptr %32, align 2, !tbaa !36
  br label %370

370:                                              ; preds = %363, %359
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #8
  %371 = lshr i32 %325, 1
  %372 = load i32, ptr %27, align 4, !tbaa !34
  %373 = load i32, ptr %28, align 4, !tbaa !34
  call void @_ZN3JPH16HeightFieldShape13GetRangeBlockEjjjjRPNS0_10RangeBlockERj(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %371, i32 noundef %323, i32 noundef %372, i32 noundef %373, ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %374 = load i16, ptr %31, align 2, !tbaa !36
  %375 = load ptr, ptr %33, align 8, !tbaa !35
  %376 = load i32, ptr %34, align 4, !tbaa !34
  %377 = zext i32 %376 to i64
  %378 = getelementptr inbounds [4 x i16], ptr %375, i64 0, i64 %377
  store i16 %374, ptr %378, align 2, !tbaa !36
  %379 = load i16, ptr %32, align 2, !tbaa !36
  %380 = getelementptr inbounds i8, ptr %375, i64 8
  %381 = getelementptr inbounds [4 x i16], ptr %380, i64 0, i64 %377
  store i16 %379, ptr %381, 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
  %382 = add i32 %.0235320.us, 2
  %383 = icmp ult i32 %382, %313
  br i1 %383, label %324, label %._crit_edge322.us, !llvm.loop !50

._crit_edge322.us:                                ; preds = %370
  %384 = add i32 %.0236323.us, 2
  %385 = icmp ult i32 %384, %321
  br i1 %385, label %.preheader.us, label %._crit_edge324, !llvm.loop !51

._crit_edge324:                                   ; preds = %._crit_edge322.us, %320
  %386 = load i32, ptr %10, align 4, !tbaa !34
  %387 = lshr i32 %386, 1
  store i32 %387, ptr %10, align 4, !tbaa !34
  %388 = lshr i32 %.0253329, 1
  %389 = lshr i32 %.0254327, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #8
  %390 = add i32 %.0255326, 1
  %391 = lshr i32 %390, 1
  store i32 %391, ptr %35, align 4, !tbaa !34
  %392 = 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)
  %393 = load i32, ptr %392, 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
  %394 = add i32 %.0256325, 1
  %395 = lshr i32 %394, 1
  store i32 %395, ptr %36, align 4, !tbaa !34
  %396 = 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)
  %397 = load i32, ptr %396, align 4, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #8
  %398 = load i32, ptr %27, align 4, !tbaa !34
  store i32 %398, ptr %11, align 4, !tbaa !34
  %399 = load i32, ptr %28, align 4, !tbaa !34
  store i32 %399, 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
  %400 = icmp ugt i32 %305, 1
  br i1 %400, label %.lr.ph333, label %._crit_edge334, !llvm.loop !52

._crit_edge334:                                   ; preds = %._crit_edge324, %301
  %401 = getelementptr inbounds i8, ptr %0, i64 86
  store i16 -1, ptr %401, align 2, !tbaa !53
  %402 = getelementptr inbounds i8, ptr %0, i64 88
  store i16 0, ptr %402, align 8, !tbaa !54
  %403 = getelementptr inbounds i8, ptr %0, i64 96
  %404 = load ptr, ptr %403, align 16, !tbaa !55
  %405 = load i16, ptr %404, align 2, !tbaa !36
  %.not279 = icmp eq i16 %405, -1
  br i1 %.not279, label %413, label %406

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

413:                                              ; preds = %._crit_edge334, %406
  %414 = phi ptr [ %404, %._crit_edge334 ], [ %.pre372, %406 ]
  %415 = getelementptr inbounds i8, ptr %414, i64 2
  %416 = load i16, ptr %415, align 2, !tbaa !36
  %.not279.1 = icmp eq i16 %416, -1
  br i1 %.not279.1, label %424, label %417

417:                                              ; preds = %413
  %418 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %401, ptr noundef nonnull align 2 dereferenceable(2) %415)
  %419 = load i16, ptr %418, align 2, !tbaa !36
  store i16 %419, ptr %401, align 2, !tbaa !53
  %420 = load ptr, ptr %403, align 16, !tbaa !55
  %421 = getelementptr inbounds i8, ptr %420, i64 10
  %422 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %402, ptr noundef nonnull align 2 dereferenceable(2) %421)
  %423 = load i16, ptr %422, align 2, !tbaa !36
  store i16 %423, ptr %402, align 8, !tbaa !54
  %.pre373 = load ptr, ptr %403, align 16, !tbaa !55
  br label %424

424:                                              ; preds = %417, %413
  %425 = phi ptr [ %.pre373, %417 ], [ %414, %413 ]
  %426 = getelementptr inbounds i8, ptr %425, i64 4
  %427 = load i16, ptr %426, align 2, !tbaa !36
  %.not279.2 = icmp eq i16 %427, -1
  br i1 %.not279.2, label %435, label %428

428:                                              ; preds = %424
  %429 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %401, ptr noundef nonnull align 2 dereferenceable(2) %426)
  %430 = load i16, ptr %429, align 2, !tbaa !36
  store i16 %430, ptr %401, align 2, !tbaa !53
  %431 = load ptr, ptr %403, align 16, !tbaa !55
  %432 = getelementptr inbounds i8, ptr %431, i64 12
  %433 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %402, ptr noundef nonnull align 2 dereferenceable(2) %432)
  %434 = load i16, ptr %433, align 2, !tbaa !36
  store i16 %434, ptr %402, align 8, !tbaa !54
  %.pre374 = load ptr, ptr %403, align 16, !tbaa !55
  br label %435

435:                                              ; preds = %428, %424
  %436 = phi ptr [ %.pre374, %428 ], [ %425, %424 ]
  %437 = getelementptr inbounds i8, ptr %436, i64 6
  %438 = load i16, ptr %437, align 2, !tbaa !36
  %.not279.3 = icmp eq i16 %438, -1
  br i1 %.not279.3, label %446, label %439

439:                                              ; preds = %435
  %440 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %401, ptr noundef nonnull align 2 dereferenceable(2) %437)
  %441 = load i16, ptr %440, align 2, !tbaa !36
  store i16 %441, ptr %401, align 2, !tbaa !53
  %442 = load ptr, ptr %403, align 16, !tbaa !55
  %443 = getelementptr inbounds i8, ptr %442, i64 14
  %444 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %402, ptr noundef nonnull align 2 dereferenceable(2) %443)
  %445 = load i16, ptr %444, align 2, !tbaa !36
  store i16 %445, ptr %402, align 8, !tbaa !54
  br label %446

446:                                              ; preds = %439, %435
  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 %447

447:                                              ; preds = %9, %446
  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 2158410596}
!23 = !{!6, !11, i64 68}
!24 = !{i64 2158411005}
!25 = !{!6, !11, i64 64}
!26 = !{i64 2158411402}
!27 = !{i64 2158411843}
!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 2158412227}
!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