; LLVM IR from SOHNE/Dura2D :: src/collision/d2Constraint.ll (ZN17d2JointConstraint8PreSolveEf)

; 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.d2Vec2 = type { float, float }
%struct.d2MatMN = type { i32, i32, ptr }
%struct.d2VecN = type { i32, ptr }
%class.d2Constraint = type { ptr, ptr, ptr, %struct.d2Vec2, %struct.d2Vec2, ptr, ptr }
%class.d2JointConstraint = type <{ %class.d2Constraint, %struct.d2MatMN, %struct.d2VecN, float, [4 x i8] }>

declare void @_ZN7d2MatMN4ZeroEv(ptr noundef nonnull align 8 dereferenceable(16)) #0

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #0

; Function Attrs: nounwind
declare void @_ZN7d2MatMND1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN6d2VecND1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17d2JointConstraint8PreSolveEf(ptr noundef nonnull align 8 dereferenceable(92) %0, float noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca %struct.d2Vec2, align 4
  %6 = alloca %struct.d2Vec2, align 4
  %7 = alloca %struct.d2Vec2, align 4
  %8 = alloca %struct.d2Vec2, align 4
  %9 = alloca %struct.d2Vec2, align 4
  %10 = alloca %struct.d2Vec2, align 4
  %11 = alloca float, align 4
  %12 = alloca %struct.d2Vec2, align 4
  %13 = alloca %struct.d2Vec2, align 4
  %14 = alloca %struct.d2Vec2, align 4
  %15 = alloca float, align 4
  %16 = alloca %struct.d2Vec2, align 4
  %17 = alloca %struct.d2MatMN, align 8
  %18 = alloca %struct.d2VecN, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %struct.d2Vec2, align 4
  %22 = alloca %struct.d2Vec2, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca %struct.d2Vec2, align 4
  %26 = alloca %struct.d2Vec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %27 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %28 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 3
  %31 = call <2 x float> @_ZNK6d2Body22LocalSpaceToWorldSpaceERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %29, ptr noundef nonnull align 4 dereferenceable(8) %30)
  store <2 x float> %31, ptr %5, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %32 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 4
  %35 = call <2 x float> @_ZNK6d2Body22LocalSpaceToWorldSpaceERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %33, ptr noundef nonnull align 4 dereferenceable(8) %34)
  store <2 x float> %35, ptr %6, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %36 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !11
  %38 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %37)
  %39 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %38)
  store <2 x float> %39, ptr %7, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %40 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  %42 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %41)
  %43 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %42)
  store <2 x float> %43, ptr %8, align 4
  %44 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  call void @_ZN7d2MatMN4ZeroEv(ptr noundef nonnull align 8 dereferenceable(16) %44)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %45 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %45, ptr %10, align 4
  %46 = call <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 2.000000e+00)
  store <2 x float> %46, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %47 = getelementptr inbounds %struct.d2Vec2, ptr %9, i32 0, i32 0
  %48 = load float, ptr %47, align 4, !tbaa !15
  %49 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  %50 = getelementptr inbounds %struct.d2MatMN, ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = getelementptr inbounds %struct.d2VecN, ptr %51, i64 0
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %52, i32 noundef 0)
  store float %48, ptr %53, align 4, !tbaa !9
  %54 = getelementptr inbounds %struct.d2Vec2, ptr %9, i32 0, i32 1
  %55 = load float, ptr %54, align 4, !tbaa !21
  %56 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  %57 = getelementptr inbounds %struct.d2MatMN, ptr %56, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !16
  %59 = getelementptr inbounds %struct.d2VecN, ptr %58, i64 0
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %59, i32 noundef 1)
  store float %55, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %61 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %61, ptr %12, align 4
  %62 = call noundef float @_ZNK6d2Vec25CrossERKS_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %63 = fpext float %62 to double
  %64 = fmul double %63, 2.000000e+00
  %65 = fptrunc double %64 to float
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  store float %65, ptr %11, align 4, !tbaa !9
  %66 = load float, ptr %11, align 4, !tbaa !9
  %67 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  %68 = getelementptr inbounds %struct.d2MatMN, ptr %67, i32 0, i32 2
  %69 = load ptr, ptr %68, align 8, !tbaa !16
  %70 = getelementptr inbounds %struct.d2VecN, ptr %69, i64 0
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %70, i32 noundef 2)
  store float %66, ptr %71, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %72 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store <2 x float> %72, ptr %14, align 4
  %73 = call <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef 2.000000e+00)
  store <2 x float> %73, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %74 = getelementptr inbounds %struct.d2Vec2, ptr %13, i32 0, i32 0
  %75 = load float, ptr %74, align 4, !tbaa !15
  %76 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  %77 = getelementptr inbounds %struct.d2MatMN, ptr %76, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  %79 = getelementptr inbounds %struct.d2VecN, ptr %78, i64 0
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %79, i32 noundef 3)
  store float %75, ptr %80, align 4, !tbaa !9
  %81 = getelementptr inbounds %struct.d2Vec2, ptr %13, i32 0, i32 1
  %82 = load float, ptr %81, align 4, !tbaa !21
  %83 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  %84 = getelementptr inbounds %struct.d2MatMN, ptr %83, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !16
  %86 = getelementptr inbounds %struct.d2VecN, ptr %85, i64 0
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %86, i32 noundef 4)
  store float %82, ptr %87, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %88 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store <2 x float> %88, ptr %16, align 4
  %89 = call noundef float @_ZNK6d2Vec25CrossERKS_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %90 = fpext float %89 to double
  %91 = fmul double %90, 2.000000e+00
  %92 = fptrunc double %91 to float
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  store float %92, ptr %15, align 4, !tbaa !9
  %93 = load float, ptr %15, align 4, !tbaa !9
  %94 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  %95 = getelementptr inbounds %struct.d2MatMN, ptr %94, i32 0, i32 2
  %96 = load ptr, ptr %95, align 8, !tbaa !16
  %97 = getelementptr inbounds %struct.d2VecN, ptr %96, i64 0
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %97, i32 noundef 5)
  store float %93, ptr %98, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %99 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 1
  call void @_ZNK7d2MatMN9TransposeEv(ptr dead_on_unwind writable sret(%struct.d2MatMN) align 8 %17, ptr noundef nonnull align 8 dereferenceable(16) %99)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %100 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 2
  invoke void @_ZNK7d2MatMNmlERK6d2VecN(ptr dead_on_unwind writable sret(%struct.d2VecN) align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %100)
          to label %101 unwind label %149

101:                                              ; preds = %2
  %102 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 1
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %104 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 0)
          to label %105 unwind label %153

105:                                              ; preds = %101
  %106 = load float, ptr %104, align 4, !tbaa !9
  %107 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 1)
          to label %108 unwind label %153

108:                                              ; preds = %105
  %109 = load float, ptr %107, align 4, !tbaa !9
  invoke void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %21, float noundef %106, float noundef %109)
          to label %110 unwind label %153

110:                                              ; preds = %108
  invoke void @_ZN6d2Body18ApplyImpulseLinearERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %103, ptr noundef nonnull align 4 dereferenceable(8) %21)
          to label %111 unwind label %153

111:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  %112 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 2)
          to label %115 unwind label %157

115:                                              ; preds = %111
  %116 = load float, ptr %114, align 4, !tbaa !9
  invoke void @_ZN6d2Body19ApplyImpulseAngularEf(ptr noundef nonnull align 8 dereferenceable(132) %113, float noundef %116)
          to label %117 unwind label %157

117:                                              ; preds = %115
  %118 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %120 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 3)
          to label %121 unwind label %161

121:                                              ; preds = %117
  %122 = load float, ptr %120, align 4, !tbaa !9
  %123 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 4)
          to label %124 unwind label %161

124:                                              ; preds = %121
  %125 = load float, ptr %123, align 4, !tbaa !9
  invoke void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %22, float noundef %122, float noundef %125)
          to label %126 unwind label %161

126:                                              ; preds = %124
  invoke void @_ZN6d2Body18ApplyImpulseLinearERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %119, ptr noundef nonnull align 4 dereferenceable(8) %22)
          to label %127 unwind label %161

127:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  %128 = getelementptr inbounds %class.d2Constraint, ptr %27, i32 0, i32 2
  %129 = load ptr, ptr %128, align 8, !tbaa !14
  %130 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %18, i32 noundef 5)
          to label %131 unwind label %157

131:                                              ; preds = %127
  %132 = load float, ptr %130, align 4, !tbaa !9
  invoke void @_ZN6d2Body19ApplyImpulseAngularEf(ptr noundef nonnull align 8 dereferenceable(132) %129, float noundef %132)
          to label %133 unwind label %157

133:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store float 0x3F947AE140000000, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %134 = invoke <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %135 unwind label %165

135:                                              ; preds = %133
  store <2 x float> %134, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %136 = invoke <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %137 unwind label %169

137:                                              ; preds = %135
  store <2 x float> %136, ptr %26, align 4
  %138 = invoke noundef float @_ZNK6d2Vec23DotERKS_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %26)
          to label %139 unwind label %169

139:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  store float %138, ptr %24, align 4, !tbaa !9
  %140 = load float, ptr %24, align 4, !tbaa !9
  %141 = fsub float %140, 0x3F847AE140000000
  %142 = invoke noundef float @_Z5d2MaxIfET_S0_S0_(float noundef 0.000000e+00, float noundef %141)
          to label %143 unwind label %174

143:                                              ; preds = %139
  store float %142, ptr %24, align 4, !tbaa !9
  %144 = load float, ptr %4, align 4, !tbaa !9
  %145 = fdiv float 0x3F947AE140000000, %144
  %146 = load float, ptr %24, align 4, !tbaa !9
  %147 = fmul float %145, %146
  %148 = getelementptr inbounds %class.d2JointConstraint, ptr %27, i32 0, i32 3
  store float %147, ptr %148, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @_ZN6d2VecND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZN7d2MatMND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void

149:                                              ; preds = %2
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %19, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %20, align 4
  br label %180

153:                                              ; preds = %110, %108, %105, %101
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %19, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %179

157:                                              ; preds = %131, %127, %115, %111
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %19, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %20, align 4
  br label %179

161:                                              ; preds = %126, %124, %121, %117
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %19, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %179

165:                                              ; preds = %133
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %19, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %20, align 4
  br label %173

169:                                              ; preds = %137, %135
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %19, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %173

173:                                              ; preds = %169, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %178

174:                                              ; preds = %139
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %19, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %20, align 4
  br label %178

178:                                              ; preds = %174, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %179

179:                                              ; preds = %178, %161, %157, %153
  call void @_ZN6d2VecND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  br label %180

180:                                              ; preds = %179, %149
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @_ZN7d2MatMND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %181

181:                                              ; preds = %180
  %182 = load ptr, ptr %19, align 8
  %183 = load i32, ptr %20, align 4
  %184 = insertvalue { ptr, i32 } poison, ptr %182, 0
  %185 = insertvalue { ptr, i32 } %184, i32 %183, 1
  resume { ptr, i32 } %185
}

declare <2 x float> @_ZNK6d2Body22LocalSpaceToWorldSpaceERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(8)) #0

declare <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132)) #4 align 2

declare <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #0

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

declare void @_ZNK7d2MatMN9TransposeEv(ptr dead_on_unwind writable sret(%struct.d2MatMN) align 8, ptr noundef nonnull align 8 dereferenceable(16)) #0

declare void @_ZNK7d2MatMNmlERK6d2VecN(ptr dead_on_unwind writable sret(%struct.d2VecN) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

declare void @_ZN6d2Body18ApplyImpulseLinearERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(8)) #0

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

declare void @_ZN6d2Body19ApplyImpulseAngularEf(ptr noundef nonnull align 8 dereferenceable(132), float noundef) #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5d2MaxIfET_S0_S0_(float noundef, float noundef) #4

attributes #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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS12d2Constraint", !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!"_ZTS6d2Vec2", !10, i64 0, !10, i64 4}
!14 = !{!12, !6, i64 16}
!15 = !{!13, !10, i64 0}
!16 = !{!17, !6, i64 64}
!17 = !{!"_ZTS17d2JointConstraint", !12, i64 0, !18, i64 56, !20, i64 72, !10, i64 88}
!18 = !{!"_ZTS7d2MatMN", !19, i64 0, !19, i64 4, !6, i64 8}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTS6d2VecN", !19, i64 0, !6, i64 8}
!21 = !{!13, !10, i64 4}
!22 = !{!17, !10, i64 88}


; 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.d2Vec2 = type { float, float }
%struct.d2MatMN = type { i32, i32, ptr }
%struct.d2VecN = type { i32, ptr }

declare void @_ZN7d2MatMN4ZeroEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind
declare void @_ZN7d2MatMND1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN6d2VecND1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17d2JointConstraint8PreSolveEf(ptr noundef nonnull align 8 dereferenceable(92) %0, float noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.d2Vec2, align 8
  %4 = alloca %struct.d2Vec2, align 8
  %5 = alloca %struct.d2Vec2, align 8
  %6 = alloca %struct.d2Vec2, align 8
  %7 = alloca %struct.d2Vec2, align 8
  %8 = alloca %struct.d2Vec2, align 8
  %9 = alloca %struct.d2Vec2, align 8
  %10 = alloca %struct.d2Vec2, align 8
  %11 = alloca %struct.d2MatMN, align 8
  %12 = alloca %struct.d2VecN, align 8
  %13 = alloca %struct.d2Vec2, align 4
  %14 = alloca %struct.d2Vec2, align 4
  %15 = alloca %struct.d2Vec2, align 8
  %16 = alloca %struct.d2Vec2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %0, i64 24
  %20 = tail call <2 x float> @_ZNK6d2Body22LocalSpaceToWorldSpaceERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %18, ptr noundef nonnull align 4 dereferenceable(8) %19)
  store <2 x float> %20, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %0, i64 32
  %24 = tail call <2 x float> @_ZNK6d2Body22LocalSpaceToWorldSpaceERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %22, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %24, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %25 = load ptr, ptr %17, align 8, !tbaa !5
  %26 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %25)
  %27 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %26)
  store <2 x float> %27, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %28 = load ptr, ptr %21, align 8, !tbaa !12
  %29 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132) %28)
  %30 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %29)
  store <2 x float> %30, ptr %6, align 8
  %31 = getelementptr inbounds i8, ptr %0, i64 56
  call void @_ZN7d2MatMN4ZeroEv(ptr noundef nonnull align 8 dereferenceable(16) %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %32 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %32, ptr %7, align 8
  %33 = call <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 2.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %.sroa.05.0.vec.extract = extractelement <2 x float> %33, i64 0
  %34 = getelementptr inbounds i8, ptr %0, i64 64
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %35, i32 noundef 0)
  store float %.sroa.05.0.vec.extract, ptr %36, align 4, !tbaa !18
  %.sroa.05.4.vec.extract = extractelement <2 x float> %33, i64 1
  %37 = load ptr, ptr %34, align 8, !tbaa !13
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %37, i32 noundef 1)
  store float %.sroa.05.4.vec.extract, ptr %38, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %39 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %39, ptr %8, align 8
  %40 = call noundef float @_ZNK6d2Vec25CrossERKS_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %8)
  %41 = fmul float %40, 2.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %42 = load ptr, ptr %34, align 8, !tbaa !13
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %42, i32 noundef 2)
  store float %41, ptr %43, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %44 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %44, ptr %9, align 8
  %45 = call <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 2.000000e+00)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %.sroa.0.0.vec.extract = extractelement <2 x float> %45, i64 0
  %46 = load ptr, ptr %34, align 8, !tbaa !13
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %46, i32 noundef 3)
  store float %.sroa.0.0.vec.extract, ptr %47, align 4, !tbaa !18
  %.sroa.0.4.vec.extract = extractelement <2 x float> %45, i64 1
  %48 = load ptr, ptr %34, align 8, !tbaa !13
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %48, i32 noundef 4)
  store float %.sroa.0.4.vec.extract, ptr %49, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %50 = call <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %50, ptr %10, align 8
  %51 = call noundef float @_ZNK6d2Vec25CrossERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %52 = fmul float %51, 2.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %53 = load ptr, ptr %34, align 8, !tbaa !13
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %53, i32 noundef 5)
  store float %52, ptr %54, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  call void @_ZNK7d2MatMN9TransposeEv(ptr dead_on_unwind nonnull writable sret(%struct.d2MatMN) align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %31)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  %55 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZNK7d2MatMNmlERK6d2VecN(ptr dead_on_unwind nonnull writable sret(%struct.d2VecN) align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %55)
          to label %56 unwind label %93

56:                                               ; preds = %2
  %57 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %58 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 0)
          to label %59 unwind label %95

59:                                               ; preds = %56
  %60 = load float, ptr %58, align 4, !tbaa !18
  %61 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 1)
          to label %62 unwind label %95

62:                                               ; preds = %59
  %63 = load float, ptr %61, align 4, !tbaa !18
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef %60, float noundef %63)
  invoke void @_ZN6d2Body18ApplyImpulseLinearERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %57, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %64 unwind label %95

64:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %65 = load ptr, ptr %17, align 8, !tbaa !5
  %66 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 2)
          to label %67 unwind label %97

67:                                               ; preds = %64
  %68 = load float, ptr %66, align 4, !tbaa !18
  invoke void @_ZN6d2Body19ApplyImpulseAngularEf(ptr noundef nonnull align 8 dereferenceable(132) %65, float noundef %68)
          to label %69 unwind label %97

69:                                               ; preds = %67
  %70 = load ptr, ptr %21, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %71 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 3)
          to label %72 unwind label %99

72:                                               ; preds = %69
  %73 = load float, ptr %71, align 4, !tbaa !18
  %74 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 4)
          to label %75 unwind label %99

75:                                               ; preds = %72
  %76 = load float, ptr %74, align 4, !tbaa !18
  call void @_ZN6d2Vec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %14, float noundef %73, float noundef %76)
  invoke void @_ZN6d2Body18ApplyImpulseLinearERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132) %70, ptr noundef nonnull align 4 dereferenceable(8) %14)
          to label %77 unwind label %99

77:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  %78 = load ptr, ptr %21, align 8, !tbaa !12
  %79 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6d2VecNixEi(ptr noundef nonnull align 8 dereferenceable(16) %12, i32 noundef 5)
          to label %80 unwind label %97

80:                                               ; preds = %77
  %81 = load float, ptr %79, align 4, !tbaa !18
  invoke void @_ZN6d2Body19ApplyImpulseAngularEf(ptr noundef nonnull align 8 dereferenceable(132) %78, float noundef %81)
          to label %82 unwind label %97

82:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %83 = invoke <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %84 unwind label %101

84:                                               ; preds = %82
  store <2 x float> %83, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %85 = invoke <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %86 unwind label %103

86:                                               ; preds = %84
  store <2 x float> %85, ptr %16, align 8
  %87 = call noundef float @_ZNK6d2Vec23DotERKS_(ptr noundef nonnull align 4 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  %88 = fadd float %87, 0xBF847AE140000000
  %89 = call noundef float @_Z5d2MaxIfET_S0_S0_(float noundef 0.000000e+00, float noundef %88)
  %90 = fdiv float 0x3F947AE140000000, %1
  %91 = fmul float %90, %89
  %92 = getelementptr inbounds i8, ptr %0, i64 88
  store float %91, ptr %92, align 8, !tbaa !19
  call void @_ZN6d2VecND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  call void @_ZN7d2MatMND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret void

93:                                               ; preds = %2
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %107

95:                                               ; preds = %62, %59, %56
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %106

97:                                               ; preds = %80, %77, %67, %64
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %106

99:                                               ; preds = %75, %72, %69
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %106

101:                                              ; preds = %82
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %105

103:                                              ; preds = %84
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %105

105:                                              ; preds = %103, %101
  %.pn = phi { ptr, i32 } [ %104, %103 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %106

106:                                              ; preds = %105, %99, %97, %95
  %.pn.pn = phi { ptr, i32 } [ %.pn, %105 ], [ %98, %97 ], [ %100, %99 ], [ %96, %95 ]
  call void @_ZN6d2VecND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %107

107:                                              ; preds = %106, %93
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %106 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  call void @_ZN7d2MatMND1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn
}

declare <2 x float> @_ZNK6d2Body22LocalSpaceToWorldSpaceERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

declare <2 x float> @_ZNK6d2Vec2miERKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNK6d2Body11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #4 align 2

declare <2 x float> @_ZNK6d2Vec2mlEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #0

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

declare void @_ZNK7d2MatMN9TransposeEv(ptr dead_on_unwind writable sret(%struct.d2MatMN) align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

declare void @_ZNK7d2MatMNmlERK6d2VecN(ptr dead_on_unwind writable sret(%struct.d2VecN) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

declare void @_ZN6d2Body18ApplyImpulseLinearERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

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

declare void @_ZN6d2Body19ApplyImpulseAngularEf(ptr noundef nonnull align 8 dereferenceable(132), float noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_Z5d2MaxIfET_S0_S0_(float noundef, float noundef) local_unnamed_addr #4

attributes #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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { 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, !7, i64 8}
!6 = !{!"_ZTS12d2Constraint", !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS6d2Vec2", !11, i64 0, !11, i64 4}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !7, i64 16}
!13 = !{!14, !7, i64 64}
!14 = !{!"_ZTS17d2JointConstraint", !6, i64 0, !15, i64 56, !17, i64 72, !11, i64 88}
!15 = !{!"_ZTS7d2MatMN", !16, i64 0, !16, i64 4, !7, i64 8}
!16 = !{!"int", !8, i64 0}
!17 = !{!"_ZTS6d2VecN", !16, i64 0, !7, i64 8}
!18 = !{!11, !11, i64 0}
!19 = !{!14, !11, i64 88}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass