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

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

@_ZN3P3D12ShapeLibrary16wedgeVertexCountE = 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: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmlIddLm3EEENS_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 8 dereferenceable(24)) #1

; 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 @_ZNK3P3D10WedgeClass9getBoundsERKNS_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", align 8
  %10 = alloca [3 x %"struct.P3D::Vector"], align 16
  %11 = alloca i32, align 4
  %12 = alloca %"struct.P3D::Vector", align 8
  %13 = alloca %"struct.P3D::Vector", align 8
  %14 = alloca [6 x %"struct.P3D::Vector"], align 16
  %15 = alloca %"struct.P3D::Vector", align 8
  %16 = alloca %"struct.P3D::Vector", align 8
  %17 = alloca %"struct.P3D::Vector", align 8
  %18 = alloca %"struct.P3D::Vector", align 8
  %19 = alloca %"struct.P3D::Vector", align 8
  %20 = alloca %"struct.P3D::Vector", align 8
  %21 = alloca %"struct.P3D::Vector", align 8
  %22 = alloca %"struct.P3D::Vector", align 8
  %23 = alloca %"struct.P3D::Vector", align 8
  %24 = alloca %"struct.P3D::Vector", align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca i32, align 4
  %32 = 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
  %33 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %9) #5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind writable sret(%"class.P3D::Matrix") align 8 %9, ptr noundef nonnull align 8 dereferenceable(72) %34)
  store ptr %9, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %10) #5
  %35 = getelementptr inbounds %"struct.P3D::Vector", ptr %10, i64 3
  br label %36

36:                                               ; preds = %36, %4
  %37 = phi ptr [ %10, %4 ], [ %38, %36 ]
  call void @_ZN3P3D6VectorIdLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #5
  %38 = getelementptr inbounds %"struct.P3D::Vector", ptr %37, i64 1
  %39 = icmp eq ptr %38, %35
  br i1 %39, label %40, label %36

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %56, %40
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = icmp slt i32 %42, 3
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3P3D14DiagonalMatrixIdLm3EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %48)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  call void @_ZNK3P3D6MatrixIdLm3ELm3EE6getColEm(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(72) %50, i64 noundef %52)
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 %54
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %55, ptr align 8 %12, i64 24, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  br label %56

56:                                               ; preds = %45
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !13

59:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 144, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %60 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 0
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %60) #5
  %61 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 1
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %61) #5
  %62 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 2
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %62) #5
  %63 = getelementptr inbounds %"struct.P3D::Vector", ptr %14, i64 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  %64 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 0
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %64) #5
  %65 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 1
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %65) #5
  %66 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %63, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %66) #5
  %67 = getelementptr inbounds %"struct.P3D::Vector", ptr %14, i64 2
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #5
  %68 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 0
  %69 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 1
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(24) %69) #5
  %70 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %67, ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %70) #5
  %71 = getelementptr inbounds %"struct.P3D::Vector", ptr %14, i64 3
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %72 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 0
  %73 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 1
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(24) %73) #5
  %74 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 2
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %71, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %74) #5
  %75 = getelementptr inbounds %"struct.P3D::Vector", ptr %14, i64 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #5
  %76 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 0
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %76) #5
  %77 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 1
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %77) #5
  %78 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 2
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %75, ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %78) #5
  %79 = getelementptr inbounds %"struct.P3D::Vector", ptr %14, i64 5
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #5
  %80 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 0
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %24, ptr noundef nonnull align 8 dereferenceable(24) %80) #5
  %81 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 1
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %81) #5
  %82 = getelementptr inbounds [3 x %"struct.P3D::Vector"], ptr %10, i64 0, i64 2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %79, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %82) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %83 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %14, i64 0, i64 0
  %84 = getelementptr inbounds %"struct.P3D::Vector", ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %struct.anon, ptr %84, i32 0, i32 0
  %86 = load double, ptr %85, align 16, !tbaa !12
  store double %86, ptr %25, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %87 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %14, i64 0, i64 0
  %88 = getelementptr inbounds %"struct.P3D::Vector", ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds %struct.anon, ptr %88, i32 0, i32 0
  %90 = load double, ptr %89, align 16, !tbaa !12
  store double %90, ptr %26, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %91 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %14, i64 0, i64 0
  %92 = getelementptr inbounds %"struct.P3D::Vector", ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds %struct.anon, ptr %92, i32 0, i32 1
  %94 = load double, ptr %93, align 8, !tbaa !12
  store double %94, ptr %27, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %95 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %14, i64 0, i64 0
  %96 = getelementptr inbounds %"struct.P3D::Vector", ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds %struct.anon, ptr %96, i32 0, i32 1
  %98 = load double, ptr %97, align 8, !tbaa !12
  store double %98, ptr %28, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %99 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %14, i64 0, i64 0
  %100 = getelementptr inbounds %"struct.P3D::Vector", ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds %struct.anon, ptr %100, i32 0, i32 2
  %102 = load double, ptr %101, align 16, !tbaa !12
  store double %102, ptr %29, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %103 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %14, i64 0, i64 0
  %104 = getelementptr inbounds %"struct.P3D::Vector", ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct.anon, ptr %104, i32 0, i32 2
  %106 = load double, ptr %105, align 16, !tbaa !12
  store double %106, ptr %30, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 1, ptr %31, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %188, %59
  %108 = load i32, ptr %31, align 4, !tbaa !9
  %109 = load i32, ptr @_ZN3P3D12ShapeLibrary16wedgeVertexCountE, align 4, !tbaa !9
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %191

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %113 = load i32, ptr %31, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %14, i64 0, i64 %114
  store ptr %115, ptr %32, align 8, !tbaa !5
  %116 = load ptr, ptr %32, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.P3D::Vector", ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds %struct.anon, ptr %117, i32 0, i32 0
  %119 = load double, ptr %118, align 8, !tbaa !12
  %120 = load double, ptr %25, align 8, !tbaa !15
  %121 = fcmp olt double %119, %120
  br i1 %121, label %122, label %127

122:                                              ; preds = %112
  %123 = load ptr, ptr %32, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.P3D::Vector", ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.anon, ptr %124, i32 0, i32 0
  %126 = load double, ptr %125, align 8, !tbaa !12
  store double %126, ptr %25, align 8, !tbaa !15
  br label %127

127:                                              ; preds = %122, %112
  %128 = load ptr, ptr %32, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.P3D::Vector", ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds %struct.anon, ptr %129, i32 0, i32 0
  %131 = load double, ptr %130, align 8, !tbaa !12
  %132 = load double, ptr %26, align 8, !tbaa !15
  %133 = fcmp ogt double %131, %132
  br i1 %133, label %134, label %139

134:                                              ; preds = %127
  %135 = load ptr, ptr %32, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.P3D::Vector", ptr %135, i32 0, i32 0
  %137 = getelementptr inbounds %struct.anon, ptr %136, i32 0, i32 0
  %138 = load double, ptr %137, align 8, !tbaa !12
  store double %138, ptr %26, align 8, !tbaa !15
  br label %139

139:                                              ; preds = %134, %127
  %140 = load ptr, ptr %32, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.P3D::Vector", ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds %struct.anon, ptr %141, i32 0, i32 1
  %143 = load double, ptr %142, align 8, !tbaa !12
  %144 = load double, ptr %27, align 8, !tbaa !15
  %145 = fcmp olt double %143, %144
  br i1 %145, label %146, label %151

146:                                              ; preds = %139
  %147 = load ptr, ptr %32, align 8, !tbaa !5
  %148 = getelementptr inbounds %"struct.P3D::Vector", ptr %147, i32 0, i32 0
  %149 = getelementptr inbounds %struct.anon, ptr %148, i32 0, i32 1
  %150 = load double, ptr %149, align 8, !tbaa !12
  store double %150, ptr %27, align 8, !tbaa !15
  br label %151

151:                                              ; preds = %146, %139
  %152 = load ptr, ptr %32, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.P3D::Vector", ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds %struct.anon, ptr %153, i32 0, i32 1
  %155 = load double, ptr %154, align 8, !tbaa !12
  %156 = load double, ptr %28, align 8, !tbaa !15
  %157 = fcmp ogt double %155, %156
  br i1 %157, label %158, label %163

158:                                              ; preds = %151
  %159 = load ptr, ptr %32, align 8, !tbaa !5
  %160 = getelementptr inbounds %"struct.P3D::Vector", ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds %struct.anon, ptr %160, i32 0, i32 1
  %162 = load double, ptr %161, align 8, !tbaa !12
  store double %162, ptr %28, align 8, !tbaa !15
  br label %163

163:                                              ; preds = %158, %151
  %164 = load ptr, ptr %32, align 8, !tbaa !5
  %165 = getelementptr inbounds %"struct.P3D::Vector", ptr %164, i32 0, i32 0
  %166 = getelementptr inbounds %struct.anon, ptr %165, i32 0, i32 2
  %167 = load double, ptr %166, align 8, !tbaa !12
  %168 = load double, ptr %29, align 8, !tbaa !15
  %169 = fcmp olt double %167, %168
  br i1 %169, label %170, label %175

170:                                              ; preds = %163
  %171 = load ptr, ptr %32, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.P3D::Vector", ptr %171, i32 0, i32 0
  %173 = getelementptr inbounds %struct.anon, ptr %172, i32 0, i32 2
  %174 = load double, ptr %173, align 8, !tbaa !12
  store double %174, ptr %29, align 8, !tbaa !15
  br label %175

175:                                              ; preds = %170, %163
  %176 = load ptr, ptr %32, align 8, !tbaa !5
  %177 = getelementptr inbounds %"struct.P3D::Vector", ptr %176, i32 0, i32 0
  %178 = getelementptr inbounds %struct.anon, ptr %177, i32 0, i32 2
  %179 = load double, ptr %178, align 8, !tbaa !12
  %180 = load double, ptr %30, align 8, !tbaa !15
  %181 = fcmp ogt double %179, %180
  br i1 %181, label %182, label %187

182:                                              ; preds = %175
  %183 = load ptr, ptr %32, align 8, !tbaa !5
  %184 = getelementptr inbounds %"struct.P3D::Vector", ptr %183, i32 0, i32 0
  %185 = getelementptr inbounds %struct.anon, ptr %184, i32 0, i32 2
  %186 = load double, ptr %185, align 8, !tbaa !12
  store double %186, ptr %30, align 8, !tbaa !15
  br label %187

187:                                              ; preds = %182, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  br label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %31, align 4, !tbaa !9
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %31, align 4, !tbaa !9
  br label %107, !llvm.loop !17

191:                                              ; preds = %111
  %192 = load double, ptr %25, align 8, !tbaa !15
  %193 = load double, ptr %27, align 8, !tbaa !15
  %194 = load double, ptr %29, align 8, !tbaa !15
  %195 = load double, ptr %26, align 8, !tbaa !15
  %196 = load double, ptr %28, align 8, !tbaa !15
  %197 = load double, ptr %30, align 8, !tbaa !15
  call void @_ZN3P3D19BoundingBoxTemplateIdEC2Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %0, double noundef %192, double noundef %193, double noundef %194, double noundef %195, double noundef %196, double noundef %197)
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 144, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIdLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #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"="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 = { 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 24, !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"

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

@_ZN3P3D12ShapeLibrary16wedgeVertexCountE = 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 nounwind uwtable
declare dso_local void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmlIddLm3EEENS_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 8 dereferenceable(24)) local_unnamed_addr #1

; 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 #3 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK3P3D10WedgeClass9getBoundsERKNS_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 #1 align 2 {
.preheader.preheader:
  %4 = alloca %"class.P3D::Matrix", align 8
  %5 = alloca [3 x %"struct.P3D::Vector"], align 16
  %6 = alloca %"struct.P3D::Vector", align 8
  %7 = alloca %"struct.P3D::Vector", align 8
  %8 = alloca [6 x %"struct.P3D::Vector"], align 16
  %9 = alloca %"struct.P3D::Vector", align 8
  %10 = alloca %"struct.P3D::Vector", align 8
  %11 = alloca %"struct.P3D::Vector", align 8
  %12 = alloca %"struct.P3D::Vector", align 8
  %13 = alloca %"struct.P3D::Vector", align 8
  %14 = alloca %"struct.P3D::Vector", align 8
  %15 = alloca %"struct.P3D::Vector", align 8
  %16 = alloca %"struct.P3D::Vector", align 8
  %17 = alloca %"struct.P3D::Vector", align 8
  %18 = alloca %"struct.P3D::Vector", align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #4
  call void @_ZNK3P3D22MatrixRotationTemplateIdE16asRotationMatrixEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Matrix") align 8 %4, ptr noundef nonnull align 8 dereferenceable(72) %2)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #4
  call void @_ZN3P3D6VectorIdLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %.ptr.1 = getelementptr inbounds i8, ptr %5, i64 24
  call void @_ZN3P3D6VectorIdLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #4
  %.ptr.2 = getelementptr inbounds i8, ptr %5, i64 48
  call void @_ZN3P3D6VectorIdLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %19 = 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 24, ptr nonnull %7) #4
  call void @_ZNK3P3D6MatrixIdLm3ELm3EE6getColEm(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(72) %4, i64 noundef 0)
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %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 24, ptr nonnull %7) #4
  call void @_ZNK3P3D6MatrixIdLm3ELm3EE6getColEm(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(72) %4, i64 noundef 1)
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %21 = 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 24, ptr nonnull %7) #4
  call void @_ZNK3P3D6MatrixIdLm3ELm3EE6getColEm(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(72) %4, i64 noundef 2)
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 24, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #4
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #4
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2) #4
  %22 = getelementptr inbounds i8, ptr %8, i64 24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #4
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #4
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2) #4
  %23 = getelementptr inbounds i8, ptr %8, i64 48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #4
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #4
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2) #4
  %24 = getelementptr inbounds i8, ptr %8, i64 72
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #4
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #4
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %24, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2) #4
  %25 = getelementptr inbounds i8, ptr %8, i64 96
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #4
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #4
  call void @_ZN3P3DmiIddLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %25, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2) #4
  %26 = getelementptr inbounds i8, ptr %8, i64 120
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #4
  call void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1) #4
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %26, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  %27 = load double, ptr %8, align 16, !tbaa !6
  %28 = getelementptr inbounds i8, ptr %8, i64 8
  %29 = load <2 x double>, ptr %28, align 8, !tbaa !6
  %30 = load i32, ptr @_ZN3P3D12ShapeLibrary16wedgeVertexCountE, align 4, !tbaa !9
  %31 = icmp sgt i32 %30, 1
  %32 = extractelement <2 x double> %29, i64 0
  %33 = extractelement <2 x double> %29, i64 1
  br i1 %31, label %.lr.ph.preheader, label %._crit_edge

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

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %34 = extractelement <2 x double> %48, i64 1
  %35 = extractelement <2 x double> %48, i64 0
  %36 = extractelement <2 x double> %49, i64 1
  %37 = extractelement <2 x double> %49, i64 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader.preheader
  %.045.lcssa = phi double [ %27, %.preheader.preheader ], [ %.146, %._crit_edge.loopexit ]
  %.043.lcssa = phi double [ %27, %.preheader.preheader ], [ %.144, %._crit_edge.loopexit ]
  %.041.lcssa = phi double [ %32, %.preheader.preheader ], [ %35, %._crit_edge.loopexit ]
  %.039.lcssa = phi double [ %32, %.preheader.preheader ], [ %37, %._crit_edge.loopexit ]
  %.037.lcssa = phi double [ %33, %.preheader.preheader ], [ %34, %._crit_edge.loopexit ]
  %.036.lcssa = phi double [ %33, %.preheader.preheader ], [ %36, %._crit_edge.loopexit ]
  call void @_ZN3P3D19BoundingBoxTemplateIdEC2Edddddd(ptr noundef nonnull align 8 dereferenceable(48) %0, double noundef %.045.lcssa, double noundef %.041.lcssa, double noundef %.037.lcssa, double noundef %.043.lcssa, double noundef %.039.lcssa, double noundef %.036.lcssa)
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #4
  ret void

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.04356 = phi double [ %27, %.lr.ph.preheader ], [ %.144, %.lr.ph ]
  %.04555 = phi double [ %27, %.lr.ph.preheader ], [ %.146, %.lr.ph ]
  %38 = phi <2 x double> [ %29, %.lr.ph.preheader ], [ %49, %.lr.ph ]
  %39 = phi <2 x double> [ %29, %.lr.ph.preheader ], [ %48, %.lr.ph ]
  %40 = getelementptr inbounds [6 x %"struct.P3D::Vector"], ptr %8, i64 0, i64 %indvars.iv
  %41 = load double, ptr %40, align 8, !tbaa !6
  %42 = fcmp olt double %41, %.04555
  %.146 = select i1 %42, double %41, double %.04555
  %43 = fcmp ogt double %41, %.04356
  %.144 = select i1 %43, double %41, double %.04356
  %44 = getelementptr inbounds i8, ptr %40, i64 8
  %45 = load <2 x double>, ptr %44, align 8, !tbaa !6
  %46 = fcmp ogt <2 x double> %45, %38
  %47 = fcmp olt <2 x double> %45, %39
  %48 = select <2 x i1> %47, <2 x double> %45, <2 x double> %39
  %49 = select <2 x i1> %46, <2 x double> %45, <2 x double> %38
  %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 !11
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIdLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DngIdLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24)) 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 = { mustprogress 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 = { 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 = !{i64 0, i64 24, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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