; LLVM IR from ThePhysicsGuys/Physics3D :: engine/io/import.ll (ZN3P3D13loadBinaryObjERSi)

; 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::Graphics::ExtendedTriangleMesh" = type { %"class.P3D::TriangleMesh", %"class.std::shared_ptr", %"class.std::shared_ptr.14", %"class.std::shared_ptr", %"class.std::shared_ptr" }
%"class.P3D::TriangleMesh" = type { %"class.P3D::MeshPrototype" }
%"class.P3D::MeshPrototype" = type { %"class.P3D::UniqueAlignedPointer", %"class.P3D::UniqueAlignedPointer.13", i32, i32 }
%"class.P3D::UniqueAlignedPointer" = type { ptr }
%"class.P3D::UniqueAlignedPointer.13" = type { ptr }
%"class.std::shared_ptr.14" = type { %"class.std::__shared_ptr.15" }
%"class.std::__shared_ptr.15" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"struct.P3D::Vector" = type { %union.anon.0 }
%union.anon.0 = type { [3 x double] }
%"struct.P3D::Vector.10" = type { %union.anon.11 }
%union.anon.11 = type { [3 x float] }
%"struct.P3D::Vector.27" = type { %union.anon.28 }
%union.anon.28 = type { [2 x float] }
%"struct.P3D::Triangle" = type { %union.anon.35 }
%union.anon.35 = type { %struct.anon.36 }
%struct.anon.36 = type { i32, i32, i32 }
%struct.anon.29 = type { float, float }
%struct.anon.12 = type { float, float, float }

; 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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12)) 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIfLm2EEC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) 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)) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMeshC2EPKNS_6VectorIfLm3EEEiPKNS_8TriangleEi(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef, i32 noundef, ptr noundef, i32 noundef) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh15setNormalBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh11setUVBufferERKSt10shared_ptrIA_KNS_6VectorIfLm2EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm2EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh16setTangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh18setBitangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D13loadBinaryObjERSi(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::ExtendedTriangleMesh") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #8 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.P3D::Vector", align 8
  %15 = alloca %"struct.P3D::Vector.10", align 4
  %16 = alloca { <2 x float>, float }, align 8
  %17 = alloca %"struct.P3D::Vector.10", align 4
  %18 = alloca { <2 x float>, float }, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"struct.P3D::Vector.10", align 4
  %22 = alloca { <2 x float>, float }, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca %"struct.P3D::Vector.27", align 4
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca %"struct.P3D::Triangle", align 4
  %31 = alloca { i64, i32 }, align 8
  %32 = alloca %"struct.P3D::Vector.10", align 4
  %33 = alloca %"struct.P3D::Vector.10", align 4
  %34 = alloca %"struct.P3D::Vector.10", align 4
  %35 = alloca { <2 x float>, float }, align 8
  %36 = alloca %"struct.P3D::Vector.10", align 4
  %37 = alloca { <2 x float>, float }, align 8
  %38 = alloca %"struct.P3D::Vector.27", align 4
  %39 = alloca %"struct.P3D::Vector.27", align 4
  %40 = alloca float, align 4
  %41 = alloca %"struct.P3D::Vector.10", align 4
  %42 = alloca { <2 x float>, float }, align 8
  %43 = alloca %"struct.P3D::Vector.10", align 4
  %44 = alloca { <2 x float>, float }, align 8
  %45 = alloca %"struct.P3D::Vector.10", align 4
  %46 = alloca { <2 x float>, float }, align 8
  %47 = alloca %"struct.P3D::Vector.10", align 4
  %48 = alloca { <2 x float>, float }, align 8
  %49 = alloca %"struct.P3D::Vector.10", align 4
  %50 = alloca { <2 x float>, float }, align 8
  %51 = alloca %"struct.P3D::Vector.10", align 4
  %52 = alloca { <2 x float>, float }, align 8
  %53 = alloca i1, align 1
  %54 = alloca %"class.std::shared_ptr", align 8
  %55 = alloca ptr, align 8
  %56 = alloca i32, align 4
  %57 = alloca %"class.std::shared_ptr.14", align 8
  %58 = alloca %"class.std::shared_ptr", align 8
  %59 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #9
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = call noundef signext i8 @_ZN3P3D6Import4readIcEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %60)
  store i8 %61, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = call noundef i32 @_ZN3P3D6Import4readIiEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %62)
  store i32 %63, ptr %6, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = call noundef i32 @_ZN3P3D6Import4readIiEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %64)
  store i32 %65, ptr %7, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #9
  store i8 0, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #9
  store i8 1, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  store i8 2, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #9
  store i8 3, ptr %11, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %66 = load i32, ptr %6, align 4, !tbaa !10
  %67 = sext i32 %66 to i64
  %68 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %67, i64 12)
  %69 = extractvalue { i64, i1 } %68, 1
  %70 = extractvalue { i64, i1 } %68, 0
  %71 = select i1 %69, i64 -1, i64 %70
  %72 = call noalias noundef nonnull ptr @_Znam(i64 noundef %71) #10
  %73 = icmp eq i64 %67, 0
  br i1 %73, label %80, label %74

74:                                               ; preds = %2
  %75 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %72, i64 %67
  br label %76

76:                                               ; preds = %76, %74
  %77 = phi ptr [ %72, %74 ], [ %78, %76 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %77) #9
  %78 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %77, i64 1
  %79 = icmp eq ptr %78, %75
  br i1 %79, label %80, label %76

80:                                               ; preds = %76, %2
  store ptr %72, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !10
  br label %81

81:                                               ; preds = %98, %80
  %82 = load i32, ptr %13, align 4, !tbaa !10
  %83 = load i32, ptr %6, align 4, !tbaa !10
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %101

86:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #9
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = call { <2 x float>, float } @_ZN3P3D6Import4readINS_6VectorIfLm3EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %87)
  %89 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %15, i32 0, i32 0
  %90 = getelementptr inbounds %union.anon.11, ptr %89, i32 0, i32 0
  store { <2 x float>, float } %88, ptr %16, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %90, ptr align 8 %16, i64 12, i1 false)
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 4 dereferenceable(12) %15) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #9
  %91 = call { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #9
  %92 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %17, i32 0, i32 0
  %93 = getelementptr inbounds %union.anon.11, ptr %92, i32 0, i32 0
  store { <2 x float>, float } %91, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %93, ptr align 8 %18, i64 12, i1 false)
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = load i32, ptr %13, align 4, !tbaa !10
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %94, i64 %96
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %97, ptr align 4 %17, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  br label %98

98:                                               ; preds = %86
  %99 = load i32, ptr %13, align 4, !tbaa !10
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %13, align 4, !tbaa !10
  br label %81, !llvm.loop !13

101:                                              ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  store ptr null, ptr %19, align 8, !tbaa !5
  %102 = load i8, ptr %5, align 1, !tbaa !9
  %103 = sext i8 %102 to i32
  %104 = load i8, ptr %9, align 1, !tbaa !9
  %105 = sext i8 %104 to i32
  %106 = icmp eq i32 %103, %105
  br i1 %106, label %113, label %107

107:                                              ; preds = %101
  %108 = load i8, ptr %5, align 1, !tbaa !9
  %109 = sext i8 %108 to i32
  %110 = load i8, ptr %11, align 1, !tbaa !9
  %111 = sext i8 %110 to i32
  %112 = icmp eq i32 %109, %111
  br i1 %112, label %113, label %147

113:                                              ; preds = %107, %101
  %114 = load i32, ptr %6, align 4, !tbaa !10
  %115 = sext i32 %114 to i64
  %116 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %115, i64 12)
  %117 = extractvalue { i64, i1 } %116, 1
  %118 = extractvalue { i64, i1 } %116, 0
  %119 = select i1 %117, i64 -1, i64 %118
  %120 = call noalias noundef nonnull ptr @_Znam(i64 noundef %119) #10
  %121 = icmp eq i64 %115, 0
  br i1 %121, label %128, label %122

122:                                              ; preds = %113
  %123 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %120, i64 %115
  br label %124

124:                                              ; preds = %124, %122
  %125 = phi ptr [ %120, %122 ], [ %126, %124 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %125) #9
  %126 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %125, i64 1
  %127 = icmp eq ptr %126, %123
  br i1 %127, label %128, label %124

128:                                              ; preds = %124, %113
  store ptr %120, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !10
  br label %129

129:                                              ; preds = %143, %128
  %130 = load i32, ptr %20, align 4, !tbaa !10
  %131 = load i32, ptr %6, align 4, !tbaa !10
  %132 = icmp slt i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %146

134:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #9
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = call { <2 x float>, float } @_ZN3P3D6Import4readINS_6VectorIfLm3EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %135)
  %137 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %21, i32 0, i32 0
  %138 = getelementptr inbounds %union.anon.11, ptr %137, i32 0, i32 0
  store { <2 x float>, float } %136, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %138, ptr align 8 %22, i64 12, i1 false)
  %139 = load ptr, ptr %19, align 8, !tbaa !5
  %140 = load i32, ptr %20, align 4, !tbaa !10
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %139, i64 %141
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %142, ptr align 4 %21, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #9
  br label %143

143:                                              ; preds = %134
  %144 = load i32, ptr %20, align 4, !tbaa !10
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %20, align 4, !tbaa !10
  br label %129, !llvm.loop !15

146:                                              ; preds = %133
  br label %147

147:                                              ; preds = %146, %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  store ptr null, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  store ptr null, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  store ptr null, ptr %25, align 8, !tbaa !5
  %148 = load i8, ptr %5, align 1, !tbaa !9
  %149 = sext i8 %148 to i32
  %150 = load i8, ptr %10, align 1, !tbaa !9
  %151 = sext i8 %150 to i32
  %152 = icmp eq i32 %149, %151
  br i1 %152, label %159, label %153

153:                                              ; preds = %147
  %154 = load i8, ptr %5, align 1, !tbaa !9
  %155 = sext i8 %154 to i32
  %156 = load i8, ptr %11, align 1, !tbaa !9
  %157 = sext i8 %156 to i32
  %158 = icmp eq i32 %155, %157
  br i1 %158, label %159, label %223

159:                                              ; preds = %153, %147
  %160 = load i32, ptr %6, align 4, !tbaa !10
  %161 = sext i32 %160 to i64
  %162 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %161, i64 8)
  %163 = extractvalue { i64, i1 } %162, 1
  %164 = extractvalue { i64, i1 } %162, 0
  %165 = select i1 %163, i64 -1, i64 %164
  %166 = call noalias noundef nonnull ptr @_Znam(i64 noundef %165) #10
  %167 = icmp eq i64 %161, 0
  br i1 %167, label %174, label %168

168:                                              ; preds = %159
  %169 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %166, i64 %161
  br label %170

170:                                              ; preds = %170, %168
  %171 = phi ptr [ %166, %168 ], [ %172, %170 ]
  call void @_ZN3P3D6VectorIfLm2EEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %171) #9
  %172 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %171, i64 1
  %173 = icmp eq ptr %172, %169
  br i1 %173, label %174, label %170

174:                                              ; preds = %170, %159
  store ptr %166, ptr %23, align 8, !tbaa !5
  %175 = load i32, ptr %6, align 4, !tbaa !10
  %176 = sext i32 %175 to i64
  %177 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %176, i64 12)
  %178 = extractvalue { i64, i1 } %177, 1
  %179 = extractvalue { i64, i1 } %177, 0
  %180 = select i1 %178, i64 -1, i64 %179
  %181 = call noalias noundef nonnull ptr @_Znam(i64 noundef %180) #10
  %182 = icmp eq i64 %176, 0
  br i1 %182, label %189, label %183

183:                                              ; preds = %174
  %184 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %181, i64 %176
  br label %185

185:                                              ; preds = %185, %183
  %186 = phi ptr [ %181, %183 ], [ %187, %185 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %186) #9
  %187 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %186, i64 1
  %188 = icmp eq ptr %187, %184
  br i1 %188, label %189, label %185

189:                                              ; preds = %185, %174
  store ptr %181, ptr %24, align 8, !tbaa !5
  %190 = load i32, ptr %6, align 4, !tbaa !10
  %191 = sext i32 %190 to i64
  %192 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %191, i64 12)
  %193 = extractvalue { i64, i1 } %192, 1
  %194 = extractvalue { i64, i1 } %192, 0
  %195 = select i1 %193, i64 -1, i64 %194
  %196 = call noalias noundef nonnull ptr @_Znam(i64 noundef %195) #10
  %197 = icmp eq i64 %191, 0
  br i1 %197, label %204, label %198

198:                                              ; preds = %189
  %199 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %196, i64 %191
  br label %200

200:                                              ; preds = %200, %198
  %201 = phi ptr [ %196, %198 ], [ %202, %200 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %201) #9
  %202 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %201, i64 1
  %203 = icmp eq ptr %202, %199
  br i1 %203, label %204, label %200

204:                                              ; preds = %200, %189
  store ptr %196, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  store i32 0, ptr %26, align 4, !tbaa !10
  br label %205

205:                                              ; preds = %219, %204
  %206 = load i32, ptr %26, align 4, !tbaa !10
  %207 = load i32, ptr %6, align 4, !tbaa !10
  %208 = icmp slt i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %222

210:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #9
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = call <2 x float> @_ZN3P3D6Import4readINS_6VectorIfLm2EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %211)
  %213 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %27, i32 0, i32 0
  %214 = getelementptr inbounds %union.anon.28, ptr %213, i32 0, i32 0
  store <2 x float> %212, ptr %214, align 4
  %215 = load ptr, ptr %23, align 8, !tbaa !5
  %216 = load i32, ptr %26, align 4, !tbaa !10
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %215, i64 %217
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %218, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #9
  br label %219

219:                                              ; preds = %210
  %220 = load i32, ptr %26, align 4, !tbaa !10
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %26, align 4, !tbaa !10
  br label %205, !llvm.loop !17

222:                                              ; preds = %209
  br label %223

223:                                              ; preds = %222, %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %224 = load i32, ptr %7, align 4, !tbaa !10
  %225 = sext i32 %224 to i64
  %226 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %225, i64 12)
  %227 = extractvalue { i64, i1 } %226, 1
  %228 = extractvalue { i64, i1 } %226, 0
  %229 = select i1 %227, i64 -1, i64 %228
  %230 = call noalias noundef nonnull ptr @_Znam(i64 noundef %229) #10
  store ptr %230, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  store i32 0, ptr %29, align 4, !tbaa !10
  br label %231

231:                                              ; preds = %502, %223
  %232 = load i32, ptr %29, align 4, !tbaa !10
  %233 = load i32, ptr %7, align 4, !tbaa !10
  %234 = icmp slt i32 %232, %233
  br i1 %234, label %236, label %235

235:                                              ; preds = %231
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  br label %505

236:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 12, ptr %30) #9
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = call { i64, i32 } @_ZN3P3D6Import4readINS_8TriangleEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %237)
  %239 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %240 = getelementptr inbounds %union.anon.35, ptr %239, i32 0, i32 0
  store { i64, i32 } %238, ptr %31, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %240, ptr align 8 %31, i64 12, i1 false)
  %241 = load ptr, ptr %28, align 8, !tbaa !5
  %242 = load i32, ptr %29, align 4, !tbaa !10
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds %"struct.P3D::Triangle", ptr %241, i64 %243
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %244, ptr align 4 %30, i64 12, i1 false), !tbaa.struct !12
  %245 = load i8, ptr %5, align 1, !tbaa !9
  %246 = sext i8 %245 to i32
  %247 = load i8, ptr %10, align 1, !tbaa !9
  %248 = sext i8 %247 to i32
  %249 = icmp eq i32 %246, %248
  br i1 %249, label %256, label %250

250:                                              ; preds = %236
  %251 = load i8, ptr %5, align 1, !tbaa !9
  %252 = sext i8 %251 to i32
  %253 = load i8, ptr %11, align 1, !tbaa !9
  %254 = sext i8 %253 to i32
  %255 = icmp eq i32 %252, %254
  br i1 %255, label %256, label %501

256:                                              ; preds = %250, %236
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #9
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #9
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %33) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #9
  %257 = load ptr, ptr %12, align 8, !tbaa !5
  %258 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %259 = getelementptr inbounds %struct.anon.36, ptr %258, i32 0, i32 1
  %260 = load i32, ptr %259, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %257, i64 %261
  %263 = load ptr, ptr %12, align 8, !tbaa !5
  %264 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %265 = getelementptr inbounds %struct.anon.36, ptr %264, i32 0, i32 0
  %266 = load i32, ptr %265, align 4, !tbaa !9
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %263, i64 %267
  %269 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %262, ptr noundef nonnull align 4 dereferenceable(12) %268) #9
  %270 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i32 0, i32 0
  %271 = getelementptr inbounds %union.anon.11, ptr %270, i32 0, i32 0
  store { <2 x float>, float } %269, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %271, ptr align 8 %35, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #9
  %272 = load ptr, ptr %12, align 8, !tbaa !5
  %273 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %274 = getelementptr inbounds %struct.anon.36, ptr %273, i32 0, i32 2
  %275 = load i32, ptr %274, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %272, i64 %276
  %278 = load ptr, ptr %12, align 8, !tbaa !5
  %279 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %280 = getelementptr inbounds %struct.anon.36, ptr %279, i32 0, i32 0
  %281 = load i32, ptr %280, align 4, !tbaa !9
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %278, i64 %282
  %284 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %277, ptr noundef nonnull align 4 dereferenceable(12) %283) #9
  %285 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %36, i32 0, i32 0
  %286 = getelementptr inbounds %union.anon.11, ptr %285, i32 0, i32 0
  store { <2 x float>, float } %284, ptr %37, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %286, ptr align 8 %37, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %287 = load ptr, ptr %23, align 8, !tbaa !5
  %288 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %289 = getelementptr inbounds %struct.anon.36, ptr %288, i32 0, i32 1
  %290 = load i32, ptr %289, align 4, !tbaa !9
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %287, i64 %291
  %293 = load ptr, ptr %23, align 8, !tbaa !5
  %294 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %295 = getelementptr inbounds %struct.anon.36, ptr %294, i32 0, i32 0
  %296 = load i32, ptr %295, align 4, !tbaa !9
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %293, i64 %297
  %299 = call <2 x float> @_ZN3P3DmiIffLm2EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(8) %292, ptr noundef nonnull align 4 dereferenceable(8) %298) #9
  %300 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %301 = getelementptr inbounds %union.anon.28, ptr %300, i32 0, i32 0
  store <2 x float> %299, ptr %301, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #9
  %302 = load ptr, ptr %23, align 8, !tbaa !5
  %303 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %304 = getelementptr inbounds %struct.anon.36, ptr %303, i32 0, i32 2
  %305 = load i32, ptr %304, align 4, !tbaa !9
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %302, i64 %306
  %308 = load ptr, ptr %23, align 8, !tbaa !5
  %309 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %310 = getelementptr inbounds %struct.anon.36, ptr %309, i32 0, i32 0
  %311 = load i32, ptr %310, align 4, !tbaa !9
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %308, i64 %312
  %314 = call <2 x float> @_ZN3P3DmiIffLm2EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(8) %307, ptr noundef nonnull align 4 dereferenceable(8) %313) #9
  %315 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %316 = getelementptr inbounds %union.anon.28, ptr %315, i32 0, i32 0
  store <2 x float> %314, ptr %316, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  %317 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %318 = getelementptr inbounds %struct.anon.29, ptr %317, i32 0, i32 0
  %319 = load float, ptr %318, align 4, !tbaa !9
  %320 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %321 = getelementptr inbounds %struct.anon.29, ptr %320, i32 0, i32 1
  %322 = load float, ptr %321, align 4, !tbaa !9
  %323 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %324 = getelementptr inbounds %struct.anon.29, ptr %323, i32 0, i32 0
  %325 = load float, ptr %324, align 4, !tbaa !9
  %326 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %327 = getelementptr inbounds %struct.anon.29, ptr %326, i32 0, i32 1
  %328 = load float, ptr %327, align 4, !tbaa !9
  %329 = fmul float %325, %328
  %330 = fneg float %329
  %331 = call float @llvm.fmuladd.f32(float %319, float %322, float %330)
  %332 = fdiv float 1.000000e+00, %331
  store float %332, ptr %40, align 4, !tbaa !18
  %333 = load float, ptr %40, align 4, !tbaa !18
  %334 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %335 = getelementptr inbounds %struct.anon.29, ptr %334, i32 0, i32 1
  %336 = load float, ptr %335, align 4, !tbaa !9
  %337 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i32 0, i32 0
  %338 = getelementptr inbounds %struct.anon.12, ptr %337, i32 0, i32 0
  %339 = load float, ptr %338, align 4, !tbaa !9
  %340 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %341 = getelementptr inbounds %struct.anon.29, ptr %340, i32 0, i32 1
  %342 = load float, ptr %341, align 4, !tbaa !9
  %343 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %36, i32 0, i32 0
  %344 = getelementptr inbounds %struct.anon.12, ptr %343, i32 0, i32 0
  %345 = load float, ptr %344, align 4, !tbaa !9
  %346 = fmul float %342, %345
  %347 = fneg float %346
  %348 = call float @llvm.fmuladd.f32(float %336, float %339, float %347)
  %349 = fmul float %333, %348
  %350 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %32, i32 0, i32 0
  %351 = getelementptr inbounds %struct.anon.12, ptr %350, i32 0, i32 0
  store float %349, ptr %351, align 4, !tbaa !9
  %352 = load float, ptr %40, align 4, !tbaa !18
  %353 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %354 = getelementptr inbounds %struct.anon.29, ptr %353, i32 0, i32 1
  %355 = load float, ptr %354, align 4, !tbaa !9
  %356 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i32 0, i32 0
  %357 = getelementptr inbounds %struct.anon.12, ptr %356, i32 0, i32 1
  %358 = load float, ptr %357, align 4, !tbaa !9
  %359 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %360 = getelementptr inbounds %struct.anon.29, ptr %359, i32 0, i32 1
  %361 = load float, ptr %360, align 4, !tbaa !9
  %362 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %36, i32 0, i32 0
  %363 = getelementptr inbounds %struct.anon.12, ptr %362, i32 0, i32 1
  %364 = load float, ptr %363, align 4, !tbaa !9
  %365 = fmul float %361, %364
  %366 = fneg float %365
  %367 = call float @llvm.fmuladd.f32(float %355, float %358, float %366)
  %368 = fmul float %352, %367
  %369 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %32, i32 0, i32 0
  %370 = getelementptr inbounds %struct.anon.12, ptr %369, i32 0, i32 1
  store float %368, ptr %370, align 4, !tbaa !9
  %371 = load float, ptr %40, align 4, !tbaa !18
  %372 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %373 = getelementptr inbounds %struct.anon.29, ptr %372, i32 0, i32 1
  %374 = load float, ptr %373, align 4, !tbaa !9
  %375 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i32 0, i32 0
  %376 = getelementptr inbounds %struct.anon.12, ptr %375, i32 0, i32 2
  %377 = load float, ptr %376, align 4, !tbaa !9
  %378 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %379 = getelementptr inbounds %struct.anon.29, ptr %378, i32 0, i32 1
  %380 = load float, ptr %379, align 4, !tbaa !9
  %381 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %36, i32 0, i32 0
  %382 = getelementptr inbounds %struct.anon.12, ptr %381, i32 0, i32 2
  %383 = load float, ptr %382, align 4, !tbaa !9
  %384 = fmul float %380, %383
  %385 = fneg float %384
  %386 = call float @llvm.fmuladd.f32(float %374, float %377, float %385)
  %387 = fmul float %371, %386
  %388 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %32, i32 0, i32 0
  %389 = getelementptr inbounds %struct.anon.12, ptr %388, i32 0, i32 2
  store float %387, ptr %389, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %41) #9
  %390 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %32) #9
  %391 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %41, i32 0, i32 0
  %392 = getelementptr inbounds %union.anon.11, ptr %391, i32 0, i32 0
  store { <2 x float>, float } %390, ptr %42, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %392, ptr align 8 %42, i64 12, i1 false)
  %393 = load ptr, ptr %24, align 8, !tbaa !5
  %394 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %395 = getelementptr inbounds %struct.anon.36, ptr %394, i32 0, i32 0
  %396 = load i32, ptr %395, align 4, !tbaa !9
  %397 = sext i32 %396 to i64
  %398 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %393, i64 %397
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %398, ptr align 4 %41, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %41) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #9
  %399 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %32) #9
  %400 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %43, i32 0, i32 0
  %401 = getelementptr inbounds %union.anon.11, ptr %400, i32 0, i32 0
  store { <2 x float>, float } %399, ptr %44, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %401, ptr align 8 %44, i64 12, i1 false)
  %402 = load ptr, ptr %24, align 8, !tbaa !5
  %403 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %404 = getelementptr inbounds %struct.anon.36, ptr %403, i32 0, i32 1
  %405 = load i32, ptr %404, align 4, !tbaa !9
  %406 = sext i32 %405 to i64
  %407 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %402, i64 %406
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %407, ptr align 4 %43, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %45) #9
  %408 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %32) #9
  %409 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %45, i32 0, i32 0
  %410 = getelementptr inbounds %union.anon.11, ptr %409, i32 0, i32 0
  store { <2 x float>, float } %408, ptr %46, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %410, ptr align 8 %46, i64 12, i1 false)
  %411 = load ptr, ptr %24, align 8, !tbaa !5
  %412 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %413 = getelementptr inbounds %struct.anon.36, ptr %412, i32 0, i32 2
  %414 = load i32, ptr %413, align 4, !tbaa !9
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %411, i64 %415
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %416, ptr align 4 %45, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #9
  %417 = load float, ptr %40, align 4, !tbaa !18
  %418 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %419 = getelementptr inbounds %struct.anon.29, ptr %418, i32 0, i32 0
  %420 = load float, ptr %419, align 4, !tbaa !9
  %421 = fneg float %420
  %422 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i32 0, i32 0
  %423 = getelementptr inbounds %struct.anon.12, ptr %422, i32 0, i32 0
  %424 = load float, ptr %423, align 4, !tbaa !9
  %425 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %426 = getelementptr inbounds %struct.anon.29, ptr %425, i32 0, i32 0
  %427 = load float, ptr %426, align 4, !tbaa !9
  %428 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %36, i32 0, i32 0
  %429 = getelementptr inbounds %struct.anon.12, ptr %428, i32 0, i32 0
  %430 = load float, ptr %429, align 4, !tbaa !9
  %431 = fmul float %427, %430
  %432 = call float @llvm.fmuladd.f32(float %421, float %424, float %431)
  %433 = fmul float %417, %432
  %434 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %33, i32 0, i32 0
  %435 = getelementptr inbounds %struct.anon.12, ptr %434, i32 0, i32 0
  store float %433, ptr %435, align 4, !tbaa !9
  %436 = load float, ptr %40, align 4, !tbaa !18
  %437 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %438 = getelementptr inbounds %struct.anon.29, ptr %437, i32 0, i32 0
  %439 = load float, ptr %438, align 4, !tbaa !9
  %440 = fneg float %439
  %441 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i32 0, i32 0
  %442 = getelementptr inbounds %struct.anon.12, ptr %441, i32 0, i32 1
  %443 = load float, ptr %442, align 4, !tbaa !9
  %444 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %445 = getelementptr inbounds %struct.anon.29, ptr %444, i32 0, i32 0
  %446 = load float, ptr %445, align 4, !tbaa !9
  %447 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %36, i32 0, i32 0
  %448 = getelementptr inbounds %struct.anon.12, ptr %447, i32 0, i32 1
  %449 = load float, ptr %448, align 4, !tbaa !9
  %450 = fmul float %446, %449
  %451 = call float @llvm.fmuladd.f32(float %440, float %443, float %450)
  %452 = fmul float %436, %451
  %453 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %33, i32 0, i32 0
  %454 = getelementptr inbounds %struct.anon.12, ptr %453, i32 0, i32 1
  store float %452, ptr %454, align 4, !tbaa !9
  %455 = load float, ptr %40, align 4, !tbaa !18
  %456 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %39, i32 0, i32 0
  %457 = getelementptr inbounds %struct.anon.29, ptr %456, i32 0, i32 0
  %458 = load float, ptr %457, align 4, !tbaa !9
  %459 = fneg float %458
  %460 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i32 0, i32 0
  %461 = getelementptr inbounds %struct.anon.12, ptr %460, i32 0, i32 2
  %462 = load float, ptr %461, align 4, !tbaa !9
  %463 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %38, i32 0, i32 0
  %464 = getelementptr inbounds %struct.anon.29, ptr %463, i32 0, i32 0
  %465 = load float, ptr %464, align 4, !tbaa !9
  %466 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %36, i32 0, i32 0
  %467 = getelementptr inbounds %struct.anon.12, ptr %466, i32 0, i32 2
  %468 = load float, ptr %467, align 4, !tbaa !9
  %469 = fmul float %465, %468
  %470 = call float @llvm.fmuladd.f32(float %459, float %462, float %469)
  %471 = fmul float %455, %470
  %472 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %33, i32 0, i32 0
  %473 = getelementptr inbounds %struct.anon.12, ptr %472, i32 0, i32 2
  store float %471, ptr %473, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %47) #9
  %474 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %33) #9
  %475 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %47, i32 0, i32 0
  %476 = getelementptr inbounds %union.anon.11, ptr %475, i32 0, i32 0
  store { <2 x float>, float } %474, ptr %48, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %476, ptr align 8 %48, i64 12, i1 false)
  %477 = load ptr, ptr %25, align 8, !tbaa !5
  %478 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %479 = getelementptr inbounds %struct.anon.36, ptr %478, i32 0, i32 0
  %480 = load i32, ptr %479, align 4, !tbaa !9
  %481 = sext i32 %480 to i64
  %482 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %477, i64 %481
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %482, ptr align 4 %47, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #9
  %483 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %33) #9
  %484 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %49, i32 0, i32 0
  %485 = getelementptr inbounds %union.anon.11, ptr %484, i32 0, i32 0
  store { <2 x float>, float } %483, ptr %50, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %485, ptr align 8 %50, i64 12, i1 false)
  %486 = load ptr, ptr %25, align 8, !tbaa !5
  %487 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %488 = getelementptr inbounds %struct.anon.36, ptr %487, i32 0, i32 1
  %489 = load i32, ptr %488, align 4, !tbaa !9
  %490 = sext i32 %489 to i64
  %491 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %486, i64 %490
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %491, ptr align 4 %49, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %51) #9
  %492 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %33) #9
  %493 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %51, i32 0, i32 0
  %494 = getelementptr inbounds %union.anon.11, ptr %493, i32 0, i32 0
  store { <2 x float>, float } %492, ptr %52, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %494, ptr align 8 %52, i64 12, i1 false)
  %495 = load ptr, ptr %25, align 8, !tbaa !5
  %496 = getelementptr inbounds %"struct.P3D::Triangle", ptr %30, i32 0, i32 0
  %497 = getelementptr inbounds %struct.anon.36, ptr %496, i32 0, i32 2
  %498 = load i32, ptr %497, align 4, !tbaa !9
  %499 = sext i32 %498 to i64
  %500 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %495, i64 %499
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %500, ptr align 4 %51, i64 12, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #9
  br label %501

501:                                              ; preds = %256, %250
  call void @llvm.lifetime.end.p0(i64 12, ptr %30) #9
  br label %502

502:                                              ; preds = %501
  %503 = load i32, ptr %29, align 4, !tbaa !10
  %504 = add nsw i32 %503, 1
  store i32 %504, ptr %29, align 4, !tbaa !10
  br label %231, !llvm.loop !20

505:                                              ; preds = %235
  store i1 false, ptr %53, align 1
  %506 = load ptr, ptr %12, align 8, !tbaa !5
  %507 = load i32, ptr %6, align 4, !tbaa !10
  %508 = load ptr, ptr %28, align 8, !tbaa !5
  %509 = load i32, ptr %7, align 4, !tbaa !10
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshC2EPKNS_6VectorIfLm3EEEiPKNS_8TriangleEi(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %506, i32 noundef %507, ptr noundef %508, i32 noundef %509)
  call void @llvm.lifetime.start.p0(i64 16, ptr %54) #9
  %510 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef %510)
          to label %511 unwind label %523

511:                                              ; preds = %505
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMesh15setNormalBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %54)
          to label %512 unwind label %527

512:                                              ; preds = %511
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %54) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %57) #9
  %513 = load ptr, ptr %23, align 8, !tbaa !5
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm2EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef %513)
          to label %514 unwind label %532

514:                                              ; preds = %512
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMesh11setUVBufferERKSt10shared_ptrIA_KNS_6VectorIfLm2EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %57)
          to label %515 unwind label %536

515:                                              ; preds = %514
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %57) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %58) #9
  %516 = load ptr, ptr %24, align 8, !tbaa !5
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %58, ptr noundef %516)
          to label %517 unwind label %541

517:                                              ; preds = %515
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMesh16setTangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %58)
          to label %518 unwind label %545

518:                                              ; preds = %517
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %58) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %59) #9
  %519 = load ptr, ptr %25, align 8, !tbaa !5
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef %519)
          to label %520 unwind label %550

520:                                              ; preds = %518
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMesh18setBitangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %59)
          to label %521 unwind label %554

521:                                              ; preds = %520
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %59) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #9
  store i1 true, ptr %53, align 1
  %522 = load i1, ptr %53, align 1
  br i1 %522, label %560, label %559

523:                                              ; preds = %505
  %524 = landingpad { ptr, i32 }
          cleanup
  %525 = extractvalue { ptr, i32 } %524, 0
  store ptr %525, ptr %55, align 8
  %526 = extractvalue { ptr, i32 } %524, 1
  store i32 %526, ptr %56, align 4
  br label %531

527:                                              ; preds = %511
  %528 = landingpad { ptr, i32 }
          cleanup
  %529 = extractvalue { ptr, i32 } %528, 0
  store ptr %529, ptr %55, align 8
  %530 = extractvalue { ptr, i32 } %528, 1
  store i32 %530, ptr %56, align 4
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %54) #9
  br label %531

531:                                              ; preds = %527, %523
  call void @llvm.lifetime.end.p0(i64 16, ptr %54) #9
  br label %561

532:                                              ; preds = %512
  %533 = landingpad { ptr, i32 }
          cleanup
  %534 = extractvalue { ptr, i32 } %533, 0
  store ptr %534, ptr %55, align 8
  %535 = extractvalue { ptr, i32 } %533, 1
  store i32 %535, ptr %56, align 4
  br label %540

536:                                              ; preds = %514
  %537 = landingpad { ptr, i32 }
          cleanup
  %538 = extractvalue { ptr, i32 } %537, 0
  store ptr %538, ptr %55, align 8
  %539 = extractvalue { ptr, i32 } %537, 1
  store i32 %539, ptr %56, align 4
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %57) #9
  br label %540

540:                                              ; preds = %536, %532
  call void @llvm.lifetime.end.p0(i64 16, ptr %57) #9
  br label %561

541:                                              ; preds = %515
  %542 = landingpad { ptr, i32 }
          cleanup
  %543 = extractvalue { ptr, i32 } %542, 0
  store ptr %543, ptr %55, align 8
  %544 = extractvalue { ptr, i32 } %542, 1
  store i32 %544, ptr %56, align 4
  br label %549

545:                                              ; preds = %517
  %546 = landingpad { ptr, i32 }
          cleanup
  %547 = extractvalue { ptr, i32 } %546, 0
  store ptr %547, ptr %55, align 8
  %548 = extractvalue { ptr, i32 } %546, 1
  store i32 %548, ptr %56, align 4
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %58) #9
  br label %549

549:                                              ; preds = %545, %541
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #9
  br label %561

550:                                              ; preds = %518
  %551 = landingpad { ptr, i32 }
          cleanup
  %552 = extractvalue { ptr, i32 } %551, 0
  store ptr %552, ptr %55, align 8
  %553 = extractvalue { ptr, i32 } %551, 1
  store i32 %553, ptr %56, align 4
  br label %558

554:                                              ; preds = %520
  %555 = landingpad { ptr, i32 }
          cleanup
  %556 = extractvalue { ptr, i32 } %555, 0
  store ptr %556, ptr %55, align 8
  %557 = extractvalue { ptr, i32 } %555, 1
  store i32 %557, ptr %56, align 4
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %59) #9
  br label %558

558:                                              ; preds = %554, %550
  call void @llvm.lifetime.end.p0(i64 16, ptr %59) #9
  br label %561

559:                                              ; preds = %521
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #9
  br label %560

560:                                              ; preds = %559, %521
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  ret void

561:                                              ; preds = %558, %549, %540, %531
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  br label %562

562:                                              ; preds = %561
  %563 = load ptr, ptr %55, align 8
  %564 = load i32, ptr %56, align 4
  %565 = insertvalue { ptr, i32 } poison, ptr %563, 0
  %566 = insertvalue { ptr, i32 } %565, i32 %564, 1
  resume { ptr, i32 } %566
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZN3P3D6Import4readIcEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3P3D6Import4readIiEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) #6

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3P3D6Import4readINS_6VectorIfLm3EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 4 dereferenceable(12)) #1 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 uwtable
declare dso_local <2 x float> @_ZN3P3D6Import4readINS_6VectorIfLm2EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) #8

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZN3P3D6Import4readINS_8TriangleEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) #6

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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"="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 #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 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{i64 0, i64 12, !9}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{i64 0, i64 8, !9}
!17 = distinct !{!17, !14}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = distinct !{!20, !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::Graphics::ExtendedTriangleMesh" = type { %"class.P3D::TriangleMesh", %"class.std::shared_ptr", %"class.std::shared_ptr.14", %"class.std::shared_ptr", %"class.std::shared_ptr" }
%"class.P3D::TriangleMesh" = type { %"class.P3D::MeshPrototype" }
%"class.P3D::MeshPrototype" = type { %"class.P3D::UniqueAlignedPointer", %"class.P3D::UniqueAlignedPointer.13", i32, i32 }
%"class.P3D::UniqueAlignedPointer" = type { ptr }
%"class.P3D::UniqueAlignedPointer.13" = type { ptr }
%"class.std::shared_ptr.14" = type { %"class.std::__shared_ptr.15" }
%"class.std::__shared_ptr.15" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"struct.P3D::Vector" = type { %union.anon.0 }
%union.anon.0 = type { [3 x double] }
%"struct.P3D::Vector.10" = type { %union.anon.11 }
%union.anon.11 = type { [3 x float] }
%"struct.P3D::Vector.27" = type { %union.anon.28 }
%union.anon.28 = type { [2 x float] }
%"struct.P3D::Triangle" = type { %union.anon.35 }
%union.anon.35 = type { %struct.anon.36 }
%struct.anon.36 = type { i32, i32, i32 }

; 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

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6VectorIfLm2EEC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) 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> @_ZN3P3DmiIffLm2EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4

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

; 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 #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMeshC2EPKNS_6VectorIfLm3EEEiPKNS_8TriangleEi(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef, i32 noundef, ptr noundef, i32 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh15setNormalBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh11setUVBufferERKSt10shared_ptrIA_KNS_6VectorIfLm2EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm2EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh16setTangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics20ExtendedTriangleMesh18setBitangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D13loadBinaryObjERSi(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::ExtendedTriangleMesh") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #7 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.P3D::Vector", align 8
  %4 = alloca %"struct.P3D::Vector.10", align 8
  %5 = alloca %"struct.P3D::Vector.10", align 8
  %6 = alloca %"struct.P3D::Vector.10", align 8
  %7 = alloca %"class.std::shared_ptr", align 8
  %8 = alloca %"class.std::shared_ptr.14", align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = tail call noundef signext i8 @_ZN3P3D6Import4readIcEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %12 = tail call noundef i32 @_ZN3P3D6Import4readIiEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %13 = tail call noundef i32 @_ZN3P3D6Import4readIiEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %14 = sext i32 %12 to i64
  %15 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %14, i64 12)
  %16 = extractvalue { i64, i1 } %15, 1
  %17 = extractvalue { i64, i1 } %15, 0
  %18 = select i1 %16, i64 -1, i64 %17
  %19 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #9
  %20 = icmp eq i32 %12, 0
  br i1 %20, label %._crit_edge, label %21

21:                                               ; preds = %2
  %22 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %19, i64 %14
  br label %23

23:                                               ; preds = %23, %21
  %24 = phi ptr [ %19, %21 ], [ %25, %23 ]
  tail call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #10
  %25 = getelementptr inbounds i8, ptr %24, i64 12
  %26 = icmp eq ptr %25, %22
  br i1 %26, label %.loopexit212, label %23

.loopexit212:                                     ; preds = %23
  %27 = icmp sgt i32 %12, 0
  br i1 %27, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.loopexit212
  %.sroa.2148.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %wide.trip.count = zext nneg i32 %12 to i64
  br label %29

._crit_edge:                                      ; preds = %29, %2, %.loopexit212
  %28 = phi i1 [ false, %.loopexit212 ], [ false, %2 ], [ %27, %29 ]
  switch i8 %11, label %.loopexit210 [
    i8 1, label %33
    i8 3, label %33
  ]

29:                                               ; preds = %.lr.ph, %29
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %29 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #10
  %30 = call { <2 x float>, float } @_ZN3P3D6Import4readINS_6VectorIfLm3EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %.fca.0.extract145 = extractvalue { <2 x float>, float } %30, 0
  %.fca.1.extract146 = extractvalue { <2 x float>, float } %30, 1
  store <2 x float> %.fca.0.extract145, ptr %4, align 8
  store float %.fca.1.extract146, ptr %.sroa.2148.0..sroa_idx, align 8
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %3, ptr noundef nonnull align 4 dereferenceable(12) %4) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #10
  %31 = call { <2 x float>, float } @_ZNK3P3D6VectorIdLm3EEcvNS0_IT_Lm3EEEIfEEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #10
  %.fca.0.extract139 = extractvalue { <2 x float>, float } %31, 0
  %.fca.1.extract140 = extractvalue { <2 x float>, float } %31, 1
  %32 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %19, i64 %indvars.iv
  store <2 x float> %.fca.0.extract139, ptr %32, align 4
  %.sroa.4144.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 8
  store float %.fca.1.extract140, ptr %.sroa.4144.0..sroa_idx, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #10
  %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, label %29, !llvm.loop !8

33:                                               ; preds = %._crit_edge, %._crit_edge
  %34 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #9
  br i1 %20, label %.loopexit211, label %35

35:                                               ; preds = %33
  %36 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i64 %14
  br label %37

37:                                               ; preds = %37, %35
  %38 = phi ptr [ %34, %35 ], [ %39, %37 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %38) #10
  %39 = getelementptr inbounds i8, ptr %38, i64 12
  %40 = icmp eq ptr %39, %36
  br i1 %40, label %.loopexit211, label %37

.loopexit211:                                     ; preds = %37, %33
  br i1 %28, label %.lr.ph216.preheader, label %.loopexit210

.lr.ph216.preheader:                              ; preds = %.loopexit211
  %wide.trip.count229 = zext nneg i32 %12 to i64
  br label %.lr.ph216

.lr.ph216:                                        ; preds = %.lr.ph216.preheader, %.lr.ph216
  %indvars.iv226 = phi i64 [ 0, %.lr.ph216.preheader ], [ %indvars.iv.next227, %.lr.ph216 ]
  %41 = call { <2 x float>, float } @_ZN3P3D6Import4readINS_6VectorIfLm3EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %.fca.0.extract128 = extractvalue { <2 x float>, float } %41, 0
  %.fca.1.extract129 = extractvalue { <2 x float>, float } %41, 1
  %42 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %34, i64 %indvars.iv226
  store <2 x float> %.fca.0.extract128, ptr %42, align 4
  %.sroa.4133.0..sroa_idx = getelementptr inbounds i8, ptr %42, i64 8
  store float %.fca.1.extract129, ptr %.sroa.4133.0..sroa_idx, align 4, !tbaa !5
  %indvars.iv.next227 = add nuw nsw i64 %indvars.iv226, 1
  %exitcond230.not = icmp eq i64 %indvars.iv.next227, %wide.trip.count229
  br i1 %exitcond230.not, label %.loopexit210, label %.lr.ph216, !llvm.loop !10

.loopexit210:                                     ; preds = %.lr.ph216, %.loopexit211, %._crit_edge
  %.0191 = phi ptr [ null, %._crit_edge ], [ %34, %.loopexit211 ], [ %34, %.lr.ph216 ]
  %43 = and i8 %11, -2
  %switch = icmp eq i8 %43, 2
  br i1 %switch, label %44, label %.loopexit

44:                                               ; preds = %.loopexit210
  %45 = icmp slt i32 %12, 0
  %46 = shl nsw i64 %14, 3
  %47 = select i1 %45, i64 -1, i64 %46
  %48 = call noalias noundef nonnull ptr @_Znam(i64 noundef %47) #9
  br i1 %20, label %.thread, label %51

.thread:                                          ; preds = %44
  %49 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #9
  %50 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #9
  br label %.loopexit209

51:                                               ; preds = %44
  %52 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %48, i64 %14
  br label %53

53:                                               ; preds = %53, %51
  %54 = phi ptr [ %48, %51 ], [ %55, %53 ]
  call void @_ZN3P3D6VectorIfLm2EEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %54) #10
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = icmp eq ptr %55, %52
  br i1 %56, label %57, label %53

57:                                               ; preds = %53
  %58 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #9
  %59 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %58, i64 %14
  br label %60

60:                                               ; preds = %60, %57
  %61 = phi ptr [ %58, %57 ], [ %62, %60 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %61) #10
  %62 = getelementptr inbounds i8, ptr %61, i64 12
  %63 = icmp eq ptr %62, %59
  br i1 %63, label %64, label %60

64:                                               ; preds = %60
  %65 = call noalias noundef nonnull ptr @_Znam(i64 noundef %18) #9
  %66 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %65, i64 %14
  br label %67

67:                                               ; preds = %67, %64
  %68 = phi ptr [ %65, %64 ], [ %69, %67 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %68) #10
  %69 = getelementptr inbounds i8, ptr %68, i64 12
  %70 = icmp eq ptr %69, %66
  br i1 %70, label %.loopexit209, label %67

.loopexit209:                                     ; preds = %67, %.thread
  %71 = phi ptr [ %50, %.thread ], [ %65, %67 ]
  %72 = phi ptr [ %49, %.thread ], [ %58, %67 ]
  br i1 %28, label %.lr.ph219.preheader, label %.loopexit

.lr.ph219.preheader:                              ; preds = %.loopexit209
  %wide.trip.count234 = zext nneg i32 %12 to i64
  br label %.lr.ph219

.lr.ph219:                                        ; preds = %.lr.ph219.preheader, %.lr.ph219
  %indvars.iv231 = phi i64 [ 0, %.lr.ph219.preheader ], [ %indvars.iv.next232, %.lr.ph219 ]
  %73 = call <2 x float> @_ZN3P3D6Import4readINS_6VectorIfLm2EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %74 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %48, i64 %indvars.iv231
  store <2 x float> %73, ptr %74, align 4, !tbaa !5
  %indvars.iv.next232 = add nuw nsw i64 %indvars.iv231, 1
  %exitcond235.not = icmp eq i64 %indvars.iv.next232, %wide.trip.count234
  br i1 %exitcond235.not, label %.loopexit, label %.lr.ph219, !llvm.loop !11

.loopexit:                                        ; preds = %.lr.ph219, %.loopexit209, %.loopexit210
  %.0195 = phi ptr [ null, %.loopexit210 ], [ %71, %.loopexit209 ], [ %71, %.lr.ph219 ]
  %.0194 = phi ptr [ null, %.loopexit210 ], [ %72, %.loopexit209 ], [ %72, %.lr.ph219 ]
  %.0193 = phi ptr [ null, %.loopexit210 ], [ %48, %.loopexit209 ], [ %48, %.lr.ph219 ]
  %75 = sext i32 %13 to i64
  %76 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %75, i64 12)
  %77 = extractvalue { i64, i1 } %76, 1
  %78 = extractvalue { i64, i1 } %76, 0
  %79 = select i1 %77, i64 -1, i64 %78
  %80 = call noalias noundef nonnull ptr @_Znam(i64 noundef %79) #9
  %81 = icmp sgt i32 %13, 0
  br i1 %81, label %.lr.ph222, label %._crit_edge223

.lr.ph222:                                        ; preds = %.loopexit
  %82 = getelementptr inbounds i8, ptr %5, i64 8
  %83 = getelementptr inbounds i8, ptr %6, i64 8
  %wide.trip.count244 = zext nneg i32 %13 to i64
  br i1 %switch, label %.lr.ph222.split.us, label %.lr.ph222.split

.lr.ph222.split.us:                               ; preds = %.lr.ph222, %.lr.ph222.split.us
  %indvars.iv241 = phi i64 [ %indvars.iv.next242, %.lr.ph222.split.us ], [ 0, %.lr.ph222 ]
  %84 = call { i64, i32 } @_ZN3P3D6Import4readINS_8TriangleEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %.fca.0.extract86.us = extractvalue { i64, i32 } %84, 0
  %.fca.1.extract87.us = extractvalue { i64, i32 } %84, 1
  %85 = getelementptr inbounds %"struct.P3D::Triangle", ptr %80, i64 %indvars.iv241
  store i64 %.fca.0.extract86.us, ptr %85, align 4
  %.sroa.14.0..sroa_idx.us = getelementptr inbounds i8, ptr %85, i64 8
  store i32 %.fca.1.extract87.us, ptr %.sroa.14.0..sroa_idx.us, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #10
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #10
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #10
  %86 = ashr i64 %.fca.0.extract86.us, 32
  %87 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %19, i64 %86
  %sext.us = shl i64 %.fca.0.extract86.us, 32
  %88 = ashr exact i64 %sext.us, 32
  %89 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %19, i64 %88
  %90 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %87, ptr noundef nonnull align 4 dereferenceable(12) %89) #10
  %.fca.0.extract75.us = extractvalue { <2 x float>, float } %90, 0
  %.fca.1.extract76.us = extractvalue { <2 x float>, float } %90, 1
  %91 = sext i32 %.fca.1.extract87.us to i64
  %92 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %19, i64 %91
  %93 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %92, ptr noundef nonnull align 4 dereferenceable(12) %89) #10
  %.fca.0.extract65.us = extractvalue { <2 x float>, float } %93, 0
  %.fca.1.extract66.us = extractvalue { <2 x float>, float } %93, 1
  %94 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %.0193, i64 %86
  %95 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %.0193, i64 %88
  %96 = call <2 x float> @_ZN3P3DmiIffLm2EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(8) %94, ptr noundef nonnull align 4 dereferenceable(8) %95) #10
  %97 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %.0193, i64 %91
  %98 = call <2 x float> @_ZN3P3DmiIffLm2EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(8) %97, ptr noundef nonnull align 4 dereferenceable(8) %95) #10
  %.sroa.052.0.vec.extract.us = extractelement <2 x float> %96, i64 0
  %.sroa.039.4.vec.extract.us = extractelement <2 x float> %98, i64 1
  %.sroa.039.0.vec.extract.us = extractelement <2 x float> %98, i64 0
  %.sroa.052.4.vec.extract.us = extractelement <2 x float> %96, i64 1
  %99 = fneg float %.sroa.039.0.vec.extract.us
  %100 = fmul float %.sroa.052.4.vec.extract.us, %99
  %101 = call float @llvm.fmuladd.f32(float %.sroa.052.0.vec.extract.us, float %.sroa.039.4.vec.extract.us, float %100)
  %102 = fdiv float 1.000000e+00, %101
  %103 = fneg float %.sroa.052.4.vec.extract.us
  %104 = insertelement <2 x float> poison, float %103, i64 0
  %105 = shufflevector <2 x float> %104, <2 x float> poison, <2 x i32> zeroinitializer
  %106 = fmul <2 x float> %.fca.0.extract65.us, %105
  %107 = shufflevector <2 x float> %98, <2 x float> poison, <2 x i32> <i32 1, i32 1>
  %108 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %107, <2 x float> %.fca.0.extract75.us, <2 x float> %106)
  %109 = insertelement <2 x float> poison, float %102, i64 0
  %110 = shufflevector <2 x float> %109, <2 x float> poison, <2 x i32> zeroinitializer
  %111 = fmul <2 x float> %108, %110
  store <2 x float> %111, ptr %5, align 8, !tbaa !5
  %112 = fmul float %.fca.1.extract66.us, %103
  %113 = call float @llvm.fmuladd.f32(float %.sroa.039.4.vec.extract.us, float %.fca.1.extract76.us, float %112)
  %114 = fmul float %113, %102
  store float %114, ptr %82, align 8, !tbaa !5
  %115 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %5) #10
  %.fca.0.extract27.us = extractvalue { <2 x float>, float } %115, 0
  %.fca.1.extract28.us = extractvalue { <2 x float>, float } %115, 1
  %116 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %.0194, i64 %88
  store <2 x float> %.fca.0.extract27.us, ptr %116, align 4
  %.sroa.432.0..sroa_idx.us = getelementptr inbounds i8, ptr %116, i64 8
  store float %.fca.1.extract28.us, ptr %.sroa.432.0..sroa_idx.us, align 4, !tbaa !5
  %117 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %5) #10
  %.fca.0.extract21.us = extractvalue { <2 x float>, float } %117, 0
  %.fca.1.extract22.us = extractvalue { <2 x float>, float } %117, 1
  %118 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %.0194, i64 %86
  store <2 x float> %.fca.0.extract21.us, ptr %118, align 4
  %.sroa.426.0..sroa_idx.us = getelementptr inbounds i8, ptr %118, i64 8
  store float %.fca.1.extract22.us, ptr %.sroa.426.0..sroa_idx.us, align 4, !tbaa !5
  %119 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %5) #10
  %.fca.0.extract15.us = extractvalue { <2 x float>, float } %119, 0
  %.fca.1.extract16.us = extractvalue { <2 x float>, float } %119, 1
  %120 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %.0194, i64 %91
  store <2 x float> %.fca.0.extract15.us, ptr %120, align 4
  %.sroa.420.0..sroa_idx.us = getelementptr inbounds i8, ptr %120, i64 8
  store float %.fca.1.extract16.us, ptr %.sroa.420.0..sroa_idx.us, align 4, !tbaa !5
  %121 = shufflevector <2 x float> %96, <2 x float> poison, <2 x i32> zeroinitializer
  %122 = fmul <2 x float> %121, %.fca.0.extract65.us
  %123 = insertelement <2 x float> poison, float %99, i64 0
  %124 = shufflevector <2 x float> %123, <2 x float> poison, <2 x i32> zeroinitializer
  %125 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %124, <2 x float> %.fca.0.extract75.us, <2 x float> %122)
  %126 = fmul <2 x float> %125, %110
  store <2 x float> %126, ptr %6, align 8, !tbaa !5
  %127 = fmul float %.fca.1.extract66.us, %.sroa.052.0.vec.extract.us
  %128 = call float @llvm.fmuladd.f32(float %99, float %.fca.1.extract76.us, float %127)
  %129 = fmul float %128, %102
  store float %129, ptr %83, align 8, !tbaa !5
  %130 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %6) #10
  %.fca.0.extract9.us = extractvalue { <2 x float>, float } %130, 0
  %.fca.1.extract10.us = extractvalue { <2 x float>, float } %130, 1
  %131 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %.0195, i64 %88
  store <2 x float> %.fca.0.extract9.us, ptr %131, align 4
  %.sroa.414.0..sroa_idx.us = getelementptr inbounds i8, ptr %131, i64 8
  store float %.fca.1.extract10.us, ptr %.sroa.414.0..sroa_idx.us, align 4, !tbaa !5
  %132 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %6) #10
  %.fca.0.extract3.us = extractvalue { <2 x float>, float } %132, 0
  %.fca.1.extract4.us = extractvalue { <2 x float>, float } %132, 1
  %133 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %.0195, i64 %86
  store <2 x float> %.fca.0.extract3.us, ptr %133, align 4
  %.sroa.48.0..sroa_idx.us = getelementptr inbounds i8, ptr %133, i64 8
  store float %.fca.1.extract4.us, ptr %.sroa.48.0..sroa_idx.us, align 4, !tbaa !5
  %134 = call { <2 x float>, float } @_ZN3P3D9normalizeIfLm3EEENS_6VectorIT_XT0_EEERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %6) #10
  %.fca.0.extract.us = extractvalue { <2 x float>, float } %134, 0
  %.fca.1.extract.us = extractvalue { <2 x float>, float } %134, 1
  %135 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %.0195, i64 %91
  store <2 x float> %.fca.0.extract.us, ptr %135, align 4
  %.sroa.4.0..sroa_idx.us = getelementptr inbounds i8, ptr %135, i64 8
  store float %.fca.1.extract.us, ptr %.sroa.4.0..sroa_idx.us, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #10
  %indvars.iv.next242 = add nuw nsw i64 %indvars.iv241, 1
  %exitcond245.not = icmp eq i64 %indvars.iv.next242, %wide.trip.count244
  br i1 %exitcond245.not, label %._crit_edge223, label %.lr.ph222.split.us, !llvm.loop !12

._crit_edge223:                                   ; preds = %.lr.ph222.split, %.lr.ph222.split.us, %.loopexit
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshC2EPKNS_6VectorIfLm3EEEiPKNS_8TriangleEi(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull %19, i32 noundef %12, ptr noundef nonnull %80, i32 noundef %13)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #10
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef %.0191)
          to label %138 unwind label %142

.lr.ph222.split:                                  ; preds = %.lr.ph222, %.lr.ph222.split
  %indvars.iv236 = phi i64 [ %indvars.iv.next237, %.lr.ph222.split ], [ 0, %.lr.ph222 ]
  %136 = call { i64, i32 } @_ZN3P3D6Import4readINS_8TriangleEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %.fca.0.extract86 = extractvalue { i64, i32 } %136, 0
  %.fca.1.extract87 = extractvalue { i64, i32 } %136, 1
  %137 = getelementptr inbounds %"struct.P3D::Triangle", ptr %80, i64 %indvars.iv236
  store i64 %.fca.0.extract86, ptr %137, align 4
  %.sroa.14.0..sroa_idx = getelementptr inbounds i8, ptr %137, i64 8
  store i32 %.fca.1.extract87, ptr %.sroa.14.0..sroa_idx, align 4, !tbaa !5
  %indvars.iv.next237 = add nuw nsw i64 %indvars.iv236, 1
  %exitcond240.not = icmp eq i64 %indvars.iv.next237, %wide.trip.count244
  br i1 %exitcond240.not, label %._crit_edge223, label %.lr.ph222.split, !llvm.loop !12

138:                                              ; preds = %._crit_edge223
  call void @_ZN3P3D8Graphics20ExtendedTriangleMesh15setNormalBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #10
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm2EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %.0193)
          to label %139 unwind label %144

139:                                              ; preds = %138
  call void @_ZN3P3D8Graphics20ExtendedTriangleMesh11setUVBufferERKSt10shared_ptrIA_KNS_6VectorIfLm2EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %.0194)
          to label %140 unwind label %146

140:                                              ; preds = %139
  call void @_ZN3P3D8Graphics20ExtendedTriangleMesh16setTangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %.0195)
          to label %141 unwind label %148

141:                                              ; preds = %140
  call void @_ZN3P3D8Graphics20ExtendedTriangleMesh18setBitangentBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %10)
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  ret void

142:                                              ; preds = %._crit_edge223
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  br label %150

144:                                              ; preds = %138
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #10
  br label %150

146:                                              ; preds = %139
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  br label %150

148:                                              ; preds = %140
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  br label %150

150:                                              ; preds = %148, %146, %144, %142
  %.pn = phi { ptr, i32 } [ %149, %148 ], [ %147, %146 ], [ %145, %144 ], [ %143, %142 ]
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #10
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef signext i8 @_ZN3P3D6Import4readIcEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3P3D6Import4readIiEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3P3D6Import4readINS_6VectorIfLm3EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 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 uwtable
declare dso_local <2 x float> @_ZN3P3D6Import4readINS_6VectorIfLm2EEEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZN3P3D6Import4readINS_8TriangleEEET_RSi(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #8

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 nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 #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 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}
!11 = distinct !{!11, !9}
!12 = distinct !{!12, !9}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass