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

; Function Attrs: nounwind uwtable
define dso_local void @vrManifoldPreStep(ptr noundef %0, float noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca i32, 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 float, align 4
  %15 = alloca float, align 4
  %16 = alloca %struct.vrVec2, align 4
  %17 = alloca float, align 4
  %18 = alloca float, 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.vrMat2, align 4
  %26 = alloca %struct.vrVec2, align 4
  %27 = alloca %struct.vrVec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store float 0x3FA1EB8520000000, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store float 0x3F847AE140000000, ptr %6, align 4, !tbaa !9
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.vrManifold, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = getelementptr inbounds %struct.vrRigidBody, ptr %30, i32 0, i32 9
  %32 = getelementptr inbounds %struct.vrMaterial, ptr %31, i32 0, i32 0
  %33 = load float, ptr %32, align 8, !tbaa !17
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.vrManifold, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !23
  %37 = getelementptr inbounds %struct.vrRigidBody, ptr %36, i32 0, i32 9
  %38 = getelementptr inbounds %struct.vrMaterial, ptr %37, i32 0, i32 0
  %39 = load float, ptr %38, align 8, !tbaa !17
  %40 = call float @vrMax(float noundef %33, float noundef %39)
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.vrManifold, ptr %41, i32 0, i32 6
  store float %40, ptr %42, align 4, !tbaa !24
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.vrManifold, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds %struct.vrRigidBody, ptr %45, i32 0, i32 9
  %47 = getelementptr inbounds %struct.vrMaterial, ptr %46, i32 0, i32 1
  %48 = load float, ptr %47, align 4, !tbaa !25
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.vrManifold, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !11
  %52 = getelementptr inbounds %struct.vrRigidBody, ptr %51, i32 0, i32 9
  %53 = getelementptr inbounds %struct.vrMaterial, ptr %52, i32 0, i32 1
  %54 = load float, ptr %53, align 4, !tbaa !25
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.vrManifold, ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !23
  %58 = getelementptr inbounds %struct.vrRigidBody, ptr %57, i32 0, i32 9
  %59 = getelementptr inbounds %struct.vrMaterial, ptr %58, i32 0, i32 1
  %60 = load float, ptr %59, align 4, !tbaa !25
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.vrManifold, ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = getelementptr inbounds %struct.vrRigidBody, ptr %63, i32 0, i32 9
  %65 = getelementptr inbounds %struct.vrMaterial, ptr %64, i32 0, i32 1
  %66 = load float, ptr %65, align 4, !tbaa !25
  %67 = fmul float %60, %66
  %68 = call float @llvm.fmuladd.f32(float %48, float %54, float %67)
  %69 = fpext float %68 to double
  %70 = call double @sqrt(double noundef %69) #7
  %71 = fptrunc double %70 to float
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.vrManifold, ptr %72, i32 0, i32 7
  store float %71, ptr %73, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !27
  br label %74

74:                                               ; preds = %346, %2
  %75 = load i32, ptr %7, align 4, !tbaa !27
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.vrManifold, ptr %76, i32 0, i32 3
  %78 = load i32, ptr %77, align 8, !tbaa !28
  %79 = icmp slt i32 %75, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %349

81:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.vrManifold, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds %struct.vrRigidBody, ptr %84, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %85, i64 8, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.vrManifold, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !23
  %89 = getelementptr inbounds %struct.vrRigidBody, ptr %88, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %89, i64 8, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.vrManifold, ptr %90, i32 0, i32 2
  %92 = load i32, ptr %7, align 4, !tbaa !27
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %91, i64 0, i64 %93
  %95 = getelementptr inbounds %struct.vrContactPoint, ptr %94, i32 0, i32 1
  %96 = load <2 x float>, ptr %95, align 8
  %97 = load <2 x float>, ptr %8, align 4
  %98 = call <2 x float> @vrSub(<2 x float> %96, <2 x float> %97)
  store <2 x float> %98, ptr %10, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.vrManifold, ptr %99, i32 0, i32 2
  %101 = load i32, ptr %7, align 4, !tbaa !27
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %100, i64 0, i64 %102
  %104 = getelementptr inbounds %struct.vrContactPoint, ptr %103, i32 0, i32 1
  %105 = load <2 x float>, ptr %104, align 8
  %106 = load <2 x float>, ptr %9, align 4
  %107 = call <2 x float> @vrSub(<2 x float> %105, <2 x float> %106)
  store <2 x float> %107, ptr %11, align 4
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.vrManifold, ptr %108, i32 0, i32 2
  %110 = load i32, ptr %7, align 4, !tbaa !27
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %109, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.vrContactPoint, ptr %112, i32 0, i32 11
  store float 0.000000e+00, ptr %113, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.vrManifold, ptr %114, i32 0, i32 4
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.vrManifold, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !11
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.vrManifold, ptr %119, i32 0, i32 1
  %121 = load ptr, ptr %120, align 8, !tbaa !23
  %122 = load <2 x float>, ptr %10, align 4
  %123 = load <2 x float>, ptr %11, align 4
  %124 = call <2 x float> @vrManifoldRelativeVelocity(ptr noundef %118, ptr noundef %121, <2 x float> %122, <2 x float> %123)
  store <2 x float> %124, ptr %13, align 4
  %125 = load <2 x float>, ptr %115, align 4
  %126 = load <2 x float>, ptr %13, align 4
  %127 = call float @vrDot(<2 x float> %125, <2 x float> %126)
  store float %127, ptr %12, align 4, !tbaa !9
  %128 = load float, ptr %12, align 4, !tbaa !9
  %129 = fcmp olt float %128, -2.000000e+00
  br i1 %129, label %130, label %142

130:                                              ; preds = %81
  %131 = load float, ptr %12, align 4, !tbaa !9
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.vrManifold, ptr %132, i32 0, i32 6
  %134 = load float, ptr %133, align 4, !tbaa !24
  %135 = fmul float %131, %134
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.vrManifold, ptr %136, i32 0, i32 2
  %138 = load i32, ptr %7, align 4, !tbaa !27
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %137, i64 0, i64 %139
  %141 = getelementptr inbounds %struct.vrContactPoint, ptr %140, i32 0, i32 11
  store float %135, ptr %141, align 4, !tbaa !30
  br label %142

142:                                              ; preds = %130, %81
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.vrManifold, ptr %143, i32 0, i32 2
  %145 = load i32, ptr %7, align 4, !tbaa !27
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %144, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.vrContactPoint, ptr %147, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %148, ptr align 4 %10, i64 8, i1 false), !tbaa.struct !29
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.vrManifold, ptr %149, i32 0, i32 2
  %151 = load i32, ptr %7, align 4, !tbaa !27
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %150, i64 0, i64 %152
  %154 = getelementptr inbounds %struct.vrContactPoint, ptr %153, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %154, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.vrManifold, ptr %155, i32 0, i32 4
  %157 = load <2 x float>, ptr %10, align 4
  %158 = load <2 x float>, ptr %156, align 4
  %159 = call float @vrCross(<2 x float> %157, <2 x float> %158)
  store float %159, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.vrManifold, ptr %160, i32 0, i32 4
  %162 = load <2 x float>, ptr %11, align 4
  %163 = load <2 x float>, ptr %161, align 4
  %164 = call float @vrCross(<2 x float> %162, <2 x float> %163)
  store float %164, ptr %15, align 4, !tbaa !9
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.vrManifold, ptr %165, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  %168 = getelementptr inbounds %struct.vrRigidBody, ptr %167, i32 0, i32 9
  %169 = getelementptr inbounds %struct.vrMaterial, ptr %168, i32 0, i32 4
  %170 = load float, ptr %169, align 8, !tbaa !33
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.vrManifold, ptr %171, i32 0, i32 1
  %173 = load ptr, ptr %172, align 8, !tbaa !23
  %174 = getelementptr inbounds %struct.vrRigidBody, ptr %173, i32 0, i32 9
  %175 = getelementptr inbounds %struct.vrMaterial, ptr %174, i32 0, i32 4
  %176 = load float, ptr %175, align 8, !tbaa !33
  %177 = fadd float %170, %176
  %178 = load float, ptr %14, align 4, !tbaa !9
  %179 = load float, ptr %14, align 4, !tbaa !9
  %180 = fmul float %178, %179
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.vrManifold, ptr %181, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !11
  %184 = getelementptr inbounds %struct.vrRigidBody, ptr %183, i32 0, i32 9
  %185 = getelementptr inbounds %struct.vrMaterial, ptr %184, i32 0, i32 5
  %186 = load float, ptr %185, align 4, !tbaa !34
  %187 = call float @llvm.fmuladd.f32(float %180, float %186, float %177)
  %188 = load float, ptr %15, align 4, !tbaa !9
  %189 = load float, ptr %15, align 4, !tbaa !9
  %190 = fmul float %188, %189
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.vrManifold, ptr %191, i32 0, i32 1
  %193 = load ptr, ptr %192, align 8, !tbaa !23
  %194 = getelementptr inbounds %struct.vrRigidBody, ptr %193, i32 0, i32 9
  %195 = getelementptr inbounds %struct.vrMaterial, ptr %194, i32 0, i32 5
  %196 = load float, ptr %195, align 4, !tbaa !34
  %197 = call float @llvm.fmuladd.f32(float %190, float %196, float %187)
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.vrManifold, ptr %198, i32 0, i32 2
  %200 = load i32, ptr %7, align 4, !tbaa !27
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %199, i64 0, i64 %201
  %203 = getelementptr inbounds %struct.vrContactPoint, ptr %202, i32 0, i32 8
  store float %197, ptr %203, align 8, !tbaa !35
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.vrManifold, ptr %204, i32 0, i32 2
  %206 = load i32, ptr %7, align 4, !tbaa !27
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %205, i64 0, i64 %207
  %209 = getelementptr inbounds %struct.vrContactPoint, ptr %208, i32 0, i32 8
  %210 = load float, ptr %209, align 8, !tbaa !35
  %211 = fpext float %210 to double
  %212 = fdiv double 1.000000e+00, %211
  %213 = fptrunc double %212 to float
  %214 = load ptr, ptr %3, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.vrManifold, ptr %214, i32 0, i32 2
  %216 = load i32, ptr %7, align 4, !tbaa !27
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %215, i64 0, i64 %217
  %219 = getelementptr inbounds %struct.vrContactPoint, ptr %218, i32 0, i32 8
  store float %213, ptr %219, align 8, !tbaa !35
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.vrManifold, ptr %220, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %222 = load ptr, ptr %3, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.vrManifold, ptr %222, i32 0, i32 4
  %224 = load <2 x float>, ptr %223, align 4
  %225 = call <2 x float> @vrCrossScalar(float noundef -1.000000e+00, <2 x float> %224)
  store <2 x float> %225, ptr %16, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %221, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.vrManifold, ptr %226, i32 0, i32 5
  %228 = load <2 x float>, ptr %10, align 4
  %229 = load <2 x float>, ptr %227, align 4
  %230 = call float @vrCross(<2 x float> %228, <2 x float> %229)
  store float %230, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.vrManifold, ptr %231, i32 0, i32 5
  %233 = load <2 x float>, ptr %11, align 4
  %234 = load <2 x float>, ptr %232, align 4
  %235 = call float @vrCross(<2 x float> %233, <2 x float> %234)
  store float %235, ptr %18, align 4, !tbaa !9
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.vrManifold, ptr %236, i32 0, i32 0
  %238 = load ptr, ptr %237, align 8, !tbaa !11
  %239 = getelementptr inbounds %struct.vrRigidBody, ptr %238, i32 0, i32 9
  %240 = getelementptr inbounds %struct.vrMaterial, ptr %239, i32 0, i32 4
  %241 = load float, ptr %240, align 8, !tbaa !33
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.vrManifold, ptr %242, i32 0, i32 1
  %244 = load ptr, ptr %243, align 8, !tbaa !23
  %245 = getelementptr inbounds %struct.vrRigidBody, ptr %244, i32 0, i32 9
  %246 = getelementptr inbounds %struct.vrMaterial, ptr %245, i32 0, i32 4
  %247 = load float, ptr %246, align 8, !tbaa !33
  %248 = fadd float %241, %247
  %249 = load float, ptr %17, align 4, !tbaa !9
  %250 = load float, ptr %17, align 4, !tbaa !9
  %251 = fmul float %249, %250
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.vrManifold, ptr %252, i32 0, i32 0
  %254 = load ptr, ptr %253, align 8, !tbaa !11
  %255 = getelementptr inbounds %struct.vrRigidBody, ptr %254, i32 0, i32 9
  %256 = getelementptr inbounds %struct.vrMaterial, ptr %255, i32 0, i32 5
  %257 = load float, ptr %256, align 4, !tbaa !34
  %258 = call float @llvm.fmuladd.f32(float %251, float %257, float %248)
  %259 = load float, ptr %18, align 4, !tbaa !9
  %260 = load float, ptr %18, align 4, !tbaa !9
  %261 = fmul float %259, %260
  %262 = load ptr, ptr %3, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.vrManifold, ptr %262, i32 0, i32 1
  %264 = load ptr, ptr %263, align 8, !tbaa !23
  %265 = getelementptr inbounds %struct.vrRigidBody, ptr %264, i32 0, i32 9
  %266 = getelementptr inbounds %struct.vrMaterial, ptr %265, i32 0, i32 5
  %267 = load float, ptr %266, align 4, !tbaa !34
  %268 = call float @llvm.fmuladd.f32(float %261, float %267, float %258)
  %269 = load ptr, ptr %3, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.vrManifold, ptr %269, i32 0, i32 2
  %271 = load i32, ptr %7, align 4, !tbaa !27
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %270, i64 0, i64 %272
  %274 = getelementptr inbounds %struct.vrContactPoint, ptr %273, i32 0, i32 9
  store float %268, ptr %274, align 4, !tbaa !36
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.vrManifold, ptr %275, i32 0, i32 2
  %277 = load i32, ptr %7, align 4, !tbaa !27
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %276, i64 0, i64 %278
  %280 = getelementptr inbounds %struct.vrContactPoint, ptr %279, i32 0, i32 9
  %281 = load float, ptr %280, align 4, !tbaa !36
  %282 = fpext float %281 to double
  %283 = fdiv double 1.000000e+00, %282
  %284 = fptrunc double %283 to float
  %285 = load ptr, ptr %3, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.vrManifold, ptr %285, i32 0, i32 2
  %287 = load i32, ptr %7, align 4, !tbaa !27
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %286, i64 0, i64 %288
  %290 = getelementptr inbounds %struct.vrContactPoint, ptr %289, i32 0, i32 9
  store float %284, ptr %290, align 4, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %291 = load ptr, ptr %3, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.vrManifold, ptr %291, i32 0, i32 4
  %293 = load ptr, ptr %3, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.vrManifold, ptr %293, i32 0, i32 2
  %295 = load i32, ptr %7, align 4, !tbaa !27
  %296 = sext i32 %295 to i64
  %297 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %294, i64 0, i64 %296
  %298 = getelementptr inbounds %struct.vrContactPoint, ptr %297, i32 0, i32 3
  %299 = load float, ptr %298, align 4, !tbaa !37
  %300 = load <2 x float>, ptr %292, align 4
  %301 = call <2 x float> @vrScale(<2 x float> %300, float noundef %299)
  store <2 x float> %301, ptr %20, align 4
  %302 = load ptr, ptr %3, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.vrManifold, ptr %302, i32 0, i32 5
  %304 = load ptr, ptr %3, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.vrManifold, ptr %304, i32 0, i32 2
  %306 = load i32, ptr %7, align 4, !tbaa !27
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %305, i64 0, i64 %307
  %309 = getelementptr inbounds %struct.vrContactPoint, ptr %308, i32 0, i32 4
  %310 = load float, ptr %309, align 8, !tbaa !38
  %311 = load <2 x float>, ptr %303, align 4
  %312 = call <2 x float> @vrScale(<2 x float> %311, float noundef %310)
  store <2 x float> %312, ptr %21, align 4
  %313 = load <2 x float>, ptr %20, align 4
  %314 = load <2 x float>, ptr %21, align 4
  %315 = call <2 x float> @vrAdd(<2 x float> %313, <2 x float> %314)
  store <2 x float> %315, ptr %19, align 4
  %316 = load float, ptr %5, align 4, !tbaa !9
  %317 = fneg float %316
  %318 = load ptr, ptr %3, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.vrManifold, ptr %318, i32 0, i32 2
  %320 = load i32, ptr %7, align 4, !tbaa !27
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %319, i64 0, i64 %321
  %323 = getelementptr inbounds %struct.vrContactPoint, ptr %322, i32 0, i32 2
  %324 = load float, ptr %323, align 8, !tbaa !39
  %325 = load float, ptr %6, align 4, !tbaa !9
  %326 = fadd float %324, %325
  %327 = call float @vrMin(float noundef 0.000000e+00, float noundef %326)
  %328 = fmul float %317, %327
  %329 = load float, ptr %4, align 4, !tbaa !9
  %330 = fdiv float %328, %329
  %331 = load ptr, ptr %3, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.vrManifold, ptr %331, i32 0, i32 2
  %333 = load i32, ptr %7, align 4, !tbaa !27
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %332, i64 0, i64 %334
  %336 = getelementptr inbounds %struct.vrContactPoint, ptr %335, i32 0, i32 10
  store float %330, ptr %336, align 8, !tbaa !40
  %337 = load ptr, ptr %3, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.vrManifold, ptr %337, i32 0, i32 0
  %339 = load ptr, ptr %338, align 8, !tbaa !11
  %340 = load ptr, ptr %3, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.vrManifold, ptr %340, i32 0, i32 1
  %342 = load ptr, ptr %341, align 8, !tbaa !23
  %343 = load <2 x float>, ptr %10, align 4
  %344 = load <2 x float>, ptr %11, align 4
  %345 = load <2 x float>, ptr %19, align 4
  call void @vrManifoldApplyImpulse(ptr noundef %339, ptr noundef %342, <2 x float> %343, <2 x float> %344, <2 x float> %345)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %346

346:                                              ; preds = %142
  %347 = load i32, ptr %7, align 4, !tbaa !27
  %348 = add nsw i32 %347, 1
  store i32 %348, ptr %7, align 4, !tbaa !27
  br label %74, !llvm.loop !41

349:                                              ; preds = %80
  %350 = load ptr, ptr %3, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.vrManifold, ptr %350, i32 0, i32 3
  %352 = load i32, ptr %351, align 8, !tbaa !28
  %353 = icmp eq i32 %352, 2
  br i1 %353, label %354, label %405

354:                                              ; preds = %349
  %355 = load ptr, ptr %3, align 8, !tbaa !5
  %356 = getelementptr inbounds %struct.vrManifold, ptr %355, i32 0, i32 9
  %357 = getelementptr inbounds %struct.vrBlockSolverData, ptr %356, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %358 = load ptr, ptr %3, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct.vrManifold, ptr %358, i32 0, i32 2
  %360 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %359, i64 0, i64 0
  %361 = getelementptr inbounds %struct.vrContactPoint, ptr %360, i32 0, i32 8
  %362 = load float, ptr %361, align 8, !tbaa !35
  %363 = fpext float %362 to double
  %364 = fdiv double -1.000000e+00, %363
  %365 = fptrunc double %364 to float
  %366 = load ptr, ptr %3, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.vrManifold, ptr %366, i32 0, i32 2
  %368 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %367, i64 0, i64 1
  %369 = getelementptr inbounds %struct.vrContactPoint, ptr %368, i32 0, i32 8
  %370 = load float, ptr %369, align 8, !tbaa !35
  %371 = fpext float %370 to double
  %372 = fdiv double -1.000000e+00, %371
  %373 = fptrunc double %372 to float
  %374 = call <2 x float> @vrVect(float noundef %365, float noundef %373)
  store <2 x float> %374, ptr %22, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %357, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  %375 = load ptr, ptr %3, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.vrManifold, ptr %375, i32 0, i32 9
  %377 = getelementptr inbounds %struct.vrBlockSolverData, ptr %376, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %378 = call <2 x float> @vrVect(float noundef 1.000000e+04, float noundef 1.000000e+04)
  store <2 x float> %378, ptr %23, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %377, ptr align 4 %23, i64 8, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  %379 = load ptr, ptr %3, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.vrManifold, ptr %379, i32 0, i32 9
  %381 = getelementptr inbounds %struct.vrBlockSolverData, ptr %380, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %382 = call <2 x float> @vrVect(float noundef 0.000000e+00, float noundef 0.000000e+00)
  store <2 x float> %382, ptr %24, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %381, ptr align 4 %24, i64 8, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  %383 = load ptr, ptr %3, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct.vrManifold, ptr %383, i32 0, i32 9
  %385 = getelementptr inbounds %struct.vrBlockSolverData, ptr %384, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #7
  %386 = load ptr, ptr %3, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.vrManifold, ptr %386, i32 0, i32 9
  %388 = getelementptr inbounds %struct.vrBlockSolverData, ptr %387, i32 0, i32 0
  %389 = getelementptr inbounds %struct.vrVec2, ptr %388, i32 0, i32 0
  %390 = load float, ptr %389, align 8, !tbaa !43
  %391 = call <2 x float> @vrVect(float noundef %390, float noundef 0.000000e+00)
  store <2 x float> %391, ptr %26, align 4
  %392 = load ptr, ptr %3, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.vrManifold, ptr %392, i32 0, i32 9
  %394 = getelementptr inbounds %struct.vrBlockSolverData, ptr %393, i32 0, i32 0
  %395 = getelementptr inbounds %struct.vrVec2, ptr %394, i32 0, i32 1
  %396 = load float, ptr %395, align 4, !tbaa !44
  %397 = call <2 x float> @vrVect(float noundef 0.000000e+00, float noundef %396)
  store <2 x float> %397, ptr %27, align 4
  %398 = load <2 x float>, ptr %26, align 4
  %399 = load <2 x float>, ptr %27, align 4
  %400 = call { <2 x float>, <2 x float> } @vrMat(<2 x float> %398, <2 x float> %399)
  %401 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 0
  %402 = extractvalue { <2 x float>, <2 x float> } %400, 0
  store <2 x float> %402, ptr %401, align 4
  %403 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 1
  %404 = extractvalue { <2 x float>, <2 x float> } %400, 1
  store <2 x float> %404, ptr %403, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %385, ptr align 4 %25, i64 16, i1 false), !tbaa.struct !45
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  br label %405

405:                                              ; preds = %354, %349
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void
}

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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

declare <2 x float> @vrSub(<2 x float>, <2 x float>) #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>) #6

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

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

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

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

declare float @vrMin(float noundef, 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>) #3

declare { <2 x float>, <2 x float> } @vrMat(<2 x float>, <2 x float>) #1

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 = { 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 "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { 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, !6, i64 0}
!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 = !{!18, !10, i64 56}
!18 = !{!"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, !19, i64 48, !20, i64 56, !6, i64 88, !21, i64 96, !14, i64 108, !22, i64 116, !6, i64 136, !13, i64 144}
!19 = !{!"vrCollisionGroup", !13, i64 0, !13, i64 4}
!20 = !{!"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}
!21 = !{!"vrColor", !10, i64 0, !10, i64 4, !10, i64 8}
!22 = !{!"vrOrientedBoundingBox", !14, i64 0, !14, i64 8}
!23 = !{!12, !6, i64 8}
!24 = !{!12, !10, i64 212}
!25 = !{!18, !10, i64 60}
!26 = !{!12, !10, i64 216}
!27 = !{!13, !13, i64 0}
!28 = !{!12, !13, i64 192}
!29 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!30 = !{!31, !10, i64 60}
!31 = !{!"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, !32, i64 64}
!32 = !{!"vrLocalPoint", !10, i64 0, !14, i64 4, !6, i64 16}
!33 = !{!18, !10, i64 72}
!34 = !{!18, !10, i64 76}
!35 = !{!31, !10, i64 48}
!36 = !{!31, !10, i64 52}
!37 = !{!31, !10, i64 20}
!38 = !{!31, !10, i64 24}
!39 = !{!31, !10, i64 16}
!40 = !{!31, !10, i64 56}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!12, !10, i64 224}
!44 = !{!12, !10, i64 228}
!45 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9}


; 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 }

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

; Function Attrs: nounwind uwtable
define dso_local void @vrManifoldPreStep(ptr nocapture noundef %0, float noundef %1) local_unnamed_addr #1 {
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 56
  %5 = load float, ptr %4, align 8, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !21
  %8 = getelementptr inbounds i8, ptr %7, i64 56
  %9 = load float, ptr %8, align 8, !tbaa !15
  %10 = tail call float @vrMax(float noundef %5, float noundef %9) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 212
  store float %10, ptr %11, align 4, !tbaa !22
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 60
  %14 = load float, ptr %13, align 4, !tbaa !23
  %15 = load ptr, ptr %6, align 8, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %15, i64 60
  %17 = load float, ptr %16, align 4, !tbaa !23
  %18 = fmul float %17, %17
  %19 = tail call float @llvm.fmuladd.f32(float %14, float %14, float %18)
  %sqrt = tail call float @llvm.sqrt.f32(float %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 216
  store float %sqrt, ptr %20, align 8, !tbaa !24
  %21 = getelementptr inbounds i8, ptr %0, i64 192
  %22 = load i32, ptr %21, align 8, !tbaa !25
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %2
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = getelementptr inbounds i8, ptr %0, i64 196
  %26 = getelementptr inbounds i8, ptr %0, i64 204
  br label %28

._crit_edge:                                      ; preds = %49
  %27 = icmp eq i32 %113, 2
  br i1 %27, label %116, label %._crit_edge.thread

28:                                               ; preds = %.lr.ph, %49
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %49 ]
  %29 = load ptr, ptr %0, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 108
  %.sroa.029.0.copyload = load <2 x float>, ptr %30, align 4
  %31 = load ptr, ptr %6, align 8, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %31, i64 108
  %.sroa.028.0.copyload = load <2 x float>, ptr %32, align 4
  %33 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %24, i64 0, i64 %indvars.iv
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load <2 x float>, ptr %34, align 8
  %36 = tail call <2 x float> @vrSub(<2 x float> %35, <2 x float> %.sroa.029.0.copyload) #5
  %37 = load <2 x float>, ptr %34, align 8
  %38 = tail call <2 x float> @vrSub(<2 x float> %37, <2 x float> %.sroa.028.0.copyload) #5
  %39 = getelementptr inbounds i8, ptr %33, i64 60
  store float 0.000000e+00, ptr %39, align 4, !tbaa !26
  %40 = load ptr, ptr %0, align 8, !tbaa !5
  %41 = load ptr, ptr %6, align 8, !tbaa !21
  %42 = tail call <2 x float> @vrManifoldRelativeVelocity(ptr noundef %40, ptr noundef %41, <2 x float> %36, <2 x float> %38)
  %43 = load <2 x float>, ptr %25, align 4
  %44 = tail call float @vrDot(<2 x float> %43, <2 x float> %42) #5
  %45 = fcmp olt float %44, -2.000000e+00
  br i1 %45, label %46, label %49

46:                                               ; preds = %28
  %47 = load float, ptr %11, align 4, !tbaa !22
  %48 = fmul float %44, %47
  store float %48, ptr %39, align 4, !tbaa !26
  br label %49

49:                                               ; preds = %46, %28
  %50 = getelementptr inbounds i8, ptr %33, i64 32
  store <2 x float> %36, ptr %50, align 8
  %51 = getelementptr inbounds i8, ptr %33, i64 40
  store <2 x float> %38, ptr %51, align 8
  %52 = load <2 x float>, ptr %25, align 4
  %53 = tail call float @vrCross(<2 x float> %36, <2 x float> %52) #5
  %54 = load <2 x float>, ptr %25, align 4
  %55 = tail call float @vrCross(<2 x float> %38, <2 x float> %54) #5
  %56 = load ptr, ptr %0, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 72
  %58 = load float, ptr %57, align 8, !tbaa !29
  %59 = load ptr, ptr %6, align 8, !tbaa !21
  %60 = getelementptr inbounds i8, ptr %59, i64 72
  %61 = load float, ptr %60, align 8, !tbaa !29
  %62 = fadd float %58, %61
  %63 = fmul float %53, %53
  %64 = getelementptr inbounds i8, ptr %56, i64 76
  %65 = load float, ptr %64, align 4, !tbaa !30
  %66 = tail call float @llvm.fmuladd.f32(float %63, float %65, float %62)
  %67 = fmul float %55, %55
  %68 = getelementptr inbounds i8, ptr %59, i64 76
  %69 = load float, ptr %68, align 4, !tbaa !30
  %70 = tail call float @llvm.fmuladd.f32(float %67, float %69, float %66)
  %71 = getelementptr inbounds i8, ptr %33, i64 48
  %72 = fdiv float 1.000000e+00, %70
  store float %72, ptr %71, align 8, !tbaa !31
  %73 = load <2 x float>, ptr %25, align 4
  %74 = tail call <2 x float> @vrCrossScalar(float noundef -1.000000e+00, <2 x float> %73) #5
  store <2 x float> %74, ptr %26, align 4
  %75 = tail call float @vrCross(<2 x float> %36, <2 x float> %74) #5
  %76 = load <2 x float>, ptr %26, align 4
  %77 = tail call float @vrCross(<2 x float> %38, <2 x float> %76) #5
  %78 = load ptr, ptr %0, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 72
  %80 = load float, ptr %79, align 8, !tbaa !29
  %81 = load ptr, ptr %6, align 8, !tbaa !21
  %82 = getelementptr inbounds i8, ptr %81, i64 72
  %83 = load float, ptr %82, align 8, !tbaa !29
  %84 = fadd float %80, %83
  %85 = fmul float %75, %75
  %86 = getelementptr inbounds i8, ptr %78, i64 76
  %87 = load float, ptr %86, align 4, !tbaa !30
  %88 = tail call float @llvm.fmuladd.f32(float %85, float %87, float %84)
  %89 = fmul float %77, %77
  %90 = getelementptr inbounds i8, ptr %81, i64 76
  %91 = load float, ptr %90, align 4, !tbaa !30
  %92 = tail call float @llvm.fmuladd.f32(float %89, float %91, float %88)
  %93 = getelementptr inbounds i8, ptr %33, i64 52
  %94 = fdiv float 1.000000e+00, %92
  store float %94, ptr %93, align 4, !tbaa !32
  %95 = getelementptr inbounds i8, ptr %33, i64 20
  %96 = load float, ptr %95, align 4, !tbaa !33
  %97 = load <2 x float>, ptr %25, align 4
  %98 = tail call <2 x float> @vrScale(<2 x float> %97, float noundef %96) #5
  %99 = getelementptr inbounds i8, ptr %33, i64 24
  %100 = load float, ptr %99, align 8, !tbaa !34
  %101 = load <2 x float>, ptr %26, align 4
  %102 = tail call <2 x float> @vrScale(<2 x float> %101, float noundef %100) #5
  %103 = tail call <2 x float> @vrAdd(<2 x float> %98, <2 x float> %102) #5
  %104 = getelementptr inbounds i8, ptr %33, i64 16
  %105 = load float, ptr %104, align 8, !tbaa !35
  %106 = fadd float %105, 0x3F847AE140000000
  %107 = tail call float @vrMin(float noundef 0.000000e+00, float noundef %106) #5
  %108 = fmul float %107, 0xBFA1EB8520000000
  %109 = fdiv float %108, %1
  %110 = getelementptr inbounds i8, ptr %33, i64 56
  store float %109, ptr %110, align 8, !tbaa !36
  %111 = load ptr, ptr %0, align 8, !tbaa !5
  %112 = load ptr, ptr %6, align 8, !tbaa !21
  tail call void @vrManifoldApplyImpulse(ptr noundef %111, ptr noundef %112, <2 x float> %36, <2 x float> %38, <2 x float> %103)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %113 = load i32, ptr %21, align 8, !tbaa !25
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next, %114
  br i1 %115, label %28, label %._crit_edge, !llvm.loop !37

116:                                              ; preds = %._crit_edge
  %117 = getelementptr inbounds i8, ptr %0, i64 224
  %118 = getelementptr inbounds i8, ptr %0, i64 64
  %119 = load float, ptr %118, align 8, !tbaa !31
  %120 = fdiv float -1.000000e+00, %119
  %121 = getelementptr inbounds i8, ptr %0, i64 152
  %122 = load float, ptr %121, align 8, !tbaa !31
  %123 = fdiv float -1.000000e+00, %122
  %124 = tail call <2 x float> @vrVect(float noundef %120, float noundef %123) #5
  store <2 x float> %124, ptr %117, align 8
  %125 = getelementptr inbounds i8, ptr %0, i64 272
  %126 = tail call <2 x float> @vrVect(float noundef 1.000000e+04, float noundef 1.000000e+04) #5
  store <2 x float> %126, ptr %125, align 8
  %127 = getelementptr inbounds i8, ptr %0, i64 256
  %128 = tail call <2 x float> @vrVect(float noundef 0.000000e+00, float noundef 0.000000e+00) #5
  store <2 x float> %128, ptr %127, align 8
  %129 = getelementptr inbounds i8, ptr %0, i64 232
  %130 = load float, ptr %117, align 8, !tbaa !39
  %131 = tail call <2 x float> @vrVect(float noundef %130, float noundef 0.000000e+00) #5
  %132 = getelementptr inbounds i8, ptr %0, i64 228
  %133 = load float, ptr %132, align 4, !tbaa !40
  %134 = tail call <2 x float> @vrVect(float noundef 0.000000e+00, float noundef %133) #5
  %135 = tail call { <2 x float>, <2 x float> } @vrMat(<2 x float> %131, <2 x float> %134) #5
  %136 = extractvalue { <2 x float>, <2 x float> } %135, 0
  %137 = extractvalue { <2 x float>, <2 x float> } %135, 1
  store <2 x float> %136, ptr %129, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 240
  store <2 x float> %137, ptr %.sroa.4.0..sroa_idx, align 8
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %2, %116, %._crit_edge
  ret void
}

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

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

declare <2 x float> @vrSub(<2 x float>, <2 x float>) 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 #3

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

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

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

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

declare float @vrMin(float noundef, 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 #1

declare { <2 x float>, <2 x float> } @vrMat(<2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.sqrt.f32(float) #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 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 0}
!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 = !{!"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, !17, i64 48, !18, i64 56, !7, i64 88, !19, i64 96, !11, i64 108, !20, i64 116, !7, i64 136, !10, i64 144}
!17 = !{!"vrCollisionGroup", !10, i64 0, !10, i64 4}
!18 = !{!"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}
!19 = !{!"vrColor", !12, i64 0, !12, i64 4, !12, i64 8}
!20 = !{!"vrOrientedBoundingBox", !11, i64 0, !11, i64 8}
!21 = !{!6, !7, i64 8}
!22 = !{!6, !12, i64 212}
!23 = !{!16, !12, i64 60}
!24 = !{!6, !12, i64 216}
!25 = !{!6, !10, i64 192}
!26 = !{!27, !12, i64 60}
!27 = !{!"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, !28, i64 64}
!28 = !{!"vrLocalPoint", !12, i64 0, !11, i64 4, !7, i64 16}
!29 = !{!16, !12, i64 72}
!30 = !{!16, !12, i64 76}
!31 = !{!27, !12, i64 48}
!32 = !{!27, !12, i64 52}
!33 = !{!27, !12, i64 20}
!34 = !{!27, !12, i64 24}
!35 = !{!27, !12, i64 16}
!36 = !{!27, !12, i64 56}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!6, !12, i64 224}
!40 = !{!6, !12, i64 228}


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