; LLVM IR from mtsamis/box2d-optimized :: src/dynamics/b2_island.ll (ZN8b2Island8SolveTOIERK10b2TimeStepii)

; 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.b2ContactSolverDef = type { %struct.b2TimeStep, ptr, i32, ptr, ptr, ptr }
%struct.b2TimeStep = type { float, float, float, i32, i32, i32, i8 }
%class.b2ContactSolver = type <{ ptr, ptr, ptr, ptr, ptr, i32, [4 x i8] }>
%struct.b2Vec2 = type { float, float }
%class.b2Island = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%class.b2Body = type { i32, i16, i32, %struct.b2Transform, %struct.b2Transform, %struct.b2Sweep, %struct.b2Vec2, float, %struct.b2Vec2, float, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, i32, float, float, float, float, float, float, float, float, %struct.b2BodyUserData }
%struct.b2Transform = type { %struct.b2Vec2, %struct.b2Rot }
%struct.b2Rot = type { float, float }
%struct.b2Sweep = type { %struct.b2Vec2, %struct.b2Vec2, %struct.b2Vec2, float, float, float }
%struct.b2BodyUserData = type { i64 }
%struct.b2Position = type { %struct.b2Vec2, float }
%struct.b2Velocity = type { %struct.b2Vec2, float }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@__PRETTY_FUNCTION__._ZN8b2Island8SolveTOIERK10b2TimeStepii = external hidden unnamed_addr constant [58 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmlfRK6b2Vec2(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6b2Vec26LengthEv(ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #3 align 2

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

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

declare void @_ZN15b2ContactSolverC1Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #6

declare void @_ZN15b2ContactSolver10InitializeEP18b2ContactSolverDef(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef) #6

declare void @_ZN15b2ContactSolver29InitializeVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44)) #6

declare void @_ZN15b2ContactSolver24SolveVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44)) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8b2Island6ReportEPK27b2ContactVelocityConstraint(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #7 align 2

; Function Attrs: nounwind
declare void @_ZN15b2ContactSolverD1Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8b2Island8SolveTOIERK10b2TimeStepii(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 4 dereferenceable(28) %1, i32 noundef %2, i32 noundef %3) #9 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %struct.b2ContactSolverDef, align 8
  %12 = alloca %class.b2ContactSolver, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.b2Vec2, align 4
  %22 = alloca float, align 4
  %23 = alloca %struct.b2Vec2, align 4
  %24 = alloca float, align 4
  %25 = alloca %struct.b2Vec2, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca %struct.b2Vec2, align 4
  %30 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %31 = load ptr, ptr %5, align 8
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 7
  %34 = load i32, ptr %33, align 8, !tbaa !11
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %36, label %37

36:                                               ; preds = %4
  br label %39

37:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 488, ptr noundef @__PRETTY_FUNCTION__._ZN8b2Island8SolveTOIERK10b2TimeStepii) #11
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 7
  %42 = load i32, ptr %41, align 8, !tbaa !11
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %39
  br label %47

45:                                               ; preds = %39
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 489, ptr noundef @__PRETTY_FUNCTION__._ZN8b2Island8SolveTOIERK10b2TimeStepii) #11
  unreachable

46:                                               ; No predecessors!
  br label %47

47:                                               ; preds = %46, %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #12
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %97, %47
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 7
  %51 = load i32, ptr %50, align 8, !tbaa !11
  %52 = icmp slt i32 %49, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  br label %100

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #12
  %55 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !13
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds ptr, ptr %56, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  store ptr %60, ptr %10, align 8, !tbaa !5
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %class.b2Body, ptr %61, i32 0, i32 5
  %63 = getelementptr inbounds %struct.b2Sweep, ptr %62, i32 0, i32 2
  %64 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %65 = load ptr, ptr %64, align 8, !tbaa !14
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct.b2Position, ptr %65, i64 %67
  %69 = getelementptr inbounds %struct.b2Position, ptr %68, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %69, ptr align 4 %63, i64 8, i1 false), !tbaa.struct !15
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %class.b2Body, ptr %70, i32 0, i32 5
  %72 = getelementptr inbounds %struct.b2Sweep, ptr %71, i32 0, i32 4
  %73 = load float, ptr %72, align 4, !tbaa !18
  %74 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds %struct.b2Position, ptr %75, i64 %77
  %79 = getelementptr inbounds %struct.b2Position, ptr %78, i32 0, i32 1
  store float %73, ptr %79, align 4, !tbaa !28
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.b2Body, ptr %80, i32 0, i32 6
  %82 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 6
  %83 = load ptr, ptr %82, align 8, !tbaa !30
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds %struct.b2Velocity, ptr %83, i64 %85
  %87 = getelementptr inbounds %struct.b2Velocity, ptr %86, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %87, ptr align 8 %81, i64 8, i1 false), !tbaa.struct !15
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %class.b2Body, ptr %88, i32 0, i32 7
  %90 = load float, ptr %89, align 8, !tbaa !31
  %91 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 6
  %92 = load ptr, ptr %91, align 8, !tbaa !30
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %struct.b2Velocity, ptr %92, i64 %94
  %96 = getelementptr inbounds %struct.b2Velocity, ptr %95, i32 0, i32 1
  store float %90, ptr %96, align 4, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #12
  br label %97

97:                                               ; preds = %54
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %9, align 4, !tbaa !9
  br label %48, !llvm.loop !34

100:                                              ; preds = %53
  call void @llvm.lifetime.start.p0(i64 72, ptr %11) #12
  %101 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 3
  %102 = load ptr, ptr %101, align 8, !tbaa !36
  %103 = getelementptr inbounds %struct.b2ContactSolverDef, ptr %11, i32 0, i32 1
  store ptr %102, ptr %103, align 8, !tbaa !37
  %104 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 9
  %105 = load i32, ptr %104, align 8, !tbaa !41
  %106 = getelementptr inbounds %struct.b2ContactSolverDef, ptr %11, i32 0, i32 2
  store i32 %105, ptr %106, align 8, !tbaa !42
  %107 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !43
  %109 = getelementptr inbounds %struct.b2ContactSolverDef, ptr %11, i32 0, i32 5
  store ptr %108, ptr %109, align 8, !tbaa !44
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.b2ContactSolverDef, ptr %11, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %111, ptr align 4 %110, i64 28, i1 false), !tbaa.struct !45
  %112 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %113 = load ptr, ptr %112, align 8, !tbaa !14
  %114 = getelementptr inbounds %struct.b2ContactSolverDef, ptr %11, i32 0, i32 3
  store ptr %113, ptr %114, align 8, !tbaa !47
  %115 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !30
  %117 = getelementptr inbounds %struct.b2ContactSolverDef, ptr %11, i32 0, i32 4
  store ptr %116, ptr %117, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #12
  call void @_ZN15b2ContactSolverC1Ev(ptr noundef nonnull align 8 dereferenceable(44) %12)
  invoke void @_ZN15b2ContactSolver10InitializeEP18b2ContactSolverDef(ptr noundef nonnull align 8 dereferenceable(44) %12, ptr noundef %11)
          to label %118 unwind label %126

118:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #12
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %147, %118
  %120 = load i32, ptr %15, align 4, !tbaa !9
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.b2TimeStep, ptr %121, i32 0, i32 4
  %123 = load i32, ptr %122, align 4, !tbaa !49
  %124 = icmp slt i32 %120, %123
  br i1 %124, label %130, label %125

125:                                              ; preds = %119
  store i32 5, ptr %16, align 4
  br label %150

126:                                              ; preds = %151, %100
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %13, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %14, align 4
  br label %381

130:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #12
  %131 = load i32, ptr %7, align 4, !tbaa !9
  %132 = load i32, ptr %8, align 4, !tbaa !9
  %133 = invoke noundef zeroext i1 @_ZN15b2ContactSolver27SolveTOIPositionConstraintsEii(ptr noundef nonnull align 8 dereferenceable(44) %12, i32 noundef %131, i32 noundef %132)
          to label %134 unwind label %139

134:                                              ; preds = %130
  %135 = zext i1 %133 to i8
  store i8 %135, ptr %17, align 1, !tbaa !46
  %136 = load i8, ptr %17, align 1, !tbaa !46, !range !50, !noundef !51
  %137 = trunc i8 %136 to i1
  br i1 %137, label %138, label %143

138:                                              ; preds = %134
  store i32 5, ptr %16, align 4
  br label %144

139:                                              ; preds = %130
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %13, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #12
  br label %381

143:                                              ; preds = %134
  store i32 0, ptr %16, align 4
  br label %144

144:                                              ; preds = %143, %138
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #12
  %145 = load i32, ptr %16, align 4
  switch i32 %145, label %150 [
    i32 0, label %146
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %15, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %15, align 4, !tbaa !9
  br label %119, !llvm.loop !52

150:                                              ; preds = %144, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #12
  br label %151

151:                                              ; preds = %150
  %152 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %153 = load ptr, ptr %152, align 8, !tbaa !14
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds %struct.b2Position, ptr %153, i64 %155
  %157 = getelementptr inbounds %struct.b2Position, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 2
  %159 = load ptr, ptr %158, align 8, !tbaa !13
  %160 = load i32, ptr %7, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  %164 = getelementptr inbounds %class.b2Body, ptr %163, i32 0, i32 5
  %165 = getelementptr inbounds %struct.b2Sweep, ptr %164, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %165, ptr align 4 %157, i64 8, i1 false), !tbaa.struct !15
  %166 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %167 = load ptr, ptr %166, align 8, !tbaa !14
  %168 = load i32, ptr %7, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.b2Position, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.b2Position, ptr %170, i32 0, i32 1
  %172 = load float, ptr %171, align 4, !tbaa !28
  %173 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 2
  %174 = load ptr, ptr %173, align 8, !tbaa !13
  %175 = load i32, ptr %7, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds ptr, ptr %174, i64 %176
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  %179 = getelementptr inbounds %class.b2Body, ptr %178, i32 0, i32 5
  %180 = getelementptr inbounds %struct.b2Sweep, ptr %179, i32 0, i32 3
  store float %172, ptr %180, align 4, !tbaa !53
  %181 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %182 = load ptr, ptr %181, align 8, !tbaa !14
  %183 = load i32, ptr %8, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.b2Position, ptr %182, i64 %184
  %186 = getelementptr inbounds %struct.b2Position, ptr %185, i32 0, i32 0
  %187 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !13
  %189 = load i32, ptr %8, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds ptr, ptr %188, i64 %190
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  %193 = getelementptr inbounds %class.b2Body, ptr %192, i32 0, i32 5
  %194 = getelementptr inbounds %struct.b2Sweep, ptr %193, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %194, ptr align 4 %186, i64 8, i1 false), !tbaa.struct !15
  %195 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %196 = load ptr, ptr %195, align 8, !tbaa !14
  %197 = load i32, ptr %8, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds %struct.b2Position, ptr %196, i64 %198
  %200 = getelementptr inbounds %struct.b2Position, ptr %199, i32 0, i32 1
  %201 = load float, ptr %200, align 4, !tbaa !28
  %202 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 2
  %203 = load ptr, ptr %202, align 8, !tbaa !13
  %204 = load i32, ptr %8, align 4, !tbaa !9
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds ptr, ptr %203, i64 %205
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  %208 = getelementptr inbounds %class.b2Body, ptr %207, i32 0, i32 5
  %209 = getelementptr inbounds %struct.b2Sweep, ptr %208, i32 0, i32 3
  store float %201, ptr %209, align 4, !tbaa !53
  invoke void @_ZN15b2ContactSolver29InitializeVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44) %12)
          to label %210 unwind label %126

210:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #12
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %211

211:                                              ; preds = %220, %210
  %212 = load i32, ptr %18, align 4, !tbaa !9
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.b2TimeStep, ptr %213, i32 0, i32 3
  %215 = load i32, ptr %214, align 4, !tbaa !54
  %216 = icmp slt i32 %212, %215
  br i1 %216, label %218, label %217

217:                                              ; preds = %211
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #12
  br label %227

218:                                              ; preds = %211
  invoke void @_ZN15b2ContactSolver24SolveVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44) %12)
          to label %219 unwind label %223

219:                                              ; preds = %218
  br label %220

220:                                              ; preds = %219
  %221 = load i32, ptr %18, align 4, !tbaa !9
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %18, align 4, !tbaa !9
  br label %211, !llvm.loop !55

223:                                              ; preds = %218
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %13, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #12
  br label %381

227:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #12
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.b2TimeStep, ptr %228, i32 0, i32 0
  %230 = load float, ptr %229, align 4, !tbaa !56
  store float %230, ptr %19, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #12
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %231

231:                                              ; preds = %359, %227
  %232 = load i32, ptr %20, align 4, !tbaa !9
  %233 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 7
  %234 = load i32, ptr %233, align 8, !tbaa !11
  %235 = icmp slt i32 %232, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %231
  store i32 11, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #12
  br label %372

237:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #12
  %238 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %239 = load ptr, ptr %238, align 8, !tbaa !14
  %240 = load i32, ptr %20, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds %struct.b2Position, ptr %239, i64 %241
  %243 = getelementptr inbounds %struct.b2Position, ptr %242, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %243, i64 8, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #12
  %244 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %245 = load ptr, ptr %244, align 8, !tbaa !14
  %246 = load i32, ptr %20, align 4, !tbaa !9
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds %struct.b2Position, ptr %245, i64 %247
  %249 = getelementptr inbounds %struct.b2Position, ptr %248, i32 0, i32 1
  %250 = load float, ptr %249, align 4, !tbaa !28
  store float %250, ptr %22, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #12
  %251 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 6
  %252 = load ptr, ptr %251, align 8, !tbaa !30
  %253 = load i32, ptr %20, align 4, !tbaa !9
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds %struct.b2Velocity, ptr %252, i64 %254
  %256 = getelementptr inbounds %struct.b2Velocity, ptr %255, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %256, i64 8, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #12
  %257 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 6
  %258 = load ptr, ptr %257, align 8, !tbaa !30
  %259 = load i32, ptr %20, align 4, !tbaa !9
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds %struct.b2Velocity, ptr %258, i64 %260
  %262 = getelementptr inbounds %struct.b2Velocity, ptr %261, i32 0, i32 1
  %263 = load float, ptr %262, align 4, !tbaa !32
  store float %263, ptr %24, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #12
  %264 = load float, ptr %19, align 4, !tbaa !16
  %265 = invoke <2 x float> @_ZmlfRK6b2Vec2(float noundef %264, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %266 unwind label %276

266:                                              ; preds = %237
  store <2 x float> %265, ptr %25, align 4
  %267 = invoke noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %268 unwind label %276

268:                                              ; preds = %266
  %269 = fcmp ogt float %267, 4.000000e+00
  br i1 %269, label %270, label %284

270:                                              ; preds = %268
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #12
  %271 = invoke noundef float @_ZNK6b2Vec26LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %25)
          to label %272 unwind label %280

272:                                              ; preds = %270
  %273 = fdiv float 2.000000e+00, %271
  store float %273, ptr %26, align 4, !tbaa !16
  %274 = load float, ptr %26, align 4, !tbaa !16
  invoke void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %23, float noundef %274)
          to label %275 unwind label %280

275:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #12
  br label %284

276:                                              ; preds = %266, %237
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %13, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %14, align 4
  br label %371

280:                                              ; preds = %272, %270
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %13, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #12
  br label %371

284:                                              ; preds = %275, %268
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #12
  %285 = load float, ptr %19, align 4, !tbaa !16
  %286 = load float, ptr %24, align 4, !tbaa !16
  %287 = fmul float %285, %286
  store float %287, ptr %27, align 4, !tbaa !16
  %288 = load float, ptr %27, align 4, !tbaa !16
  %289 = load float, ptr %27, align 4, !tbaa !16
  %290 = fmul float %288, %289
  %291 = fcmp ogt float %290, 0x4003BD3CE0000000
  br i1 %291, label %292, label %304

292:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #12
  %293 = load float, ptr %27, align 4, !tbaa !16
  %294 = invoke noundef float @_Z5b2AbsIfET_S0_(float noundef %293)
          to label %295 unwind label %300

295:                                              ; preds = %292
  %296 = fdiv float 0x3FF921FB60000000, %294
  store float %296, ptr %28, align 4, !tbaa !16
  %297 = load float, ptr %28, align 4, !tbaa !16
  %298 = load float, ptr %24, align 4, !tbaa !16
  %299 = fmul float %298, %297
  store float %299, ptr %24, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #12
  br label %304

300:                                              ; preds = %292
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %13, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #12
  br label %370

304:                                              ; preds = %295, %284
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #12
  %305 = load float, ptr %19, align 4, !tbaa !16
  %306 = invoke <2 x float> @_ZmlfRK6b2Vec2(float noundef %305, ptr noundef nonnull align 4 dereferenceable(8) %23)
          to label %307 unwind label %362

307:                                              ; preds = %304
  store <2 x float> %306, ptr %29, align 4
  invoke void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %308 unwind label %362

308:                                              ; preds = %307
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #12
  %309 = load float, ptr %19, align 4, !tbaa !16
  %310 = load float, ptr %24, align 4, !tbaa !16
  %311 = load float, ptr %22, align 4, !tbaa !16
  %312 = call float @llvm.fmuladd.f32(float %309, float %310, float %311)
  store float %312, ptr %22, align 4, !tbaa !16
  %313 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %314 = load ptr, ptr %313, align 8, !tbaa !14
  %315 = load i32, ptr %20, align 4, !tbaa !9
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds %struct.b2Position, ptr %314, i64 %316
  %318 = getelementptr inbounds %struct.b2Position, ptr %317, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %318, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !15
  %319 = load float, ptr %22, align 4, !tbaa !16
  %320 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 5
  %321 = load ptr, ptr %320, align 8, !tbaa !14
  %322 = load i32, ptr %20, align 4, !tbaa !9
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds %struct.b2Position, ptr %321, i64 %323
  %325 = getelementptr inbounds %struct.b2Position, ptr %324, i32 0, i32 1
  store float %319, ptr %325, align 4, !tbaa !28
  %326 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 6
  %327 = load ptr, ptr %326, align 8, !tbaa !30
  %328 = load i32, ptr %20, align 4, !tbaa !9
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds %struct.b2Velocity, ptr %327, i64 %329
  %331 = getelementptr inbounds %struct.b2Velocity, ptr %330, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %331, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !15
  %332 = load float, ptr %24, align 4, !tbaa !16
  %333 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 6
  %334 = load ptr, ptr %333, align 8, !tbaa !30
  %335 = load i32, ptr %20, align 4, !tbaa !9
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds %struct.b2Velocity, ptr %334, i64 %336
  %338 = getelementptr inbounds %struct.b2Velocity, ptr %337, i32 0, i32 1
  store float %332, ptr %338, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #12
  %339 = getelementptr inbounds %class.b2Island, ptr %31, i32 0, i32 2
  %340 = load ptr, ptr %339, align 8, !tbaa !13
  %341 = load i32, ptr %20, align 4, !tbaa !9
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds ptr, ptr %340, i64 %342
  %344 = load ptr, ptr %343, align 8, !tbaa !5
  store ptr %344, ptr %30, align 8, !tbaa !5
  %345 = load ptr, ptr %30, align 8, !tbaa !5
  %346 = getelementptr inbounds %class.b2Body, ptr %345, i32 0, i32 5
  %347 = getelementptr inbounds %struct.b2Sweep, ptr %346, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %347, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !15
  %348 = load float, ptr %22, align 4, !tbaa !16
  %349 = load ptr, ptr %30, align 8, !tbaa !5
  %350 = getelementptr inbounds %class.b2Body, ptr %349, i32 0, i32 5
  %351 = getelementptr inbounds %struct.b2Sweep, ptr %350, i32 0, i32 4
  store float %348, ptr %351, align 4, !tbaa !18
  %352 = load ptr, ptr %30, align 8, !tbaa !5
  %353 = getelementptr inbounds %class.b2Body, ptr %352, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %353, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !15
  %354 = load float, ptr %24, align 4, !tbaa !16
  %355 = load ptr, ptr %30, align 8, !tbaa !5
  %356 = getelementptr inbounds %class.b2Body, ptr %355, i32 0, i32 7
  store float %354, ptr %356, align 8, !tbaa !31
  %357 = load ptr, ptr %30, align 8, !tbaa !5
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %357)
          to label %358 unwind label %366

358:                                              ; preds = %308
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #12
  br label %359

359:                                              ; preds = %358
  %360 = load i32, ptr %20, align 4, !tbaa !9
  %361 = add nsw i32 %360, 1
  store i32 %361, ptr %20, align 4, !tbaa !9
  br label %231, !llvm.loop !57

362:                                              ; preds = %307, %304
  %363 = landingpad { ptr, i32 }
          cleanup
  %364 = extractvalue { ptr, i32 } %363, 0
  store ptr %364, ptr %13, align 8
  %365 = extractvalue { ptr, i32 } %363, 1
  store i32 %365, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #12
  br label %370

366:                                              ; preds = %308
  %367 = landingpad { ptr, i32 }
          cleanup
  %368 = extractvalue { ptr, i32 } %367, 0
  store ptr %368, ptr %13, align 8
  %369 = extractvalue { ptr, i32 } %367, 1
  store i32 %369, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #12
  br label %370

370:                                              ; preds = %366, %362, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #12
  br label %371

371:                                              ; preds = %370, %280, %276
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #12
  br label %380

372:                                              ; preds = %236
  %373 = getelementptr inbounds %class.b2ContactSolver, ptr %12, i32 0, i32 4
  %374 = load ptr, ptr %373, align 8, !tbaa !58
  invoke void @_ZN8b2Island6ReportEPK27b2ContactVelocityConstraint(ptr noundef nonnull align 8 dereferenceable(80) %31, ptr noundef %374)
          to label %375 unwind label %376

375:                                              ; preds = %372
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #12
  call void @_ZN15b2ContactSolverD1Ev(ptr noundef nonnull align 8 dereferenceable(44) %12) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr %11) #12
  ret void

376:                                              ; preds = %372
  %377 = landingpad { ptr, i32 }
          cleanup
  %378 = extractvalue { ptr, i32 } %377, 0
  store ptr %378, ptr %13, align 8
  %379 = extractvalue { ptr, i32 } %377, 1
  store i32 %379, ptr %14, align 4
  br label %380

380:                                              ; preds = %376, %371
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #12
  br label %381

381:                                              ; preds = %380, %223, %139, %126
  call void @_ZN15b2ContactSolverD1Ev(ptr noundef nonnull align 8 dereferenceable(44) %12) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr %11) #12
  br label %382

382:                                              ; preds = %381
  %383 = load ptr, ptr %13, align 8
  %384 = load i32, ptr %14, align 4
  %385 = insertvalue { ptr, i32 } poison, ptr %383, 0
  %386 = insertvalue { ptr, i32 } %385, i32 %384, 1
  resume { ptr, i32 } %386
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #10

declare noundef zeroext i1 @_ZN15b2ContactSolver27SolveTOIPositionConstraintsEii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind "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 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { noreturn nounwind "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 #11 = { noreturn nounwind }
attributes #12 = { 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, !10, i64 56}
!12 = !{!"_ZTS8b2Island", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76}
!13 = !{!12, !6, i64 16}
!14 = !{!12, !6, i64 40}
!15 = !{i64 0, i64 4, !16, i64 4, i64 4, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!19, !17, i64 72}
!19 = !{!"_ZTS6b2Body", !20, i64 0, !21, i64 4, !10, i64 8, !22, i64 12, !22, i64 28, !25, i64 44, !23, i64 80, !17, i64 88, !23, i64 92, !17, i64 100, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !10, i64 136, !6, i64 144, !6, i64 152, !10, i64 160, !10, i64 164, !17, i64 168, !17, i64 172, !17, i64 176, !17, i64 180, !17, i64 184, !17, i64 188, !17, i64 192, !17, i64 196, !26, i64 200}
!20 = !{!"_ZTS10b2BodyType", !7, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ZTS11b2Transform", !23, i64 0, !24, i64 8}
!23 = !{!"_ZTS6b2Vec2", !17, i64 0, !17, i64 4}
!24 = !{!"_ZTS5b2Rot", !17, i64 0, !17, i64 4}
!25 = !{!"_ZTS7b2Sweep", !23, i64 0, !23, i64 8, !23, i64 16, !17, i64 24, !17, i64 28, !17, i64 32}
!26 = !{!"_ZTS14b2BodyUserData", !27, i64 0}
!27 = !{!"long", !7, i64 0}
!28 = !{!29, !17, i64 8}
!29 = !{!"_ZTS10b2Position", !23, i64 0, !17, i64 8}
!30 = !{!12, !6, i64 48}
!31 = !{!19, !17, i64 88}
!32 = !{!33, !17, i64 8}
!33 = !{!"_ZTS10b2Velocity", !23, i64 0, !17, i64 8}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!12, !6, i64 24}
!37 = !{!38, !6, i64 32}
!38 = !{!"_ZTS18b2ContactSolverDef", !39, i64 0, !6, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!39 = !{!"_ZTS10b2TimeStep", !17, i64 0, !17, i64 4, !17, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !40, i64 24}
!40 = !{!"bool", !7, i64 0}
!41 = !{!12, !10, i64 64}
!42 = !{!38, !10, i64 40}
!43 = !{!12, !6, i64 0}
!44 = !{!38, !6, i64 64}
!45 = !{i64 0, i64 4, !16, i64 4, i64 4, !16, i64 8, i64 4, !16, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 4, !9, i64 24, i64 1, !46}
!46 = !{!40, !40, i64 0}
!47 = !{!38, !6, i64 48}
!48 = !{!38, !6, i64 56}
!49 = !{!39, !10, i64 16}
!50 = !{i8 0, i8 2}
!51 = !{}
!52 = distinct !{!52, !35}
!53 = !{!19, !17, i64 68}
!54 = !{!39, !10, i64 12}
!55 = distinct !{!55, !35}
!56 = !{!39, !17, i64 0}
!57 = distinct !{!57, !35}
!58 = !{!59, !6, i64 32}
!59 = !{!"_ZTS15b2ContactSolver", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b2ContactSolverDef = type { %struct.b2TimeStep, ptr, i32, ptr, ptr, ptr }
%struct.b2TimeStep = type { float, float, float, i32, i32, i32, i8 }
%class.b2ContactSolver = type <{ ptr, ptr, ptr, ptr, ptr, i32, [4 x i8] }>
%struct.b2Vec2 = type { float, float }
%struct.b2Position = type { %struct.b2Vec2, float }
%struct.b2Velocity = type { %struct.b2Vec2, float }

@.str = external hidden unnamed_addr constant [24 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1
@__PRETTY_FUNCTION__._ZN8b2Island8SolveTOIERK10b2TimeStepii = external hidden unnamed_addr constant [58 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZmlfRK6b2Vec2(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6b2Vec26LengthEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #3 align 2

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

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

declare void @_ZN15b2ContactSolverC1Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #6

declare void @_ZN15b2ContactSolver10InitializeEP18b2ContactSolverDef(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef) local_unnamed_addr #6

declare void @_ZN15b2ContactSolver29InitializeVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #6

declare void @_ZN15b2ContactSolver24SolveVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8b2Island6ReportEPK27b2ContactVelocityConstraint(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #7 align 2

; Function Attrs: nounwind
declare void @_ZN15b2ContactSolverD1Ev(ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8b2Island8SolveTOIERK10b2TimeStepii(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(28) %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #9 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.b2ContactSolverDef, align 8
  %6 = alloca %class.b2ContactSolver, align 8
  %7 = alloca %struct.b2Vec2, align 8
  %8 = alloca %struct.b2Vec2, align 8
  %9 = alloca %struct.b2Vec2, align 8
  %10 = alloca %struct.b2Vec2, align 8
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  %12 = load i32, ptr %11, align 8, !tbaa !5
  %13 = icmp sgt i32 %12, %2
  br i1 %13, label %15, label %14

14:                                               ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 488, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8b2Island8SolveTOIERK10b2TimeStepii) #11
  unreachable

15:                                               ; preds = %4
  %16 = icmp sgt i32 %12, %3
  br i1 %16, label %.preheader87, label %21

.preheader87:                                     ; preds = %15
  %17 = icmp sgt i32 %12, 0
  br i1 %17, label %.lr.ph, label %.preheader87.._crit_edge_crit_edge

.preheader87.._crit_edge_crit_edge:               ; preds = %.preheader87
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 48
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !11
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader87
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  br label %39

21:                                               ; preds = %15
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 489, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8b2Island8SolveTOIERK10b2TimeStepii) #11
  unreachable

._crit_edge:                                      ; preds = %39, %.preheader87.._crit_edge_crit_edge
  %22 = phi ptr [ %.pre, %.preheader87.._crit_edge_crit_edge ], [ %57, %39 ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #12
  %23 = getelementptr inbounds i8, ptr %0, i64 24
  %24 = load ptr, ptr %23, align 8, !tbaa !12
  %25 = getelementptr inbounds i8, ptr %5, i64 32
  store ptr %24, ptr %25, align 8, !tbaa !13
  %26 = getelementptr inbounds i8, ptr %0, i64 64
  %27 = load i32, ptr %26, align 8, !tbaa !18
  %28 = getelementptr inbounds i8, ptr %5, i64 40
  store i32 %27, ptr %28, align 8, !tbaa !19
  %29 = load ptr, ptr %0, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %5, i64 64
  store ptr %29, ptr %30, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 4 dereferenceable(28) %1, i64 28, i1 false), !tbaa.struct !22
  %31 = getelementptr inbounds i8, ptr %0, i64 40
  %32 = load ptr, ptr %31, align 8, !tbaa !26
  %33 = getelementptr inbounds i8, ptr %5, i64 48
  store ptr %32, ptr %33, align 8, !tbaa !27
  %34 = getelementptr inbounds i8, ptr %0, i64 48
  %35 = getelementptr inbounds i8, ptr %5, i64 56
  store ptr %22, ptr %35, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #12
  call void @_ZN15b2ContactSolverC1Ev(ptr noundef nonnull align 8 dereferenceable(44) %6)
  invoke void @_ZN15b2ContactSolver10InitializeEP18b2ContactSolverDef(ptr noundef nonnull align 8 dereferenceable(44) %6, ptr noundef nonnull %5)
          to label %.preheader86 unwind label %66

.preheader86:                                     ; preds = %._crit_edge
  %36 = getelementptr inbounds i8, ptr %1, i64 16
  %37 = load i32, ptr %36, align 4, !tbaa !29
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph90, label %._crit_edge91

39:                                               ; preds = %.lr.ph, %39
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %39 ]
  %40 = load ptr, ptr %18, align 8, !tbaa !30
  %41 = getelementptr inbounds ptr, ptr %40, i64 %indvars.iv
  %42 = load ptr, ptr %41, align 8, !tbaa !31
  %43 = getelementptr inbounds i8, ptr %42, i64 60
  %44 = load ptr, ptr %19, align 8, !tbaa !26
  %45 = getelementptr inbounds %struct.b2Position, ptr %44, i64 %indvars.iv
  %46 = load i64, ptr %43, align 4
  store i64 %46, ptr %45, align 4
  %47 = getelementptr inbounds i8, ptr %42, i64 72
  %48 = load float, ptr %47, align 4, !tbaa !32
  %49 = load ptr, ptr %19, align 8, !tbaa !26
  %50 = getelementptr inbounds %struct.b2Position, ptr %49, i64 %indvars.iv, i32 1
  store float %48, ptr %50, align 4, !tbaa !42
  %51 = getelementptr inbounds i8, ptr %42, i64 80
  %52 = load ptr, ptr %20, align 8, !tbaa !11
  %53 = getelementptr inbounds %struct.b2Velocity, ptr %52, i64 %indvars.iv
  %54 = load i64, ptr %51, align 8
  store i64 %54, ptr %53, align 4
  %55 = getelementptr inbounds i8, ptr %42, i64 88
  %56 = load float, ptr %55, align 8, !tbaa !44
  %57 = load ptr, ptr %20, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.b2Velocity, ptr %57, i64 %indvars.iv, i32 1
  store float %56, ptr %58, align 4, !tbaa !45
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %59 = load i32, ptr %11, align 8, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next, %60
  br i1 %61, label %39, label %._crit_edge, !llvm.loop !47

62:                                               ; preds = %71
  %63 = add nuw nsw i32 %.07389, 1
  %64 = load i32, ptr %36, align 4, !tbaa !29
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %.lr.ph90, label %._crit_edge91, !llvm.loop !49

66:                                               ; preds = %._crit_edge91, %._crit_edge
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %177

.lr.ph90:                                         ; preds = %.preheader86, %62
  %.07389 = phi i32 [ %63, %62 ], [ 0, %.preheader86 ]
  %68 = invoke noundef zeroext i1 @_ZN15b2ContactSolver27SolveTOIPositionConstraintsEii(ptr noundef nonnull align 8 dereferenceable(44) %6, i32 noundef %2, i32 noundef %3)
          to label %71 unwind label %69

69:                                               ; preds = %.lr.ph90
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %177

71:                                               ; preds = %.lr.ph90
  br i1 %68, label %._crit_edge91, label %62

._crit_edge91:                                    ; preds = %71, %62, %.preheader86
  %72 = load ptr, ptr %31, align 8, !tbaa !26
  %73 = sext i32 %2 to i64
  %74 = getelementptr inbounds %struct.b2Position, ptr %72, i64 %73
  %75 = getelementptr inbounds i8, ptr %0, i64 16
  %76 = load ptr, ptr %75, align 8, !tbaa !30
  %77 = getelementptr inbounds ptr, ptr %76, i64 %73
  %78 = load ptr, ptr %77, align 8, !tbaa !31
  %79 = getelementptr inbounds i8, ptr %78, i64 52
  %80 = load i64, ptr %74, align 4
  store i64 %80, ptr %79, align 4
  %81 = load ptr, ptr %31, align 8, !tbaa !26
  %82 = getelementptr inbounds %struct.b2Position, ptr %81, i64 %73, i32 1
  %83 = load float, ptr %82, align 4, !tbaa !42
  %84 = load ptr, ptr %75, align 8, !tbaa !30
  %85 = getelementptr inbounds ptr, ptr %84, i64 %73
  %86 = load ptr, ptr %85, align 8, !tbaa !31
  %87 = getelementptr inbounds i8, ptr %86, i64 68
  store float %83, ptr %87, align 4, !tbaa !50
  %88 = sext i32 %3 to i64
  %89 = getelementptr inbounds %struct.b2Position, ptr %81, i64 %88
  %90 = getelementptr inbounds ptr, ptr %84, i64 %88
  %91 = load ptr, ptr %90, align 8, !tbaa !31
  %92 = getelementptr inbounds i8, ptr %91, i64 52
  %93 = load i64, ptr %89, align 4
  store i64 %93, ptr %92, align 4
  %94 = load ptr, ptr %31, align 8, !tbaa !26
  %95 = getelementptr inbounds %struct.b2Position, ptr %94, i64 %88, i32 1
  %96 = load float, ptr %95, align 4, !tbaa !42
  %97 = load ptr, ptr %75, align 8, !tbaa !30
  %98 = getelementptr inbounds ptr, ptr %97, i64 %88
  %99 = load ptr, ptr %98, align 8, !tbaa !31
  %100 = getelementptr inbounds i8, ptr %99, i64 68
  store float %96, ptr %100, align 4, !tbaa !50
  invoke void @_ZN15b2ContactSolver29InitializeVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44) %6)
          to label %.preheader unwind label %66

.preheader:                                       ; preds = %._crit_edge91
  %101 = getelementptr inbounds i8, ptr %1, i64 12
  %102 = load i32, ptr %101, align 4, !tbaa !51
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph94, label %._crit_edge95

._crit_edge95:                                    ; preds = %107, %.preheader
  %104 = load float, ptr %1, align 4, !tbaa !52
  %105 = load i32, ptr %11, align 8, !tbaa !5
  %106 = icmp sgt i32 %105, 0
  br i1 %106, label %.lr.ph98, label %._crit_edge99

.lr.ph94:                                         ; preds = %.preheader, %107
  %.07793 = phi i32 [ %108, %107 ], [ 0, %.preheader ]
  invoke void @_ZN15b2ContactSolver24SolveVelocityConstraintsEv(ptr noundef nonnull align 8 dereferenceable(44) %6)
          to label %107 unwind label %111

107:                                              ; preds = %.lr.ph94
  %108 = add nuw nsw i32 %.07793, 1
  %109 = load i32, ptr %101, align 4, !tbaa !51
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %.lr.ph94, label %._crit_edge95, !llvm.loop !53

111:                                              ; preds = %.lr.ph94
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %177

._crit_edge99:                                    ; preds = %165, %._crit_edge95
  %113 = getelementptr inbounds i8, ptr %6, i64 32
  %114 = load ptr, ptr %113, align 8, !tbaa !54
  invoke void @_ZN8b2Island6ReportEPK27b2ContactVelocityConstraint(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %114)
          to label %174 unwind label %175

.lr.ph98:                                         ; preds = %._crit_edge95, %165
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %165 ], [ 0, %._crit_edge95 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #12
  %115 = load ptr, ptr %31, align 8, !tbaa !26
  %116 = getelementptr inbounds %struct.b2Position, ptr %115, i64 %indvars.iv101
  %117 = load i64, ptr %116, align 4
  store i64 %117, ptr %7, align 8
  %118 = getelementptr inbounds %struct.b2Position, ptr %115, i64 %indvars.iv101, i32 1
  %119 = load float, ptr %118, align 4, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #12
  %120 = load ptr, ptr %34, align 8, !tbaa !11
  %121 = getelementptr inbounds %struct.b2Velocity, ptr %120, i64 %indvars.iv101
  %122 = load i64, ptr %121, align 4
  store i64 %122, ptr %8, align 8
  %123 = getelementptr inbounds %struct.b2Velocity, ptr %120, i64 %indvars.iv101, i32 1
  %124 = load float, ptr %123, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #12
  %125 = invoke <2 x float> @_ZmlfRK6b2Vec2(float noundef %104, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %126 unwind label %132

126:                                              ; preds = %.lr.ph98
  store <2 x float> %125, ptr %9, align 8
  %127 = call noundef float @_Z5b2DotRK6b2Vec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(8) %9)
  %128 = fcmp ogt float %127, 4.000000e+00
  br i1 %128, label %129, label %134

129:                                              ; preds = %126
  %130 = call noundef float @_ZNK6b2Vec26LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  %131 = fdiv float 2.000000e+00, %130
  call void @_ZN6b2Vec2mLEf(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %131)
  br label %134

132:                                              ; preds = %.lr.ph98
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %173

134:                                              ; preds = %129, %126
  %135 = fmul float %104, %124
  %136 = fmul float %135, %135
  %137 = fcmp ogt float %136, 0x4003BD3CE0000000
  br i1 %137, label %138, label %142

138:                                              ; preds = %134
  %139 = call noundef float @_Z5b2AbsIfET_S0_(float noundef %135)
  %140 = fdiv float 0x3FF921FB60000000, %139
  %141 = fmul float %124, %140
  br label %142

142:                                              ; preds = %138, %134
  %.074 = phi float [ %141, %138 ], [ %124, %134 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #12
  %143 = invoke <2 x float> @_ZmlfRK6b2Vec2(float noundef %104, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %144 unwind label %169

144:                                              ; preds = %142
  store <2 x float> %143, ptr %10, align 8
  call void @_ZN6b2Vec2pLERKS_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #12
  %145 = call float @llvm.fmuladd.f32(float %104, float %.074, float %119)
  %146 = load ptr, ptr %31, align 8, !tbaa !26
  %147 = getelementptr inbounds %struct.b2Position, ptr %146, i64 %indvars.iv101
  %148 = load i64, ptr %7, align 8
  store i64 %148, ptr %147, align 4
  %149 = load ptr, ptr %31, align 8, !tbaa !26
  %150 = getelementptr inbounds %struct.b2Position, ptr %149, i64 %indvars.iv101, i32 1
  store float %145, ptr %150, align 4, !tbaa !42
  %151 = load ptr, ptr %34, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct.b2Velocity, ptr %151, i64 %indvars.iv101
  %153 = load i64, ptr %8, align 8
  store i64 %153, ptr %152, align 4
  %154 = load ptr, ptr %34, align 8, !tbaa !11
  %155 = getelementptr inbounds %struct.b2Velocity, ptr %154, i64 %indvars.iv101, i32 1
  store float %.074, ptr %155, align 4, !tbaa !45
  %156 = load ptr, ptr %75, align 8, !tbaa !30
  %157 = getelementptr inbounds ptr, ptr %156, i64 %indvars.iv101
  %158 = load ptr, ptr %157, align 8, !tbaa !31
  %159 = getelementptr inbounds i8, ptr %158, i64 60
  %160 = load i64, ptr %7, align 8
  store i64 %160, ptr %159, align 4
  %161 = getelementptr inbounds i8, ptr %158, i64 72
  store float %145, ptr %161, align 4, !tbaa !32
  %162 = getelementptr inbounds i8, ptr %158, i64 80
  %163 = load i64, ptr %8, align 8
  store i64 %163, ptr %162, align 8
  %164 = getelementptr inbounds i8, ptr %158, i64 88
  store float %.074, ptr %164, align 8, !tbaa !44
  invoke void @_ZN6b2Body20SynchronizeTransformEv(ptr noundef nonnull align 8 dereferenceable(208) %158)
          to label %165 unwind label %171

165:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #12
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %166 = load i32, ptr %11, align 8, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = icmp slt i64 %indvars.iv.next102, %167
  br i1 %168, label %.lr.ph98, label %._crit_edge99, !llvm.loop !56

169:                                              ; preds = %142
  %170 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #12
  br label %173

171:                                              ; preds = %144
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %173

173:                                              ; preds = %169, %171, %132
  %.pn.pn = phi { ptr, i32 } [ %133, %132 ], [ %172, %171 ], [ %170, %169 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #12
  br label %177

174:                                              ; preds = %._crit_edge99
  call void @_ZN15b2ContactSolverD1Ev(ptr noundef nonnull align 8 dereferenceable(44) %6) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #12
  ret void

175:                                              ; preds = %._crit_edge99
  %176 = landingpad { ptr, i32 }
          cleanup
  br label %177

177:                                              ; preds = %173, %175, %111, %69, %66
  %.pn84 = phi { ptr, i32 } [ %112, %111 ], [ %67, %66 ], [ %70, %69 ], [ %.pn.pn, %173 ], [ %176, %175 ]
  call void @_ZN15b2ContactSolverD1Ev(ptr noundef nonnull align 8 dereferenceable(44) %6) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #12
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #12
  resume { ptr, i32 } %.pn84
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #10

declare noundef zeroext i1 @_ZN15b2ContactSolver27SolveTOIPositionConstraintsEii(ptr noundef nonnull align 8 dereferenceable(44), i32 noundef, i32 noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind "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 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { noreturn nounwind "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 #11 = { noreturn nounwind }
attributes #12 = { 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, !10, i64 56}
!6 = !{!"_ZTS8b2Island", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 48}
!12 = !{!6, !7, i64 24}
!13 = !{!14, !7, i64 32}
!14 = !{!"_ZTS18b2ContactSolverDef", !15, i64 0, !7, i64 32, !10, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!15 = !{!"_ZTS10b2TimeStep", !16, i64 0, !16, i64 4, !16, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !17, i64 24}
!16 = !{!"float", !8, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{!6, !10, i64 64}
!19 = !{!14, !10, i64 40}
!20 = !{!6, !7, i64 0}
!21 = !{!14, !7, i64 64}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !23, i64 8, i64 4, !23, i64 12, i64 4, !24, i64 16, i64 4, !24, i64 20, i64 4, !24, i64 24, i64 1, !25}
!23 = !{!16, !16, i64 0}
!24 = !{!10, !10, i64 0}
!25 = !{!17, !17, i64 0}
!26 = !{!6, !7, i64 40}
!27 = !{!14, !7, i64 48}
!28 = !{!14, !7, i64 56}
!29 = !{!15, !10, i64 16}
!30 = !{!6, !7, i64 16}
!31 = !{!7, !7, i64 0}
!32 = !{!33, !16, i64 72}
!33 = !{!"_ZTS6b2Body", !34, i64 0, !35, i64 4, !10, i64 8, !36, i64 12, !36, i64 28, !39, i64 44, !37, i64 80, !16, i64 88, !37, i64 92, !16, i64 100, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !10, i64 136, !7, i64 144, !7, i64 152, !10, i64 160, !10, i64 164, !16, i64 168, !16, i64 172, !16, i64 176, !16, i64 180, !16, i64 184, !16, i64 188, !16, i64 192, !16, i64 196, !40, i64 200}
!34 = !{!"_ZTS10b2BodyType", !8, i64 0}
!35 = !{!"short", !8, i64 0}
!36 = !{!"_ZTS11b2Transform", !37, i64 0, !38, i64 8}
!37 = !{!"_ZTS6b2Vec2", !16, i64 0, !16, i64 4}
!38 = !{!"_ZTS5b2Rot", !16, i64 0, !16, i64 4}
!39 = !{!"_ZTS7b2Sweep", !37, i64 0, !37, i64 8, !37, i64 16, !16, i64 24, !16, i64 28, !16, i64 32}
!40 = !{!"_ZTS14b2BodyUserData", !41, i64 0}
!41 = !{!"long", !8, i64 0}
!42 = !{!43, !16, i64 8}
!43 = !{!"_ZTS10b2Position", !37, i64 0, !16, i64 8}
!44 = !{!33, !16, i64 88}
!45 = !{!46, !16, i64 8}
!46 = !{!"_ZTS10b2Velocity", !37, i64 0, !16, i64 8}
!47 = distinct !{!47, !48}
!48 = !{!"llvm.loop.mustprogress"}
!49 = distinct !{!49, !48}
!50 = !{!33, !16, i64 68}
!51 = !{!15, !10, i64 12}
!52 = !{!15, !16, i64 0}
!53 = distinct !{!53, !48}
!54 = !{!55, !7, i64 32}
!55 = !{!"_ZTS15b2ContactSolver", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40}
!56 = distinct !{!56, !48}


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