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

; 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" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%class.anon = type { ptr }
%"struct.P3D::Triangle" = type { %union.anon.35 }
%union.anon.35 = type { %struct.anon.36 }
%struct.anon.36 = type { i32, i32, i32 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.P3D::Face" = type { [3 x %"struct.P3D::Vertex"] }
%"struct.P3D::Vertex" = type { i32, %"class.std::optional", %"class.std::optional" }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<int>::_Storage", i8 }>
%"union.std::_Optional_payload_base<int>::_Storage" = type { i32 }
%"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] }

; 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 noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm2EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; 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 noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(60) ptr @_ZNKSt6vectorIN3P3D4FaceESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIiE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

; 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)) #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)) #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: 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 @_ZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::ExtendedTriangleMesh") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #5 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::unordered_map", align 8
  %12 = alloca %class.anon, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.P3D::Triangle", align 4
  %25 = alloca i64, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %31 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca i1, align 1
  %36 = alloca %"class.std::shared_ptr", align 8
  %37 = alloca %"class.std::shared_ptr.14", align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %11) #8
  call void @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %38 = getelementptr inbounds %class.anon, ptr %12, i32 0, i32 0
  store ptr %11, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = call noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #8
  %41 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %40, i64 12)
  %42 = extractvalue { i64, i1 } %41, 1
  %43 = extractvalue { i64, i1 } %41, 0
  %44 = select i1 %42, i64 -1, i64 %43
  %45 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %44) #9
          to label %46 unwind label %53

46:                                               ; preds = %5
  store ptr %45, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %89, %46
  %48 = load i64, ptr %16, align 8, !tbaa !9
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = call noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #8
  %51 = icmp ult i64 %48, %50
  br i1 %51, label %57, label %52

52:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %106

53:                                               ; preds = %5
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %14, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %15, align 4
  br label %283

57:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = load i64, ptr %16, align 8, !tbaa !9
  %60 = call noundef nonnull align 4 dereferenceable(60) ptr @_ZNKSt6vectorIN3P3D4FaceESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %59) #8
  store ptr %60, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %61 = load ptr, ptr %17, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.P3D::Face", ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds [3 x %"struct.P3D::Vertex"], ptr %62, i64 0, i64 0
  store ptr %63, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %64 = load ptr, ptr %17, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.P3D::Face", ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds [3 x %"struct.P3D::Vertex"], ptr %65, i64 0, i64 1
  store ptr %66, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %67 = load ptr, ptr %17, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.P3D::Face", ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds [3 x %"struct.P3D::Vertex"], ptr %68, i64 0, i64 2
  store ptr %69, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %70 = load ptr, ptr %18, align 8, !tbaa !5
  %71 = invoke noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(20) %70)
          to label %72 unwind label %92

72:                                               ; preds = %57
  store i32 %71, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %73 = load ptr, ptr %19, align 8, !tbaa !5
  %74 = invoke noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(20) %73)
          to label %75 unwind label %96

75:                                               ; preds = %72
  store i32 %74, ptr %22, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %76 = load ptr, ptr %20, align 8, !tbaa !5
  %77 = invoke noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(20) %76)
          to label %78 unwind label %100

78:                                               ; preds = %75
  store i32 %77, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #8
  %79 = getelementptr inbounds %"struct.P3D::Triangle", ptr %24, i32 0, i32 0
  %80 = getelementptr inbounds %struct.anon.36, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %81, ptr %80, align 4, !tbaa !13
  %82 = getelementptr inbounds %struct.anon.36, ptr %79, i32 0, i32 1
  %83 = load i32, ptr %22, align 4, !tbaa !11
  store i32 %83, ptr %82, align 4, !tbaa !15
  %84 = getelementptr inbounds %struct.anon.36, ptr %79, i32 0, i32 2
  %85 = load i32, ptr %23, align 4, !tbaa !11
  store i32 %85, ptr %84, align 4, !tbaa !16
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = load i64, ptr %16, align 8, !tbaa !9
  %88 = getelementptr inbounds %"struct.P3D::Triangle", ptr %86, i64 %87
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %88, ptr align 4 %24, i64 12, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %89

89:                                               ; preds = %78
  %90 = load i64, ptr %16, align 8, !tbaa !9
  %91 = add i64 %90, 1
  store i64 %91, ptr %16, align 8, !tbaa !9
  br label %47, !llvm.loop !19

92:                                               ; preds = %57
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %14, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %15, align 4
  br label %105

96:                                               ; preds = %72
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %14, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %15, align 4
  br label %104

100:                                              ; preds = %75
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %14, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %104

104:                                              ; preds = %100, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %105

105:                                              ; preds = %104, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %283

106:                                              ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %107 = call noundef i64 @_ZNKSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  store i64 %107, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %108 = load i64, ptr %25, align 8, !tbaa !9
  %109 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %108, i64 12)
  %110 = extractvalue { i64, i1 } %109, 1
  %111 = extractvalue { i64, i1 } %109, 0
  %112 = select i1 %110, i64 -1, i64 %111
  %113 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %112) #9
          to label %114 unwind label %141

114:                                              ; preds = %106
  %115 = icmp eq i64 %108, 0
  br i1 %115, label %122, label %116

116:                                              ; preds = %114
  %117 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %113, i64 %108
  br label %118

118:                                              ; preds = %118, %116
  %119 = phi ptr [ %113, %116 ], [ %120, %118 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %119) #8
  %120 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %119, i64 1
  %121 = icmp eq ptr %120, %117
  br i1 %121, label %122, label %118

122:                                              ; preds = %118, %114
  store ptr %113, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store ptr null, ptr %27, align 8, !tbaa !5
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = call noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #8
  br i1 %124, label %149, label %125

125:                                              ; preds = %122
  %126 = load i64, ptr %25, align 8, !tbaa !9
  %127 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %126, i64 12)
  %128 = extractvalue { i64, i1 } %127, 1
  %129 = extractvalue { i64, i1 } %127, 0
  %130 = select i1 %128, i64 -1, i64 %129
  %131 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %130) #9
          to label %132 unwind label %145

132:                                              ; preds = %125
  %133 = icmp eq i64 %126, 0
  br i1 %133, label %140, label %134

134:                                              ; preds = %132
  %135 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %131, i64 %126
  br label %136

136:                                              ; preds = %136, %134
  %137 = phi ptr [ %131, %134 ], [ %138, %136 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %137) #8
  %138 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %137, i64 1
  %139 = icmp eq ptr %138, %135
  br i1 %139, label %140, label %136

140:                                              ; preds = %136, %132
  store ptr %131, ptr %27, align 8, !tbaa !5
  br label %149

141:                                              ; preds = %106
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %14, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %15, align 4
  br label %282

145:                                              ; preds = %125
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %14, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %15, align 4
  br label %281

149:                                              ; preds = %140, %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  store ptr null, ptr %28, align 8, !tbaa !5
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = call noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm2EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %150) #8
  br i1 %151, label %172, label %152

152:                                              ; preds = %149
  %153 = load i64, ptr %25, align 8, !tbaa !9
  %154 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %153, i64 8)
  %155 = extractvalue { i64, i1 } %154, 1
  %156 = extractvalue { i64, i1 } %154, 0
  %157 = select i1 %155, i64 -1, i64 %156
  %158 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %157) #9
          to label %159 unwind label %168

159:                                              ; preds = %152
  %160 = icmp eq i64 %153, 0
  br i1 %160, label %167, label %161

161:                                              ; preds = %159
  %162 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %158, i64 %153
  br label %163

163:                                              ; preds = %163, %161
  %164 = phi ptr [ %158, %161 ], [ %165, %163 ]
  call void @_ZN3P3D6VectorIfLm2EEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %164) #8
  %165 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %164, i64 1
  %166 = icmp eq ptr %165, %162
  br i1 %166, label %167, label %163

167:                                              ; preds = %163, %159
  store ptr %158, ptr %28, align 8, !tbaa !5
  br label %172

168:                                              ; preds = %243, %152
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %14, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %15, align 4
  br label %280

172:                                              ; preds = %167, %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  store ptr %11, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %173 = load ptr, ptr %29, align 8, !tbaa !5
  %174 = call ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %173) #8
  %175 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %30, i32 0, i32 0
  %176 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %175, i32 0, i32 0
  store ptr %174, ptr %176, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %177 = load ptr, ptr %29, align 8, !tbaa !5
  %178 = call ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %177) #8
  %179 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %31, i32 0, i32 0
  %180 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %179, i32 0, i32 0
  store ptr %178, ptr %180, align 8
  br label %181

181:                                              ; preds = %241, %172
  %182 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3P3D6VertexEiELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  br i1 %182, label %184, label %183

183:                                              ; preds = %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %243

184:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %185 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN3P3D6VertexEiELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  store ptr %185, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %186 = load ptr, ptr %32, align 8, !tbaa !5
  %187 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZSt3getILm0EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24) %186) #8
  store ptr %187, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  %188 = load ptr, ptr %32, align 8, !tbaa !5
  %189 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24) %188) #8
  store ptr %189, ptr %34, align 8, !tbaa !5
  %190 = load ptr, ptr %7, align 8, !tbaa !5
  %191 = load ptr, ptr %33, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.P3D::Vertex", ptr %191, i32 0, i32 0
  %193 = load i32, ptr %192, align 4, !tbaa !21
  %194 = sext i32 %193 to i64
  %195 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef %194) #8
  %196 = load ptr, ptr %26, align 8, !tbaa !5
  %197 = load ptr, ptr %34, align 8, !tbaa !5
  %198 = load i32, ptr %197, align 4, !tbaa !11
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %196, i64 %199
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %200, ptr align 4 %195, i64 12, i1 false), !tbaa.struct !17
  %201 = load ptr, ptr %27, align 8, !tbaa !5
  %202 = icmp ne ptr %201, null
  br i1 %202, label %203, label %220

203:                                              ; preds = %184
  %204 = load ptr, ptr %33, align 8, !tbaa !5
  %205 = getelementptr inbounds %"struct.P3D::Vertex", ptr %204, i32 0, i32 1
  %206 = call noundef zeroext i1 @_ZNKSt8optionalIiE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8) %205) #8
  br i1 %206, label %207, label %220

207:                                              ; preds = %203
  %208 = load ptr, ptr %8, align 8, !tbaa !5
  %209 = load ptr, ptr %33, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.P3D::Vertex", ptr %209, i32 0, i32 1
  %211 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %210) #8
  %212 = load i32, ptr %211, align 4, !tbaa !11
  %213 = sext i32 %212 to i64
  %214 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %208, i64 noundef %213) #8
  %215 = load ptr, ptr %27, align 8, !tbaa !5
  %216 = load ptr, ptr %34, align 8, !tbaa !5
  %217 = load i32, ptr %216, align 4, !tbaa !11
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %215, i64 %218
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %219, ptr align 4 %214, i64 12, i1 false), !tbaa.struct !17
  br label %220

220:                                              ; preds = %207, %203, %184
  %221 = load ptr, ptr %28, align 8, !tbaa !5
  %222 = icmp ne ptr %221, null
  br i1 %222, label %223, label %240

223:                                              ; preds = %220
  %224 = load ptr, ptr %33, align 8, !tbaa !5
  %225 = getelementptr inbounds %"struct.P3D::Vertex", ptr %224, i32 0, i32 2
  %226 = call noundef zeroext i1 @_ZNKSt8optionalIiE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8) %225) #8
  br i1 %226, label %227, label %240

227:                                              ; preds = %223
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = load ptr, ptr %33, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.P3D::Vertex", ptr %229, i32 0, i32 2
  %231 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %230) #8
  %232 = load i32, ptr %231, align 4, !tbaa !11
  %233 = sext i32 %232 to i64
  %234 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %228, i64 noundef %233) #8
  %235 = load ptr, ptr %28, align 8, !tbaa !5
  %236 = load ptr, ptr %34, align 8, !tbaa !5
  %237 = load i32, ptr %236, align 4, !tbaa !11
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %235, i64 %238
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %239, ptr align 4 %234, i64 8, i1 false), !tbaa.struct !28
  br label %240

240:                                              ; preds = %227, %223, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %241

241:                                              ; preds = %240
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN3P3D6VertexEiELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  br label %181

243:                                              ; preds = %183
  store i1 false, ptr %35, align 1
  %244 = load ptr, ptr %26, align 8, !tbaa !5
  %245 = load i64, ptr %25, align 8, !tbaa !9
  %246 = trunc i64 %245 to i32
  %247 = load ptr, ptr %13, align 8, !tbaa !5
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  %249 = call noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %248) #8
  %250 = trunc i64 %249 to i32
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMeshC2EPKNS_6VectorIfLm3EEEiPKNS_8TriangleEi(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %244, i32 noundef %246, ptr noundef %247, i32 noundef %250)
          to label %251 unwind label %168

251:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  %252 = load ptr, ptr %27, align 8, !tbaa !5
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef %252)
          to label %253 unwind label %259

253:                                              ; preds = %251
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMesh15setNormalBufferERKSt10shared_ptrIA_KNS_6VectorIfLm3EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %36)
          to label %254 unwind label %263

254:                                              ; preds = %253
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #8
  %255 = load ptr, ptr %28, align 8, !tbaa !5
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm2EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef %255)
          to label %256 unwind label %268

256:                                              ; preds = %254
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMesh11setUVBufferERKSt10shared_ptrIA_KNS_6VectorIfLm2EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %37)
          to label %257 unwind label %272

257:                                              ; preds = %256
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  store i1 true, ptr %35, align 1
  %258 = load i1, ptr %35, align 1
  br i1 %258, label %278, label %277

259:                                              ; preds = %251
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %14, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %15, align 4
  br label %267

263:                                              ; preds = %253
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %14, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %15, align 4
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %36) #8
  br label %267

267:                                              ; preds = %263, %259
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %279

268:                                              ; preds = %254
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %14, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %15, align 4
  br label %276

272:                                              ; preds = %256
  %273 = landingpad { ptr, i32 }
          cleanup
  %274 = extractvalue { ptr, i32 } %273, 0
  store ptr %274, ptr %14, align 8
  %275 = extractvalue { ptr, i32 } %273, 1
  store i32 %275, ptr %15, align 4
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #8
  br label %276

276:                                              ; preds = %272, %268
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  br label %279

277:                                              ; preds = %257
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #8
  br label %278

278:                                              ; preds = %277, %257
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #8
  ret void

279:                                              ; preds = %276, %267
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #8
  br label %280

280:                                              ; preds = %279, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %281

281:                                              ; preds = %280, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %282

282:                                              ; preds = %281, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %283

283:                                              ; preds = %282, %105, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #8
  br label %284

284:                                              ; preds = %283
  %285 = load ptr, ptr %14, align 8
  %286 = load i32, ptr %15, align 4
  %287 = insertvalue { ptr, i32 } poison, ptr %285, 0
  %288 = insertvalue { ptr, i32 } %287, i32 %286, 1
  resume { ptr, i32 } %288
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(20)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3P3D6VertexEiELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZSt3getILm0EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24)) #1

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

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

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 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { 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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN3P3D8TriangleUt_Ut_E", !12, i64 0, !12, i64 4, !12, i64 8}
!15 = !{!14, !12, i64 4}
!16 = !{!14, !12, i64 8}
!17 = !{i64 0, i64 12, !18}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !12, i64 0}
!22 = !{!"_ZTSN3P3D6VertexE", !12, i64 0, !23, i64 4, !23, i64 12}
!23 = !{!"_ZTSSt8optionalIiE", !24, i64 0}
!24 = !{!"_ZTSSt14_Optional_baseIiLb1ELb1EE", !25, i64 0}
!25 = !{!"_ZTSSt17_Optional_payloadIiLb1ELb1ELb1EE", !26, i64 0}
!26 = !{!"_ZTSSt22_Optional_payload_baseIiE", !7, i64 0, !27, i64 4}
!27 = !{!"bool", !7, i64 0}
!28 = !{i64 0, i64 8, !18}


; 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" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%class.anon = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.P3D::Triangle" = type { %union.anon.35 }
%union.anon.35 = type { %struct.anon.36 }
%struct.anon.36 = type { i32, i32, i32 }
%"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] }

; 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 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: mustprogress 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) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm2EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; 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 noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIiE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; 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: 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 @_ZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Graphics::ExtendedTriangleMesh") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::unordered_map", align 8
  %7 = alloca %class.anon, align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = alloca %"class.std::shared_ptr.14", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #8
  call void @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store ptr %6, ptr %7, align 8, !tbaa !5
  %12 = call noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %13 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %12, i64 12)
  %14 = extractvalue { i64, i1 } %13, 1
  %15 = extractvalue { i64, i1 } %13, 0
  %16 = select i1 %14, i64 -1, i64 %15
  %17 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %16) #9
          to label %.preheader unwind label %25

.preheader:                                       ; preds = %5
  %18 = call noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %.not78 = icmp eq i64 %18, 0
  br i1 %.not78, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %35, %.preheader
  %19 = call noundef i64 @_ZNKSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  %20 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %19, i64 12)
  %21 = extractvalue { i64, i1 } %20, 1
  %22 = extractvalue { i64, i1 } %20, 0
  %23 = select i1 %21, i64 -1, i64 %22
  %24 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %23) #9
          to label %46 unwind label %64

25:                                               ; preds = %5
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %134

.lr.ph:                                           ; preds = %.preheader, %35
  %.05774 = phi i64 [ %37, %35 ], [ 0, %.preheader ]
  %27 = call noundef nonnull align 4 dereferenceable(60) ptr @_ZNKSt6vectorIN3P3D4FaceESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.05774) #8
  %28 = getelementptr inbounds i8, ptr %27, i64 40
  %29 = invoke noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(20) %27)
          to label %30 unwind label %40

30:                                               ; preds = %.lr.ph
  %31 = getelementptr inbounds i8, ptr %27, i64 20
  %32 = invoke noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(20) %31)
          to label %33 unwind label %42

33:                                               ; preds = %30
  %34 = invoke noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(20) %28)
          to label %35 unwind label %44

35:                                               ; preds = %33
  %36 = getelementptr inbounds %"struct.P3D::Triangle", ptr %17, i64 %.05774
  store i32 %29, ptr %36, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 4
  store i32 %32, ptr %.sroa.4.0..sroa_idx, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 8
  store i32 %34, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !9
  %37 = add nuw i64 %.05774, 1
  %38 = call noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %39 = icmp ult i64 %37, %38
  br i1 %39, label %.lr.ph, label %._crit_edge, !llvm.loop !10

40:                                               ; preds = %.lr.ph
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %134

42:                                               ; preds = %30
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %134

44:                                               ; preds = %33
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %134

46:                                               ; preds = %._crit_edge
  %47 = icmp eq i64 %19, 0
  br i1 %47, label %.loopexit73, label %48

48:                                               ; preds = %46
  %49 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %24, i64 %19
  br label %50

50:                                               ; preds = %50, %48
  %51 = phi ptr [ %24, %48 ], [ %52, %50 ]
  call void @_ZN3P3D6VectorIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %51) #8
  %52 = getelementptr inbounds i8, ptr %51, i64 12
  %53 = icmp eq ptr %52, %49
  br i1 %53, label %.loopexit73, label %50

.loopexit73:                                      ; preds = %50, %46
  %54 = call noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  br i1 %54, label %.loopexit72, label %55

55:                                               ; preds = %.loopexit73
  %56 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %23) #9
          to label %57 unwind label %66

57:                                               ; preds = %55
  br i1 %47, label %.loopexit72, label %58

58:                                               ; preds = %57
  %59 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %56, i64 %19
  br label %60

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

64:                                               ; preds = %._crit_edge
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %134

66:                                               ; preds = %55
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %134

.loopexit72:                                      ; preds = %60, %57, %.loopexit73
  %.058 = phi ptr [ null, %.loopexit73 ], [ %56, %57 ], [ %56, %60 ]
  %68 = call noundef zeroext i1 @_ZNKSt6vectorIN3P3D6VectorIfLm2EEESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  br i1 %68, label %.loopexit, label %69

69:                                               ; preds = %.loopexit72
  %70 = icmp ugt i64 %19, 2305843009213693951
  %71 = shl nuw i64 %19, 3
  %72 = select i1 %70, i64 -1, i64 %71
  %73 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %72) #9
          to label %74 unwind label %81

74:                                               ; preds = %69
  br i1 %47, label %.loopexit, label %75

75:                                               ; preds = %74
  %76 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %73, i64 %19
  br label %77

77:                                               ; preds = %77, %75
  %78 = phi ptr [ %73, %75 ], [ %79, %77 ]
  call void @_ZN3P3D6VectorIfLm2EEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %78) #8
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  %80 = icmp eq ptr %79, %76
  br i1 %80, label %.loopexit, label %77

81:                                               ; preds = %._crit_edge77, %69
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %134

.loopexit:                                        ; preds = %77, %74, %.loopexit72
  %.059 = phi ptr [ null, %.loopexit72 ], [ %73, %74 ], [ %73, %77 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %83 = call ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  store ptr %83, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %84 = call ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  store ptr %84, ptr %9, align 8
  %85 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3P3D6VertexEiELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %85, label %.lr.ph76, label %._crit_edge77

.lr.ph76:                                         ; preds = %.loopexit
  %.not = icmp eq ptr %.058, null
  %.not67 = icmp eq ptr %.059, null
  br label %89

._crit_edge77:                                    ; preds = %123, %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  %86 = trunc i64 %19 to i32
  %87 = call noundef i64 @_ZNKSt6vectorIN3P3D4FaceESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %88 = trunc i64 %87 to i32
  invoke void @_ZN3P3D8Graphics20ExtendedTriangleMeshC2EPKNS_6VectorIfLm3EEEiPKNS_8TriangleEi(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull %24, i32 noundef %86, ptr noundef nonnull %17, i32 noundef %88)
          to label %126 unwind label %81

89:                                               ; preds = %.lr.ph76, %123
  %90 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN3P3D6VertexEiELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %91 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZSt3getILm0EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24) %90) #8
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24) %90) #8
  %93 = load i32, ptr %91, align 4, !tbaa !12
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %94) #8
  %96 = load i32, ptr %92, align 4, !tbaa !20
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %24, i64 %97
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %98, ptr noundef nonnull align 4 dereferenceable(12) %95, i64 12, i1 false), !tbaa.struct !21
  br i1 %.not, label %110, label %99

99:                                               ; preds = %89
  %100 = getelementptr inbounds i8, ptr %91, i64 4
  %101 = call noundef zeroext i1 @_ZNKSt8optionalIiE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8) %100) #8
  br i1 %101, label %102, label %110

102:                                              ; preds = %99
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %100) #8
  %104 = load i32, ptr %103, align 4, !tbaa !20
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm3EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %105) #8
  %107 = load i32, ptr %92, align 4, !tbaa !20
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %"struct.P3D::Vector.10", ptr %.058, i64 %108
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %109, ptr noundef nonnull align 4 dereferenceable(12) %106, i64 12, i1 false), !tbaa.struct !21
  br label %110

110:                                              ; preds = %102, %99, %89
  br i1 %.not67, label %123, label %111

111:                                              ; preds = %110
  %112 = getelementptr inbounds i8, ptr %91, i64 12
  %113 = call noundef zeroext i1 @_ZNKSt8optionalIiE9has_valueEv(ptr noundef nonnull align 4 dereferenceable(8) %112) #8
  br i1 %113, label %114, label %123

114:                                              ; preds = %111
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKRSt8optionalIiEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %112) #8
  %116 = load i32, ptr %115, align 4, !tbaa !20
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt6vectorIN3P3D6VectorIfLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %117) #8
  %119 = load i32, ptr %92, align 4, !tbaa !20
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %"struct.P3D::Vector.27", ptr %.059, i64 %120
  %122 = load i64, ptr %118, align 4, !tbaa !9
  store i64 %122, ptr %121, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %114, %111, %110
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN3P3D6VertexEiELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %125 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3P3D6VertexEiELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %125, label %89, label %._crit_edge77

126:                                              ; preds = %._crit_edge77
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm3EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %.058)
          to label %127 unwind label %129

127:                                              ; preds = %126
  call void @_ZN3P3D8Graphics20ExtendedTriangleMesh15setNormalBufferERKSt10shared_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) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #8
  invoke void @_ZNSt10shared_ptrIA_KN3P3D6VectorIfLm2EEEEC2IS2_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %.059)
          to label %128 unwind label %131

128:                                              ; preds = %127
  call void @_ZN3P3D8Graphics20ExtendedTriangleMesh11setUVBufferERKSt10shared_ptrIA_KNS_6VectorIfLm2EEEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(16) %11)
  call void @_ZNSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  ret void

129:                                              ; preds = %126
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %133

131:                                              ; preds = %127
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #8
  br label %133

133:                                              ; preds = %131, %129
  %.pn = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ]
  call void @_ZN3P3D8Graphics20ExtendedTriangleMeshD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %0) #8
  br label %134

134:                                              ; preds = %64, %81, %133, %66, %40, %44, %42, %25
  %.pn68.pn.pn = phi { ptr, i32 } [ %26, %25 ], [ %41, %40 ], [ %45, %44 ], [ %43, %42 ], [ %65, %64 ], [ %67, %66 ], [ %.pn, %133 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #8
  resume { ptr, i32 } %.pn68.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @"_ZZN3P3D32reorderWithSharedVerticesSupportERKSt6vectorINS_6VectorIfLm3EEESaIS2_EES6_RKS0_INS1_IfLm2EEESaIS7_EERKS0_INS_4FaceESaISC_EEENK3$_0clERKNS_6VertexE"(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN3P3D6VertexEiNS0_12VertexHasherESt8equal_toIS1_ESaISt4pairIKS1_iEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN3P3D6VertexEiELb1EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(24) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN3P3D6VertexEiELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZSt3getILm0EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EKN3P3D6VertexEiERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS7_(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKN3P3D6VertexEiELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

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


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