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

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

declare <2 x float> @vrSub(<2 x float>, <2 x float>) #2

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

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

declare <2 x float> @vrAdd(<2 x float>, <2 x float>) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local void @vrManifoldSolvePosition(ptr noundef %0, float noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca float, align 4
  %7 = alloca %struct.vrVec2, align 4
  %8 = alloca %struct.vrVec2, align 4
  %9 = alloca %struct.vrVec2, align 4
  %10 = alloca %struct.vrVec2, align 4
  %11 = alloca %struct.vrVec2, align 4
  %12 = alloca float, align 4
  %13 = alloca %struct.vrVec2, align 4
  %14 = alloca %struct.vrBlockSolverData, align 8
  %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 %struct.vrVec2, align 4
  %20 = alloca %struct.vrVec2, align 4
  %21 = alloca %struct.vrVec2, align 4
  %22 = alloca %struct.vrVec2, align 4
  %23 = alloca %struct.vrVec2, align 4
  %24 = alloca %struct.vrVec2, align 4
  %25 = alloca %struct.vrVec2, align 4
  %26 = alloca float, align 4
  %27 = alloca %struct.vrVec2, align 4
  %28 = alloca %struct.vrVec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.vrManifold, ptr %29, i32 0, i32 3
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = icmp eq i32 %31, 1
  br i1 %32, label %33, label %162

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !17
  br label %34

34:                                               ; preds = %158, %33
  %35 = load i32, ptr %5, align 4, !tbaa !17
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.vrManifold, ptr %36, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %39 = icmp slt i32 %35, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %161

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.vrManifold, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %5, align 4, !tbaa !17
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %43, i64 0, i64 %45
  %47 = getelementptr inbounds %struct.vrContactPoint, ptr %46, i32 0, i32 10
  %48 = load float, ptr %47, align 8, !tbaa !18
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.vrManifold, ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = getelementptr inbounds %struct.vrRigidBody, ptr %51, i32 0, i32 3
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.vrManifold, ptr %53, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !21
  %56 = getelementptr inbounds %struct.vrRigidBody, ptr %55, i32 0, i32 7
  %57 = load float, ptr %56, align 4, !tbaa !22
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.vrManifold, ptr %58, i32 0, i32 2
  %60 = load i32, ptr %5, align 4, !tbaa !17
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %59, i64 0, i64 %61
  %63 = getelementptr inbounds %struct.vrContactPoint, ptr %62, i32 0, i32 7
  %64 = load <2 x float>, ptr %63, align 8
  %65 = call <2 x float> @vrCrossScalar(float noundef %57, <2 x float> %64)
  store <2 x float> %65, ptr %9, align 4
  %66 = load <2 x float>, ptr %52, align 8
  %67 = load <2 x float>, ptr %9, align 4
  %68 = call <2 x float> @vrAdd(<2 x float> %66, <2 x float> %67)
  store <2 x float> %68, ptr %8, align 4
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.vrManifold, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !28
  %72 = getelementptr inbounds %struct.vrRigidBody, ptr %71, i32 0, i32 3
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.vrManifold, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !28
  %76 = getelementptr inbounds %struct.vrRigidBody, ptr %75, i32 0, i32 7
  %77 = load float, ptr %76, align 4, !tbaa !22
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.vrManifold, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %5, align 4, !tbaa !17
  %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 6
  %84 = load <2 x float>, ptr %83, align 8
  %85 = call <2 x float> @vrCrossScalar(float noundef %77, <2 x float> %84)
  store <2 x float> %85, ptr %11, align 4
  %86 = load <2 x float>, ptr %72, align 8
  %87 = load <2 x float>, ptr %11, align 4
  %88 = call <2 x float> @vrAdd(<2 x float> %86, <2 x float> %87)
  store <2 x float> %88, ptr %10, align 4
  %89 = load <2 x float>, ptr %8, align 4
  %90 = load <2 x float>, ptr %10, align 4
  %91 = call <2 x float> @vrSub(<2 x float> %89, <2 x float> %90)
  store <2 x float> %91, ptr %7, align 4
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.vrManifold, ptr %92, i32 0, i32 4
  %94 = load <2 x float>, ptr %7, align 4
  %95 = load <2 x float>, ptr %93, align 4
  %96 = call float @vrDot(<2 x float> %94, <2 x float> %95)
  %97 = fsub float %48, %96
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.vrManifold, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %5, align 4, !tbaa !17
  %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 8
  %104 = load float, ptr %103, align 8, !tbaa !29
  %105 = fmul float %97, %104
  store float %105, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.vrManifold, ptr %106, i32 0, i32 2
  %108 = load i32, ptr %5, align 4, !tbaa !17
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %107, i64 0, i64 %109
  %111 = getelementptr inbounds %struct.vrContactPoint, ptr %110, i32 0, i32 5
  %112 = load float, ptr %111, align 4, !tbaa !30
  store float %112, ptr %12, align 4, !tbaa !9
  %113 = load float, ptr %12, align 4, !tbaa !9
  %114 = load float, ptr %6, align 4, !tbaa !9
  %115 = fadd float %113, %114
  %116 = call float @vrMax(float noundef %115, float noundef 0.000000e+00)
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.vrManifold, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %5, align 4, !tbaa !17
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %118, i64 0, i64 %120
  %122 = getelementptr inbounds %struct.vrContactPoint, ptr %121, i32 0, i32 5
  store float %116, ptr %122, align 4, !tbaa !30
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.vrManifold, ptr %123, i32 0, i32 2
  %125 = load i32, ptr %5, align 4, !tbaa !17
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %124, i64 0, i64 %126
  %128 = getelementptr inbounds %struct.vrContactPoint, ptr %127, i32 0, i32 5
  %129 = load float, ptr %128, align 4, !tbaa !30
  %130 = load float, ptr %12, align 4, !tbaa !9
  %131 = fsub float %129, %130
  store float %131, ptr %6, align 4, !tbaa !9
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.vrManifold, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !28
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.vrManifold, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %136, align 8, !tbaa !21
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.vrManifold, ptr %138, i32 0, i32 2
  %140 = load i32, ptr %5, align 4, !tbaa !17
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %139, i64 0, i64 %141
  %143 = getelementptr inbounds %struct.vrContactPoint, ptr %142, i32 0, i32 6
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.vrManifold, ptr %144, i32 0, i32 2
  %146 = load i32, ptr %5, align 4, !tbaa !17
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %145, i64 0, i64 %147
  %149 = getelementptr inbounds %struct.vrContactPoint, ptr %148, i32 0, i32 7
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.vrManifold, ptr %150, i32 0, i32 4
  %152 = load float, ptr %6, align 4, !tbaa !9
  %153 = load <2 x float>, ptr %151, align 4
  %154 = call <2 x float> @vrScale(<2 x float> %153, float noundef %152)
  store <2 x float> %154, ptr %13, align 4
  %155 = load <2 x float>, ptr %143, align 8
  %156 = load <2 x float>, ptr %149, align 8
  %157 = load <2 x float>, ptr %13, align 4
  call void @vrManifoldApplyBiasImpulse(ptr noundef %134, ptr noundef %137, <2 x float> %155, <2 x float> %156, <2 x float> %157)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %158

158:                                              ; preds = %41
  %159 = load i32, ptr %5, align 4, !tbaa !17
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %5, align 4, !tbaa !17
  br label %34, !llvm.loop !31

161:                                              ; preds = %40
  br label %362

162:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #5
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.vrManifold, ptr %163, i32 0, i32 9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %164, i64 56, i1 false), !tbaa.struct !33
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.vrManifold, ptr %165, i32 0, i32 2
  %167 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %166, i64 0, i64 0
  %168 = getelementptr inbounds %struct.vrContactPoint, ptr %167, i32 0, i32 10
  %169 = load float, ptr %168, align 8, !tbaa !18
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.vrManifold, ptr %170, i32 0, i32 1
  %172 = load ptr, ptr %171, align 8, !tbaa !21
  %173 = getelementptr inbounds %struct.vrRigidBody, ptr %172, i32 0, i32 3
  %174 = load ptr, ptr %3, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.vrManifold, ptr %174, i32 0, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !21
  %177 = getelementptr inbounds %struct.vrRigidBody, ptr %176, i32 0, i32 7
  %178 = load float, ptr %177, align 4, !tbaa !22
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.vrManifold, ptr %179, i32 0, i32 2
  %181 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %180, i64 0, i64 0
  %182 = getelementptr inbounds %struct.vrContactPoint, ptr %181, i32 0, i32 7
  %183 = load <2 x float>, ptr %182, align 8
  %184 = call <2 x float> @vrCrossScalar(float noundef %178, <2 x float> %183)
  store <2 x float> %184, ptr %17, align 4
  %185 = load <2 x float>, ptr %173, align 8
  %186 = load <2 x float>, ptr %17, align 4
  %187 = call <2 x float> @vrAdd(<2 x float> %185, <2 x float> %186)
  store <2 x float> %187, ptr %16, align 4
  %188 = load ptr, ptr %3, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.vrManifold, ptr %188, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !28
  %191 = getelementptr inbounds %struct.vrRigidBody, ptr %190, i32 0, i32 3
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.vrManifold, ptr %192, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8, !tbaa !28
  %195 = getelementptr inbounds %struct.vrRigidBody, ptr %194, i32 0, i32 7
  %196 = load float, ptr %195, align 4, !tbaa !22
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.vrManifold, ptr %197, i32 0, i32 2
  %199 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %198, i64 0, i64 0
  %200 = getelementptr inbounds %struct.vrContactPoint, ptr %199, i32 0, i32 6
  %201 = load <2 x float>, ptr %200, align 8
  %202 = call <2 x float> @vrCrossScalar(float noundef %196, <2 x float> %201)
  store <2 x float> %202, ptr %19, align 4
  %203 = load <2 x float>, ptr %191, align 8
  %204 = load <2 x float>, ptr %19, align 4
  %205 = call <2 x float> @vrAdd(<2 x float> %203, <2 x float> %204)
  store <2 x float> %205, ptr %18, align 4
  %206 = load <2 x float>, ptr %16, align 4
  %207 = load <2 x float>, ptr %18, align 4
  %208 = call <2 x float> @vrSub(<2 x float> %206, <2 x float> %207)
  store <2 x float> %208, ptr %15, align 4
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.vrManifold, ptr %209, i32 0, i32 4
  %211 = load <2 x float>, ptr %15, align 4
  %212 = load <2 x float>, ptr %210, align 4
  %213 = call float @vrDot(<2 x float> %211, <2 x float> %212)
  %214 = fsub float %169, %213
  %215 = fneg float %214
  %216 = getelementptr inbounds %struct.vrBlockSolverData, ptr %14, i32 0, i32 2
  %217 = getelementptr inbounds %struct.vrVec2, ptr %216, i32 0, i32 0
  store float %215, ptr %217, align 4, !tbaa !34
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.vrManifold, ptr %218, i32 0, i32 2
  %220 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %219, i64 0, i64 1
  %221 = getelementptr inbounds %struct.vrContactPoint, ptr %220, i32 0, i32 10
  %222 = load float, ptr %221, align 8, !tbaa !18
  %223 = load ptr, ptr %3, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.vrManifold, ptr %223, i32 0, i32 1
  %225 = load ptr, ptr %224, align 8, !tbaa !21
  %226 = getelementptr inbounds %struct.vrRigidBody, ptr %225, i32 0, i32 3
  %227 = load ptr, ptr %3, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.vrManifold, ptr %227, i32 0, i32 1
  %229 = load ptr, ptr %228, align 8, !tbaa !21
  %230 = getelementptr inbounds %struct.vrRigidBody, ptr %229, i32 0, i32 7
  %231 = load float, ptr %230, align 4, !tbaa !22
  %232 = load ptr, ptr %3, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.vrManifold, ptr %232, i32 0, i32 2
  %234 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %233, i64 0, i64 1
  %235 = getelementptr inbounds %struct.vrContactPoint, ptr %234, i32 0, i32 7
  %236 = load <2 x float>, ptr %235, align 8
  %237 = call <2 x float> @vrCrossScalar(float noundef %231, <2 x float> %236)
  store <2 x float> %237, ptr %22, align 4
  %238 = load <2 x float>, ptr %226, align 8
  %239 = load <2 x float>, ptr %22, align 4
  %240 = call <2 x float> @vrAdd(<2 x float> %238, <2 x float> %239)
  store <2 x float> %240, ptr %21, align 4
  %241 = load ptr, ptr %3, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.vrManifold, ptr %241, i32 0, i32 0
  %243 = load ptr, ptr %242, align 8, !tbaa !28
  %244 = getelementptr inbounds %struct.vrRigidBody, ptr %243, i32 0, i32 3
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.vrManifold, ptr %245, i32 0, i32 0
  %247 = load ptr, ptr %246, align 8, !tbaa !28
  %248 = getelementptr inbounds %struct.vrRigidBody, ptr %247, i32 0, i32 7
  %249 = load float, ptr %248, align 4, !tbaa !22
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.vrManifold, ptr %250, i32 0, i32 2
  %252 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %251, i64 0, i64 1
  %253 = getelementptr inbounds %struct.vrContactPoint, ptr %252, i32 0, i32 6
  %254 = load <2 x float>, ptr %253, align 8
  %255 = call <2 x float> @vrCrossScalar(float noundef %249, <2 x float> %254)
  store <2 x float> %255, ptr %24, align 4
  %256 = load <2 x float>, ptr %244, align 8
  %257 = load <2 x float>, ptr %24, align 4
  %258 = call <2 x float> @vrAdd(<2 x float> %256, <2 x float> %257)
  store <2 x float> %258, ptr %23, align 4
  %259 = load <2 x float>, ptr %21, align 4
  %260 = load <2 x float>, ptr %23, align 4
  %261 = call <2 x float> @vrSub(<2 x float> %259, <2 x float> %260)
  store <2 x float> %261, ptr %20, align 4
  %262 = load ptr, ptr %3, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.vrManifold, ptr %262, i32 0, i32 4
  %264 = load <2 x float>, ptr %20, align 4
  %265 = load <2 x float>, ptr %263, align 4
  %266 = call float @vrDot(<2 x float> %264, <2 x float> %265)
  %267 = fsub float %222, %266
  %268 = fneg float %267
  %269 = getelementptr inbounds %struct.vrBlockSolverData, ptr %14, i32 0, i32 2
  %270 = getelementptr inbounds %struct.vrVec2, ptr %269, i32 0, i32 1
  store float %268, ptr %270, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %271 = call <2 x float> @vrManifoldConjugateGradient(ptr noundef byval(%struct.vrBlockSolverData) align 8 %14, float noundef 0x3E45798EE0000000)
  store <2 x float> %271, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.vrManifold, ptr %272, i32 0, i32 2
  %274 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %273, i64 0, i64 0
  %275 = getelementptr inbounds %struct.vrContactPoint, ptr %274, i32 0, i32 5
  %276 = load float, ptr %275, align 4, !tbaa !30
  store float %276, ptr %26, align 4, !tbaa !9
  %277 = load float, ptr %26, align 4, !tbaa !9
  %278 = getelementptr inbounds %struct.vrVec2, ptr %25, i32 0, i32 0
  %279 = load float, ptr %278, align 4, !tbaa !36
  %280 = fadd float %277, %279
  %281 = call float @vrMax(float noundef %280, float noundef 0.000000e+00)
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.vrManifold, ptr %282, i32 0, i32 2
  %284 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %283, i64 0, i64 0
  %285 = getelementptr inbounds %struct.vrContactPoint, ptr %284, i32 0, i32 5
  store float %281, ptr %285, align 4, !tbaa !30
  %286 = load ptr, ptr %3, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.vrManifold, ptr %286, i32 0, i32 2
  %288 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %287, i64 0, i64 0
  %289 = getelementptr inbounds %struct.vrContactPoint, ptr %288, i32 0, i32 5
  %290 = load float, ptr %289, align 4, !tbaa !30
  %291 = load float, ptr %26, align 4, !tbaa !9
  %292 = fsub float %290, %291
  %293 = getelementptr inbounds %struct.vrVec2, ptr %25, i32 0, i32 0
  store float %292, ptr %293, align 4, !tbaa !36
  %294 = load ptr, ptr %3, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.vrManifold, ptr %294, i32 0, i32 2
  %296 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %295, i64 0, i64 1
  %297 = getelementptr inbounds %struct.vrContactPoint, ptr %296, i32 0, i32 5
  %298 = load float, ptr %297, align 4, !tbaa !30
  store float %298, ptr %26, align 4, !tbaa !9
  %299 = load float, ptr %26, align 4, !tbaa !9
  %300 = getelementptr inbounds %struct.vrVec2, ptr %25, i32 0, i32 1
  %301 = load float, ptr %300, align 4, !tbaa !37
  %302 = fadd float %299, %301
  %303 = call float @vrMax(float noundef %302, float noundef 0.000000e+00)
  %304 = load ptr, ptr %3, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.vrManifold, ptr %304, i32 0, i32 2
  %306 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %305, i64 0, i64 1
  %307 = getelementptr inbounds %struct.vrContactPoint, ptr %306, i32 0, i32 5
  store float %303, ptr %307, align 4, !tbaa !30
  %308 = load ptr, ptr %3, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.vrManifold, ptr %308, i32 0, i32 2
  %310 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %309, i64 0, i64 1
  %311 = getelementptr inbounds %struct.vrContactPoint, ptr %310, i32 0, i32 5
  %312 = load float, ptr %311, align 4, !tbaa !30
  %313 = load float, ptr %26, align 4, !tbaa !9
  %314 = fsub float %312, %313
  %315 = getelementptr inbounds %struct.vrVec2, ptr %25, i32 0, i32 1
  store float %314, ptr %315, align 4, !tbaa !37
  %316 = load ptr, ptr %3, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.vrManifold, ptr %316, i32 0, i32 0
  %318 = load ptr, ptr %317, align 8, !tbaa !28
  %319 = load ptr, ptr %3, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.vrManifold, ptr %319, i32 0, i32 1
  %321 = load ptr, ptr %320, align 8, !tbaa !21
  %322 = load ptr, ptr %3, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.vrManifold, ptr %322, i32 0, i32 2
  %324 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %323, i64 0, i64 0
  %325 = getelementptr inbounds %struct.vrContactPoint, ptr %324, i32 0, i32 6
  %326 = load ptr, ptr %3, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.vrManifold, ptr %326, i32 0, i32 2
  %328 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %327, i64 0, i64 0
  %329 = getelementptr inbounds %struct.vrContactPoint, ptr %328, i32 0, i32 7
  %330 = load ptr, ptr %3, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.vrManifold, ptr %330, i32 0, i32 4
  %332 = getelementptr inbounds %struct.vrVec2, ptr %25, i32 0, i32 0
  %333 = load float, ptr %332, align 4, !tbaa !36
  %334 = load <2 x float>, ptr %331, align 4
  %335 = call <2 x float> @vrScale(<2 x float> %334, float noundef %333)
  store <2 x float> %335, ptr %27, align 4
  %336 = load <2 x float>, ptr %325, align 8
  %337 = load <2 x float>, ptr %329, align 8
  %338 = load <2 x float>, ptr %27, align 4
  call void @vrManifoldApplyBiasImpulse(ptr noundef %318, ptr noundef %321, <2 x float> %336, <2 x float> %337, <2 x float> %338)
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.vrManifold, ptr %339, i32 0, i32 0
  %341 = load ptr, ptr %340, align 8, !tbaa !28
  %342 = load ptr, ptr %3, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.vrManifold, ptr %342, i32 0, i32 1
  %344 = load ptr, ptr %343, align 8, !tbaa !21
  %345 = load ptr, ptr %3, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.vrManifold, ptr %345, i32 0, i32 2
  %347 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %346, i64 0, i64 1
  %348 = getelementptr inbounds %struct.vrContactPoint, ptr %347, i32 0, i32 6
  %349 = load ptr, ptr %3, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.vrManifold, ptr %349, i32 0, i32 2
  %351 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %350, i64 0, i64 1
  %352 = getelementptr inbounds %struct.vrContactPoint, ptr %351, i32 0, i32 7
  %353 = load ptr, ptr %3, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.vrManifold, ptr %353, i32 0, i32 4
  %355 = getelementptr inbounds %struct.vrVec2, ptr %25, i32 0, i32 1
  %356 = load float, ptr %355, align 4, !tbaa !37
  %357 = load <2 x float>, ptr %354, align 4
  %358 = call <2 x float> @vrScale(<2 x float> %357, float noundef %356)
  store <2 x float> %358, ptr %28, align 4
  %359 = load <2 x float>, ptr %348, align 8
  %360 = load <2 x float>, ptr %352, align 8
  %361 = load <2 x float>, ptr %28, align 4
  call void @vrManifoldApplyBiasImpulse(ptr noundef %341, ptr noundef %344, <2 x float> %359, <2 x float> %360, <2 x float> %361)
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #5
  br label %362

362:                                              ; preds = %162, %161
  ret void
}

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @vrManifoldSolvePosition(ptr nocapture noundef %0, float noundef %1) local_unnamed_addr #3 {
  %3 = alloca %struct.vrBlockSolverData, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 192
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = icmp eq i32 %5, 1
  br i1 %6, label %.lr.ph, label %53

.lr.ph:                                           ; preds = %2
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = getelementptr inbounds i8, ptr %0, i64 196
  br label %10

10:                                               ; preds = %.lr.ph, %10
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %10 ]
  %11 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %7, i64 0, i64 %indvars.iv
  %12 = getelementptr inbounds i8, ptr %11, i64 56
  %13 = load float, ptr %12, align 8, !tbaa !15
  %14 = load ptr, ptr %8, align 8, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = getelementptr inbounds i8, ptr %14, i64 44
  %17 = load float, ptr %16, align 4, !tbaa !19
  %18 = getelementptr inbounds i8, ptr %11, i64 40
  %19 = load <2 x float>, ptr %18, align 8
  %20 = tail call <2 x float> @vrCrossScalar(float noundef %17, <2 x float> %19) #5
  %21 = load <2 x float>, ptr %15, align 8
  %22 = tail call <2 x float> @vrAdd(<2 x float> %21, <2 x float> %20) #5
  %23 = load ptr, ptr %0, align 8, !tbaa !25
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  %25 = getelementptr inbounds i8, ptr %23, i64 44
  %26 = load float, ptr %25, align 4, !tbaa !19
  %27 = getelementptr inbounds i8, ptr %11, i64 32
  %28 = load <2 x float>, ptr %27, align 8
  %29 = tail call <2 x float> @vrCrossScalar(float noundef %26, <2 x float> %28) #5
  %30 = load <2 x float>, ptr %24, align 8
  %31 = tail call <2 x float> @vrAdd(<2 x float> %30, <2 x float> %29) #5
  %32 = tail call <2 x float> @vrSub(<2 x float> %22, <2 x float> %31) #5
  %33 = load <2 x float>, ptr %9, align 4
  %34 = tail call float @vrDot(<2 x float> %32, <2 x float> %33) #5
  %35 = fsub float %13, %34
  %36 = getelementptr inbounds i8, ptr %11, i64 48
  %37 = load float, ptr %36, align 8, !tbaa !26
  %38 = fmul float %35, %37
  %39 = getelementptr inbounds i8, ptr %11, i64 28
  %40 = load float, ptr %39, align 4, !tbaa !27
  %41 = fadd float %40, %38
  %42 = tail call float @vrMax(float noundef %41, float noundef 0.000000e+00) #5
  store float %42, ptr %39, align 4, !tbaa !27
  %43 = fsub float %42, %40
  %44 = load ptr, ptr %0, align 8, !tbaa !25
  %45 = load ptr, ptr %8, align 8, !tbaa !18
  %46 = load <2 x float>, ptr %9, align 4
  %47 = tail call <2 x float> @vrScale(<2 x float> %46, float noundef %43) #5
  %48 = load <2 x float>, ptr %27, align 8
  %49 = load <2 x float>, ptr %18, align 8
  tail call void @vrManifoldApplyBiasImpulse(ptr noundef %44, ptr noundef %45, <2 x float> %48, <2 x float> %49, <2 x float> %47)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = load i32, ptr %4, align 8, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next, %51
  br i1 %52, label %10, label %.loopexit, !llvm.loop !28

53:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #5
  %54 = getelementptr inbounds i8, ptr %0, i64 224
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(56) %54, i64 56, i1 false), !tbaa.struct !30
  %55 = getelementptr inbounds i8, ptr %0, i64 72
  %56 = load float, ptr %55, align 8, !tbaa !15
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds i8, ptr %58, i64 24
  %60 = getelementptr inbounds i8, ptr %58, i64 44
  %61 = load float, ptr %60, align 4, !tbaa !19
  %62 = getelementptr inbounds i8, ptr %0, i64 56
  %63 = load <2 x float>, ptr %62, align 8
  %64 = tail call <2 x float> @vrCrossScalar(float noundef %61, <2 x float> %63) #5
  %65 = load <2 x float>, ptr %59, align 8
  %66 = tail call <2 x float> @vrAdd(<2 x float> %65, <2 x float> %64) #5
  %67 = load ptr, ptr %0, align 8, !tbaa !25
  %68 = getelementptr inbounds i8, ptr %67, i64 24
  %69 = getelementptr inbounds i8, ptr %67, i64 44
  %70 = load float, ptr %69, align 4, !tbaa !19
  %71 = getelementptr inbounds i8, ptr %0, i64 48
  %72 = load <2 x float>, ptr %71, align 8
  %73 = tail call <2 x float> @vrCrossScalar(float noundef %70, <2 x float> %72) #5
  %74 = load <2 x float>, ptr %68, align 8
  %75 = tail call <2 x float> @vrAdd(<2 x float> %74, <2 x float> %73) #5
  %76 = tail call <2 x float> @vrSub(<2 x float> %66, <2 x float> %75) #5
  %77 = getelementptr inbounds i8, ptr %0, i64 196
  %78 = load <2 x float>, ptr %77, align 4
  %79 = tail call float @vrDot(<2 x float> %76, <2 x float> %78) #5
  %80 = fsub float %56, %79
  %81 = fneg float %80
  %82 = getelementptr inbounds i8, ptr %3, i64 24
  store float %81, ptr %82, align 8, !tbaa !32
  %83 = getelementptr inbounds i8, ptr %0, i64 160
  %84 = load float, ptr %83, align 8, !tbaa !15
  %85 = load ptr, ptr %57, align 8, !tbaa !18
  %86 = getelementptr inbounds i8, ptr %85, i64 24
  %87 = getelementptr inbounds i8, ptr %85, i64 44
  %88 = load float, ptr %87, align 4, !tbaa !19
  %89 = getelementptr inbounds i8, ptr %0, i64 144
  %90 = load <2 x float>, ptr %89, align 8
  %91 = tail call <2 x float> @vrCrossScalar(float noundef %88, <2 x float> %90) #5
  %92 = load <2 x float>, ptr %86, align 8
  %93 = tail call <2 x float> @vrAdd(<2 x float> %92, <2 x float> %91) #5
  %94 = load ptr, ptr %0, align 8, !tbaa !25
  %95 = getelementptr inbounds i8, ptr %94, i64 24
  %96 = getelementptr inbounds i8, ptr %94, i64 44
  %97 = load float, ptr %96, align 4, !tbaa !19
  %98 = getelementptr inbounds i8, ptr %0, i64 136
  %99 = load <2 x float>, ptr %98, align 8
  %100 = tail call <2 x float> @vrCrossScalar(float noundef %97, <2 x float> %99) #5
  %101 = load <2 x float>, ptr %95, align 8
  %102 = tail call <2 x float> @vrAdd(<2 x float> %101, <2 x float> %100) #5
  %103 = tail call <2 x float> @vrSub(<2 x float> %93, <2 x float> %102) #5
  %104 = load <2 x float>, ptr %77, align 4
  %105 = tail call float @vrDot(<2 x float> %103, <2 x float> %104) #5
  %106 = fsub float %84, %105
  %107 = fneg float %106
  %108 = getelementptr inbounds i8, ptr %3, i64 28
  store float %107, ptr %108, align 4, !tbaa !33
  %109 = tail call <2 x float> @vrManifoldConjugateGradient(ptr noundef nonnull byval(%struct.vrBlockSolverData) align 8 %3, float noundef 0x3E45798EE0000000)
  %110 = getelementptr inbounds i8, ptr %0, i64 44
  %111 = load float, ptr %110, align 4, !tbaa !27
  %.sroa.05.0.vec.extract = extractelement <2 x float> %109, i64 0
  %112 = fadd float %111, %.sroa.05.0.vec.extract
  %113 = tail call float @vrMax(float noundef %112, float noundef 0.000000e+00) #5
  store float %113, ptr %110, align 4, !tbaa !27
  %114 = fsub float %113, %111
  %115 = getelementptr inbounds i8, ptr %0, i64 132
  %116 = load float, ptr %115, align 4, !tbaa !27
  %.sroa.05.4.vec.extract = extractelement <2 x float> %109, i64 1
  %117 = fadd float %.sroa.05.4.vec.extract, %116
  %118 = tail call float @vrMax(float noundef %117, float noundef 0.000000e+00) #5
  store float %118, ptr %115, align 4, !tbaa !27
  %119 = fsub float %118, %116
  %120 = load ptr, ptr %0, align 8, !tbaa !25
  %121 = load ptr, ptr %57, align 8, !tbaa !18
  %122 = load <2 x float>, ptr %77, align 4
  %123 = tail call <2 x float> @vrScale(<2 x float> %122, float noundef %114) #5
  %124 = load <2 x float>, ptr %71, align 8
  %125 = load <2 x float>, ptr %62, align 8
  tail call void @vrManifoldApplyBiasImpulse(ptr noundef %120, ptr noundef %121, <2 x float> %124, <2 x float> %125, <2 x float> %123)
  %126 = load ptr, ptr %0, align 8, !tbaa !25
  %127 = load ptr, ptr %57, align 8, !tbaa !18
  %128 = load <2 x float>, ptr %77, align 4
  %129 = tail call <2 x float> @vrScale(<2 x float> %128, float noundef %119) #5
  %130 = load <2 x float>, ptr %98, align 8
  %131 = load <2 x float>, ptr %89, align 8
  tail call void @vrManifoldApplyBiasImpulse(ptr noundef %126, ptr noundef %127, <2 x float> %130, <2 x float> %131, <2 x float> %129)
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #5
  br label %.loopexit

.loopexit:                                        ; preds = %10, %53
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 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 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, !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 = !{!16, !12, i64 56}
!16 = !{!"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, !17, i64 64}
!17 = !{!"vrLocalPoint", !12, i64 0, !11, i64 4, !7, i64 16}
!18 = !{!6, !7, i64 8}
!19 = !{!20, !12, i64 44}
!20 = !{!"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, !21, i64 48, !22, i64 56, !7, i64 88, !23, i64 96, !11, i64 108, !24, i64 116, !7, i64 136, !10, i64 144}
!21 = !{!"vrCollisionGroup", !10, i64 0, !10, i64 4}
!22 = !{!"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}
!23 = !{!"vrColor", !12, i64 0, !12, i64 4, !12, i64 8}
!24 = !{!"vrOrientedBoundingBox", !11, i64 0, !11, i64 8}
!25 = !{!6, !7, i64 0}
!26 = !{!16, !12, i64 48}
!27 = !{!16, !12, i64 28}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{i64 0, i64 4, !31, i64 4, i64 4, !31, i64 8, i64 4, !31, i64 12, i64 4, !31, i64 16, i64 4, !31, i64 20, i64 4, !31, i64 24, i64 4, !31, i64 28, i64 4, !31, i64 32, i64 4, !31, i64 36, i64 4, !31, i64 40, i64 4, !31, i64 44, i64 4, !31, i64 48, i64 4, !31, i64 52, i64 4, !31}
!31 = !{!12, !12, i64 0}
!32 = !{!13, !12, i64 24}
!33 = !{!13, !12, i64 28}


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