; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics (LargeIslandSplitter)

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

%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::Array.13" = type { i64, i64, ptr }
%"class.JPH::STLAllocator.14" = type { i8 }
%"class.JPH::LargeIslandSplitter" = type <{ i32, [4 x i8], ptr, ptr, ptr, i32, %"struct.std::atomic.0", i32, [4 x i8], ptr, %"struct.std::atomic.0", [4 x i8] }>
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i32 }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::LargeIslandSplitter::Splits" = type <{ [32 x %"struct.JPH::LargeIslandSplitter::Split"], i32, i32, i32, i32, i32, [4 x i8], %"struct.std::atomic", %"struct.std::atomic.0", [4 x i8] }>
%"struct.JPH::LargeIslandSplitter::Split" = type { i32, i32, i32, i32 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }

@.str.1 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt13__atomic_baseIjE9fetch_addEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) #2 align 2

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

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122)) #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH19LargeIslandSplitter11SplitIslandEjRKNS_13IslandBuilderERKNS_11BodyManagerERKNS_24ContactConstraintManagerEPPNS_10ConstraintERNS_20CalculateSolverStepsE(ptr noundef nonnull align 8 dereferenceable(60) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(112) %2, ptr noundef nonnull align 8 dereferenceable(297) %3, ptr noundef nonnull align 8 dereferenceable(248) %4, ptr noundef %5, ptr noundef nonnull align 8 dereferenceable(18) %6) #4 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca i1, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca [32 x i32], align 16
  %29 = alloca [32 x i32], align 16
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca i32, align 4
  %42 = alloca [32 x i32], align 16
  %43 = alloca i32, align 4
  %44 = alloca %"struct.JPH::AssertLastParam", align 1
  %45 = alloca ptr, align 8
  %46 = alloca [32 x ptr], align 16
  %47 = alloca [32 x ptr], align 16
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca ptr, align 8
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca ptr, align 8
  %57 = alloca %"struct.JPH::AssertLastParam", align 1
  %58 = alloca %"struct.JPH::AssertLastParam", align 1
  %59 = alloca i32, align 4
  %60 = alloca %"class.JPH::Array.13", align 8
  %61 = alloca i8, align 1
  %62 = alloca %"class.JPH::STLAllocator.14", align 1
  %63 = alloca i32, align 4
  %64 = alloca i32, align 4
  %65 = alloca ptr, align 8
  %66 = alloca i32, align 4
  %67 = alloca ptr, align 8
  %68 = alloca ptr, align 8
  %69 = alloca ptr, align 8
  %70 = alloca i32, align 4
  %71 = alloca %"struct.JPH::AssertLastParam", align 1
  %72 = alloca i32, align 4
  %73 = alloca %"struct.JPH::AssertLastParam", align 1
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %74 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = call noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %75, i32 noundef %76, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  %78 = load ptr, ptr %17, align 8, !tbaa !5
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = ptrtoint ptr %78 to i64
  %81 = ptrtoint ptr %79 to i64
  %82 = sub i64 %80, %81
  %83 = sdiv exact i64 %82, 4
  %84 = trunc i64 %83 to i32
  store i32 %84, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = load i32, ptr %10, align 4, !tbaa !9
  %87 = call noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %85, i32 noundef %86, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %88 = load ptr, ptr %20, align 8, !tbaa !5
  %89 = load ptr, ptr %19, align 8, !tbaa !5
  %90 = ptrtoint ptr %88 to i64
  %91 = ptrtoint ptr %89 to i64
  %92 = sub i64 %90, %91
  %93 = sdiv exact i64 %92, 4
  %94 = trunc i64 %93 to i32
  store i32 %94, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %95 = load i32, ptr %18, align 4, !tbaa !9
  %96 = load i32, ptr %21, align 4, !tbaa !9
  %97 = add i32 %95, %96
  store i32 %97, ptr %22, align 4, !tbaa !9
  %98 = load i32, ptr %22, align 4, !tbaa !9
  %99 = icmp ult i32 %98, 128
  br i1 %99, label %100, label %101

100:                                              ; preds = %7
  store i1 false, ptr %8, align 1
  store i32 1, ptr %23, align 4
  br label %598

101:                                              ; preds = %7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = load i32, ptr %10, align 4, !tbaa !9
  call void @_ZNK3JPH13IslandBuilder17GetBodiesInIslandEjRPNS_6BodyIDES3_(ptr noundef nonnull align 8 dereferenceable(112) %102, i32 noundef %103, ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #9
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %104)
  %106 = call noundef ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %105)
  store ptr %106, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %107 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %107, ptr %27, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %125, %101
  %109 = load ptr, ptr %27, align 8, !tbaa !5
  %110 = load ptr, ptr %25, align 8, !tbaa !5
  %111 = icmp ult ptr %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %128

113:                                              ; preds = %108
  %114 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = load ptr, ptr %26, align 8, !tbaa !5
  %117 = load ptr, ptr %27, align 8, !tbaa !5
  %118 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %117)
  %119 = zext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %116, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  %122 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %121)
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %115, i64 %123
  store i32 0, ptr %124, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %113
  %126 = load ptr, ptr %27, align 8, !tbaa !5
  %127 = getelementptr inbounds %"class.JPH::BodyID", ptr %126, i32 1
  store ptr %127, ptr %27, align 8, !tbaa !5
  br label %108, !llvm.loop !15

128:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 128, ptr %28) #9
  call void @llvm.memset.p0.i64(ptr align 16 %28, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 128, ptr %29) #9
  call void @llvm.memset.p0.i64(ptr align 16 %29, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %129 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 6
  %130 = load i32, ptr %22, align 4, !tbaa !9
  %131 = call noundef i32 @_ZNSt13__atomic_baseIjE9fetch_addEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %129, i32 noundef %130, i32 noundef 0) #9
  store i32 %131, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %132 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 3
  %133 = load ptr, ptr %132, align 8, !tbaa !17
  %134 = load i32, ptr %30, align 4, !tbaa !9
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr %133, i64 %135
  store ptr %136, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %137 = load ptr, ptr %31, align 8, !tbaa !5
  %138 = load i32, ptr %18, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  store ptr %140, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %141 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %141, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %142, ptr %34, align 8, !tbaa !5
  br label %143

143:                                              ; preds = %177, %128
  %144 = load ptr, ptr %34, align 8, !tbaa !5
  %145 = load ptr, ptr %17, align 8, !tbaa !5
  %146 = icmp ult ptr %144, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %143
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  br label %180

148:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = load ptr, ptr %34, align 8, !tbaa !5
  %151 = load i32, ptr %150, align 4, !tbaa !9
  call void @_ZNK3JPH24ContactConstraintManager17GetAffectedBodiesEjRPKNS_4BodyES4_(ptr noundef nonnull align 8 dereferenceable(248) %149, i32 noundef %151, ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36)
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #9
  %152 = load ptr, ptr %35, align 8, !tbaa !5
  %153 = load ptr, ptr %36, align 8, !tbaa !5
  %154 = call noundef i32 @_ZN3JPH19LargeIslandSplitter11AssignSplitEPKNS_4BodyES3_(ptr noundef nonnull align 8 dereferenceable(60) %74, ptr noundef %152, ptr noundef %153)
  store i32 %154, ptr %37, align 4, !tbaa !9
  %155 = load i32, ptr %37, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds [32 x i32], ptr %28, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = add i32 %158, 1
  store i32 %159, ptr %157, align 4, !tbaa !9
  %160 = load i32, ptr %37, align 4, !tbaa !9
  %161 = load ptr, ptr %33, align 8, !tbaa !5
  %162 = getelementptr inbounds i32, ptr %161, i32 1
  store ptr %162, ptr %33, align 8, !tbaa !5
  store i32 %160, ptr %161, align 4, !tbaa !9
  %163 = load ptr, ptr %35, align 8, !tbaa !5
  %164 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %163)
  br i1 %164, label %165, label %169

165:                                              ; preds = %148
  %166 = load ptr, ptr %15, align 8, !tbaa !5
  %167 = load ptr, ptr %35, align 8, !tbaa !5
  %168 = call noundef ptr @_ZNK3JPH4Body28GetMotionPropertiesUncheckedEv(ptr noundef nonnull align 16 dereferenceable(122) %167)
  call void @_ZN3JPH20CalculateSolverStepsclINS_16MotionPropertiesEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18) %166, ptr noundef %168)
  br label %169

169:                                              ; preds = %165, %148
  %170 = load ptr, ptr %36, align 8, !tbaa !5
  %171 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %170)
  br i1 %171, label %172, label %176

172:                                              ; preds = %169
  %173 = load ptr, ptr %15, align 8, !tbaa !5
  %174 = load ptr, ptr %36, align 8, !tbaa !5
  %175 = call noundef ptr @_ZNK3JPH4Body28GetMotionPropertiesUncheckedEv(ptr noundef nonnull align 16 dereferenceable(122) %174)
  call void @_ZN3JPH20CalculateSolverStepsclINS_16MotionPropertiesEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18) %173, ptr noundef %175)
  br label %176

176:                                              ; preds = %172, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #9
  br label %177

177:                                              ; preds = %176
  %178 = load ptr, ptr %34, align 8, !tbaa !5
  %179 = getelementptr inbounds i32, ptr %178, i32 1
  store ptr %179, ptr %34, align 8, !tbaa !5
  br label %143, !llvm.loop !18

180:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %181 = load ptr, ptr %32, align 8, !tbaa !5
  store ptr %181, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %182 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %182, ptr %39, align 8, !tbaa !5
  br label %183

183:                                              ; preds = %210, %180
  %184 = load ptr, ptr %39, align 8, !tbaa !5
  %185 = load ptr, ptr %20, align 8, !tbaa !5
  %186 = icmp ult ptr %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  br label %213

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #9
  %189 = load ptr, ptr %14, align 8, !tbaa !5
  %190 = load ptr, ptr %39, align 8, !tbaa !5
  %191 = load i32, ptr %190, align 4, !tbaa !9
  %192 = zext i32 %191 to i64
  %193 = getelementptr inbounds ptr, ptr %189, i64 %192
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  store ptr %194, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #9
  %195 = load ptr, ptr %40, align 8, !tbaa !5
  %196 = load ptr, ptr %195, align 8, !tbaa !19
  %197 = getelementptr inbounds ptr, ptr %196, i64 12
  %198 = load ptr, ptr %197, align 8
  %199 = call noundef i32 %198(ptr noundef nonnull align 8 dereferenceable(32) %195, ptr noundef nonnull align 8 dereferenceable(60) %74)
  store i32 %199, ptr %41, align 4, !tbaa !9
  %200 = load i32, ptr %41, align 4, !tbaa !9
  %201 = zext i32 %200 to i64
  %202 = getelementptr inbounds [32 x i32], ptr %29, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !9
  %204 = add i32 %203, 1
  store i32 %204, ptr %202, align 4, !tbaa !9
  %205 = load i32, ptr %41, align 4, !tbaa !9
  %206 = load ptr, ptr %38, align 8, !tbaa !5
  %207 = getelementptr inbounds i32, ptr %206, i32 1
  store ptr %207, ptr %38, align 8, !tbaa !5
  store i32 %205, ptr %206, align 4, !tbaa !9
  %208 = load ptr, ptr %15, align 8, !tbaa !5
  %209 = load ptr, ptr %40, align 8, !tbaa !5
  call void @_ZN3JPH20CalculateSolverStepsclINS_10ConstraintEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18) %208, ptr noundef %209)
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  br label %210

210:                                              ; preds = %188
  %211 = load ptr, ptr %39, align 8, !tbaa !5
  %212 = getelementptr inbounds i32, ptr %211, i32 1
  store ptr %212, ptr %39, align 8, !tbaa !5
  br label %183, !llvm.loop !21

213:                                              ; preds = %187
  %214 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18) %214)
  call void @llvm.lifetime.start.p0(i64 128, ptr %42) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #9
  %215 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 10
  %216 = call noundef i32 @_ZNSt13__atomic_baseIjE9fetch_addEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %215, i32 noundef 1, i32 noundef 0) #9
  store i32 %216, ptr %43, align 4, !tbaa !9
  br label %217

217:                                              ; preds = %213
  %218 = load i32, ptr %43, align 4, !tbaa !9
  %219 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 7
  %220 = load i32, ptr %219, align 8, !tbaa !22
  %221 = icmp ult i32 %218, %220
  br i1 %221, label %225, label %222

222:                                              ; preds = %217
  %223 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 356)
  br i1 %223, label %224, label %225

224:                                              ; preds = %222
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !23
  br label %225

225:                                              ; preds = %224, %222, %217
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #9
  %228 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 9
  %229 = load ptr, ptr %228, align 8, !tbaa !24
  %230 = load i32, ptr %43, align 4, !tbaa !9
  %231 = zext i32 %230 to i64
  %232 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %229, i64 %231
  store ptr %232, ptr %45, align 8, !tbaa !5
  %233 = load i32, ptr %10, align 4, !tbaa !9
  %234 = load ptr, ptr %45, align 8, !tbaa !5
  %235 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %234, i32 0, i32 1
  store i32 %233, ptr %235, align 8, !tbaa !25
  %236 = load ptr, ptr %45, align 8, !tbaa !5
  %237 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %236, i32 0, i32 2
  store i32 0, ptr %237, align 4, !tbaa !30
  %238 = load ptr, ptr %15, align 8, !tbaa !5
  %239 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %238)
  %240 = add i32 %239, 1
  %241 = load ptr, ptr %45, align 8, !tbaa !5
  %242 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %241, i32 0, i32 3
  store i32 %240, ptr %242, align 8, !tbaa !31
  %243 = load ptr, ptr %15, align 8, !tbaa !5
  %244 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %243)
  %245 = load ptr, ptr %45, align 8, !tbaa !5
  %246 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %245, i32 0, i32 4
  store i32 %244, ptr %246, align 4, !tbaa !32
  %247 = load ptr, ptr %15, align 8, !tbaa !5
  %248 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %247)
  %249 = load ptr, ptr %45, align 8, !tbaa !5
  %250 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %249, i32 0, i32 5
  store i32 %248, ptr %250, align 8, !tbaa !33
  %251 = load ptr, ptr %45, align 8, !tbaa !5
  %252 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %251, i32 0, i32 8
  call void @_ZNSt13__atomic_baseIjE5storeEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %252, i32 noundef 0, i32 noundef 3) #9
  call void @llvm.lifetime.start.p0(i64 256, ptr %46) #9
  call void @llvm.lifetime.start.p0(i64 256, ptr %47) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #9
  store i32 0, ptr %48, align 4, !tbaa !9
  br label %253

253:                                              ; preds = %360, %227
  %254 = load i32, ptr %48, align 4, !tbaa !9
  %255 = icmp ult i32 %254, 32
  br i1 %255, label %257, label %256

256:                                              ; preds = %253
  store i32 13, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #9
  br label %363

257:                                              ; preds = %253
  %258 = load i32, ptr %48, align 4, !tbaa !9
  %259 = zext i32 %258 to i64
  %260 = getelementptr inbounds [32 x i32], ptr %29, i64 0, i64 %259
  %261 = load i32, ptr %260, align 4, !tbaa !9
  %262 = load i32, ptr %48, align 4, !tbaa !9
  %263 = zext i32 %262 to i64
  %264 = getelementptr inbounds [32 x i32], ptr %28, i64 0, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !9
  %266 = add i32 %261, %265
  %267 = icmp ult i32 %266, 32
  br i1 %267, label %268, label %289

268:                                              ; preds = %257
  %269 = load i32, ptr %48, align 4, !tbaa !9
  %270 = icmp ult i32 %269, 31
  br i1 %270, label %271, label %289

271:                                              ; preds = %268
  %272 = load i32, ptr %48, align 4, !tbaa !9
  %273 = zext i32 %272 to i64
  %274 = getelementptr inbounds [32 x i32], ptr %42, i64 0, i64 %273
  store i32 31, ptr %274, align 4, !tbaa !9
  %275 = load i32, ptr %48, align 4, !tbaa !9
  %276 = zext i32 %275 to i64
  %277 = getelementptr inbounds [32 x i32], ptr %28, i64 0, i64 %276
  %278 = load i32, ptr %277, align 4, !tbaa !9
  %279 = getelementptr inbounds [32 x i32], ptr %28, i64 0, i64 31
  %280 = load i32, ptr %279, align 4, !tbaa !9
  %281 = add i32 %280, %278
  store i32 %281, ptr %279, align 4, !tbaa !9
  %282 = load i32, ptr %48, align 4, !tbaa !9
  %283 = zext i32 %282 to i64
  %284 = getelementptr inbounds [32 x i32], ptr %29, i64 0, i64 %283
  %285 = load i32, ptr %284, align 4, !tbaa !9
  %286 = getelementptr inbounds [32 x i32], ptr %29, i64 0, i64 31
  %287 = load i32, ptr %286, align 4, !tbaa !9
  %288 = add i32 %287, %285
  store i32 %288, ptr %286, align 4, !tbaa !9
  br label %359

289:                                              ; preds = %268, %257
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #9
  %290 = load i32, ptr %48, align 4, !tbaa !9
  %291 = icmp ult i32 %290, 31
  br i1 %291, label %292, label %297

292:                                              ; preds = %289
  %293 = load ptr, ptr %45, align 8, !tbaa !5
  %294 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %293, i32 0, i32 2
  %295 = load i32, ptr %294, align 4, !tbaa !30
  %296 = add i32 %295, 1
  store i32 %296, ptr %294, align 4, !tbaa !30
  store i32 %295, ptr %49, align 4, !tbaa !9
  br label %298

297:                                              ; preds = %289
  store i32 31, ptr %49, align 4, !tbaa !9
  br label %298

298:                                              ; preds = %297, %292
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #9
  %299 = load ptr, ptr %45, align 8, !tbaa !5
  %300 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %299, i32 0, i32 0
  %301 = load i32, ptr %49, align 4, !tbaa !9
  %302 = zext i32 %301 to i64
  %303 = getelementptr inbounds [32 x %"struct.JPH::LargeIslandSplitter::Split"], ptr %300, i64 0, i64 %302
  store ptr %303, ptr %50, align 8, !tbaa !5
  %304 = load i32, ptr %49, align 4, !tbaa !9
  %305 = load i32, ptr %48, align 4, !tbaa !9
  %306 = zext i32 %305 to i64
  %307 = getelementptr inbounds [32 x i32], ptr %42, i64 0, i64 %306
  store i32 %304, ptr %307, align 4, !tbaa !9
  %308 = load i32, ptr %30, align 4, !tbaa !9
  %309 = load ptr, ptr %50, align 8, !tbaa !5
  %310 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %309, i32 0, i32 0
  store i32 %308, ptr %310, align 4, !tbaa !34
  %311 = load ptr, ptr %50, align 8, !tbaa !5
  %312 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %311, i32 0, i32 0
  %313 = load i32, ptr %312, align 4, !tbaa !34
  %314 = load i32, ptr %48, align 4, !tbaa !9
  %315 = zext i32 %314 to i64
  %316 = getelementptr inbounds [32 x i32], ptr %28, i64 0, i64 %315
  %317 = load i32, ptr %316, align 4, !tbaa !9
  %318 = add i32 %313, %317
  %319 = load ptr, ptr %50, align 8, !tbaa !5
  %320 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %319, i32 0, i32 1
  store i32 %318, ptr %320, align 4, !tbaa !36
  %321 = load ptr, ptr %50, align 8, !tbaa !5
  %322 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %321, i32 0, i32 1
  %323 = load i32, ptr %322, align 4, !tbaa !36
  %324 = load ptr, ptr %50, align 8, !tbaa !5
  %325 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %324, i32 0, i32 2
  store i32 %323, ptr %325, align 4, !tbaa !37
  %326 = load ptr, ptr %50, align 8, !tbaa !5
  %327 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %326, i32 0, i32 2
  %328 = load i32, ptr %327, align 4, !tbaa !37
  %329 = load i32, ptr %48, align 4, !tbaa !9
  %330 = zext i32 %329 to i64
  %331 = getelementptr inbounds [32 x i32], ptr %29, i64 0, i64 %330
  %332 = load i32, ptr %331, align 4, !tbaa !9
  %333 = add i32 %328, %332
  %334 = load ptr, ptr %50, align 8, !tbaa !5
  %335 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %334, i32 0, i32 3
  store i32 %333, ptr %335, align 4, !tbaa !38
  %336 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 4
  %337 = load ptr, ptr %336, align 8, !tbaa !39
  %338 = load ptr, ptr %50, align 8, !tbaa !5
  %339 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %338, i32 0, i32 0
  %340 = load i32, ptr %339, align 4, !tbaa !34
  %341 = zext i32 %340 to i64
  %342 = getelementptr inbounds i32, ptr %337, i64 %341
  %343 = load i32, ptr %49, align 4, !tbaa !9
  %344 = zext i32 %343 to i64
  %345 = getelementptr inbounds [32 x ptr], ptr %47, i64 0, i64 %344
  store ptr %342, ptr %345, align 8, !tbaa !5
  %346 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 4
  %347 = load ptr, ptr %346, align 8, !tbaa !39
  %348 = load ptr, ptr %50, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %348, i32 0, i32 2
  %350 = load i32, ptr %349, align 4, !tbaa !37
  %351 = zext i32 %350 to i64
  %352 = getelementptr inbounds i32, ptr %347, i64 %351
  %353 = load i32, ptr %49, align 4, !tbaa !9
  %354 = zext i32 %353 to i64
  %355 = getelementptr inbounds [32 x ptr], ptr %46, i64 0, i64 %354
  store ptr %352, ptr %355, align 8, !tbaa !5
  %356 = load ptr, ptr %50, align 8, !tbaa !5
  %357 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %356, i32 0, i32 3
  %358 = load i32, ptr %357, align 4, !tbaa !38
  store i32 %358, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #9
  br label %359

359:                                              ; preds = %298, %271
  br label %360

360:                                              ; preds = %359
  %361 = load i32, ptr %48, align 4, !tbaa !9
  %362 = add i32 %361, 1
  store i32 %362, ptr %48, align 4, !tbaa !9
  br label %253, !llvm.loop !40

363:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #9
  store i32 0, ptr %51, align 4, !tbaa !9
  br label %364

364:                                              ; preds = %388, %363
  %365 = load i32, ptr %51, align 4, !tbaa !9
  %366 = load i32, ptr %18, align 4, !tbaa !9
  %367 = icmp ult i32 %365, %366
  br i1 %367, label %369, label %368

368:                                              ; preds = %364
  store i32 16, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #9
  br label %391

369:                                              ; preds = %364
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #9
  %370 = load ptr, ptr %31, align 8, !tbaa !5
  %371 = load i32, ptr %51, align 4, !tbaa !9
  %372 = zext i32 %371 to i64
  %373 = getelementptr inbounds i32, ptr %370, i64 %372
  %374 = load i32, ptr %373, align 4, !tbaa !9
  %375 = zext i32 %374 to i64
  %376 = getelementptr inbounds [32 x i32], ptr %42, i64 0, i64 %375
  %377 = load i32, ptr %376, align 4, !tbaa !9
  store i32 %377, ptr %52, align 4, !tbaa !9
  %378 = load ptr, ptr %16, align 8, !tbaa !5
  %379 = load i32, ptr %51, align 4, !tbaa !9
  %380 = zext i32 %379 to i64
  %381 = getelementptr inbounds i32, ptr %378, i64 %380
  %382 = load i32, ptr %381, align 4, !tbaa !9
  %383 = load i32, ptr %52, align 4, !tbaa !9
  %384 = zext i32 %383 to i64
  %385 = getelementptr inbounds [32 x ptr], ptr %47, i64 0, i64 %384
  %386 = load ptr, ptr %385, align 8, !tbaa !5
  %387 = getelementptr inbounds i32, ptr %386, i32 1
  store ptr %387, ptr %385, align 8, !tbaa !5
  store i32 %382, ptr %386, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #9
  br label %388

388:                                              ; preds = %369
  %389 = load i32, ptr %51, align 4, !tbaa !9
  %390 = add i32 %389, 1
  store i32 %390, ptr %51, align 4, !tbaa !9
  br label %364, !llvm.loop !41

391:                                              ; preds = %368
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #9
  store i32 0, ptr %53, align 4, !tbaa !9
  br label %392

392:                                              ; preds = %416, %391
  %393 = load i32, ptr %53, align 4, !tbaa !9
  %394 = load i32, ptr %21, align 4, !tbaa !9
  %395 = icmp ult i32 %393, %394
  br i1 %395, label %397, label %396

396:                                              ; preds = %392
  store i32 19, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #9
  br label %419

397:                                              ; preds = %392
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #9
  %398 = load ptr, ptr %32, align 8, !tbaa !5
  %399 = load i32, ptr %53, align 4, !tbaa !9
  %400 = zext i32 %399 to i64
  %401 = getelementptr inbounds i32, ptr %398, i64 %400
  %402 = load i32, ptr %401, align 4, !tbaa !9
  %403 = zext i32 %402 to i64
  %404 = getelementptr inbounds [32 x i32], ptr %42, i64 0, i64 %403
  %405 = load i32, ptr %404, align 4, !tbaa !9
  store i32 %405, ptr %54, align 4, !tbaa !9
  %406 = load ptr, ptr %19, align 8, !tbaa !5
  %407 = load i32, ptr %53, align 4, !tbaa !9
  %408 = zext i32 %407 to i64
  %409 = getelementptr inbounds i32, ptr %406, i64 %408
  %410 = load i32, ptr %409, align 4, !tbaa !9
  %411 = load i32, ptr %54, align 4, !tbaa !9
  %412 = zext i32 %411 to i64
  %413 = getelementptr inbounds [32 x ptr], ptr %46, i64 0, i64 %412
  %414 = load ptr, ptr %413, align 8, !tbaa !5
  %415 = getelementptr inbounds i32, ptr %414, i32 1
  store ptr %415, ptr %413, align 8, !tbaa !5
  store i32 %410, ptr %414, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #9
  br label %416

416:                                              ; preds = %397
  %417 = load i32, ptr %53, align 4, !tbaa !9
  %418 = add i32 %417, 1
  store i32 %418, ptr %53, align 4, !tbaa !9
  br label %392, !llvm.loop !42

419:                                              ; preds = %396
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #9
  store i32 0, ptr %55, align 4, !tbaa !9
  br label %420

420:                                              ; preds = %475, %419
  %421 = load i32, ptr %55, align 4, !tbaa !9
  %422 = icmp ult i32 %421, 32
  br i1 %422, label %424, label %423

423:                                              ; preds = %420
  store i32 22, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #9
  br label %478

424:                                              ; preds = %420
  %425 = load i32, ptr %55, align 4, !tbaa !9
  %426 = load ptr, ptr %45, align 8, !tbaa !5
  %427 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %426, i32 0, i32 2
  %428 = load i32, ptr %427, align 4, !tbaa !30
  %429 = icmp uge i32 %425, %428
  br i1 %429, label %430, label %431

430:                                              ; preds = %424
  store i32 31, ptr %55, align 4, !tbaa !9
  br label %431

431:                                              ; preds = %430, %424
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #9
  %432 = load ptr, ptr %45, align 8, !tbaa !5
  %433 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %432, i32 0, i32 0
  %434 = load i32, ptr %55, align 4, !tbaa !9
  %435 = zext i32 %434 to i64
  %436 = getelementptr inbounds [32 x %"struct.JPH::LargeIslandSplitter::Split"], ptr %433, i64 0, i64 %435
  store ptr %436, ptr %56, align 8, !tbaa !5
  br label %437

437:                                              ; preds = %431
  %438 = load i32, ptr %55, align 4, !tbaa !9
  %439 = zext i32 %438 to i64
  %440 = getelementptr inbounds [32 x ptr], ptr %47, i64 0, i64 %439
  %441 = load ptr, ptr %440, align 8, !tbaa !5
  %442 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 4
  %443 = load ptr, ptr %442, align 8, !tbaa !39
  %444 = load ptr, ptr %56, align 8, !tbaa !5
  %445 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %444, i32 0, i32 1
  %446 = load i32, ptr %445, align 4, !tbaa !36
  %447 = zext i32 %446 to i64
  %448 = getelementptr inbounds i32, ptr %443, i64 %447
  %449 = icmp eq ptr %441, %448
  br i1 %449, label %453, label %450

450:                                              ; preds = %437
  %451 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 449)
  br i1 %451, label %452, label %453

452:                                              ; preds = %450
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !43
  br label %453

453:                                              ; preds = %452, %450, %437
  br label %454

454:                                              ; preds = %453
  br label %455

455:                                              ; preds = %454
  br label %456

456:                                              ; preds = %455
  %457 = load i32, ptr %55, align 4, !tbaa !9
  %458 = zext i32 %457 to i64
  %459 = getelementptr inbounds [32 x ptr], ptr %46, i64 0, i64 %458
  %460 = load ptr, ptr %459, align 8, !tbaa !5
  %461 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 4
  %462 = load ptr, ptr %461, align 8, !tbaa !39
  %463 = load ptr, ptr %56, align 8, !tbaa !5
  %464 = getelementptr inbounds %"struct.JPH::LargeIslandSplitter::Split", ptr %463, i32 0, i32 3
  %465 = load i32, ptr %464, align 4, !tbaa !38
  %466 = zext i32 %465 to i64
  %467 = getelementptr inbounds i32, ptr %462, i64 %466
  %468 = icmp eq ptr %460, %467
  br i1 %468, label %472, label %469

469:                                              ; preds = %456
  %470 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 450)
  br i1 %470, label %471, label %472

471:                                              ; preds = %469
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !44
  br label %472

472:                                              ; preds = %471, %469, %456
  br label %473

473:                                              ; preds = %472
  br label %474

474:                                              ; preds = %473
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #9
  br label %475

475:                                              ; preds = %474
  %476 = load i32, ptr %55, align 4, !tbaa !9
  %477 = add i32 %476, 1
  store i32 %477, ptr %55, align 4, !tbaa !9
  br label %420, !llvm.loop !45

478:                                              ; preds = %423
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #9
  store i32 0, ptr %59, align 4, !tbaa !9
  br label %479

479:                                              ; preds = %592, %478
  %480 = load i32, ptr %59, align 4, !tbaa !9
  %481 = load ptr, ptr %45, align 8, !tbaa !5
  %482 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %481, i32 0, i32 2
  %483 = load i32, ptr %482, align 4, !tbaa !30
  %484 = icmp ult i32 %480, %483
  br i1 %484, label %486, label %485

485:                                              ; preds = %479
  store i32 29, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #9
  br label %596

486:                                              ; preds = %479
  call void @llvm.lifetime.start.p0(i64 24, ptr %60) #9
  %487 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 0
  %488 = load i32, ptr %487, align 8, !tbaa !46
  %489 = zext i32 %488 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %61) #9
  store i8 0, ptr %61, align 1, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr %62) #9
  call void @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEC2EmRKbRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %489, ptr noundef nonnull align 1 dereferenceable(1) %61, ptr noundef nonnull align 1 dereferenceable(1) %62)
  call void @llvm.lifetime.end.p0(i64 1, ptr %62) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %61) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #9
  %490 = load ptr, ptr %45, align 8, !tbaa !5
  %491 = load i32, ptr %59, align 4, !tbaa !9
  invoke void @_ZNK3JPH19LargeIslandSplitter6Splits18GetContactsInSplitEjRjS2_(ptr noundef nonnull align 8 dereferenceable(548) %490, i32 noundef %491, ptr noundef nonnull align 4 dereferenceable(4) %63, ptr noundef nonnull align 4 dereferenceable(4) %64)
          to label %492 unwind label %507

492:                                              ; preds = %486
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #9
  %493 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 4
  %494 = load ptr, ptr %493, align 8, !tbaa !39
  %495 = load i32, ptr %63, align 4, !tbaa !9
  %496 = zext i32 %495 to i64
  %497 = getelementptr inbounds i32, ptr %494, i64 %496
  store ptr %497, ptr %67, align 8, !tbaa !5
  br label %498

498:                                              ; preds = %586, %492
  %499 = load ptr, ptr %67, align 8, !tbaa !5
  %500 = getelementptr inbounds %"class.JPH::LargeIslandSplitter", ptr %74, i32 0, i32 4
  %501 = load ptr, ptr %500, align 8, !tbaa !39
  %502 = load i32, ptr %64, align 4, !tbaa !9
  %503 = zext i32 %502 to i64
  %504 = getelementptr inbounds i32, ptr %501, i64 %503
  %505 = icmp ult ptr %499, %504
  br i1 %505, label %511, label %506

506:                                              ; preds = %498
  store i32 32, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #9
  br label %591

507:                                              ; preds = %486
  %508 = landingpad { ptr, i32 }
          cleanup
  %509 = extractvalue { ptr, i32 } %508, 0
  store ptr %509, ptr %65, align 8
  %510 = extractvalue { ptr, i32 } %508, 1
  store i32 %510, ptr %66, align 4
  br label %595

511:                                              ; preds = %498
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #9
  %512 = load ptr, ptr %13, align 8, !tbaa !5
  %513 = load ptr, ptr %67, align 8, !tbaa !5
  %514 = load i32, ptr %513, align 4, !tbaa !9
  invoke void @_ZNK3JPH24ContactConstraintManager17GetAffectedBodiesEjRPKNS_4BodyES4_(ptr noundef nonnull align 8 dereferenceable(248) %512, i32 noundef %514, ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull align 8 dereferenceable(8) %69)
          to label %515 unwind label %537

515:                                              ; preds = %511
  call void @llvm.lifetime.start.p0(i64 4, ptr %70) #9
  %516 = load ptr, ptr %68, align 8, !tbaa !5
  %517 = invoke noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %516)
          to label %518 unwind label %541

518:                                              ; preds = %515
  store i32 %517, ptr %70, align 4, !tbaa !9
  %519 = load i32, ptr %70, align 4, !tbaa !9
  %520 = icmp ne i32 %519, -1
  br i1 %520, label %521, label %552

521:                                              ; preds = %518
  %522 = load ptr, ptr %68, align 8, !tbaa !5
  %523 = invoke noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %522)
          to label %524 unwind label %541

524:                                              ; preds = %521
  br i1 %523, label %525, label %552

525:                                              ; preds = %524
  br label %526

526:                                              ; preds = %525
  %527 = load i32, ptr %70, align 4, !tbaa !9
  %528 = zext i32 %527 to i64
  %529 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %528)
          to label %530 unwind label %541

530:                                              ; preds = %526
  %531 = load i8, ptr %529, align 1, !tbaa !47, !range !49, !noundef !50
  %532 = trunc i8 %531 to i1
  br i1 %532, label %533, label %545

533:                                              ; preds = %530
  %534 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 470)
          to label %535 unwind label %541

535:                                              ; preds = %533
  br i1 %534, label %536, label %545

536:                                              ; preds = %535
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !51
  br label %545

537:                                              ; preds = %511
  %538 = landingpad { ptr, i32 }
          cleanup
  %539 = extractvalue { ptr, i32 } %538, 0
  store ptr %539, ptr %65, align 8
  %540 = extractvalue { ptr, i32 } %538, 1
  store i32 %540, ptr %66, align 4
  br label %590

541:                                              ; preds = %547, %533, %526, %521, %515
  %542 = landingpad { ptr, i32 }
          cleanup
  %543 = extractvalue { ptr, i32 } %542, 0
  store ptr %543, ptr %65, align 8
  %544 = extractvalue { ptr, i32 } %542, 1
  store i32 %544, ptr %66, align 4
  br label %589

545:                                              ; preds = %536, %535, %530
  br label %546

546:                                              ; preds = %545
  br label %547

547:                                              ; preds = %546
  %548 = load i32, ptr %70, align 4, !tbaa !9
  %549 = zext i32 %548 to i64
  %550 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %549)
          to label %551 unwind label %541

551:                                              ; preds = %547
  store i8 1, ptr %550, align 1, !tbaa !47
  br label %552

552:                                              ; preds = %551, %524, %518
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #9
  %553 = load ptr, ptr %69, align 8, !tbaa !5
  %554 = invoke noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %553)
          to label %555 unwind label %574

555:                                              ; preds = %552
  store i32 %554, ptr %72, align 4, !tbaa !9
  %556 = load i32, ptr %72, align 4, !tbaa !9
  %557 = icmp ne i32 %556, -1
  br i1 %557, label %558, label %585

558:                                              ; preds = %555
  %559 = load ptr, ptr %69, align 8, !tbaa !5
  %560 = invoke noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %559)
          to label %561 unwind label %574

561:                                              ; preds = %558
  br i1 %560, label %562, label %585

562:                                              ; preds = %561
  br label %563

563:                                              ; preds = %562
  %564 = load i32, ptr %72, align 4, !tbaa !9
  %565 = zext i32 %564 to i64
  %566 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %565)
          to label %567 unwind label %574

567:                                              ; preds = %563
  %568 = load i8, ptr %566, align 1, !tbaa !47, !range !49, !noundef !50
  %569 = trunc i8 %568 to i1
  br i1 %569, label %570, label %578

570:                                              ; preds = %567
  %571 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 477)
          to label %572 unwind label %574

572:                                              ; preds = %570
  br i1 %571, label %573, label %578

573:                                              ; preds = %572
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !52
  br label %578

574:                                              ; preds = %580, %570, %563, %558, %552
  %575 = landingpad { ptr, i32 }
          cleanup
  %576 = extractvalue { ptr, i32 } %575, 0
  store ptr %576, ptr %65, align 8
  %577 = extractvalue { ptr, i32 } %575, 1
  store i32 %577, ptr %66, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #9
  br label %589

578:                                              ; preds = %573, %572, %567
  br label %579

579:                                              ; preds = %578
  br label %580

580:                                              ; preds = %579
  %581 = load i32, ptr %72, align 4, !tbaa !9
  %582 = zext i32 %581 to i64
  %583 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %582)
          to label %584 unwind label %574

584:                                              ; preds = %580
  store i8 1, ptr %583, align 1, !tbaa !47
  br label %585

585:                                              ; preds = %584, %561, %555
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #9
  br label %586

586:                                              ; preds = %585
  %587 = load ptr, ptr %67, align 8, !tbaa !5
  %588 = getelementptr inbounds i32, ptr %587, i32 1
  store ptr %588, ptr %67, align 8, !tbaa !5
  br label %498, !llvm.loop !53

589:                                              ; preds = %574, %541
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #9
  br label %590

590:                                              ; preds = %589, %537
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #9
  br label %595

591:                                              ; preds = %506
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #9
  call void @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %60) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %60) #9
  br label %592

592:                                              ; preds = %591
  %593 = load i32, ptr %59, align 4, !tbaa !9
  %594 = add i32 %593, 1
  store i32 %594, ptr %59, align 4, !tbaa !9
  br label %479, !llvm.loop !54

595:                                              ; preds = %590, %507
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #9
  call void @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %60) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %60) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %600

596:                                              ; preds = %485
  %597 = load ptr, ptr %45, align 8, !tbaa !5
  call void @_ZN3JPH19LargeIslandSplitter6Splits15StartFirstBatchEv(ptr noundef nonnull align 8 dereferenceable(548) %597)
  store i1 true, ptr %8, align 1
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 256, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr %46) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %598

598:                                              ; preds = %596, %100
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  %599 = load i1, ptr %8, align 1
  ret i1 %599

600:                                              ; preds = %595
  %601 = load ptr, ptr %65, align 8
  %602 = load i32, ptr %66, align 4
  %603 = insertvalue { ptr, i32 } poison, ptr %601, 0
  %604 = insertvalue { ptr, i32 } %603, i32 %602, 1
  resume { ptr, i32 } %604
}

declare void @_ZNK3JPH13IslandBuilder17GetBodiesInIslandEjRPNS_6BodyIDES3_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4)) #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH24ContactConstraintManager17GetAffectedBodiesEjRPKNS_4BodyES4_(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH20CalculateSolverStepsclINS_16MotionPropertiesEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18), ptr noundef) #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH4Body28GetMotionPropertiesUncheckedEv(ptr noundef nonnull align 16 dereferenceable(122)) #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH20CalculateSolverStepsclINS_10ConstraintEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18), ptr noundef) #8 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18)) #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH19LargeIslandSplitter6Splits15StartFirstBatchEv(ptr noundef nonnull align 8 dereferenceable(548)) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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 #9 = { 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, !6, i64 8}
!12 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !13, i64 36, !10, i64 40, !6, i64 48, !13, i64 56}
!13 = !{!"_ZTSSt6atomicIjE", !14, i64 0}
!14 = !{!"_ZTSSt13__atomic_baseIjE", !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !6, i64 16}
!18 = distinct !{!18, !16}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = distinct !{!21, !16}
!22 = !{!12, !10, i64 40}
!23 = !{i64 2158946446}
!24 = !{!12, !6, i64 48}
!25 = !{!26, !10, i64 512}
!26 = !{!"_ZTSN3JPH19LargeIslandSplitter6SplitsE", !7, i64 0, !10, i64 512, !10, i64 516, !10, i64 520, !10, i64 524, !10, i64 528, !27, i64 536, !13, i64 544}
!27 = !{!"_ZTSSt6atomicImE", !28, i64 0}
!28 = !{!"_ZTSSt13__atomic_baseImE", !29, i64 0}
!29 = !{!"long", !7, i64 0}
!30 = !{!26, !10, i64 516}
!31 = !{!26, !10, i64 520}
!32 = !{!26, !10, i64 524}
!33 = !{!26, !10, i64 528}
!34 = !{!35, !10, i64 0}
!35 = !{!"_ZTSN3JPH19LargeIslandSplitter5SplitE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!36 = !{!35, !10, i64 4}
!37 = !{!35, !10, i64 8}
!38 = !{!35, !10, i64 12}
!39 = !{!12, !6, i64 24}
!40 = distinct !{!40, !16}
!41 = distinct !{!41, !16}
!42 = distinct !{!42, !16}
!43 = !{i64 2158946901}
!44 = !{i64 2158947368}
!45 = distinct !{!45, !16}
!46 = !{!12, !10, i64 0}
!47 = !{!48, !48, i64 0}
!48 = !{!"bool", !7, i64 0}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{i64 2158947697}
!52 = !{i64 2158948026}
!53 = distinct !{!53, !16}
!54 = distinct !{!54, !16}


; 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::Array.13" = type { i64, i64, ptr }
%"class.JPH::STLAllocator.14" = type { i8 }
%"class.JPH::LargeIslandSplitter::Splits" = type <{ [32 x %"struct.JPH::LargeIslandSplitter::Split"], i32, i32, i32, i32, i32, [4 x i8], %"struct.std::atomic", %"struct.std::atomic.0", [4 x i8] }>
%"struct.JPH::LargeIslandSplitter::Split" = type { i32, i32, i32, i32 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i32 }

@.str.1 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 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: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt13__atomic_baseIjE9fetch_addEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH19LargeIslandSplitter11SplitIslandEjRKNS_13IslandBuilderERKNS_11BodyManagerERKNS_24ContactConstraintManagerEPPNS_10ConstraintERNS_20CalculateSolverStepsE(ptr noundef nonnull align 8 dereferenceable(60) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(112) %2, ptr noundef nonnull align 8 dereferenceable(297) %3, ptr noundef nonnull align 8 dereferenceable(248) %4, ptr nocapture noundef readonly %5, ptr noundef nonnull align 8 dereferenceable(18) %6) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca [32 x i32], align 16
  %15 = alloca [32 x i32], align 16
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca [32 x i32], align 16
  %19 = alloca [32 x ptr], align 16
  %20 = alloca [32 x ptr], align 16
  %21 = alloca %"class.JPH::Array.13", align 8
  %22 = alloca i8, align 1
  %23 = alloca %"class.JPH::STLAllocator.14", align 1
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #9
  %28 = call noundef zeroext i1 @_ZNK3JPH13IslandBuilder19GetContactsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %2, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = ptrtoint ptr %29 to i64
  %32 = ptrtoint ptr %30 to i64
  %33 = sub i64 %31, %32
  %34 = lshr i64 %33, 2
  %35 = trunc i64 %34 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %36 = call noundef zeroext i1 @_ZNK3JPH13IslandBuilder22GetConstraintsInIslandEjRPjS2_(ptr noundef nonnull align 8 dereferenceable(112) %2, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = ptrtoint ptr %37 to i64
  %40 = ptrtoint ptr %38 to i64
  %41 = sub i64 %39, %40
  %42 = lshr exact i64 %41, 2
  %43 = trunc i64 %42 to i32
  %44 = add i32 %43, %35
  %45 = icmp ugt i32 %44, 127
  br i1 %45, label %46, label %345

46:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  call void @_ZNK3JPH13IslandBuilder17GetBodiesInIslandEjRPNS_6BodyIDES3_(ptr noundef nonnull align 8 dereferenceable(112) %2, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %3)
  %48 = call noundef ptr @_ZNK3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = icmp ult ptr %49, %50
  br i1 %51, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %46
  %52 = getelementptr inbounds i8, ptr %0, i64 8
  br label %64

._crit_edge:                                      ; preds = %64, %46
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %14) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %14, i8 0, i64 128, i1 false)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %15) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %15, i8 0, i64 128, i1 false)
  %53 = getelementptr inbounds i8, ptr %0, i64 36
  %54 = call noundef i32 @_ZNSt13__atomic_baseIjE9fetch_addEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %53, i32 noundef %44, i32 noundef 0) #9
  %55 = getelementptr inbounds i8, ptr %0, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = zext i32 %54 to i64
  %58 = getelementptr inbounds i32, ptr %56, i64 %57
  %59 = and i64 %34, 4294967295
  %60 = getelementptr inbounds i32, ptr %58, i64 %59
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = icmp ult ptr %61, %62
  br i1 %63, label %.lr.ph153, label %._crit_edge154

64:                                               ; preds = %.lr.ph, %64
  %.0129149 = phi ptr [ %49, %.lr.ph ], [ %73, %64 ]
  %65 = load ptr, ptr %52, align 8, !tbaa !14
  %66 = call noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4) %.0129149)
  %67 = zext i32 %66 to i64
  %68 = getelementptr inbounds ptr, ptr %48, i64 %67
  %69 = load ptr, ptr %68, align 8, !tbaa !5
  %70 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %69)
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %65, i64 %71
  store i32 0, ptr %72, align 4, !tbaa !15
  %73 = getelementptr inbounds i8, ptr %.0129149, i64 4
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = icmp ult ptr %73, %74
  br i1 %75, label %64, label %._crit_edge, !llvm.loop !16

._crit_edge154:                                   ; preds = %99, %._crit_edge
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = icmp ult ptr %76, %77
  br i1 %78, label %.lr.ph158, label %._crit_edge159

.lr.ph153:                                        ; preds = %._crit_edge, %99
  %.0133151 = phi ptr [ %87, %99 ], [ %58, %._crit_edge ]
  %.0135150 = phi ptr [ %100, %99 ], [ %61, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #9
  %79 = load i32, ptr %.0135150, align 4, !tbaa !15
  call void @_ZNK3JPH24ContactConstraintManager17GetAffectedBodiesEjRPKNS_4BodyES4_(ptr noundef nonnull align 8 dereferenceable(248) %4, i32 noundef %79, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = call noundef i32 @_ZN3JPH19LargeIslandSplitter11AssignSplitEPKNS_4BodyES3_(ptr noundef nonnull align 8 dereferenceable(60) %0, ptr noundef %80, ptr noundef %81)
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds [32 x i32], ptr %14, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !15
  %86 = add i32 %85, 1
  store i32 %86, ptr %84, align 4, !tbaa !15
  %87 = getelementptr inbounds i8, ptr %.0133151, i64 4
  store i32 %82, ptr %.0133151, align 4, !tbaa !15
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %88)
  br i1 %89, label %90, label %93

90:                                               ; preds = %.lr.ph153
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = call noundef ptr @_ZNK3JPH4Body28GetMotionPropertiesUncheckedEv(ptr noundef nonnull align 16 dereferenceable(122) %91)
  call void @_ZN3JPH20CalculateSolverStepsclINS_16MotionPropertiesEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18) %6, ptr noundef %92)
  br label %93

93:                                               ; preds = %90, %.lr.ph153
  %94 = load ptr, ptr %17, align 8, !tbaa !5
  %95 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %94)
  br i1 %95, label %96, label %99

96:                                               ; preds = %93
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  %98 = call noundef ptr @_ZNK3JPH4Body28GetMotionPropertiesUncheckedEv(ptr noundef nonnull align 16 dereferenceable(122) %97)
  call void @_ZN3JPH20CalculateSolverStepsclINS_16MotionPropertiesEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18) %6, ptr noundef %98)
  br label %99

99:                                               ; preds = %96, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #9
  %100 = getelementptr inbounds i8, ptr %.0135150, i64 4
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = icmp ult ptr %100, %101
  br i1 %102, label %.lr.ph153, label %._crit_edge154, !llvm.loop !18

._crit_edge159:                                   ; preds = %.lr.ph158, %._crit_edge154
  call void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18) %6)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %18) #9
  %103 = getelementptr inbounds i8, ptr %0, i64 56
  %104 = call noundef i32 @_ZNSt13__atomic_baseIjE9fetch_addEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %103, i32 noundef 1, i32 noundef 0) #9
  %105 = getelementptr inbounds i8, ptr %0, i64 40
  %106 = load i32, ptr %105, align 8, !tbaa !19
  %107 = icmp ult i32 %104, %106
  br i1 %107, label %127, label %124

.lr.ph158:                                        ; preds = %._crit_edge154, %.lr.ph158
  %.0138156 = phi ptr [ %120, %.lr.ph158 ], [ %60, %._crit_edge154 ]
  %.0139155 = phi ptr [ %121, %.lr.ph158 ], [ %76, %._crit_edge154 ]
  %108 = load i32, ptr %.0139155, align 4, !tbaa !15
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds ptr, ptr %5, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  %113 = getelementptr inbounds i8, ptr %112, i64 96
  %114 = load ptr, ptr %113, align 8
  %115 = call noundef i32 %114(ptr noundef nonnull align 8 dereferenceable(32) %111, ptr noundef nonnull align 8 dereferenceable(60) %0)
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds [32 x i32], ptr %15, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !15
  %119 = add i32 %118, 1
  store i32 %119, ptr %117, align 4, !tbaa !15
  %120 = getelementptr inbounds i8, ptr %.0138156, i64 4
  store i32 %115, ptr %.0138156, align 4, !tbaa !15
  call void @_ZN3JPH20CalculateSolverStepsclINS_10ConstraintEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18) %6, ptr noundef nonnull %111)
  %121 = getelementptr inbounds i8, ptr %.0139155, i64 4
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = icmp ult ptr %121, %122
  br i1 %123, label %.lr.ph158, label %._crit_edge159, !llvm.loop !22

124:                                              ; preds = %._crit_edge159
  %125 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i32 noundef 356)
  br i1 %125, label %126, label %127

126:                                              ; preds = %124
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !23
  br label %127

127:                                              ; preds = %126, %124, %._crit_edge159
  %128 = getelementptr inbounds i8, ptr %0, i64 48
  %129 = load ptr, ptr %128, align 8, !tbaa !24
  %130 = zext i32 %104 to i64
  %131 = getelementptr inbounds %"class.JPH::LargeIslandSplitter::Splits", ptr %129, i64 %130
  %132 = getelementptr inbounds i8, ptr %131, i64 512
  store i32 %1, ptr %132, align 8, !tbaa !25
  %133 = getelementptr inbounds i8, ptr %131, i64 516
  store i32 0, ptr %133, align 4, !tbaa !30
  %134 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %6)
  %135 = add i32 %134, 1
  %136 = getelementptr inbounds i8, ptr %131, i64 520
  store i32 %135, ptr %136, align 8, !tbaa !31
  %137 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %6)
  %138 = getelementptr inbounds i8, ptr %131, i64 524
  store i32 %137, ptr %138, align 4, !tbaa !32
  %139 = call noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18) %6)
  %140 = getelementptr inbounds i8, ptr %131, i64 528
  store i32 %139, ptr %140, align 8, !tbaa !33
  %141 = getelementptr inbounds i8, ptr %131, i64 544
  call void @_ZNSt13__atomic_baseIjE5storeEjSt12memory_order(ptr noundef nonnull align 4 dereferenceable(4) %141, i32 noundef 0, i32 noundef 3) #9
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %19) #9
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %20) #9
  %142 = getelementptr inbounds i8, ptr %0, i64 24
  %143 = load ptr, ptr %142, align 8
  %144 = getelementptr inbounds i8, ptr %14, i64 124
  %145 = getelementptr inbounds i8, ptr %15, i64 124
  %.promoted = load i32, ptr %144, align 4, !tbaa !15
  %.promoted162 = load i32, ptr %145, align 4, !tbaa !15
  br label %148

.preheader148:                                    ; preds = %181
  %.not175 = icmp eq i32 %35, 0
  br i1 %.not175, label %.preheader147, label %.lr.ph164

.lr.ph164:                                        ; preds = %.preheader148
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %wide.trip.count = and i64 %34, 4294967295
  %xtraiter = and i64 %34, 1
  %147 = icmp eq i64 %wide.trip.count, 1
  br i1 %147, label %.preheader147.loopexit.unr-lcssa, label %.lr.ph164.new

.lr.ph164.new:                                    ; preds = %.lr.ph164
  %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter
  br label %208

148:                                              ; preds = %127, %181
  %indvars.iv = phi i64 [ 0, %127 ], [ %indvars.iv.next, %181 ]
  %149 = phi i32 [ %.promoted162, %127 ], [ %182, %181 ]
  %150 = phi i32 [ %.promoted, %127 ], [ %183, %181 ]
  %.0131161 = phi i32 [ %54, %127 ], [ %.1, %181 ]
  %151 = getelementptr inbounds [32 x i32], ptr %15, i64 0, i64 %indvars.iv
  %152 = load i32, ptr %151, align 4, !tbaa !15
  %153 = getelementptr inbounds [32 x i32], ptr %14, i64 0, i64 %indvars.iv
  %154 = load i32, ptr %153, align 4, !tbaa !15
  %155 = add i32 %154, %152
  %156 = icmp ult i32 %155, 32
  %157 = icmp ne i64 %indvars.iv, 31
  %or.cond = and i1 %157, %156
  br i1 %or.cond, label %158, label %162

158:                                              ; preds = %148
  %159 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %indvars.iv
  store i32 31, ptr %159, align 4, !tbaa !15
  %160 = add i32 %150, %154
  store i32 %160, ptr %144, align 4, !tbaa !15
  %161 = add i32 %149, %152
  store i32 %161, ptr %145, align 4, !tbaa !15
  br label %181

162:                                              ; preds = %148
  br i1 %157, label %163, label %166

163:                                              ; preds = %162
  %164 = load i32, ptr %133, align 4, !tbaa !30
  %165 = add i32 %164, 1
  store i32 %165, ptr %133, align 4, !tbaa !30
  br label %166

166:                                              ; preds = %162, %163
  %.0136 = phi i32 [ %164, %163 ], [ 31, %162 ]
  %167 = zext i32 %.0136 to i64
  %168 = getelementptr inbounds [32 x %"struct.JPH::LargeIslandSplitter::Split"], ptr %131, i64 0, i64 %167
  %169 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %indvars.iv
  store i32 %.0136, ptr %169, align 4, !tbaa !15
  store i32 %.0131161, ptr %168, align 4, !tbaa !34
  %170 = add i32 %154, %.0131161
  %171 = getelementptr inbounds i8, ptr %168, i64 4
  store i32 %170, ptr %171, align 4, !tbaa !36
  %172 = getelementptr inbounds i8, ptr %168, i64 8
  store i32 %170, ptr %172, align 4, !tbaa !37
  %173 = add i32 %170, %152
  %174 = getelementptr inbounds i8, ptr %168, i64 12
  store i32 %173, ptr %174, align 4, !tbaa !38
  %175 = zext i32 %.0131161 to i64
  %176 = getelementptr inbounds i32, ptr %143, i64 %175
  %177 = getelementptr inbounds [32 x ptr], ptr %20, i64 0, i64 %167
  store ptr %176, ptr %177, align 8, !tbaa !5
  %178 = zext i32 %170 to i64
  %179 = getelementptr inbounds i32, ptr %143, i64 %178
  %180 = getelementptr inbounds [32 x ptr], ptr %19, i64 0, i64 %167
  store ptr %179, ptr %180, align 8, !tbaa !5
  br label %181

181:                                              ; preds = %158, %166
  %182 = phi i32 [ %161, %158 ], [ %149, %166 ]
  %183 = phi i32 [ %160, %158 ], [ %150, %166 ]
  %.1 = phi i32 [ %.0131161, %158 ], [ %173, %166 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 32
  br i1 %exitcond.not, label %.preheader148, label %148, !llvm.loop !39

.preheader147.loopexit.unr-lcssa:                 ; preds = %208, %.lr.ph164
  %indvars.iv179.unr = phi i64 [ 0, %.lr.ph164 ], [ %indvars.iv.next180.1, %208 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader147, label %.preheader147.loopexit.epilog-lcssa

.preheader147.loopexit.epilog-lcssa:              ; preds = %.preheader147.loopexit.unr-lcssa
  %184 = getelementptr inbounds i32, ptr %58, i64 %indvars.iv179.unr
  %185 = load i32, ptr %184, align 4, !tbaa !15
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !15
  %189 = getelementptr inbounds i32, ptr %146, i64 %indvars.iv179.unr
  %190 = load i32, ptr %189, align 4, !tbaa !15
  %191 = zext i32 %188 to i64
  %192 = getelementptr inbounds [32 x ptr], ptr %20, i64 0, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  %194 = getelementptr inbounds i8, ptr %193, i64 4
  store ptr %194, ptr %192, align 8, !tbaa !5
  store i32 %190, ptr %193, align 4, !tbaa !15
  br label %.preheader147

.preheader147:                                    ; preds = %.preheader147.loopexit.epilog-lcssa, %.preheader147.loopexit.unr-lcssa, %.preheader148
  %.not176 = icmp eq i32 %43, 0
  br i1 %.not176, label %.preheader146.preheader, label %.lr.ph166

.preheader146.preheader.loopexit.unr-lcssa:       ; preds = %231, %.lr.ph166
  %indvars.iv183.unr = phi i64 [ 0, %.lr.ph166 ], [ %indvars.iv.next184.1, %231 ]
  %lcmp.mod190.not = icmp eq i64 %xtraiter189, 0
  br i1 %lcmp.mod190.not, label %.preheader146.preheader, label %.preheader146.preheader.loopexit.epilog-lcssa

.preheader146.preheader.loopexit.epilog-lcssa:    ; preds = %.preheader146.preheader.loopexit.unr-lcssa
  %195 = getelementptr inbounds i32, ptr %60, i64 %indvars.iv183.unr
  %196 = load i32, ptr %195, align 4, !tbaa !15
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !15
  %200 = getelementptr inbounds i32, ptr %206, i64 %indvars.iv183.unr
  %201 = load i32, ptr %200, align 4, !tbaa !15
  %202 = zext i32 %199 to i64
  %203 = getelementptr inbounds [32 x ptr], ptr %19, i64 0, i64 %202
  %204 = load ptr, ptr %203, align 8, !tbaa !5
  %205 = getelementptr inbounds i8, ptr %204, i64 4
  store ptr %205, ptr %203, align 8, !tbaa !5
  store i32 %201, ptr %204, align 4, !tbaa !15
  br label %.preheader146.preheader

.preheader146.preheader:                          ; preds = %.preheader146.preheader.loopexit.epilog-lcssa, %.preheader146.preheader.loopexit.unr-lcssa, %.preheader147
  br label %.preheader146

.lr.ph166:                                        ; preds = %.preheader147
  %206 = load ptr, ptr %10, align 8, !tbaa !5
  %wide.trip.count186 = and i64 %42, 4294967295
  %xtraiter189 = and i64 %42, 1
  %207 = icmp eq i64 %wide.trip.count186, 1
  br i1 %207, label %.preheader146.preheader.loopexit.unr-lcssa, label %.lr.ph166.new

.lr.ph166.new:                                    ; preds = %.lr.ph166
  %unroll_iter191 = sub nsw i64 %wide.trip.count186, %xtraiter189
  br label %231

208:                                              ; preds = %208, %.lr.ph164.new
  %indvars.iv179 = phi i64 [ 0, %.lr.ph164.new ], [ %indvars.iv.next180.1, %208 ]
  %niter = phi i64 [ 0, %.lr.ph164.new ], [ %niter.next.1, %208 ]
  %209 = getelementptr inbounds i32, ptr %58, i64 %indvars.iv179
  %210 = load i32, ptr %209, align 4, !tbaa !15
  %211 = zext i32 %210 to i64
  %212 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !15
  %214 = getelementptr inbounds i32, ptr %146, i64 %indvars.iv179
  %215 = load i32, ptr %214, align 4, !tbaa !15
  %216 = zext i32 %213 to i64
  %217 = getelementptr inbounds [32 x ptr], ptr %20, i64 0, i64 %216
  %218 = load ptr, ptr %217, align 8, !tbaa !5
  %219 = getelementptr inbounds i8, ptr %218, i64 4
  store ptr %219, ptr %217, align 8, !tbaa !5
  store i32 %215, ptr %218, align 4, !tbaa !15
  %indvars.iv.next180 = or disjoint i64 %indvars.iv179, 1
  %220 = getelementptr inbounds i32, ptr %58, i64 %indvars.iv.next180
  %221 = load i32, ptr %220, align 4, !tbaa !15
  %222 = zext i32 %221 to i64
  %223 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !15
  %225 = getelementptr inbounds i32, ptr %146, i64 %indvars.iv.next180
  %226 = load i32, ptr %225, align 4, !tbaa !15
  %227 = zext i32 %224 to i64
  %228 = getelementptr inbounds [32 x ptr], ptr %20, i64 0, i64 %227
  %229 = load ptr, ptr %228, align 8, !tbaa !5
  %230 = getelementptr inbounds i8, ptr %229, i64 4
  store ptr %230, ptr %228, align 8, !tbaa !5
  store i32 %226, ptr %229, align 4, !tbaa !15
  %indvars.iv.next180.1 = add nuw nsw i64 %indvars.iv179, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader147.loopexit.unr-lcssa, label %208, !llvm.loop !40

231:                                              ; preds = %231, %.lr.ph166.new
  %indvars.iv183 = phi i64 [ 0, %.lr.ph166.new ], [ %indvars.iv.next184.1, %231 ]
  %niter192 = phi i64 [ 0, %.lr.ph166.new ], [ %niter192.next.1, %231 ]
  %232 = getelementptr inbounds i32, ptr %60, i64 %indvars.iv183
  %233 = load i32, ptr %232, align 4, !tbaa !15
  %234 = zext i32 %233 to i64
  %235 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !15
  %237 = getelementptr inbounds i32, ptr %206, i64 %indvars.iv183
  %238 = load i32, ptr %237, align 4, !tbaa !15
  %239 = zext i32 %236 to i64
  %240 = getelementptr inbounds [32 x ptr], ptr %19, i64 0, i64 %239
  %241 = load ptr, ptr %240, align 8, !tbaa !5
  %242 = getelementptr inbounds i8, ptr %241, i64 4
  store ptr %242, ptr %240, align 8, !tbaa !5
  store i32 %238, ptr %241, align 4, !tbaa !15
  %indvars.iv.next184 = or disjoint i64 %indvars.iv183, 1
  %243 = getelementptr inbounds i32, ptr %60, i64 %indvars.iv.next184
  %244 = load i32, ptr %243, align 4, !tbaa !15
  %245 = zext i32 %244 to i64
  %246 = getelementptr inbounds [32 x i32], ptr %18, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !15
  %248 = getelementptr inbounds i32, ptr %206, i64 %indvars.iv.next184
  %249 = load i32, ptr %248, align 4, !tbaa !15
  %250 = zext i32 %247 to i64
  %251 = getelementptr inbounds [32 x ptr], ptr %19, i64 0, i64 %250
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  %253 = getelementptr inbounds i8, ptr %252, i64 4
  store ptr %253, ptr %251, align 8, !tbaa !5
  store i32 %249, ptr %252, align 4, !tbaa !15
  %indvars.iv.next184.1 = add nuw nsw i64 %indvars.iv183, 2
  %niter192.next.1 = add i64 %niter192, 2
  %niter192.ncmp.1 = icmp eq i64 %niter192.next.1, %unroll_iter191
  br i1 %niter192.ncmp.1, label %.preheader146.preheader.loopexit.unr-lcssa, label %231, !llvm.loop !41

.preheader:                                       ; preds = %281
  %254 = load i32, ptr %133, align 4, !tbaa !30
  %.not177 = icmp eq i32 %254, 0
  br i1 %.not177, label %._crit_edge174, label %.lr.ph173

.preheader146:                                    ; preds = %.preheader146.preheader, %281
  %.0130167 = phi i32 [ %282, %281 ], [ 0, %.preheader146.preheader ]
  %255 = load i32, ptr %133, align 4, !tbaa !30
  %.not145 = icmp ult i32 %.0130167, %255
  %spec.store.select = select i1 %.not145, i32 %.0130167, i32 31
  %256 = zext nneg i32 %spec.store.select to i64
  %257 = getelementptr inbounds [32 x %"struct.JPH::LargeIslandSplitter::Split"], ptr %131, i64 0, i64 %256
  %258 = getelementptr inbounds [32 x ptr], ptr %20, i64 0, i64 %256
  %259 = load ptr, ptr %258, align 8, !tbaa !5
  %260 = load ptr, ptr %142, align 8, !tbaa !42
  %261 = getelementptr inbounds i8, ptr %257, i64 4
  %262 = load i32, ptr %261, align 4, !tbaa !36
  %263 = zext i32 %262 to i64
  %264 = getelementptr inbounds i32, ptr %260, i64 %263
  %265 = icmp eq ptr %259, %264
  br i1 %265, label %269, label %266

266:                                              ; preds = %.preheader146
  %267 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 449)
  br i1 %267, label %268, label %269

268:                                              ; preds = %266
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !43
  br label %269

269:                                              ; preds = %.preheader146, %266, %268
  %270 = getelementptr inbounds [32 x ptr], ptr %19, i64 0, i64 %256
  %271 = load ptr, ptr %270, align 8, !tbaa !5
  %272 = load ptr, ptr %142, align 8, !tbaa !42
  %273 = getelementptr inbounds i8, ptr %257, i64 12
  %274 = load i32, ptr %273, align 4, !tbaa !38
  %275 = zext i32 %274 to i64
  %276 = getelementptr inbounds i32, ptr %272, i64 %275
  %277 = icmp eq ptr %271, %276
  br i1 %277, label %281, label %278

278:                                              ; preds = %269
  %279 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 450)
  br i1 %279, label %280, label %281

280:                                              ; preds = %278
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !44
  br label %281

281:                                              ; preds = %280, %278, %269
  %282 = add nuw nsw i32 %spec.store.select, 1
  %283 = icmp ult i32 %spec.store.select, 31
  br i1 %283, label %.preheader146, label %.preheader, !llvm.loop !45

._crit_edge174:                                   ; preds = %._crit_edge171, %.preheader
  call void @_ZN3JPH19LargeIslandSplitter6Splits15StartFirstBatchEv(ptr noundef nonnull align 8 dereferenceable(548) %131)
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  br label %345

.lr.ph173:                                        ; preds = %.preheader, %._crit_edge171
  %.0128172 = phi i32 [ %292, %._crit_edge171 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #9
  %284 = load i32, ptr %0, align 8, !tbaa !46
  %285 = zext i32 %284 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #9
  store i8 0, ptr %22, align 1, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #9
  call void @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEC2EmRKbRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %285, ptr noundef nonnull align 1 dereferenceable(1) %22, ptr noundef nonnull align 1 dereferenceable(1) %23)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #9
  call void @_ZNK3JPH19LargeIslandSplitter6Splits18GetContactsInSplitEjRjS2_(ptr noundef nonnull align 8 dereferenceable(548) %131, i32 noundef %.0128172, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %286 = load i32, ptr %24, align 4, !tbaa !15
  %287 = load i32, ptr %25, align 4, !tbaa !15
  %288 = icmp ult i32 %286, %287
  br i1 %288, label %.lr.ph170.preheader, label %._crit_edge171

.lr.ph170.preheader:                              ; preds = %.lr.ph173
  %289 = load ptr, ptr %142, align 8, !tbaa !42
  %290 = zext i32 %286 to i64
  %291 = getelementptr inbounds i32, ptr %289, i64 %290
  br label %.lr.ph170

._crit_edge171:                                   ; preds = %337, %.lr.ph173
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #9
  call void @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #9
  %292 = add nuw i32 %.0128172, 1
  %293 = load i32, ptr %133, align 4, !tbaa !30
  %294 = icmp ult i32 %292, %293
  br i1 %294, label %.lr.ph173, label %._crit_edge174, !llvm.loop !49

.lr.ph170:                                        ; preds = %.lr.ph170.preheader, %337
  %.0125168 = phi ptr [ %338, %337 ], [ %291, %.lr.ph170.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %27) #9
  %295 = load i32, ptr %.0125168, align 4, !tbaa !15
  call void @_ZNK3JPH24ContactConstraintManager17GetAffectedBodiesEjRPKNS_4BodyES4_(ptr noundef nonnull align 8 dereferenceable(248) %4, i32 noundef %295, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %296 = load ptr, ptr %26, align 8, !tbaa !5
  %297 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %296)
  %.not = icmp eq i32 %297, -1
  br i1 %.not, label %316, label %298

298:                                              ; preds = %.lr.ph170
  %299 = load ptr, ptr %26, align 8, !tbaa !5
  %300 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %299)
  br i1 %300, label %301, label %316

301:                                              ; preds = %298
  %302 = zext i32 %297 to i64
  %303 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %302)
          to label %304 unwind label %311

304:                                              ; preds = %301
  %305 = load i8, ptr %303, align 1, !tbaa !47, !range !50, !noundef !51
  %306 = trunc nuw i8 %305 to i1
  br i1 %306, label %307, label %313

307:                                              ; preds = %304
  %308 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 470)
          to label %309 unwind label %311

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

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

311:                                              ; preds = %313, %307, %301
  %312 = landingpad { ptr, i32 }
          cleanup
  br label %344

313:                                              ; preds = %310, %309, %304
  %314 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %302)
          to label %315 unwind label %311

315:                                              ; preds = %313
  store i8 1, ptr %314, align 1, !tbaa !47
  br label %316

316:                                              ; preds = %315, %298, %.lr.ph170
  %317 = load ptr, ptr %27, align 8, !tbaa !5
  %318 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %317)
  %.not143 = icmp eq i32 %318, -1
  br i1 %.not143, label %337, label %319

319:                                              ; preds = %316
  %320 = load ptr, ptr %27, align 8, !tbaa !5
  %321 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %320)
  br i1 %321, label %322, label %337

322:                                              ; preds = %319
  %323 = zext i32 %318 to i64
  %324 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %323)
          to label %325 unwind label %332

325:                                              ; preds = %322
  %326 = load i8, ptr %324, align 1, !tbaa !47, !range !50, !noundef !51
  %327 = trunc nuw i8 %326 to i1
  br i1 %327, label %328, label %334

328:                                              ; preds = %325
  %329 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 477)
          to label %330 unwind label %332

330:                                              ; preds = %328
  br i1 %329, label %331, label %334

331:                                              ; preds = %330
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #9, !srcloc !53
  br label %334

332:                                              ; preds = %334, %328, %322
  %333 = landingpad { ptr, i32 }
          cleanup
  br label %344

334:                                              ; preds = %331, %330, %325
  %335 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %323)
          to label %336 unwind label %332

336:                                              ; preds = %334
  store i8 1, ptr %335, align 1, !tbaa !47
  br label %337

337:                                              ; preds = %336, %319, %316
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #9
  %338 = getelementptr inbounds i8, ptr %.0125168, i64 4
  %339 = load ptr, ptr %142, align 8, !tbaa !42
  %340 = load i32, ptr %25, align 4, !tbaa !15
  %341 = zext i32 %340 to i64
  %342 = getelementptr inbounds i32, ptr %339, i64 %341
  %343 = icmp ult ptr %338, %342
  br i1 %343, label %.lr.ph170, label %._crit_edge171, !llvm.loop !54

344:                                              ; preds = %332, %311
  %.pn = phi { ptr, i32 } [ %333, %332 ], [ %312, %311 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #9
  call void @_ZN3JPH5ArrayIbNS_12STLAllocatorIbEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  resume { ptr, i32 } %.pn

345:                                              ; preds = %7, %._crit_edge174
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  ret i1 %45
}

declare void @_ZNK3JPH13IslandBuilder17GetBodiesInIslandEjRPNS_6BodyIDES3_(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH6BodyID8GetIndexEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH24ContactConstraintManager17GetAffectedBodiesEjRPKNS_4BodyES4_(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH20CalculateSolverStepsclINS_16MotionPropertiesEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18), ptr noundef) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH4Body28GetMotionPropertiesUncheckedEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH20CalculateSolverStepsclINS_10ConstraintEEEvPKT_(ptr noundef nonnull align 8 dereferenceable(18), ptr noundef) local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20CalculateSolverSteps8FinalizeEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumVelocityStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH20CalculateSolverSteps19GetNumPositionStepsEv(ptr noundef nonnull align 8 dereferenceable(18)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH19LargeIslandSplitter6Splits15StartFirstBatchEv(ptr noundef nonnull align 8 dereferenceable(548)) local_unnamed_addr #6 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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { 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 #9 = { 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, !6, i64 16}
!10 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !12, i64 36, !11, i64 40, !6, i64 48, !12, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6atomicIjE", !13, i64 0}
!13 = !{!"_ZTSSt13__atomic_baseIjE", !11, i64 0}
!14 = !{!10, !6, i64 8}
!15 = !{!11, !11, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!10, !11, i64 40}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}
!22 = distinct !{!22, !17}
!23 = !{i64 2158946446}
!24 = !{!10, !6, i64 48}
!25 = !{!26, !11, i64 512}
!26 = !{!"_ZTSN3JPH19LargeIslandSplitter6SplitsE", !7, i64 0, !11, i64 512, !11, i64 516, !11, i64 520, !11, i64 524, !11, i64 528, !27, i64 536, !12, i64 544}
!27 = !{!"_ZTSSt6atomicImE", !28, i64 0}
!28 = !{!"_ZTSSt13__atomic_baseImE", !29, i64 0}
!29 = !{!"long", !7, i64 0}
!30 = !{!26, !11, i64 516}
!31 = !{!26, !11, i64 520}
!32 = !{!26, !11, i64 524}
!33 = !{!26, !11, i64 528}
!34 = !{!35, !11, i64 0}
!35 = !{!"_ZTSN3JPH19LargeIslandSplitter5SplitE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!36 = !{!35, !11, i64 4}
!37 = !{!35, !11, i64 8}
!38 = !{!35, !11, i64 12}
!39 = distinct !{!39, !17}
!40 = distinct !{!40, !17}
!41 = distinct !{!41, !17}
!42 = !{!10, !6, i64 24}
!43 = !{i64 2158946901}
!44 = !{i64 2158947368}
!45 = distinct !{!45, !17}
!46 = !{!10, !11, i64 0}
!47 = !{!48, !48, i64 0}
!48 = !{!"bool", !7, i64 0}
!49 = distinct !{!49, !17}
!50 = !{i8 0, i8 2}
!51 = !{}
!52 = !{i64 2158947697}
!53 = !{i64 2158948026}
!54 = distinct !{!54, !17}


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