; 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

; 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

; Function Attrs: 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>) #3

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

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

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

declare float @vrMin(float noundef, float noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @vrManifoldPostStep(ptr noundef %0, float noundef %1) #4 {
  %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 float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, 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) #5
  store float 0x3FC3333340000000, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store float 0x3FB99999A0000000, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !11
  br label %16

16:                                               ; preds = %170, %2
  %17 = load i32, ptr %7, align 4, !tbaa !11
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.vrManifold, ptr %18, i32 0, i32 3
  %20 = load i32, ptr %19, align 8, !tbaa !13
  %21 = icmp slt i32 %17, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %173

23:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.vrManifold, ptr %24, i32 0, i32 2
  %26 = load i32, ptr %7, align 4, !tbaa !11
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %25, i64 0, i64 %27
  %29 = getelementptr inbounds %struct.vrContactPoint, ptr %28, i32 0, i32 12
  %30 = call <2 x float> @vrGetLocalPoint(ptr noundef %29)
  store <2 x float> %30, ptr %8, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.vrManifold, ptr %31, i32 0, i32 1
  %33 = load ptr, ptr %32, align 8, !tbaa !18
  %34 = getelementptr inbounds %struct.vrRigidBody, ptr %33, i32 0, i32 12
  %35 = load <2 x float>, ptr %34, align 4
  %36 = load <2 x float>, ptr %8, align 4
  %37 = call <2 x float> @vrAdd(<2 x float> %35, <2 x float> %36)
  store <2 x float> %37, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.vrManifold, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  %41 = getelementptr inbounds %struct.vrRigidBody, ptr %40, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %41, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %42 = load <2 x float>, ptr %9, align 4
  %43 = load <2 x float>, ptr %10, align 4
  %44 = call <2 x float> @vrSub(<2 x float> %42, <2 x float> %43)
  store <2 x float> %44, ptr %11, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.vrManifold, ptr %45, i32 0, i32 4
  %47 = load <2 x float>, ptr %11, align 4
  %48 = load <2 x float>, ptr %46, align 4
  %49 = call float @vrCross(<2 x float> %47, <2 x float> %48)
  store float %49, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.vrManifold, ptr %50, i32 0, i32 4
  %52 = load <2 x float>, ptr %8, align 4
  %53 = load <2 x float>, ptr %51, align 4
  %54 = call float @vrCross(<2 x float> %52, <2 x float> %53)
  store float %54, ptr %13, align 4, !tbaa !9
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.vrManifold, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  %58 = getelementptr inbounds %struct.vrRigidBody, ptr %57, i32 0, i32 9
  %59 = getelementptr inbounds %struct.vrMaterial, ptr %58, i32 0, i32 4
  %60 = load float, ptr %59, align 8, !tbaa !21
  %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 !18
  %64 = getelementptr inbounds %struct.vrRigidBody, ptr %63, i32 0, i32 9
  %65 = getelementptr inbounds %struct.vrMaterial, ptr %64, i32 0, i32 4
  %66 = load float, ptr %65, align 8, !tbaa !21
  %67 = fadd float %60, %66
  %68 = load float, ptr %12, align 4, !tbaa !9
  %69 = load float, ptr %12, align 4, !tbaa !9
  %70 = fmul float %68, %69
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.vrManifold, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  %74 = getelementptr inbounds %struct.vrRigidBody, ptr %73, i32 0, i32 9
  %75 = getelementptr inbounds %struct.vrMaterial, ptr %74, i32 0, i32 5
  %76 = load float, ptr %75, align 4, !tbaa !27
  %77 = call float @llvm.fmuladd.f32(float %70, float %76, float %67)
  %78 = load float, ptr %13, align 4, !tbaa !9
  %79 = load float, ptr %13, align 4, !tbaa !9
  %80 = fmul float %78, %79
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.vrManifold, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !18
  %84 = getelementptr inbounds %struct.vrRigidBody, ptr %83, i32 0, i32 9
  %85 = getelementptr inbounds %struct.vrMaterial, ptr %84, i32 0, i32 5
  %86 = load float, ptr %85, align 4, !tbaa !27
  %87 = call float @llvm.fmuladd.f32(float %80, float %86, float %77)
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.vrManifold, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %7, align 4, !tbaa !11
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %89, i64 0, i64 %91
  %93 = getelementptr inbounds %struct.vrContactPoint, ptr %92, i32 0, i32 8
  store float %87, ptr %93, align 8, !tbaa !28
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.vrManifold, ptr %94, i32 0, i32 2
  %96 = load i32, ptr %7, align 4, !tbaa !11
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %95, i64 0, i64 %97
  %99 = getelementptr inbounds %struct.vrContactPoint, ptr %98, i32 0, i32 8
  %100 = load float, ptr %99, align 8, !tbaa !28
  %101 = fpext float %100 to double
  %102 = fdiv double 1.000000e+00, %101
  %103 = fptrunc double %102 to float
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.vrManifold, ptr %104, i32 0, i32 2
  %106 = load i32, ptr %7, align 4, !tbaa !11
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %105, i64 0, i64 %107
  %109 = getelementptr inbounds %struct.vrContactPoint, ptr %108, i32 0, i32 8
  store float %103, ptr %109, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.vrManifold, ptr %110, i32 0, i32 4
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.vrManifold, ptr %112, i32 0, i32 2
  %114 = load i32, ptr %7, align 4, !tbaa !11
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %113, i64 0, i64 %115
  %117 = getelementptr inbounds %struct.vrContactPoint, ptr %116, i32 0, i32 1
  %118 = load <2 x float>, ptr %111, align 4
  %119 = load <2 x float>, ptr %117, align 8
  %120 = call float @vrDot(<2 x float> %118, <2 x float> %119)
  store float %120, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.vrManifold, ptr %121, i32 0, i32 2
  %123 = load i32, ptr %7, align 4, !tbaa !11
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %122, i64 0, i64 %124
  %126 = getelementptr inbounds %struct.vrContactPoint, ptr %125, i32 0, i32 2
  %127 = load float, ptr %126, align 8, !tbaa !31
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.vrManifold, ptr %128, i32 0, i32 4
  %130 = load <2 x float>, ptr %129, align 4
  %131 = load <2 x float>, ptr %9, align 4
  %132 = call float @vrDot(<2 x float> %130, <2 x float> %131)
  %133 = fadd float %127, %132
  %134 = load float, ptr %14, align 4, !tbaa !9
  %135 = fsub float %133, %134
  %136 = call float @vrMin(float noundef 0.000000e+00, float noundef %135)
  store float %136, ptr %15, align 4, !tbaa !9
  %137 = load float, ptr %5, align 4, !tbaa !9
  %138 = fneg float %137
  %139 = load float, ptr %15, align 4, !tbaa !9
  %140 = load float, ptr %6, align 4, !tbaa !9
  %141 = fadd float %139, %140
  %142 = call float @vrMin(float noundef 0.000000e+00, float noundef %141)
  %143 = fmul float %138, %142
  %144 = load float, ptr %4, align 4, !tbaa !9
  %145 = fdiv float %143, %144
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.vrManifold, ptr %146, i32 0, i32 2
  %148 = load i32, ptr %7, align 4, !tbaa !11
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %147, i64 0, i64 %149
  %151 = getelementptr inbounds %struct.vrContactPoint, ptr %150, i32 0, i32 10
  store float %145, ptr %151, align 8, !tbaa !32
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.vrManifold, ptr %152, i32 0, i32 2
  %154 = load i32, ptr %7, align 4, !tbaa !11
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %153, i64 0, i64 %155
  %157 = getelementptr inbounds %struct.vrContactPoint, ptr %156, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %157, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !20
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.vrManifold, ptr %158, i32 0, i32 2
  %160 = load i32, ptr %7, align 4, !tbaa !11
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %159, i64 0, i64 %161
  %163 = getelementptr inbounds %struct.vrContactPoint, ptr %162, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %163, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !20
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.vrManifold, ptr %164, i32 0, i32 2
  %166 = load i32, ptr %7, align 4, !tbaa !11
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %165, i64 0, i64 %167
  %169 = getelementptr inbounds %struct.vrContactPoint, ptr %168, i32 0, i32 5
  store float 0.000000e+00, ptr %169, align 4, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %170

170:                                              ; preds = %23
  %171 = load i32, ptr %7, align 4, !tbaa !11
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %7, align 4, !tbaa !11
  br label %16, !llvm.loop !34

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

declare <2 x float> @vrGetLocalPoint(ptr noundef) #3

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


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

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

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

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

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

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

declare float @vrMin(float noundef, float noundef) local_unnamed_addr #1

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

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

._crit_edge:                                      ; preds = %9, %2
  ret void

9:                                                ; preds = %.lr.ph, %9
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %9 ]
  %10 = getelementptr inbounds [2 x %struct.vrContactPoint], ptr %6, i64 0, i64 %indvars.iv
  %11 = getelementptr inbounds i8, ptr %10, i64 64
  %12 = tail call <2 x float> @vrGetLocalPoint(ptr noundef nonnull %11) #3
  %13 = load ptr, ptr %7, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %13, i64 108
  %15 = load <2 x float>, ptr %14, align 4
  %16 = tail call <2 x float> @vrAdd(<2 x float> %15, <2 x float> %12) #3
  %17 = load ptr, ptr %0, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %17, i64 108
  %.sroa.06.0.copyload = load <2 x float>, ptr %18, align 4
  %19 = tail call <2 x float> @vrSub(<2 x float> %16, <2 x float> %.sroa.06.0.copyload) #3
  %20 = load <2 x float>, ptr %8, align 4
  %21 = tail call float @vrCross(<2 x float> %19, <2 x float> %20) #3
  %22 = load <2 x float>, ptr %8, align 4
  %23 = tail call float @vrCross(<2 x float> %12, <2 x float> %22) #3
  %24 = load ptr, ptr %0, align 8, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %24, i64 72
  %26 = load float, ptr %25, align 8, !tbaa !17
  %27 = load ptr, ptr %7, align 8, !tbaa !15
  %28 = getelementptr inbounds i8, ptr %27, i64 72
  %29 = load float, ptr %28, align 8, !tbaa !17
  %30 = fadd float %26, %29
  %31 = fmul float %21, %21
  %32 = getelementptr inbounds i8, ptr %24, i64 76
  %33 = load float, ptr %32, align 4, !tbaa !23
  %34 = tail call float @llvm.fmuladd.f32(float %31, float %33, float %30)
  %35 = fmul float %23, %23
  %36 = getelementptr inbounds i8, ptr %27, i64 76
  %37 = load float, ptr %36, align 4, !tbaa !23
  %38 = tail call float @llvm.fmuladd.f32(float %35, float %37, float %34)
  %39 = getelementptr inbounds i8, ptr %10, i64 48
  %40 = fdiv float 1.000000e+00, %38
  store float %40, ptr %39, align 8, !tbaa !24
  %41 = getelementptr inbounds i8, ptr %10, i64 8
  %42 = load <2 x float>, ptr %8, align 4
  %43 = load <2 x float>, ptr %41, align 8
  %44 = tail call float @vrDot(<2 x float> %42, <2 x float> %43) #3
  %45 = getelementptr inbounds i8, ptr %10, i64 16
  %46 = load float, ptr %45, align 8, !tbaa !27
  %47 = load <2 x float>, ptr %8, align 4
  %48 = tail call float @vrDot(<2 x float> %47, <2 x float> %16) #3
  %49 = fadd float %46, %48
  %50 = fsub float %49, %44
  %51 = tail call float @vrMin(float noundef 0.000000e+00, float noundef %50) #3
  %52 = fadd float %51, 0x3FB99999A0000000
  %53 = tail call float @vrMin(float noundef 0.000000e+00, float noundef %52) #3
  %54 = fmul float %53, 0xBFC3333340000000
  %55 = fdiv float %54, %1
  %56 = getelementptr inbounds i8, ptr %10, i64 56
  store float %55, ptr %56, align 8, !tbaa !28
  %57 = getelementptr inbounds i8, ptr %10, i64 32
  store <2 x float> %19, ptr %57, align 8
  %58 = getelementptr inbounds i8, ptr %10, i64 40
  store <2 x float> %12, ptr %58, align 8
  %59 = getelementptr inbounds i8, ptr %10, i64 28
  store float 0.000000e+00, ptr %59, align 4, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = load i32, ptr %3, align 8, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next, %61
  br i1 %62, label %9, label %._crit_edge, !llvm.loop !30
}

declare <2 x float> @vrGetLocalPoint(ptr noundef) local_unnamed_addr #1

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


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