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

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.2 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.2 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Array.15" = type { i64, i64, ptr }
%"class.JPH::Array.18" = type { i64, i64, ptr }
%"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 }
%"class.JPH::HeightFieldShapeSettings" = type <{ %"class.JPH::ShapeSettings", %"class.JPH::Vec3", %"class.JPH::Vec3", i32, float, float, i32, i32, i32, %"class.JPH::Array", %"class.JPH::Array.6", %"class.JPH::Array.9", float, [12 x i8] }>
%"class.JPH::ShapeSettings" = type { %"class.JPH::SerializableObject", %"class.JPH::RefTarget", i64, %"class.JPH::Result" }
%"class.JPH::SerializableObject" = type { ptr }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"class.JPH::Result" = type <{ %union.anon, i8, [7 x i8] }>
%union.anon = type { %"class.std::__cxx11::basic_string" }
%"class.JPH::Array" = type { i64, i64, ptr }
%struct.Range = type { i16, i16 }
%"class.JPH::Array.21" = type { i64, i64, ptr }
%"struct.JPH::HeightFieldShape::RangeBlock" = type { [4 x i16], [4 x i16] }

@_ZN3JPH16HeightFieldShape12sGridOffsetsE = external dso_local constant [15 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@_ZTVN3JPH16HeightFieldShapeE = external dso_local unnamed_addr constant { [37 x ptr] }, align 8
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [55 x i8], align 1
@_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E = external hidden constant i16, align 2
@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [34 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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH24HeightFieldShapeSettings24DetermineMinAndMaxSampleERfS1_S1_(ptr noundef nonnull align 16 dereferenceable(208), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 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 uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesERKNS_24HeightFieldShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(176), ptr noundef nonnull align 16 dereferenceable(208)) #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape20StoreMaterialIndicesERKNS_24HeightFieldShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(176), ptr noundef nonnull align 16 dereferenceable(208)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape11CacheValuesEv(ptr noundef nonnull align 16 dereferenceable(176)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape15AllocateBuffersEv(ptr noundef nonnull align 16 dereferenceable(176)) #4 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: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShapeC2ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 16 dereferenceable(176) %0, ptr noundef nonnull align 16 dereferenceable(208) %1, ptr noundef nonnull align 8 dereferenceable(33) %2) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca %"class.JPH::Ref", align 8
  %20 = alloca %"class.JPH::Array.15", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca float, align 4
  %24 = alloca i32, align 4
  %25 = alloca i16, align 2
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca %"class.JPH::Array.18", align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i16, align 2
  %43 = alloca i16, align 2
  %44 = alloca i32, align 4
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca ptr, align 8
  %51 = alloca %"struct.JPH::AssertLastParam", align 1
  %52 = alloca i16, align 2
  %53 = alloca i16, align 2
  %54 = alloca ptr, align 8
  %55 = alloca ptr, align 8
  %56 = alloca ptr, align 8
  %57 = alloca i16, align 2
  %58 = alloca i16, align 2
  %59 = alloca %"struct.JPH::AssertLastParam", align 1
  %60 = alloca i32, align 4
  %61 = alloca ptr, align 8
  %62 = alloca i32, align 4
  %63 = alloca %"struct.JPH::AssertLastParam", align 1
  %64 = alloca i32, align 4
  %65 = alloca i32, align 4
  %66 = alloca i32, align 4
  %67 = alloca i32, align 4
  %68 = alloca ptr, align 8
  %69 = alloca i32, align 4
  %70 = alloca i32, align 4
  %71 = alloca i32, align 4
  %72 = alloca i32, align 4
  %73 = alloca %"struct.JPH::AssertLastParam", align 1
  %74 = alloca i32, align 4
  %75 = alloca i32, align 4
  %76 = alloca i32, align 4
  %77 = alloca i32, align 4
  %78 = alloca float, align 4
  %79 = alloca i32, align 4
  %80 = alloca i32, align 4
  %81 = alloca ptr, align 8
  %82 = alloca %"struct.JPH::AssertLastParam", align 1
  %83 = alloca float, align 4
  %84 = alloca float, align 4
  %85 = alloca float, align 4
  %86 = alloca i32, align 4
  %87 = alloca i32, align 4
  %88 = alloca %"struct.JPH::AssertLastParam", align 1
  %89 = alloca %"class.JPH::Ref", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3JPH5ShapeC2ENS_10EShapeTypeENS_13EShapeSubTypeERKNS_13ShapeSettingsERNS_6ResultINS_3RefIS0_EEEE(ptr noundef nonnull align 8 dereferenceable(26) %90, i8 noundef zeroext 4, i8 noundef zeroext 13, ptr noundef nonnull align 8 dereferenceable(64) %91, ptr noundef nonnull align 8 dereferenceable(33) %92)
  store ptr getelementptr inbounds inrange(-16, 280) ({ [37 x ptr] }, ptr @_ZTVN3JPH16HeightFieldShapeE, i32 0, i32 0, i32 2), ptr %90, align 16, !tbaa !9
  %93 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 2
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %94, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %93, ptr align 16 %95, i64 16, i1 false), !tbaa.struct !11
  %96 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 3
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %97, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %96, ptr align 16 %98, i64 16, i1 false), !tbaa.struct !11
  %99 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %100, i32 0, i32 3
  %102 = load i32, ptr %101, align 16, !tbaa !13
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %103, i32 0, i32 7
  %105 = load i32, ptr %104, align 16, !tbaa !29
  %106 = add i32 %102, %105
  %107 = sub i32 %106, 1
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %108, i32 0, i32 7
  %110 = load i32, ptr %109, align 16, !tbaa !29
  %111 = udiv i32 %107, %110
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %112, i32 0, i32 7
  %114 = load i32, ptr %113, align 16, !tbaa !29
  %115 = mul i32 %111, %114
  store i32 %115, ptr %99, align 16, !tbaa !30
  %116 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %117, i32 0, i32 7
  %119 = load i32, ptr %118, align 16, !tbaa !29
  store i32 %119, ptr %116, align 4, !tbaa !37
  %120 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 6
  store i32 0, ptr %120, align 8, !tbaa !38
  %121 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 7
  store i32 0, ptr %121, align 4, !tbaa !39
  %122 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 8
  store i32 0, ptr %122, align 16, !tbaa !40
  %123 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 9
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %124, i32 0, i32 8
  %126 = load i32, ptr %125, align 4, !tbaa !41
  %127 = trunc i32 %126 to i8
  store i8 %127, ptr %123, align 4, !tbaa !42
  %128 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 10
  store i8 -1, ptr %128, align 1, !tbaa !43
  %129 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 11
  store i16 -1, ptr %129, align 2, !tbaa !44
  %130 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 12
  store i16 -1, ptr %130, align 8, !tbaa !45
  %131 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 14
  store ptr null, ptr %131, align 16, !tbaa !46
  %132 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 15
  store ptr null, ptr %132, align 8, !tbaa !47
  %133 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 16
  store ptr null, ptr %133, align 16, !tbaa !48
  %134 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %134) #11
  %135 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 18
  call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %135) #11
  %136 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 19
  store i32 0, ptr %136, align 8, !tbaa !49
  call void @_ZN3JPH16HeightFieldShape11CacheValuesEv(ptr noundef nonnull align 16 dereferenceable(176) %90)
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %137, i32 0, i32 6
  %139 = load i32, ptr %138, align 4, !tbaa !50
  %140 = icmp ugt i32 %139, 0
  br i1 %140, label %141, label %152

141:                                              ; preds = %3
  %142 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %143, i32 0, i32 6
  %145 = load i32, ptr %144, align 4, !tbaa !50
  %146 = zext i32 %145 to i64
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %142, i64 noundef %146)
          to label %147 unwind label %148

147:                                              ; preds = %141
  br label %152

148:                                              ; preds = %178, %165, %152, %141
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %7, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %8, align 4
  br label %1299

152:                                              ; preds = %147, %3
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %153, i32 0, i32 11
  %155 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  %156 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %155, ptr noundef nonnull align 8 dereferenceable(24) %154)
          to label %157 unwind label %148

157:                                              ; preds = %152
  %158 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %159 = load i32, ptr %158, align 4, !tbaa !37
  %160 = icmp ult i32 %159, 2
  br i1 %160, label %165, label %161

161:                                              ; preds = %157
  %162 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %163 = load i32, ptr %162, align 4, !tbaa !37
  %164 = icmp ugt i32 %163, 8
  br i1 %164, label %165, label %168

165:                                              ; preds = %161, %157
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %166, ptr noundef @.str.7)
          to label %167 unwind label %148

167:                                              ; preds = %165
  br label %1278

168:                                              ; preds = %161
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %169, i32 0, i32 8
  %171 = load i32, ptr %170, align 4, !tbaa !41
  %172 = icmp ult i32 %171, 1
  br i1 %172, label %178, label %173

173:                                              ; preds = %168
  %174 = load ptr, ptr %5, align 8, !tbaa !5
  %175 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %174, i32 0, i32 8
  %176 = load i32, ptr %175, align 4, !tbaa !41
  %177 = icmp ugt i32 %176, 8
  br i1 %177, label %178, label %181

178:                                              ; preds = %173, %168
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %179, ptr noundef @.str.8)
          to label %180 unwind label %148

180:                                              ; preds = %178
  br label %1278

181:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #11
  %182 = invoke noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176) %90)
          to label %183 unwind label %189

183:                                              ; preds = %181
  store i32 %182, ptr %9, align 4, !tbaa !51
  %184 = load i32, ptr %9, align 4, !tbaa !51
  %185 = icmp ult i32 %184, 2
  br i1 %185, label %186, label %193

186:                                              ; preds = %183
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %187, ptr noundef @.str.9)
          to label %188 unwind label %189

188:                                              ; preds = %186
  store i32 1, ptr %10, align 4
  br label %1276

189:                                              ; preds = %290, %285, %215, %210, %206, %203, %199, %196, %186, %181
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %7, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %8, align 4
  br label %1298

193:                                              ; preds = %183
  %194 = load i32, ptr %9, align 4, !tbaa !51
  %195 = icmp ugt i32 %194, 16384
  br i1 %195, label %196, label %199

196:                                              ; preds = %193
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %197, ptr noundef @.str.10)
          to label %198 unwind label %189

198:                                              ; preds = %196
  store i32 1, ptr %10, align 4
  br label %1276

199:                                              ; preds = %193
  %200 = invoke noundef i32 @_ZNK3JPH16HeightFieldShape26GetSubShapeIDBitsRecursiveEv(ptr noundef nonnull align 16 dereferenceable(176) %90)
          to label %201 unwind label %189

201:                                              ; preds = %199
  %202 = icmp ugt i32 %200, 32
  br i1 %202, label %203, label %206

203:                                              ; preds = %201
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %204, ptr noundef @.str.11)
          to label %205 unwind label %189

205:                                              ; preds = %203
  store i32 1, ptr %10, align 4
  br label %1276

206:                                              ; preds = %201
  %207 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  %208 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %207)
          to label %209 unwind label %189

209:                                              ; preds = %206
  br i1 %208, label %285, label %210

210:                                              ; preds = %209
  %211 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  %212 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %211)
          to label %213 unwind label %189

213:                                              ; preds = %210
  %214 = icmp ugt i64 %212, 256
  br i1 %214, label %215, label %218

215:                                              ; preds = %213
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %216, ptr noundef @.str.12)
          to label %217 unwind label %189

217:                                              ; preds = %215
  store i32 1, ptr %10, align 4
  br label %1276

218:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #11
  %219 = load ptr, ptr %5, align 8, !tbaa !5
  %220 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %219, i32 0, i32 10
  store ptr %220, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #11
  %221 = load ptr, ptr %11, align 8, !tbaa !5
  %222 = invoke noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %221)
          to label %223 unwind label %232

223:                                              ; preds = %218
  store ptr %222, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #11
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = invoke noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %224)
          to label %226 unwind label %236

226:                                              ; preds = %223
  store ptr %225, ptr %13, align 8, !tbaa !5
  br label %227

227:                                              ; preds = %276, %226
  %228 = load ptr, ptr %12, align 8, !tbaa !5
  %229 = load ptr, ptr %13, align 8, !tbaa !5
  %230 = icmp ne ptr %228, %229
  br i1 %230, label %240, label %231

231:                                              ; preds = %227
  store i32 2, ptr %10, align 4
  br label %280

232:                                              ; preds = %218
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %7, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %8, align 4
  br label %283

236:                                              ; preds = %223
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %7, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %8, align 4
  br label %282

240:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #11
  %241 = load ptr, ptr %12, align 8, !tbaa !5
  %242 = load i8, ptr %241, align 1, !tbaa !12
  store i8 %242, ptr %14, align 1, !tbaa !12
  %243 = load i8, ptr %14, align 1, !tbaa !12
  %244 = zext i8 %243 to i64
  %245 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  %246 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %245)
          to label %247 unwind label %259

247:                                              ; preds = %240
  %248 = icmp uge i64 %244, %246
  br i1 %248, label %249, label %272

249:                                              ; preds = %247
  %250 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #11
  %251 = load i8, ptr %14, align 1, !tbaa !12
  %252 = zext i8 %251 to i32
  %253 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  %254 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %253)
          to label %255 unwind label %263

255:                                              ; preds = %249
  %256 = trunc i64 %254 to i32
  invoke void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef @.str.13, i32 noundef %252, i32 noundef %256)
          to label %257 unwind label %263

257:                                              ; preds = %255
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEONSt7__cxx1112basic_stringIcSt11char_traitsIcENS_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(33) %250, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %258 unwind label %267

258:                                              ; preds = %257
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #11
  store i32 1, ptr %10, align 4
  br label %273

259:                                              ; preds = %240
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %7, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %8, align 4
  br label %279

263:                                              ; preds = %255, %249
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %7, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %8, align 4
  br label %271

267:                                              ; preds = %257
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %7, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #11
  br label %271

271:                                              ; preds = %267, %263
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #11
  br label %279

272:                                              ; preds = %247
  store i32 0, ptr %10, align 4
  br label %273

273:                                              ; preds = %272, %258
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #11
  %274 = load i32, ptr %10, align 4
  switch i32 %274, label %280 [
    i32 0, label %275
  ]

275:                                              ; preds = %273
  br label %276

276:                                              ; preds = %275
  %277 = load ptr, ptr %12, align 8, !tbaa !5
  %278 = getelementptr inbounds i8, ptr %277, i32 1
  store ptr %278, ptr %12, align 8, !tbaa !5
  br label %227

279:                                              ; preds = %271, %259
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #11
  br label %282

280:                                              ; preds = %273, %231
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  %281 = load i32, ptr %10, align 4
  switch i32 %281, label %1276 [
    i32 2, label %284
  ]

282:                                              ; preds = %279, %236
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  br label %283

283:                                              ; preds = %282, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #11
  br label %1298

284:                                              ; preds = %280
  br label %294

285:                                              ; preds = %209
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %286, i32 0, i32 10
  %288 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %287)
          to label %289 unwind label %189

289:                                              ; preds = %285
  br i1 %288, label %293, label %290

290:                                              ; preds = %289
  %291 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %291, ptr noundef @.str.14)
          to label %292 unwind label %189

292:                                              ; preds = %290
  store i32 1, ptr %10, align 4
  br label %1276

293:                                              ; preds = %289
  br label %294

294:                                              ; preds = %293, %284
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #11
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK3JPH24HeightFieldShapeSettings24DetermineMinAndMaxSampleERfS1_S1_(ptr noundef nonnull align 16 dereferenceable(208) %295, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %296 unwind label %306

296:                                              ; preds = %294
  %297 = load float, ptr %16, align 4, !tbaa !52
  %298 = load float, ptr %17, align 4, !tbaa !52
  %299 = fcmp ogt float %297, %298
  br i1 %299, label %300, label %319

300:                                              ; preds = %296
  %301 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %301)
          to label %302 unwind label %306

302:                                              ; preds = %300
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #11
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef %90)
          to label %304 unwind label %310

304:                                              ; preds = %302
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %303, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %305 unwind label %314

305:                                              ; preds = %304
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  store i32 1, ptr %10, align 4
  br label %1275

306:                                              ; preds = %319, %300, %294
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %7, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %8, align 4
  br label %1297

310:                                              ; preds = %302
  %311 = landingpad { ptr, i32 }
          cleanup
  %312 = extractvalue { ptr, i32 } %311, 0
  store ptr %312, ptr %7, align 8
  %313 = extractvalue { ptr, i32 } %311, 1
  store i32 %313, ptr %8, align 4
  br label %318

314:                                              ; preds = %304
  %315 = landingpad { ptr, i32 }
          cleanup
  %316 = extractvalue { ptr, i32 } %315, 0
  store ptr %316, ptr %7, align 8
  %317 = extractvalue { ptr, i32 } %315, 1
  store i32 %317, ptr %8, align 4
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #11
  br label %318

318:                                              ; preds = %314, %310
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  br label %1297

319:                                              ; preds = %296
  invoke void @_ZN3JPH16HeightFieldShape15AllocateBuffersEv(ptr noundef nonnull align 16 dereferenceable(176) %90)
          to label %320 unwind label %306

320:                                              ; preds = %319
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #11
  call void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #11
  %321 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %322 = load i32, ptr %321, align 16, !tbaa !30
  %323 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %324 = load i32, ptr %323, align 16, !tbaa !30
  %325 = mul i32 %322, %324
  %326 = zext i32 %325 to i64
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %326)
          to label %327 unwind label %335

327:                                              ; preds = %320
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  store i32 0, ptr %21, align 4, !tbaa !51
  br label %328

328:                                              ; preds = %418, %327
  %329 = load i32, ptr %21, align 4, !tbaa !51
  %330 = load ptr, ptr %5, align 8, !tbaa !5
  %331 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %330, i32 0, i32 3
  %332 = load i32, ptr %331, align 16, !tbaa !13
  %333 = icmp ult i32 %329, %332
  br i1 %333, label %339, label %334

334:                                              ; preds = %328
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  br label %422

335:                                              ; preds = %480, %476, %472, %469, %456, %320
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %7, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %8, align 4
  br label %1296

339:                                              ; preds = %328
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #11
  store i32 0, ptr %22, align 4, !tbaa !51
  br label %340

340:                                              ; preds = %394, %339
  %341 = load i32, ptr %22, align 4, !tbaa !51
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %342, i32 0, i32 3
  %344 = load i32, ptr %343, align 16, !tbaa !13
  %345 = icmp ult i32 %341, %344
  br i1 %345, label %347, label %346

346:                                              ; preds = %340
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  br label %398

347:                                              ; preds = %340
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  %348 = load ptr, ptr %5, align 8, !tbaa !5
  %349 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %348, i32 0, i32 9
  %350 = load i32, ptr %22, align 4, !tbaa !51
  %351 = load i32, ptr %21, align 4, !tbaa !51
  %352 = load ptr, ptr %5, align 8, !tbaa !5
  %353 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %352, i32 0, i32 3
  %354 = load i32, ptr %353, align 16, !tbaa !13
  %355 = mul i32 %351, %354
  %356 = add i32 %350, %355
  %357 = zext i32 %356 to i64
  %358 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %349, i64 noundef %357)
          to label %359 unwind label %365

359:                                              ; preds = %347
  %360 = load float, ptr %358, align 4, !tbaa !52
  store float %360, ptr %23, align 4, !tbaa !52
  %361 = load float, ptr %23, align 4, !tbaa !52
  %362 = fcmp oeq float %361, 0x47EFFFFFE0000000
  br i1 %362, label %363, label %369

363:                                              ; preds = %359
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 2 dereferenceable(2) @_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E)
          to label %364 unwind label %365

364:                                              ; preds = %363
  br label %393

365:                                              ; preds = %363, %347
  %366 = landingpad { ptr, i32 }
          cleanup
  %367 = extractvalue { ptr, i32 } %366, 0
  store ptr %367, ptr %7, align 8
  %368 = extractvalue { ptr, i32 } %366, 1
  store i32 %368, ptr %8, align 4
  br label %397

369:                                              ; preds = %359
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  %370 = load float, ptr %18, align 4, !tbaa !52
  %371 = load float, ptr %23, align 4, !tbaa !52
  %372 = load float, ptr %16, align 4, !tbaa !52
  %373 = fsub float %371, %372
  %374 = fmul float %370, %373
  %375 = invoke noundef float @_ZSt5floorf(float noundef %374)
          to label %376 unwind label %384

376:                                              ; preds = %369
  %377 = fptosi float %375 to i32
  store i32 %377, ptr %24, align 4, !tbaa !51
  %378 = load i32, ptr %24, align 4, !tbaa !51
  %379 = invoke noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %378, i32 noundef 0, i32 noundef 65533)
          to label %380 unwind label %384

380:                                              ; preds = %376
  store i32 %379, ptr %24, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 2, ptr %25) #11
  %381 = load i32, ptr %24, align 4, !tbaa !51
  %382 = trunc i32 %381 to i16
  store i16 %382, ptr %25, align 2, !tbaa !53
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backEOt(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 2 dereferenceable(2) %25)
          to label %383 unwind label %388

383:                                              ; preds = %380
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %393

384:                                              ; preds = %376, %369
  %385 = landingpad { ptr, i32 }
          cleanup
  %386 = extractvalue { ptr, i32 } %385, 0
  store ptr %386, ptr %7, align 8
  %387 = extractvalue { ptr, i32 } %385, 1
  store i32 %387, ptr %8, align 4
  br label %392

388:                                              ; preds = %380
  %389 = landingpad { ptr, i32 }
          cleanup
  %390 = extractvalue { ptr, i32 } %389, 0
  store ptr %390, ptr %7, align 8
  %391 = extractvalue { ptr, i32 } %389, 1
  store i32 %391, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #11
  br label %392

392:                                              ; preds = %388, %384
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %397

393:                                              ; preds = %383, %364
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %394

394:                                              ; preds = %393
  %395 = load i32, ptr %22, align 4, !tbaa !51
  %396 = add i32 %395, 1
  store i32 %396, ptr %22, align 4, !tbaa !51
  br label %340, !llvm.loop !54

397:                                              ; preds = %392, %365
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  br label %421

398:                                              ; preds = %346
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #11
  %399 = load ptr, ptr %5, align 8, !tbaa !5
  %400 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %399, i32 0, i32 3
  %401 = load i32, ptr %400, align 16, !tbaa !13
  store i32 %401, ptr %26, align 4, !tbaa !51
  br label %402

402:                                              ; preds = %410, %398
  %403 = load i32, ptr %26, align 4, !tbaa !51
  %404 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %405 = load i32, ptr %404, align 16, !tbaa !30
  %406 = icmp ult i32 %403, %405
  br i1 %406, label %408, label %407

407:                                              ; preds = %402
  store i32 10, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %417

408:                                              ; preds = %402
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 2 dereferenceable(2) @_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E)
          to label %409 unwind label %413

409:                                              ; preds = %408
  br label %410

410:                                              ; preds = %409
  %411 = load i32, ptr %26, align 4, !tbaa !51
  %412 = add i32 %411, 1
  store i32 %412, ptr %26, align 4, !tbaa !51
  br label %402, !llvm.loop !56

413:                                              ; preds = %408
  %414 = landingpad { ptr, i32 }
          cleanup
  %415 = extractvalue { ptr, i32 } %414, 0
  store ptr %415, ptr %7, align 8
  %416 = extractvalue { ptr, i32 } %414, 1
  store i32 %416, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %421

417:                                              ; preds = %407
  br label %418

418:                                              ; preds = %417
  %419 = load i32, ptr %21, align 4, !tbaa !51
  %420 = add i32 %419, 1
  store i32 %420, ptr %21, align 4, !tbaa !51
  br label %328, !llvm.loop !57

421:                                              ; preds = %413, %397
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  br label %1296

422:                                              ; preds = %334
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #11
  %423 = load ptr, ptr %5, align 8, !tbaa !5
  %424 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %423, i32 0, i32 3
  %425 = load i32, ptr %424, align 16, !tbaa !13
  store i32 %425, ptr %27, align 4, !tbaa !51
  br label %426

426:                                              ; preds = %449, %422
  %427 = load i32, ptr %27, align 4, !tbaa !51
  %428 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %429 = load i32, ptr %428, align 16, !tbaa !30
  %430 = icmp ult i32 %427, %429
  br i1 %430, label %432, label %431

431:                                              ; preds = %426
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  br label %452

432:                                              ; preds = %426
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #11
  store i32 0, ptr %28, align 4, !tbaa !51
  br label %433

433:                                              ; preds = %441, %432
  %434 = load i32, ptr %28, align 4, !tbaa !51
  %435 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %436 = load i32, ptr %435, align 16, !tbaa !30
  %437 = icmp ult i32 %434, %436
  br i1 %437, label %439, label %438

438:                                              ; preds = %433
  store i32 16, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  br label %448

439:                                              ; preds = %433
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 2 dereferenceable(2) @_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E)
          to label %440 unwind label %444

440:                                              ; preds = %439
  br label %441

441:                                              ; preds = %440
  %442 = load i32, ptr %28, align 4, !tbaa !51
  %443 = add i32 %442, 1
  store i32 %443, ptr %28, align 4, !tbaa !51
  br label %433, !llvm.loop !58

444:                                              ; preds = %439
  %445 = landingpad { ptr, i32 }
          cleanup
  %446 = extractvalue { ptr, i32 } %445, 0
  store ptr %446, ptr %7, align 8
  %447 = extractvalue { ptr, i32 } %445, 1
  store i32 %447, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #11
  br label %1296

448:                                              ; preds = %438
  br label %449

449:                                              ; preds = %448
  %450 = load i32, ptr %27, align 4, !tbaa !51
  %451 = add i32 %450, 1
  store i32 %451, ptr %27, align 4, !tbaa !51
  br label %426, !llvm.loop !59

452:                                              ; preds = %431
  %453 = load float, ptr %16, align 4, !tbaa !52
  %454 = load float, ptr %17, align 4, !tbaa !52
  %455 = fcmp ole float %453, %454
  br i1 %455, label %456, label %476

456:                                              ; preds = %452
  %457 = load float, ptr %18, align 4, !tbaa !52
  %458 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 10
  %459 = load i8, ptr %458, align 1, !tbaa !43
  %460 = zext i8 %459 to i32
  %461 = sitofp i32 %460 to float
  %462 = fmul float %457, %461
  %463 = fdiv float 5.000000e-01, %462
  %464 = load float, ptr %16, align 4, !tbaa !52
  %465 = fsub float %464, %463
  store float %465, ptr %16, align 4, !tbaa !52
  %466 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 2
  %467 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 2
  %468 = invoke noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %467)
          to label %469 unwind label %335

469:                                              ; preds = %456
  %470 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 3
  %471 = invoke noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %470)
          to label %472 unwind label %335

472:                                              ; preds = %469
  %473 = load float, ptr %16, align 4, !tbaa !52
  %474 = call float @llvm.fmuladd.f32(float %471, float %473, float %468)
  invoke void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %466, float noundef %474)
          to label %475 unwind label %335

475:                                              ; preds = %472
  br label %476

476:                                              ; preds = %475, %452
  %477 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 3
  %478 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 3
  %479 = invoke noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %478)
          to label %480 unwind label %335

480:                                              ; preds = %476
  %481 = load float, ptr %18, align 4, !tbaa !52
  %482 = fdiv float %479, %481
  invoke void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %477, float noundef %482)
          to label %483 unwind label %335

483:                                              ; preds = %480
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #11
  %484 = load i32, ptr %9, align 4, !tbaa !51
  %485 = invoke noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef %484)
          to label %486 unwind label %510

486:                                              ; preds = %483
  store i32 %485, ptr %29, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #11
  call void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #11
  %487 = load i32, ptr %29, align 4, !tbaa !51
  %488 = add i32 %487, 1
  %489 = zext i32 %488 to i64
  invoke void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %489)
          to label %490 unwind label %514

490:                                              ; preds = %486
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #11
  %491 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %492 unwind label %518

492:                                              ; preds = %490
  store ptr %491, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #11
  %493 = load i32, ptr %9, align 4, !tbaa !51
  %494 = invoke noundef i32 @_ZN3JPH15GetNextPowerOf2Ej(i32 noundef %493)
          to label %495 unwind label %522

495:                                              ; preds = %492
  store i32 %494, ptr %32, align 4, !tbaa !51
  %496 = load ptr, ptr %31, align 8, !tbaa !5
  %497 = load i32, ptr %32, align 4, !tbaa !51
  %498 = load i32, ptr %32, align 4, !tbaa !51
  %499 = mul i32 %497, %498
  %500 = zext i32 %499 to i64
  invoke void @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %496, i64 noundef %500)
          to label %501 unwind label %522

501:                                              ; preds = %495
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #11
  %502 = load ptr, ptr %31, align 8, !tbaa !5
  %503 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %502)
          to label %504 unwind label %526

504:                                              ; preds = %501
  store ptr %503, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #11
  store i32 0, ptr %34, align 4, !tbaa !51
  br label %505

505:                                              ; preds = %658, %504
  %506 = load i32, ptr %34, align 4, !tbaa !51
  %507 = load i32, ptr %32, align 4, !tbaa !51
  %508 = icmp ult i32 %506, %507
  br i1 %508, label %530, label %509

509:                                              ; preds = %505
  store i32 19, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #11
  br label %661

510:                                              ; preds = %483
  %511 = landingpad { ptr, i32 }
          cleanup
  %512 = extractvalue { ptr, i32 } %511, 0
  store ptr %512, ptr %7, align 8
  %513 = extractvalue { ptr, i32 } %511, 1
  store i32 %513, ptr %8, align 4
  br label %1295

514:                                              ; preds = %486
  %515 = landingpad { ptr, i32 }
          cleanup
  %516 = extractvalue { ptr, i32 } %515, 0
  store ptr %516, ptr %7, align 8
  %517 = extractvalue { ptr, i32 } %515, 1
  store i32 %517, ptr %8, align 4
  br label %1294

518:                                              ; preds = %490
  %519 = landingpad { ptr, i32 }
          cleanup
  %520 = extractvalue { ptr, i32 } %519, 0
  store ptr %520, ptr %7, align 8
  %521 = extractvalue { ptr, i32 } %519, 1
  store i32 %521, ptr %8, align 4
  br label %1293

522:                                              ; preds = %495, %492
  %523 = landingpad { ptr, i32 }
          cleanup
  %524 = extractvalue { ptr, i32 } %523, 0
  store ptr %524, ptr %7, align 8
  %525 = extractvalue { ptr, i32 } %523, 1
  store i32 %525, ptr %8, align 4
  br label %1292

526:                                              ; preds = %793, %788, %786, %784, %778, %773, %501
  %527 = landingpad { ptr, i32 }
          cleanup
  %528 = extractvalue { ptr, i32 } %527, 0
  store ptr %528, ptr %7, align 8
  %529 = extractvalue { ptr, i32 } %527, 1
  store i32 %529, ptr %8, align 4
  br label %1291

530:                                              ; preds = %505
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #11
  store i32 0, ptr %35, align 4, !tbaa !51
  br label %531

531:                                              ; preds = %654, %530
  %532 = load i32, ptr %35, align 4, !tbaa !51
  %533 = load i32, ptr %32, align 4, !tbaa !51
  %534 = icmp ult i32 %532, %533
  br i1 %534, label %536, label %535

535:                                              ; preds = %531
  store i32 22, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #11
  br label %657

536:                                              ; preds = %531
  %537 = load ptr, ptr %33, align 8, !tbaa !5
  %538 = getelementptr inbounds %struct.Range, ptr %537, i32 0, i32 0
  store i16 -1, ptr %538, align 2, !tbaa !60
  %539 = load ptr, ptr %33, align 8, !tbaa !5
  %540 = getelementptr inbounds %struct.Range, ptr %539, i32 0, i32 1
  store i16 0, ptr %540, align 2, !tbaa !62
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #11
  %541 = load i32, ptr %35, align 4, !tbaa !51
  %542 = load i32, ptr %32, align 4, !tbaa !51
  %543 = sub i32 %542, 1
  %544 = icmp eq i32 %541, %543
  br i1 %544, label %545, label %548

545:                                              ; preds = %536
  %546 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %547 = load i32, ptr %546, align 4, !tbaa !37
  br label %552

548:                                              ; preds = %536
  %549 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %550 = load i32, ptr %549, align 4, !tbaa !37
  %551 = add i32 %550, 1
  br label %552

552:                                              ; preds = %548, %545
  %553 = phi i32 [ %547, %545 ], [ %551, %548 ]
  store i32 %553, ptr %36, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #11
  %554 = load i32, ptr %34, align 4, !tbaa !51
  %555 = load i32, ptr %32, align 4, !tbaa !51
  %556 = sub i32 %555, 1
  %557 = icmp eq i32 %554, %556
  br i1 %557, label %558, label %561

558:                                              ; preds = %552
  %559 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %560 = load i32, ptr %559, align 4, !tbaa !37
  br label %565

561:                                              ; preds = %552
  %562 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %563 = load i32, ptr %562, align 4, !tbaa !37
  %564 = add i32 %563, 1
  br label %565

565:                                              ; preds = %561, %558
  %566 = phi i32 [ %560, %558 ], [ %564, %561 ]
  store i32 %566, ptr %37, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #11
  store i32 0, ptr %38, align 4, !tbaa !51
  br label %567

567:                                              ; preds = %648, %565
  %568 = load i32, ptr %38, align 4, !tbaa !51
  %569 = load i32, ptr %37, align 4, !tbaa !51
  %570 = icmp ult i32 %568, %569
  br i1 %570, label %572, label %571

571:                                              ; preds = %567
  store i32 25, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #11
  br label %651

572:                                              ; preds = %567
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #11
  store i32 0, ptr %39, align 4, !tbaa !51
  br label %573

573:                                              ; preds = %644, %572
  %574 = load i32, ptr %39, align 4, !tbaa !51
  %575 = load i32, ptr %36, align 4, !tbaa !51
  %576 = icmp ult i32 %574, %575
  br i1 %576, label %578, label %577

577:                                              ; preds = %573
  store i32 28, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #11
  br label %647

578:                                              ; preds = %573
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #11
  %579 = load i32, ptr %35, align 4, !tbaa !51
  %580 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %581 = load i32, ptr %580, align 4, !tbaa !37
  %582 = mul i32 %579, %581
  %583 = load i32, ptr %39, align 4, !tbaa !51
  %584 = add i32 %582, %583
  store i32 %584, ptr %40, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #11
  %585 = load i32, ptr %34, align 4, !tbaa !51
  %586 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %587 = load i32, ptr %586, align 4, !tbaa !37
  %588 = mul i32 %585, %587
  %589 = load i32, ptr %38, align 4, !tbaa !51
  %590 = add i32 %588, %589
  store i32 %590, ptr %41, align 4, !tbaa !51
  %591 = load i32, ptr %40, align 4, !tbaa !51
  %592 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %593 = load i32, ptr %592, align 16, !tbaa !30
  %594 = icmp ult i32 %591, %593
  br i1 %594, label %595, label %643

595:                                              ; preds = %578
  %596 = load i32, ptr %41, align 4, !tbaa !51
  %597 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %598 = load i32, ptr %597, align 16, !tbaa !30
  %599 = icmp ult i32 %596, %598
  br i1 %599, label %600, label %643

600:                                              ; preds = %595
  call void @llvm.lifetime.start.p0(i64 2, ptr %42) #11
  %601 = load i32, ptr %41, align 4, !tbaa !51
  %602 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %603 = load i32, ptr %602, align 16, !tbaa !30
  %604 = mul i32 %601, %603
  %605 = load i32, ptr %40, align 4, !tbaa !51
  %606 = add i32 %604, %605
  %607 = zext i32 %606 to i64
  %608 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %607)
          to label %609 unwind label %633

609:                                              ; preds = %600
  %610 = load i16, ptr %608, align 2, !tbaa !53
  store i16 %610, ptr %42, align 2, !tbaa !53
  %611 = load i16, ptr %42, align 2, !tbaa !53
  %612 = zext i16 %611 to i32
  %613 = icmp ne i32 %612, 65535
  br i1 %613, label %614, label %641

614:                                              ; preds = %609
  %615 = load ptr, ptr %33, align 8, !tbaa !5
  %616 = getelementptr inbounds %struct.Range, ptr %615, i32 0, i32 0
  %617 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %616, ptr noundef nonnull align 2 dereferenceable(2) %42)
          to label %618 unwind label %633

618:                                              ; preds = %614
  %619 = load i16, ptr %617, align 2, !tbaa !53
  %620 = load ptr, ptr %33, align 8, !tbaa !5
  %621 = getelementptr inbounds %struct.Range, ptr %620, i32 0, i32 0
  store i16 %619, ptr %621, align 2, !tbaa !60
  %622 = load ptr, ptr %33, align 8, !tbaa !5
  %623 = getelementptr inbounds %struct.Range, ptr %622, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 2, ptr %43) #11
  %624 = load i16, ptr %42, align 2, !tbaa !53
  %625 = zext i16 %624 to i32
  %626 = add nsw i32 %625, 1
  %627 = trunc i32 %626 to i16
  store i16 %627, ptr %43, align 2, !tbaa !53
  %628 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %623, ptr noundef nonnull align 2 dereferenceable(2) %43)
          to label %629 unwind label %637

629:                                              ; preds = %618
  %630 = load i16, ptr %628, align 2, !tbaa !53
  %631 = load ptr, ptr %33, align 8, !tbaa !5
  %632 = getelementptr inbounds %struct.Range, ptr %631, i32 0, i32 1
  store i16 %630, ptr %632, align 2, !tbaa !62
  call void @llvm.lifetime.end.p0(i64 2, ptr %43) #11
  br label %641

633:                                              ; preds = %614, %600
  %634 = landingpad { ptr, i32 }
          cleanup
  %635 = extractvalue { ptr, i32 } %634, 0
  store ptr %635, ptr %7, align 8
  %636 = extractvalue { ptr, i32 } %634, 1
  store i32 %636, ptr %8, align 4
  br label %642

637:                                              ; preds = %618
  %638 = landingpad { ptr, i32 }
          cleanup
  %639 = extractvalue { ptr, i32 } %638, 0
  store ptr %639, ptr %7, align 8
  %640 = extractvalue { ptr, i32 } %638, 1
  store i32 %640, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %43) #11
  br label %642

641:                                              ; preds = %629, %609
  call void @llvm.lifetime.end.p0(i64 2, ptr %42) #11
  br label %643

642:                                              ; preds = %637, %633
  call void @llvm.lifetime.end.p0(i64 2, ptr %42) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #11
  br label %1291

643:                                              ; preds = %641, %595, %578
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #11
  br label %644

644:                                              ; preds = %643
  %645 = load i32, ptr %39, align 4, !tbaa !51
  %646 = add i32 %645, 1
  store i32 %646, ptr %39, align 4, !tbaa !51
  br label %573, !llvm.loop !63

647:                                              ; preds = %577
  br label %648

648:                                              ; preds = %647
  %649 = load i32, ptr %38, align 4, !tbaa !51
  %650 = add i32 %649, 1
  store i32 %650, ptr %38, align 4, !tbaa !51
  br label %567, !llvm.loop !64

651:                                              ; preds = %571
  %652 = load ptr, ptr %33, align 8, !tbaa !5
  %653 = getelementptr inbounds %struct.Range, ptr %652, i32 1
  store ptr %653, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #11
  br label %654

654:                                              ; preds = %651
  %655 = load i32, ptr %35, align 4, !tbaa !51
  %656 = add i32 %655, 1
  store i32 %656, ptr %35, align 4, !tbaa !51
  br label %531, !llvm.loop !65

657:                                              ; preds = %535
  br label %658

658:                                              ; preds = %657
  %659 = load i32, ptr %34, align 4, !tbaa !51
  %660 = add i32 %659, 1
  store i32 %660, ptr %34, align 4, !tbaa !51
  br label %505, !llvm.loop !66

661:                                              ; preds = %509
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #11
  %662 = load i32, ptr %32, align 4, !tbaa !51
  %663 = lshr i32 %662, 1
  store i32 %663, ptr %44, align 4, !tbaa !51
  br label %664

664:                                              ; preds = %768, %661
  %665 = load i32, ptr %44, align 4, !tbaa !51
  %666 = icmp uge i32 %665, 1
  br i1 %666, label %668, label %667

667:                                              ; preds = %664
  store i32 31, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #11
  br label %772

668:                                              ; preds = %664
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #11
  %669 = load ptr, ptr %31, align 8, !tbaa !5
  %670 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %669)
          to label %671 unwind label %688

671:                                              ; preds = %668
  store ptr %670, ptr %45, align 8, !tbaa !5
  %672 = load ptr, ptr %31, align 8, !tbaa !5
  %673 = getelementptr inbounds %"class.JPH::Array.21", ptr %672, i32 -1
  store ptr %673, ptr %31, align 8, !tbaa !5
  %674 = load ptr, ptr %31, align 8, !tbaa !5
  %675 = load i32, ptr %44, align 4, !tbaa !51
  %676 = load i32, ptr %44, align 4, !tbaa !51
  %677 = mul i32 %675, %676
  %678 = zext i32 %677 to i64
  invoke void @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %674, i64 noundef %678)
          to label %679 unwind label %688

679:                                              ; preds = %671
  %680 = load ptr, ptr %31, align 8, !tbaa !5
  %681 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %680)
          to label %682 unwind label %688

682:                                              ; preds = %679
  store ptr %681, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #11
  store i32 0, ptr %46, align 4, !tbaa !51
  br label %683

683:                                              ; preds = %764, %682
  %684 = load i32, ptr %46, align 4, !tbaa !51
  %685 = load i32, ptr %44, align 4, !tbaa !51
  %686 = icmp ult i32 %684, %685
  br i1 %686, label %692, label %687

687:                                              ; preds = %683
  store i32 34, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #11
  br label %767

688:                                              ; preds = %679, %671, %668
  %689 = landingpad { ptr, i32 }
          cleanup
  %690 = extractvalue { ptr, i32 } %689, 0
  store ptr %690, ptr %7, align 8
  %691 = extractvalue { ptr, i32 } %689, 1
  store i32 %691, ptr %8, align 4
  br label %771

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

693:                                              ; preds = %760, %692
  %694 = load i32, ptr %47, align 4, !tbaa !51
  %695 = load i32, ptr %44, align 4, !tbaa !51
  %696 = icmp ult i32 %694, %695
  br i1 %696, label %698, label %697

697:                                              ; preds = %693
  store i32 37, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #11
  br label %763

698:                                              ; preds = %693
  %699 = load ptr, ptr %33, align 8, !tbaa !5
  %700 = getelementptr inbounds %struct.Range, ptr %699, i32 0, i32 0
  store i16 -1, ptr %700, align 2, !tbaa !60
  %701 = load ptr, ptr %33, align 8, !tbaa !5
  %702 = getelementptr inbounds %struct.Range, ptr %701, i32 0, i32 1
  store i16 0, ptr %702, align 2, !tbaa !62
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #11
  store i32 0, ptr %48, align 4, !tbaa !51
  br label %703

703:                                              ; preds = %754, %698
  %704 = load i32, ptr %48, align 4, !tbaa !51
  %705 = icmp ult i32 %704, 2
  br i1 %705, label %707, label %706

706:                                              ; preds = %703
  store i32 40, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #11
  br label %757

707:                                              ; preds = %703
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #11
  store i32 0, ptr %49, align 4, !tbaa !51
  br label %708

708:                                              ; preds = %746, %707
  %709 = load i32, ptr %49, align 4, !tbaa !51
  %710 = icmp ult i32 %709, 2
  br i1 %710, label %712, label %711

711:                                              ; preds = %708
  store i32 43, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #11
  br label %753

712:                                              ; preds = %708
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #11
  %713 = load ptr, ptr %45, align 8, !tbaa !5
  %714 = load i32, ptr %46, align 4, !tbaa !51
  %715 = mul i32 %714, 2
  %716 = load i32, ptr %48, align 4, !tbaa !51
  %717 = add i32 %715, %716
  %718 = load i32, ptr %44, align 4, !tbaa !51
  %719 = mul i32 %717, %718
  %720 = mul i32 %719, 2
  %721 = load i32, ptr %47, align 4, !tbaa !51
  %722 = mul i32 %721, 2
  %723 = add i32 %720, %722
  %724 = load i32, ptr %49, align 4, !tbaa !51
  %725 = add i32 %723, %724
  %726 = zext i32 %725 to i64
  %727 = getelementptr inbounds %struct.Range, ptr %713, i64 %726
  store ptr %727, ptr %50, align 8, !tbaa !5
  %728 = load ptr, ptr %33, align 8, !tbaa !5
  %729 = getelementptr inbounds %struct.Range, ptr %728, i32 0, i32 0
  %730 = load ptr, ptr %50, align 8, !tbaa !5
  %731 = getelementptr inbounds %struct.Range, ptr %730, i32 0, i32 0
  %732 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %729, ptr noundef nonnull align 2 dereferenceable(2) %731)
          to label %733 unwind label %749

733:                                              ; preds = %712
  %734 = load i16, ptr %732, align 2, !tbaa !53
  %735 = load ptr, ptr %33, align 8, !tbaa !5
  %736 = getelementptr inbounds %struct.Range, ptr %735, i32 0, i32 0
  store i16 %734, ptr %736, align 2, !tbaa !60
  %737 = load ptr, ptr %33, align 8, !tbaa !5
  %738 = getelementptr inbounds %struct.Range, ptr %737, i32 0, i32 1
  %739 = load ptr, ptr %50, align 8, !tbaa !5
  %740 = getelementptr inbounds %struct.Range, ptr %739, i32 0, i32 1
  %741 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %738, ptr noundef nonnull align 2 dereferenceable(2) %740)
          to label %742 unwind label %749

742:                                              ; preds = %733
  %743 = load i16, ptr %741, align 2, !tbaa !53
  %744 = load ptr, ptr %33, align 8, !tbaa !5
  %745 = getelementptr inbounds %struct.Range, ptr %744, i32 0, i32 1
  store i16 %743, ptr %745, align 2, !tbaa !62
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #11
  br label %746

746:                                              ; preds = %742
  %747 = load i32, ptr %49, align 4, !tbaa !51
  %748 = add i32 %747, 1
  store i32 %748, ptr %49, align 4, !tbaa !51
  br label %708, !llvm.loop !67

749:                                              ; preds = %733, %712
  %750 = landingpad { ptr, i32 }
          cleanup
  %751 = extractvalue { ptr, i32 } %750, 0
  store ptr %751, ptr %7, align 8
  %752 = extractvalue { ptr, i32 } %750, 1
  store i32 %752, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #11
  br label %771

753:                                              ; preds = %711
  br label %754

754:                                              ; preds = %753
  %755 = load i32, ptr %48, align 4, !tbaa !51
  %756 = add i32 %755, 1
  store i32 %756, ptr %48, align 4, !tbaa !51
  br label %703, !llvm.loop !68

757:                                              ; preds = %706
  %758 = load ptr, ptr %33, align 8, !tbaa !5
  %759 = getelementptr inbounds %struct.Range, ptr %758, i32 1
  store ptr %759, ptr %33, align 8, !tbaa !5
  br label %760

760:                                              ; preds = %757
  %761 = load i32, ptr %47, align 4, !tbaa !51
  %762 = add i32 %761, 1
  store i32 %762, ptr %47, align 4, !tbaa !51
  br label %693, !llvm.loop !69

763:                                              ; preds = %697
  br label %764

764:                                              ; preds = %763
  %765 = load i32, ptr %46, align 4, !tbaa !51
  %766 = add i32 %765, 1
  store i32 %766, ptr %46, align 4, !tbaa !51
  br label %683, !llvm.loop !70

767:                                              ; preds = %687
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #11
  br label %768

768:                                              ; preds = %767
  %769 = load i32, ptr %44, align 4, !tbaa !51
  %770 = lshr i32 %769, 1
  store i32 %770, ptr %44, align 4, !tbaa !51
  br label %664, !llvm.loop !71

771:                                              ; preds = %749, %688
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #11
  br label %1291

772:                                              ; preds = %667
  br label %773

773:                                              ; preds = %772
  %774 = load ptr, ptr %31, align 8, !tbaa !5
  %775 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %776 unwind label %526

776:                                              ; preds = %773
  %777 = icmp eq ptr %774, %775
  br i1 %777, label %782, label %778

778:                                              ; preds = %776
  %779 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.15, ptr noundef @.str.2, i32 noundef 647)
          to label %780 unwind label %526

780:                                              ; preds = %778
  br i1 %779, label %781, label %782

781:                                              ; preds = %780
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !72
  br label %782

782:                                              ; preds = %781, %780, %776
  br label %783

783:                                              ; preds = %782
  br label %784

784:                                              ; preds = %783
  %785 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 0)
          to label %786 unwind label %526

786:                                              ; preds = %784
  %787 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %785, i64 noundef 0)
          to label %788 unwind label %526

788:                                              ; preds = %786
  %789 = getelementptr inbounds %struct.Range, ptr %787, i32 0, i32 0
  %790 = load i16, ptr %789, align 2, !tbaa !60
  %791 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 11
  store i16 %790, ptr %791, align 2, !tbaa !44
  %792 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 0)
          to label %793 unwind label %526

793:                                              ; preds = %788
  %794 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %792, i64 noundef 0)
          to label %795 unwind label %526

795:                                              ; preds = %793
  %796 = getelementptr inbounds %struct.Range, ptr %794, i32 0, i32 1
  %797 = load i16, ptr %796, align 2, !tbaa !62
  %798 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 12
  store i16 %797, ptr %798, align 8, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 2, ptr %52) #11
  store i16 -1, ptr %52, align 2, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 2, ptr %53) #11
  store i16 0, ptr %53, align 2, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #11
  store ptr %20, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #11
  %799 = load ptr, ptr %54, align 8, !tbaa !5
  %800 = invoke noundef ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %799)
          to label %801 unwind label %810

801:                                              ; preds = %795
  store ptr %800, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #11
  %802 = load ptr, ptr %54, align 8, !tbaa !5
  %803 = invoke noundef ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %802)
          to label %804 unwind label %814

804:                                              ; preds = %801
  store ptr %803, ptr %56, align 8, !tbaa !5
  br label %805

805:                                              ; preds = %844, %804
  %806 = load ptr, ptr %55, align 8, !tbaa !5
  %807 = load ptr, ptr %56, align 8, !tbaa !5
  %808 = icmp ne ptr %806, %807
  br i1 %808, label %818, label %809

809:                                              ; preds = %805
  store i32 48, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #11
  br label %850

810:                                              ; preds = %795
  %811 = landingpad { ptr, i32 }
          cleanup
  %812 = extractvalue { ptr, i32 } %811, 0
  store ptr %812, ptr %7, align 8
  %813 = extractvalue { ptr, i32 } %811, 1
  store i32 %813, ptr %8, align 4
  br label %849

814:                                              ; preds = %801
  %815 = landingpad { ptr, i32 }
          cleanup
  %816 = extractvalue { ptr, i32 } %815, 0
  store ptr %816, ptr %7, align 8
  %817 = extractvalue { ptr, i32 } %815, 1
  store i32 %817, ptr %8, align 4
  br label %848

818:                                              ; preds = %805
  call void @llvm.lifetime.start.p0(i64 2, ptr %57) #11
  %819 = load ptr, ptr %55, align 8, !tbaa !5
  %820 = load i16, ptr %819, align 2, !tbaa !53
  store i16 %820, ptr %57, align 2, !tbaa !53
  %821 = load i16, ptr %57, align 2, !tbaa !53
  %822 = zext i16 %821 to i32
  %823 = icmp ne i32 %822, 65535
  br i1 %823, label %824, label %843

824:                                              ; preds = %818
  %825 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %52, ptr noundef nonnull align 2 dereferenceable(2) %57)
          to label %826 unwind label %835

826:                                              ; preds = %824
  %827 = load i16, ptr %825, align 2, !tbaa !53
  store i16 %827, ptr %52, align 2, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 2, ptr %58) #11
  %828 = load i16, ptr %57, align 2, !tbaa !53
  %829 = zext i16 %828 to i32
  %830 = add nsw i32 %829, 1
  %831 = trunc i32 %830 to i16
  store i16 %831, ptr %58, align 2, !tbaa !53
  %832 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %53, ptr noundef nonnull align 2 dereferenceable(2) %58)
          to label %833 unwind label %839

833:                                              ; preds = %826
  %834 = load i16, ptr %832, align 2, !tbaa !53
  store i16 %834, ptr %53, align 2, !tbaa !53
  call void @llvm.lifetime.end.p0(i64 2, ptr %58) #11
  br label %843

835:                                              ; preds = %824
  %836 = landingpad { ptr, i32 }
          cleanup
  %837 = extractvalue { ptr, i32 } %836, 0
  store ptr %837, ptr %7, align 8
  %838 = extractvalue { ptr, i32 } %836, 1
  store i32 %838, ptr %8, align 4
  br label %847

839:                                              ; preds = %826
  %840 = landingpad { ptr, i32 }
          cleanup
  %841 = extractvalue { ptr, i32 } %840, 0
  store ptr %841, ptr %7, align 8
  %842 = extractvalue { ptr, i32 } %840, 1
  store i32 %842, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %58) #11
  br label %847

843:                                              ; preds = %833, %818
  call void @llvm.lifetime.end.p0(i64 2, ptr %57) #11
  br label %844

844:                                              ; preds = %843
  %845 = load ptr, ptr %55, align 8, !tbaa !5
  %846 = getelementptr inbounds i16, ptr %845, i32 1
  store ptr %846, ptr %55, align 8, !tbaa !5
  br label %805

847:                                              ; preds = %839, %835
  call void @llvm.lifetime.end.p0(i64 2, ptr %57) #11
  br label %848

848:                                              ; preds = %847, %814
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #11
  br label %849

849:                                              ; preds = %848, %810
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #11
  br label %1290

850:                                              ; preds = %809
  br label %851

851:                                              ; preds = %850
  %852 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 11
  %853 = load i16, ptr %852, align 2, !tbaa !44
  %854 = zext i16 %853 to i32
  %855 = load i16, ptr %52, align 2, !tbaa !53
  %856 = zext i16 %855 to i32
  %857 = icmp eq i32 %854, %856
  br i1 %857, label %858, label %865

858:                                              ; preds = %851
  %859 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 12
  %860 = load i16, ptr %859, align 8, !tbaa !45
  %861 = zext i16 %860 to i32
  %862 = load i16, ptr %53, align 2, !tbaa !53
  %863 = zext i16 %862 to i32
  %864 = icmp eq i32 %861, %863
  br i1 %864, label %873, label %865

865:                                              ; preds = %858, %851
  %866 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.16, ptr noundef @.str.2, i32 noundef 662)
          to label %867 unwind label %869

867:                                              ; preds = %865
  br i1 %866, label %868, label %873

868:                                              ; preds = %867
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !73
  br label %873

869:                                              ; preds = %877, %875, %865
  %870 = landingpad { ptr, i32 }
          cleanup
  %871 = extractvalue { ptr, i32 } %870, 0
  store ptr %871, ptr %7, align 8
  %872 = extractvalue { ptr, i32 } %870, 1
  store i32 %872, ptr %8, align 4
  br label %1290

873:                                              ; preds = %868, %867, %858
  br label %874

874:                                              ; preds = %873
  br label %875

875:                                              ; preds = %874
  %876 = invoke noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %877 unwind label %869

877:                                              ; preds = %875
  %878 = invoke noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5eraseEPKSE_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef %876)
          to label %879 unwind label %869

879:                                              ; preds = %877
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #11
  %880 = load i32, ptr %9, align 4, !tbaa !51
  %881 = add i32 %880, 1
  %882 = lshr i32 %881, 1
  store i32 %882, ptr %60, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #11
  %883 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 14
  %884 = load ptr, ptr %883, align 16, !tbaa !46
  store ptr %884, ptr %61, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #11
  store i32 0, ptr %62, align 4, !tbaa !51
  br label %885

885:                                              ; preds = %1017, %879
  %886 = load i32, ptr %62, align 4, !tbaa !51
  %887 = zext i32 %886 to i64
  %888 = invoke noundef i64 @_ZNK3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %889 unwind label %892

889:                                              ; preds = %885
  %890 = icmp ult i64 %887, %888
  br i1 %890, label %896, label %891

891:                                              ; preds = %889
  store i32 52, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #11
  br label %1022

892:                                              ; preds = %911, %885
  %893 = landingpad { ptr, i32 }
          cleanup
  %894 = extractvalue { ptr, i32 } %893, 0
  store ptr %894, ptr %7, align 8
  %895 = extractvalue { ptr, i32 } %893, 1
  store i32 %895, ptr %8, align 4
  br label %1021

896:                                              ; preds = %889
  br label %897

897:                                              ; preds = %896
  %898 = load ptr, ptr %61, align 8, !tbaa !5
  %899 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 14
  %900 = load ptr, ptr %899, align 16, !tbaa !46
  %901 = ptrtoint ptr %898 to i64
  %902 = ptrtoint ptr %900 to i64
  %903 = sub i64 %901, %902
  %904 = sdiv exact i64 %903, 16
  %905 = trunc i64 %904 to i32
  %906 = load i32, ptr %62, align 4, !tbaa !51
  %907 = zext i32 %906 to i64
  %908 = getelementptr inbounds [15 x i32], ptr @_ZN3JPH16HeightFieldShape12sGridOffsetsE, i64 0, i64 %907
  %909 = load i32, ptr %908, align 4, !tbaa !51
  %910 = icmp eq i32 %905, %909
  br i1 %910, label %915, label %911

911:                                              ; preds = %897
  %912 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.17, ptr noundef @.str.2, i32 noundef 673)
          to label %913 unwind label %892

913:                                              ; preds = %911
  br i1 %912, label %914, label %915

914:                                              ; preds = %913
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !74
  br label %915

915:                                              ; preds = %914, %913, %897
  br label %916

916:                                              ; preds = %915
  br label %917

917:                                              ; preds = %916
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #11
  %918 = load i32, ptr %62, align 4, !tbaa !51
  %919 = shl i32 1, %918
  store i32 %919, ptr %64, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #11
  %920 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %64, ptr noundef nonnull align 4 dereferenceable(4) %60)
          to label %921 unwind label %928

921:                                              ; preds = %917
  %922 = load i32, ptr %920, align 4, !tbaa !51
  store i32 %922, ptr %65, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #11
  store i32 0, ptr %66, align 4, !tbaa !51
  br label %923

923:                                              ; preds = %1013, %921
  %924 = load i32, ptr %66, align 4, !tbaa !51
  %925 = load i32, ptr %65, align 4, !tbaa !51
  %926 = icmp ult i32 %924, %925
  br i1 %926, label %932, label %927

927:                                              ; preds = %923
  store i32 57, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #11
  br label %1016

928:                                              ; preds = %917
  %929 = landingpad { ptr, i32 }
          cleanup
  %930 = extractvalue { ptr, i32 } %929, 0
  store ptr %930, ptr %7, align 8
  %931 = extractvalue { ptr, i32 } %929, 1
  store i32 %931, ptr %8, align 4
  br label %1020

932:                                              ; preds = %923
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #11
  store i32 0, ptr %67, align 4, !tbaa !51
  br label %933

933:                                              ; preds = %1009, %932
  %934 = load i32, ptr %67, align 4, !tbaa !51
  %935 = load i32, ptr %65, align 4, !tbaa !51
  %936 = icmp ult i32 %934, %935
  br i1 %936, label %938, label %937

937:                                              ; preds = %933
  store i32 60, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #11
  br label %1012

938:                                              ; preds = %933
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #11
  %939 = load ptr, ptr %61, align 8, !tbaa !5
  %940 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %939, i32 1
  store ptr %940, ptr %61, align 8, !tbaa !5
  store ptr %939, ptr %68, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #11
  store i32 0, ptr %69, align 4, !tbaa !51
  br label %941

941:                                              ; preds = %1005, %938
  %942 = load i32, ptr %69, align 4, !tbaa !51
  %943 = icmp ult i32 %942, 2
  br i1 %943, label %945, label %944

944:                                              ; preds = %941
  store i32 63, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #11
  br label %1008

945:                                              ; preds = %941
  call void @llvm.lifetime.start.p0(i64 4, ptr %70) #11
  store i32 0, ptr %70, align 4, !tbaa !51
  br label %946

946:                                              ; preds = %997, %945
  %947 = load i32, ptr %70, align 4, !tbaa !51
  %948 = icmp ult i32 %947, 2
  br i1 %948, label %950, label %949

949:                                              ; preds = %946
  store i32 66, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #11
  br label %1004

950:                                              ; preds = %946
  call void @llvm.lifetime.start.p0(i64 4, ptr %71) #11
  %951 = load i32, ptr %66, align 4, !tbaa !51
  %952 = mul i32 %951, 2
  %953 = load i32, ptr %69, align 4, !tbaa !51
  %954 = add i32 %952, %953
  %955 = mul i32 %954, 2
  %956 = load i32, ptr %64, align 4, !tbaa !51
  %957 = mul i32 %955, %956
  %958 = load i32, ptr %67, align 4, !tbaa !51
  %959 = mul i32 %958, 2
  %960 = load i32, ptr %70, align 4, !tbaa !51
  %961 = add i32 %959, %960
  %962 = add i32 %957, %961
  store i32 %962, ptr %71, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #11
  %963 = load i32, ptr %69, align 4, !tbaa !51
  %964 = mul i32 %963, 2
  %965 = load i32, ptr %70, align 4, !tbaa !51
  %966 = add i32 %964, %965
  store i32 %966, ptr %72, align 4, !tbaa !51
  %967 = load i32, ptr %62, align 4, !tbaa !51
  %968 = zext i32 %967 to i64
  %969 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %968)
          to label %970 unwind label %1000

970:                                              ; preds = %950
  %971 = load i32, ptr %71, align 4, !tbaa !51
  %972 = zext i32 %971 to i64
  %973 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %969, i64 noundef %972)
          to label %974 unwind label %1000

974:                                              ; preds = %970
  %975 = getelementptr inbounds %struct.Range, ptr %973, i32 0, i32 0
  %976 = load i16, ptr %975, align 2, !tbaa !60
  %977 = load ptr, ptr %68, align 8, !tbaa !5
  %978 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %977, i32 0, i32 0
  %979 = load i32, ptr %72, align 4, !tbaa !51
  %980 = zext i32 %979 to i64
  %981 = getelementptr inbounds [4 x i16], ptr %978, i64 0, i64 %980
  store i16 %976, ptr %981, align 2, !tbaa !53
  %982 = load i32, ptr %62, align 4, !tbaa !51
  %983 = zext i32 %982 to i64
  %984 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %983)
          to label %985 unwind label %1000

985:                                              ; preds = %974
  %986 = load i32, ptr %71, align 4, !tbaa !51
  %987 = zext i32 %986 to i64
  %988 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %984, i64 noundef %987)
          to label %989 unwind label %1000

989:                                              ; preds = %985
  %990 = getelementptr inbounds %struct.Range, ptr %988, i32 0, i32 1
  %991 = load i16, ptr %990, align 2, !tbaa !62
  %992 = load ptr, ptr %68, align 8, !tbaa !5
  %993 = getelementptr inbounds %"struct.JPH::HeightFieldShape::RangeBlock", ptr %992, i32 0, i32 1
  %994 = load i32, ptr %72, align 4, !tbaa !51
  %995 = zext i32 %994 to i64
  %996 = getelementptr inbounds [4 x i16], ptr %993, i64 0, i64 %995
  store i16 %991, ptr %996, align 2, !tbaa !53
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #11
  br label %997

997:                                              ; preds = %989
  %998 = load i32, ptr %70, align 4, !tbaa !51
  %999 = add i32 %998, 1
  store i32 %999, ptr %70, align 4, !tbaa !51
  br label %946, !llvm.loop !75

1000:                                             ; preds = %985, %974, %970, %950
  %1001 = landingpad { ptr, i32 }
          cleanup
  %1002 = extractvalue { ptr, i32 } %1001, 0
  store ptr %1002, ptr %7, align 8
  %1003 = extractvalue { ptr, i32 } %1001, 1
  store i32 %1003, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #11
  br label %1020

1004:                                             ; preds = %949
  br label %1005

1005:                                             ; preds = %1004
  %1006 = load i32, ptr %69, align 4, !tbaa !51
  %1007 = add i32 %1006, 1
  store i32 %1007, ptr %69, align 4, !tbaa !51
  br label %941, !llvm.loop !76

1008:                                             ; preds = %944
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #11
  br label %1009

1009:                                             ; preds = %1008
  %1010 = load i32, ptr %67, align 4, !tbaa !51
  %1011 = add i32 %1010, 1
  store i32 %1011, ptr %67, align 4, !tbaa !51
  br label %933, !llvm.loop !77

1012:                                             ; preds = %937
  br label %1013

1013:                                             ; preds = %1012
  %1014 = load i32, ptr %66, align 4, !tbaa !51
  %1015 = add i32 %1014, 1
  store i32 %1015, ptr %66, align 4, !tbaa !51
  br label %923, !llvm.loop !78

1016:                                             ; preds = %927
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #11
  br label %1017

1017:                                             ; preds = %1016
  %1018 = load i32, ptr %62, align 4, !tbaa !51
  %1019 = add i32 %1018, 1
  store i32 %1019, ptr %62, align 4, !tbaa !51
  br label %885, !llvm.loop !79

1020:                                             ; preds = %1000, %928
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #11
  br label %1021

1021:                                             ; preds = %1020, %892
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #11
  br label %1289

1022:                                             ; preds = %891
  br label %1023

1023:                                             ; preds = %1022
  %1024 = load ptr, ptr %61, align 8, !tbaa !5
  %1025 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 14
  %1026 = load ptr, ptr %1025, align 16, !tbaa !46
  %1027 = ptrtoint ptr %1024 to i64
  %1028 = ptrtoint ptr %1026 to i64
  %1029 = sub i64 %1027, %1028
  %1030 = sdiv exact i64 %1029, 16
  %1031 = trunc i64 %1030 to i32
  %1032 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 7
  %1033 = load i32, ptr %1032, align 4, !tbaa !39
  %1034 = icmp eq i32 %1031, %1033
  br i1 %1034, label %1043, label %1035

1035:                                             ; preds = %1023
  %1036 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.18, ptr noundef @.str.2, i32 noundef 693)
          to label %1037 unwind label %1039

1037:                                             ; preds = %1035
  br i1 %1036, label %1038, label %1043

1038:                                             ; preds = %1037
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !80
  br label %1043

1039:                                             ; preds = %1035
  %1040 = landingpad { ptr, i32 }
          cleanup
  %1041 = extractvalue { ptr, i32 } %1040, 0
  store ptr %1041, ptr %7, align 8
  %1042 = extractvalue { ptr, i32 } %1040, 1
  store i32 %1042, ptr %8, align 4
  br label %1289

1043:                                             ; preds = %1038, %1037, %1023
  br label %1044

1044:                                             ; preds = %1043
  br label %1045

1045:                                             ; preds = %1044
  %1046 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 15
  %1047 = load ptr, ptr %1046, align 8, !tbaa !47
  %1048 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 6
  %1049 = load i32, ptr %1048, align 8, !tbaa !38
  %1050 = zext i32 %1049 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %1047, i8 0, i64 %1050, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #11
  store i32 0, ptr %74, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #11
  store i32 0, ptr %75, align 4, !tbaa !51
  br label %1051

1051:                                             ; preds = %1249, %1045
  %1052 = load i32, ptr %75, align 4, !tbaa !51
  %1053 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %1054 = load i32, ptr %1053, align 16, !tbaa !30
  %1055 = icmp ult i32 %1052, %1054
  br i1 %1055, label %1057, label %1056

1056:                                             ; preds = %1051
  store i32 71, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #11
  br label %1252

1057:                                             ; preds = %1051
  call void @llvm.lifetime.start.p0(i64 4, ptr %76) #11
  store i32 0, ptr %76, align 4, !tbaa !51
  br label %1058

1058:                                             ; preds = %1244, %1057
  %1059 = load i32, ptr %76, align 4, !tbaa !51
  %1060 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 4
  %1061 = load i32, ptr %1060, align 16, !tbaa !30
  %1062 = icmp ult i32 %1059, %1061
  br i1 %1062, label %1064, label %1063

1063:                                             ; preds = %1058
  store i32 74, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #11
  br label %1248

1064:                                             ; preds = %1058
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %78) #11
  %1065 = load i32, ptr %76, align 4, !tbaa !51
  %1066 = load ptr, ptr %5, align 8, !tbaa !5
  %1067 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %1066, i32 0, i32 3
  %1068 = load i32, ptr %1067, align 16, !tbaa !13
  %1069 = icmp ult i32 %1065, %1068
  br i1 %1069, label %1070, label %1090

1070:                                             ; preds = %1064
  %1071 = load i32, ptr %75, align 4, !tbaa !51
  %1072 = load ptr, ptr %5, align 8, !tbaa !5
  %1073 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %1072, i32 0, i32 3
  %1074 = load i32, ptr %1073, align 16, !tbaa !13
  %1075 = icmp ult i32 %1071, %1074
  br i1 %1075, label %1076, label %1090

1076:                                             ; preds = %1070
  %1077 = load ptr, ptr %5, align 8, !tbaa !5
  %1078 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %1077, i32 0, i32 9
  %1079 = load i32, ptr %76, align 4, !tbaa !51
  %1080 = load i32, ptr %75, align 4, !tbaa !51
  %1081 = load ptr, ptr %5, align 8, !tbaa !5
  %1082 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %1081, i32 0, i32 3
  %1083 = load i32, ptr %1082, align 16, !tbaa !13
  %1084 = mul i32 %1080, %1083
  %1085 = add i32 %1079, %1084
  %1086 = zext i32 %1085 to i64
  %1087 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1078, i64 noundef %1086)
          to label %1088 unwind label %1099

1088:                                             ; preds = %1076
  %1089 = load float, ptr %1087, align 4, !tbaa !52
  br label %1091

1090:                                             ; preds = %1070, %1064
  br label %1091

1091:                                             ; preds = %1090, %1088
  %1092 = phi float [ %1089, %1088 ], [ 0x47EFFFFFE0000000, %1090 ]
  store float %1092, ptr %78, align 4, !tbaa !52
  %1093 = load float, ptr %78, align 4, !tbaa !52
  %1094 = fcmp oeq float %1093, 0x47EFFFFFE0000000
  br i1 %1094, label %1095, label %1103

1095:                                             ; preds = %1091
  %1096 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 10
  %1097 = load i8, ptr %1096, align 1, !tbaa !43
  %1098 = zext i8 %1097 to i32
  store i32 %1098, ptr %77, align 4, !tbaa !51
  br label %1188

1099:                                             ; preds = %1076
  %1100 = landingpad { ptr, i32 }
          cleanup
  %1101 = extractvalue { ptr, i32 } %1100, 0
  store ptr %1101, ptr %7, align 8
  %1102 = extractvalue { ptr, i32 } %1100, 1
  store i32 %1102, ptr %8, align 4
  br label %1247

1103:                                             ; preds = %1091
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #11
  %1104 = load i32, ptr %76, align 4, !tbaa !51
  %1105 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %1106 = load i32, ptr %1105, align 4, !tbaa !37
  %1107 = udiv i32 %1104, %1106
  store i32 %1107, ptr %79, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #11
  %1108 = load i32, ptr %75, align 4, !tbaa !51
  %1109 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 5
  %1110 = load i32, ptr %1109, align 4, !tbaa !37
  %1111 = udiv i32 %1108, %1110
  store i32 %1111, ptr %80, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 8, ptr %81) #11
  %1112 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %1113 unwind label %1136

1113:                                             ; preds = %1103
  %1114 = load i32, ptr %80, align 4, !tbaa !51
  %1115 = load i32, ptr %32, align 4, !tbaa !51
  %1116 = mul i32 %1114, %1115
  %1117 = load i32, ptr %79, align 4, !tbaa !51
  %1118 = add i32 %1116, %1117
  %1119 = zext i32 %1118 to i64
  %1120 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1112, i64 noundef %1119)
          to label %1121 unwind label %1136

1121:                                             ; preds = %1113
  store ptr %1120, ptr %81, align 8, !tbaa !5
  br label %1122

1122:                                             ; preds = %1121
  %1123 = load ptr, ptr %81, align 8, !tbaa !5
  %1124 = getelementptr inbounds %struct.Range, ptr %1123, i32 0, i32 0
  %1125 = load i16, ptr %1124, align 2, !tbaa !60
  %1126 = zext i16 %1125 to i32
  %1127 = load ptr, ptr %81, align 8, !tbaa !5
  %1128 = getelementptr inbounds %struct.Range, ptr %1127, i32 0, i32 1
  %1129 = load i16, ptr %1128, align 2, !tbaa !62
  %1130 = zext i16 %1129 to i32
  %1131 = icmp slt i32 %1126, %1130
  br i1 %1131, label %1140, label %1132

1132:                                             ; preds = %1122
  %1133 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.19, ptr noundef @.str.2, i32 noundef 715)
          to label %1134 unwind label %1136

1134:                                             ; preds = %1132
  br i1 %1133, label %1135, label %1140

1135:                                             ; preds = %1134
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !81
  br label %1140

1136:                                             ; preds = %1132, %1113, %1103
  %1137 = landingpad { ptr, i32 }
          cleanup
  %1138 = extractvalue { ptr, i32 } %1137, 0
  store ptr %1138, ptr %7, align 8
  %1139 = extractvalue { ptr, i32 } %1137, 1
  store i32 %1139, ptr %8, align 4
  br label %1187

1140:                                             ; preds = %1135, %1134, %1122
  br label %1141

1141:                                             ; preds = %1140
  br label %1142

1142:                                             ; preds = %1141
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #11
  %1143 = load float, ptr %16, align 4, !tbaa !52
  %1144 = load ptr, ptr %81, align 8, !tbaa !5
  %1145 = getelementptr inbounds %struct.Range, ptr %1144, i32 0, i32 0
  %1146 = load i16, ptr %1145, align 2, !tbaa !60
  %1147 = zext i16 %1146 to i32
  %1148 = sitofp i32 %1147 to float
  %1149 = load float, ptr %18, align 4, !tbaa !52
  %1150 = fdiv float %1148, %1149
  %1151 = fadd float %1143, %1150
  store float %1151, ptr %83, align 4, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr %84) #11
  %1152 = load ptr, ptr %81, align 8, !tbaa !5
  %1153 = getelementptr inbounds %struct.Range, ptr %1152, i32 0, i32 1
  %1154 = load i16, ptr %1153, align 2, !tbaa !62
  %1155 = zext i16 %1154 to i32
  %1156 = load ptr, ptr %81, align 8, !tbaa !5
  %1157 = getelementptr inbounds %struct.Range, ptr %1156, i32 0, i32 0
  %1158 = load i16, ptr %1157, align 2, !tbaa !60
  %1159 = zext i16 %1158 to i32
  %1160 = sub nsw i32 %1155, %1159
  %1161 = sitofp i32 %1160 to float
  %1162 = load float, ptr %18, align 4, !tbaa !52
  %1163 = fdiv float %1161, %1162
  store float %1163, ptr %84, align 4, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 4, ptr %85) #11
  %1164 = load float, ptr %78, align 4, !tbaa !52
  %1165 = load float, ptr %83, align 4, !tbaa !52
  %1166 = fsub float %1164, %1165
  %1167 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 10
  %1168 = load i8, ptr %1167, align 1, !tbaa !43
  %1169 = uitofp i8 %1168 to float
  %1170 = fmul float %1166, %1169
  %1171 = load float, ptr %84, align 4, !tbaa !52
  %1172 = fdiv float %1170, %1171
  %1173 = invoke noundef float @_ZSt5floorf(float noundef %1172)
          to label %1174 unwind label %1183

1174:                                             ; preds = %1142
  store float %1173, ptr %85, align 4, !tbaa !52
  %1175 = load float, ptr %85, align 4, !tbaa !52
  %1176 = fptosi float %1175 to i32
  %1177 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 10
  %1178 = load i8, ptr %1177, align 1, !tbaa !43
  %1179 = zext i8 %1178 to i32
  %1180 = sub nsw i32 %1179, 1
  %1181 = invoke noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %1176, i32 noundef 0, i32 noundef %1180)
          to label %1182 unwind label %1183

1182:                                             ; preds = %1174
  store i32 %1181, ptr %77, align 4, !tbaa !51
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #11
  br label %1188

1183:                                             ; preds = %1174, %1142
  %1184 = landingpad { ptr, i32 }
          cleanup
  %1185 = extractvalue { ptr, i32 } %1184, 0
  store ptr %1185, ptr %7, align 8
  %1186 = extractvalue { ptr, i32 } %1184, 1
  store i32 %1186, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #11
  br label %1187

1187:                                             ; preds = %1183, %1136
  call void @llvm.lifetime.end.p0(i64 8, ptr %81) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #11
  br label %1247

1188:                                             ; preds = %1182, %1095
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #11
  %1189 = load i32, ptr %74, align 4, !tbaa !51
  %1190 = ashr i32 %1189, 3
  store i32 %1190, ptr %86, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #11
  %1191 = load i32, ptr %74, align 4, !tbaa !51
  %1192 = and i32 %1191, 7
  store i32 %1192, ptr %87, align 4, !tbaa !51
  %1193 = load i32, ptr %87, align 4, !tbaa !51
  %1194 = load i32, ptr %77, align 4, !tbaa !51
  %1195 = shl i32 %1194, %1193
  store i32 %1195, ptr %77, align 4, !tbaa !51
  br label %1196

1196:                                             ; preds = %1188
  %1197 = load i32, ptr %86, align 4, !tbaa !51
  %1198 = add i32 %1197, 1
  %1199 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 6
  %1200 = load i32, ptr %1199, align 8, !tbaa !38
  %1201 = icmp ult i32 %1198, %1200
  br i1 %1201, label %1210, label %1202

1202:                                             ; preds = %1196
  %1203 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.20, ptr noundef @.str.2, i32 noundef 730)
          to label %1204 unwind label %1206

1204:                                             ; preds = %1202
  br i1 %1203, label %1205, label %1210

1205:                                             ; preds = %1204
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !82
  br label %1210

1206:                                             ; preds = %1202
  %1207 = landingpad { ptr, i32 }
          cleanup
  %1208 = extractvalue { ptr, i32 } %1207, 0
  store ptr %1208, ptr %7, align 8
  %1209 = extractvalue { ptr, i32 } %1207, 1
  store i32 %1209, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #11
  br label %1247

1210:                                             ; preds = %1205, %1204, %1196
  br label %1211

1211:                                             ; preds = %1210
  br label %1212

1212:                                             ; preds = %1211
  %1213 = load i32, ptr %77, align 4, !tbaa !51
  %1214 = trunc i32 %1213 to i8
  %1215 = zext i8 %1214 to i32
  %1216 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 15
  %1217 = load ptr, ptr %1216, align 8, !tbaa !47
  %1218 = load i32, ptr %86, align 4, !tbaa !51
  %1219 = zext i32 %1218 to i64
  %1220 = getelementptr inbounds i8, ptr %1217, i64 %1219
  %1221 = load i8, ptr %1220, align 1, !tbaa !12
  %1222 = zext i8 %1221 to i32
  %1223 = or i32 %1222, %1215
  %1224 = trunc i32 %1223 to i8
  store i8 %1224, ptr %1220, align 1, !tbaa !12
  %1225 = load i32, ptr %77, align 4, !tbaa !51
  %1226 = lshr i32 %1225, 8
  %1227 = trunc i32 %1226 to i8
  %1228 = zext i8 %1227 to i32
  %1229 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 15
  %1230 = load ptr, ptr %1229, align 8, !tbaa !47
  %1231 = load i32, ptr %86, align 4, !tbaa !51
  %1232 = add i32 %1231, 1
  %1233 = zext i32 %1232 to i64
  %1234 = getelementptr inbounds i8, ptr %1230, i64 %1233
  %1235 = load i8, ptr %1234, align 1, !tbaa !12
  %1236 = zext i8 %1235 to i32
  %1237 = or i32 %1236, %1228
  %1238 = trunc i32 %1237 to i8
  store i8 %1238, ptr %1234, align 1, !tbaa !12
  %1239 = load ptr, ptr %5, align 8, !tbaa !5
  %1240 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %1239, i32 0, i32 8
  %1241 = load i32, ptr %1240, align 4, !tbaa !41
  %1242 = load i32, ptr %74, align 4, !tbaa !51
  %1243 = add i32 %1242, %1241
  store i32 %1243, ptr %74, align 4, !tbaa !51
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #11
  br label %1244

1244:                                             ; preds = %1212
  %1245 = load i32, ptr %76, align 4, !tbaa !51
  %1246 = add i32 %1245, 1
  store i32 %1246, ptr %76, align 4, !tbaa !51
  br label %1058, !llvm.loop !83

1247:                                             ; preds = %1206, %1187, %1099
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %76) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #11
  br label %1288

1248:                                             ; preds = %1063
  br label %1249

1249:                                             ; preds = %1248
  %1250 = load i32, ptr %75, align 4, !tbaa !51
  %1251 = add i32 %1250, 1
  store i32 %1251, ptr %75, align 4, !tbaa !51
  br label %1051, !llvm.loop !84

1252:                                             ; preds = %1056
  %1253 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesERKNS_24HeightFieldShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(176) %90, ptr noundef nonnull align 16 dereferenceable(208) %1253)
          to label %1254 unwind label %1267

1254:                                             ; preds = %1252
  %1255 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %90, i32 0, i32 17
  %1256 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1255)
          to label %1257 unwind label %1267

1257:                                             ; preds = %1254
  %1258 = icmp ugt i64 %1256, 1
  br i1 %1258, label %1264, label %1259

1259:                                             ; preds = %1257
  %1260 = load ptr, ptr %5, align 8, !tbaa !5
  %1261 = getelementptr inbounds %"class.JPH::HeightFieldShapeSettings", ptr %1260, i32 0, i32 6
  %1262 = load i32, ptr %1261, align 4, !tbaa !50
  %1263 = icmp ugt i32 %1262, 1
  br i1 %1263, label %1264, label %1271

1264:                                             ; preds = %1259, %1257
  %1265 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN3JPH16HeightFieldShape20StoreMaterialIndicesERKNS_24HeightFieldShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(176) %90, ptr noundef nonnull align 16 dereferenceable(208) %1265)
          to label %1266 unwind label %1267

1266:                                             ; preds = %1264
  br label %1271

1267:                                             ; preds = %1264, %1254, %1252
  %1268 = landingpad { ptr, i32 }
          cleanup
  %1269 = extractvalue { ptr, i32 } %1268, 0
  store ptr %1269, ptr %7, align 8
  %1270 = extractvalue { ptr, i32 } %1268, 1
  store i32 %1270, ptr %8, align 4
  br label %1288

1271:                                             ; preds = %1266, %1259
  %1272 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %89) #11
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef %90)
          to label %1273 unwind label %1279

1273:                                             ; preds = %1271
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %1272, ptr noundef nonnull align 8 dereferenceable(8) %89)
          to label %1274 unwind label %1283

1274:                                             ; preds = %1273
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %89) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %89) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #11
  call void @llvm.lifetime.end.p0(i64 2, ptr %53) #11
  call void @llvm.lifetime.end.p0(i64 2, ptr %52) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  call void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  call void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #11
  store i32 0, ptr %10, align 4
  br label %1275

1275:                                             ; preds = %1274, %305
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #11
  br label %1276

1276:                                             ; preds = %1275, %292, %280, %217, %205, %198, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #11
  %1277 = load i32, ptr %10, align 4
  switch i32 %1277, label %1305 [
    i32 0, label %1278
    i32 1, label %1278
  ]

1278:                                             ; preds = %1276, %1276, %180, %167
  ret void

1279:                                             ; preds = %1271
  %1280 = landingpad { ptr, i32 }
          cleanup
  %1281 = extractvalue { ptr, i32 } %1280, 0
  store ptr %1281, ptr %7, align 8
  %1282 = extractvalue { ptr, i32 } %1280, 1
  store i32 %1282, ptr %8, align 4
  br label %1287

1283:                                             ; preds = %1273
  %1284 = landingpad { ptr, i32 }
          cleanup
  %1285 = extractvalue { ptr, i32 } %1284, 0
  store ptr %1285, ptr %7, align 8
  %1286 = extractvalue { ptr, i32 } %1284, 1
  store i32 %1286, ptr %8, align 4
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %89) #11
  br label %1287

1287:                                             ; preds = %1283, %1279
  call void @llvm.lifetime.end.p0(i64 8, ptr %89) #11
  br label %1288

1288:                                             ; preds = %1287, %1267, %1247
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #11
  br label %1289

1289:                                             ; preds = %1288, %1039, %1021
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #11
  br label %1290

1290:                                             ; preds = %1289, %869, %849
  call void @llvm.lifetime.end.p0(i64 2, ptr %53) #11
  call void @llvm.lifetime.end.p0(i64 2, ptr %52) #11
  br label %1291

1291:                                             ; preds = %1290, %771, %642, %526
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #11
  br label %1292

1292:                                             ; preds = %1291, %522
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #11
  br label %1293

1293:                                             ; preds = %1292, %518
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #11
  br label %1294

1294:                                             ; preds = %1293, %514
  call void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #11
  br label %1295

1295:                                             ; preds = %1294, %510
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  br label %1296

1296:                                             ; preds = %1295, %444, %421, %335
  call void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #11
  br label %1297

1297:                                             ; preds = %1296, %318, %306
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #11
  br label %1298

1298:                                             ; preds = %1297, %283, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #11
  br label %1299

1299:                                             ; preds = %1298, %148
  call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %135) #11
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %134) #11
  call void @_ZN3JPH5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(26) %90) #11
  br label %1300

1300:                                             ; preds = %1299
  %1301 = load ptr, ptr %7, align 8
  %1302 = load i32, ptr %8, align 4
  %1303 = insertvalue { ptr, i32 } poison, ptr %1301, 0
  %1304 = insertvalue { ptr, i32 } %1303, i32 %1302, 1
  resume { ptr, i32 } %1304

1305:                                             ; preds = %1276
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ShapeC2ENS_10EShapeTypeENS_13EShapeSubTypeERKNS_13ShapeSettingsERNS_6ResultINS_3RefIS0_EEEE(ptr noundef nonnull align 8 dereferenceable(26), i8 noundef zeroext, i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH16HeightFieldShape26GetSubShapeIDBitsRecursiveEv(ptr noundef nonnull align 16 dereferenceable(176)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEONSt7__cxx1112basic_stringIcSt11char_traitsIcENS_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

declare void @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ...) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 2 dereferenceable(2)) #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef, i32 noundef, i32 noundef) #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backEOt(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 2 dereferenceable(2)) #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 2 dereferenceable(2) ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; 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 uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5eraseEPKSE_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZNK3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(26)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { "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 #9 = { 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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !20, i64 96}
!14 = !{!"_ZTSN3JPH24HeightFieldShapeSettingsE", !15, i64 0, !24, i64 64, !24, i64 80, !20, i64 96, !25, i64 100, !25, i64 104, !20, i64 108, !20, i64 112, !20, i64 116, !26, i64 120, !27, i64 144, !28, i64 168, !25, i64 192}
!15 = !{!"_ZTSN3JPH13ShapeSettingsE", !16, i64 0, !17, i64 8, !21, i64 16, !22, i64 24}
!16 = !{!"_ZTSN3JPH18SerializableObjectE"}
!17 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !18, i64 0}
!18 = !{!"_ZTSSt6atomicIjE", !19, i64 0}
!19 = !{!"_ZTSSt13__atomic_baseIjE", !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !7, i64 0, !23, i64 32}
!23 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !7, i64 0}
!24 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!25 = !{!"float", !7, i64 0}
!26 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !21, i64 0, !21, i64 8, !6, i64 16}
!27 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !21, i64 0, !21, i64 8, !6, i64 16}
!28 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !21, i64 0, !21, i64 8, !6, i64 16}
!29 = !{!14, !20, i64 112}
!30 = !{!31, !20, i64 64}
!31 = !{!"_ZTSN3JPH16HeightFieldShapeE", !32, i64 0, !24, i64 32, !24, i64 48, !20, i64 64, !20, i64 68, !20, i64 72, !20, i64 76, !20, i64 80, !7, i64 84, !7, i64 85, !36, i64 86, !36, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !28, i64 120, !27, i64 144, !20, i64 168}
!32 = !{!"_ZTSN3JPH5ShapeE", !33, i64 8, !21, i64 16, !34, i64 24, !35, i64 25}
!33 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !18, i64 0}
!34 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!35 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!36 = !{!"short", !7, i64 0}
!37 = !{!31, !20, i64 68}
!38 = !{!31, !20, i64 72}
!39 = !{!31, !20, i64 76}
!40 = !{!31, !20, i64 80}
!41 = !{!14, !20, i64 116}
!42 = !{!31, !7, i64 84}
!43 = !{!31, !7, i64 85}
!44 = !{!31, !36, i64 86}
!45 = !{!31, !36, i64 88}
!46 = !{!31, !6, i64 96}
!47 = !{!31, !6, i64 104}
!48 = !{!31, !6, i64 112}
!49 = !{!31, !20, i64 168}
!50 = !{!14, !20, i64 108}
!51 = !{!20, !20, i64 0}
!52 = !{!25, !25, i64 0}
!53 = !{!36, !36, i64 0}
!54 = distinct !{!54, !55}
!55 = !{!"llvm.loop.mustprogress"}
!56 = distinct !{!56, !55}
!57 = distinct !{!57, !55}
!58 = distinct !{!58, !55}
!59 = distinct !{!59, !55}
!60 = !{!61, !36, i64 0}
!61 = !{!"_ZTSZN3JPH16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5Range", !36, i64 0, !36, i64 2}
!62 = !{!61, !36, i64 2}
!63 = distinct !{!63, !55}
!64 = distinct !{!64, !55}
!65 = distinct !{!65, !55}
!66 = distinct !{!66, !55}
!67 = distinct !{!67, !55}
!68 = distinct !{!68, !55}
!69 = distinct !{!69, !55}
!70 = distinct !{!70, !55}
!71 = distinct !{!71, !55}
!72 = !{i64 2158606194}
!73 = !{i64 2158606584}
!74 = !{i64 2158607008}
!75 = distinct !{!75, !55}
!76 = distinct !{!76, !55}
!77 = distinct !{!77, !55}
!78 = distinct !{!78, !55}
!79 = distinct !{!79, !55}
!80 = !{i64 2158611491}
!81 = !{i64 2158611847}
!82 = !{i64 2158612223}
!83 = distinct !{!83, !55}
!84 = distinct !{!84, !55}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.2 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.2 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Array.15" = type { i64, i64, ptr }
%"class.JPH::Array.18" = type { i64, i64, ptr }
%struct.Range = type { i16, i16 }

@_ZN3JPH16HeightFieldShape12sGridOffsetsE = external dso_local local_unnamed_addr constant [15 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [102 x i8], align 1
@_ZTVN3JPH16HeightFieldShapeE = external dso_local unnamed_addr constant { [37 x ptr] }, align 8
@.str.7 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [55 x i8], align 1
@_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E = external hidden constant i16, align 2
@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [34 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

declare i32 @__gxx_personality_v0(...)

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH24HeightFieldShapeSettings24DetermineMinAndMaxSampleERfS1_S1_(ptr noundef nonnull align 16 dereferenceable(208), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 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 uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; 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 @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesERKNS_24HeightFieldShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(176), ptr noundef nonnull align 16 dereferenceable(208)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape11CacheValuesEv(ptr noundef nonnull align 16 dereferenceable(176)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16HeightFieldShape15AllocateBuffersEv(ptr noundef nonnull align 16 dereferenceable(176)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShapeC2ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEE(ptr noundef nonnull align 16 dereferenceable(176) %0, ptr noundef nonnull align 16 dereferenceable(208) %1, ptr noundef nonnull align 8 dereferenceable(33) %2) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca %"class.JPH::Ref", align 8
  %9 = alloca %"class.JPH::Array.15", align 8
  %10 = alloca i16, align 2
  %11 = alloca %"class.JPH::Array.18", align 8
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca i16, align 2
  %15 = alloca i16, align 2
  %16 = alloca i16, align 2
  %17 = alloca i16, align 2
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.JPH::Ref", align 8
  tail call void @_ZN3JPH5ShapeC2ENS_10EShapeTypeENS_13EShapeSubTypeERKNS_13ShapeSettingsERNS_6ResultINS_3RefIS0_EEEE(ptr noundef nonnull align 8 dereferenceable(26) %0, i8 noundef zeroext 4, i8 noundef zeroext 13, ptr noundef nonnull align 8 dereferenceable(64) %1, ptr noundef nonnull align 8 dereferenceable(33) %2)
  store ptr getelementptr inbounds inrange(-16, 280) (i8, ptr @_ZTVN3JPH16HeightFieldShapeE, i64 16), ptr %0, align 16, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %22 = getelementptr inbounds i8, ptr %1, i64 64
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %21, ptr noundef nonnull align 16 dereferenceable(16) %22, i64 16, i1 false), !tbaa.struct !8
  %23 = getelementptr inbounds i8, ptr %0, i64 48
  %24 = getelementptr inbounds i8, ptr %1, i64 80
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %23, ptr noundef nonnull align 16 dereferenceable(16) %24, i64 16, i1 false), !tbaa.struct !8
  %25 = getelementptr inbounds i8, ptr %0, i64 64
  %26 = getelementptr inbounds i8, ptr %1, i64 96
  %27 = load i32, ptr %26, align 16, !tbaa !11
  %28 = getelementptr inbounds i8, ptr %1, i64 112
  %29 = load i32, ptr %28, align 16, !tbaa !28
  %30 = add i32 %29, %27
  %.fr288 = freeze i32 %30
  %31 = add i32 %.fr288, -1
  %32 = urem i32 %31, %29
  %33 = sub nuw i32 %31, %32
  store i32 %33, ptr %25, align 16, !tbaa !29
  %34 = getelementptr inbounds i8, ptr %0, i64 68
  store i32 %29, ptr %34, align 4, !tbaa !36
  %35 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 0, ptr %35, align 8, !tbaa !37
  %36 = getelementptr inbounds i8, ptr %0, i64 76
  store i32 0, ptr %36, align 4, !tbaa !38
  %37 = getelementptr inbounds i8, ptr %0, i64 80
  store i32 0, ptr %37, align 16, !tbaa !39
  %38 = getelementptr inbounds i8, ptr %0, i64 84
  %39 = getelementptr inbounds i8, ptr %1, i64 116
  %40 = load i32, ptr %39, align 4, !tbaa !40
  %41 = trunc i32 %40 to i8
  store i8 %41, ptr %38, align 4, !tbaa !41
  %42 = getelementptr inbounds i8, ptr %0, i64 85
  store i8 -1, ptr %42, align 1, !tbaa !42
  %43 = getelementptr inbounds i8, ptr %0, i64 86
  store i16 -1, ptr %43, align 2, !tbaa !43
  %44 = getelementptr inbounds i8, ptr %0, i64 88
  store i16 -1, ptr %44, align 8, !tbaa !44
  %45 = getelementptr inbounds i8, ptr %0, i64 96
  %46 = getelementptr inbounds i8, ptr %0, i64 104
  %47 = getelementptr inbounds i8, ptr %0, i64 120
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %45, i8 0, i64 24, i1 false)
  tail call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %47) #11
  %48 = getelementptr inbounds i8, ptr %0, i64 144
  tail call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %48) #11
  %49 = getelementptr inbounds i8, ptr %0, i64 168
  store i32 0, ptr %49, align 8, !tbaa !45
  tail call void @_ZN3JPH16HeightFieldShape11CacheValuesEv(ptr noundef nonnull align 16 dereferenceable(176) %0)
  %50 = getelementptr inbounds i8, ptr %1, i64 108
  %51 = load i32, ptr %50, align 4, !tbaa !46
  %.not = icmp eq i32 %51, 0
  br i1 %.not, label %56, label %52

52:                                               ; preds = %3
  %53 = zext i32 %51 to i64
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %53)
          to label %56 unwind label %54

54:                                               ; preds = %.invoke, %56, %52
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %591

56:                                               ; preds = %52, %3
  %57 = getelementptr inbounds i8, ptr %1, i64 168
  %58 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %47, ptr noundef nonnull align 8 dereferenceable(24) %57)
          to label %59 unwind label %54

59:                                               ; preds = %56
  %60 = load i32, ptr %34, align 4, !tbaa !36
  %61 = add i32 %60, -9
  %or.cond = icmp ult i32 %61, -7
  br i1 %or.cond, label %.invoke, label %62

62:                                               ; preds = %59
  %63 = load i32, ptr %39, align 4, !tbaa !40
  %64 = add i32 %63, -9
  %or.cond320 = icmp ult i32 %64, -8
  br i1 %or.cond320, label %.invoke, label %66

.invoke:                                          ; preds = %62, %59
  %65 = phi ptr [ @.str.7, %59 ], [ @.str.8, %62 ]
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull %65)
          to label %583 unwind label %54

66:                                               ; preds = %62
  %67 = tail call noundef i32 @_ZNK3JPH16HeightFieldShape12GetNumBlocksEv(ptr noundef nonnull align 16 dereferenceable(176) %0)
  %68 = icmp ult i32 %67, 2
  br i1 %68, label %.invoke494, label %71

69:                                               ; preds = %.invoke494, %73
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %591

71:                                               ; preds = %66
  %72 = icmp ugt i32 %67, 16384
  br i1 %72, label %.invoke494, label %73

73:                                               ; preds = %71
  %74 = invoke noundef i32 @_ZNK3JPH16HeightFieldShape26GetSubShapeIDBitsRecursiveEv(ptr noundef nonnull align 16 dereferenceable(176) %0)
          to label %75 unwind label %69

75:                                               ; preds = %73
  %76 = icmp ugt i32 %74, 32
  br i1 %76, label %.invoke494, label %77

77:                                               ; preds = %75
  %78 = tail call noundef zeroext i1 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  br i1 %78, label %98, label %79

79:                                               ; preds = %77
  %80 = tail call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  %81 = icmp ugt i64 %80, 256
  br i1 %81, label %.invoke494, label %82

82:                                               ; preds = %79
  %83 = getelementptr inbounds i8, ptr %1, i64 144
  %84 = tail call noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %83)
  %85 = tail call noundef ptr @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %83)
  %.not289360 = icmp eq ptr %84, %85
  br i1 %.not289360, label %.critedge322, label %.critedge

86:                                               ; preds = %.critedge
  %87 = getelementptr inbounds i8, ptr %.0236361, i64 1
  %.not289 = icmp eq ptr %87, %85
  br i1 %.not289, label %.critedge322, label %.critedge

.critedge:                                        ; preds = %82, %86
  %.0236361 = phi ptr [ %87, %86 ], [ %84, %82 ]
  %88 = load i8, ptr %.0236361, align 1, !tbaa !9
  %89 = zext i8 %88 to i64
  %90 = tail call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  %.not290 = icmp ugt i64 %90, %89
  br i1 %.not290, label %86, label %91

91:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #11
  %92 = zext i8 %88 to i32
  %93 = tail call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  %94 = trunc i64 %93 to i32
  invoke void (ptr, ptr, ...) @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull @.str.13, i32 noundef %92, i32 noundef %94)
          to label %97 unwind label %95

95:                                               ; preds = %91
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  br label %591

97:                                               ; preds = %91
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEONSt7__cxx1112basic_stringIcSt11char_traitsIcENS_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(32) %4)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  br label %583

98:                                               ; preds = %77
  %99 = getelementptr inbounds i8, ptr %1, i64 144
  %100 = tail call noundef zeroext i1 @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %99)
  br i1 %100, label %.critedge322, label %.invoke494

.invoke494:                                       ; preds = %66, %98, %79, %75, %71
  %101 = phi ptr [ @.str.10, %71 ], [ @.str.11, %75 ], [ @.str.12, %79 ], [ @.str.14, %98 ], [ @.str.9, %66 ]
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull %101)
          to label %583 unwind label %69

.critedge322:                                     ; preds = %86, %82, %98
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #11
  invoke void @_ZNK3JPH24HeightFieldShapeSettings24DetermineMinAndMaxSampleERfS1_S1_(ptr noundef nonnull align 16 dereferenceable(208) %1, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %102 unwind label %109

102:                                              ; preds = %.critedge322
  %103 = load float, ptr %5, align 4, !tbaa !47
  %104 = load float, ptr %6, align 4, !tbaa !47
  %105 = fcmp ogt float %103, %104
  br i1 %105, label %106, label %113

106:                                              ; preds = %102
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
          to label %107 unwind label %109

107:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #11
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %0)
          to label %108 unwind label %111

108:                                              ; preds = %107
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  br label %582

109:                                              ; preds = %113, %106, %.critedge322
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %590

111:                                              ; preds = %107
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  br label %590

113:                                              ; preds = %102
  invoke void @_ZN3JPH16HeightFieldShape15AllocateBuffersEv(ptr noundef nonnull align 16 dereferenceable(176) %0)
          to label %114 unwind label %109

114:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #11
  call void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #11
  %115 = load i32, ptr %25, align 16, !tbaa !29
  %116 = mul i32 %115, %115
  %117 = zext i32 %116 to i64
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %117)
          to label %.preheader340 unwind label %123

.preheader340:                                    ; preds = %114
  %118 = load i32, ptr %26, align 16, !tbaa !11
  %.not424 = icmp eq i32 %118, 0
  br i1 %.not424, label %.preheader340..preheader337_crit_edge, label %.preheader339.lr.ph

.preheader340..preheader337_crit_edge:            ; preds = %.preheader340
  %.pre478 = load i32, ptr %25, align 16, !tbaa !29
  br label %.preheader337

.preheader339.lr.ph:                              ; preds = %.preheader340
  %119 = getelementptr inbounds i8, ptr %1, i64 120
  br label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %._crit_edge, %.preheader339.lr.ph
  %120 = phi i32 [ %118, %.preheader339.lr.ph ], [ %158, %._crit_edge ]
  %.0237365 = phi i32 [ 0, %.preheader339.lr.ph ], [ %159, %._crit_edge ]
  br label %.lr.ph

.preheader337:                                    ; preds = %._crit_edge, %.preheader340..preheader337_crit_edge
  %121 = phi i32 [ %.pre478, %.preheader340..preheader337_crit_edge ], [ %157, %._crit_edge ]
  %.lcssa354 = phi i32 [ 0, %.preheader340..preheader337_crit_edge ], [ %158, %._crit_edge ]
  %122 = icmp ult i32 %.lcssa354, %121
  br i1 %122, label %.lr.ph368.preheader, label %._crit_edge371

123:                                              ; preds = %114
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %589

.preheader338:                                    ; preds = %153
  %125 = load i32, ptr %25, align 16, !tbaa !29
  %126 = icmp ult i32 %155, %125
  br i1 %126, label %.lr.ph364, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph.preheader, %153
  %127 = phi i32 [ %155, %153 ], [ %120, %.lr.ph.preheader ]
  %.0238362 = phi i32 [ %154, %153 ], [ 0, %.lr.ph.preheader ]
  %128 = mul i32 %127, %.0237365
  %129 = add i32 %128, %.0238362
  %130 = zext i32 %129 to i64
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %130)
          to label %132 unwind label %136

132:                                              ; preds = %.lr.ph
  %133 = load float, ptr %131, align 4, !tbaa !47
  %134 = fcmp oeq float %133, 0x47EFFFFFE0000000
  br i1 %134, label %135, label %138

135:                                              ; preds = %132
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 2 dereferenceable(2) @_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E)
          to label %153 unwind label %136

136:                                              ; preds = %135, %.lr.ph
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %589

138:                                              ; preds = %132
  %139 = load float, ptr %7, align 4, !tbaa !47
  %140 = load float, ptr %5, align 4, !tbaa !47
  %141 = fsub float %133, %140
  %142 = fmul float %139, %141
  %143 = call noundef float @_ZSt5floorf(float noundef %142)
  %144 = fptosi float %143 to i32
  %145 = invoke noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %144, i32 noundef 0, i32 noundef 65533)
          to label %146 unwind label %149

146:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #11
  %147 = trunc i32 %145 to i16
  store i16 %147, ptr %10, align 2, !tbaa !48
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backEOt(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 2 dereferenceable(2) %10)
          to label %148 unwind label %151

148:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #11
  br label %153

149:                                              ; preds = %138
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %589

151:                                              ; preds = %146
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #11
  br label %589

153:                                              ; preds = %135, %148
  %154 = add nuw i32 %.0238362, 1
  %155 = load i32, ptr %26, align 16, !tbaa !11
  %156 = icmp ult i32 %154, %155
  br i1 %156, label %.lr.ph, label %.preheader338, !llvm.loop !49

._crit_edge.loopexit:                             ; preds = %161
  %.pre = load i32, ptr %26, align 16, !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader338
  %157 = phi i32 [ %163, %._crit_edge.loopexit ], [ %125, %.preheader338 ]
  %158 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %155, %.preheader338 ]
  %159 = add nuw i32 %.0237365, 1
  %160 = icmp ult i32 %159, %158
  br i1 %160, label %.lr.ph.preheader, label %.preheader337, !llvm.loop !51

.lr.ph364:                                        ; preds = %.preheader338, %161
  %.0239363 = phi i32 [ %162, %161 ], [ %155, %.preheader338 ]
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 2 dereferenceable(2) @_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E)
          to label %161 unwind label %165

161:                                              ; preds = %.lr.ph364
  %162 = add nuw i32 %.0239363, 1
  %163 = load i32, ptr %25, align 16, !tbaa !29
  %164 = icmp ult i32 %162, %163
  br i1 %164, label %.lr.ph364, label %._crit_edge.loopexit, !llvm.loop !52

165:                                              ; preds = %.lr.ph364
  %166 = landingpad { ptr, i32 }
          cleanup
  br label %589

.lr.ph368.preheader:                              ; preds = %.preheader337, %._crit_edge369
  %.0240370 = phi i32 [ %170, %._crit_edge369 ], [ %.lcssa354, %.preheader337 ]
  br label %.lr.ph368

._crit_edge371:                                   ; preds = %._crit_edge369, %.preheader337
  %167 = load float, ptr %5, align 4, !tbaa !47
  %168 = load float, ptr %6, align 4, !tbaa !47
  %169 = fcmp ugt float %167, %168
  br i1 %169, label %189, label %178

._crit_edge369:                                   ; preds = %172
  %170 = add nuw i32 %.0240370, 1
  %171 = icmp ult i32 %170, %174
  br i1 %171, label %.lr.ph368.preheader, label %._crit_edge371, !llvm.loop !53

.lr.ph368:                                        ; preds = %.lr.ph368.preheader, %172
  %.0246367 = phi i32 [ %173, %172 ], [ 0, %.lr.ph368.preheader ]
  invoke void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 2 dereferenceable(2) @_ZN3JPH25HeightFieldShapeConstantsL19cNoCollisionValue16E)
          to label %172 unwind label %176

172:                                              ; preds = %.lr.ph368
  %173 = add nuw i32 %.0246367, 1
  %174 = load i32, ptr %25, align 16, !tbaa !29
  %175 = icmp ult i32 %173, %174
  br i1 %175, label %.lr.ph368, label %._crit_edge369, !llvm.loop !55

176:                                              ; preds = %.lr.ph368
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %589

178:                                              ; preds = %._crit_edge371
  %179 = load float, ptr %7, align 4, !tbaa !47
  %180 = load i8, ptr %42, align 1, !tbaa !42
  %181 = uitofp i8 %180 to float
  %182 = fmul float %179, %181
  %183 = fdiv float 5.000000e-01, %182
  %184 = fsub float %167, %183
  store float %184, ptr %5, align 4, !tbaa !47
  %185 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %21)
  %186 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %23)
  %187 = load float, ptr %5, align 4, !tbaa !47
  %188 = call float @llvm.fmuladd.f32(float %186, float %187, float %185)
  call void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %21, float noundef %188)
  br label %189

189:                                              ; preds = %178, %._crit_edge371
  %190 = call noundef float @_ZNK3JPH4Vec34GetYEv(ptr noundef nonnull align 16 dereferenceable(16) %23)
  %191 = load float, ptr %7, align 4, !tbaa !47
  %192 = fdiv float %190, %191
  call void @_ZN3JPH4Vec34SetYEf(ptr noundef nonnull align 16 dereferenceable(16) %23, float noundef %192)
  %193 = call noundef i32 @_ZN3JPH16HeightFieldShape12sGetMaxLevelEj(i32 noundef %67)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #11
  call void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #11
  %194 = add i32 %193, 1
  %195 = zext i32 %194 to i64
  invoke void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %195)
          to label %196 unwind label %206

196:                                              ; preds = %189
  %197 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %198 unwind label %208

198:                                              ; preds = %196
  %199 = call noundef i32 @_ZN3JPH15GetNextPowerOf2Ej(i32 noundef %67)
  %200 = mul i32 %199, %199
  %201 = zext i32 %200 to i64
  invoke void @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef %201)
          to label %202 unwind label %210

202:                                              ; preds = %198
  %203 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %197)
          to label %.preheader335 unwind label %212

.preheader335:                                    ; preds = %202
  %.not428 = icmp eq i32 %199, 0
  br i1 %.not428, label %._crit_edge394, label %.preheader334.lr.ph

.preheader334.lr.ph:                              ; preds = %.preheader335
  %204 = add i32 %199, -1
  br label %.preheader334

.preheader334:                                    ; preds = %.preheader334.lr.ph, %214
  %.0250382 = phi ptr [ %203, %.preheader334.lr.ph ], [ %251, %214 ]
  %.0256381 = phi i32 [ 0, %.preheader334.lr.ph ], [ %215, %214 ]
  %205 = icmp eq i32 %.0256381, %204
  br label %216

.preheader332:                                    ; preds = %214
  %.not291390 = icmp eq i32 %199, 1
  br i1 %.not291390, label %._crit_edge394, label %.lr.ph393

206:                                              ; preds = %189
  %207 = landingpad { ptr, i32 }
          cleanup
  br label %588

208:                                              ; preds = %196
  %209 = landingpad { ptr, i32 }
          cleanup
  br label %588

210:                                              ; preds = %198
  %211 = landingpad { ptr, i32 }
          cleanup
  br label %588

212:                                              ; preds = %318, %315, %313, %311, %307, %._crit_edge394, %202
  %213 = landingpad { ptr, i32 }
          cleanup
  br label %588

214:                                              ; preds = %._crit_edge376
  %215 = add nuw i32 %.0256381, 1
  %exitcond452.not = icmp eq i32 %215, %199
  br i1 %exitcond452.not, label %.preheader332, label %.preheader334, !llvm.loop !56

216:                                              ; preds = %.preheader334, %._crit_edge376
  %.1251379 = phi ptr [ %.0250382, %.preheader334 ], [ %251, %._crit_edge376 ]
  %.0261377 = phi i32 [ 0, %.preheader334 ], [ %252, %._crit_edge376 ]
  store i16 -1, ptr %.1251379, align 2, !tbaa !57
  %217 = getelementptr inbounds i8, ptr %.1251379, i64 2
  store i16 0, ptr %217, align 2, !tbaa !59
  %218 = icmp eq i32 %.0261377, %204
  %219 = load i32, ptr %34, align 4
  %220 = add i32 %219, 1
  %221 = select i1 %218, i32 %219, i32 %220
  %222 = select i1 %205, i32 %219, i32 %220
  %.not429 = icmp eq i32 %222, 0
  %.not430 = icmp eq i32 %221, 0
  %or.cond495 = or i1 %.not429, %.not430
  br i1 %or.cond495, label %._crit_edge376, label %.preheader333.us

.preheader333.us:                                 ; preds = %216, %._crit_edge374.us
  %.0263375.us = phi i32 [ %249, %._crit_edge374.us ], [ 0, %216 ]
  br label %223

223:                                              ; preds = %.preheader333.us, %247
  %.0264372.us = phi i32 [ 0, %.preheader333.us ], [ %248, %247 ]
  %224 = load i32, ptr %34, align 4, !tbaa !36
  %225 = mul i32 %224, %.0261377
  %226 = add i32 %225, %.0264372.us
  %227 = mul i32 %224, %.0256381
  %228 = add i32 %227, %.0263375.us
  %229 = load i32, ptr %25, align 16, !tbaa !29
  %230 = icmp ult i32 %226, %229
  %231 = icmp ult i32 %228, %229
  %or.cond323.us = and i1 %230, %231
  br i1 %or.cond323.us, label %232, label %247

232:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %12) #11
  %233 = mul i32 %228, %229
  %234 = add i32 %233, %226
  %235 = zext i32 %234 to i64
  %236 = invoke noundef nonnull align 2 dereferenceable(2) ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %235)
          to label %237 unwind label %.split.us

237:                                              ; preds = %232
  %238 = load i16, ptr %236, align 2, !tbaa !48
  store i16 %238, ptr %12, align 2, !tbaa !48
  %.not307.us = icmp eq i16 %238, -1
  br i1 %.not307.us, label %246, label %239

239:                                              ; preds = %237
  %240 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %.1251379, ptr noundef nonnull align 2 dereferenceable(2) %12)
  %241 = load i16, ptr %240, align 2, !tbaa !48
  store i16 %241, ptr %.1251379, align 2, !tbaa !57
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %13) #11
  %242 = load i16, ptr %12, align 2, !tbaa !48
  %243 = add i16 %242, 1
  store i16 %243, ptr %13, align 2, !tbaa !48
  %244 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %217, ptr noundef nonnull align 2 dereferenceable(2) %13)
  %245 = load i16, ptr %244, align 2, !tbaa !48
  store i16 %245, ptr %217, align 2, !tbaa !59
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %13) #11
  br label %246

246:                                              ; preds = %239, %237
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %12) #11
  br label %247

247:                                              ; preds = %246, %223
  %248 = add nuw i32 %.0264372.us, 1
  %exitcond.not = icmp eq i32 %248, %221
  br i1 %exitcond.not, label %._crit_edge374.us, label %223, !llvm.loop !60

._crit_edge374.us:                                ; preds = %247
  %249 = add nuw i32 %.0263375.us, 1
  %exitcond450.not = icmp eq i32 %249, %222
  br i1 %exitcond450.not, label %._crit_edge376, label %.preheader333.us, !llvm.loop !61

.split.us:                                        ; preds = %232
  %250 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %12) #11
  br label %588

._crit_edge376:                                   ; preds = %._crit_edge374.us, %216
  %251 = getelementptr inbounds i8, ptr %.1251379, i64 4
  %252 = add nuw i32 %.0261377, 1
  %exitcond451.not = icmp eq i32 %252, %199
  br i1 %exitcond451.not, label %214, label %216, !llvm.loop !62

.loopexit:                                        ; preds = %269
  %.not291 = icmp ult i32 %.0269392.in, 4
  br i1 %.not291, label %._crit_edge394, label %.lr.ph393, !llvm.loop !63

._crit_edge394:                                   ; preds = %.preheader331, %.loopexit, %.preheader335, %.preheader332
  %.0247.lcssa = phi ptr [ %197, %.preheader332 ], [ %197, %.preheader335 ], [ %256, %.loopexit ], [ %256, %.preheader331 ]
  %253 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %305 unwind label %212

.lr.ph393:                                        ; preds = %.preheader332, %.loopexit
  %.0269392.in = phi i32 [ %.0269392, %.loopexit ], [ %199, %.preheader332 ]
  %.0247391 = phi ptr [ %256, %.loopexit ], [ %197, %.preheader332 ]
  %.0269392 = lshr i32 %.0269392.in, 1
  %254 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %.0247391)
          to label %255 unwind label %267

255:                                              ; preds = %.lr.ph393
  %256 = getelementptr inbounds i8, ptr %.0247391, i64 -24
  %257 = mul i32 %.0269392, %.0269392
  %258 = zext i32 %257 to i64
  invoke void @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %256, i64 noundef %258)
          to label %259 unwind label %267

259:                                              ; preds = %255
  %260 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %256)
          to label %.preheader331 unwind label %267

.preheader331:                                    ; preds = %259
  %.not431 = icmp ult i32 %.0269392.in, 2
  br i1 %.not431, label %._crit_edge394, label %.preheader330.preheader

.preheader330.preheader:                          ; preds = %.preheader331
  %wide.trip.count460 = zext nneg i32 %.0269392 to i64
  br label %.preheader330

.preheader330:                                    ; preds = %.preheader330.preheader, %269
  %indvars.iv457 = phi i64 [ 0, %.preheader330.preheader ], [ %indvars.iv.next458, %269 ]
  %.2252388 = phi ptr [ %260, %.preheader330.preheader ], [ %304, %269 ]
  %261 = shl nuw i64 %indvars.iv457, 1
  %262 = trunc i64 %261 to i32
  %263 = or disjoint i32 %262, 1
  %264 = mul i32 %263, %.0269392
  %265 = trunc nuw i64 %261 to i32
  %266 = mul i32 %.0269392, %265
  br label %.preheader329

267:                                              ; preds = %259, %255, %.lr.ph393
  %268 = landingpad { ptr, i32 }
          cleanup
  br label %588

269:                                              ; preds = %.preheader329
  %indvars.iv.next458 = add nuw nsw i64 %indvars.iv457, 1
  %exitcond461.not = icmp eq i64 %indvars.iv.next458, %wide.trip.count460
  br i1 %exitcond461.not, label %.loopexit, label %.preheader330, !llvm.loop !64

.preheader329:                                    ; preds = %.preheader330, %.preheader329
  %indvars.iv = phi i64 [ 0, %.preheader330 ], [ %indvars.iv.next, %.preheader329 ]
  %.3253386 = phi ptr [ %.2252388, %.preheader330 ], [ %304, %.preheader329 ]
  store i16 -1, ptr %.3253386, align 2, !tbaa !57
  %270 = getelementptr inbounds i8, ptr %.3253386, i64 2
  store i16 0, ptr %270, align 2, !tbaa !59
  %271 = trunc nuw nsw i64 %indvars.iv to i32
  %272 = add i32 %266, %271
  %273 = shl i32 %272, 1
  %274 = zext i32 %273 to i64
  %275 = getelementptr inbounds %struct.Range, ptr %254, i64 %274
  %276 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %.3253386, ptr noundef nonnull align 2 dereferenceable(2) %275)
  %277 = load i16, ptr %276, align 2, !tbaa !48
  store i16 %277, ptr %.3253386, align 2, !tbaa !57
  %278 = getelementptr inbounds i8, ptr %275, i64 2
  %279 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %270, ptr noundef nonnull align 2 dereferenceable(2) %278)
  %280 = load i16, ptr %279, align 2, !tbaa !48
  store i16 %280, ptr %270, align 2, !tbaa !59
  %281 = or disjoint i64 %274, 1
  %282 = getelementptr inbounds %struct.Range, ptr %254, i64 %281
  %283 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %.3253386, ptr noundef nonnull align 2 dereferenceable(2) %282)
  %284 = load i16, ptr %283, align 2, !tbaa !48
  store i16 %284, ptr %.3253386, align 2, !tbaa !57
  %285 = getelementptr inbounds i8, ptr %282, i64 2
  %286 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %270, ptr noundef nonnull align 2 dereferenceable(2) %285)
  %287 = load i16, ptr %286, align 2, !tbaa !48
  store i16 %287, ptr %270, align 2, !tbaa !59
  %288 = add i32 %264, %271
  %289 = shl i32 %288, 1
  %290 = zext i32 %289 to i64
  %291 = getelementptr inbounds %struct.Range, ptr %254, i64 %290
  %292 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %.3253386, ptr noundef nonnull align 2 dereferenceable(2) %291)
  %293 = load i16, ptr %292, align 2, !tbaa !48
  store i16 %293, ptr %.3253386, align 2, !tbaa !57
  %294 = getelementptr inbounds i8, ptr %291, i64 2
  %295 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %270, ptr noundef nonnull align 2 dereferenceable(2) %294)
  %296 = load i16, ptr %295, align 2, !tbaa !48
  store i16 %296, ptr %270, align 2, !tbaa !59
  %297 = or disjoint i64 %290, 1
  %298 = getelementptr inbounds %struct.Range, ptr %254, i64 %297
  %299 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %.3253386, ptr noundef nonnull align 2 dereferenceable(2) %298)
  %300 = load i16, ptr %299, align 2, !tbaa !48
  store i16 %300, ptr %.3253386, align 2, !tbaa !57
  %301 = getelementptr inbounds i8, ptr %298, i64 2
  %302 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %270, ptr noundef nonnull align 2 dereferenceable(2) %301)
  %303 = load i16, ptr %302, align 2, !tbaa !48
  store i16 %303, ptr %270, align 2, !tbaa !59
  %304 = getelementptr inbounds i8, ptr %.3253386, i64 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond456.not = icmp eq i64 %indvars.iv.next, %wide.trip.count460
  br i1 %exitcond456.not, label %269, label %.preheader329, !llvm.loop !65

305:                                              ; preds = %._crit_edge394
  %306 = icmp eq ptr %.0247.lcssa, %253
  br i1 %306, label %311, label %307

307:                                              ; preds = %305
  %308 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.2, i32 noundef 647)
          to label %309 unwind label %212

309:                                              ; preds = %307
  br i1 %308, label %310, label %311

310:                                              ; preds = %309
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !66
  br label %311

311:                                              ; preds = %310, %309, %305
  %312 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 0)
          to label %313 unwind label %212

313:                                              ; preds = %311
  %314 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %312, i64 noundef 0)
          to label %315 unwind label %212

315:                                              ; preds = %313
  %316 = load i16, ptr %314, align 2, !tbaa !57
  store i16 %316, ptr %43, align 2, !tbaa !43
  %317 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 0)
          to label %318 unwind label %212

318:                                              ; preds = %315
  %319 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %317, i64 noundef 0)
          to label %320 unwind label %212

320:                                              ; preds = %318
  %321 = getelementptr inbounds i8, ptr %319, i64 2
  %322 = load i16, ptr %321, align 2, !tbaa !59
  store i16 %322, ptr %44, align 8, !tbaa !44
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %14) #11
  store i16 -1, ptr %14, align 2, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %15) #11
  store i16 0, ptr %15, align 2, !tbaa !48
  %323 = call noundef ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %324 = call noundef ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %.not292396 = icmp eq ptr %323, %324
  br i1 %.not292396, label %._crit_edge400, label %.lr.ph399

._crit_edge400:                                   ; preds = %336, %320
  %325 = load i16, ptr %43, align 2, !tbaa !43
  %326 = load i16, ptr %14, align 2, !tbaa !48
  %327 = icmp eq i16 %325, %326
  br i1 %327, label %338, label %342

.lr.ph399:                                        ; preds = %320, %336
  %.0262397 = phi ptr [ %337, %336 ], [ %323, %320 ]
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %16) #11
  %328 = load i16, ptr %.0262397, align 2, !tbaa !48
  store i16 %328, ptr %16, align 2, !tbaa !48
  %.not301 = icmp eq i16 %328, -1
  br i1 %.not301, label %336, label %329

329:                                              ; preds = %.lr.ph399
  %330 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3minItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %14, ptr noundef nonnull align 2 dereferenceable(2) %16)
  %331 = load i16, ptr %330, align 2, !tbaa !48
  store i16 %331, ptr %14, align 2, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %17) #11
  %332 = load i16, ptr %16, align 2, !tbaa !48
  %333 = add i16 %332, 1
  store i16 %333, ptr %17, align 2, !tbaa !48
  %334 = call noundef nonnull align 2 dereferenceable(2) ptr @_ZSt3maxItERKT_S2_S2_(ptr noundef nonnull align 2 dereferenceable(2) %15, ptr noundef nonnull align 2 dereferenceable(2) %17)
  %335 = load i16, ptr %334, align 2, !tbaa !48
  store i16 %335, ptr %15, align 2, !tbaa !48
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %17) #11
  br label %336

336:                                              ; preds = %329, %.lr.ph399
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %16) #11
  %337 = getelementptr inbounds i8, ptr %.0262397, i64 2
  %.not292 = icmp eq ptr %337, %324
  br i1 %.not292, label %._crit_edge400, label %.lr.ph399

338:                                              ; preds = %._crit_edge400
  %339 = load i16, ptr %44, align 8, !tbaa !44
  %340 = load i16, ptr %15, align 2, !tbaa !48
  %341 = icmp eq i16 %339, %340
  br i1 %341, label %348, label %342

342:                                              ; preds = %338, %._crit_edge400
  %343 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.2, i32 noundef 662)
          to label %344 unwind label %346

344:                                              ; preds = %342
  br i1 %343, label %345, label %348

345:                                              ; preds = %344
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !67
  br label %348

346:                                              ; preds = %348, %342
  %347 = landingpad { ptr, i32 }
          cleanup
  br label %587

348:                                              ; preds = %345, %344, %338
  %349 = call noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %350 = invoke noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5eraseEPKSE_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %349)
          to label %351 unwind label %346

351:                                              ; preds = %348
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #11
  %352 = add nuw nsw i32 %67, 1
  %353 = lshr i32 %352, 1
  store i32 %353, ptr %18, align 4, !tbaa !68
  %354 = load ptr, ptr %45, align 16, !tbaa !69
  %355 = call noundef i64 @_ZNK3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %.not432 = icmp eq i64 %355, 0
  br i1 %.not432, label %._crit_edge413, label %.lr.ph412

._crit_edge413:                                   ; preds = %._crit_edge407, %351
  %.0258.lcssa = phi ptr [ %354, %351 ], [ %.1259.lcssa, %._crit_edge407 ]
  %356 = load ptr, ptr %45, align 16, !tbaa !69
  %357 = ptrtoint ptr %.0258.lcssa to i64
  %358 = ptrtoint ptr %356 to i64
  %359 = sub i64 %357, %358
  %360 = lshr exact i64 %359, 4
  %361 = trunc i64 %360 to i32
  %362 = load i32, ptr %36, align 4, !tbaa !38
  %363 = icmp eq i32 %362, %361
  br i1 %363, label %470, label %464

364:                                              ; preds = %376
  %365 = landingpad { ptr, i32 }
          cleanup
  br label %586

.lr.ph412:                                        ; preds = %351, %._crit_edge407
  %366 = phi i64 [ %388, %._crit_edge407 ], [ 0, %351 ]
  %.0257410 = phi i32 [ %387, %._crit_edge407 ], [ 0, %351 ]
  %.0258409 = phi ptr [ %.1259.lcssa, %._crit_edge407 ], [ %354, %351 ]
  %367 = load ptr, ptr %45, align 16, !tbaa !69
  %368 = ptrtoint ptr %.0258409 to i64
  %369 = ptrtoint ptr %367 to i64
  %370 = sub i64 %368, %369
  %371 = lshr exact i64 %370, 4
  %372 = trunc i64 %371 to i32
  %373 = getelementptr inbounds [15 x i32], ptr @_ZN3JPH16HeightFieldShape12sGridOffsetsE, i64 0, i64 %366
  %374 = load i32, ptr %373, align 4, !tbaa !68
  %375 = icmp eq i32 %374, %372
  br i1 %375, label %380, label %376

376:                                              ; preds = %.lr.ph412
  %377 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.2, i32 noundef 673)
          to label %378 unwind label %364

378:                                              ; preds = %376
  br i1 %377, label %379, label %380

379:                                              ; preds = %378
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !70
  br label %380

380:                                              ; preds = %379, %378, %.lr.ph412
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #11
  %381 = shl nuw i32 1, %.0257410
  store i32 %381, ptr %19, align 4, !tbaa !68
  %382 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %383 = load i32, ptr %382, align 4, !tbaa !68
  %.not433 = icmp eq i32 %383, 0
  br i1 %.not433, label %._crit_edge407, label %.preheader328.preheader

.preheader328.preheader:                          ; preds = %380
  %wide.trip.count476 = zext i32 %383 to i64
  br label %.preheader328

.preheader328:                                    ; preds = %.preheader328.preheader, %391
  %indvars.iv473 = phi i64 [ 0, %.preheader328.preheader ], [ %indvars.iv.next474, %391 ]
  %.1259405 = phi ptr [ %.0258409, %.preheader328.preheader ], [ %392, %391 ]
  %384 = trunc nuw i64 %indvars.iv473 to i32
  %385 = shl i32 %384, 2
  %386 = or disjoint i32 %385, 2
  br label %.preheader327

._crit_edge407:                                   ; preds = %391, %380
  %.1259.lcssa = phi ptr [ %.0258409, %380 ], [ %392, %391 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #11
  %387 = add i32 %.0257410, 1
  %388 = zext i32 %387 to i64
  %389 = call noundef i64 @_ZNK3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %390 = icmp ugt i64 %389, %388
  br i1 %390, label %.lr.ph412, label %._crit_edge413, !llvm.loop !71

391:                                              ; preds = %458
  %indvars.iv.next474 = add nuw nsw i64 %indvars.iv473, 1
  %exitcond477.not = icmp eq i64 %indvars.iv.next474, %wide.trip.count476
  br i1 %exitcond477.not, label %._crit_edge407, label %.preheader328, !llvm.loop !72

.preheader327:                                    ; preds = %.preheader328, %458
  %indvars.iv468 = phi i64 [ 0, %.preheader328 ], [ %indvars.iv.next469, %458 ]
  %.2260403 = phi ptr [ %.1259405, %.preheader328 ], [ %392, %458 ]
  %392 = getelementptr inbounds i8, ptr %.2260403, i64 16
  %393 = trunc nuw i64 %indvars.iv468 to i32
  %394 = shl i32 %393, 1
  %395 = getelementptr inbounds i8, ptr %.2260403, i64 8
  %396 = load i32, ptr %19, align 4, !tbaa !68
  %397 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %398 unwind label %462

398:                                              ; preds = %.preheader327
  %399 = mul i32 %396, %385
  %400 = add i32 %394, %399
  %401 = zext i32 %400 to i64
  %402 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %397, i64 noundef %401)
          to label %403 unwind label %462

403:                                              ; preds = %398
  %404 = load i16, ptr %402, align 2, !tbaa !57
  store i16 %404, ptr %.2260403, align 2, !tbaa !48
  %405 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %406 unwind label %462

406:                                              ; preds = %403
  %407 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %405, i64 noundef %401)
          to label %408 unwind label %462

408:                                              ; preds = %406
  %409 = getelementptr inbounds i8, ptr %407, i64 2
  %410 = load i16, ptr %409, align 2, !tbaa !59
  store i16 %410, ptr %395, align 2, !tbaa !48
  %411 = load i32, ptr %19, align 4, !tbaa !68
  %412 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %413 unwind label %462

413:                                              ; preds = %408
  %414 = mul i32 %411, %385
  %415 = or disjoint i32 %394, 1
  %416 = add i32 %415, %414
  %417 = zext i32 %416 to i64
  %418 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %412, i64 noundef %417)
          to label %419 unwind label %462

419:                                              ; preds = %413
  %420 = load i16, ptr %418, align 2, !tbaa !57
  %421 = getelementptr inbounds i8, ptr %.2260403, i64 2
  store i16 %420, ptr %421, align 2, !tbaa !48
  %422 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %423 unwind label %462

423:                                              ; preds = %419
  %424 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %422, i64 noundef %417)
          to label %.preheader327.1 unwind label %462

.preheader327.1:                                  ; preds = %423
  %425 = getelementptr inbounds i8, ptr %424, i64 2
  %426 = load i16, ptr %425, align 2, !tbaa !59
  %427 = getelementptr inbounds i8, ptr %.2260403, i64 10
  store i16 %426, ptr %427, align 2, !tbaa !48
  %428 = load i32, ptr %19, align 4, !tbaa !68
  %429 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %430 unwind label %462

430:                                              ; preds = %.preheader327.1
  %431 = mul i32 %428, %386
  %432 = add i32 %394, %431
  %433 = zext i32 %432 to i64
  %434 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %429, i64 noundef %433)
          to label %435 unwind label %462

435:                                              ; preds = %430
  %436 = load i16, ptr %434, align 2, !tbaa !57
  %437 = getelementptr inbounds i8, ptr %.2260403, i64 4
  store i16 %436, ptr %437, align 2, !tbaa !48
  %438 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %439 unwind label %462

439:                                              ; preds = %435
  %440 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %438, i64 noundef %433)
          to label %441 unwind label %462

441:                                              ; preds = %439
  %442 = getelementptr inbounds i8, ptr %440, i64 2
  %443 = load i16, ptr %442, align 2, !tbaa !59
  %444 = getelementptr inbounds i8, ptr %.2260403, i64 12
  store i16 %443, ptr %444, align 2, !tbaa !48
  %445 = load i32, ptr %19, align 4, !tbaa !68
  %446 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %447 unwind label %462

447:                                              ; preds = %441
  %448 = mul i32 %445, %386
  %449 = add i32 %415, %448
  %450 = zext i32 %449 to i64
  %451 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %446, i64 noundef %450)
          to label %452 unwind label %462

452:                                              ; preds = %447
  %453 = load i16, ptr %451, align 2, !tbaa !57
  %454 = getelementptr inbounds i8, ptr %.2260403, i64 6
  store i16 %453, ptr %454, align 2, !tbaa !48
  %455 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %366)
          to label %456 unwind label %462

456:                                              ; preds = %452
  %457 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %455, i64 noundef %450)
          to label %458 unwind label %462

458:                                              ; preds = %456
  %459 = getelementptr inbounds i8, ptr %457, i64 2
  %460 = load i16, ptr %459, align 2, !tbaa !59
  %461 = getelementptr inbounds i8, ptr %.2260403, i64 14
  store i16 %460, ptr %461, align 2, !tbaa !48
  %indvars.iv.next469 = add nuw nsw i64 %indvars.iv468, 1
  %exitcond472.not = icmp eq i64 %indvars.iv.next469, %wide.trip.count476
  br i1 %exitcond472.not, label %391, label %.preheader327, !llvm.loop !73

462:                                              ; preds = %456, %452, %447, %441, %439, %435, %430, %.preheader327.1, %423, %419, %413, %408, %406, %403, %398, %.preheader327
  %463 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #11
  br label %586

464:                                              ; preds = %._crit_edge413
  %465 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.18, ptr noundef nonnull @.str.2, i32 noundef 693)
          to label %466 unwind label %468

466:                                              ; preds = %464
  br i1 %465, label %467, label %470

467:                                              ; preds = %466
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !74
  br label %470

468:                                              ; preds = %464
  %469 = landingpad { ptr, i32 }
          cleanup
  br label %586

470:                                              ; preds = %467, %466, %._crit_edge413
  %471 = load ptr, ptr %46, align 8, !tbaa !75
  %472 = load i32, ptr %35, align 8, !tbaa !37
  %473 = zext i32 %472 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %471, i8 0, i64 %473, i1 false)
  %474 = load i32, ptr %25, align 16, !tbaa !29
  %.not434 = icmp eq i32 %474, 0
  br i1 %.not434, label %._crit_edge423, label %.preheader.preheader

.preheader.preheader:                             ; preds = %470
  %475 = getelementptr inbounds i8, ptr %1, i64 120
  br label %.lr.ph418.preheader

.lr.ph418.preheader:                              ; preds = %._crit_edge419, %.preheader.preheader
  %.0243422 = phi i32 [ %476, %._crit_edge419 ], [ 0, %.preheader.preheader ]
  %.0244421 = phi i32 [ %568, %._crit_edge419 ], [ 0, %.preheader.preheader ]
  br label %.lr.ph418

._crit_edge423:                                   ; preds = %._crit_edge419, %470
  invoke void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesERKNS_24HeightFieldShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(176) %0, ptr noundef nonnull align 16 dereferenceable(208) %1)
          to label %572 unwind label %578

._crit_edge419:                                   ; preds = %553
  %476 = add nuw i32 %.0243422, 1
  %477 = icmp ult i32 %476, %570
  br i1 %477, label %.lr.ph418.preheader, label %._crit_edge423, !llvm.loop !76

.lr.ph418:                                        ; preds = %.lr.ph418.preheader, %553
  %.0242416 = phi i32 [ %569, %553 ], [ 0, %.lr.ph418.preheader ]
  %.1245415 = phi i32 [ %568, %553 ], [ %.0244421, %.lr.ph418.preheader ]
  %478 = load i32, ptr %26, align 16, !tbaa !11
  %479 = icmp ult i32 %.0242416, %478
  %480 = icmp ult i32 %.0243422, %478
  %or.cond324 = and i1 %479, %480
  br i1 %or.cond324, label %481, label %.thread

481:                                              ; preds = %.lr.ph418
  %482 = mul i32 %478, %.0243422
  %483 = add i32 %482, %.0242416
  %484 = zext i32 %483 to i64
  %485 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH5ArrayIfNS_12STLAllocatorIfEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %475, i64 noundef %484)
          to label %486 unwind label %491

486:                                              ; preds = %481
  %487 = load float, ptr %485, align 4, !tbaa !47
  %488 = fcmp oeq float %487, 0x47EFFFFFE0000000
  br i1 %488, label %.thread, label %493

.thread:                                          ; preds = %.lr.ph418, %486
  %489 = load i8, ptr %42, align 1, !tbaa !42
  %490 = zext i8 %489 to i32
  br label %540

491:                                              ; preds = %481
  %492 = landingpad { ptr, i32 }
          cleanup
  br label %586

493:                                              ; preds = %486
  %494 = load i32, ptr %34, align 4, !tbaa !36
  %495 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %496 unwind label %512

496:                                              ; preds = %493
  %497 = udiv i32 %.0243422, %494
  %498 = udiv i32 %.0242416, %494
  %499 = mul i32 %497, %199
  %500 = add i32 %499, %498
  %501 = zext i32 %500 to i64
  %502 = invoke noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %495, i64 noundef %501)
          to label %503 unwind label %512

503:                                              ; preds = %496
  %504 = load i16, ptr %502, align 2, !tbaa !57
  %505 = getelementptr inbounds i8, ptr %502, i64 2
  %506 = load i16, ptr %505, align 2, !tbaa !59
  %507 = icmp ult i16 %504, %506
  br i1 %507, label %514, label %508

508:                                              ; preds = %503
  %509 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.2, i32 noundef 715)
          to label %510 unwind label %512

510:                                              ; preds = %508
  br i1 %509, label %511, label %514

511:                                              ; preds = %510
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !77
  br label %514

512:                                              ; preds = %508, %496, %493
  %513 = landingpad { ptr, i32 }
          cleanup
  br label %586

514:                                              ; preds = %511, %510, %503
  %515 = load float, ptr %5, align 4, !tbaa !47
  %516 = load i16, ptr %502, align 2, !tbaa !57
  %517 = zext i16 %516 to i32
  %518 = uitofp i16 %516 to float
  %519 = load float, ptr %7, align 4, !tbaa !47
  %520 = fdiv float %518, %519
  %521 = fadd float %515, %520
  %522 = load i16, ptr %505, align 2, !tbaa !59
  %523 = zext i16 %522 to i32
  %524 = sub nsw i32 %523, %517
  %525 = sitofp i32 %524 to float
  %526 = fdiv float %525, %519
  %527 = fsub float %487, %521
  %528 = load i8, ptr %42, align 1, !tbaa !42
  %529 = uitofp i8 %528 to float
  %530 = fmul float %527, %529
  %531 = fdiv float %530, %526
  %532 = call noundef float @_ZSt5floorf(float noundef %531)
  %533 = fptosi float %532 to i32
  %534 = load i8, ptr %42, align 1, !tbaa !42
  %535 = zext i8 %534 to i32
  %536 = add nsw i32 %535, -1
  %537 = invoke noundef i32 @_ZN3JPH5ClampIiEET_S1_S1_S1_(i32 noundef %533, i32 noundef 0, i32 noundef %536)
          to label %540 unwind label %538

538:                                              ; preds = %514
  %539 = landingpad { ptr, i32 }
          cleanup
  br label %586

540:                                              ; preds = %514, %.thread
  %.0241 = phi i32 [ %490, %.thread ], [ %537, %514 ]
  %541 = ashr i32 %.1245415, 3
  %542 = and i32 %.1245415, 7
  %543 = shl i32 %.0241, %542
  %544 = add nsw i32 %541, 1
  %545 = load i32, ptr %35, align 8, !tbaa !37
  %546 = icmp ult i32 %544, %545
  br i1 %546, label %553, label %547

547:                                              ; preds = %540
  %548 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.2, i32 noundef 730)
          to label %549 unwind label %551

549:                                              ; preds = %547
  br i1 %548, label %550, label %553

550:                                              ; preds = %549
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !78
  br label %553

551:                                              ; preds = %547
  %552 = landingpad { ptr, i32 }
          cleanup
  br label %586

553:                                              ; preds = %550, %549, %540
  %554 = load ptr, ptr %46, align 8, !tbaa !75
  %555 = zext i32 %541 to i64
  %556 = getelementptr inbounds i8, ptr %554, i64 %555
  %557 = load i8, ptr %556, align 1, !tbaa !9
  %558 = trunc i32 %543 to i8
  %559 = or i8 %557, %558
  store i8 %559, ptr %556, align 1, !tbaa !9
  %560 = lshr i32 %543, 8
  %561 = load ptr, ptr %46, align 8, !tbaa !75
  %562 = zext i32 %544 to i64
  %563 = getelementptr inbounds i8, ptr %561, i64 %562
  %564 = load i8, ptr %563, align 1, !tbaa !9
  %565 = trunc i32 %560 to i8
  %566 = or i8 %564, %565
  store i8 %566, ptr %563, align 1, !tbaa !9
  %567 = load i32, ptr %39, align 4, !tbaa !40
  %568 = add i32 %567, %.1245415
  %569 = add nuw i32 %.0242416, 1
  %570 = load i32, ptr %25, align 16, !tbaa !29
  %571 = icmp ult i32 %569, %570
  br i1 %571, label %.lr.ph418, label %._crit_edge419, !llvm.loop !79

572:                                              ; preds = %._crit_edge423
  %573 = call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  %574 = icmp ugt i64 %573, 1
  %575 = load i32, ptr %50, align 4
  %576 = icmp ugt i32 %575, 1
  %or.cond326 = select i1 %574, i1 true, i1 %576
  br i1 %or.cond326, label %577, label %580

577:                                              ; preds = %572
  invoke void @_ZN3JPH16HeightFieldShape20StoreMaterialIndicesERKNS_24HeightFieldShapeSettingsE(ptr noundef nonnull align 16 dereferenceable(176) %0, ptr noundef nonnull align 16 dereferenceable(208) %1)
          to label %580 unwind label %578

578:                                              ; preds = %577, %._crit_edge423
  %579 = landingpad { ptr, i32 }
          cleanup
  br label %586

580:                                              ; preds = %572, %577
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #11
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull %0)
          to label %581 unwind label %584

581:                                              ; preds = %580
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %2, ptr noundef nonnull align 8 dereferenceable(8) %20)
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #11
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %14) #11
  call void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #11
  call void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #11
  br label %582

582:                                              ; preds = %581, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  br label %583

583:                                              ; preds = %.invoke494, %.invoke, %97, %582
  ret void

584:                                              ; preds = %580
  %585 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #11
  br label %586

586:                                              ; preds = %578, %584, %512, %538, %551, %491, %364, %462, %468
  %.pn297.pn = phi { ptr, i32 } [ %469, %468 ], [ %463, %462 ], [ %365, %364 ], [ %585, %584 ], [ %579, %578 ], [ %552, %551 ], [ %492, %491 ], [ %539, %538 ], [ %513, %512 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #11
  br label %587

587:                                              ; preds = %586, %346
  %.pn297.pn.pn = phi { ptr, i32 } [ %.pn297.pn, %586 ], [ %347, %346 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %14) #11
  br label %588

588:                                              ; preds = %208, %212, %.split.us, %267, %587, %210, %206
  %.pn302.pn.pn.pn = phi { ptr, i32 } [ %207, %206 ], [ %209, %208 ], [ %211, %210 ], [ %250, %.split.us ], [ %268, %267 ], [ %.pn297.pn.pn, %587 ], [ %213, %212 ]
  call void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #11
  br label %589

589:                                              ; preds = %165, %149, %151, %136, %588, %176, %123
  %.pn310.pn.pn = phi { ptr, i32 } [ %177, %176 ], [ %.pn302.pn.pn.pn, %588 ], [ %124, %123 ], [ %166, %165 ], [ %137, %136 ], [ %152, %151 ], [ %150, %149 ]
  call void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #11
  br label %590

590:                                              ; preds = %589, %111, %109
  %.pn314 = phi { ptr, i32 } [ %112, %111 ], [ %110, %109 ], [ %.pn310.pn.pn, %589 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  br label %591

591:                                              ; preds = %69, %95, %590, %54
  %.pn318 = phi { ptr, i32 } [ %55, %54 ], [ %70, %69 ], [ %.pn314, %590 ], [ %96, %95 ]
  call void @_ZN3JPH5ArrayIhNS_12STLAllocatorIhEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %48) #11
  call void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %47) #11
  call void @_ZN3JPH5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(26) %0) #11
  resume { ptr, i32 } %.pn318
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ShapeC2ENS_10EShapeTypeENS_13EShapeSubTypeERKNS_13ShapeSettingsERNS_6ResultINS_3RefIS0_EEEE(ptr noundef nonnull align 8 dereferenceable(26), i8 noundef zeroext, i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH16HeightFieldShape26GetSubShapeIDBitsRecursiveEv(ptr noundef nonnull align 16 dereferenceable(176)) unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEONSt7__cxx1112basic_stringIcSt11char_traitsIcENS_12STLAllocatorIcEEEE(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

declare void @_ZN3JPH12StringFormatB5cxx11EPKcz(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ...) local_unnamed_addr #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5ArrayIhNS_12STLAllocatorIhEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backERKt(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 2 dereferenceable(2)) local_unnamed_addr #5 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 #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEE9push_backEOt(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 2 dereferenceable(2)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 2 dereferenceable(2) ptr @_ZN3JPH5ArrayItNS_12STLAllocatorItEEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; 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 uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 2 dereferenceable(4) ptr @_ZN3JPH5ArrayIZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5eraseEPKSE_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZNK3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3JPH5ArrayINS0_IZNS_16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5RangeNS_12STLAllocatorISB_EEEENSC_ISE_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ArrayItNS_12STLAllocatorItEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH5ShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(26)) 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { "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 #9 = { 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 #10 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{i64 0, i64 16, !9}
!9 = !{!10, !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !18, i64 96}
!12 = !{!"_ZTSN3JPH24HeightFieldShapeSettingsE", !13, i64 0, !22, i64 64, !22, i64 80, !18, i64 96, !23, i64 100, !23, i64 104, !18, i64 108, !18, i64 112, !18, i64 116, !24, i64 120, !26, i64 144, !27, i64 168, !23, i64 192}
!13 = !{!"_ZTSN3JPH13ShapeSettingsE", !14, i64 0, !15, i64 8, !19, i64 16, !20, i64 24}
!14 = !{!"_ZTSN3JPH18SerializableObjectE"}
!15 = !{!"_ZTSN3JPH9RefTargetINS_13ShapeSettingsEEE", !16, i64 0}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!18 = !{!"int", !10, i64 0}
!19 = !{!"long", !10, i64 0}
!20 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEEE", !10, i64 0, !21, i64 32}
!21 = !{!"_ZTSN3JPH6ResultINS_3RefINS_5ShapeEEEE6EStateE", !10, i64 0}
!22 = !{!"_ZTSN3JPH4Vec3E", !10, i64 0}
!23 = !{!"float", !10, i64 0}
!24 = !{!"_ZTSN3JPH5ArrayIfNS_12STLAllocatorIfEEEE", !19, i64 0, !19, i64 8, !25, i64 16}
!25 = !{!"any pointer", !10, i64 0}
!26 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !19, i64 0, !19, i64 8, !25, i64 16}
!27 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !19, i64 0, !19, i64 8, !25, i64 16}
!28 = !{!12, !18, i64 112}
!29 = !{!30, !18, i64 64}
!30 = !{!"_ZTSN3JPH16HeightFieldShapeE", !31, i64 0, !22, i64 32, !22, i64 48, !18, i64 64, !18, i64 68, !18, i64 72, !18, i64 76, !18, i64 80, !10, i64 84, !10, i64 85, !35, i64 86, !35, i64 88, !25, i64 96, !25, i64 104, !25, i64 112, !27, i64 120, !26, i64 144, !18, i64 168}
!31 = !{!"_ZTSN3JPH5ShapeE", !32, i64 8, !19, i64 16, !33, i64 24, !34, i64 25}
!32 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !16, i64 0}
!33 = !{!"_ZTSN3JPH10EShapeTypeE", !10, i64 0}
!34 = !{!"_ZTSN3JPH13EShapeSubTypeE", !10, i64 0}
!35 = !{!"short", !10, i64 0}
!36 = !{!30, !18, i64 68}
!37 = !{!30, !18, i64 72}
!38 = !{!30, !18, i64 76}
!39 = !{!30, !18, i64 80}
!40 = !{!12, !18, i64 116}
!41 = !{!30, !10, i64 84}
!42 = !{!30, !10, i64 85}
!43 = !{!30, !35, i64 86}
!44 = !{!30, !35, i64 88}
!45 = !{!30, !18, i64 168}
!46 = !{!12, !18, i64 108}
!47 = !{!23, !23, i64 0}
!48 = !{!35, !35, i64 0}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}
!51 = distinct !{!51, !50}
!52 = distinct !{!52, !50}
!53 = distinct !{!53, !50, !54}
!54 = !{!"llvm.loop.unswitch.partial.disable"}
!55 = distinct !{!55, !50}
!56 = distinct !{!56, !50}
!57 = !{!58, !35, i64 0}
!58 = !{!"_ZTSZN3JPH16HeightFieldShapeC1ERKNS_24HeightFieldShapeSettingsERNS_6ResultINS_3RefINS_5ShapeEEEEEE5Range", !35, i64 0, !35, i64 2}
!59 = !{!58, !35, i64 2}
!60 = distinct !{!60, !50}
!61 = distinct !{!61, !50}
!62 = distinct !{!62, !50}
!63 = distinct !{!63, !50}
!64 = distinct !{!64, !50}
!65 = distinct !{!65, !50}
!66 = !{i64 2158606194}
!67 = !{i64 2158606584}
!68 = !{!18, !18, i64 0}
!69 = !{!30, !25, i64 96}
!70 = !{i64 2158607008}
!71 = distinct !{!71, !50}
!72 = distinct !{!72, !50}
!73 = distinct !{!73, !50}
!74 = !{i64 2158611491}
!75 = !{!30, !25, i64 104}
!76 = distinct !{!76, !50, !54}
!77 = !{i64 2158611847}
!78 = !{i64 2158612223}
!79 = distinct !{!79, !50}


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