; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src (trianglemesh)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.vmath::vec3" = type { float, float, float }
%struct.Triangle = type { [3 x i32] }
%"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.23 }
%union.anon.23 = 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.TriangleMesh = type { %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.0", i32, i32, i32, double, %"class.std::vector.5", %"class.std::vector.10", %class.Array3d }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vmath::vec3, std::allocator<vmath::vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Array3d = type <{ i32, i32, i32, [4 x i8], ptr, i8, [7 x i8], %"class.std::vector.15", i32, [4 x i8] }>
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header1 = external hidden unnamed_addr constant [51 x i8], align 16
@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2 = external hidden unnamed_addr constant [65 x i8], align 16
@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2color = external hidden unnamed_addr constant [125 x i8], align 16
@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header3 = external hidden unnamed_addr constant [49 x i8], align 16

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [51 x i8], align 16
  %6 = alloca [65 x i8], align 16
  %7 = alloca [125 x i8], align 16
  %8 = alloca [49 x i8], align 16
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.vmath::vec3", align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca %"class.vmath::vec3", align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca %"class.vmath::vec3", align 4
  %33 = alloca i32, align 4
  %34 = alloca %struct.Triangle, align 4
  %35 = alloca [3 x i32], align 4
  %36 = alloca i32, align 4
  %37 = alloca %"class.std::basic_ofstream", align 8
  %38 = alloca %"class.std::basic_ofstream", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %39 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 51, ptr %5) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header1, i64 51, i1 false)
  call void @llvm.lifetime.start.p0(i64 65, ptr %6) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2, i64 65, i1 false)
  call void @llvm.lifetime.start.p0(i64 125, ptr %7) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2color, i64 125, i1 false)
  call void @llvm.lifetime.start.p0(i64 49, ptr %8) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header3, i64 49, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #10
  %40 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %41 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #10
  %42 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 1
  %43 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #10
  %44 = icmp eq i64 %41, %43
  %45 = zext i1 %44 to i8
  store i8 %45, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #10
  %46 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %47 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #10
  call void @_ZN12TriangleMesh9_toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(232) %39, i64 noundef %47)
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #10
  %48 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 3
  %49 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #10
  invoke void @_ZN12TriangleMesh9_toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(232) %39, i64 noundef %49)
          to label %50 unwind label %64

50:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  %51 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  %53 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  %54 = trunc i64 %53 to i32
  store i32 %54, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  store i32 0, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #10
  %55 = load i8, ptr %9, align 1, !tbaa !9, !range !13, !noundef !14
  %56 = trunc i8 %55 to i1
  br i1 %56, label %57, label %68

57:                                               ; preds = %50
  %58 = load i32, ptr %14, align 4, !tbaa !11
  %59 = add nsw i32 51, %58
  %60 = add nsw i32 %59, 125
  %61 = load i32, ptr %15, align 4, !tbaa !11
  %62 = add nsw i32 %60, %61
  %63 = add nsw i32 %62, 49
  store i32 %63, ptr %17, align 4, !tbaa !11
  br label %75

64:                                               ; preds = %2
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %12, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %13, align 4
  br label %539

68:                                               ; preds = %50
  %69 = load i32, ptr %14, align 4, !tbaa !11
  %70 = add nsw i32 51, %69
  %71 = add nsw i32 %70, 65
  %72 = load i32, ptr %15, align 4, !tbaa !11
  %73 = add nsw i32 %71, %72
  %74 = add nsw i32 %73, 49
  store i32 %74, ptr %17, align 4, !tbaa !11
  br label %75

75:                                               ; preds = %68, %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  %76 = load i8, ptr %9, align 1, !tbaa !9, !range !13, !noundef !14
  %77 = trunc i8 %76 to i1
  br i1 %77, label %78, label %101

78:                                               ; preds = %75
  %79 = load i32, ptr %17, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %82 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #10
  %83 = trunc i64 %82 to i32
  %84 = sext i32 %83 to i64
  %85 = mul i64 4, %84
  %86 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %87 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %86) #10
  %88 = trunc i64 %87 to i32
  %89 = sext i32 %88 to i64
  %90 = mul i64 1, %89
  %91 = add i64 %85, %90
  %92 = mul i64 3, %91
  %93 = add i64 %80, %92
  %94 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 3
  %95 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #10
  %96 = trunc i64 %95 to i32
  %97 = sext i32 %96 to i64
  %98 = mul i64 13, %97
  %99 = add i64 %93, %98
  %100 = trunc i64 %99 to i32
  store i32 %100, ptr %18, align 4, !tbaa !11
  br label %117

101:                                              ; preds = %75
  %102 = load i32, ptr %17, align 4, !tbaa !11
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %105 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #10
  %106 = trunc i64 %105 to i32
  %107 = sext i32 %106 to i64
  %108 = mul i64 12, %107
  %109 = add i64 %103, %108
  %110 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 3
  %111 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #10
  %112 = trunc i64 %111 to i32
  %113 = sext i32 %112 to i64
  %114 = mul i64 13, %113
  %115 = add i64 %109, %114
  %116 = trunc i64 %115 to i32
  store i32 %116, ptr %18, align 4, !tbaa !11
  br label %117

117:                                              ; preds = %101, %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %118 = load i32, ptr %18, align 4, !tbaa !11
  %119 = sext i32 %118 to i64
  %120 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %119) #11
          to label %121 unwind label %154

121:                                              ; preds = %117
  store ptr %120, ptr %19, align 8, !tbaa !5
  %122 = load ptr, ptr %19, align 8, !tbaa !5
  %123 = load i32, ptr %16, align 4, !tbaa !11
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i8, ptr %122, i64 %124
  %126 = getelementptr inbounds [51 x i8], ptr %5, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %125, ptr align 16 %126, i64 51, i1 false)
  %127 = load i32, ptr %16, align 4, !tbaa !11
  %128 = add nsw i32 %127, 51
  store i32 %128, ptr %16, align 4, !tbaa !11
  %129 = load ptr, ptr %19, align 8, !tbaa !5
  %130 = load i32, ptr %16, align 4, !tbaa !11
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %129, i64 %131
  %133 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  %134 = load i32, ptr %14, align 4, !tbaa !11
  %135 = sext i32 %134 to i64
  %136 = mul i64 %135, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %132, ptr align 1 %133, i64 %136, i1 false)
  %137 = load i32, ptr %14, align 4, !tbaa !11
  %138 = sext i32 %137 to i64
  %139 = mul i64 %138, 1
  %140 = load i32, ptr %16, align 4, !tbaa !11
  %141 = sext i32 %140 to i64
  %142 = add i64 %141, %139
  %143 = trunc i64 %142 to i32
  store i32 %143, ptr %16, align 4, !tbaa !11
  %144 = load i8, ptr %9, align 1, !tbaa !9, !range !13, !noundef !14
  %145 = trunc i8 %144 to i1
  br i1 %145, label %146, label %158

146:                                              ; preds = %121
  %147 = load ptr, ptr %19, align 8, !tbaa !5
  %148 = load i32, ptr %16, align 4, !tbaa !11
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i8, ptr %147, i64 %149
  %151 = getelementptr inbounds [125 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %150, ptr align 16 %151, i64 125, i1 false)
  %152 = load i32, ptr %16, align 4, !tbaa !11
  %153 = add nsw i32 %152, 125
  store i32 %153, ptr %16, align 4, !tbaa !11
  br label %166

154:                                              ; preds = %117
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %12, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %13, align 4
  br label %538

158:                                              ; preds = %121
  %159 = load ptr, ptr %19, align 8, !tbaa !5
  %160 = load i32, ptr %16, align 4, !tbaa !11
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i8, ptr %159, i64 %161
  %163 = getelementptr inbounds [65 x i8], ptr %6, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %162, ptr align 16 %163, i64 65, i1 false)
  %164 = load i32, ptr %16, align 4, !tbaa !11
  %165 = add nsw i32 %164, 65
  store i32 %165, ptr %16, align 4, !tbaa !11
  br label %166

166:                                              ; preds = %158, %146
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  %168 = load i32, ptr %16, align 4, !tbaa !11
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i8, ptr %167, i64 %169
  %171 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  %172 = load i32, ptr %15, align 4, !tbaa !11
  %173 = sext i32 %172 to i64
  %174 = mul i64 %173, 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %170, ptr align 1 %171, i64 %174, i1 false)
  %175 = load i32, ptr %15, align 4, !tbaa !11
  %176 = sext i32 %175 to i64
  %177 = mul i64 %176, 1
  %178 = load i32, ptr %16, align 4, !tbaa !11
  %179 = sext i32 %178 to i64
  %180 = add i64 %179, %177
  %181 = trunc i64 %180 to i32
  store i32 %181, ptr %16, align 4, !tbaa !11
  %182 = load ptr, ptr %19, align 8, !tbaa !5
  %183 = load i32, ptr %16, align 4, !tbaa !11
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds i8, ptr %182, i64 %184
  %186 = getelementptr inbounds [49 x i8], ptr %8, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %185, ptr align 16 %186, i64 49, i1 false)
  %187 = load i32, ptr %16, align 4, !tbaa !11
  %188 = add nsw i32 %187, 49
  store i32 %188, ptr %16, align 4, !tbaa !11
  %189 = load i8, ptr %9, align 1, !tbaa !9, !range !13, !noundef !14
  %190 = trunc i8 %189 to i1
  br i1 %190, label %191, label %367

191:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  %192 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %193 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %192) #10
  %194 = mul i64 3, %193
  %195 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %194, i64 4)
  %196 = extractvalue { i64, i1 } %195, 1
  %197 = extractvalue { i64, i1 } %195, 0
  %198 = select i1 %196, i64 -1, i64 %197
  %199 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %198) #11
          to label %200 unwind label %209

200:                                              ; preds = %191
  store ptr %199, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #10
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %201 unwind label %213

201:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %202

202:                                              ; preds = %245, %201
  %203 = load i32, ptr %22, align 4, !tbaa !11
  %204 = zext i32 %203 to i64
  %205 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %206 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %205) #10
  %207 = icmp ult i64 %204, %206
  br i1 %207, label %217, label %208

208:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %248

209:                                              ; preds = %191
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %12, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %13, align 4
  br label %366

213:                                              ; preds = %200
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %12, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %13, align 4
  br label %365

217:                                              ; preds = %202
  %218 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %219 = load i32, ptr %22, align 4, !tbaa !11
  %220 = zext i32 %219 to i64
  %221 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %218, i64 noundef %220) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %221, i64 12, i1 false), !tbaa.struct !15
  %222 = getelementptr inbounds %"class.vmath::vec3", ptr %21, i32 0, i32 0
  %223 = load float, ptr %222, align 4, !tbaa !18
  %224 = load ptr, ptr %20, align 8, !tbaa !5
  %225 = load i32, ptr %22, align 4, !tbaa !11
  %226 = mul i32 3, %225
  %227 = zext i32 %226 to i64
  %228 = getelementptr inbounds float, ptr %224, i64 %227
  store float %223, ptr %228, align 4, !tbaa !16
  %229 = getelementptr inbounds %"class.vmath::vec3", ptr %21, i32 0, i32 1
  %230 = load float, ptr %229, align 4, !tbaa !20
  %231 = load ptr, ptr %20, align 8, !tbaa !5
  %232 = load i32, ptr %22, align 4, !tbaa !11
  %233 = mul i32 3, %232
  %234 = add i32 %233, 1
  %235 = zext i32 %234 to i64
  %236 = getelementptr inbounds float, ptr %231, i64 %235
  store float %230, ptr %236, align 4, !tbaa !16
  %237 = getelementptr inbounds %"class.vmath::vec3", ptr %21, i32 0, i32 2
  %238 = load float, ptr %237, align 4, !tbaa !21
  %239 = load ptr, ptr %20, align 8, !tbaa !5
  %240 = load i32, ptr %22, align 4, !tbaa !11
  %241 = mul i32 3, %240
  %242 = add i32 %241, 2
  %243 = zext i32 %242 to i64
  %244 = getelementptr inbounds float, ptr %239, i64 %243
  store float %238, ptr %244, align 4, !tbaa !16
  br label %245

245:                                              ; preds = %217
  %246 = load i32, ptr %22, align 4, !tbaa !11
  %247 = add i32 %246, 1
  store i32 %247, ptr %22, align 4, !tbaa !11
  br label %202, !llvm.loop !22

248:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %249 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 1
  %250 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %249) #10
  %251 = mul i64 3, %250
  %252 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %251) #11
          to label %253 unwind label %262

253:                                              ; preds = %248
  store ptr %252, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #10
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %24)
          to label %254 unwind label %266

254:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #10
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %255

255:                                              ; preds = %310, %254
  %256 = load i32, ptr %25, align 4, !tbaa !11
  %257 = zext i32 %256 to i64
  %258 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 1
  %259 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %258) #10
  %260 = icmp ult i64 %257, %259
  br i1 %260, label %270, label %261

261:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #10
  br label %313

262:                                              ; preds = %248
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %12, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %13, align 4
  br label %364

266:                                              ; preds = %253
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %12, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #10
  br label %364

270:                                              ; preds = %255
  %271 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 1
  %272 = load i32, ptr %25, align 4, !tbaa !11
  %273 = zext i32 %272 to i64
  %274 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %271, i64 noundef %273) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %274, i64 12, i1 false), !tbaa.struct !15
  %275 = getelementptr inbounds %"class.vmath::vec3", ptr %24, i32 0, i32 0
  %276 = load float, ptr %275, align 4, !tbaa !18
  %277 = fpext float %276 to double
  %278 = fdiv double %277, 1.000000e+00
  %279 = fmul double %278, 2.550000e+02
  %280 = fptoui double %279 to i8
  %281 = load ptr, ptr %23, align 8, !tbaa !5
  %282 = load i32, ptr %25, align 4, !tbaa !11
  %283 = mul i32 3, %282
  %284 = zext i32 %283 to i64
  %285 = getelementptr inbounds i8, ptr %281, i64 %284
  store i8 %280, ptr %285, align 1, !tbaa !24
  %286 = getelementptr inbounds %"class.vmath::vec3", ptr %24, i32 0, i32 1
  %287 = load float, ptr %286, align 4, !tbaa !20
  %288 = fpext float %287 to double
  %289 = fdiv double %288, 1.000000e+00
  %290 = fmul double %289, 2.550000e+02
  %291 = fptoui double %290 to i8
  %292 = load ptr, ptr %23, align 8, !tbaa !5
  %293 = load i32, ptr %25, align 4, !tbaa !11
  %294 = mul i32 3, %293
  %295 = add i32 %294, 1
  %296 = zext i32 %295 to i64
  %297 = getelementptr inbounds i8, ptr %292, i64 %296
  store i8 %291, ptr %297, align 1, !tbaa !24
  %298 = getelementptr inbounds %"class.vmath::vec3", ptr %24, i32 0, i32 2
  %299 = load float, ptr %298, align 4, !tbaa !21
  %300 = fpext float %299 to double
  %301 = fdiv double %300, 1.000000e+00
  %302 = fmul double %301, 2.550000e+02
  %303 = fptoui double %302 to i8
  %304 = load ptr, ptr %23, align 8, !tbaa !5
  %305 = load i32, ptr %25, align 4, !tbaa !11
  %306 = mul i32 3, %305
  %307 = add i32 %306, 2
  %308 = zext i32 %307 to i64
  %309 = getelementptr inbounds i8, ptr %304, i64 %308
  store i8 %303, ptr %309, align 1, !tbaa !24
  br label %310

310:                                              ; preds = %270
  %311 = load i32, ptr %25, align 4, !tbaa !11
  %312 = add i32 %311, 1
  store i32 %312, ptr %25, align 4, !tbaa !11
  br label %255, !llvm.loop !25

313:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #10
  store i32 0, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #10
  store i32 0, ptr %27, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  store i32 12, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  store i32 3, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #10
  store i32 0, ptr %30, align 4, !tbaa !11
  br label %314

314:                                              ; preds = %352, %313
  %315 = load i32, ptr %30, align 4, !tbaa !11
  %316 = zext i32 %315 to i64
  %317 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %318 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %317) #10
  %319 = icmp ult i64 %316, %318
  br i1 %319, label %321, label %320

320:                                              ; preds = %314
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #10
  br label %355

321:                                              ; preds = %314
  %322 = load ptr, ptr %19, align 8, !tbaa !5
  %323 = load i32, ptr %16, align 4, !tbaa !11
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds i8, ptr %322, i64 %324
  %326 = load ptr, ptr %20, align 8, !tbaa !5
  %327 = load i32, ptr %26, align 4, !tbaa !11
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds float, ptr %326, i64 %328
  %330 = load i32, ptr %28, align 4, !tbaa !11
  %331 = sext i32 %330 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %325, ptr align 4 %329, i64 %331, i1 false)
  %332 = load i32, ptr %28, align 4, !tbaa !11
  %333 = load i32, ptr %16, align 4, !tbaa !11
  %334 = add nsw i32 %333, %332
  store i32 %334, ptr %16, align 4, !tbaa !11
  %335 = load i32, ptr %26, align 4, !tbaa !11
  %336 = add nsw i32 %335, 3
  store i32 %336, ptr %26, align 4, !tbaa !11
  %337 = load ptr, ptr %19, align 8, !tbaa !5
  %338 = load i32, ptr %16, align 4, !tbaa !11
  %339 = sext i32 %338 to i64
  %340 = getelementptr inbounds i8, ptr %337, i64 %339
  %341 = load ptr, ptr %23, align 8, !tbaa !5
  %342 = load i32, ptr %27, align 4, !tbaa !11
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds i8, ptr %341, i64 %343
  %345 = load i32, ptr %29, align 4, !tbaa !11
  %346 = sext i32 %345 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %340, ptr align 1 %344, i64 %346, i1 false)
  %347 = load i32, ptr %29, align 4, !tbaa !11
  %348 = load i32, ptr %16, align 4, !tbaa !11
  %349 = add nsw i32 %348, %347
  store i32 %349, ptr %16, align 4, !tbaa !11
  %350 = load i32, ptr %27, align 4, !tbaa !11
  %351 = add nsw i32 %350, 3
  store i32 %351, ptr %27, align 4, !tbaa !11
  br label %352

352:                                              ; preds = %321
  %353 = load i32, ptr %30, align 4, !tbaa !11
  %354 = add i32 %353, 1
  store i32 %354, ptr %30, align 4, !tbaa !11
  br label %314, !llvm.loop !26

355:                                              ; preds = %320
  %356 = load ptr, ptr %23, align 8, !tbaa !5
  %357 = icmp eq ptr %356, null
  br i1 %357, label %359, label %358

358:                                              ; preds = %355
  call void @_ZdaPv(ptr noundef %356) #12
  br label %359

359:                                              ; preds = %358, %355
  %360 = load ptr, ptr %20, align 8, !tbaa !5
  %361 = icmp eq ptr %360, null
  br i1 %361, label %363, label %362

362:                                              ; preds = %359
  call void @_ZdaPv(ptr noundef %360) #12
  br label %363

363:                                              ; preds = %362, %359
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #10
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %24) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %21) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %447

364:                                              ; preds = %266, %262
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %21) #10
  br label %365

365:                                              ; preds = %364, %213
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #10
  br label %366

366:                                              ; preds = %365, %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  br label %538

367:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %368 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %369 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %368) #10
  %370 = mul i64 3, %369
  %371 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %370, i64 4)
  %372 = extractvalue { i64, i1 } %371, 1
  %373 = extractvalue { i64, i1 } %371, 0
  %374 = select i1 %372, i64 -1, i64 %373
  %375 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %374) #11
          to label %376 unwind label %385

376:                                              ; preds = %367
  store ptr %375, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #10
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %32)
          to label %377 unwind label %389

377:                                              ; preds = %376
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #10
  store i32 0, ptr %33, align 4, !tbaa !11
  br label %378

378:                                              ; preds = %421, %377
  %379 = load i32, ptr %33, align 4, !tbaa !11
  %380 = zext i32 %379 to i64
  %381 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %382 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %381) #10
  %383 = icmp ult i64 %380, %382
  br i1 %383, label %393, label %384

384:                                              ; preds = %378
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #10
  br label %424

385:                                              ; preds = %367
  %386 = landingpad { ptr, i32 }
          cleanup
  %387 = extractvalue { ptr, i32 } %386, 0
  store ptr %387, ptr %12, align 8
  %388 = extractvalue { ptr, i32 } %386, 1
  store i32 %388, ptr %13, align 4
  br label %446

389:                                              ; preds = %376
  %390 = landingpad { ptr, i32 }
          cleanup
  %391 = extractvalue { ptr, i32 } %390, 0
  store ptr %391, ptr %12, align 8
  %392 = extractvalue { ptr, i32 } %390, 1
  store i32 %392, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #10
  br label %446

393:                                              ; preds = %378
  %394 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %395 = load i32, ptr %33, align 4, !tbaa !11
  %396 = zext i32 %395 to i64
  %397 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %394, i64 noundef %396) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %397, i64 12, i1 false), !tbaa.struct !15
  %398 = getelementptr inbounds %"class.vmath::vec3", ptr %32, i32 0, i32 0
  %399 = load float, ptr %398, align 4, !tbaa !18
  %400 = load ptr, ptr %31, align 8, !tbaa !5
  %401 = load i32, ptr %33, align 4, !tbaa !11
  %402 = mul i32 3, %401
  %403 = zext i32 %402 to i64
  %404 = getelementptr inbounds float, ptr %400, i64 %403
  store float %399, ptr %404, align 4, !tbaa !16
  %405 = getelementptr inbounds %"class.vmath::vec3", ptr %32, i32 0, i32 1
  %406 = load float, ptr %405, align 4, !tbaa !20
  %407 = load ptr, ptr %31, align 8, !tbaa !5
  %408 = load i32, ptr %33, align 4, !tbaa !11
  %409 = mul i32 3, %408
  %410 = add i32 %409, 1
  %411 = zext i32 %410 to i64
  %412 = getelementptr inbounds float, ptr %407, i64 %411
  store float %406, ptr %412, align 4, !tbaa !16
  %413 = getelementptr inbounds %"class.vmath::vec3", ptr %32, i32 0, i32 2
  %414 = load float, ptr %413, align 4, !tbaa !21
  %415 = load ptr, ptr %31, align 8, !tbaa !5
  %416 = load i32, ptr %33, align 4, !tbaa !11
  %417 = mul i32 3, %416
  %418 = add i32 %417, 2
  %419 = zext i32 %418 to i64
  %420 = getelementptr inbounds float, ptr %415, i64 %419
  store float %414, ptr %420, align 4, !tbaa !16
  br label %421

421:                                              ; preds = %393
  %422 = load i32, ptr %33, align 4, !tbaa !11
  %423 = add i32 %422, 1
  store i32 %423, ptr %33, align 4, !tbaa !11
  br label %378, !llvm.loop !27

424:                                              ; preds = %384
  %425 = load ptr, ptr %19, align 8, !tbaa !5
  %426 = load i32, ptr %16, align 4, !tbaa !11
  %427 = sext i32 %426 to i64
  %428 = getelementptr inbounds i8, ptr %425, i64 %427
  %429 = load ptr, ptr %31, align 8, !tbaa !5
  %430 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %431 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %430) #10
  %432 = mul i64 12, %431
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %428, ptr align 4 %429, i64 %432, i1 false)
  %433 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 0
  %434 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %433) #10
  %435 = trunc i64 %434 to i32
  %436 = sext i32 %435 to i64
  %437 = mul i64 12, %436
  %438 = load i32, ptr %16, align 4, !tbaa !11
  %439 = sext i32 %438 to i64
  %440 = add i64 %439, %437
  %441 = trunc i64 %440 to i32
  store i32 %441, ptr %16, align 4, !tbaa !11
  %442 = load ptr, ptr %31, align 8, !tbaa !5
  %443 = icmp eq ptr %442, null
  br i1 %443, label %445, label %444

444:                                              ; preds = %424
  call void @_ZdaPv(ptr noundef %442) #12
  br label %445

445:                                              ; preds = %444, %424
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %32) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  br label %447

446:                                              ; preds = %389, %385
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  br label %538

447:                                              ; preds = %445, %363
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #10
  invoke void @_ZN8TriangleC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %34)
          to label %448 unwind label %456

448:                                              ; preds = %447
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #10
  store i32 0, ptr %36, align 4, !tbaa !11
  br label %449

449:                                              ; preds = %494, %448
  %450 = load i32, ptr %36, align 4, !tbaa !11
  %451 = zext i32 %450 to i64
  %452 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 3
  %453 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %452) #10
  %454 = icmp ult i64 %451, %453
  br i1 %454, label %460, label %455

455:                                              ; preds = %449
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #10
  br label %497

456:                                              ; preds = %447
  %457 = landingpad { ptr, i32 }
          cleanup
  %458 = extractvalue { ptr, i32 } %457, 0
  store ptr %458, ptr %12, align 8
  %459 = extractvalue { ptr, i32 } %457, 1
  store i32 %459, ptr %13, align 4
  br label %537

460:                                              ; preds = %449
  %461 = getelementptr inbounds %class.TriangleMesh, ptr %39, i32 0, i32 3
  %462 = load i32, ptr %36, align 4, !tbaa !11
  %463 = zext i32 %462 to i64
  %464 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %461, i64 noundef %463) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 4 %464, i64 12, i1 false), !tbaa.struct !28
  %465 = getelementptr inbounds %struct.Triangle, ptr %34, i32 0, i32 0
  %466 = getelementptr inbounds [3 x i32], ptr %465, i64 0, i64 0
  %467 = load i32, ptr %466, align 4, !tbaa !11
  %468 = getelementptr inbounds [3 x i32], ptr %35, i64 0, i64 0
  store i32 %467, ptr %468, align 4, !tbaa !11
  %469 = getelementptr inbounds %struct.Triangle, ptr %34, i32 0, i32 0
  %470 = getelementptr inbounds [3 x i32], ptr %469, i64 0, i64 1
  %471 = load i32, ptr %470, align 4, !tbaa !11
  %472 = getelementptr inbounds [3 x i32], ptr %35, i64 0, i64 1
  store i32 %471, ptr %472, align 4, !tbaa !11
  %473 = getelementptr inbounds %struct.Triangle, ptr %34, i32 0, i32 0
  %474 = getelementptr inbounds [3 x i32], ptr %473, i64 0, i64 2
  %475 = load i32, ptr %474, align 4, !tbaa !11
  %476 = getelementptr inbounds [3 x i32], ptr %35, i64 0, i64 2
  store i32 %475, ptr %476, align 4, !tbaa !11
  %477 = load ptr, ptr %19, align 8, !tbaa !5
  %478 = load i32, ptr %16, align 4, !tbaa !11
  %479 = sext i32 %478 to i64
  %480 = getelementptr inbounds i8, ptr %477, i64 %479
  store i8 3, ptr %480, align 1, !tbaa !24
  %481 = load i32, ptr %16, align 4, !tbaa !11
  %482 = sext i32 %481 to i64
  %483 = add i64 %482, 1
  %484 = trunc i64 %483 to i32
  store i32 %484, ptr %16, align 4, !tbaa !11
  %485 = load ptr, ptr %19, align 8, !tbaa !5
  %486 = load i32, ptr %16, align 4, !tbaa !11
  %487 = sext i32 %486 to i64
  %488 = getelementptr inbounds i8, ptr %485, i64 %487
  %489 = getelementptr inbounds [3 x i32], ptr %35, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %488, ptr align 4 %489, i64 12, i1 false)
  %490 = load i32, ptr %16, align 4, !tbaa !11
  %491 = sext i32 %490 to i64
  %492 = add i64 %491, 12
  %493 = trunc i64 %492 to i32
  store i32 %493, ptr %16, align 4, !tbaa !11
  br label %494

494:                                              ; preds = %460
  %495 = load i32, ptr %36, align 4, !tbaa !11
  %496 = add i32 %495, 1
  store i32 %496, ptr %36, align 4, !tbaa !11
  br label %449, !llvm.loop !29

497:                                              ; preds = %455
  call void @llvm.lifetime.start.p0(i64 512, ptr %37) #10
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %37)
          to label %498 unwind label %518

498:                                              ; preds = %497
  %499 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #10
  %500 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 32)
          to label %501 unwind label %522

501:                                              ; preds = %498
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %37, ptr noundef %499, i32 noundef %500)
          to label %502 unwind label %522

502:                                              ; preds = %501
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %37)
          to label %503 unwind label %522

503:                                              ; preds = %502
  call void @llvm.lifetime.start.p0(i64 512, ptr %38) #10
  %504 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #10
  %505 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 4)
          to label %506 unwind label %526

506:                                              ; preds = %503
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %38, ptr noundef %504, i32 noundef %505)
          to label %507 unwind label %526

507:                                              ; preds = %506
  %508 = load ptr, ptr %19, align 8, !tbaa !5
  %509 = load i32, ptr %18, align 4, !tbaa !11
  %510 = sext i32 %509 to i64
  %511 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef %508, i64 noundef %510)
          to label %512 unwind label %530

512:                                              ; preds = %507
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %38)
          to label %513 unwind label %530

513:                                              ; preds = %512
  %514 = load ptr, ptr %19, align 8, !tbaa !5
  %515 = icmp eq ptr %514, null
  br i1 %515, label %517, label %516

516:                                              ; preds = %513
  call void @_ZdaPv(ptr noundef %514) #12
  br label %517

517:                                              ; preds = %516, %513
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %38) #10
  call void @llvm.lifetime.end.p0(i64 512, ptr %38) #10
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %37) #10
  call void @llvm.lifetime.end.p0(i64 512, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 49, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 125, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 65, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 51, ptr %5) #10
  ret void

518:                                              ; preds = %497
  %519 = landingpad { ptr, i32 }
          cleanup
  %520 = extractvalue { ptr, i32 } %519, 0
  store ptr %520, ptr %12, align 8
  %521 = extractvalue { ptr, i32 } %519, 1
  store i32 %521, ptr %13, align 4
  br label %536

522:                                              ; preds = %502, %501, %498
  %523 = landingpad { ptr, i32 }
          cleanup
  %524 = extractvalue { ptr, i32 } %523, 0
  store ptr %524, ptr %12, align 8
  %525 = extractvalue { ptr, i32 } %523, 1
  store i32 %525, ptr %13, align 4
  br label %535

526:                                              ; preds = %506, %503
  %527 = landingpad { ptr, i32 }
          cleanup
  %528 = extractvalue { ptr, i32 } %527, 0
  store ptr %528, ptr %12, align 8
  %529 = extractvalue { ptr, i32 } %527, 1
  store i32 %529, ptr %13, align 4
  br label %534

530:                                              ; preds = %512, %507
  %531 = landingpad { ptr, i32 }
          cleanup
  %532 = extractvalue { ptr, i32 } %531, 0
  store ptr %532, ptr %12, align 8
  %533 = extractvalue { ptr, i32 } %531, 1
  store i32 %533, ptr %13, align 4
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %38) #10
  br label %534

534:                                              ; preds = %530, %526
  call void @llvm.lifetime.end.p0(i64 512, ptr %38) #10
  br label %535

535:                                              ; preds = %534, %522
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %37) #10
  br label %536

536:                                              ; preds = %535, %518
  call void @llvm.lifetime.end.p0(i64 512, ptr %37) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #10
  br label %537

537:                                              ; preds = %536, %456
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #10
  br label %538

538:                                              ; preds = %537, %446, %366, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  br label %539

539:                                              ; preds = %538, %64
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 49, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 125, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 65, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 51, ptr %5) #10
  br label %540

540:                                              ; preds = %539
  %541 = load ptr, ptr %12, align 8
  %542 = load i32, ptr %13, align 4
  %543 = insertvalue { ptr, i32 } poison, ptr %541, 0
  %544 = insertvalue { ptr, i32 } %543, i32 %542, 1
  resume { ptr, i32 } %544
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12TriangleMesh9_toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(232), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

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

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #7

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

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

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #9

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 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_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) #3 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) #7

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{i64 0, i64 4, !16, i64 4, i64 4, !16, i64 8, i64 4, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!19, !17, i64 0}
!19 = !{!"_ZTSN5vmath4vec3E", !17, i64 0, !17, i64 4, !17, i64 8}
!20 = !{!19, !17, i64 4}
!21 = !{!19, !17, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !23}
!28 = !{i64 0, i64 12, !24}
!29 = distinct !{!29, !23}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.vmath::vec3" = type { float, float, float }
%struct.Triangle = type { [3 x i32] }
%"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.23 }
%union.anon.23 = 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 }

@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header1 = external hidden unnamed_addr constant [51 x i8], align 16
@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2 = external hidden unnamed_addr constant [65 x i8], align 16
@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2color = external hidden unnamed_addr constant [125 x i8], align 16
@__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header3 = external hidden unnamed_addr constant [49 x i8], align 16

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.vmath::vec3", align 4
  %6 = alloca %"class.vmath::vec3", align 4
  %7 = alloca %"class.vmath::vec3", align 4
  %8 = alloca %struct.Triangle, align 8
  %9 = alloca %"class.std::basic_ofstream", align 8
  %10 = alloca %"class.std::basic_ofstream", align 8
  %11 = tail call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = tail call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %14 = icmp eq i64 %11, %13
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  %15 = tail call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  call void @_ZN12TriangleMesh9_toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(232) %0, i64 noundef %15)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  %16 = getelementptr inbounds i8, ptr %0, i64 72
  %17 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  invoke void @_ZN12TriangleMesh9_toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(232) %0, i64 noundef %17)
          to label %18 unwind label %23

18:                                               ; preds = %2
  %19 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  %20 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  %.pn = select i1 %14, i64 225, i64 165
  %.0114.in = add i64 %.pn, %19
  %.0114 = add i64 %.0114.in, %20
  %21 = and i64 %.0114, 4294967295
  %22 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  br i1 %14, label %25, label %35

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

25:                                               ; preds = %18
  %26 = shl i64 %22, 2
  %27 = and i64 %26, 4294967292
  %28 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %29 = add i64 %27, %28
  %30 = mul i64 %29, 3
  %31 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %32 = mul i64 %31, 13
  %33 = add i64 %32, %21
  %34 = add i64 %33, %30
  br label %41

35:                                               ; preds = %18
  %36 = mul i64 %22, 12
  %37 = add i64 %36, %21
  %38 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %39 = mul i64 %38, 13
  %40 = add i64 %37, %39
  br label %41

41:                                               ; preds = %35, %25
  %.0116.in = phi i64 [ %34, %25 ], [ %40, %35 ]
  %sext = shl i64 %.0116.in, 32
  %42 = ashr exact i64 %sext, 32
  %43 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %42) #10
          to label %44 unwind label %52

44:                                               ; preds = %41
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(51) %43, ptr noundef nonnull align 16 dereferenceable(51) @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header1, i64 51, i1 false)
  %45 = getelementptr inbounds i8, ptr %43, i64 51
  %46 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  %sext128 = shl i64 %19, 32
  %47 = ashr exact i64 %sext128, 32
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %45, ptr align 1 %46, i64 %47, i1 false)
  %48 = shl i64 %19, 32
  %sext176 = add i64 %48, 219043332096
  %49 = ashr exact i64 %sext176, 32
  %50 = getelementptr inbounds i8, ptr %43, i64 %49
  br i1 %14, label %51, label %54

51:                                               ; preds = %44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(125) %50, ptr noundef nonnull align 16 dereferenceable(125) @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2color, i64 125, i1 false)
  br label %55

52:                                               ; preds = %41
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %228

54:                                               ; preds = %44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(65) %50, ptr noundef nonnull align 16 dereferenceable(65) @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header2, i64 65, i1 false)
  br label %55

55:                                               ; preds = %54, %51
  %.sink = phi i64 [ 116, %54 ], [ 176, %51 ]
  %56 = add i64 %19, %.sink
  %sext129 = shl i64 %56, 32
  %57 = ashr exact i64 %sext129, 32
  %58 = getelementptr inbounds i8, ptr %43, i64 %57
  %59 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  %sext130 = shl i64 %20, 32
  %60 = ashr exact i64 %sext130, 32
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %58, ptr align 1 %59, i64 %60, i1 false)
  %61 = add i64 %56, %20
  %62 = trunc i64 %61 to i32
  %sext131 = shl i64 %61, 32
  %63 = ashr exact i64 %sext131, 32
  %64 = getelementptr inbounds i8, ptr %43, i64 %63
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(49) %64, ptr noundef nonnull align 16 dereferenceable(49) @__const._ZN12TriangleMesh14writeMeshToPLYENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.header3, i64 49, i1 false)
  %65 = add i32 %62, 49
  %66 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %67 = mul i64 %66, 3
  %68 = icmp ugt i64 %67, 4611686018427387903
  %69 = mul i64 %66, 12
  %70 = select i1 %68, i64 -1, i64 %69
  br i1 %14, label %71, label %151

71:                                               ; preds = %55
  %72 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %70) #10
          to label %73 unwind label %80

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #9
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
          to label %.preheader146 unwind label %82

.preheader146:                                    ; preds = %73
  %74 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %.not165 = icmp eq i64 %74, 0
  br i1 %.not165, label %._crit_edge151, label %.lr.ph150

.lr.ph150:                                        ; preds = %.preheader146
  %75 = getelementptr inbounds i8, ptr %5, i64 4
  %76 = getelementptr inbounds i8, ptr %5, i64 8
  br label %84

._crit_edge151:                                   ; preds = %84, %.preheader146
  %77 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %78 = mul i64 %77, 3
  %79 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %78) #10
          to label %103 unwind label %109

80:                                               ; preds = %71
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %228

82:                                               ; preds = %73
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %150

84:                                               ; preds = %.lr.ph150, %84
  %85 = phi i64 [ 0, %.lr.ph150 ], [ %100, %84 ]
  %.0117149 = phi i32 [ 0, %.lr.ph150 ], [ %99, %84 ]
  %86 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %85) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %86, i64 12, i1 false), !tbaa.struct !5
  %87 = load float, ptr %5, align 4, !tbaa !10
  %88 = mul i32 %.0117149, 3
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %72, i64 %89
  store float %87, ptr %90, align 4, !tbaa !6
  %91 = load float, ptr %75, align 4, !tbaa !12
  %92 = add i32 %88, 1
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds float, ptr %72, i64 %93
  store float %91, ptr %94, align 4, !tbaa !6
  %95 = load float, ptr %76, align 4, !tbaa !13
  %96 = add i32 %88, 2
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds float, ptr %72, i64 %97
  store float %95, ptr %98, align 4, !tbaa !6
  %99 = add i32 %.0117149, 1
  %100 = zext i32 %99 to i64
  %101 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %102 = icmp ugt i64 %101, %100
  br i1 %102, label %84, label %._crit_edge151, !llvm.loop !14

103:                                              ; preds = %._crit_edge151
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #9
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %.preheader145 unwind label %111

.preheader145:                                    ; preds = %103
  %104 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %.not166 = icmp eq i64 %104, 0
  br i1 %.not166, label %.preheader, label %.lr.ph153

.lr.ph153:                                        ; preds = %.preheader145
  %105 = getelementptr inbounds i8, ptr %6, i64 4
  %106 = getelementptr inbounds i8, ptr %6, i64 8
  br label %113

.preheader:                                       ; preds = %113, %.preheader145
  %invariant.gep = getelementptr i8, ptr %43, i64 12
  %107 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %.not167 = icmp eq i64 %107, 0
  br i1 %.not167, label %._crit_edge159, label %.lr.ph158.preheader

.lr.ph158.preheader:                              ; preds = %.preheader
  %108 = sext i32 %65 to i64
  br label %.lr.ph158

109:                                              ; preds = %._crit_edge151
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %149

111:                                              ; preds = %103
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #9
  br label %149

113:                                              ; preds = %.lr.ph153, %113
  %114 = phi i64 [ 0, %.lr.ph153 ], [ %138, %113 ]
  %.0120152 = phi i32 [ 0, %.lr.ph153 ], [ %137, %113 ]
  %115 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %114) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %115, i64 12, i1 false), !tbaa.struct !5
  %116 = load float, ptr %6, align 4, !tbaa !10
  %117 = fpext float %116 to double
  %118 = fmul double %117, 2.550000e+02
  %119 = fptoui double %118 to i8
  %120 = mul i32 %.0120152, 3
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds i8, ptr %79, i64 %121
  store i8 %119, ptr %122, align 1, !tbaa !16
  %123 = load float, ptr %105, align 4, !tbaa !12
  %124 = fpext float %123 to double
  %125 = fmul double %124, 2.550000e+02
  %126 = fptoui double %125 to i8
  %127 = add i32 %120, 1
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %79, i64 %128
  store i8 %126, ptr %129, align 1, !tbaa !16
  %130 = load float, ptr %106, align 4, !tbaa !13
  %131 = fpext float %130 to double
  %132 = fmul double %131, 2.550000e+02
  %133 = fptoui double %132 to i8
  %134 = add i32 %120, 2
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds i8, ptr %79, i64 %135
  store i8 %133, ptr %136, align 1, !tbaa !16
  %137 = add i32 %.0120152, 1
  %138 = zext i32 %137 to i64
  %139 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %140 = icmp ugt i64 %139, %138
  br i1 %140, label %113, label %.preheader, !llvm.loop !17

.lr.ph158:                                        ; preds = %.lr.ph158.preheader, %.lr.ph158
  %indvars.iv169 = phi i64 [ 0, %.lr.ph158.preheader ], [ %indvars.iv.next170, %.lr.ph158 ]
  %indvars.iv = phi i64 [ %108, %.lr.ph158.preheader ], [ %indvars.iv.next, %.lr.ph158 ]
  %.0115156 = phi i32 [ 0, %.lr.ph158.preheader ], [ %144, %.lr.ph158 ]
  %141 = getelementptr inbounds i8, ptr %43, i64 %indvars.iv
  %142 = getelementptr inbounds float, ptr %72, i64 %indvars.iv169
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(12) %141, ptr noundef nonnull align 4 dereferenceable(12) %142, i64 12, i1 false)
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 3
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv
  %143 = getelementptr inbounds i8, ptr %79, i64 %indvars.iv169
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %gep, ptr noundef nonnull align 1 dereferenceable(3) %143, i64 3, i1 false)
  %indvars.iv.next = add nsw i64 %indvars.iv, 15
  %144 = add i32 %.0115156, 1
  %145 = zext i32 %144 to i64
  %146 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %147 = icmp ugt i64 %146, %145
  br i1 %147, label %.lr.ph158, label %._crit_edge159.loopexit, !llvm.loop !18

._crit_edge159.loopexit:                          ; preds = %.lr.ph158
  %148 = trunc nsw i64 %indvars.iv.next to i32
  br label %._crit_edge159

._crit_edge159:                                   ; preds = %._crit_edge159.loopexit, %.preheader
  %.1110.lcssa = phi i32 [ %65, %.preheader ], [ %148, %._crit_edge159.loopexit ]
  call void @_ZdaPv(ptr noundef nonnull %79) #11
  call void @_ZdaPv(ptr noundef nonnull %72) #11
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %6) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #9
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #9
  br label %188

149:                                              ; preds = %111, %109
  %.pn135 = phi { ptr, i32 } [ %112, %111 ], [ %110, %109 ]
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #9
  br label %150

150:                                              ; preds = %149, %82
  %.pn135.pn = phi { ptr, i32 } [ %.pn135, %149 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #9
  br label %228

151:                                              ; preds = %55
  %152 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %70) #10
          to label %153 unwind label %165

153:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #9
  invoke void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7)
          to label %.preheader147 unwind label %167

.preheader147:                                    ; preds = %153
  %154 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %.not = icmp eq i64 %154, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader147
  %155 = getelementptr inbounds i8, ptr %7, i64 4
  %156 = getelementptr inbounds i8, ptr %7, i64 8
  br label %169

._crit_edge:                                      ; preds = %169, %.preheader147
  %157 = sext i32 %65 to i64
  %158 = getelementptr inbounds i8, ptr %43, i64 %157
  %159 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %160 = mul i64 %159, 12
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %158, ptr nonnull align 4 %152, i64 %160, i1 false)
  %161 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %162 = trunc i64 %161 to i32
  %163 = mul i32 %162, 12
  %164 = add i32 %163, %65
  call void @_ZdaPv(ptr noundef nonnull %152) #11
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %7) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #9
  br label %188

165:                                              ; preds = %151
  %166 = landingpad { ptr, i32 }
          cleanup
  br label %228

167:                                              ; preds = %153
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #9
  br label %228

169:                                              ; preds = %.lr.ph, %169
  %170 = phi i64 [ 0, %.lr.ph ], [ %185, %169 ]
  %.0113148 = phi i32 [ 0, %.lr.ph ], [ %184, %169 ]
  %171 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN5vmath4vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %170) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %171, i64 12, i1 false), !tbaa.struct !5
  %172 = load float, ptr %7, align 4, !tbaa !10
  %173 = mul i32 %.0113148, 3
  %174 = zext i32 %173 to i64
  %175 = getelementptr inbounds float, ptr %152, i64 %174
  store float %172, ptr %175, align 4, !tbaa !6
  %176 = load float, ptr %155, align 4, !tbaa !12
  %177 = add i32 %173, 1
  %178 = zext i32 %177 to i64
  %179 = getelementptr inbounds float, ptr %152, i64 %178
  store float %176, ptr %179, align 4, !tbaa !6
  %180 = load float, ptr %156, align 4, !tbaa !13
  %181 = add i32 %173, 2
  %182 = zext i32 %181 to i64
  %183 = getelementptr inbounds float, ptr %152, i64 %182
  store float %180, ptr %183, align 4, !tbaa !6
  %184 = add i32 %.0113148, 1
  %185 = zext i32 %184 to i64
  %186 = call noundef i64 @_ZNKSt6vectorIN5vmath4vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #9
  %187 = icmp ugt i64 %186, %185
  br i1 %187, label %169, label %._crit_edge, !llvm.loop !19

188:                                              ; preds = %._crit_edge, %._crit_edge159
  %.2111 = phi i32 [ %.1110.lcssa, %._crit_edge159 ], [ %164, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #9
  call void @_ZN8TriangleC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %189 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %.not168 = icmp eq i64 %189, 0
  br i1 %.not168, label %._crit_edge164, label %.lr.ph163

.lr.ph163:                                        ; preds = %188
  %190 = getelementptr inbounds i8, ptr %8, i64 8
  br label %191

._crit_edge164:                                   ; preds = %191, %188
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %9) #9
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %9)
          to label %206 unwind label %217

191:                                              ; preds = %.lr.ph163, %191
  %192 = phi i64 [ 0, %.lr.ph163 ], [ %203, %191 ]
  %.0161 = phi i32 [ 0, %.lr.ph163 ], [ %202, %191 ]
  %.3112160 = phi i32 [ %.2111, %.lr.ph163 ], [ %201, %191 ]
  %193 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %192) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %193, i64 12, i1 false), !tbaa.struct !20
  %194 = load i32, ptr %190, align 8, !tbaa !21
  %195 = sext i32 %.3112160 to i64
  %196 = getelementptr inbounds i8, ptr %43, i64 %195
  store i8 3, ptr %196, align 1, !tbaa !16
  %197 = add i32 %.3112160, 1
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i8, ptr %43, i64 %198
  %200 = load <2 x i32>, ptr %8, align 8, !tbaa !21
  store <2 x i32> %200, ptr %199, align 1
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %199, i64 8
  store i32 %194, ptr %.sroa.6.0..sroa_idx, align 1
  %201 = add i32 %.3112160, 13
  %202 = add i32 %.0161, 1
  %203 = zext i32 %202 to i64
  %204 = call noundef i64 @_ZNKSt6vectorI8TriangleSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %205 = icmp ugt i64 %204, %203
  br i1 %205, label %191, label %._crit_edge164, !llvm.loop !23

206:                                              ; preds = %._crit_edge164
  %207 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %208 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 32)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %9, ptr noundef %207, i32 noundef %208)
          to label %209 unwind label %219

209:                                              ; preds = %206
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %9)
          to label %210 unwind label %219

210:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %10) #9
  %211 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %212 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 4)
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %10, ptr noundef %211, i32 noundef %212)
          to label %213 unwind label %221

213:                                              ; preds = %210
  %214 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull %43, i64 noundef %42)
          to label %215 unwind label %223

215:                                              ; preds = %213
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %10)
          to label %216 unwind label %223

216:                                              ; preds = %215
  call void @_ZdaPv(ptr noundef nonnull %43) #11
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %10) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %10) #9
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %9) #9
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  ret void

217:                                              ; preds = %._crit_edge164
  %218 = landingpad { ptr, i32 }
          cleanup
  br label %227

219:                                              ; preds = %209, %206
  %220 = landingpad { ptr, i32 }
          cleanup
  br label %226

221:                                              ; preds = %210
  %222 = landingpad { ptr, i32 }
          cleanup
  br label %225

223:                                              ; preds = %215, %213
  %224 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %10) #9
  br label %225

225:                                              ; preds = %223, %221
  %.pn139 = phi { ptr, i32 } [ %224, %223 ], [ %222, %221 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %10) #9
  br label %226

226:                                              ; preds = %225, %219
  %.pn139.pn = phi { ptr, i32 } [ %.pn139, %225 ], [ %220, %219 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %9) #9
  br label %227

227:                                              ; preds = %226, %217
  %.pn139.pn.pn = phi { ptr, i32 } [ %.pn139.pn, %226 ], [ %218, %217 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #9
  br label %228

228:                                              ; preds = %165, %167, %80, %150, %227, %52
  %.pn139.pn.pn.pn = phi { ptr, i32 } [ %.pn139.pn.pn, %227 ], [ %53, %52 ], [ %.pn135.pn, %150 ], [ %81, %80 ], [ %168, %167 ], [ %166, %165 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  br label %229

229:                                              ; preds = %228, %23
  %.pn139.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn139.pn.pn.pn, %228 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn139.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN12TriangleMesh9_toStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(232), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

declare void @_ZN5vmath4vec3C1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #6

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

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

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI8TriangleSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 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_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) local_unnamed_addr #3 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 uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) local_unnamed_addr #6

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

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

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

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


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