; LLVM IR from Mithreindeir/VelocityRaptor :: VelocityRaptor/src (vrManifold)

; 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.vrVec2 = type { float, float }
%struct.vrManifold = type { ptr, ptr, [2 x %struct.vrContactPoint], i32, %struct.vrVec2, %struct.vrVec2, float, float, float, %struct.vrBlockSolverData, i32, i32, i32, i32 }
%struct.vrContactPoint = type { %struct.vrVec2, %struct.vrVec2, float, float, float, float, %struct.vrVec2, %struct.vrVec2, float, float, float, float, %struct.vrLocalPoint }
%struct.vrLocalPoint = type { float, %struct.vrVec2, ptr }
%struct.vrBlockSolverData = type { %struct.vrVec2, %struct.vrMat2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2 }
%struct.vrMat2 = type { %struct.vrVec2, %struct.vrVec2 }
%struct.vrRigidBody = type { %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, float, float, float, float, %struct.vrCollisionGroup, %struct.vrMaterial, ptr, %struct.vrColor, %struct.vrVec2, %struct.vrOrientedBoundingBox, ptr, i32 }
%struct.vrCollisionGroup = type { i32, i32 }
%struct.vrMaterial = type { float, float, float, float, float, float, float, float }
%struct.vrColor = type { float, float, float }
%struct.vrOrientedBoundingBox = type { %struct.vrVec2, %struct.vrVec2 }

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

declare <2 x float> @vrVect(float noundef, float noundef) #1

; 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) #2

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

declare float @vrMax(float noundef, float noundef) #1

declare float @vrDot(<2 x float>, <2 x float>) #1

; Function Attrs: inlinehint nounwind uwtable
declare dso_local <2 x float> @vrManifoldRelativeVelocity(ptr noundef, ptr noundef, <2 x float>, <2 x float>) #3

declare <2 x float> @vrScale(<2 x float>, float noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @vrManifoldApplyImpulse(ptr noundef, ptr noundef, <2 x float>, <2 x float>, <2 x float>) #4

; Function Attrs: nounwind uwtable
define dso_local void @vrManifoldSolveVelocity(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca float, align 4
  %6 = alloca %struct.vrVec2, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca %struct.vrVec2, align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca %struct.vrVec2, align 4
  %16 = alloca %struct.vrVec2, align 4
  %17 = alloca %struct.vrVec2, align 4
  %18 = alloca %struct.vrVec2, align 4
  %19 = alloca float, align 4
  %20 = alloca %struct.vrVec2, align 4
  %21 = alloca %struct.vrVec2, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.vrManifold, ptr %22, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !9
  store i32 %24, ptr %3, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !16
  br label %25

25:                                               ; preds = %133, %1
  %26 = load i32, ptr %4, align 4, !tbaa !16
  %27 = load i32, ptr %3, align 4, !tbaa !16
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %136

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.vrManifold, ptr %31, i32 0, i32 5
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.vrManifold, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !17
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.vrManifold, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.vrManifold, ptr %39, i32 0, i32 2
  %41 = load i32, ptr %4, align 4, !tbaa !16
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %40, i64 0, i64 %42
  %44 = getelementptr inbounds %struct.vrContactPoint, ptr %43, i32 0, i32 6
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.vrManifold, ptr %45, i32 0, i32 2
  %47 = load i32, ptr %4, align 4, !tbaa !16
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %46, i64 0, i64 %48
  %50 = getelementptr inbounds %struct.vrContactPoint, ptr %49, i32 0, i32 7
  %51 = load <2 x float>, ptr %44, align 8
  %52 = load <2 x float>, ptr %50, align 8
  %53 = call <2 x float> @vrManifoldRelativeVelocity(ptr noundef %35, ptr noundef %38, <2 x float> %51, <2 x float> %52)
  store <2 x float> %53, ptr %6, align 4
  %54 = load <2 x float>, ptr %32, align 4
  %55 = load <2 x float>, ptr %6, align 4
  %56 = call float @vrDot(<2 x float> %54, <2 x float> %55)
  store float %56, ptr %5, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %57 = load float, ptr %5, align 4, !tbaa !19
  %58 = fneg float %57
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.vrManifold, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %4, align 4, !tbaa !16
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %60, i64 0, i64 %62
  %64 = getelementptr inbounds %struct.vrContactPoint, ptr %63, i32 0, i32 9
  %65 = load float, ptr %64, align 4, !tbaa !20
  %66 = fmul float %58, %65
  store float %66, ptr %7, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.vrManifold, ptr %67, i32 0, i32 2
  %69 = load i32, ptr %4, align 4, !tbaa !16
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %68, i64 0, i64 %70
  %72 = getelementptr inbounds %struct.vrContactPoint, ptr %71, i32 0, i32 3
  %73 = load float, ptr %72, align 4, !tbaa !23
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.vrManifold, ptr %74, i32 0, i32 7
  %76 = load float, ptr %75, align 8, !tbaa !24
  %77 = fmul float %73, %76
  store float %77, ptr %8, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.vrManifold, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %4, align 4, !tbaa !16
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %79, i64 0, i64 %81
  %83 = getelementptr inbounds %struct.vrContactPoint, ptr %82, i32 0, i32 4
  %84 = load float, ptr %83, align 8, !tbaa !25
  store float %84, ptr %9, align 4, !tbaa !19
  %85 = load float, ptr %9, align 4, !tbaa !19
  %86 = load float, ptr %7, align 4, !tbaa !19
  %87 = fadd float %85, %86
  %88 = load float, ptr %8, align 4, !tbaa !19
  %89 = fneg float %88
  %90 = load float, ptr %8, align 4, !tbaa !19
  %91 = call float @vrClamp(float noundef %87, float noundef %89, float noundef %90)
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.vrManifold, ptr %92, i32 0, i32 2
  %94 = load i32, ptr %4, align 4, !tbaa !16
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %93, i64 0, i64 %95
  %97 = getelementptr inbounds %struct.vrContactPoint, ptr %96, i32 0, i32 4
  store float %91, ptr %97, align 8, !tbaa !25
  %98 = load ptr, ptr %2, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.vrManifold, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %4, align 4, !tbaa !16
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %99, i64 0, i64 %101
  %103 = getelementptr inbounds %struct.vrContactPoint, ptr %102, i32 0, i32 4
  %104 = load float, ptr %103, align 8, !tbaa !25
  %105 = load float, ptr %9, align 4, !tbaa !19
  %106 = fsub float %104, %105
  store float %106, ptr %7, align 4, !tbaa !19
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.vrManifold, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !17
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.vrManifold, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !18
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.vrManifold, ptr %113, i32 0, i32 2
  %115 = load i32, ptr %4, align 4, !tbaa !16
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %114, i64 0, i64 %116
  %118 = getelementptr inbounds %struct.vrContactPoint, ptr %117, i32 0, i32 6
  %119 = load ptr, ptr %2, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.vrManifold, ptr %119, i32 0, i32 2
  %121 = load i32, ptr %4, align 4, !tbaa !16
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %120, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.vrContactPoint, ptr %123, i32 0, i32 7
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.vrManifold, ptr %125, i32 0, i32 5
  %127 = load float, ptr %7, align 4, !tbaa !19
  %128 = load <2 x float>, ptr %126, align 4
  %129 = call <2 x float> @vrScale(<2 x float> %128, float noundef %127)
  store <2 x float> %129, ptr %10, align 4
  %130 = load <2 x float>, ptr %118, align 8
  %131 = load <2 x float>, ptr %124, align 8
  %132 = load <2 x float>, ptr %10, align 4
  call void @vrManifoldApplyImpulse(ptr noundef %109, ptr noundef %112, <2 x float> %130, <2 x float> %131, <2 x float> %132)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %133

133:                                              ; preds = %30
  %134 = load i32, ptr %4, align 4, !tbaa !16
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %4, align 4, !tbaa !16
  br label %25, !llvm.loop !26

136:                                              ; preds = %29
  %137 = load i32, ptr %3, align 4, !tbaa !16
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %155, label %139

139:                                              ; preds = %136
  %140 = load ptr, ptr %2, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.vrManifold, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !17
  %143 = getelementptr inbounds %struct.vrRigidBody, ptr %142, i32 0, i32 9
  %144 = getelementptr inbounds %struct.vrMaterial, ptr %143, i32 0, i32 5
  %145 = load float, ptr %144, align 4, !tbaa !28
  %146 = fcmp oeq float %145, 0.000000e+00
  br i1 %146, label %147, label %247

147:                                              ; preds = %139
  %148 = load ptr, ptr %2, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.vrManifold, ptr %148, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !18
  %151 = getelementptr inbounds %struct.vrRigidBody, ptr %150, i32 0, i32 9
  %152 = getelementptr inbounds %struct.vrMaterial, ptr %151, i32 0, i32 5
  %153 = load float, ptr %152, align 4, !tbaa !28
  %154 = fcmp oeq float %153, 0.000000e+00
  br i1 %154, label %155, label %247

155:                                              ; preds = %147, %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !16
  br label %156

156:                                              ; preds = %243, %155
  %157 = load i32, ptr %11, align 4, !tbaa !16
  %158 = load i32, ptr %3, align 4, !tbaa !16
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %161, label %160

160:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %246

161:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %162 = load ptr, ptr %2, align 8, !tbaa !5
  %163 = load i32, ptr %11, align 4, !tbaa !16
  %164 = call float @vrManifoldGetContactVel(ptr noundef %162, i32 noundef %163)
  store float %164, ptr %12, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %165 = load ptr, ptr %2, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.vrManifold, ptr %165, i32 0, i32 2
  %167 = load i32, ptr %11, align 4, !tbaa !16
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %166, i64 0, i64 %168
  %170 = getelementptr inbounds %struct.vrContactPoint, ptr %169, i32 0, i32 10
  %171 = load float, ptr %170, align 8, !tbaa !34
  %172 = load float, ptr %12, align 4, !tbaa !19
  %173 = fneg float %172
  %174 = fadd float %171, %173
  %175 = load ptr, ptr %2, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.vrManifold, ptr %175, i32 0, i32 2
  %177 = load i32, ptr %11, align 4, !tbaa !16
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %176, i64 0, i64 %178
  %180 = getelementptr inbounds %struct.vrContactPoint, ptr %179, i32 0, i32 11
  %181 = load float, ptr %180, align 4, !tbaa !35
  %182 = fsub float %174, %181
  %183 = load ptr, ptr %2, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.vrManifold, ptr %183, i32 0, i32 2
  %185 = load i32, ptr %11, align 4, !tbaa !16
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %184, i64 0, i64 %186
  %188 = getelementptr inbounds %struct.vrContactPoint, ptr %187, i32 0, i32 8
  %189 = load float, ptr %188, align 8, !tbaa !36
  %190 = fmul float %182, %189
  store float %190, ptr %13, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.vrManifold, ptr %191, i32 0, i32 2
  %193 = load i32, ptr %11, align 4, !tbaa !16
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %192, i64 0, i64 %194
  %196 = getelementptr inbounds %struct.vrContactPoint, ptr %195, i32 0, i32 3
  %197 = load float, ptr %196, align 4, !tbaa !23
  store float %197, ptr %14, align 4, !tbaa !19
  %198 = load float, ptr %13, align 4, !tbaa !19
  %199 = load float, ptr %14, align 4, !tbaa !19
  %200 = fadd float %198, %199
  %201 = call float @vrMax(float noundef %200, float noundef 0.000000e+00)
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.vrManifold, ptr %202, i32 0, i32 2
  %204 = load i32, ptr %11, align 4, !tbaa !16
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %203, i64 0, i64 %205
  %207 = getelementptr inbounds %struct.vrContactPoint, ptr %206, i32 0, i32 3
  store float %201, ptr %207, align 4, !tbaa !23
  %208 = load ptr, ptr %2, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.vrManifold, ptr %208, i32 0, i32 2
  %210 = load i32, ptr %11, align 4, !tbaa !16
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %209, i64 0, i64 %211
  %213 = getelementptr inbounds %struct.vrContactPoint, ptr %212, i32 0, i32 3
  %214 = load float, ptr %213, align 4, !tbaa !23
  %215 = load float, ptr %14, align 4, !tbaa !19
  %216 = fsub float %214, %215
  store float %216, ptr %13, align 4, !tbaa !19
  %217 = load ptr, ptr %2, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.vrManifold, ptr %217, i32 0, i32 0
  %219 = load ptr, ptr %218, align 8, !tbaa !17
  %220 = load ptr, ptr %2, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.vrManifold, ptr %220, i32 0, i32 1
  %222 = load ptr, ptr %221, align 8, !tbaa !18
  %223 = load ptr, ptr %2, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.vrManifold, ptr %223, i32 0, i32 2
  %225 = load i32, ptr %11, align 4, !tbaa !16
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %224, i64 0, i64 %226
  %228 = getelementptr inbounds %struct.vrContactPoint, ptr %227, i32 0, i32 6
  %229 = load ptr, ptr %2, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.vrManifold, ptr %229, i32 0, i32 2
  %231 = load i32, ptr %11, align 4, !tbaa !16
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %230, i64 0, i64 %232
  %234 = getelementptr inbounds %struct.vrContactPoint, ptr %233, i32 0, i32 7
  %235 = load ptr, ptr %2, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.vrManifold, ptr %235, i32 0, i32 4
  %237 = load float, ptr %13, align 4, !tbaa !19
  %238 = load <2 x float>, ptr %236, align 4
  %239 = call <2 x float> @vrScale(<2 x float> %238, float noundef %237)
  store <2 x float> %239, ptr %15, align 4
  %240 = load <2 x float>, ptr %228, align 8
  %241 = load <2 x float>, ptr %234, align 8
  %242 = load <2 x float>, ptr %15, align 4
  call void @vrManifoldApplyImpulse(ptr noundef %219, ptr noundef %222, <2 x float> %240, <2 x float> %241, <2 x float> %242)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %243

243:                                              ; preds = %161
  %244 = load i32, ptr %11, align 4, !tbaa !16
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %11, align 4, !tbaa !16
  br label %156, !llvm.loop !37

246:                                              ; preds = %160
  br label %391

247:                                              ; preds = %147, %139
  %248 = load ptr, ptr %2, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.vrManifold, ptr %248, i32 0, i32 9
  %250 = getelementptr inbounds %struct.vrBlockSolverData, ptr %249, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %251 = load ptr, ptr %2, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.vrManifold, ptr %251, i32 0, i32 2
  %253 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %252, i64 0, i64 0
  %254 = getelementptr inbounds %struct.vrContactPoint, ptr %253, i32 0, i32 10
  %255 = load float, ptr %254, align 8, !tbaa !34
  %256 = fneg float %255
  %257 = load ptr, ptr %2, align 8, !tbaa !5
  %258 = call float @vrManifoldGetContactVel(ptr noundef %257, i32 noundef 0)
  %259 = fadd float %256, %258
  %260 = load ptr, ptr %2, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.vrManifold, ptr %260, i32 0, i32 2
  %262 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %261, i64 0, i64 0
  %263 = getelementptr inbounds %struct.vrContactPoint, ptr %262, i32 0, i32 11
  %264 = load float, ptr %263, align 4, !tbaa !35
  %265 = fadd float %259, %264
  %266 = load ptr, ptr %2, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.vrManifold, ptr %266, i32 0, i32 2
  %268 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %267, i64 0, i64 1
  %269 = getelementptr inbounds %struct.vrContactPoint, ptr %268, i32 0, i32 10
  %270 = load float, ptr %269, align 8, !tbaa !34
  %271 = fneg float %270
  %272 = load ptr, ptr %2, align 8, !tbaa !5
  %273 = call float @vrManifoldGetContactVel(ptr noundef %272, i32 noundef 1)
  %274 = fadd float %271, %273
  %275 = load ptr, ptr %2, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.vrManifold, ptr %275, i32 0, i32 2
  %277 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %276, i64 0, i64 1
  %278 = getelementptr inbounds %struct.vrContactPoint, ptr %277, i32 0, i32 11
  %279 = load float, ptr %278, align 4, !tbaa !35
  %280 = fadd float %274, %279
  %281 = call <2 x float> @vrVect(float noundef %265, float noundef %280)
  store <2 x float> %281, ptr %16, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %250, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %282 = load ptr, ptr %2, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.vrManifold, ptr %282, i32 0, i32 9
  %284 = getelementptr inbounds %struct.vrBlockSolverData, ptr %283, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %285 = load ptr, ptr %2, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.vrManifold, ptr %285, i32 0, i32 2
  %287 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %286, i64 0, i64 0
  %288 = getelementptr inbounds %struct.vrContactPoint, ptr %287, i32 0, i32 3
  %289 = load float, ptr %288, align 4, !tbaa !23
  %290 = fneg float %289
  %291 = load ptr, ptr %2, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.vrManifold, ptr %291, i32 0, i32 2
  %293 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %292, i64 0, i64 1
  %294 = getelementptr inbounds %struct.vrContactPoint, ptr %293, i32 0, i32 3
  %295 = load float, ptr %294, align 4, !tbaa !23
  %296 = fneg float %295
  %297 = call <2 x float> @vrVect(float noundef %290, float noundef %296)
  store <2 x float> %297, ptr %17, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %284, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !38
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %298 = load ptr, ptr %2, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.vrManifold, ptr %298, i32 0, i32 9
  %300 = call <2 x float> @vrManifoldConjugateGradient(ptr noundef byval(%struct.vrBlockSolverData) align 8 %299, float noundef 0x3E45798EE0000000)
  store <2 x float> %300, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %301 = load ptr, ptr %2, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.vrManifold, ptr %301, i32 0, i32 2
  %303 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %302, i64 0, i64 0
  %304 = getelementptr inbounds %struct.vrContactPoint, ptr %303, i32 0, i32 3
  %305 = load float, ptr %304, align 4, !tbaa !23
  store float %305, ptr %19, align 4, !tbaa !19
  %306 = getelementptr inbounds %struct.vrVec2, ptr %18, i32 0, i32 0
  %307 = load float, ptr %306, align 4, !tbaa !39
  %308 = load float, ptr %19, align 4, !tbaa !19
  %309 = fadd float %307, %308
  %310 = call float @vrMax(float noundef %309, float noundef 0.000000e+00)
  %311 = load ptr, ptr %2, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.vrManifold, ptr %311, i32 0, i32 2
  %313 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %312, i64 0, i64 0
  %314 = getelementptr inbounds %struct.vrContactPoint, ptr %313, i32 0, i32 3
  store float %310, ptr %314, align 4, !tbaa !23
  %315 = load ptr, ptr %2, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.vrManifold, ptr %315, i32 0, i32 2
  %317 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %316, i64 0, i64 0
  %318 = getelementptr inbounds %struct.vrContactPoint, ptr %317, i32 0, i32 3
  %319 = load float, ptr %318, align 4, !tbaa !23
  %320 = load float, ptr %19, align 4, !tbaa !19
  %321 = fsub float %319, %320
  %322 = getelementptr inbounds %struct.vrVec2, ptr %18, i32 0, i32 0
  store float %321, ptr %322, align 4, !tbaa !39
  %323 = load ptr, ptr %2, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.vrManifold, ptr %323, i32 0, i32 2
  %325 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %324, i64 0, i64 1
  %326 = getelementptr inbounds %struct.vrContactPoint, ptr %325, i32 0, i32 3
  %327 = load float, ptr %326, align 4, !tbaa !23
  store float %327, ptr %19, align 4, !tbaa !19
  %328 = getelementptr inbounds %struct.vrVec2, ptr %18, i32 0, i32 1
  %329 = load float, ptr %328, align 4, !tbaa !40
  %330 = load float, ptr %19, align 4, !tbaa !19
  %331 = fadd float %329, %330
  %332 = call float @vrMax(float noundef %331, float noundef 0.000000e+00)
  %333 = load ptr, ptr %2, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.vrManifold, ptr %333, i32 0, i32 2
  %335 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %334, i64 0, i64 1
  %336 = getelementptr inbounds %struct.vrContactPoint, ptr %335, i32 0, i32 3
  store float %332, ptr %336, align 4, !tbaa !23
  %337 = load ptr, ptr %2, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.vrManifold, ptr %337, i32 0, i32 2
  %339 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %338, i64 0, i64 1
  %340 = getelementptr inbounds %struct.vrContactPoint, ptr %339, i32 0, i32 3
  %341 = load float, ptr %340, align 4, !tbaa !23
  %342 = load float, ptr %19, align 4, !tbaa !19
  %343 = fsub float %341, %342
  %344 = getelementptr inbounds %struct.vrVec2, ptr %18, i32 0, i32 1
  store float %343, ptr %344, align 4, !tbaa !40
  %345 = load ptr, ptr %2, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.vrManifold, ptr %345, i32 0, i32 0
  %347 = load ptr, ptr %346, align 8, !tbaa !17
  %348 = load ptr, ptr %2, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.vrManifold, ptr %348, i32 0, i32 1
  %350 = load ptr, ptr %349, align 8, !tbaa !18
  %351 = load ptr, ptr %2, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.vrManifold, ptr %351, i32 0, i32 2
  %353 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %352, i64 0, i64 0
  %354 = getelementptr inbounds %struct.vrContactPoint, ptr %353, i32 0, i32 6
  %355 = load ptr, ptr %2, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct.vrManifold, ptr %355, i32 0, i32 2
  %357 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %356, i64 0, i64 0
  %358 = getelementptr inbounds %struct.vrContactPoint, ptr %357, i32 0, i32 7
  %359 = load ptr, ptr %2, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.vrManifold, ptr %359, i32 0, i32 4
  %361 = getelementptr inbounds %struct.vrVec2, ptr %18, i32 0, i32 0
  %362 = load float, ptr %361, align 4, !tbaa !39
  %363 = load <2 x float>, ptr %360, align 4
  %364 = call <2 x float> @vrScale(<2 x float> %363, float noundef %362)
  store <2 x float> %364, ptr %20, align 4
  %365 = load <2 x float>, ptr %354, align 8
  %366 = load <2 x float>, ptr %358, align 8
  %367 = load <2 x float>, ptr %20, align 4
  call void @vrManifoldApplyImpulse(ptr noundef %347, ptr noundef %350, <2 x float> %365, <2 x float> %366, <2 x float> %367)
  %368 = load ptr, ptr %2, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.vrManifold, ptr %368, i32 0, i32 0
  %370 = load ptr, ptr %369, align 8, !tbaa !17
  %371 = load ptr, ptr %2, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.vrManifold, ptr %371, i32 0, i32 1
  %373 = load ptr, ptr %372, align 8, !tbaa !18
  %374 = load ptr, ptr %2, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.vrManifold, ptr %374, i32 0, i32 2
  %376 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %375, i64 0, i64 1
  %377 = getelementptr inbounds %struct.vrContactPoint, ptr %376, i32 0, i32 6
  %378 = load ptr, ptr %2, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.vrManifold, ptr %378, i32 0, i32 2
  %380 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %379, i64 0, i64 1
  %381 = getelementptr inbounds %struct.vrContactPoint, ptr %380, i32 0, i32 7
  %382 = load ptr, ptr %2, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.vrManifold, ptr %382, i32 0, i32 4
  %384 = getelementptr inbounds %struct.vrVec2, ptr %18, i32 0, i32 1
  %385 = load float, ptr %384, align 4, !tbaa !40
  %386 = load <2 x float>, ptr %383, align 4
  %387 = call <2 x float> @vrScale(<2 x float> %386, float noundef %385)
  store <2 x float> %387, ptr %21, align 4
  %388 = load <2 x float>, ptr %377, align 8
  %389 = load <2 x float>, ptr %381, align 8
  %390 = load <2 x float>, ptr %21, align 4
  call void @vrManifoldApplyImpulse(ptr noundef %370, ptr noundef %373, <2 x float> %388, <2 x float> %389, <2 x float> %390)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %391

391:                                              ; preds = %247, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void
}

declare float @vrClamp(float noundef, float noundef, float noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare dso_local float @vrManifoldGetContactVel(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @vrManifoldConjugateGradient(ptr noundef byval(%struct.vrBlockSolverData) align 8, float noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint nounwind 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 = { nounwind 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 #5 = { 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/C++ TBAA"}
!9 = !{!10, !11, i64 192}
!10 = !{!"vrManifold", !6, i64 0, !6, i64 8, !7, i64 16, !11, i64 192, !12, i64 196, !12, i64 204, !13, i64 212, !13, i64 216, !13, i64 220, !14, i64 224, !11, i64 280, !11, i64 284, !11, i64 288, !11, i64 292}
!11 = !{!"int", !7, i64 0}
!12 = !{!"vrVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"vrBlockSolverData", !12, i64 0, !15, i64 8, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48}
!15 = !{!"vrMat2", !12, i64 0, !12, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !6, i64 0}
!18 = !{!10, !6, i64 8}
!19 = !{!13, !13, i64 0}
!20 = !{!21, !13, i64 52}
!21 = !{!"vrContactPoint", !12, i64 0, !12, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !12, i64 32, !12, i64 40, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !22, i64 64}
!22 = !{!"vrLocalPoint", !13, i64 0, !12, i64 4, !6, i64 16}
!23 = !{!21, !13, i64 20}
!24 = !{!10, !13, i64 216}
!25 = !{!21, !13, i64 24}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !13, i64 76}
!29 = !{!"vrRigidBody", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !30, i64 48, !31, i64 56, !6, i64 88, !32, i64 96, !12, i64 108, !33, i64 116, !6, i64 136, !11, i64 144}
!30 = !{!"vrCollisionGroup", !11, i64 0, !11, i64 4}
!31 = !{!"vrMaterial", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!32 = !{!"vrColor", !13, i64 0, !13, i64 4, !13, i64 8}
!33 = !{!"vrOrientedBoundingBox", !12, i64 0, !12, i64 8}
!34 = !{!21, !13, i64 56}
!35 = !{!21, !13, i64 60}
!36 = !{!21, !13, i64 48}
!37 = distinct !{!37, !27}
!38 = !{i64 0, i64 4, !19, i64 4, i64 4, !19}
!39 = !{!12, !13, i64 0}
!40 = !{!12, !13, i64 4}


; 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.vrContactPoint = type { %struct.vrVec2, %struct.vrVec2, float, float, float, float, %struct.vrVec2, %struct.vrVec2, float, float, float, float, %struct.vrLocalPoint }
%struct.vrVec2 = type { float, float }
%struct.vrLocalPoint = type { float, %struct.vrVec2, ptr }
%struct.vrBlockSolverData = type { %struct.vrVec2, %struct.vrMat2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2, %struct.vrVec2 }
%struct.vrMat2 = type { %struct.vrVec2, %struct.vrVec2 }

declare <2 x float> @vrVect(float noundef, float noundef) local_unnamed_addr #0

declare float @vrMax(float noundef, float noundef) local_unnamed_addr #0

declare float @vrDot(<2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare dso_local <2 x float> @vrManifoldRelativeVelocity(ptr noundef, ptr noundef, <2 x float>, <2 x float>) local_unnamed_addr #1

declare <2 x float> @vrScale(<2 x float>, float noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @vrManifoldApplyImpulse(ptr noundef, ptr noundef, <2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @vrManifoldSolveVelocity(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 192
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 204
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %0, i64 216
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %10

._crit_edge:                                      ; preds = %10
  %9 = icmp eq i32 %3, 1
  br i1 %9, label %.lr.ph116, label %._crit_edge.thread

10:                                               ; preds = %.lr.ph, %10
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %10 ]
  %11 = load ptr, ptr %0, align 8, !tbaa !15
  %12 = load ptr, ptr %6, align 8, !tbaa !16
  %13 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %7, i64 0, i64 %indvars.iv
  %14 = getelementptr inbounds i8, ptr %13, i64 32
  %15 = getelementptr inbounds i8, ptr %13, i64 40
  %16 = load <2 x float>, ptr %14, align 8
  %17 = load <2 x float>, ptr %15, align 8
  %18 = tail call <2 x float> @vrManifoldRelativeVelocity(ptr noundef %11, ptr noundef %12, <2 x float> %16, <2 x float> %17)
  %19 = load <2 x float>, ptr %5, align 4
  %20 = tail call float @vrDot(<2 x float> %19, <2 x float> %18) #3
  %21 = getelementptr inbounds i8, ptr %13, i64 52
  %22 = load float, ptr %21, align 4, !tbaa !17
  %23 = getelementptr inbounds i8, ptr %13, i64 20
  %24 = load float, ptr %23, align 4, !tbaa !20
  %25 = load float, ptr %8, align 8, !tbaa !21
  %26 = fmul float %24, %25
  %27 = getelementptr inbounds i8, ptr %13, i64 24
  %28 = load float, ptr %27, align 8, !tbaa !22
  %29 = fmul float %20, %22
  %30 = fsub float %28, %29
  %31 = fneg float %26
  %32 = tail call float @vrClamp(float noundef %30, float noundef %31, float noundef %26) #3
  store float %32, ptr %27, align 8, !tbaa !22
  %33 = fsub float %32, %28
  %34 = load ptr, ptr %0, align 8, !tbaa !15
  %35 = load ptr, ptr %6, align 8, !tbaa !16
  %36 = load <2 x float>, ptr %5, align 4
  %37 = tail call <2 x float> @vrScale(<2 x float> %36, float noundef %33) #3
  %38 = load <2 x float>, ptr %14, align 8
  %39 = load <2 x float>, ptr %15, align 8
  tail call void @vrManifoldApplyImpulse(ptr noundef %34, ptr noundef %35, <2 x float> %38, <2 x float> %39, <2 x float> %37)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %10, !llvm.loop !23

._crit_edge.thread:                               ; preds = %1, %._crit_edge
  %40 = load ptr, ptr %0, align 8, !tbaa !15
  %41 = getelementptr inbounds i8, ptr %40, i64 76
  %42 = load float, ptr %41, align 4, !tbaa !25
  %43 = fcmp oeq float %42, 0.000000e+00
  br i1 %43, label %44, label %80

44:                                               ; preds = %._crit_edge.thread
  %45 = getelementptr inbounds i8, ptr %0, i64 8
  %46 = load ptr, ptr %45, align 8, !tbaa !16
  %47 = getelementptr inbounds i8, ptr %46, i64 76
  %48 = load float, ptr %47, align 4, !tbaa !25
  %49 = fcmp oeq float %48, 0.000000e+00
  br i1 %49, label %50, label %80

50:                                               ; preds = %44
  br i1 %4, label %.lr.ph116, label %.loopexit

.lr.ph116:                                        ; preds = %._crit_edge, %50
  %51 = getelementptr inbounds i8, ptr %0, i64 16
  %52 = getelementptr inbounds i8, ptr %0, i64 8
  %53 = getelementptr inbounds i8, ptr %0, i64 196
  %wide.trip.count121 = zext nneg i32 %3 to i64
  br label %54

54:                                               ; preds = %.lr.ph116, %54
  %indvars.iv118 = phi i64 [ 0, %.lr.ph116 ], [ %indvars.iv.next119, %54 ]
  %55 = trunc nuw nsw i64 %indvars.iv118 to i32
  %56 = tail call float @vrManifoldGetContactVel(ptr noundef nonnull %0, i32 noundef %55)
  %57 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %51, i64 0, i64 %indvars.iv118
  %58 = getelementptr inbounds i8, ptr %57, i64 56
  %59 = load float, ptr %58, align 8, !tbaa !31
  %60 = fsub float %59, %56
  %61 = getelementptr inbounds i8, ptr %57, i64 60
  %62 = load float, ptr %61, align 4, !tbaa !32
  %63 = fsub float %60, %62
  %64 = getelementptr inbounds i8, ptr %57, i64 48
  %65 = load float, ptr %64, align 8, !tbaa !33
  %66 = fmul float %63, %65
  %67 = getelementptr inbounds i8, ptr %57, i64 20
  %68 = load float, ptr %67, align 4, !tbaa !20
  %69 = fadd float %66, %68
  %70 = tail call float @vrMax(float noundef %69, float noundef 0.000000e+00) #3
  store float %70, ptr %67, align 4, !tbaa !20
  %71 = fsub float %70, %68
  %72 = load ptr, ptr %0, align 8, !tbaa !15
  %73 = load ptr, ptr %52, align 8, !tbaa !16
  %74 = getelementptr inbounds i8, ptr %57, i64 32
  %75 = getelementptr inbounds i8, ptr %57, i64 40
  %76 = load <2 x float>, ptr %53, align 4
  %77 = tail call <2 x float> @vrScale(<2 x float> %76, float noundef %71) #3
  %78 = load <2 x float>, ptr %74, align 8
  %79 = load <2 x float>, ptr %75, align 8
  tail call void @vrManifoldApplyImpulse(ptr noundef %72, ptr noundef %73, <2 x float> %78, <2 x float> %79, <2 x float> %77)
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond122.not = icmp eq i64 %indvars.iv.next119, %wide.trip.count121
  br i1 %exitcond122.not, label %.loopexit, label %54, !llvm.loop !34

80:                                               ; preds = %44, %._crit_edge.thread
  %81 = getelementptr inbounds i8, ptr %0, i64 224
  %82 = getelementptr inbounds i8, ptr %0, i64 248
  %83 = getelementptr inbounds i8, ptr %0, i64 72
  %84 = load float, ptr %83, align 8, !tbaa !31
  %85 = tail call float @vrManifoldGetContactVel(ptr noundef nonnull %0, i32 noundef 0)
  %86 = fsub float %85, %84
  %87 = getelementptr inbounds i8, ptr %0, i64 76
  %88 = load float, ptr %87, align 4, !tbaa !32
  %89 = fadd float %86, %88
  %90 = getelementptr inbounds i8, ptr %0, i64 160
  %91 = load float, ptr %90, align 8, !tbaa !31
  %92 = tail call float @vrManifoldGetContactVel(ptr noundef nonnull %0, i32 noundef 1)
  %93 = fsub float %92, %91
  %94 = getelementptr inbounds i8, ptr %0, i64 164
  %95 = load float, ptr %94, align 4, !tbaa !32
  %96 = fadd float %93, %95
  %97 = tail call <2 x float> @vrVect(float noundef %89, float noundef %96) #3
  store <2 x float> %97, ptr %82, align 8
  %98 = getelementptr inbounds i8, ptr %0, i64 264
  %99 = getelementptr inbounds i8, ptr %0, i64 36
  %100 = load float, ptr %99, align 4, !tbaa !20
  %101 = fneg float %100
  %102 = getelementptr inbounds i8, ptr %0, i64 124
  %103 = load float, ptr %102, align 4, !tbaa !20
  %104 = fneg float %103
  %105 = tail call <2 x float> @vrVect(float noundef %101, float noundef %104) #3
  store <2 x float> %105, ptr %98, align 8
  %106 = tail call <2 x float> @vrManifoldConjugateGradient(ptr noundef nonnull byval(%struct.vrBlockSolverData) align 8 %81, float noundef 0x3E45798EE0000000)
  %107 = load float, ptr %99, align 4, !tbaa !20
  %.sroa.05.0.vec.extract = extractelement <2 x float> %106, i64 0
  %108 = fadd float %.sroa.05.0.vec.extract, %107
  %109 = tail call float @vrMax(float noundef %108, float noundef 0.000000e+00) #3
  store float %109, ptr %99, align 4, !tbaa !20
  %110 = fsub float %109, %107
  %111 = load float, ptr %102, align 4, !tbaa !20
  %.sroa.05.4.vec.extract = extractelement <2 x float> %106, i64 1
  %112 = fadd float %.sroa.05.4.vec.extract, %111
  %113 = tail call float @vrMax(float noundef %112, float noundef 0.000000e+00) #3
  store float %113, ptr %102, align 4, !tbaa !20
  %114 = fsub float %113, %111
  %115 = load ptr, ptr %0, align 8, !tbaa !15
  %116 = getelementptr inbounds i8, ptr %0, i64 8
  %117 = load ptr, ptr %116, align 8, !tbaa !16
  %118 = getelementptr inbounds i8, ptr %0, i64 48
  %119 = getelementptr inbounds i8, ptr %0, i64 56
  %120 = getelementptr inbounds i8, ptr %0, i64 196
  %121 = load <2 x float>, ptr %120, align 4
  %122 = tail call <2 x float> @vrScale(<2 x float> %121, float noundef %110) #3
  %123 = load <2 x float>, ptr %118, align 8
  %124 = load <2 x float>, ptr %119, align 8
  tail call void @vrManifoldApplyImpulse(ptr noundef %115, ptr noundef %117, <2 x float> %123, <2 x float> %124, <2 x float> %122)
  %125 = load ptr, ptr %0, align 8, !tbaa !15
  %126 = load ptr, ptr %116, align 8, !tbaa !16
  %127 = getelementptr inbounds i8, ptr %0, i64 136
  %128 = getelementptr inbounds i8, ptr %0, i64 144
  %129 = load <2 x float>, ptr %120, align 4
  %130 = tail call <2 x float> @vrScale(<2 x float> %129, float noundef %114) #3
  %131 = load <2 x float>, ptr %127, align 8
  %132 = load <2 x float>, ptr %128, align 8
  tail call void @vrManifoldApplyImpulse(ptr noundef %125, ptr noundef %126, <2 x float> %131, <2 x float> %132, <2 x float> %130)
  br label %.loopexit

.loopexit:                                        ; preds = %54, %50, %80
  ret void
}

declare float @vrClamp(float noundef, float noundef, float noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare dso_local float @vrManifoldGetContactVel(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @vrManifoldConjugateGradient(ptr noundef byval(%struct.vrBlockSolverData) align 8, float noundef) local_unnamed_addr #2

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 = { inlinehint nounwind 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 #2 = { nounwind 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 = { 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 192}
!6 = !{!"vrManifold", !7, i64 0, !7, i64 8, !8, i64 16, !10, i64 192, !11, i64 196, !11, i64 204, !12, i64 212, !12, i64 216, !12, i64 220, !13, i64 224, !10, i64 280, !10, i64 284, !10, i64 288, !10, i64 292}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"vrVec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !8, i64 0}
!13 = !{!"vrBlockSolverData", !11, i64 0, !14, i64 8, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48}
!14 = !{!"vrMat2", !11, i64 0, !11, i64 8}
!15 = !{!6, !7, i64 0}
!16 = !{!6, !7, i64 8}
!17 = !{!18, !12, i64 52}
!18 = !{!"vrContactPoint", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !11, i64 32, !11, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !19, i64 64}
!19 = !{!"vrLocalPoint", !12, i64 0, !11, i64 4, !7, i64 16}
!20 = !{!18, !12, i64 20}
!21 = !{!6, !12, i64 216}
!22 = !{!18, !12, i64 24}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!26, !12, i64 76}
!26 = !{!"vrRigidBody", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !27, i64 48, !28, i64 56, !7, i64 88, !29, i64 96, !11, i64 108, !30, i64 116, !7, i64 136, !10, i64 144}
!27 = !{!"vrCollisionGroup", !10, i64 0, !10, i64 4}
!28 = !{!"vrMaterial", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!29 = !{!"vrColor", !12, i64 0, !12, i64 4, !12, i64 8}
!30 = !{!"vrOrientedBoundingBox", !11, i64 0, !11, i64 8}
!31 = !{!18, !12, i64 56}
!32 = !{!18, !12, i64 60}
!33 = !{!18, !12, i64 48}
!34 = distinct !{!34, !24}


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