; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/Physics/Collision/Shape (HeightFieldShape)

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

%"class.JPH::ScopeExit" = type { %class.anon.13, i8, [7 x i8] }
%class.anon.13 = type <{ ptr, ptr, i32, [4 x i8] }>
%"class.JPH::Vec3" = type { %union.anon.3 }
%union.anon.3 = type { <4 x float> }
%"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::Array.9" = type { i64, i64, ptr }
%"class.JPH::Array.6" = type { i64, i64, ptr }

@.str.2 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, i32 noundef %6, i32 noundef %7, i64 noundef %8, float noundef %9, float noundef %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #3 align 2 personality ptr @__gxx_personality_v0 {
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca %"class.JPH::ScopeExit", align 8
  %28 = alloca %class.anon.13, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca float, align 4
  %35 = alloca float, align 4
  %36 = alloca float, align 4
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca %"class.JPH::Vec3", align 16
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = alloca %"class.JPH::Vec3", align 16
  %45 = alloca float, align 4
  %46 = alloca %"class.JPH::Vec3", align 16
  %47 = alloca %"class.JPH::Vec3", align 16
  %48 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca %"class.JPH::Vec3", align 16
  %51 = alloca %"class.JPH::Vec3", align 16
  %52 = alloca %"class.JPH::Vec3", align 16
  %53 = alloca %"class.JPH::Vec3", align 16
  %54 = alloca ptr, align 8
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca ptr, align 8
  %59 = alloca float, align 4
  %60 = alloca float, align 4
  %61 = alloca float, align 4
  %62 = alloca i8, align 1
  %63 = alloca i8, align 1
  %64 = alloca i8, align 1
  %65 = alloca i16, align 2
  %66 = alloca i16, align 2
  %67 = alloca %"class.JPH::Vec3", align 16
  %68 = alloca %"class.JPH::Vec3", align 16
  %69 = alloca %"class.JPH::Vec3", align 16
  %70 = alloca %"class.JPH::Vec3", align 16
  %71 = alloca %"class.JPH::Vec3", align 16
  %72 = alloca %"class.JPH::Vec3", align 16
  %73 = alloca %"class.JPH::Vec3", align 16
  %74 = alloca %"class.JPH::Vec3", align 16
  %75 = alloca %"class.JPH::Vec3", align 16
  %76 = alloca %"class.JPH::Vec3", align 16
  %77 = alloca %"class.JPH::Vec3", align 16
  %78 = alloca %"class.JPH::Vec3", align 16
  %79 = alloca i32, align 4
  %80 = alloca i32, align 4
  %81 = alloca %"struct.JPH::AssertLastParam", align 1
  %82 = alloca ptr, align 8
  %83 = alloca i16, align 2
  store ptr %0, ptr %13, align 8, !tbaa !5
  store i32 %1, ptr %14, align 4, !tbaa !9
  store i32 %2, ptr %15, align 4, !tbaa !9
  store i32 %3, ptr %16, align 4, !tbaa !9
  store i32 %4, ptr %17, align 4, !tbaa !9
  store ptr %5, ptr %18, align 8, !tbaa !5
  store i32 %6, ptr %19, align 4, !tbaa !9
  store i32 %7, ptr %20, align 4, !tbaa !9
  store i64 %8, ptr %21, align 8, !tbaa !11
  store float %9, ptr %22, align 4, !tbaa !13
  store float %10, ptr %23, align 4, !tbaa !13
  store ptr %11, ptr %24, align 8, !tbaa !5
  %84 = load ptr, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %85 = load i32, ptr %16, align 4, !tbaa !9
  %86 = mul i32 2, %85
  %87 = load i32, ptr %17, align 4, !tbaa !9
  %88 = mul i32 %86, %87
  %89 = zext i32 %88 to i64
  %90 = mul i64 %89, 16
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %92 = load ptr, ptr %24, align 8, !tbaa !5
  %93 = load i32, ptr %25, align 4, !tbaa !9
  %94 = load ptr, ptr %92, align 8, !tbaa !15
  %95 = getelementptr inbounds ptr, ptr %94, i64 2
  %96 = load ptr, ptr %95, align 8
  %97 = call noundef ptr %96(ptr noundef nonnull align 8 dereferenceable(8) %92, i32 noundef %93)
  store ptr %97, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #7
  %98 = getelementptr inbounds %class.anon.13, ptr %28, i32 0, i32 0
  %99 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %99, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds %class.anon.13, ptr %28, i32 0, i32 1
  %101 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %101, ptr %100, align 8, !tbaa !17
  %102 = getelementptr inbounds %class.anon.13, ptr %28, i32 0, i32 2
  %103 = load i32, ptr %25, align 4, !tbaa !9
  store i32 %103, ptr %102, align 8, !tbaa !19
  call void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0EC2EOS6_"(ptr noundef nonnull align 8 dereferenceable(25) %27, ptr noundef nonnull align 8 dereferenceable(20) %28)
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %104 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %104, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %342, %12
  %106 = load i32, ptr %30, align 4, !tbaa !9
  %107 = load i32, ptr %17, align 4, !tbaa !9
  %108 = icmp ult i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 2, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %345

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %337, %110
  %112 = load i32, ptr %32, align 4, !tbaa !9
  %113 = load i32, ptr %16, align 4, !tbaa !9
  %114 = icmp ult i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 5, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %341

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %117 = load ptr, ptr %18, align 8, !tbaa !5
  %118 = load i32, ptr %15, align 4, !tbaa !9
  %119 = load i32, ptr %20, align 4, !tbaa !9
  %120 = sub i32 %118, %119
  %121 = load i32, ptr %30, align 4, !tbaa !9
  %122 = add i32 %120, %121
  %123 = zext i32 %122 to i64
  %124 = load i64, ptr %21, align 8, !tbaa !11
  %125 = mul nsw i64 %123, %124
  %126 = getelementptr inbounds float, ptr %117, i64 %125
  %127 = load i32, ptr %14, align 4, !tbaa !9
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = sub i32 %127, %128
  %130 = load i32, ptr %32, align 4, !tbaa !9
  %131 = add i32 %129, %130
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds float, ptr %126, i64 %132
  store ptr %133, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %134 = load ptr, ptr %33, align 8, !tbaa !5
  %135 = getelementptr inbounds float, ptr %134, i64 0
  %136 = load float, ptr %135, align 4, !tbaa !13
  store float %136, ptr %34, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %137 = load ptr, ptr %33, align 8, !tbaa !5
  %138 = load i64, ptr %21, align 8, !tbaa !11
  %139 = add nsw i64 %138, 1
  %140 = getelementptr inbounds float, ptr %137, i64 %139
  %141 = load float, ptr %140, align 4, !tbaa !13
  store float %141, ptr %35, align 4, !tbaa !13
  %142 = load float, ptr %34, align 4, !tbaa !13
  %143 = fcmp une float %142, 0x47EFFFFFE0000000
  br i1 %143, label %144, label %305

144:                                              ; preds = %116
  %145 = load float, ptr %35, align 4, !tbaa !13
  %146 = fcmp une float %145, 0x47EFFFFFE0000000
  br i1 %146, label %147, label %305

147:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %148 = load ptr, ptr %33, align 8, !tbaa !5
  %149 = load i64, ptr %21, align 8, !tbaa !11
  %150 = getelementptr inbounds float, ptr %148, i64 %149
  %151 = load float, ptr %150, align 4, !tbaa !13
  store float %151, ptr %36, align 4, !tbaa !13
  %152 = load float, ptr %36, align 4, !tbaa !13
  %153 = fcmp une float %152, 0x47EFFFFFE0000000
  br i1 %153, label %154, label %210

154:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #7
  %155 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %156 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %155)
          to label %157 unwind label %196

157:                                              ; preds = %154
  %158 = load float, ptr %22, align 4, !tbaa !13
  %159 = load float, ptr %35, align 4, !tbaa !13
  %160 = load float, ptr %36, align 4, !tbaa !13
  %161 = fsub float %159, %160
  %162 = fmul float %158, %161
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %37, float noundef %156, float noundef %162, float noundef 0.000000e+00)
          to label %163 unwind label %196

163:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #7
  %164 = load float, ptr %22, align 4, !tbaa !13
  %165 = load float, ptr %34, align 4, !tbaa !13
  %166 = load float, ptr %36, align 4, !tbaa !13
  %167 = fsub float %165, %166
  %168 = fmul float %164, %167
  %169 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %170 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %169)
          to label %171 unwind label %200

171:                                              ; preds = %163
  %172 = fneg float %170
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %40, float noundef 0.000000e+00, float noundef %168, float noundef %172)
          to label %173 unwind label %200

173:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %43, ptr align 16 %40, i64 16, i1 false), !tbaa.struct !20
  %174 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %175 = load double, ptr %174, align 16
  %176 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %177 = load double, ptr %176, align 8
  %178 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %37, double %175, double %177)
          to label %179 unwind label %204

179:                                              ; preds = %173
  %180 = getelementptr inbounds %"class.JPH::Vec3", ptr %42, i32 0, i32 0
  %181 = getelementptr inbounds %union.anon.3, ptr %180, i32 0, i32 0
  %182 = getelementptr inbounds { double, double }, ptr %181, i32 0, i32 0
  %183 = extractvalue { double, double } %178, 0
  store double %183, ptr %182, align 16
  %184 = getelementptr inbounds { double, double }, ptr %181, i32 0, i32 1
  %185 = extractvalue { double, double } %178, 1
  store double %185, ptr %184, align 8
  %186 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %42)
          to label %187 unwind label %204

187:                                              ; preds = %179
  %188 = getelementptr inbounds %"class.JPH::Vec3", ptr %41, i32 0, i32 0
  %189 = getelementptr inbounds %union.anon.3, ptr %188, i32 0, i32 0
  %190 = getelementptr inbounds { double, double }, ptr %189, i32 0, i32 0
  %191 = extractvalue { double, double } %186, 0
  store double %191, ptr %190, align 16
  %192 = getelementptr inbounds { double, double }, ptr %189, i32 0, i32 1
  %193 = extractvalue { double, double } %186, 1
  store double %193, ptr %192, align 8
  %194 = load ptr, ptr %29, align 8, !tbaa !5
  %195 = getelementptr inbounds %"class.JPH::Vec3", ptr %194, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %195, ptr align 16 %41, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #7
  br label %225

196:                                              ; preds = %157, %154
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %38, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %39, align 4
  br label %209

200:                                              ; preds = %171, %163
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %38, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %39, align 4
  br label %208

204:                                              ; preds = %179, %173
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %38, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #7
  br label %208

208:                                              ; preds = %204, %200
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #7
  br label %209

209:                                              ; preds = %208, %196
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #7
  br label %304

210:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #7
  %211 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %212 unwind label %221

212:                                              ; preds = %210
  %213 = getelementptr inbounds %"class.JPH::Vec3", ptr %44, i32 0, i32 0
  %214 = getelementptr inbounds %union.anon.3, ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds { double, double }, ptr %214, i32 0, i32 0
  %216 = extractvalue { double, double } %211, 0
  store double %216, ptr %215, align 16
  %217 = getelementptr inbounds { double, double }, ptr %214, i32 0, i32 1
  %218 = extractvalue { double, double } %211, 1
  store double %218, ptr %217, align 8
  %219 = load ptr, ptr %29, align 8, !tbaa !5
  %220 = getelementptr inbounds %"class.JPH::Vec3", ptr %219, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %220, ptr align 16 %44, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #7
  br label %225

221:                                              ; preds = %210
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %38, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #7
  br label %304

225:                                              ; preds = %212, %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #7
  %226 = load ptr, ptr %33, align 8, !tbaa !5
  %227 = getelementptr inbounds float, ptr %226, i64 1
  %228 = load float, ptr %227, align 4, !tbaa !13
  store float %228, ptr %45, align 4, !tbaa !13
  %229 = load float, ptr %45, align 4, !tbaa !13
  %230 = fcmp une float %229, 0x47EFFFFFE0000000
  br i1 %230, label %231, label %287

231:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #7
  %232 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %233 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %232)
          to label %234 unwind label %273

234:                                              ; preds = %231
  %235 = fneg float %233
  %236 = load float, ptr %22, align 4, !tbaa !13
  %237 = load float, ptr %34, align 4, !tbaa !13
  %238 = load float, ptr %45, align 4, !tbaa !13
  %239 = fsub float %237, %238
  %240 = fmul float %236, %239
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %46, float noundef %235, float noundef %240, float noundef 0.000000e+00)
          to label %241 unwind label %273

241:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #7
  %242 = load float, ptr %22, align 4, !tbaa !13
  %243 = load float, ptr %35, align 4, !tbaa !13
  %244 = load float, ptr %45, align 4, !tbaa !13
  %245 = fsub float %243, %244
  %246 = fmul float %242, %245
  %247 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %248 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %247)
          to label %249 unwind label %277

249:                                              ; preds = %241
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %47, float noundef 0.000000e+00, float noundef %246, float noundef %248)
          to label %250 unwind label %277

250:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %50, ptr align 16 %47, i64 16, i1 false), !tbaa.struct !20
  %251 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %252 = load double, ptr %251, align 16
  %253 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %254 = load double, ptr %253, align 8
  %255 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %46, double %252, double %254)
          to label %256 unwind label %281

256:                                              ; preds = %250
  %257 = getelementptr inbounds %"class.JPH::Vec3", ptr %49, i32 0, i32 0
  %258 = getelementptr inbounds %union.anon.3, ptr %257, i32 0, i32 0
  %259 = getelementptr inbounds { double, double }, ptr %258, i32 0, i32 0
  %260 = extractvalue { double, double } %255, 0
  store double %260, ptr %259, align 16
  %261 = getelementptr inbounds { double, double }, ptr %258, i32 0, i32 1
  %262 = extractvalue { double, double } %255, 1
  store double %262, ptr %261, align 8
  %263 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %49)
          to label %264 unwind label %281

264:                                              ; preds = %256
  %265 = getelementptr inbounds %"class.JPH::Vec3", ptr %48, i32 0, i32 0
  %266 = getelementptr inbounds %union.anon.3, ptr %265, i32 0, i32 0
  %267 = getelementptr inbounds { double, double }, ptr %266, i32 0, i32 0
  %268 = extractvalue { double, double } %263, 0
  store double %268, ptr %267, align 16
  %269 = getelementptr inbounds { double, double }, ptr %266, i32 0, i32 1
  %270 = extractvalue { double, double } %263, 1
  store double %270, ptr %269, align 8
  %271 = load ptr, ptr %29, align 8, !tbaa !5
  %272 = getelementptr inbounds %"class.JPH::Vec3", ptr %271, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %272, ptr align 16 %48, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #7
  br label %302

273:                                              ; preds = %234, %231
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %38, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %39, align 4
  br label %286

277:                                              ; preds = %249, %241
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %38, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %39, align 4
  br label %285

281:                                              ; preds = %256, %250
  %282 = landingpad { ptr, i32 }
          cleanup
  %283 = extractvalue { ptr, i32 } %282, 0
  store ptr %283, ptr %38, align 8
  %284 = extractvalue { ptr, i32 } %282, 1
  store i32 %284, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #7
  br label %285

285:                                              ; preds = %281, %277
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #7
  br label %286

286:                                              ; preds = %285, %273
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #7
  br label %303

287:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #7
  %288 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %289 unwind label %298

289:                                              ; preds = %287
  %290 = getelementptr inbounds %"class.JPH::Vec3", ptr %51, i32 0, i32 0
  %291 = getelementptr inbounds %union.anon.3, ptr %290, i32 0, i32 0
  %292 = getelementptr inbounds { double, double }, ptr %291, i32 0, i32 0
  %293 = extractvalue { double, double } %288, 0
  store double %293, ptr %292, align 16
  %294 = getelementptr inbounds { double, double }, ptr %291, i32 0, i32 1
  %295 = extractvalue { double, double } %288, 1
  store double %295, ptr %294, align 8
  %296 = load ptr, ptr %29, align 8, !tbaa !5
  %297 = getelementptr inbounds %"class.JPH::Vec3", ptr %296, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %297, ptr align 16 %51, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #7
  br label %302

298:                                              ; preds = %287
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %38, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #7
  br label %303

302:                                              ; preds = %289, %264
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %334

303:                                              ; preds = %298, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  br label %304

304:                                              ; preds = %303, %221, %209
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %340

305:                                              ; preds = %144, %116
  call void @llvm.lifetime.start.p0(i64 16, ptr %52) #7
  %306 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %307 unwind label %326

307:                                              ; preds = %305
  %308 = getelementptr inbounds %"class.JPH::Vec3", ptr %52, i32 0, i32 0
  %309 = getelementptr inbounds %union.anon.3, ptr %308, i32 0, i32 0
  %310 = getelementptr inbounds { double, double }, ptr %309, i32 0, i32 0
  %311 = extractvalue { double, double } %306, 0
  store double %311, ptr %310, align 16
  %312 = getelementptr inbounds { double, double }, ptr %309, i32 0, i32 1
  %313 = extractvalue { double, double } %306, 1
  store double %313, ptr %312, align 8
  %314 = load ptr, ptr %29, align 8, !tbaa !5
  %315 = getelementptr inbounds %"class.JPH::Vec3", ptr %314, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %315, ptr align 16 %52, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %53) #7
  %316 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %317 unwind label %330

317:                                              ; preds = %307
  %318 = getelementptr inbounds %"class.JPH::Vec3", ptr %53, i32 0, i32 0
  %319 = getelementptr inbounds %union.anon.3, ptr %318, i32 0, i32 0
  %320 = getelementptr inbounds { double, double }, ptr %319, i32 0, i32 0
  %321 = extractvalue { double, double } %316, 0
  store double %321, ptr %320, align 16
  %322 = getelementptr inbounds { double, double }, ptr %319, i32 0, i32 1
  %323 = extractvalue { double, double } %316, 1
  store double %323, ptr %322, align 8
  %324 = load ptr, ptr %29, align 8, !tbaa !5
  %325 = getelementptr inbounds %"class.JPH::Vec3", ptr %324, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %325, ptr align 16 %53, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #7
  br label %334

326:                                              ; preds = %305
  %327 = landingpad { ptr, i32 }
          cleanup
  %328 = extractvalue { ptr, i32 } %327, 0
  store ptr %328, ptr %38, align 8
  %329 = extractvalue { ptr, i32 } %327, 1
  store i32 %329, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %52) #7
  br label %340

330:                                              ; preds = %307
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %38, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %53) #7
  br label %340

334:                                              ; preds = %317, %302
  %335 = load ptr, ptr %29, align 8, !tbaa !5
  %336 = getelementptr inbounds %"class.JPH::Vec3", ptr %335, i64 2
  store ptr %336, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %337

337:                                              ; preds = %334
  %338 = load i32, ptr %32, align 4, !tbaa !9
  %339 = add i32 %338, 1
  store i32 %339, ptr %32, align 4, !tbaa !9
  br label %111, !llvm.loop !22

340:                                              ; preds = %330, %326, %304
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %657

341:                                              ; preds = %115
  br label %342

342:                                              ; preds = %341
  %343 = load i32, ptr %30, align 4, !tbaa !9
  %344 = add i32 %343, 1
  store i32 %344, ptr %30, align 4, !tbaa !9
  br label %105, !llvm.loop !24

345:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #7
  %346 = load ptr, ptr %26, align 8, !tbaa !5
  store ptr %346, ptr %54, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #7
  %347 = load i32, ptr %15, align 4, !tbaa !9
  %348 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 4
  %349 = load i32, ptr %348, align 16, !tbaa !25
  %350 = sub i32 %349, 1
  %351 = mul i32 %347, %350
  %352 = load i32, ptr %14, align 4, !tbaa !9
  %353 = add i32 %351, %352
  %354 = mul i32 3, %353
  store i32 %354, ptr %55, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #7
  store i32 0, ptr %56, align 4, !tbaa !9
  br label %355

355:                                              ; preds = %653, %345
  %356 = load i32, ptr %56, align 4, !tbaa !9
  %357 = load i32, ptr %17, align 4, !tbaa !9
  %358 = icmp ult i32 %356, %357
  br i1 %358, label %360, label %359

359:                                              ; preds = %355
  store i32 8, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  br label %656

360:                                              ; preds = %355
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #7
  store i32 0, ptr %57, align 4, !tbaa !9
  br label %361

361:                                              ; preds = %640, %360
  %362 = load i32, ptr %57, align 4, !tbaa !9
  %363 = load i32, ptr %16, align 4, !tbaa !9
  %364 = icmp ult i32 %362, %363
  br i1 %364, label %366, label %365

365:                                              ; preds = %361
  store i32 11, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #7
  br label %644

366:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #7
  %367 = load ptr, ptr %18, align 8, !tbaa !5
  %368 = load i32, ptr %15, align 4, !tbaa !9
  %369 = load i32, ptr %20, align 4, !tbaa !9
  %370 = sub i32 %368, %369
  %371 = load i32, ptr %56, align 4, !tbaa !9
  %372 = add i32 %370, %371
  %373 = zext i32 %372 to i64
  %374 = load i64, ptr %21, align 8, !tbaa !11
  %375 = mul nsw i64 %373, %374
  %376 = getelementptr inbounds float, ptr %367, i64 %375
  %377 = load i32, ptr %14, align 4, !tbaa !9
  %378 = load i32, ptr %19, align 4, !tbaa !9
  %379 = sub i32 %377, %378
  %380 = load i32, ptr %57, align 4, !tbaa !9
  %381 = add i32 %379, %380
  %382 = zext i32 %381 to i64
  %383 = getelementptr inbounds float, ptr %376, i64 %382
  store ptr %383, ptr %58, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #7
  %384 = load ptr, ptr %58, align 8, !tbaa !5
  %385 = getelementptr inbounds float, ptr %384, i64 0
  %386 = load float, ptr %385, align 4, !tbaa !13
  store float %386, ptr %59, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #7
  %387 = load ptr, ptr %58, align 8, !tbaa !5
  %388 = load i64, ptr %21, align 8, !tbaa !11
  %389 = getelementptr inbounds float, ptr %387, i64 %388
  %390 = load float, ptr %389, align 4, !tbaa !13
  store float %390, ptr %60, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #7
  %391 = load ptr, ptr %58, align 8, !tbaa !5
  %392 = load i64, ptr %21, align 8, !tbaa !11
  %393 = add nsw i64 %392, 1
  %394 = getelementptr inbounds float, ptr %391, i64 %393
  %395 = load float, ptr %394, align 4, !tbaa !13
  store float %395, ptr %61, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %62) #7
  %396 = load float, ptr %59, align 4, !tbaa !13
  %397 = fcmp une float %396, 0x47EFFFFFE0000000
  %398 = zext i1 %397 to i8
  store i8 %398, ptr %62, align 1, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 1, ptr %63) #7
  %399 = load float, ptr %60, align 4, !tbaa !13
  %400 = fcmp une float %399, 0x47EFFFFFE0000000
  %401 = zext i1 %400 to i8
  store i8 %401, ptr %63, align 1, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 1, ptr %64) #7
  %402 = load float, ptr %61, align 4, !tbaa !13
  %403 = fcmp une float %402, 0x47EFFFFFE0000000
  %404 = zext i1 %403 to i8
  store i8 %404, ptr %64, align 1, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 2, ptr %65) #7
  store i16 7, ptr %65, align 2, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 2, ptr %66) #7
  store i16 0, ptr %66, align 2, !tbaa !39
  %405 = load i32, ptr %57, align 4, !tbaa !9
  %406 = icmp eq i32 %405, 0
  br i1 %406, label %407, label %412

407:                                              ; preds = %366
  %408 = load i16, ptr %65, align 2, !tbaa !39
  %409 = zext i16 %408 to i32
  %410 = and i32 %409, 6
  %411 = trunc i32 %410 to i16
  store i16 %411, ptr %65, align 2, !tbaa !39
  br label %458

412:                                              ; preds = %366
  %413 = load i8, ptr %62, align 1, !tbaa !37, !range !40, !noundef !41
  %414 = trunc i8 %413 to i1
  br i1 %414, label %415, label %457

415:                                              ; preds = %412
  %416 = load i8, ptr %63, align 1, !tbaa !37, !range !40, !noundef !41
  %417 = trunc i8 %416 to i1
  br i1 %417, label %418, label %457

418:                                              ; preds = %415
  call void @llvm.lifetime.start.p0(i64 16, ptr %67) #7
  %419 = load float, ptr %22, align 4, !tbaa !13
  %420 = load float, ptr %60, align 4, !tbaa !13
  %421 = load float, ptr %59, align 4, !tbaa !13
  %422 = fsub float %420, %421
  %423 = fmul float %419, %422
  %424 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %425 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %424)
          to label %426 unwind label %452

426:                                              ; preds = %418
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %67, float noundef 0.000000e+00, float noundef %423, float noundef %425)
          to label %427 unwind label %452

427:                                              ; preds = %426
  %428 = load ptr, ptr %54, align 8, !tbaa !5
  %429 = getelementptr inbounds %"class.JPH::Vec3", ptr %428, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %68, ptr align 16 %429, i64 16, i1 false), !tbaa.struct !20
  %430 = load ptr, ptr %54, align 8, !tbaa !5
  %431 = getelementptr inbounds %"class.JPH::Vec3", ptr %430, i64 -1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %69, ptr align 16 %431, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %70, ptr align 16 %67, i64 16, i1 false), !tbaa.struct !20
  %432 = load float, ptr %23, align 4, !tbaa !13
  %433 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %434 = load double, ptr %433, align 16
  %435 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %436 = load double, ptr %435, align 8
  %437 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 0
  %438 = load double, ptr %437, align 16
  %439 = getelementptr inbounds { double, double }, ptr %69, i32 0, i32 1
  %440 = load double, ptr %439, align 8
  %441 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 0
  %442 = load double, ptr %441, align 16
  %443 = getelementptr inbounds { double, double }, ptr %70, i32 0, i32 1
  %444 = load double, ptr %443, align 8
  %445 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %434, double %436, double %438, double %440, double %442, double %444, float noundef %432)
          to label %446 unwind label %452

446:                                              ; preds = %427
  br i1 %445, label %447, label %456

447:                                              ; preds = %446
  %448 = load i16, ptr %66, align 2, !tbaa !39
  %449 = zext i16 %448 to i32
  %450 = or i32 %449, 1
  %451 = trunc i32 %450 to i16
  store i16 %451, ptr %66, align 2, !tbaa !39
  br label %456

452:                                              ; preds = %427, %426, %418
  %453 = landingpad { ptr, i32 }
          cleanup
  %454 = extractvalue { ptr, i32 } %453, 0
  store ptr %454, ptr %38, align 8
  %455 = extractvalue { ptr, i32 } %453, 1
  store i32 %455, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %67) #7
  br label %643

456:                                              ; preds = %447, %446
  call void @llvm.lifetime.end.p0(i64 16, ptr %67) #7
  br label %457

457:                                              ; preds = %456, %415, %412
  br label %458

458:                                              ; preds = %457, %407
  %459 = load i32, ptr %56, align 4, !tbaa !9
  %460 = load i32, ptr %17, align 4, !tbaa !9
  %461 = sub i32 %460, 1
  %462 = icmp eq i32 %459, %461
  br i1 %462, label %463, label %468

463:                                              ; preds = %458
  %464 = load i16, ptr %65, align 2, !tbaa !39
  %465 = zext i16 %464 to i32
  %466 = and i32 %465, 5
  %467 = trunc i32 %466 to i16
  store i16 %467, ptr %65, align 2, !tbaa !39
  br label %518

468:                                              ; preds = %458
  %469 = load i8, ptr %63, align 1, !tbaa !37, !range !40, !noundef !41
  %470 = trunc i8 %469 to i1
  br i1 %470, label %471, label %517

471:                                              ; preds = %468
  %472 = load i8, ptr %64, align 1, !tbaa !37, !range !40, !noundef !41
  %473 = trunc i8 %472 to i1
  br i1 %473, label %474, label %517

474:                                              ; preds = %471
  call void @llvm.lifetime.start.p0(i64 16, ptr %71) #7
  %475 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %476 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %475)
          to label %477 unwind label %512

477:                                              ; preds = %474
  %478 = load float, ptr %22, align 4, !tbaa !13
  %479 = load float, ptr %61, align 4, !tbaa !13
  %480 = load float, ptr %60, align 4, !tbaa !13
  %481 = fsub float %479, %480
  %482 = fmul float %478, %481
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %71, float noundef %476, float noundef %482, float noundef 0.000000e+00)
          to label %483 unwind label %512

483:                                              ; preds = %477
  %484 = load ptr, ptr %54, align 8, !tbaa !5
  %485 = getelementptr inbounds %"class.JPH::Vec3", ptr %484, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %72, ptr align 16 %485, i64 16, i1 false), !tbaa.struct !20
  %486 = load ptr, ptr %54, align 8, !tbaa !5
  %487 = load i32, ptr %16, align 4, !tbaa !9
  %488 = mul i32 2, %487
  %489 = add i32 %488, 1
  %490 = zext i32 %489 to i64
  %491 = getelementptr inbounds %"class.JPH::Vec3", ptr %486, i64 %490
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %73, ptr align 16 %491, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %74, ptr align 16 %71, i64 16, i1 false), !tbaa.struct !20
  %492 = load float, ptr %23, align 4, !tbaa !13
  %493 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 0
  %494 = load double, ptr %493, align 16
  %495 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 1
  %496 = load double, ptr %495, align 8
  %497 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 0
  %498 = load double, ptr %497, align 16
  %499 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 1
  %500 = load double, ptr %499, align 8
  %501 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 0
  %502 = load double, ptr %501, align 16
  %503 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 1
  %504 = load double, ptr %503, align 8
  %505 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %494, double %496, double %498, double %500, double %502, double %504, float noundef %492)
          to label %506 unwind label %512

506:                                              ; preds = %483
  br i1 %505, label %507, label %516

507:                                              ; preds = %506
  %508 = load i16, ptr %66, align 2, !tbaa !39
  %509 = zext i16 %508 to i32
  %510 = or i32 %509, 2
  %511 = trunc i32 %510 to i16
  store i16 %511, ptr %66, align 2, !tbaa !39
  br label %516

512:                                              ; preds = %483, %477, %474
  %513 = landingpad { ptr, i32 }
          cleanup
  %514 = extractvalue { ptr, i32 } %513, 0
  store ptr %514, ptr %38, align 8
  %515 = extractvalue { ptr, i32 } %513, 1
  store i32 %515, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #7
  br label %643

516:                                              ; preds = %507, %506
  call void @llvm.lifetime.end.p0(i64 16, ptr %71) #7
  br label %517

517:                                              ; preds = %516, %471, %468
  br label %518

518:                                              ; preds = %517, %463
  %519 = load i8, ptr %62, align 1, !tbaa !37, !range !40, !noundef !41
  %520 = trunc i8 %519 to i1
  br i1 %520, label %521, label %568

521:                                              ; preds = %518
  %522 = load i8, ptr %64, align 1, !tbaa !37, !range !40, !noundef !41
  %523 = trunc i8 %522 to i1
  br i1 %523, label %524, label %568

524:                                              ; preds = %521
  call void @llvm.lifetime.start.p0(i64 16, ptr %75) #7
  %525 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %526 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %525)
          to label %527 unwind label %563

527:                                              ; preds = %524
  %528 = fneg float %526
  %529 = load float, ptr %22, align 4, !tbaa !13
  %530 = load float, ptr %59, align 4, !tbaa !13
  %531 = load float, ptr %61, align 4, !tbaa !13
  %532 = fsub float %530, %531
  %533 = fmul float %529, %532
  %534 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 3
  %535 = invoke noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %534)
          to label %536 unwind label %563

536:                                              ; preds = %527
  %537 = fneg float %535
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %75, float noundef %528, float noundef %533, float noundef %537)
          to label %538 unwind label %563

538:                                              ; preds = %536
  %539 = load ptr, ptr %54, align 8, !tbaa !5
  %540 = getelementptr inbounds %"class.JPH::Vec3", ptr %539, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %76, ptr align 16 %540, i64 16, i1 false), !tbaa.struct !20
  %541 = load ptr, ptr %54, align 8, !tbaa !5
  %542 = getelementptr inbounds %"class.JPH::Vec3", ptr %541, i64 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %77, ptr align 16 %542, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %78, ptr align 16 %75, i64 16, i1 false), !tbaa.struct !20
  %543 = load float, ptr %23, align 4, !tbaa !13
  %544 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 0
  %545 = load double, ptr %544, align 16
  %546 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 1
  %547 = load double, ptr %546, align 8
  %548 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 0
  %549 = load double, ptr %548, align 16
  %550 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 1
  %551 = load double, ptr %550, align 8
  %552 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 0
  %553 = load double, ptr %552, align 16
  %554 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 1
  %555 = load double, ptr %554, align 8
  %556 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %545, double %547, double %549, double %551, double %553, double %555, float noundef %543)
          to label %557 unwind label %563

557:                                              ; preds = %538
  br i1 %556, label %558, label %567

558:                                              ; preds = %557
  %559 = load i16, ptr %66, align 2, !tbaa !39
  %560 = zext i16 %559 to i32
  %561 = or i32 %560, 4
  %562 = trunc i32 %561 to i16
  store i16 %562, ptr %66, align 2, !tbaa !39
  br label %567

563:                                              ; preds = %538, %536, %527, %524
  %564 = landingpad { ptr, i32 }
          cleanup
  %565 = extractvalue { ptr, i32 } %564, 0
  store ptr %565, ptr %38, align 8
  %566 = extractvalue { ptr, i32 } %564, 1
  store i32 %566, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %75) #7
  br label %643

567:                                              ; preds = %558, %557
  call void @llvm.lifetime.end.p0(i64 16, ptr %75) #7
  br label %568

568:                                              ; preds = %567, %521, %518
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #7
  %569 = load i32, ptr %55, align 4, !tbaa !9
  %570 = lshr i32 %569, 3
  store i32 %570, ptr %79, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #7
  %571 = load i32, ptr %55, align 4, !tbaa !9
  %572 = and i32 %571, 7
  store i32 %572, ptr %80, align 4, !tbaa !9
  br label %573

573:                                              ; preds = %568
  %574 = load i32, ptr %79, align 4, !tbaa !9
  %575 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 8
  %576 = load i32, ptr %575, align 16, !tbaa !42
  %577 = icmp ult i32 %574, %576
  br i1 %577, label %586, label %578

578:                                              ; preds = %573
  %579 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.4, ptr noundef @.str.2, i32 noundef 303)
          to label %580 unwind label %582

580:                                              ; preds = %578
  br i1 %579, label %581, label %586

581:                                              ; preds = %580
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !43
  br label %586

582:                                              ; preds = %578
  %583 = landingpad { ptr, i32 }
          cleanup
  %584 = extractvalue { ptr, i32 } %583, 0
  store ptr %584, ptr %38, align 8
  %585 = extractvalue { ptr, i32 } %583, 1
  store i32 %585, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #7
  br label %643

586:                                              ; preds = %581, %580, %573
  br label %587

587:                                              ; preds = %586
  br label %588

588:                                              ; preds = %587
  call void @llvm.lifetime.start.p0(i64 8, ptr %82) #7
  %589 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 16
  %590 = load ptr, ptr %589, align 16, !tbaa !44
  %591 = load i32, ptr %79, align 4, !tbaa !9
  %592 = zext i32 %591 to i64
  %593 = getelementptr inbounds i8, ptr %590, i64 %592
  store ptr %593, ptr %82, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %83) #7
  %594 = load ptr, ptr %82, align 8, !tbaa !5
  %595 = getelementptr inbounds i8, ptr %594, i64 0
  %596 = load i8, ptr %595, align 1, !tbaa !21
  %597 = zext i8 %596 to i16
  %598 = zext i16 %597 to i32
  %599 = load ptr, ptr %82, align 8, !tbaa !5
  %600 = getelementptr inbounds i8, ptr %599, i64 1
  %601 = load i8, ptr %600, align 1, !tbaa !21
  %602 = zext i8 %601 to i16
  %603 = zext i16 %602 to i32
  %604 = shl i32 %603, 8
  %605 = trunc i32 %604 to i16
  %606 = zext i16 %605 to i32
  %607 = or i32 %598, %606
  %608 = trunc i32 %607 to i16
  store i16 %608, ptr %83, align 2, !tbaa !39
  %609 = load i16, ptr %65, align 2, !tbaa !39
  %610 = zext i16 %609 to i32
  %611 = load i32, ptr %80, align 4, !tbaa !9
  %612 = shl i32 %610, %611
  %613 = xor i32 %612, -1
  %614 = load i16, ptr %83, align 2, !tbaa !39
  %615 = zext i16 %614 to i32
  %616 = and i32 %615, %613
  %617 = trunc i32 %616 to i16
  store i16 %617, ptr %83, align 2, !tbaa !39
  %618 = load i16, ptr %66, align 2, !tbaa !39
  %619 = zext i16 %618 to i32
  %620 = load i32, ptr %80, align 4, !tbaa !9
  %621 = shl i32 %619, %620
  %622 = load i16, ptr %83, align 2, !tbaa !39
  %623 = zext i16 %622 to i32
  %624 = or i32 %623, %621
  %625 = trunc i32 %624 to i16
  store i16 %625, ptr %83, align 2, !tbaa !39
  %626 = load i16, ptr %83, align 2, !tbaa !39
  %627 = trunc i16 %626 to i8
  %628 = load ptr, ptr %82, align 8, !tbaa !5
  %629 = getelementptr inbounds i8, ptr %628, i64 0
  store i8 %627, ptr %629, align 1, !tbaa !21
  %630 = load i16, ptr %83, align 2, !tbaa !39
  %631 = zext i16 %630 to i32
  %632 = ashr i32 %631, 8
  %633 = trunc i32 %632 to i8
  %634 = load ptr, ptr %82, align 8, !tbaa !5
  %635 = getelementptr inbounds i8, ptr %634, i64 1
  store i8 %633, ptr %635, align 1, !tbaa !21
  %636 = load ptr, ptr %54, align 8, !tbaa !5
  %637 = getelementptr inbounds %"class.JPH::Vec3", ptr %636, i64 2
  store ptr %637, ptr %54, align 8, !tbaa !5
  %638 = load i32, ptr %55, align 4, !tbaa !9
  %639 = add i32 %638, 3
  store i32 %639, ptr %55, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 2, ptr %83) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %82) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %66) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #7
  br label %640

640:                                              ; preds = %588
  %641 = load i32, ptr %57, align 4, !tbaa !9
  %642 = add i32 %641, 1
  store i32 %642, ptr %57, align 4, !tbaa !9
  br label %361, !llvm.loop !45

643:                                              ; preds = %582, %563, %512, %452
  call void @llvm.lifetime.end.p0(i64 2, ptr %66) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  br label %657

644:                                              ; preds = %365
  %645 = getelementptr inbounds %"class.JPH::HeightFieldShape", ptr %84, i32 0, i32 4
  %646 = load i32, ptr %645, align 16, !tbaa !25
  %647 = sub i32 %646, 1
  %648 = load i32, ptr %16, align 4, !tbaa !9
  %649 = sub i32 %647, %648
  %650 = mul i32 3, %649
  %651 = load i32, ptr %55, align 4, !tbaa !9
  %652 = add i32 %651, %650
  store i32 %652, ptr %55, align 4, !tbaa !9
  br label %653

653:                                              ; preds = %644
  %654 = load i32, ptr %56, align 4, !tbaa !9
  %655 = add i32 %654, 1
  store i32 %655, ptr %56, align 4, !tbaa !9
  br label %355, !llvm.loop !46

656:                                              ; preds = %359
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  ret void

657:                                              ; preds = %643, %340
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %658

658:                                              ; preds = %657
  %659 = load ptr, ptr %38, align 8
  %660 = load i32, ptr %39, align 4
  %661 = insertvalue { ptr, i32 } poison, ptr %659, 0
  %662 = insertvalue { ptr, i32 } %661, i32 %660, 1
  resume { ptr, i32 } %662
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0EC2EOS6_"(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #4 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #5 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16)) #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double, double, double, double, double, double, float noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"_ZTSZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0", !6, i64 0, !6, i64 8, !10, i64 16}
!19 = !{!18, !10, i64 16}
!20 = !{i64 0, i64 16, !21}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!26, !10, i64 64}
!26 = !{!"_ZTSN3JPH16HeightFieldShapeE", !27, i64 0, !33, i64 32, !33, i64 48, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !7, i64 84, !7, i64 85, !34, i64 86, !34, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !35, i64 120, !36, i64 144, !10, i64 168}
!27 = !{!"_ZTSN3JPH5ShapeE", !28, i64 8, !12, i64 16, !31, i64 24, !32, i64 25}
!28 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !29, i64 0}
!29 = !{!"_ZTSSt6atomicIjE", !30, i64 0}
!30 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!31 = !{!"_ZTSN3JPH10EShapeTypeE", !7, i64 0}
!32 = !{!"_ZTSN3JPH13EShapeSubTypeE", !7, i64 0}
!33 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!34 = !{!"short", !7, i64 0}
!35 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !12, i64 0, !12, i64 8, !6, i64 16}
!36 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !12, i64 0, !12, i64 8, !6, i64 16}
!37 = !{!38, !38, i64 0}
!38 = !{!"bool", !7, i64 0}
!39 = !{!34, !34, i64 0}
!40 = !{i8 0, i8 2}
!41 = !{}
!42 = !{!26, !10, i64 80}
!43 = !{i64 2158398994}
!44 = !{!26, !6, i64 112}
!45 = distinct !{!45, !23}
!46 = distinct !{!46, !23}


; 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.JPH::ScopeExit" = type { %class.anon.13, i8, [7 x i8] }
%class.anon.13 = type <{ ptr, ptr, i32, [4 x i8] }>
%"class.JPH::Vec3" = type { %union.anon.3 }
%union.anon.3 = type { <4 x float> }

@.str.2 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorE(ptr noundef nonnull align 16 dereferenceable(176) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr nocapture noundef readonly %5, i32 noundef %6, i32 noundef %7, i64 noundef %8, float noundef %9, float noundef %10, ptr noundef nonnull align 8 dereferenceable(8) %11) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %13 = alloca %"class.JPH::ScopeExit", align 8
  %14 = alloca %class.anon.13, align 8
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = shl i32 %3, 1
  %25 = shl i32 %4, 4
  %26 = mul i32 %25, %24
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %29 = load ptr, ptr %28, align 8
  %30 = tail call noundef ptr %29(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %26)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  store ptr %11, ptr %14, align 8, !tbaa !8
  %31 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr %30, ptr %31, align 8, !tbaa !11
  %32 = getelementptr inbounds i8, ptr %14, i64 16
  store i32 %26, ptr %32, align 8, !tbaa !14
  call void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0EC2EOS6_"(ptr noundef nonnull align 8 dereferenceable(25) %13, ptr noundef nonnull align 8 dereferenceable(20) %14)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge282, label %.preheader224.lr.ph

.preheader224.lr.ph:                              ; preds = %12
  %.not295 = icmp eq i32 %3, 0
  %33 = sub i32 %2, %7
  %34 = sub i32 %1, %6
  %35 = getelementptr inbounds i8, ptr %0, i64 48
  %.sroa.287.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  %36 = getelementptr inbounds i8, ptr %17, i64 8
  %.sroa.278.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  %37 = getelementptr inbounds i8, ptr %20, i64 8
  br i1 %.not295, label %._crit_edge282, label %.preheader224.us.preheader

.preheader224.us.preheader:                       ; preds = %.preheader224.lr.ph
  %wide.trip.count306 = zext i32 %4 to i64
  %wide.trip.count = zext i32 %3 to i64
  br label %.preheader224.us

.preheader224.us:                                 ; preds = %.preheader224.us.preheader, %._crit_edge.us
  %indvars.iv303 = phi i64 [ 0, %.preheader224.us.preheader ], [ %indvars.iv.next304, %._crit_edge.us ]
  %.0246.us = phi ptr [ %30, %.preheader224.us.preheader ], [ %122, %._crit_edge.us ]
  %38 = trunc nuw i64 %indvars.iv303 to i32
  %39 = add i32 %33, %38
  %40 = zext i32 %39 to i64
  %41 = mul nsw i64 %40, %8
  %42 = getelementptr inbounds float, ptr %5, i64 %41
  br label %43

43:                                               ; preds = %.preheader224.us, %121
  %indvars.iv = phi i64 [ 0, %.preheader224.us ], [ %indvars.iv.next, %121 ]
  %.1244.us = phi ptr [ %.0246.us, %.preheader224.us ], [ %122, %121 ]
  %44 = trunc nuw i64 %indvars.iv to i32
  %45 = add i32 %34, %44
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds float, ptr %42, i64 %46
  %48 = load float, ptr %47, align 4, !tbaa !15
  %49 = getelementptr float, ptr %47, i64 %8
  %50 = getelementptr i8, ptr %49, i64 4
  %51 = load float, ptr %50, align 4, !tbaa !15
  %52 = fcmp une float %48, 0x47EFFFFFE0000000
  %53 = fcmp une float %51, 0x47EFFFFFE0000000
  %or.cond.us = select i1 %52, i1 %53, i1 false
  br i1 %or.cond.us, label %64, label %54

54:                                               ; preds = %43
  %55 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %56 unwind label %.split.us

56:                                               ; preds = %54
  %57 = extractvalue { double, double } %55, 0
  %58 = extractvalue { double, double } %55, 1
  store double %57, ptr %.1244.us, align 16
  %.sroa.574.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1244.us, i64 8
  store double %58, ptr %.sroa.574.0..sroa_idx.us, align 8, !tbaa !17
  %59 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %60 unwind label %.split249.us

60:                                               ; preds = %56
  %61 = extractvalue { double, double } %59, 0
  %62 = extractvalue { double, double } %59, 1
  %63 = getelementptr inbounds i8, ptr %.1244.us, i64 16
  store double %61, ptr %63, align 16
  %.sroa.5.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1244.us, i64 24
  store double %62, ptr %.sroa.5.0..sroa_idx.us, align 8, !tbaa !17
  br label %121

64:                                               ; preds = %43
  %65 = load float, ptr %49, align 4, !tbaa !15
  %66 = fcmp une float %65, 0x47EFFFFFE0000000
  br i1 %66, label %72, label %67

67:                                               ; preds = %64
  %68 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %69 unwind label %.split252.us

69:                                               ; preds = %67
  %70 = extractvalue { double, double } %68, 0
  %71 = extractvalue { double, double } %68, 1
  store double %70, ptr %.1244.us, align 16
  %.sroa.585.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1244.us, i64 8
  store double %71, ptr %.sroa.585.0..sroa_idx.us, align 8, !tbaa !17
  br label %91

72:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  %73 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
          to label %74 unwind label %.split255.us

74:                                               ; preds = %72
  %75 = fsub float %51, %65
  %76 = fmul float %75, %9
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %73, float noundef %76, float noundef 0.000000e+00)
          to label %77 unwind label %.split255.us

77:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #6
  %78 = fsub float %48, %65
  %79 = fmul float %78, %9
  %80 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  %81 = fneg float %80
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %16, float noundef 0.000000e+00, float noundef %79, float noundef %81)
          to label %82 unwind label %.split258.us

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #6
  %.sroa.086.0.copyload.us = load double, ptr %16, align 16
  %.sroa.287.0.copyload.us = load double, ptr %.sroa.287.0..sroa_idx, align 8, !tbaa !17
  %83 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %.sroa.086.0.copyload.us, double %.sroa.287.0.copyload.us)
          to label %84 unwind label %.split261.us

84:                                               ; preds = %82
  %85 = extractvalue { double, double } %83, 0
  store double %85, ptr %17, align 16
  %86 = extractvalue { double, double } %83, 1
  store double %86, ptr %36, align 8
  %87 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %17)
          to label %88 unwind label %.split261.us

88:                                               ; preds = %84
  %89 = extractvalue { double, double } %87, 0
  %90 = extractvalue { double, double } %87, 1
  store double %89, ptr %.1244.us, align 16
  %.sroa.589.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1244.us, i64 8
  store double %90, ptr %.sroa.589.0..sroa_idx.us, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  br label %91

91:                                               ; preds = %88, %69
  %92 = getelementptr inbounds i8, ptr %47, i64 4
  %93 = load float, ptr %92, align 4, !tbaa !15
  %94 = fcmp une float %93, 0x47EFFFFFE0000000
  br i1 %94, label %101, label %95

95:                                               ; preds = %91
  %96 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %97 unwind label %.split264.us

97:                                               ; preds = %95
  %98 = extractvalue { double, double } %96, 0
  %99 = extractvalue { double, double } %96, 1
  %100 = getelementptr inbounds i8, ptr %.1244.us, i64 16
  store double %98, ptr %100, align 16
  %.sroa.576.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1244.us, i64 24
  store double %99, ptr %.sroa.576.0..sroa_idx.us, align 8, !tbaa !17
  br label %121

101:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #6
  %102 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
          to label %103 unwind label %.split267.us

103:                                              ; preds = %101
  %104 = fneg float %102
  %105 = fsub float %48, %93
  %106 = fmul float %105, %9
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %18, float noundef %104, float noundef %106, float noundef 0.000000e+00)
          to label %107 unwind label %.split267.us

107:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #6
  %108 = fsub float %51, %93
  %109 = fmul float %108, %9
  %110 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %35)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %19, float noundef 0.000000e+00, float noundef %109, float noundef %110)
          to label %111 unwind label %.split270.us

111:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #6
  %.sroa.077.0.copyload.us = load double, ptr %19, align 16
  %.sroa.278.0.copyload.us = load double, ptr %.sroa.278.0..sroa_idx, align 8, !tbaa !17
  %112 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %.sroa.077.0.copyload.us, double %.sroa.278.0.copyload.us)
          to label %113 unwind label %.split273.us

113:                                              ; preds = %111
  %114 = extractvalue { double, double } %112, 0
  store double %114, ptr %20, align 16
  %115 = extractvalue { double, double } %112, 1
  store double %115, ptr %37, align 8
  %116 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %20)
          to label %117 unwind label %.split273.us

117:                                              ; preds = %113
  %118 = extractvalue { double, double } %116, 0
  %119 = extractvalue { double, double } %116, 1
  %120 = getelementptr inbounds i8, ptr %.1244.us, i64 16
  store double %118, ptr %120, align 16
  %.sroa.580.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1244.us, i64 24
  store double %119, ptr %.sroa.580.0..sroa_idx.us, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  br label %121

121:                                              ; preds = %117, %97, %60
  %122 = getelementptr inbounds i8, ptr %.1244.us, i64 32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %43, !llvm.loop !18

._crit_edge.us:                                   ; preds = %121
  %indvars.iv.next304 = add nuw nsw i64 %indvars.iv303, 1
  %exitcond307.not = icmp eq i64 %indvars.iv.next304, %wide.trip.count306
  br i1 %exitcond307.not, label %._crit_edge247, label %.preheader224.us, !llvm.loop !20

.split.us:                                        ; preds = %54
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %.split293.us

.split249.us:                                     ; preds = %56
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %.split293.us

.split252.us:                                     ; preds = %67
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %.split293.us

.split255.us:                                     ; preds = %74, %72
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %295

.split258.us:                                     ; preds = %77
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %294

.split261.us:                                     ; preds = %84, %82
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  br label %294

.split264.us:                                     ; preds = %95
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %.split293.us

.split267.us:                                     ; preds = %103, %101
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %297

.split270.us:                                     ; preds = %107
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %296

.split273.us:                                     ; preds = %113, %111
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  br label %296

._crit_edge247:                                   ; preds = %._crit_edge.us
  %133 = getelementptr inbounds i8, ptr %0, i64 64
  br i1 %.not, label %._crit_edge282, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge247
  %134 = sub i32 %2, %7
  %135 = sub i32 %1, %6
  %136 = getelementptr inbounds i8, ptr %0, i64 48
  %.sroa.223.0..sroa_idx = getelementptr inbounds i8, ptr %21, i64 8
  %137 = or disjoint i32 %24, 1
  %138 = zext i32 %137 to i64
  %.sroa.217.0..sroa_idx = getelementptr inbounds i8, ptr %22, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %23, i64 8
  %139 = getelementptr inbounds i8, ptr %0, i64 80
  %140 = getelementptr inbounds i8, ptr %0, i64 112
  %141 = xor i32 %3, -1
  %142 = add i32 %4, -1
  %143 = load i32, ptr %133, align 16, !tbaa !21
  %144 = add i32 %143, -1
  %145 = mul i32 %144, %2
  %146 = add i32 %145, %1
  %147 = mul i32 %146, 3
  %148 = zext i32 %142 to i64
  %wide.trip.count326 = zext i32 %4 to i64
  %wide.trip.count311 = zext i32 %3 to i64
  %149 = zext i32 %135 to i64
  %exitcond312.peel.not = icmp eq i32 %3, 1
  br label %150

150:                                              ; preds = %._crit_edge.us283, %.preheader.lr.ph
  %indvars.iv323 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next324, %._crit_edge.us283 ]
  %.0176281.us = phi ptr [ %30, %.preheader.lr.ph ], [ %.lcssa300, %._crit_edge.us283 ]
  %.0178280.us = phi i32 [ %147, %.preheader.lr.ph ], [ %293, %._crit_edge.us283 ]
  %151 = trunc nuw i64 %indvars.iv323 to i32
  %152 = add i32 %134, %151
  %153 = zext i32 %152 to i64
  %154 = mul nsw i64 %153, %8
  %155 = getelementptr inbounds float, ptr %5, i64 %154
  %156 = icmp eq i64 %indvars.iv323, %148
  %157 = getelementptr inbounds float, ptr %155, i64 %149
  %158 = load float, ptr %157, align 4, !tbaa !15
  %159 = getelementptr inbounds float, ptr %157, i64 %8
  %160 = load float, ptr %159, align 4, !tbaa !15
  %161 = getelementptr i8, ptr %159, i64 4
  %162 = load float, ptr %161, align 4, !tbaa !15
  %163 = fcmp oeq float %158, 0x47EFFFFFE0000000
  %164 = fcmp oeq float %162, 0x47EFFFFFE0000000
  br i1 %156, label %176, label %165

165:                                              ; preds = %150
  %166 = fcmp oeq float %160, 0x47EFFFFFE0000000
  %brmerge217.us.peel = select i1 %166, i1 true, i1 %164
  br i1 %brmerge217.us.peel, label %176, label %167

167:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #6
  %168 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %136)
          to label %169 unwind label %.split287.us.loopexit.split-lp

169:                                              ; preds = %167
  %170 = fsub float %162, %160
  %171 = fmul float %170, %9
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %22, float noundef %168, float noundef %171, float noundef 0.000000e+00)
          to label %172 unwind label %.split287.us.loopexit.split-lp

172:                                              ; preds = %169
  %.sroa.020.0.copyload.us.peel = load double, ptr %.0176281.us, align 16
  %.sroa.221.0..sroa_idx.us.peel = getelementptr inbounds i8, ptr %.0176281.us, i64 8
  %.sroa.221.0.copyload.us.peel = load double, ptr %.sroa.221.0..sroa_idx.us.peel, align 8, !tbaa !17
  %173 = getelementptr inbounds %"class.JPH::Vec3", ptr %.0176281.us, i64 %138
  %.sroa.018.0.copyload.us.peel = load double, ptr %173, align 16
  %.sroa.219.0..sroa_idx.us.peel = getelementptr inbounds i8, ptr %173, i64 8
  %.sroa.219.0.copyload.us.peel = load double, ptr %.sroa.219.0..sroa_idx.us.peel, align 8, !tbaa !17
  %.sroa.016.0.copyload.us.peel = load double, ptr %22, align 16
  %.sroa.217.0.copyload.us.peel = load double, ptr %.sroa.217.0..sroa_idx, align 8, !tbaa !17
  %174 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %.sroa.020.0.copyload.us.peel, double %.sroa.221.0.copyload.us.peel, double %.sroa.018.0.copyload.us.peel, double %.sroa.219.0.copyload.us.peel, double %.sroa.016.0.copyload.us.peel, double %.sroa.217.0.copyload.us.peel, float noundef %10)
          to label %175 unwind label %.split287.us.loopexit.split-lp

175:                                              ; preds = %172
  %spec.select218.us.peel = select i1 %174, i16 2, i16 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  br label %176

176:                                              ; preds = %150, %175, %165
  %.3187.us.peel = phi i16 [ %spec.select218.us.peel, %175 ], [ 0, %165 ], [ 0, %150 ]
  %.1183.us.peel = phi i32 [ 6, %175 ], [ 6, %165 ], [ 4, %150 ]
  %brmerge221.us.peel = select i1 %163, i1 true, i1 %164
  br i1 %brmerge221.us.peel, label %190, label %177

177:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #6
  %178 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %136)
          to label %179 unwind label %.split290.us.loopexit.split-lp

179:                                              ; preds = %177
  %180 = fneg float %178
  %181 = fsub float %158, %162
  %182 = fmul float %181, %9
  %183 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %136)
  %184 = fneg float %183
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %23, float noundef %180, float noundef %182, float noundef %184)
          to label %185 unwind label %.split290.us.loopexit.split-lp

185:                                              ; preds = %179
  %.sroa.014.0.copyload.us.peel = load double, ptr %.0176281.us, align 16
  %.sroa.215.0..sroa_idx.us.peel = getelementptr inbounds i8, ptr %.0176281.us, i64 8
  %.sroa.215.0.copyload.us.peel = load double, ptr %.sroa.215.0..sroa_idx.us.peel, align 8, !tbaa !17
  %186 = getelementptr inbounds i8, ptr %.0176281.us, i64 16
  %.sroa.012.0.copyload.us.peel = load double, ptr %186, align 16
  %.sroa.213.0..sroa_idx.us.peel = getelementptr inbounds i8, ptr %.0176281.us, i64 24
  %.sroa.213.0.copyload.us.peel = load double, ptr %.sroa.213.0..sroa_idx.us.peel, align 8, !tbaa !17
  %.sroa.0.0.copyload.us.peel = load double, ptr %23, align 16
  %.sroa.2.0.copyload.us.peel = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !17
  %187 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %.sroa.014.0.copyload.us.peel, double %.sroa.215.0.copyload.us.peel, double %.sroa.012.0.copyload.us.peel, double %.sroa.213.0.copyload.us.peel, double %.sroa.0.0.copyload.us.peel, double %.sroa.2.0.copyload.us.peel, float noundef %10)
          to label %188 unwind label %.split290.us.loopexit.split-lp

188:                                              ; preds = %185
  %189 = or disjoint i16 %.3187.us.peel, 4
  %spec.select222.us.peel = select i1 %187, i16 %189, i16 %.3187.us.peel
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #6
  br label %190

190:                                              ; preds = %188, %176
  %.5189.us.peel = phi i16 [ %spec.select222.us.peel, %188 ], [ %.3187.us.peel, %176 ]
  %191 = lshr i32 %.0178280.us, 3
  %192 = and i32 %.0178280.us, 7
  %193 = load i32, ptr %139, align 16, !tbaa !34
  %194 = icmp ult i32 %191, %193
  br i1 %194, label %199, label %195

195:                                              ; preds = %190
  %196 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 303)
          to label %197 unwind label %.split293.us.loopexit.split-lp

197:                                              ; preds = %195
  br i1 %196, label %198, label %199

198:                                              ; preds = %197
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !35
  br label %199

199:                                              ; preds = %198, %197, %190
  %200 = load ptr, ptr %140, align 16, !tbaa !36
  %201 = zext nneg i32 %191 to i64
  %202 = getelementptr inbounds i8, ptr %200, i64 %201
  %203 = load i16, ptr %202, align 1
  %204 = zext i16 %203 to i32
  %205 = getelementptr inbounds i8, ptr %202, i64 1
  %206 = shl nuw nsw i32 %.1183.us.peel, %192
  %207 = xor i32 %206, -1
  %208 = and i32 %204, %207
  %209 = zext nneg i16 %.5189.us.peel to i32
  %210 = shl nuw nsw i32 %209, %192
  %211 = or i32 %208, %210
  %212 = trunc i32 %211 to i8
  store i8 %212, ptr %202, align 1, !tbaa !17
  %213 = lshr i32 %211, 8
  %214 = trunc nuw i32 %213 to i8
  store i8 %214, ptr %205, align 1, !tbaa !17
  %215 = getelementptr inbounds i8, ptr %.0176281.us, i64 32
  %216 = add i32 %.0178280.us, 3
  br i1 %exitcond312.peel.not, label %._crit_edge.us283, label %.peel.next

.peel.next:                                       ; preds = %199, %272
  %indvars.iv308 = phi i64 [ %indvars.iv.next309, %272 ], [ 1, %199 ]
  %.1177277.us = phi ptr [ %288, %272 ], [ %215, %199 ]
  %.1179276.us = phi i32 [ %289, %272 ], [ %216, %199 ]
  %217 = trunc nuw i64 %indvars.iv308 to i32
  %218 = add i32 %135, %217
  %219 = zext i32 %218 to i64
  %220 = getelementptr inbounds float, ptr %155, i64 %219
  %221 = load float, ptr %220, align 4, !tbaa !15
  %222 = getelementptr inbounds float, ptr %220, i64 %8
  %223 = load float, ptr %222, align 4, !tbaa !15
  %224 = getelementptr i8, ptr %222, i64 4
  %225 = load float, ptr %224, align 4, !tbaa !15
  %226 = fcmp oeq float %221, 0x47EFFFFFE0000000
  %227 = fcmp oeq float %223, 0x47EFFFFFE0000000
  %228 = fcmp oeq float %225, 0x47EFFFFFE0000000
  %brmerge214.us = select i1 %226, i1 true, i1 %227
  br i1 %brmerge214.us, label %237, label %229

229:                                              ; preds = %.peel.next
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #6
  %230 = fsub float %223, %221
  %231 = fmul float %230, %9
  %232 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %136)
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %21, float noundef 0.000000e+00, float noundef %231, float noundef %232)
          to label %233 unwind label %.split.us285

233:                                              ; preds = %229
  %.sroa.026.0.copyload.us = load double, ptr %.1177277.us, align 16
  %.sroa.227.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1177277.us, i64 8
  %.sroa.227.0.copyload.us = load double, ptr %.sroa.227.0..sroa_idx.us, align 8, !tbaa !17
  %234 = getelementptr inbounds i8, ptr %.1177277.us, i64 -16
  %.sroa.024.0.copyload.us = load double, ptr %234, align 16
  %.sroa.225.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1177277.us, i64 -8
  %.sroa.225.0.copyload.us = load double, ptr %.sroa.225.0..sroa_idx.us, align 8, !tbaa !17
  %.sroa.022.0.copyload.us = load double, ptr %21, align 16
  %.sroa.223.0.copyload.us = load double, ptr %.sroa.223.0..sroa_idx, align 8, !tbaa !17
  %235 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %.sroa.026.0.copyload.us, double %.sroa.227.0.copyload.us, double %.sroa.024.0.copyload.us, double %.sroa.225.0.copyload.us, double %.sroa.022.0.copyload.us, double %.sroa.223.0.copyload.us, float noundef %10)
          to label %236 unwind label %.split.us285

236:                                              ; preds = %233
  %spec.select.us = zext i1 %235 to i16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  br label %237

237:                                              ; preds = %236, %.peel.next
  %.1185.us = phi i16 [ %spec.select.us, %236 ], [ 0, %.peel.next ]
  br i1 %156, label %249, label %238

238:                                              ; preds = %237
  %brmerge217.us = select i1 %227, i1 true, i1 %228
  br i1 %brmerge217.us, label %249, label %239

239:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #6
  %240 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %136)
          to label %241 unwind label %.split287.us.loopexit

241:                                              ; preds = %239
  %242 = fsub float %225, %223
  %243 = fmul float %242, %9
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %22, float noundef %240, float noundef %243, float noundef 0.000000e+00)
          to label %244 unwind label %.split287.us.loopexit

244:                                              ; preds = %241
  %.sroa.020.0.copyload.us = load double, ptr %.1177277.us, align 16
  %.sroa.221.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1177277.us, i64 8
  %.sroa.221.0.copyload.us = load double, ptr %.sroa.221.0..sroa_idx.us, align 8, !tbaa !17
  %245 = getelementptr inbounds %"class.JPH::Vec3", ptr %.1177277.us, i64 %138
  %.sroa.018.0.copyload.us = load double, ptr %245, align 16
  %.sroa.219.0..sroa_idx.us = getelementptr inbounds i8, ptr %245, i64 8
  %.sroa.219.0.copyload.us = load double, ptr %.sroa.219.0..sroa_idx.us, align 8, !tbaa !17
  %.sroa.016.0.copyload.us = load double, ptr %22, align 16
  %.sroa.217.0.copyload.us = load double, ptr %.sroa.217.0..sroa_idx, align 8, !tbaa !17
  %246 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %.sroa.020.0.copyload.us, double %.sroa.221.0.copyload.us, double %.sroa.018.0.copyload.us, double %.sroa.219.0.copyload.us, double %.sroa.016.0.copyload.us, double %.sroa.217.0.copyload.us, float noundef %10)
          to label %247 unwind label %.split287.us.loopexit

247:                                              ; preds = %244
  %248 = or disjoint i16 %.1185.us, 2
  %spec.select218.us = select i1 %246, i16 %248, i16 %.1185.us
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  br label %249

249:                                              ; preds = %237, %247, %238
  %.3187.us = phi i16 [ %spec.select218.us, %247 ], [ %.1185.us, %238 ], [ %.1185.us, %237 ]
  %.1183.us = phi i32 [ 7, %247 ], [ 7, %238 ], [ 5, %237 ]
  %brmerge221.us = select i1 %226, i1 true, i1 %228
  br i1 %brmerge221.us, label %263, label %250

250:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #6
  %251 = invoke noundef float @_ZNK3JPH4Vec34GetXEv(ptr noundef nonnull align 16 dereferenceable(16) %136)
          to label %252 unwind label %.split290.us.loopexit

252:                                              ; preds = %250
  %253 = fneg float %251
  %254 = fsub float %221, %225
  %255 = fmul float %254, %9
  %256 = call noundef float @_ZNK3JPH4Vec34GetZEv(ptr noundef nonnull align 16 dereferenceable(16) %136)
  %257 = fneg float %256
  invoke void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16) %23, float noundef %253, float noundef %255, float noundef %257)
          to label %258 unwind label %.split290.us.loopexit

258:                                              ; preds = %252
  %.sroa.014.0.copyload.us = load double, ptr %.1177277.us, align 16
  %.sroa.215.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1177277.us, i64 8
  %.sroa.215.0.copyload.us = load double, ptr %.sroa.215.0..sroa_idx.us, align 8, !tbaa !17
  %259 = getelementptr inbounds i8, ptr %.1177277.us, i64 16
  %.sroa.012.0.copyload.us = load double, ptr %259, align 16
  %.sroa.213.0..sroa_idx.us = getelementptr inbounds i8, ptr %.1177277.us, i64 24
  %.sroa.213.0.copyload.us = load double, ptr %.sroa.213.0..sroa_idx.us, align 8, !tbaa !17
  %.sroa.0.0.copyload.us = load double, ptr %23, align 16
  %.sroa.2.0.copyload.us = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !17
  %260 = invoke noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double %.sroa.014.0.copyload.us, double %.sroa.215.0.copyload.us, double %.sroa.012.0.copyload.us, double %.sroa.213.0.copyload.us, double %.sroa.0.0.copyload.us, double %.sroa.2.0.copyload.us, float noundef %10)
          to label %261 unwind label %.split290.us.loopexit

261:                                              ; preds = %258
  %262 = or i16 %.3187.us, 4
  %spec.select222.us = select i1 %260, i16 %262, i16 %.3187.us
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #6
  br label %263

263:                                              ; preds = %261, %249
  %.5189.us = phi i16 [ %spec.select222.us, %261 ], [ %.3187.us, %249 ]
  %264 = lshr i32 %.1179276.us, 3
  %265 = and i32 %.1179276.us, 7
  %266 = load i32, ptr %139, align 16, !tbaa !34
  %267 = icmp ult i32 %264, %266
  br i1 %267, label %272, label %268

268:                                              ; preds = %263
  %269 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 303)
          to label %270 unwind label %.split293.us.loopexit

270:                                              ; preds = %268
  br i1 %269, label %271, label %272

271:                                              ; preds = %270
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !35
  br label %272

272:                                              ; preds = %271, %270, %263
  %273 = load ptr, ptr %140, align 16, !tbaa !36
  %274 = zext nneg i32 %264 to i64
  %275 = getelementptr inbounds i8, ptr %273, i64 %274
  %276 = load i16, ptr %275, align 1
  %277 = zext i16 %276 to i32
  %278 = getelementptr inbounds i8, ptr %275, i64 1
  %279 = shl nuw nsw i32 %.1183.us, %265
  %280 = xor i32 %279, -1
  %281 = and i32 %277, %280
  %282 = zext nneg i16 %.5189.us to i32
  %283 = shl nuw nsw i32 %282, %265
  %284 = or i32 %281, %283
  %285 = trunc i32 %284 to i8
  store i8 %285, ptr %275, align 1, !tbaa !17
  %286 = lshr i32 %284, 8
  %287 = trunc nuw i32 %286 to i8
  store i8 %287, ptr %278, align 1, !tbaa !17
  %288 = getelementptr inbounds i8, ptr %.1177277.us, i64 32
  %289 = add i32 %.1179276.us, 3
  %indvars.iv.next309 = add nuw nsw i64 %indvars.iv308, 1
  %exitcond312.not = icmp eq i64 %indvars.iv.next309, %wide.trip.count311
  br i1 %exitcond312.not, label %._crit_edge.us283, label %.peel.next, !llvm.loop !37

._crit_edge.us283:                                ; preds = %272, %199
  %.lcssa300 = phi ptr [ %215, %199 ], [ %288, %272 ]
  %.lcssa = phi i32 [ %216, %199 ], [ %289, %272 ]
  %290 = load i32, ptr %133, align 16, !tbaa !21
  %291 = add i32 %290, %141
  %292 = mul i32 %291, 3
  %293 = add i32 %292, %.lcssa
  %indvars.iv.next324 = add nuw nsw i64 %indvars.iv323, 1
  %exitcond327.not = icmp eq i64 %indvars.iv.next324, %wide.trip.count326
  br i1 %exitcond327.not, label %._crit_edge282, label %150, !llvm.loop !39

.split.us285:                                     ; preds = %233, %229
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  br label %.split293.us

.split287.us.loopexit:                            ; preds = %239, %241, %244
  %lpad.loopexit314 = landingpad { ptr, i32 }
          cleanup
  br label %.split287.us

.split287.us.loopexit.split-lp:                   ; preds = %167, %169, %172
  %lpad.loopexit.split-lp315 = landingpad { ptr, i32 }
          cleanup
  br label %.split287.us

.split287.us:                                     ; preds = %.split287.us.loopexit.split-lp, %.split287.us.loopexit
  %lpad.phi316 = phi { ptr, i32 } [ %lpad.loopexit314, %.split287.us.loopexit ], [ %lpad.loopexit.split-lp315, %.split287.us.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  br label %.split293.us

.split290.us.loopexit:                            ; preds = %250, %252, %258
  %lpad.loopexit317 = landingpad { ptr, i32 }
          cleanup
  br label %.split290.us

.split290.us.loopexit.split-lp:                   ; preds = %177, %179, %185
  %lpad.loopexit.split-lp318 = landingpad { ptr, i32 }
          cleanup
  br label %.split290.us

.split290.us:                                     ; preds = %.split290.us.loopexit.split-lp, %.split290.us.loopexit
  %lpad.phi319 = phi { ptr, i32 } [ %lpad.loopexit317, %.split290.us.loopexit ], [ %lpad.loopexit.split-lp318, %.split290.us.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #6
  br label %.split293.us

.split293.us.loopexit:                            ; preds = %268
  %lpad.loopexit320 = landingpad { ptr, i32 }
          cleanup
  br label %.split293.us

.split293.us.loopexit.split-lp:                   ; preds = %195
  %lpad.loopexit.split-lp321 = landingpad { ptr, i32 }
          cleanup
  br label %.split293.us

294:                                              ; preds = %.split261.us, %.split258.us
  %.pn203 = phi { ptr, i32 } [ %128, %.split261.us ], [ %127, %.split258.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  br label %295

295:                                              ; preds = %294, %.split255.us
  %.pn203.pn = phi { ptr, i32 } [ %.pn203, %294 ], [ %126, %.split255.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  br label %.split293.us

296:                                              ; preds = %.split273.us, %.split270.us
  %.pn206 = phi { ptr, i32 } [ %132, %.split273.us ], [ %131, %.split270.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  br label %297

297:                                              ; preds = %296, %.split267.us
  %.pn206.pn = phi { ptr, i32 } [ %.pn206, %296 ], [ %130, %.split267.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  br label %.split293.us

._crit_edge282:                                   ; preds = %._crit_edge.us283, %.preheader224.lr.ph, %12, %._crit_edge247
  call void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  ret void

.split293.us:                                     ; preds = %.split293.us.loopexit, %.split293.us.loopexit.split-lp, %.split.us285, %.split287.us, %.split290.us, %.split.us, %.split249.us, %297, %.split264.us, %.split252.us, %295
  %.pn206.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %124, %.split249.us ], [ %123, %.split.us ], [ %.pn203.pn, %295 ], [ %125, %.split252.us ], [ %.pn206.pn, %297 ], [ %129, %.split264.us ], [ %lpad.phi319, %.split290.us ], [ %lpad.phi316, %.split287.us ], [ %lpad.loopexit, %.split.us285 ], [ %lpad.loopexit320, %.split293.us.loopexit ], [ %lpad.loopexit.split-lp321, %.split293.us.loopexit.split-lp ]
  call void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25) %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  resume { ptr, i32 } %.pn206.pn.pn.pn.pn.pn
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0EC2EOS6_"(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #3 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH4Vec3C2Efff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef) unnamed_addr #4 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN3JPH11ActiveEdgesL12IsEdgeActiveENS_4Vec3ES1_S1_f(double, double, double, double, double, double, float noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare hidden void @"_ZN3JPH9ScopeExitIZNS_16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0ED2Ev"(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !9, i64 8}
!12 = !{!"_ZTSZN3JPH16HeightFieldShape20CalculateActiveEdgesEjjjjPKfjjlffRNS_13TempAllocatorEE3$_0", !9, i64 0, !9, i64 8, !13, i64 16}
!13 = !{!"int", !10, i64 0}
!14 = !{!12, !13, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !10, i64 0}
!17 = !{!10, !10, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !13, i64 64}
!22 = !{!"_ZTSN3JPH16HeightFieldShapeE", !23, i64 0, !30, i64 32, !30, i64 48, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !10, i64 84, !10, i64 85, !31, i64 86, !31, i64 88, !9, i64 96, !9, i64 104, !9, i64 112, !32, i64 120, !33, i64 144, !13, i64 168}
!23 = !{!"_ZTSN3JPH5ShapeE", !24, i64 8, !27, i64 16, !28, i64 24, !29, i64 25}
!24 = !{!"_ZTSN3JPH9RefTargetINS_5ShapeEEE", !25, i64 0}
!25 = !{!"_ZTSSt6atomicIjE", !26, i64 0}
!26 = !{!"_ZTSSt13__atomic_baseIjE", !13, i64 0}
!27 = !{!"long", !10, i64 0}
!28 = !{!"_ZTSN3JPH10EShapeTypeE", !10, i64 0}
!29 = !{!"_ZTSN3JPH13EShapeSubTypeE", !10, i64 0}
!30 = !{!"_ZTSN3JPH4Vec3E", !10, i64 0}
!31 = !{!"short", !10, i64 0}
!32 = !{!"_ZTSN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEE", !27, i64 0, !27, i64 8, !9, i64 16}
!33 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !27, i64 0, !27, i64 8, !9, i64 16}
!34 = !{!22, !13, i64 80}
!35 = !{i64 2158398994}
!36 = !{!22, !9, i64 112}
!37 = distinct !{!37, !19, !38}
!38 = !{!"llvm.loop.peeled.count", i32 1}
!39 = distinct !{!39, !19}


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