; LLVM IR from ThePhysicsGuys/Physics3D :: Physics3D/geometry (builtinShapeClasses)

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

%"class.P3D::Matrix" = type { [9 x double] }
%"struct.P3D::BoundingBoxTemplate" = type { %"struct.P3D::Vector", %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::Matrix.7" = type { [9 x float] }
%"struct.P3D::Vector.0" = type { %union.anon.1 }
%union.anon.1 = type { [3 x float] }
%struct.anon.2 = type { float, float, float }

@_ZN3P3D12ShapeLibrary17cornerVertexCountE = external constant i32, align 4

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D19BoundingBoxTemplateIdEC2Edddddd(ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3P3D14DiagonalMatrixIdLm3EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3P3D11CornerClass9getBoundsERKNS_22MatrixRotationTemplateIdEERKNS_14DiagonalMatrixIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::BoundingBoxTemplate") align 8 %0, ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef nonnull align 8 dereferenceable(72) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) unnamed_addr #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.P3D::Matrix.7", align 4
  %10 = alloca %"class.P3D::Matrix", align 8
  %11 = alloca [3 x %"struct.P3D::Vector.0"], align 16
  %12 = alloca i32, align 4
  %13 = alloca %"struct.P3D::Vector.0", align 4
  %14 = alloca %"struct.P3D::Vector", align 8
  %15 = alloca %"struct.P3D::Vector.0", align 4
  %16 = alloca { <2 x float>, float }, align 8
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca [4 x %"struct.P3D::Vector.0"], align 16
  %19 = alloca %"struct.P3D::Vector.0", align 4
  %20 = alloca %"struct.P3D::Vector.0", align 4
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca { <2 x float>, float }, align 8
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca %"struct.P3D::Vector.0", align 4
  %25 = alloca %"struct.P3D::Vector.0", align 4
  %26 = alloca { <2 x float>, float }, align 8
  %27 = alloca { <2 x float>, float }, align 8
  %28 = alloca { <2 x float>, float }, align 8
  %29 = alloca %"struct.P3D::Vector.0", align 4
  %30 = alloca %"struct.P3D::Vector.0", align 4
  %31 = alloca { <2 x float>, float }, align 8
  %32 = alloca { <2 x float>, float }, align 8
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca %"struct.P3D::Vector.0", align 4
  %35 = alloca { <2 x float>, float }, align 8
  %36 = alloca { <2 x float>, float }, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  %42 = alloca double, align 8
  %43 = alloca i32, align 4
  %44 = alloca ptr, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  store ptr %3, ptr %7, align 8, !tbaa !5
  %45 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 36, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr %10) #7
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind writable sret(%"class.P3D::Matrix") align 8 %10, ptr noundef nonnull align 8 dereferenceable(72) %46)
  call void @_ZN3P3D6MatrixIfLm3ELm3EEC2IdEERKNS0_IT_Lm3ELm3EEE(ptr noundef nonnull align 4 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(72) %10)
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #7
  store ptr %9, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %11) #7
  %47 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %11, i64 3
  br label %48

48:                                               ; preds = %48, %4
  %49 = phi ptr [ %11, %4 ], [ %50, %48 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %49) #7
  %50 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %49, i64 1
  %51 = icmp eq ptr %50, %47
  br i1 %51, label %52, label %48

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %74, %52
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = icmp slt i32 %54, 3
  br i1 %55, label %57, label %56

56:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %77

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3P3D14DiagonalMatrixIdLm3EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60)
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #7
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = call { <2 x float>, float } @_ZNK3P3D6MatrixIfLm3ELm3EE6getColEm(ptr noundef nonnull align 4 dereferenceable(36) %62, i64 noundef %64)
  %66 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %15, i32 0, i32 0
  %67 = getelementptr inbounds %union.anon.1, ptr %66, i32 0, i32 0
  store { <2 x float>, float } %65, ptr %16, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 8 %16, i64 12, i1 false)
  call void @_ZN3P3DmlIdfLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 4 dereferenceable(12) %15) #7
  %68 = call { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %69 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %13, i32 0, i32 0
  %70 = getelementptr inbounds %union.anon.1, ptr %69, i32 0, i32 0
  store { <2 x float>, float } %68, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %70, ptr align 8 %17, i64 12, i1 false)
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 %72
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %13, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  br label %74

74:                                               ; preds = %57
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %12, align 4, !tbaa !9
  br label %53, !llvm.loop !13

77:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #7
  %78 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 0
  %79 = call { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %78) #7
  %80 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %20, i32 0, i32 0
  %81 = getelementptr inbounds %union.anon.1, ptr %80, i32 0, i32 0
  store { <2 x float>, float } %79, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %81, ptr align 8 %21, i64 12, i1 false)
  %82 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 1
  %83 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %82) #7
  %84 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %19, i32 0, i32 0
  %85 = getelementptr inbounds %union.anon.1, ptr %84, i32 0, i32 0
  store { <2 x float>, float } %83, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %85, ptr align 8 %22, i64 12, i1 false)
  %86 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 2
  %87 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %86) #7
  %88 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %18, i32 0, i32 0
  %89 = getelementptr inbounds %union.anon.1, ptr %88, i32 0, i32 0
  store { <2 x float>, float } %87, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 8 %23, i64 12, i1 false)
  %90 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %18, i64 1
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #7
  %91 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 0
  %92 = call { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %91) #7
  %93 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %25, i32 0, i32 0
  %94 = getelementptr inbounds %union.anon.1, ptr %93, i32 0, i32 0
  store { <2 x float>, float } %92, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %94, ptr align 8 %26, i64 12, i1 false)
  %95 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 1
  %96 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %95) #7
  %97 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %24, i32 0, i32 0
  %98 = getelementptr inbounds %union.anon.1, ptr %97, i32 0, i32 0
  store { <2 x float>, float } %96, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %98, ptr align 8 %27, i64 12, i1 false)
  %99 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 2
  %100 = call { <2 x float>, float } @_ZN3P3DplIffLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %99) #7
  %101 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %90, i32 0, i32 0
  %102 = getelementptr inbounds %union.anon.1, ptr %101, i32 0, i32 0
  store { <2 x float>, float } %100, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %102, ptr align 8 %28, i64 12, i1 false)
  %103 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %18, i64 2
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #7
  %104 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 0
  %105 = call { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %104) #7
  %106 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %30, i32 0, i32 0
  %107 = getelementptr inbounds %union.anon.1, ptr %106, i32 0, i32 0
  store { <2 x float>, float } %105, ptr %31, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 8 %31, i64 12, i1 false)
  %108 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 1
  %109 = call { <2 x float>, float } @_ZN3P3DplIffLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %108) #7
  %110 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %29, i32 0, i32 0
  %111 = getelementptr inbounds %union.anon.1, ptr %110, i32 0, i32 0
  store { <2 x float>, float } %109, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %111, ptr align 8 %32, i64 12, i1 false)
  %112 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 2
  %113 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %112) #7
  %114 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %103, i32 0, i32 0
  %115 = getelementptr inbounds %union.anon.1, ptr %114, i32 0, i32 0
  store { <2 x float>, float } %113, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %115, ptr align 8 %33, i64 12, i1 false)
  %116 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %18, i64 3
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #7
  %117 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 0
  %118 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 1
  %119 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %117, ptr noundef nonnull align 4 dereferenceable(12) %118) #7
  %120 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %34, i32 0, i32 0
  %121 = getelementptr inbounds %union.anon.1, ptr %120, i32 0, i32 0
  store { <2 x float>, float } %119, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %121, ptr align 8 %35, i64 12, i1 false)
  %122 = getelementptr inbounds [3 x %"struct.P3D::Vector.0"], ptr %11, i64 0, i64 2
  %123 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %122) #7
  %124 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %116, i32 0, i32 0
  %125 = getelementptr inbounds %union.anon.1, ptr %124, i32 0, i32 0
  store { <2 x float>, float } %123, ptr %36, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %125, ptr align 8 %36, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %126 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %18, i64 0, i64 0
  %127 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %126, i32 0, i32 0
  %128 = getelementptr inbounds %struct.anon.2, ptr %127, i32 0, i32 0
  %129 = load float, ptr %128, align 16, !tbaa !12
  %130 = fpext float %129 to double
  store double %130, ptr %37, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %131 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %18, i64 0, i64 0
  %132 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %131, i32 0, i32 0
  %133 = getelementptr inbounds %struct.anon.2, ptr %132, i32 0, i32 0
  %134 = load float, ptr %133, align 16, !tbaa !12
  %135 = fpext float %134 to double
  store double %135, ptr %38, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %136 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %18, i64 0, i64 0
  %137 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds %struct.anon.2, ptr %137, i32 0, i32 1
  %139 = load float, ptr %138, align 4, !tbaa !12
  %140 = fpext float %139 to double
  store double %140, ptr %39, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %141 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %18, i64 0, i64 0
  %142 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %141, i32 0, i32 0
  %143 = getelementptr inbounds %struct.anon.2, ptr %142, i32 0, i32 1
  %144 = load float, ptr %143, align 4, !tbaa !12
  %145 = fpext float %144 to double
  store double %145, ptr %40, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %146 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %18, i64 0, i64 0
  %147 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %struct.anon.2, ptr %147, i32 0, i32 2
  %149 = load float, ptr %148, align 8, !tbaa !12
  %150 = fpext float %149 to double
  store double %150, ptr %41, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %151 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %18, i64 0, i64 0
  %152 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %151, i32 0, i32 0
  %153 = getelementptr inbounds %struct.anon.2, ptr %152, i32 0, i32 2
  %154 = load float, ptr %153, align 8, !tbaa !12
  %155 = fpext float %154 to double
  store double %155, ptr %42, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  store i32 1, ptr %43, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %249, %77
  %157 = load i32, ptr %43, align 4, !tbaa !9
  %158 = load i32, ptr @_ZN3P3D12ShapeLibrary17cornerVertexCountE, align 4, !tbaa !9
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %161, label %160

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

161:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %162 = load i32, ptr %43, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %18, i64 0, i64 %163
  store ptr %164, ptr %44, align 8, !tbaa !5
  %165 = load ptr, ptr %44, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds %struct.anon.2, ptr %166, i32 0, i32 0
  %168 = load float, ptr %167, align 4, !tbaa !12
  %169 = fpext float %168 to double
  %170 = load double, ptr %37, align 8, !tbaa !15
  %171 = fcmp olt double %169, %170
  br i1 %171, label %172, label %178

172:                                              ; preds = %161
  %173 = load ptr, ptr %44, align 8, !tbaa !5
  %174 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %173, i32 0, i32 0
  %175 = getelementptr inbounds %struct.anon.2, ptr %174, i32 0, i32 0
  %176 = load float, ptr %175, align 4, !tbaa !12
  %177 = fpext float %176 to double
  store double %177, ptr %37, align 8, !tbaa !15
  br label %178

178:                                              ; preds = %172, %161
  %179 = load ptr, ptr %44, align 8, !tbaa !5
  %180 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %179, i32 0, i32 0
  %181 = getelementptr inbounds %struct.anon.2, ptr %180, i32 0, i32 0
  %182 = load float, ptr %181, align 4, !tbaa !12
  %183 = fpext float %182 to double
  %184 = load double, ptr %38, align 8, !tbaa !15
  %185 = fcmp ogt double %183, %184
  br i1 %185, label %186, label %192

186:                                              ; preds = %178
  %187 = load ptr, ptr %44, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %187, i32 0, i32 0
  %189 = getelementptr inbounds %struct.anon.2, ptr %188, i32 0, i32 0
  %190 = load float, ptr %189, align 4, !tbaa !12
  %191 = fpext float %190 to double
  store double %191, ptr %38, align 8, !tbaa !15
  br label %192

192:                                              ; preds = %186, %178
  %193 = load ptr, ptr %44, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %193, i32 0, i32 0
  %195 = getelementptr inbounds %struct.anon.2, ptr %194, i32 0, i32 1
  %196 = load float, ptr %195, align 4, !tbaa !12
  %197 = fpext float %196 to double
  %198 = load double, ptr %39, align 8, !tbaa !15
  %199 = fcmp olt double %197, %198
  br i1 %199, label %200, label %206

200:                                              ; preds = %192
  %201 = load ptr, ptr %44, align 8, !tbaa !5
  %202 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds %struct.anon.2, ptr %202, i32 0, i32 1
  %204 = load float, ptr %203, align 4, !tbaa !12
  %205 = fpext float %204 to double
  store double %205, ptr %39, align 8, !tbaa !15
  br label %206

206:                                              ; preds = %200, %192
  %207 = load ptr, ptr %44, align 8, !tbaa !5
  %208 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %207, i32 0, i32 0
  %209 = getelementptr inbounds %struct.anon.2, ptr %208, i32 0, i32 1
  %210 = load float, ptr %209, align 4, !tbaa !12
  %211 = fpext float %210 to double
  %212 = load double, ptr %40, align 8, !tbaa !15
  %213 = fcmp ogt double %211, %212
  br i1 %213, label %214, label %220

214:                                              ; preds = %206
  %215 = load ptr, ptr %44, align 8, !tbaa !5
  %216 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %215, i32 0, i32 0
  %217 = getelementptr inbounds %struct.anon.2, ptr %216, i32 0, i32 1
  %218 = load float, ptr %217, align 4, !tbaa !12
  %219 = fpext float %218 to double
  store double %219, ptr %40, align 8, !tbaa !15
  br label %220

220:                                              ; preds = %214, %206
  %221 = load ptr, ptr %44, align 8, !tbaa !5
  %222 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %221, i32 0, i32 0
  %223 = getelementptr inbounds %struct.anon.2, ptr %222, i32 0, i32 2
  %224 = load float, ptr %223, align 4, !tbaa !12
  %225 = fpext float %224 to double
  %226 = load double, ptr %41, align 8, !tbaa !15
  %227 = fcmp olt double %225, %226
  br i1 %227, label %228, label %234

228:                                              ; preds = %220
  %229 = load ptr, ptr %44, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %229, i32 0, i32 0
  %231 = getelementptr inbounds %struct.anon.2, ptr %230, i32 0, i32 2
  %232 = load float, ptr %231, align 4, !tbaa !12
  %233 = fpext float %232 to double
  store double %233, ptr %41, align 8, !tbaa !15
  br label %234

234:                                              ; preds = %228, %220
  %235 = load ptr, ptr %44, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %235, i32 0, i32 0
  %237 = getelementptr inbounds %struct.anon.2, ptr %236, i32 0, i32 2
  %238 = load float, ptr %237, align 4, !tbaa !12
  %239 = fpext float %238 to double
  %240 = load double, ptr %42, align 8, !tbaa !15
  %241 = fcmp ogt double %239, %240
  br i1 %241, label %242, label %248

242:                                              ; preds = %234
  %243 = load ptr, ptr %44, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.P3D::Vector.0", ptr %243, i32 0, i32 0
  %245 = getelementptr inbounds %struct.anon.2, ptr %244, i32 0, i32 2
  %246 = load float, ptr %245, align 4, !tbaa !12
  %247 = fpext float %246 to double
  store double %247, ptr %42, align 8, !tbaa !15
  br label %248

248:                                              ; preds = %242, %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %43, align 4, !tbaa !9
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %43, align 4, !tbaa !9
  br label %156, !llvm.loop !17

252:                                              ; preds = %160
  %253 = load double, ptr %37, align 8, !tbaa !15
  %254 = load double, ptr %39, align 8, !tbaa !15
  %255 = load double, ptr %41, align 8, !tbaa !15
  %256 = load double, ptr %38, align 8, !tbaa !15
  %257 = load double, ptr %40, align 8, !tbaa !15
  %258 = load double, ptr %42, align 8, !tbaa !15
  call void @_ZN3P3D19BoundingBoxTemplateIdEC2Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %0, double noundef %253, double noundef %254, double noundef %255, double noundef %256, double noundef %257, double noundef %258)
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D6MatrixIfLm3ELm3EEC2IdEERKNS0_IT_Lm3ELm3EEE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmlIdfLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3P3D6MatrixIfLm3ELm3EE6getColEm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN3P3DplIffLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 12, !12}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !14}


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

%"class.P3D::Matrix" = type { [9 x double] }
%"struct.P3D::BoundingBoxTemplate" = type { %"struct.P3D::Vector", %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.P3D::Matrix.7" = type { [9 x float] }
%"struct.P3D::Vector.0" = type { %union.anon.1 }
%union.anon.1 = type { [3 x float] }

@_ZN3P3D12ShapeLibrary17cornerVertexCountE = external local_unnamed_addr constant i32, align 4

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind noalias writable sret(%"class.P3D::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D19BoundingBoxTemplateIdEC2Edddddd(ptr noundef nonnull align 8 dereferenceable(48), double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3P3D14DiagonalMatrixIdLm3EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3P3D11CornerClass9getBoundsERKNS_22MatrixRotationTemplateIdEERKNS_14DiagonalMatrixIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::BoundingBoxTemplate") align 8 %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(104) %1, ptr noundef nonnull align 8 dereferenceable(72) %2, ptr noundef nonnull align 8 dereferenceable(24) %3) unnamed_addr #3 align 2 {
.preheader:
  %4 = alloca %"class.P3D::Matrix.7", align 4
  %5 = alloca %"class.P3D::Matrix", align 8
  %6 = alloca [3 x %"struct.P3D::Vector.0"], align 16
  %7 = alloca %"struct.P3D::Vector", align 8
  %8 = alloca %"struct.P3D::Vector.0", align 8
  %9 = alloca [4 x %"struct.P3D::Vector.0"], align 16
  %10 = alloca %"struct.P3D::Vector.0", align 8
  %11 = alloca %"struct.P3D::Vector.0", align 8
  %12 = alloca %"struct.P3D::Vector.0", align 8
  %13 = alloca %"struct.P3D::Vector.0", align 8
  %14 = alloca %"struct.P3D::Vector.0", align 8
  %15 = alloca %"struct.P3D::Vector.0", align 8
  %16 = alloca %"struct.P3D::Vector.0", align 8
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #6
  call void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Matrix") align 8 %5, ptr noundef nonnull align 8 dereferenceable(72) %2)
  call void @_ZN3P3D6MatrixIfLm3ELm3EEC2IdEERKNS0_IT_Lm3ELm3EEE(ptr noundef nonnull align 4 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(72) %5)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %6) #6
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #6
  %.ptr.1 = getelementptr inbounds i8, ptr %6, i64 12
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1) #6
  %.ptr.2 = getelementptr inbounds i8, ptr %6, i64 24
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2) #6
  %.sroa.273.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3P3D14DiagonalMatrixIdLm3EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  %18 = call { <2 x float>, float } @_ZNK3P3D6MatrixIfLm3ELm3EE6getColEm(ptr noundef nonnull align 4 dereferenceable(36) %4, i64 noundef 0)
  %.fca.0.extract70 = extractvalue { <2 x float>, float } %18, 0
  %.fca.1.extract71 = extractvalue { <2 x float>, float } %18, 1
  store <2 x float> %.fca.0.extract70, ptr %8, align 8
  store float %.fca.1.extract71, ptr %.sroa.273.0..sroa_idx, align 8
  call void @_ZN3P3DmlIdfLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(12) %8) #6
  %19 = call { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %.fca.0.extract66 = extractvalue { <2 x float>, float } %19, 0
  %.fca.1.extract67 = extractvalue { <2 x float>, float } %19, 1
  store <2 x float> %.fca.0.extract66, ptr %6, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store float %.fca.1.extract67, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3P3D14DiagonalMatrixIdLm3EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  %21 = call { <2 x float>, float } @_ZNK3P3D6MatrixIfLm3ELm3EE6getColEm(ptr noundef nonnull align 4 dereferenceable(36) %4, i64 noundef 1)
  %.fca.0.extract70.1 = extractvalue { <2 x float>, float } %21, 0
  %.fca.1.extract71.1 = extractvalue { <2 x float>, float } %21, 1
  store <2 x float> %.fca.0.extract70.1, ptr %8, align 8
  store float %.fca.1.extract71.1, ptr %.sroa.273.0..sroa_idx, align 8
  call void @_ZN3P3DmlIdfLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(12) %8) #6
  %22 = call { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %.fca.0.extract66.1 = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract67.1 = extractvalue { <2 x float>, float } %22, 1
  store <2 x float> %.fca.0.extract66.1, ptr %.ptr.1, align 4
  %.sroa.4.0..sroa_idx.1 = getelementptr inbounds i8, ptr %6, i64 20
  store float %.fca.1.extract67.1, ptr %.sroa.4.0..sroa_idx.1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3P3D14DiagonalMatrixIdLm3EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 2)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #6
  %24 = call { <2 x float>, float } @_ZNK3P3D6MatrixIfLm3ELm3EE6getColEm(ptr noundef nonnull align 4 dereferenceable(36) %4, i64 noundef 2)
  %.fca.0.extract70.2 = extractvalue { <2 x float>, float } %24, 0
  %.fca.1.extract71.2 = extractvalue { <2 x float>, float } %24, 1
  store <2 x float> %.fca.0.extract70.2, ptr %8, align 8
  store float %.fca.1.extract71.2, ptr %.sroa.273.0..sroa_idx, align 8
  call void @_ZN3P3DmlIdfLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(12) %8) #6
  %25 = call { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %.fca.0.extract66.2 = extractvalue { <2 x float>, float } %25, 0
  %.fca.1.extract67.2 = extractvalue { <2 x float>, float } %25, 1
  store <2 x float> %.fca.0.extract66.2, ptr %.ptr.2, align 8
  %.sroa.4.0..sroa_idx.2 = getelementptr inbounds i8, ptr %6, i64 32
  store float %.fca.1.extract67.2, ptr %.sroa.4.0..sroa_idx.2, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #6
  %26 = call { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %6) #6
  %.fca.0.extract62 = extractvalue { <2 x float>, float } %26, 0
  %.fca.1.extract63 = extractvalue { <2 x float>, float } %26, 1
  store <2 x float> %.fca.0.extract62, ptr %11, align 8
  %.sroa.265.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store float %.fca.1.extract63, ptr %.sroa.265.0..sroa_idx, align 8
  %27 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1) #6
  %.fca.0.extract58 = extractvalue { <2 x float>, float } %27, 0
  %.fca.1.extract59 = extractvalue { <2 x float>, float } %27, 1
  store <2 x float> %.fca.0.extract58, ptr %10, align 8
  %.sroa.261.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store float %.fca.1.extract59, ptr %.sroa.261.0..sroa_idx, align 8
  %28 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2) #6
  %.fca.0.extract54 = extractvalue { <2 x float>, float } %28, 0
  %.fca.1.extract55 = extractvalue { <2 x float>, float } %28, 1
  %29 = getelementptr inbounds i8, ptr %9, i64 12
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #6
  %30 = call { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %6) #6
  %.fca.0.extract50 = extractvalue { <2 x float>, float } %30, 0
  %.fca.1.extract51 = extractvalue { <2 x float>, float } %30, 1
  store <2 x float> %.fca.0.extract50, ptr %13, align 8
  %.sroa.253.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  store float %.fca.1.extract51, ptr %.sroa.253.0..sroa_idx, align 8
  %31 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1) #6
  %.fca.0.extract46 = extractvalue { <2 x float>, float } %31, 0
  %.fca.1.extract47 = extractvalue { <2 x float>, float } %31, 1
  store <2 x float> %.fca.0.extract46, ptr %12, align 8
  %.sroa.249.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  store float %.fca.1.extract47, ptr %.sroa.249.0..sroa_idx, align 8
  %32 = call { <2 x float>, float } @_ZN3P3DplIffLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2) #6
  %.fca.0.extract42 = extractvalue { <2 x float>, float } %32, 0
  %.fca.1.extract43 = extractvalue { <2 x float>, float } %32, 1
  store <2 x float> %.fca.0.extract42, ptr %29, align 4
  %.sroa.245.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 20
  store float %.fca.1.extract43, ptr %.sroa.245.0..sroa_idx, align 4
  %33 = getelementptr inbounds i8, ptr %9, i64 24
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #6
  %34 = call { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %6) #6
  %.fca.0.extract38 = extractvalue { <2 x float>, float } %34, 0
  %.fca.1.extract39 = extractvalue { <2 x float>, float } %34, 1
  store <2 x float> %.fca.0.extract38, ptr %15, align 8
  %.sroa.241.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  store float %.fca.1.extract39, ptr %.sroa.241.0..sroa_idx, align 8
  %35 = call { <2 x float>, float } @_ZN3P3DplIffLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1) #6
  %.fca.0.extract34 = extractvalue { <2 x float>, float } %35, 0
  %.fca.1.extract35 = extractvalue { <2 x float>, float } %35, 1
  store <2 x float> %.fca.0.extract34, ptr %14, align 8
  %.sroa.237.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  store float %.fca.1.extract35, ptr %.sroa.237.0..sroa_idx, align 8
  %36 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2) #6
  %.fca.0.extract30 = extractvalue { <2 x float>, float } %36, 0
  %.fca.1.extract31 = extractvalue { <2 x float>, float } %36, 1
  store <2 x float> %.fca.0.extract30, ptr %33, align 8
  %.sroa.233.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 32
  store float %.fca.1.extract31, ptr %.sroa.233.0..sroa_idx, align 16
  %37 = getelementptr inbounds i8, ptr %9, i64 36
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #6
  %38 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.1) #6
  %.fca.0.extract26 = extractvalue { <2 x float>, float } %38, 0
  %.fca.1.extract27 = extractvalue { <2 x float>, float } %38, 1
  store <2 x float> %.fca.0.extract26, ptr %16, align 8
  %.sroa.229.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  store float %.fca.1.extract27, ptr %.sroa.229.0..sroa_idx, align 8
  %39 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %.ptr.2) #6
  %.fca.0.extract = extractvalue { <2 x float>, float } %39, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %39, 1
  store <2 x float> %.fca.0.extract, ptr %37, align 4
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 44
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  %40 = fpext <2 x float> %.fca.0.extract54 to <2 x double>
  %41 = fpext float %.fca.1.extract55 to double
  %42 = load i32, ptr @_ZN3P3D12ShapeLibrary17cornerVertexCountE, align 4, !tbaa !8
  %43 = icmp sgt i32 %42, 1
  %44 = extractelement <2 x double> %40, i64 0
  %45 = extractelement <2 x double> %40, i64 1
  br i1 %43, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %42 to i64
  br label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %46 = extractelement <2 x double> %57, i64 1
  %47 = extractelement <2 x double> %57, i64 0
  %48 = extractelement <2 x double> %58, i64 1
  %49 = extractelement <2 x double> %58, i64 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.094.lcssa = phi double [ %44, %.preheader ], [ %47, %._crit_edge.loopexit ]
  %.092.lcssa = phi double [ %44, %.preheader ], [ %49, %._crit_edge.loopexit ]
  %.090.lcssa = phi double [ %45, %.preheader ], [ %46, %._crit_edge.loopexit ]
  %.088.lcssa = phi double [ %45, %.preheader ], [ %48, %._crit_edge.loopexit ]
  %.086.lcssa = phi double [ %41, %.preheader ], [ %.187, %._crit_edge.loopexit ]
  %.085.lcssa = phi double [ %41, %.preheader ], [ %.1, %._crit_edge.loopexit ]
  call void @_ZN3P3D19BoundingBoxTemplateIdEC2Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %0, double noundef %.094.lcssa, double noundef %.090.lcssa, double noundef %.086.lcssa, double noundef %.092.lcssa, double noundef %.088.lcssa, double noundef %.085.lcssa)
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %4) #6
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.085109 = phi double [ %41, %.lr.ph.preheader ], [ %.1, %.lr.ph ]
  %.086108 = phi double [ %41, %.lr.ph.preheader ], [ %.187, %.lr.ph ]
  %50 = phi <2 x double> [ %40, %.lr.ph.preheader ], [ %58, %.lr.ph ]
  %51 = phi <2 x double> [ %40, %.lr.ph.preheader ], [ %57, %.lr.ph ]
  %52 = getelementptr inbounds [4 x %"struct.P3D::Vector.0"], ptr %9, i64 0, i64 %indvars.iv
  %53 = load <2 x float>, ptr %52, align 4, !tbaa !5
  %54 = fpext <2 x float> %53 to <2 x double>
  %55 = fcmp olt <2 x double> %50, %54
  %56 = fcmp ogt <2 x double> %51, %54
  %57 = select <2 x i1> %56, <2 x double> %54, <2 x double> %51
  %58 = select <2 x i1> %55, <2 x double> %54, <2 x double> %50
  %59 = getelementptr inbounds i8, ptr %52, i64 8
  %60 = load float, ptr %59, align 4, !tbaa !5
  %61 = fpext float %60 to double
  %62 = fcmp ogt double %.086108, %61
  %.187 = select i1 %62, double %61, double %.086108
  %63 = fcmp olt double %.085109, %61
  %.1 = select i1 %63, double %61, double %.085109
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !10
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D6MatrixIfLm3ELm3EEC2IdEERKNS0_IT_Lm3ELm3EEE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmlIdfLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK3P3D6MatrixIfLm3ELm3EE6getColEm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN3P3DngIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZN3P3DplIffLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass