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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.4 }
%union.anon.4 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.P3D::IteratorFactory" = type { %"struct.P3D::ShapeVertexIter", %"struct.P3D::ShapeVertexIter" }
%"struct.P3D::ShapeVertexIter" = type { ptr, i64 }
%"struct.P3D::Vector.9" = type { %union.anon.10 }
%union.anon.10 = type { [3 x float] }
%"struct.P3D::Vector.12" = type { %union.anon.13 }
%union.anon.13 = type { [2 x float] }
%"class.P3D::IteratorFactory.15" = type { %"struct.P3D::ShapeTriangleIter", %"struct.P3D::ShapeTriangleIter" }
%"struct.P3D::ShapeTriangleIter" = type { ptr, i64 }
%"struct.P3D::Triangle" = type { %union.anon.16 }
%union.anon.16 = type { %struct.anon.17 }
%struct.anon.17 = type { i32, i32, i32 }
%"struct.P3D::Graphics::ExtendedTriangleMesh" = type { %"class.P3D::TriangleMesh", %"class.std::shared_ptr", %"class.std::shared_ptr.6", %"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.5", i32, i32 }
%"class.P3D::UniqueAlignedPointer" = type { ptr }
%"class.P3D::UniqueAlignedPointer.5" = type { ptr }
%"class.std::shared_ptr.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = 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" }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D13saveBinaryObjENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_8Graphics20ExtendedTriangleMeshE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(88) %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::basic_ofstream", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca %"class.P3D::IteratorFactory", align 8
  %11 = alloca %"struct.P3D::ShapeVertexIter", align 8
  %12 = alloca %"struct.P3D::ShapeVertexIter", align 8
  %13 = alloca %"struct.P3D::Vector.9", align 4
  %14 = alloca { <2 x float>, float }, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.P3D::Vector.9", align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.P3D::Vector.12", align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.P3D::IteratorFactory.15", align 8
  %21 = alloca %"struct.P3D::ShapeTriangleIter", align 8
  %22 = alloca %"struct.P3D::ShapeTriangleIter", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"struct.P3D::Triangle", align 4
  %25 = alloca { i64, i32 }, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @_ZN4Util16warnIfFileExistsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 512, ptr %5) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5)
  %30 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 4, i32 noundef 16)
          to label %31 unwind label %41

31:                                               ; preds = %2
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %5, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %30)
          to label %32 unwind label %41

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  store i8 0, ptr %8, align 1, !tbaa !9
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %33, i32 0, i32 2
  %35 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr null) #7
  br i1 %35, label %36, label %45

36:                                               ; preds = %32
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %37, i32 0, i32 1
  %39 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr null) #7
  br i1 %39, label %40, label %45

40:                                               ; preds = %36
  store i8 3, ptr %8, align 1, !tbaa !9
  br label %57

41:                                               ; preds = %31, %2
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  br label %246

45:                                               ; preds = %36, %32
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %46, i32 0, i32 2
  %48 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr null) #7
  br i1 %48, label %49, label %50

49:                                               ; preds = %45
  store i8 2, ptr %8, align 1, !tbaa !9
  br label %56

50:                                               ; preds = %45
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %51, i32 0, i32 1
  %53 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr null) #7
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  store i8 1, ptr %8, align 1, !tbaa !9
  br label %55

55:                                               ; preds = %54, %50
  br label %56

56:                                               ; preds = %55, %49
  br label %57

57:                                               ; preds = %56, %40
  invoke void @_ZN3P3D6Export5writeIcEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %58 unwind label %85

58:                                               ; preds = %57
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.P3D::MeshPrototype", ptr %59, i32 0, i32 2
  invoke void @_ZN3P3D6Export5writeIKiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %60)
          to label %61 unwind label %85

61:                                               ; preds = %58
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.P3D::MeshPrototype", ptr %62, i32 0, i32 3
  invoke void @_ZN3P3D6Export5writeIKiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %63)
          to label %64 unwind label %85

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNK3P3D12TriangleMesh12iterVerticesEv(ptr dead_on_unwind writable sret(%"class.P3D::IteratorFactory") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %65)
          to label %66 unwind label %89

66:                                               ; preds = %64
  store ptr %10, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = invoke { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %67)
          to label %69 unwind label %93

69:                                               ; preds = %66
  %70 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %71 = extractvalue { ptr, i64 } %68, 0
  store ptr %71, ptr %70, align 8
  %72 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %73 = extractvalue { ptr, i64 } %68, 1
  store i64 %73, ptr %72, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = invoke { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32) %74)
          to label %76 unwind label %97

76:                                               ; preds = %69
  %77 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 0
  %78 = extractvalue { ptr, i64 } %75, 0
  store ptr %78, ptr %77, align 8
  %79 = getelementptr inbounds { ptr, i64 }, ptr %12, i32 0, i32 1
  %80 = extractvalue { ptr, i64 } %75, 1
  store i64 %80, ptr %79, align 8
  br label %81

81:                                               ; preds = %108, %76
  %82 = invoke noundef zeroext i1 @_ZNK3P3D15ShapeVertexIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %83 unwind label %97

83:                                               ; preds = %81
  br i1 %82, label %101, label %84

84:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %116

85:                                               ; preds = %243, %61, %58, %57
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %6, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %7, align 4
  br label %245

89:                                               ; preds = %64
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %115

93:                                               ; preds = %66
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %6, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %7, align 4
  br label %114

97:                                               ; preds = %107, %81, %69
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %6, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %7, align 4
  br label %113

101:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  %102 = invoke { <2 x float>, float } @_ZNK3P3D15ShapeVertexIterdeEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %103 unwind label %109

103:                                              ; preds = %101
  %104 = getelementptr inbounds %"struct.P3D::Vector.9", ptr %13, i32 0, i32 0
  %105 = getelementptr inbounds %union.anon.10, ptr %104, i32 0, i32 0
  store { <2 x float>, float } %102, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %105, ptr align 8 %14, i64 12, i1 false)
  invoke void @_ZN3P3D6Export5writeINS_6VectorIfLm3EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(12) %13)
          to label %106 unwind label %109

106:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  br label %107

107:                                              ; preds = %106
  invoke void @_ZN3P3D15ShapeVertexIterppEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %108 unwind label %97

108:                                              ; preds = %107
  br label %81

109:                                              ; preds = %103, %101
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %6, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  br label %113

113:                                              ; preds = %109, %97
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  br label %114

114:                                              ; preds = %113, %93
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  br label %115

115:                                              ; preds = %114, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %245

116:                                              ; preds = %84
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %117, i32 0, i32 1
  %119 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %118, ptr null) #7
  br i1 %119, label %120, label %144

120:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !10
  br label %121

121:                                              ; preds = %136, %120
  %122 = load i32, ptr %15, align 4, !tbaa !10
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.P3D::MeshPrototype", ptr %123, i32 0, i32 2
  %125 = load i32, ptr %124, align 8, !tbaa !12
  %126 = icmp slt i32 %122, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %143

128:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %129, i32 0, i32 1
  %131 = call noundef ptr @_ZNKSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %130) #7
  %132 = load i32, ptr %15, align 4, !tbaa !10
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds %"struct.P3D::Vector.9", ptr %131, i64 %133
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %134, i64 12, i1 false), !tbaa.struct !16
  invoke void @_ZN3P3D6Export5writeINS_6VectorIfLm3EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(12) %16)
          to label %135 unwind label %139

135:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %15, align 4, !tbaa !10
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %15, align 4, !tbaa !10
  br label %121, !llvm.loop !17

139:                                              ; preds = %128
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %6, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %245

143:                                              ; preds = %127
  br label %144

144:                                              ; preds = %143, %116
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %145, i32 0, i32 2
  %147 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %146, ptr null) #7
  br i1 %147, label %148, label %172

148:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !10
  br label %149

149:                                              ; preds = %164, %148
  %150 = load i32, ptr %17, align 4, !tbaa !10
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %"class.P3D::MeshPrototype", ptr %151, i32 0, i32 2
  %153 = load i32, ptr %152, align 8, !tbaa !12
  %154 = icmp slt i32 %150, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %171

156:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.P3D::Graphics::ExtendedTriangleMesh", ptr %157, i32 0, i32 2
  %159 = call noundef ptr @_ZNKSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %158) #7
  %160 = load i32, ptr %17, align 4, !tbaa !10
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %"struct.P3D::Vector.12", ptr %159, i64 %161
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %162, i64 8, i1 false), !tbaa.struct !19
  invoke void @_ZN3P3D6Export5writeINS_6VectorIfLm2EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %18)
          to label %163 unwind label %167

163:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %17, align 4, !tbaa !10
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %17, align 4, !tbaa !10
  br label %149, !llvm.loop !20

167:                                              ; preds = %156
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %6, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %245

171:                                              ; preds = %155
  br label %172

172:                                              ; preds = %171, %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNK3P3D12TriangleMesh13iterTrianglesEv(ptr dead_on_unwind writable sret(%"class.P3D::IteratorFactory.15") align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %173)
          to label %174 unwind label %193

174:                                              ; preds = %172
  store ptr %20, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  %175 = load ptr, ptr %19, align 8, !tbaa !5
  %176 = invoke { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %175)
          to label %177 unwind label %197

177:                                              ; preds = %174
  %178 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %179 = extractvalue { ptr, i64 } %176, 0
  store ptr %179, ptr %178, align 8
  %180 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %181 = extractvalue { ptr, i64 } %176, 1
  store i64 %181, ptr %180, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %182 = load ptr, ptr %19, align 8, !tbaa !5
  %183 = invoke { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32) %182)
          to label %184 unwind label %201

184:                                              ; preds = %177
  %185 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %186 = extractvalue { ptr, i64 } %183, 0
  store ptr %186, ptr %185, align 8
  %187 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %188 = extractvalue { ptr, i64 } %183, 1
  store i64 %188, ptr %187, align 8
  br label %189

189:                                              ; preds = %238, %184
  %190 = invoke noundef zeroext i1 @_ZNK3P3D17ShapeTriangleIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %191 unwind label %201

191:                                              ; preds = %189
  br i1 %190, label %205, label %192

192:                                              ; preds = %191
  store i32 10, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %243

193:                                              ; preds = %172
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %6, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %7, align 4
  br label %242

197:                                              ; preds = %174
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %6, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %7, align 4
  br label %241

201:                                              ; preds = %237, %189, %177
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %6, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %7, align 4
  br label %240

205:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #7
  %206 = invoke { i64, i32 } @_ZNK3P3D17ShapeTriangleIterdeEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %207 unwind label %221

207:                                              ; preds = %205
  %208 = getelementptr inbounds %"struct.P3D::Triangle", ptr %24, i32 0, i32 0
  %209 = getelementptr inbounds %union.anon.16, ptr %208, i32 0, i32 0
  store { i64, i32 } %206, ptr %25, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %209, ptr align 8 %25, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %210 = getelementptr inbounds %"struct.P3D::Triangle", ptr %24, i32 0, i32 0
  store ptr %210, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %211 = load ptr, ptr %26, align 8, !tbaa !5
  %212 = getelementptr inbounds [3 x i32], ptr %211, i64 0, i64 0
  store ptr %212, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %213 = load ptr, ptr %26, align 8, !tbaa !5
  %214 = getelementptr inbounds [3 x i32], ptr %213, i64 0, i64 0
  %215 = getelementptr inbounds i32, ptr %214, i64 3
  store ptr %215, ptr %28, align 8, !tbaa !5
  br label %216

216:                                              ; preds = %229, %207
  %217 = load ptr, ptr %27, align 8, !tbaa !5
  %218 = load ptr, ptr %28, align 8, !tbaa !5
  %219 = icmp ne ptr %217, %218
  br i1 %219, label %225, label %220

220:                                              ; preds = %216
  store i32 12, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %236

221:                                              ; preds = %205
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %6, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %7, align 4
  br label %239

225:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %226 = load ptr, ptr %27, align 8, !tbaa !5
  %227 = load i32, ptr %226, align 4, !tbaa !10
  store i32 %227, ptr %29, align 4, !tbaa !10
  invoke void @_ZN3P3D6Export5writeIiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %29)
          to label %228 unwind label %232

228:                                              ; preds = %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %229

229:                                              ; preds = %228
  %230 = load ptr, ptr %27, align 8, !tbaa !5
  %231 = getelementptr inbounds i32, ptr %230, i32 1
  store ptr %231, ptr %27, align 8, !tbaa !5
  br label %216

232:                                              ; preds = %225
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %6, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %239

236:                                              ; preds = %220
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #7
  br label %237

237:                                              ; preds = %236
  invoke void @_ZN3P3D17ShapeTriangleIterppEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
          to label %238 unwind label %201

238:                                              ; preds = %237
  br label %189

239:                                              ; preds = %232, %221
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #7
  br label %240

240:                                              ; preds = %239, %201
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  br label %241

241:                                              ; preds = %240, %197
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  br label %242

242:                                              ; preds = %241, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %245

243:                                              ; preds = %192
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %5)
          to label %244 unwind label %85

244:                                              ; preds = %243
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #7
  ret void

245:                                              ; preds = %242, %167, %139, %115, %85
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %246

246:                                              ; preds = %245, %41
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %5) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #7
  br label %247

247:                                              ; preds = %246
  %248 = load ptr, ptr %6, align 8
  %249 = load i32, ptr %7, align 4
  %250 = insertvalue { ptr, i32 } poison, ptr %248, 0
  %251 = insertvalue { ptr, i32 } %250, i32 %249, 1
  resume { ptr, i32 } %251
}

declare void @_ZN4Util16warnIfFileExistsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeIcEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeIKiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_ZNK3P3D12TriangleMesh12iterVerticesEv(ptr dead_on_unwind writable sret(%"class.P3D::IteratorFactory") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3P3D15ShapeVertexIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK3P3D15ShapeVertexIterdeEv(ptr noundef nonnull align 8 dereferenceable(16)) #5 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) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeINS_6VectorIfLm3EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(12)) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeINS_6VectorIfLm2EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

declare void @_ZNK3P3D12TriangleMesh13iterTrianglesEv(ptr dead_on_unwind writable sret(%"class.P3D::IteratorFactory.15") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3P3D17ShapeTriangleIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeIiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 16}
!13 = !{!"_ZTSN3P3D13MeshPrototypeE", !14, i64 0, !15, i64 8, !11, i64 16, !11, i64 20}
!14 = !{!"_ZTSN3P3D20UniqueAlignedPointerIfEE", !6, i64 0}
!15 = !{!"_ZTSN3P3D20UniqueAlignedPointerIiEE", !6, i64 0}
!16 = !{i64 0, i64 12, !9}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{i64 0, i64 8, !9}
!20 = distinct !{!20, !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"

%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.4 }
%union.anon.4 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.P3D::IteratorFactory" = type { %"struct.P3D::ShapeVertexIter", %"struct.P3D::ShapeVertexIter" }
%"struct.P3D::ShapeVertexIter" = type { ptr, i64 }
%"struct.P3D::Vector.9" = type { %union.anon.10 }
%union.anon.10 = type { [3 x float] }
%"struct.P3D::Vector.12" = type { %union.anon.13 }
%union.anon.13 = type { [2 x float] }
%"class.P3D::IteratorFactory.15" = type { %"struct.P3D::ShapeTriangleIter", %"struct.P3D::ShapeTriangleIter" }
%"struct.P3D::ShapeTriangleIter" = type { ptr, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D13saveBinaryObjENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_8Graphics20ExtendedTriangleMeshE(ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(88) %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca i8, align 1
  %5 = alloca %"class.P3D::IteratorFactory", align 8
  %6 = alloca %"struct.P3D::ShapeVertexIter", align 8
  %7 = alloca %"struct.P3D::ShapeVertexIter", align 8
  %8 = alloca %"struct.P3D::Vector.9", align 8
  %9 = alloca %"struct.P3D::Vector.9", align 4
  %10 = alloca %"struct.P3D::Vector.12", align 8
  %11 = alloca %"class.P3D::IteratorFactory.15", align 8
  %12 = alloca %"struct.P3D::ShapeTriangleIter", align 8
  %13 = alloca %"struct.P3D::ShapeTriangleIter", align 8
  %14 = alloca i32, align 4
  tail call void @_ZN4Util16warnIfFileExistsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3)
  %15 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 4, i32 noundef 16)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %15)
          to label %16 unwind label %23

16:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  store i8 0, ptr %4, align 1, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %1, i64 40
  %18 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr null) #7
  br i1 %18, label %19, label %25

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %1, i64 24
  %21 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr null) #7
  br i1 %21, label %22, label %25

22:                                               ; preds = %19
  store i8 3, ptr %4, align 1, !tbaa !5
  br label %32

23:                                               ; preds = %2
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %103

25:                                               ; preds = %19, %16
  %26 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr null) #7
  br i1 %26, label %27, label %28

27:                                               ; preds = %25
  store i8 2, ptr %4, align 1, !tbaa !5
  br label %32

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %1, i64 24
  %30 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr null) #7
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  store i8 1, ptr %4, align 1, !tbaa !5
  br label %32

32:                                               ; preds = %27, %31, %28, %22
  invoke void @_ZN3P3D6Export5writeIcEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %33 unwind label %52

33:                                               ; preds = %32
  %34 = getelementptr inbounds i8, ptr %1, i64 16
  invoke void @_ZN3P3D6Export5writeIKiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %34)
          to label %35 unwind label %52

35:                                               ; preds = %33
  %36 = getelementptr inbounds i8, ptr %1, i64 20
  invoke void @_ZN3P3D6Export5writeIKiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %37 unwind label %52

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  invoke void @_ZNK3P3D12TriangleMesh12iterVerticesEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::IteratorFactory") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %38 unwind label %54

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %39 = call { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %40 = extractvalue { ptr, i64 } %39, 0
  store ptr %40, ptr %6, align 8
  %41 = getelementptr inbounds i8, ptr %6, i64 8
  %42 = extractvalue { ptr, i64 } %39, 1
  store i64 %42, ptr %41, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %43 = call { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %44 = extractvalue { ptr, i64 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = getelementptr inbounds i8, ptr %7, i64 8
  %46 = extractvalue { ptr, i64 } %43, 1
  store i64 %46, ptr %45, align 8
  %47 = call noundef zeroext i1 @_ZNK3P3D15ShapeVertexIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  br i1 %47, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %38
  %.sroa.216.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  br label %56

._crit_edge:                                      ; preds = %58, %38
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %48 = getelementptr inbounds i8, ptr %1, i64 24
  %49 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr null) #7
  %50 = load i32, ptr %34, align 8
  %51 = icmp sgt i32 %50, 0
  %or.cond = select i1 %49, i1 %51, i1 false
  br i1 %or.cond, label %.lr.ph50, label %.loopexit48

52:                                               ; preds = %._crit_edge56, %35, %33, %32
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %102

54:                                               ; preds = %37
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %102

56:                                               ; preds = %.lr.ph, %58
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  %57 = call { <2 x float>, float } @_ZNK3P3D15ShapeVertexIterdeEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %.fca.0.extract13 = extractvalue { <2 x float>, float } %57, 0
  %.fca.1.extract14 = extractvalue { <2 x float>, float } %57, 1
  store <2 x float> %.fca.0.extract13, ptr %8, align 8
  store float %.fca.1.extract14, ptr %.sroa.216.0..sroa_idx, align 8
  invoke void @_ZN3P3D6Export5writeINS_6VectorIfLm3EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(12) %8)
          to label %58 unwind label %60

58:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @_ZN3P3D15ShapeVertexIterppEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %59 = call noundef zeroext i1 @_ZNK3P3D15ShapeVertexIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  br i1 %59, label %56, label %._crit_edge

60:                                               ; preds = %56
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %102

.lr.ph50:                                         ; preds = %._crit_edge, %64
  %indvars.iv = phi i64 [ %indvars.iv.next, %64 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  %62 = call noundef ptr @_ZNKSt12__shared_ptrIA_KN3P3D6VectorIfLm3EEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %48) #7
  %63 = getelementptr inbounds %"struct.P3D::Vector.9", ptr %62, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %63, i64 12, i1 false), !tbaa.struct !8
  invoke void @_ZN3P3D6Export5writeINS_6VectorIfLm3EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(12) %9)
          to label %64 unwind label %68

64:                                               ; preds = %.lr.ph50
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %65 = load i32, ptr %34, align 8, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = icmp slt i64 %indvars.iv.next, %66
  br i1 %67, label %.lr.ph50, label %.loopexit48, !llvm.loop !15

68:                                               ; preds = %.lr.ph50
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  br label %102

.loopexit48:                                      ; preds = %64, %._crit_edge
  %70 = call noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr null) #7
  %71 = load i32, ptr %34, align 8
  %72 = icmp sgt i32 %71, 0
  %or.cond59 = select i1 %70, i1 %72, i1 false
  br i1 %or.cond59, label %.lr.ph52, label %.loopexit

.lr.ph52:                                         ; preds = %.loopexit48, %76
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %76 ], [ 0, %.loopexit48 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %73 = call noundef ptr @_ZNKSt12__shared_ptrIA_KN3P3D6VectorIfLm2EEELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  %74 = getelementptr inbounds %"struct.P3D::Vector.12", ptr %73, i64 %indvars.iv61
  %75 = load i64, ptr %74, align 4, !tbaa !5
  store i64 %75, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3P3D6Export5writeINS_6VectorIfLm2EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %76 unwind label %80

76:                                               ; preds = %.lr.ph52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %77 = load i32, ptr %34, align 8, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next62, %78
  br i1 %79, label %.lr.ph52, label %.loopexit, !llvm.loop !17

80:                                               ; preds = %.lr.ph52
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %102

.loopexit:                                        ; preds = %76, %.loopexit48
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  invoke void @_ZNK3P3D12TriangleMesh13iterTrianglesEv(ptr dead_on_unwind nonnull writable sret(%"class.P3D::IteratorFactory.15") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %82 unwind label %92

82:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %83 = call { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %84 = extractvalue { ptr, i64 } %83, 0
  store ptr %84, ptr %12, align 8
  %85 = getelementptr inbounds i8, ptr %12, i64 8
  %86 = extractvalue { ptr, i64 } %83, 1
  store i64 %86, ptr %85, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #7
  %87 = call { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %88 = extractvalue { ptr, i64 } %87, 0
  store ptr %88, ptr %13, align 8
  %89 = getelementptr inbounds i8, ptr %13, i64 8
  %90 = extractvalue { ptr, i64 } %87, 1
  store i64 %90, ptr %89, align 8
  %91 = call noundef zeroext i1 @_ZNK3P3D17ShapeTriangleIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
  br i1 %91, label %.lr.ph55, label %._crit_edge56

._crit_edge56:                                    ; preds = %97, %82
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %3)
          to label %101 unwind label %52

92:                                               ; preds = %.loopexit
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %102

.lr.ph55:                                         ; preds = %82, %97
  %94 = call { i64, i32 } @_ZNK3P3D17ShapeTriangleIterdeEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %.fca.0.extract = extractvalue { i64, i32 } %94, 0
  %.fca.1.extract = extractvalue { i64, i32 } %94, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %.sroa.0.0.extract.trunc = trunc i64 %.fca.0.extract to i32
  store i32 %.sroa.0.0.extract.trunc, ptr %14, align 4, !tbaa !18
  invoke void @_ZN3P3D6Export5writeIiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %95 unwind label %99

95:                                               ; preds = %.lr.ph55
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  %.sroa.0.4.extract.shift = lshr i64 %.fca.0.extract, 32
  %.sroa.0.4.extract.trunc = trunc nuw i64 %.sroa.0.4.extract.shift to i32
  store i32 %.sroa.0.4.extract.trunc, ptr %14, align 4, !tbaa !18
  invoke void @_ZN3P3D6Export5writeIiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %96 unwind label %99

96:                                               ; preds = %95
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 %.fca.1.extract, ptr %14, align 4, !tbaa !18
  invoke void @_ZN3P3D6Export5writeIiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %97 unwind label %99

97:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @_ZN3P3D17ShapeTriangleIterppEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %98 = call noundef zeroext i1 @_ZNK3P3D17ShapeTriangleIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
  br i1 %98, label %.lr.ph55, label %._crit_edge56

99:                                               ; preds = %96, %95, %.lr.ph55
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  br label %102

101:                                              ; preds = %._crit_edge56
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #7
  ret void

102:                                              ; preds = %92, %99, %54, %60, %80, %68, %52
  %.pn43.pn = phi { ptr, i32 } [ %69, %68 ], [ %81, %80 ], [ %53, %52 ], [ %61, %60 ], [ %55, %54 ], [ %100, %99 ], [ %93, %92 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  br label %103

103:                                              ; preds = %102, %23
  %.pn43.pn.pn = phi { ptr, i32 } [ %.pn43.pn, %102 ], [ %24, %23 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn43.pn.pn
}

declare void @_ZN4Util16warnIfFileExistsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm2EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneIA_KN3P3D6VectorIfLm3EEEEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeIcEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeIKiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

declare void @_ZNK3P3D12TriangleMesh12iterVerticesEv(ptr dead_on_unwind writable sret(%"class.P3D::IteratorFactory") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_15ShapeVertexIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3P3D15ShapeVertexIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZNK3P3D15ShapeVertexIterdeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 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) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeINS_6VectorIfLm3EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D15ShapeVertexIterppEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeINS_6VectorIfLm2EEEEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

declare void @_ZNK3P3D12TriangleMesh13iterTrianglesEv(ptr dead_on_unwind writable sret(%"class.P3D::IteratorFactory.15") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E5beginEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK3P3D15IteratorFactoryINS_17ShapeTriangleIterES1_E3endEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3P3D17ShapeTriangleIterneERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D6Export5writeIiEEvRSoRKT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D17ShapeTriangleIterppEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{i64 0, i64 12, !5}
!9 = !{!10, !14, i64 16}
!10 = !{!"_ZTSN3P3D13MeshPrototypeE", !11, i64 0, !13, i64 8, !14, i64 16, !14, i64 20}
!11 = !{!"_ZTSN3P3D20UniqueAlignedPointerIfEE", !12, i64 0}
!12 = !{!"any pointer", !6, i64 0}
!13 = !{!"_ZTSN3P3D20UniqueAlignedPointerIiEE", !12, i64 0}
!14 = !{!"int", !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!14, !14, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass