; LLVM IR from ThePhysicsGuys/Physics3D :: Physics3D/geometry/shapeLibrary.ll (ZN3P3D12ShapeLibrary15createSpikeBallEffii)

; 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::Polyhedron" = type { %"class.P3D::TriangleMesh" }
%"class.P3D::TriangleMesh" = type { %"class.P3D::MeshPrototype" }
%"class.P3D::MeshPrototype" = type { %"class.P3D::UniqueAlignedPointer", %"class.P3D::UniqueAlignedPointer.2", i32, i32 }
%"class.P3D::UniqueAlignedPointer" = type { ptr }
%"class.P3D::UniqueAlignedPointer.2" = type { ptr }
%"struct.std::pair" = type { ptr, ptr }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x float] }

@_ZN3P3D12ShapeLibrary11icosahedronE = external dso_local global %"class.P3D::Polyhedron", align 8

declare void @_ZN3P3D10PolyhedronC1EPKNS_6VectorIfLm3EEEPKNS_8TriangleEii(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, i32 noundef, i32 noundef) unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D10PolyhedronC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #5

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

declare void @_ZNK3P3D12TriangleMesh11getVerticesEPNS_6VectorIfLm3EEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #0

declare void @_ZNK3P3D12TriangleMesh12getTrianglesEPNS_8TriangleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare hidden { ptr, ptr } @_ZN3P3D12ShapeLibraryL9tesselateEPNS_6VectorIfLm3EEEPNS_8TriangleEii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #7

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

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

; 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) #9

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #10

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D12ShapeLibrary15createSpikeBallEffii(ptr dead_on_unwind noalias writable sret(%"class.P3D::Polyhedron") align 8 %0, float noundef %1, float noundef %2, i32 noundef %3, i32 noundef %4) #7 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.P3D::Polyhedron", align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %"struct.P3D::Vector", align 4
  %26 = alloca %"struct.P3D::Vector", align 4
  %27 = alloca { <2 x float>, float }, align 8
  %28 = alloca { <2 x float>, float }, align 8
  %29 = alloca i32, align 4
  %30 = alloca %"struct.P3D::Vector", align 4
  %31 = alloca %"struct.P3D::Vector", align 4
  %32 = alloca { <2 x float>, float }, align 8
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca i1, align 1
  store ptr %0, ptr %6, align 8
  store float %1, ptr %7, align 4, !tbaa !5
  store float %2, ptr %8, align 4, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #11
  store i32 12, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #11
  store i32 20, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #11
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %48, %5
  %36 = load i32, ptr %13, align 4, !tbaa !9
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #11
  br label %51

40:                                               ; preds = %35
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = load i32, ptr %12, align 4, !tbaa !9
  %43 = mul nsw i32 %42, 3
  %44 = sdiv i32 %43, 2
  %45 = add nsw i32 %41, %44
  store i32 %45, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = mul nsw i32 %46, 4
  store i32 %47, ptr %12, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %40
  %49 = load i32, ptr %13, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %13, align 4, !tbaa !9
  br label %35, !llvm.loop !11

51:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #11
  call void @_ZN3P3D10PolyhedronC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D12ShapeLibrary11icosahedronE)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #11
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %53, i64 12)
  %55 = extractvalue { i64, i1 } %54, 1
  %56 = extractvalue { i64, i1 } %54, 0
  %57 = select i1 %55, i64 -1, i64 %56
  %58 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %57) #12
          to label %59 unwind label %85

59:                                               ; preds = %51
  %60 = icmp eq i64 %53, 0
  br i1 %60, label %67, label %61

61:                                               ; preds = %59
  %62 = getelementptr inbounds %"struct.P3D::Vector", ptr %58, i64 %53
  br label %63

63:                                               ; preds = %63, %61
  %64 = phi ptr [ %58, %61 ], [ %65, %63 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %64) #11
  %65 = getelementptr inbounds %"struct.P3D::Vector", ptr %64, i64 1
  %66 = icmp eq ptr %65, %62
  br i1 %66, label %67, label %63

67:                                               ; preds = %63, %59
  store ptr %58, ptr %15, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #11
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %69, i64 12)
  %71 = extractvalue { i64, i1 } %70, 1
  %72 = extractvalue { i64, i1 } %70, 0
  %73 = select i1 %71, i64 -1, i64 %72
  %74 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %73) #12
          to label %75 unwind label %89

75:                                               ; preds = %67
  store ptr %74, ptr %18, align 8, !tbaa !13
  %76 = load ptr, ptr %15, align 8, !tbaa !13
  invoke void @_ZNK3P3D12TriangleMesh11getVerticesEPNS_6VectorIfLm3EEE(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef %76)
          to label %77 unwind label %89

77:                                               ; preds = %75
  %78 = load ptr, ptr %18, align 8, !tbaa !13
  invoke void @_ZNK3P3D12TriangleMesh12getTrianglesEPNS_8TriangleE(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef %78)
          to label %79 unwind label %89

79:                                               ; preds = %77
  store i32 12, ptr %11, align 4, !tbaa !9
  store i32 20, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #11
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %111, %79
  %81 = load i32, ptr %19, align 4, !tbaa !9
  %82 = load i32, ptr %9, align 4, !tbaa !9
  %83 = icmp slt i32 %81, %82
  br i1 %83, label %93, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  br label %118

85:                                               ; preds = %51
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %16, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %17, align 4
  br label %206

89:                                               ; preds = %77, %75, %67
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %16, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %17, align 4
  br label %205

93:                                               ; preds = %80
  %94 = load ptr, ptr %15, align 8, !tbaa !13
  %95 = load ptr, ptr %18, align 8, !tbaa !13
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = invoke { ptr, ptr } @_ZN3P3D12ShapeLibraryL9tesselateEPNS_6VectorIfLm3EEEPNS_8TriangleEii(ptr noundef %94, ptr noundef %95, i32 noundef %96, i32 noundef %97)
          to label %99 unwind label %114

99:                                               ; preds = %93
  %100 = getelementptr inbounds { ptr, ptr }, ptr %20, i32 0, i32 0
  %101 = extractvalue { ptr, ptr } %98, 0
  store ptr %101, ptr %100, align 8
  %102 = getelementptr inbounds { ptr, ptr }, ptr %20, i32 0, i32 1
  %103 = extractvalue { ptr, ptr } %98, 1
  store ptr %103, ptr %102, align 8
  %104 = load i32, ptr %11, align 4, !tbaa !9
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = mul nsw i32 %105, 3
  %107 = sdiv i32 %106, 2
  %108 = add nsw i32 %104, %107
  store i32 %108, ptr %11, align 4, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = mul nsw i32 %109, 4
  store i32 %110, ptr %12, align 4, !tbaa !9
  br label %111

111:                                              ; preds = %99
  %112 = load i32, ptr %19, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %19, align 4, !tbaa !9
  br label %80, !llvm.loop !15

114:                                              ; preds = %93
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %16, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #11
  br label %205

118:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #11
  store i32 12, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #11
  store i32 20, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #11
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %132, %118
  %120 = load i32, ptr %23, align 4, !tbaa !9
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #11
  br label %135

124:                                              ; preds = %119
  %125 = load i32, ptr %21, align 4, !tbaa !9
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = mul nsw i32 %126, 3
  %128 = sdiv i32 %127, 2
  %129 = add nsw i32 %125, %128
  store i32 %129, ptr %21, align 4, !tbaa !9
  %130 = load i32, ptr %22, align 4, !tbaa !9
  %131 = mul nsw i32 %130, 4
  store i32 %131, ptr %22, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %124
  %133 = load i32, ptr %23, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %23, align 4, !tbaa !9
  br label %119, !llvm.loop !16

135:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %136

136:                                              ; preds = %156, %135
  %137 = load i32, ptr %24, align 4, !tbaa !9
  %138 = load i32, ptr %21, align 4, !tbaa !9
  %139 = icmp slt i32 %137, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %159

141:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #11
  %142 = load ptr, ptr %15, align 8, !tbaa !13
  %143 = load i32, ptr %24, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds %"struct.P3D::Vector", ptr %142, i64 %144
  %146 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %145) #11
  %147 = getelementptr inbounds %"struct.P3D::Vector", ptr %26, i32 0, i32 0
  %148 = getelementptr inbounds %union.anon, ptr %147, i32 0, i32 0
  store { <2 x float>, float } %146, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 8 %27, i64 12, i1 false)
  %149 = call { <2 x float>, float } @_ZN3P3DmlIffLm3EEENS_6VectorIDTmlixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(4) %8) #11
  %150 = getelementptr inbounds %"struct.P3D::Vector", ptr %25, i32 0, i32 0
  %151 = getelementptr inbounds %union.anon, ptr %150, i32 0, i32 0
  store { <2 x float>, float } %149, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %151, ptr align 8 %28, i64 12, i1 false)
  %152 = load ptr, ptr %15, align 8, !tbaa !13
  %153 = load i32, ptr %24, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds %"struct.P3D::Vector", ptr %152, i64 %154
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %155, ptr align 4 %25, i64 12, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #11
  br label %156

156:                                              ; preds = %141
  %157 = load i32, ptr %24, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %24, align 4, !tbaa !9
  br label %136, !llvm.loop !19

159:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #11
  %160 = load i32, ptr %21, align 4, !tbaa !9
  store i32 %160, ptr %29, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %181, %159
  %162 = load i32, ptr %29, align 4, !tbaa !9
  %163 = load i32, ptr %11, align 4, !tbaa !9
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #11
  br label %184

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #11
  %167 = load ptr, ptr %15, align 8, !tbaa !13
  %168 = load i32, ptr %29, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %"struct.P3D::Vector", ptr %167, i64 %169
  %171 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %170) #11
  %172 = getelementptr inbounds %"struct.P3D::Vector", ptr %31, i32 0, i32 0
  %173 = getelementptr inbounds %union.anon, ptr %172, i32 0, i32 0
  store { <2 x float>, float } %171, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %173, ptr align 8 %32, i64 12, i1 false)
  %174 = call { <2 x float>, float } @_ZN3P3DmlIffLm3EEENS_6VectorIDTmlixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(4) %7) #11
  %175 = getelementptr inbounds %"struct.P3D::Vector", ptr %30, i32 0, i32 0
  %176 = getelementptr inbounds %union.anon, ptr %175, i32 0, i32 0
  store { <2 x float>, float } %174, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %176, ptr align 8 %33, i64 12, i1 false)
  %177 = load ptr, ptr %15, align 8, !tbaa !13
  %178 = load i32, ptr %29, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds %"struct.P3D::Vector", ptr %177, i64 %179
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %180, ptr align 4 %30, i64 12, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #11
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #11
  br label %181

181:                                              ; preds = %166
  %182 = load i32, ptr %29, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %29, align 4, !tbaa !9
  br label %161, !llvm.loop !20

184:                                              ; preds = %165
  store i1 false, ptr %34, align 1
  %185 = load ptr, ptr %15, align 8, !tbaa !13
  %186 = load ptr, ptr %18, align 8, !tbaa !13
  %187 = load i32, ptr %11, align 4, !tbaa !9
  %188 = load i32, ptr %12, align 4, !tbaa !9
  invoke void @_ZN3P3D10PolyhedronC1EPKNS_6VectorIfLm3EEEPKNS_8TriangleEii(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %185, ptr noundef %186, i32 noundef %187, i32 noundef %188)
          to label %189 unwind label %199

189:                                              ; preds = %184
  %190 = load ptr, ptr %15, align 8, !tbaa !13
  %191 = icmp eq ptr %190, null
  br i1 %191, label %193, label %192

192:                                              ; preds = %189
  call void @_ZdaPv(ptr noundef %190) #13
  br label %193

193:                                              ; preds = %192, %189
  %194 = load ptr, ptr %18, align 8, !tbaa !13
  %195 = icmp eq ptr %194, null
  br i1 %195, label %197, label %196

196:                                              ; preds = %193
  call void @_ZdaPv(ptr noundef %194) #13
  br label %197

197:                                              ; preds = %196, %193
  store i1 true, ptr %34, align 1
  %198 = load i1, ptr %34, align 1
  br i1 %198, label %204, label %203

199:                                              ; preds = %184
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %16, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  br label %205

203:                                              ; preds = %197
  call void @_ZN3P3D13MeshPrototypeD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #11
  br label %204

204:                                              ; preds = %203, %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #11
  call void @_ZN3P3D13MeshPrototypeD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #11
  ret void

205:                                              ; preds = %199, %114, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  br label %206

206:                                              ; preds = %205, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #11
  call void @_ZN3P3D13MeshPrototypeD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #11
  br label %207

207:                                              ; preds = %206
  %208 = load ptr, ptr %16, align 8
  %209 = load i32, ptr %17, align 4
  %210 = insertvalue { ptr, i32 } poison, ptr %208, 0
  %211 = insertvalue { ptr, i32 } %210, i32 %209, 1
  resume { ptr, i32 } %211
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nobuiltin allocsize(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 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 #7 = { 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 #8 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nounwind }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { builtin 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 = !{!"float", !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"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{i64 0, i64 12, !18}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


; 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::Polyhedron" = type { %"class.P3D::TriangleMesh" }
%"class.P3D::TriangleMesh" = type { %"class.P3D::MeshPrototype" }
%"class.P3D::MeshPrototype" = type { %"class.P3D::UniqueAlignedPointer", %"class.P3D::UniqueAlignedPointer.2", i32, i32 }
%"class.P3D::UniqueAlignedPointer" = type { ptr }
%"class.P3D::UniqueAlignedPointer.2" = type { ptr }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x float] }

@_ZN3P3D12ShapeLibrary11icosahedronE = external dso_local global %"class.P3D::Polyhedron", align 8

declare void @_ZN3P3D10PolyhedronC1EPKNS_6VectorIfLm3EEEPKNS_8TriangleEii(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, i32 noundef, i32 noundef) unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3P3D10PolyhedronC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #4

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

declare void @_ZNK3P3D12TriangleMesh11getVerticesEPNS_6VectorIfLm3EEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #0

declare void @_ZNK3P3D12TriangleMesh12getTrianglesEPNS_8TriangleE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden { ptr, ptr } @_ZN3P3D12ShapeLibraryL9tesselateEPNS_6VectorIfLm3EEEPNS_8TriangleEii(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #6

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D12ShapeLibrary15createSpikeBallEffii(ptr dead_on_unwind noalias writable sret(%"class.P3D::Polyhedron") align 8 %0, float noundef %1, float noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca %"class.P3D::Polyhedron", align 8
  %9 = alloca %"struct.P3D::Vector", align 8
  %10 = alloca %"struct.P3D::Vector", align 8
  store float %1, ptr %6, align 4, !tbaa !5
  store float %2, ptr %7, align 4, !tbaa !5
  %11 = icmp sgt i32 %3, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %5
  %xtraiter = and i32 %3, 3
  %12 = icmp ult i32 %3, 4
  br i1 %12, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i32 %3, 2147483644
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa130.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %36, %.lr.ph ]
  %.lcssa129.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %37, %.lr.ph ]
  %.089.unr = phi i32 [ 12, %.lr.ph.preheader ], [ %36, %.lr.ph ]
  %.06588.unr = phi i32 [ 20, %.lr.ph.preheader ], [ %37, %.lr.ph ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge.loopexit, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.089.epil = phi i32 [ %15, %.lr.ph.epil ], [ %.089.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.06588.epil = phi i32 [ %16, %.lr.ph.epil ], [ %.06588.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %13 = lshr exact i32 %.06588.epil, 1
  %14 = add nuw nsw i32 %13, %.06588.epil
  %15 = add nuw nsw i32 %14, %.089.epil
  %16 = shl nsw i32 %.06588.epil, 2
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.loopexit, label %.lr.ph.epil, !llvm.loop !9

._crit_edge.loopexit:                             ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa
  %.lcssa130 = phi i32 [ %.lcssa130.ph, %._crit_edge.loopexit.unr-lcssa ], [ %15, %.lr.ph.epil ]
  %.lcssa129 = phi i32 [ %.lcssa129.ph, %._crit_edge.loopexit.unr-lcssa ], [ %16, %.lr.ph.epil ]
  %17 = zext nneg i32 %.lcssa130 to i64
  %18 = zext nneg i32 %.lcssa129 to i64
  %19 = mul nuw nsw i64 %18, 12
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %5
  %.065.lcssa = phi i64 [ 240, %5 ], [ %19, %._crit_edge.loopexit ]
  %.0.lcssa = phi i64 [ 12, %5 ], [ %17, %._crit_edge.loopexit ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #10
  call void @_ZN3P3D10PolyhedronC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) @_ZN3P3D12ShapeLibrary11icosahedronE)
  %20 = mul nuw nsw i64 %.0.lcssa, 12
  %21 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %20) #11
          to label %38 unwind label %50

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.089 = phi i32 [ 12, %.lr.ph.preheader.new ], [ %36, %.lr.ph ]
  %.06588 = phi i32 [ 20, %.lr.ph.preheader.new ], [ %37, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %22 = lshr exact i32 %.06588, 1
  %23 = add nuw nsw i32 %22, %.06588
  %24 = add nuw nsw i32 %23, %.089
  %25 = shl nsw i32 %.06588, 2
  %26 = lshr exact i32 %25, 1
  %27 = add nuw nsw i32 %26, %25
  %28 = add nuw nsw i32 %27, %24
  %29 = shl nsw i32 %.06588, 4
  %30 = lshr exact i32 %29, 1
  %31 = add nuw nsw i32 %30, %29
  %32 = add nuw nsw i32 %31, %28
  %33 = shl nsw i32 %.06588, 6
  %34 = lshr exact i32 %33, 1
  %35 = add nuw nsw i32 %34, %33
  %36 = add nuw nsw i32 %35, %32
  %37 = shl nsw i32 %.06588, 8
  %niter.next.3 = add i32 %niter, 4
  %niter.ncmp.3 = icmp eq i32 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

38:                                               ; preds = %._crit_edge
  %39 = getelementptr inbounds %"struct.P3D::Vector", ptr %21, i64 %.0.lcssa
  br label %40

40:                                               ; preds = %40, %38
  %41 = phi ptr [ %21, %38 ], [ %42, %40 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %41) #10
  %42 = getelementptr inbounds i8, ptr %41, i64 12
  %43 = icmp eq ptr %42, %39
  br i1 %43, label %44, label %40

44:                                               ; preds = %40
  %45 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %.065.lcssa) #11
          to label %46 unwind label %52

46:                                               ; preds = %44
  invoke void @_ZNK3P3D12TriangleMesh11getVerticesEPNS_6VectorIfLm3EEE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %21)
          to label %47 unwind label %52

47:                                               ; preds = %46
  invoke void @_ZNK3P3D12TriangleMesh12getTrianglesEPNS_8TriangleE(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull %45)
          to label %.preheader84 unwind label %52

.preheader84:                                     ; preds = %47
  br i1 %11, label %.lr.ph94, label %.preheader83

.preheader83:                                     ; preds = %55, %.preheader84
  %.166.lcssa = phi i32 [ 20, %.preheader84 ], [ %59, %55 ]
  %.1.lcssa = phi i32 [ 12, %.preheader84 ], [ %58, %55 ]
  %48 = icmp sgt i32 %4, 0
  br i1 %48, label %.lr.ph100.preheader, label %.preheader82

.lr.ph100.preheader:                              ; preds = %.preheader83
  %xtraiter133 = and i32 %4, 3
  %49 = icmp ult i32 %4, 4
  br i1 %49, label %.preheader82.loopexit.unr-lcssa, label %.lr.ph100.preheader.new

.lr.ph100.preheader.new:                          ; preds = %.lr.ph100.preheader
  %unroll_iter137 = and i32 %4, 2147483644
  br label %.lr.ph100

50:                                               ; preds = %._crit_edge
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %96

52:                                               ; preds = %47, %46, %44
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %96

.lr.ph94:                                         ; preds = %.preheader84, %55
  %.193 = phi i32 [ %58, %55 ], [ 12, %.preheader84 ]
  %.16692 = phi i32 [ %59, %55 ], [ 20, %.preheader84 ]
  %.07291 = phi i32 [ %60, %55 ], [ 0, %.preheader84 ]
  %54 = invoke { ptr, ptr } @_ZN3P3D12ShapeLibraryL9tesselateEPNS_6VectorIfLm3EEEPNS_8TriangleEii(ptr noundef nonnull %21, ptr noundef nonnull %45, i32 noundef %.193, i32 noundef %.16692)
          to label %55 unwind label %61

55:                                               ; preds = %.lr.ph94
  %56 = lshr exact i32 %.16692, 1
  %57 = add nuw nsw i32 %56, %.16692
  %58 = add nuw nsw i32 %57, %.193
  %59 = shl nsw i32 %.16692, 2
  %60 = add nuw nsw i32 %.07291, 1
  %exitcond110.not = icmp eq i32 %60, %3
  br i1 %exitcond110.not, label %.preheader83, label %.lr.ph94, !llvm.loop !13

61:                                               ; preds = %.lr.ph94
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %96

.preheader82.loopexit.unr-lcssa:                  ; preds = %.lr.ph100, %.lr.ph100.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph100.preheader ], [ %81, %.lr.ph100 ]
  %.07499.unr = phi i32 [ 12, %.lr.ph100.preheader ], [ %81, %.lr.ph100 ]
  %.07598.unr = phi i32 [ 20, %.lr.ph100.preheader ], [ %82, %.lr.ph100 ]
  %lcmp.mod135.not = icmp eq i32 %xtraiter133, 0
  br i1 %lcmp.mod135.not, label %.preheader82, label %.lr.ph100.epil

.lr.ph100.epil:                                   ; preds = %.preheader82.loopexit.unr-lcssa, %.lr.ph100.epil
  %.07499.epil = phi i32 [ %65, %.lr.ph100.epil ], [ %.07499.unr, %.preheader82.loopexit.unr-lcssa ]
  %.07598.epil = phi i32 [ %66, %.lr.ph100.epil ], [ %.07598.unr, %.preheader82.loopexit.unr-lcssa ]
  %epil.iter134 = phi i32 [ %epil.iter134.next, %.lr.ph100.epil ], [ 0, %.preheader82.loopexit.unr-lcssa ]
  %63 = lshr exact i32 %.07598.epil, 1
  %64 = add nuw nsw i32 %63, %.07598.epil
  %65 = add nuw nsw i32 %64, %.07499.epil
  %66 = shl nsw i32 %.07598.epil, 2
  %epil.iter134.next = add i32 %epil.iter134, 1
  %epil.iter134.cmp.not = icmp eq i32 %epil.iter134.next, %xtraiter133
  br i1 %epil.iter134.cmp.not, label %.preheader82, label %.lr.ph100.epil, !llvm.loop !14

.preheader82:                                     ; preds = %.preheader82.loopexit.unr-lcssa, %.lr.ph100.epil, %.preheader83
  %.074.lcssa = phi i32 [ 12, %.preheader83 ], [ %.lcssa.ph, %.preheader82.loopexit.unr-lcssa ], [ %65, %.lr.ph100.epil ]
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %umax = call i32 @llvm.umax.i32(i32 %.074.lcssa, i32 1)
  %wide.trip.count = zext i32 %umax to i64
  br label %85

.lr.ph100:                                        ; preds = %.lr.ph100, %.lr.ph100.preheader.new
  %.07499 = phi i32 [ 12, %.lr.ph100.preheader.new ], [ %81, %.lr.ph100 ]
  %.07598 = phi i32 [ 20, %.lr.ph100.preheader.new ], [ %82, %.lr.ph100 ]
  %niter138 = phi i32 [ 0, %.lr.ph100.preheader.new ], [ %niter138.next.3, %.lr.ph100 ]
  %67 = lshr exact i32 %.07598, 1
  %68 = add nuw nsw i32 %67, %.07598
  %69 = add nuw nsw i32 %68, %.07499
  %70 = shl nsw i32 %.07598, 2
  %71 = lshr exact i32 %70, 1
  %72 = add nuw nsw i32 %71, %70
  %73 = add nuw nsw i32 %72, %69
  %74 = shl nsw i32 %.07598, 4
  %75 = lshr exact i32 %74, 1
  %76 = add nuw nsw i32 %75, %74
  %77 = add nuw nsw i32 %76, %73
  %78 = shl nsw i32 %.07598, 6
  %79 = lshr exact i32 %78, 1
  %80 = add nuw nsw i32 %79, %78
  %81 = add nuw nsw i32 %80, %77
  %82 = shl nsw i32 %.07598, 8
  %niter138.next.3 = add i32 %niter138, 4
  %niter138.ncmp.3 = icmp eq i32 %niter138.next.3, %unroll_iter137
  br i1 %niter138.ncmp.3, label %.preheader82.loopexit.unr-lcssa, label %.lr.ph100, !llvm.loop !15

.preheader:                                       ; preds = %85
  %83 = icmp ult i32 %.074.lcssa, %.1.lcssa
  br i1 %83, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %.preheader
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %84 = zext i32 %.074.lcssa to i64
  %wide.trip.count117 = zext i32 %.1.lcssa to i64
  br label %89

85:                                               ; preds = %.preheader82, %85
  %indvars.iv = phi i64 [ 0, %.preheader82 ], [ %indvars.iv.next, %85 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #10
  %86 = getelementptr inbounds %"struct.P3D::Vector", ptr %21, i64 %indvars.iv
  %87 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %86) #10
  %.fca.0.extract13 = extractvalue { <2 x float>, float } %87, 0
  %.fca.1.extract14 = extractvalue { <2 x float>, float } %87, 1
  store <2 x float> %.fca.0.extract13, ptr %9, align 8
  store float %.fca.1.extract14, ptr %.sroa.216.0..sroa_idx, align 8
  %88 = call { <2 x float>, float } @_ZN3P3DmlIffLm3EEENS_6VectorIDTmlixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(4) %7) #10
  %.fca.0.extract9 = extractvalue { <2 x float>, float } %88, 0
  %.fca.1.extract10 = extractvalue { <2 x float>, float } %88, 1
  store <2 x float> %.fca.0.extract9, ptr %86, align 4
  %.sroa.418.0..sroa_idx = getelementptr inbounds i8, ptr %86, i64 8
  store float %.fca.1.extract10, ptr %.sroa.418.0..sroa_idx, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond113.not, label %.preheader, label %85, !llvm.loop !17

._crit_edge105:                                   ; preds = %89, %.preheader
  invoke void @_ZN3P3D10PolyhedronC1EPKNS_6VectorIfLm3EEEPKNS_8TriangleEii(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull %21, ptr noundef nonnull %45, i32 noundef %.1.lcssa, i32 noundef %.166.lcssa)
          to label %93 unwind label %94

89:                                               ; preds = %.lr.ph104, %89
  %indvars.iv114 = phi i64 [ %84, %.lr.ph104 ], [ %indvars.iv.next115, %89 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #10
  %90 = getelementptr inbounds %"struct.P3D::Vector", ptr %21, i64 %indvars.iv114
  %91 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %90) #10
  %.fca.0.extract1 = extractvalue { <2 x float>, float } %91, 0
  %.fca.1.extract2 = extractvalue { <2 x float>, float } %91, 1
  store <2 x float> %.fca.0.extract1, ptr %10, align 8
  store float %.fca.1.extract2, ptr %.sroa.24.0..sroa_idx, align 8
  %92 = call { <2 x float>, float } @_ZN3P3DmlIffLm3EEENS_6VectorIDTmlixfp_Li0Efp0_EXT1_EEERKNS1_IT_XT1_EEERKT0_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(4) %6) #10
  %.fca.0.extract = extractvalue { <2 x float>, float } %92, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %92, 1
  store <2 x float> %.fca.0.extract, ptr %90, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %90, i64 8
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #10
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %exitcond118.not = icmp eq i64 %indvars.iv.next115, %wide.trip.count117
  br i1 %exitcond118.not, label %._crit_edge105, label %89, !llvm.loop !18

93:                                               ; preds = %._crit_edge105
  call void @_ZdaPv(ptr noundef nonnull %21) #12
  call void @_ZdaPv(ptr noundef nonnull %45) #12
  call void @_ZN3P3D13MeshPrototypeD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  ret void

94:                                               ; preds = %._crit_edge105
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %96

96:                                               ; preds = %52, %61, %94, %50
  %.pn.pn = phi { ptr, i32 } [ %51, %50 ], [ %62, %61 ], [ %95, %94 ], [ %53, %52 ]
  call void @_ZN3P3D13MeshPrototypeD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #9

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass