; LLVM IR from StanfordVL/GibsonEnv :: gibson/core/channels/common (tinyply)

; 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.__gnu_cxx::__normal_iterator.41" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.42" = type { ptr }
%"struct.tinyply::PlyFile::PlyFileImpl" = type { %"class.std::map.14", i8, i8, %"class.std::vector.9", %"class.std::vector.20", %"class.std::vector.20" }
%"class.std::map.14" = type { %"class.std::_Rb_tree.15" }
%"class.std::_Rb_tree.15" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, tinyply::PlyFile::PlyFileImpl::ParsingHelper>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, tinyply::PlyFile::PlyFileImpl::ParsingHelper>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, tinyply::PlyFile::PlyFileImpl::ParsingHelper>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, tinyply::PlyFile::PlyFileImpl::ParsingHelper>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<tinyply::PlyElement, std::allocator<tinyply::PlyElement>>::_Vector_impl" }
%"struct.std::_Vector_base<tinyply::PlyElement, std::allocator<tinyply::PlyElement>>::_Vector_impl" = type { %"struct.std::_Vector_base<tinyply::PlyElement, std::allocator<tinyply::PlyElement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<tinyply::PlyElement, std::allocator<tinyply::PlyElement>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.tinyply::PlyElement" = type { %"class.std::__cxx11::basic_string", i64, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<tinyply::PlyProperty, std::allocator<tinyply::PlyProperty>>::_Vector_impl" }
%"struct.std::_Vector_base<tinyply::PlyProperty, std::allocator<tinyply::PlyProperty>>::_Vector_impl" = type { %"struct.std::_Vector_base<tinyply::PlyProperty, std::allocator<tinyply::PlyProperty>>::_Vector_impl_data" }
%"struct.std::_Vector_base<tinyply::PlyProperty, std::allocator<tinyply::PlyProperty>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.tinyply::PlyProperty" = type { %"class.std::__cxx11::basic_string", i8, i8, i8, i32 }
%"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper" = type { %"class.std::shared_ptr", %"class.std::shared_ptr.35" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.35" = type { %"class.std::__shared_ptr.36" }
%"class.std::__shared_ptr.36" = type { ptr, %"class.std::__shared_count" }
%"struct.tinyply::PlyData" = type { i8, i64, %"class.tinyply::Buffer" }
%"class.tinyply::Buffer" = type { ptr, %"class.std::unique_ptr", i64 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.40" }
%"struct.std::_Head_base.40" = type { ptr }
%"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor" = type { i64, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128), i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7tinyply7PlyFile11PlyFileImpl21write_binary_internalERSo(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca [4 x i8], align 1
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8
  %23 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl", ptr %22, i32 0, i32 1
  store i8 1, ptr %23, align 8, !tbaa !9
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7tinyply7PlyFile11PlyFileImpl12write_headerERSo(ptr noundef nonnull align 8 dereferenceable(128) %22, ptr noundef nonnull align 8 dereferenceable(8) %24)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %25 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl", ptr %22, i32 0, i32 3
  store ptr %25, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.41", ptr %6, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  %31 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.41", ptr %7, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  br label %32

32:                                               ; preds = %141, %2
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %33, label %35, label %34

34:                                               ; preds = %32
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %143

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %36 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  store ptr %36, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !29
  br label %37

37:                                               ; preds = %137, %35
  %38 = load i64, ptr %10, align 8, !tbaa !29
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.tinyply::PlyElement", ptr %39, i32 0, i32 1
  %41 = load i64, ptr %40, align 8, !tbaa !30
  %42 = icmp ult i64 %38, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %37
  store i32 4, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %140

44:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.tinyply::PlyElement", ptr %45, i32 0, i32 2
  store ptr %46, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = call ptr @_ZNSt6vectorIN7tinyply11PlyPropertyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #6
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.42", ptr %12, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = call ptr @_ZNSt6vectorIN7tinyply11PlyPropertyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #6
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.42", ptr %13, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  br label %53

53:                                               ; preds = %134, %44
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %54, label %56, label %55

55:                                               ; preds = %53
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %136

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %57 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  store ptr %57, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %58 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl", ptr %22, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.tinyply::PlyElement", ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %61, i32 0, i32 0
  call void @_Z8make_keyRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef nonnull align 8 dereferenceable(32) %62)
  %63 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7tinyply7PlyFile11PlyFileImpl13ParsingHelperESt4lessIS5_ESaISt4pairIKS5_S9_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) %58, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %64 unwind label %85

64:                                               ; preds = %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  store ptr %63, ptr %15, align 8, !tbaa !5
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %65, i32 0, i32 2
  %67 = load i8, ptr %66, align 1, !tbaa !38, !range !42, !noundef !43
  %68 = trunc i8 %67 to i1
  br i1 %68, label %69, label %113

69:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.memset.p0.i64(ptr align 1 %19, i8 0, i64 4, i1 false)
  %70 = getelementptr inbounds [4 x i8], ptr %19, i64 0, i64 0
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %71, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %70, ptr align 4 %72, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store i64 0, ptr %20, align 8, !tbaa !29
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %73, i32 0, i32 3
  %75 = load i8, ptr %74, align 2, !tbaa !44
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds [4 x i8], ptr %19, i64 0, i64 0
  call void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %22, i8 noundef zeroext %75, ptr noundef nonnull align 8 dereferenceable(8) %76, ptr noundef %77, ptr noundef nonnull align 8 dereferenceable(8) %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !45
  br label %78

78:                                               ; preds = %109, %69
  %79 = load i32, ptr %21, align 4, !tbaa !45
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %80, i32 0, i32 4
  %82 = load i32, ptr %81, align 4, !tbaa !46
  %83 = icmp slt i32 %79, %82
  br i1 %83, label %89, label %84

84:                                               ; preds = %78
  store i32 9, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %112

85:                                               ; preds = %56
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %17, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %18, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %144

89:                                               ; preds = %78
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %90, i32 0, i32 1
  %92 = load i8, ptr %91, align 8, !tbaa !47
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %94, i32 0, i32 0
  %96 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  %97 = getelementptr inbounds %"struct.tinyply::PlyData", ptr %96, i32 0, i32 2
  %98 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %97)
  %99 = load ptr, ptr %15, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %99, i32 0, i32 1
  %101 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %100) #6
  %102 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %101, i32 0, i32 0
  %103 = load i64, ptr %102, align 8, !tbaa !48
  %104 = getelementptr inbounds i8, ptr %98, i64 %103
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %105, i32 0, i32 1
  %107 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %106) #6
  %108 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %107, i32 0, i32 0
  call void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %22, i8 noundef zeroext %92, ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef %104, ptr noundef nonnull align 8 dereferenceable(8) %108)
  br label %109

109:                                              ; preds = %89
  %110 = load i32, ptr %21, align 4, !tbaa !45
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %21, align 4, !tbaa !45
  br label %78, !llvm.loop !50

112:                                              ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %133

113:                                              ; preds = %64
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %114, i32 0, i32 1
  %116 = load i8, ptr %115, align 8, !tbaa !47
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %118, i32 0, i32 0
  %120 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %119) #6
  %121 = getelementptr inbounds %"struct.tinyply::PlyData", ptr %120, i32 0, i32 2
  %122 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %121)
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %123, i32 0, i32 1
  %125 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %124) #6
  %126 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %125, i32 0, i32 0
  %127 = load i64, ptr %126, align 8, !tbaa !48
  %128 = getelementptr inbounds i8, ptr %122, i64 %127
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  %130 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %129, i32 0, i32 1
  %131 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %130) #6
  %132 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %131, i32 0, i32 0
  call void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %22, i8 noundef zeroext %116, ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef %128, ptr noundef nonnull align 8 dereferenceable(8) %132)
  br label %133

133:                                              ; preds = %113, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %134

134:                                              ; preds = %133
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %53

136:                                              ; preds = %55
  br label %137

137:                                              ; preds = %136
  %138 = load i64, ptr %10, align 8, !tbaa !29
  %139 = add i64 %138, 1
  store i64 %139, ptr %10, align 8, !tbaa !29
  br label %37, !llvm.loop !52

140:                                              ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %141

141:                                              ; preds = %140
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %32

143:                                              ; preds = %34
  ret void

144:                                              ; preds = %85
  %145 = load ptr, ptr %17, align 8
  %146 = load i32, ptr %18, align 4
  %147 = insertvalue { ptr, i32 } poison, ptr %145, 0
  %148 = insertvalue { ptr, i32 } %147, i32 %146, 1
  resume { ptr, i32 } %148
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7tinyply7PlyFile11PlyFileImpl12write_headerERSo(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7tinyply7PlyFile11PlyFileImpl13ParsingHelperESt4lessIS5_ESaISt4pairIKS5_S9_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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, !20, i64 48}
!10 = !{!"_ZTSN7tinyply7PlyFile11PlyFileImplE", !11, i64 0, !20, i64 48, !20, i64 49, !21, i64 56, !25, i64 80, !25, i64 104}
!11 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7tinyply7PlyFile11PlyFileImpl13ParsingHelperESt4lessIS5_ESaISt4pairIKS5_S9_EEE", !12, i64 0}
!12 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7tinyply7PlyFile11PlyFileImpl13ParsingHelperEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE", !13, i64 0}
!13 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7tinyply7PlyFile11PlyFileImpl13ParsingHelperEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE13_Rb_tree_implISG_Lb1EEE", !14, i64 0, !16, i64 8}
!14 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !15, i64 0}
!15 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!16 = !{!"_ZTSSt15_Rb_tree_header", !17, i64 0, !19, i64 32}
!17 = !{!"_ZTSSt18_Rb_tree_node_base", !18, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIN7tinyply10PlyElementESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN7tinyply10PlyElementESaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7tinyply10PlyElementESaIS1_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7tinyply10PlyElementESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!19, !19, i64 0}
!30 = !{!31, !19, i64 32}
!31 = !{!"_ZTSN7tinyply10PlyElementE", !32, i64 0, !19, i64 32, !34, i64 40}
!32 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !33, i64 0, !19, i64 8, !7, i64 16}
!33 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!34 = !{!"_ZTSSt6vectorIN7tinyply11PlyPropertyESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!39, !20, i64 33}
!39 = !{!"_ZTSN7tinyply11PlyPropertyE", !32, i64 0, !40, i64 32, !20, i64 33, !40, i64 34, !41, i64 36}
!40 = !{!"_ZTSN7tinyply4TypeE", !7, i64 0}
!41 = !{!"int", !7, i64 0}
!42 = !{i8 0, i8 2}
!43 = !{}
!44 = !{!39, !40, i64 34}
!45 = !{!41, !41, i64 0}
!46 = !{!39, !41, i64 36}
!47 = !{!39, !40, i64 32}
!48 = !{!49, !19, i64 0}
!49 = !{!"_ZTSN7tinyply7PlyFile11PlyFileImpl9PlyCursorE", !19, i64 0, !19, i64 8}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}
!52 = distinct !{!52, !51}


; 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.__gnu_cxx::__normal_iterator.41" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.42" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128), i8 noundef zeroext, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7tinyply7PlyFile11PlyFileImpl21write_binary_internalERSo(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.42", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca [4 x i8], align 4
  %9 = alloca i64, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 48
  store i8 1, ptr %10, align 8, !tbaa !5
  tail call void @_ZN7tinyply7PlyFile11PlyFileImpl12write_headerERSo(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %12 = tail call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %12, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %13 = tail call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %13, ptr %4, align 8
  %14 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %14, label %.lr.ph40, label %._crit_edge41

._crit_edge41:                                    ; preds = %._crit_edge38, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret void

.lr.ph40:                                         ; preds = %2, %._crit_edge38
  %15 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %16 = getelementptr inbounds i8, ptr %15, i64 32
  %17 = load i64, ptr %16, align 8, !tbaa !28
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %._crit_edge38, label %.lr.ph37

.lr.ph37:                                         ; preds = %.lr.ph40
  %18 = getelementptr inbounds i8, ptr %15, i64 40
  br label %21

._crit_edge38:                                    ; preds = %._crit_edge34, %.lr.ph40
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %20 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %20, label %.lr.ph40, label %._crit_edge41

21:                                               ; preds = %.lr.ph37, %._crit_edge34
  %.03035 = phi i64 [ 0, %.lr.ph37 ], [ %25, %._crit_edge34 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %22 = call ptr @_ZNSt6vectorIN7tinyply11PlyPropertyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  store ptr %22, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %23 = call ptr @_ZNSt6vectorIN7tinyply11PlyPropertyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  store ptr %23, ptr %6, align 8
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %24, label %.lr.ph33, label %._crit_edge34

._crit_edge34:                                    ; preds = %68, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %25 = add nuw i64 %.03035, 1
  %26 = load i64, ptr %16, align 8, !tbaa !28
  %27 = icmp ult i64 %25, %26
  br i1 %27, label %21, label %._crit_edge38, !llvm.loop !36

.lr.ph33:                                         ; preds = %21, %68
  %28 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @_Z8make_keyRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %28)
  %29 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7tinyply7PlyFile11PlyFileImpl13ParsingHelperESt4lessIS5_ESaISt4pairIKS5_S9_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %30 unwind label %43

30:                                               ; preds = %.lr.ph33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  %31 = getelementptr inbounds i8, ptr %28, i64 33
  %32 = load i8, ptr %31, align 1, !tbaa !38, !range !42, !noundef !43
  %33 = trunc nuw i8 %32 to i1
  br i1 %33, label %34, label %57

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %35 = getelementptr inbounds i8, ptr %28, i64 36
  %36 = load i32, ptr %35, align 4
  store i32 %36, ptr %8, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store i64 0, ptr %9, align 8, !tbaa !44
  %37 = getelementptr inbounds i8, ptr %28, i64 34
  %38 = load i8, ptr %37, align 2, !tbaa !45
  call void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %0, i8 noundef zeroext %38, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %39 = load i32, ptr %35, align 4, !tbaa !46
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %34
  %41 = getelementptr inbounds i8, ptr %28, i64 32
  %42 = getelementptr inbounds i8, ptr %29, i64 16
  br label %45

._crit_edge:                                      ; preds = %45, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %68

43:                                               ; preds = %.lr.ph33
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %44

45:                                               ; preds = %.lr.ph, %45
  %.031 = phi i32 [ 0, %.lr.ph ], [ %54, %45 ]
  %46 = load i8, ptr %41, align 8, !tbaa !47
  %47 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %49 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %48)
  %50 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %42) #4
  %51 = load i64, ptr %50, align 8, !tbaa !48
  %52 = getelementptr inbounds i8, ptr %49, i64 %51
  %53 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %42) #4
  call void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %0, i8 noundef zeroext %46, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %52, ptr noundef nonnull align 8 dereferenceable(8) %53)
  %54 = add nuw nsw i32 %.031, 1
  %55 = load i32, ptr %35, align 4, !tbaa !46
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %45, label %._crit_edge, !llvm.loop !50

57:                                               ; preds = %30
  %58 = getelementptr inbounds i8, ptr %28, i64 32
  %59 = load i8, ptr %58, align 8, !tbaa !47
  %60 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %62 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %61)
  %63 = getelementptr inbounds i8, ptr %29, i64 16
  %64 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %63) #4
  %65 = load i64, ptr %64, align 8, !tbaa !48
  %66 = getelementptr inbounds i8, ptr %62, i64 %65
  %67 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %63) #4
  call void @_ZN7tinyply7PlyFile11PlyFileImpl21write_property_binaryENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %0, i8 noundef zeroext %59, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %66, ptr noundef nonnull align 8 dereferenceable(8) %67)
  br label %68

68:                                               ; preds = %57, %._crit_edge
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %70 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %70, label %.lr.ph33, label %._crit_edge34
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7tinyply7PlyFile11PlyFileImpl12write_headerERSo(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7tinyply7PlyFile11PlyFileImpl13ParsingHelperESt4lessIS5_ESaISt4pairIKS5_S9_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 #4 = { 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, !19, i64 48}
!6 = !{!"_ZTSN7tinyply7PlyFile11PlyFileImplE", !7, i64 0, !19, i64 48, !19, i64 49, !20, i64 56, !24, i64 80, !24, i64 104}
!7 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7tinyply7PlyFile11PlyFileImpl13ParsingHelperESt4lessIS5_ESaISt4pairIKS5_S9_EEE", !8, i64 0}
!8 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7tinyply7PlyFile11PlyFileImpl13ParsingHelperEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE", !9, i64 0}
!9 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N7tinyply7PlyFile11PlyFileImpl13ParsingHelperEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE13_Rb_tree_implISG_Lb1EEE", !10, i64 0, !12, i64 8}
!10 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !11, i64 0}
!11 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!12 = !{!"_ZTSSt15_Rb_tree_header", !13, i64 0, !18, i64 32}
!13 = !{!"_ZTSSt18_Rb_tree_node_base", !14, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!14 = !{!"_ZTSSt14_Rb_tree_color", !15, i64 0}
!15 = !{!"omnipotent char", !16, i64 0}
!16 = !{!"Simple C++ TBAA"}
!17 = !{!"any pointer", !15, i64 0}
!18 = !{!"long", !15, i64 0}
!19 = !{!"bool", !15, i64 0}
!20 = !{!"_ZTSSt6vectorIN7tinyply10PlyElementESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN7tinyply10PlyElementESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN7tinyply10PlyElementESaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7tinyply10PlyElementESaIS1_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!24 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!28 = !{!29, !18, i64 32}
!29 = !{!"_ZTSN7tinyply10PlyElementE", !30, i64 0, !18, i64 32, !32, i64 40}
!30 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !31, i64 0, !18, i64 8, !15, i64 16}
!31 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !17, i64 0}
!32 = !{!"_ZTSSt6vectorIN7tinyply11PlyPropertyESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = !{!39, !19, i64 33}
!39 = !{!"_ZTSN7tinyply11PlyPropertyE", !30, i64 0, !40, i64 32, !19, i64 33, !40, i64 34, !41, i64 36}
!40 = !{!"_ZTSN7tinyply4TypeE", !15, i64 0}
!41 = !{!"int", !15, i64 0}
!42 = !{i8 0, i8 2}
!43 = !{}
!44 = !{!18, !18, i64 0}
!45 = !{!39, !40, i64 34}
!46 = !{!39, !41, i64 36}
!47 = !{!39, !40, i64 32}
!48 = !{!49, !18, i64 0}
!49 = !{!"_ZTSN7tinyply7PlyFile11PlyFileImpl9PlyCursorE", !18, i64 0, !18, i64 8}
!50 = distinct !{!50, !37}


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