; 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 }

@.str.24 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 @_ZN7tinyply7PlyFile11PlyFileImpl20write_property_asciiENS_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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; 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 @_ZN7tinyply7PlyFile11PlyFileImpl20write_ascii_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 i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN7tinyply7PlyFile11PlyFileImpl12write_headerERSo(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %22 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl", ptr %20, i32 0, i32 3
  store ptr %22, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.41", ptr %6, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.41", ptr %7, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  br label %29

29:                                               ; preds = %138, %2
  %30 = 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 %30, label %32, label %31

31:                                               ; preds = %29
  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 %140

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %33 = 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 %33, 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 !9
  br label %34

34:                                               ; preds = %134, %32
  %35 = load i64, ptr %10, align 8, !tbaa !9
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.tinyply::PlyElement", ptr %36, i32 0, i32 1
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = icmp ult i64 %35, %38
  br i1 %39, label %41, label %40

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

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

50:                                               ; preds = %129, %41
  %51 = 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 %51, label %53, label %52

52:                                               ; preds = %50
  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 %131

53:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %54 = 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 %54, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %55 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl", ptr %20, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.tinyply::PlyElement", ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %58, 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) %57, ptr noundef nonnull align 8 dereferenceable(32) %59)
  %60 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7tinyply7PlyFile11PlyFileImpl13ParsingHelperESt4lessIS5_ESaISt4pairIKS5_S9_EEEixEOS5_(ptr noundef nonnull align 8 dereferenceable(48) %55, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %61 unwind label %80

61:                                               ; preds = %53
  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 %60, ptr %15, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %62, i32 0, i32 2
  %64 = load i8, ptr %63, align 1, !tbaa !19, !range !24, !noundef !25
  %65 = trunc i8 %64 to i1
  br i1 %65, label %66, label %108

66:                                               ; preds = %61
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %68, i32 0, i32 4
  %70 = load i32, ptr %69, align 4, !tbaa !26
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %67, i32 noundef %70)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @.str.24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !27
  br label %73

73:                                               ; preds = %104, %66
  %74 = load i32, ptr %19, align 4, !tbaa !27
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %75, i32 0, i32 4
  %77 = load i32, ptr %76, align 4, !tbaa !26
  %78 = icmp slt i32 %74, %77
  br i1 %78, label %84, label %79

79:                                               ; preds = %73
  store i32 9, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %107

80:                                               ; preds = %53
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %17, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, 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 %141

84:                                               ; preds = %73
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %85, i32 0, i32 1
  %87 = load i8, ptr %86, align 8, !tbaa !28
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %89, i32 0, i32 0
  %91 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %90) #6
  %92 = getelementptr inbounds %"struct.tinyply::PlyData", ptr %91, i32 0, i32 2
  %93 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %92)
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %94, i32 0, i32 1
  %96 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %95) #6
  %97 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %96, i32 0, i32 0
  %98 = load i64, ptr %97, align 8, !tbaa !29
  %99 = getelementptr inbounds i8, ptr %93, i64 %98
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %100, i32 0, i32 1
  %102 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %101) #6
  %103 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %102, i32 0, i32 0
  call void @_ZN7tinyply7PlyFile11PlyFileImpl20write_property_asciiENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %20, i8 noundef zeroext %87, ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef %99, ptr noundef nonnull align 8 dereferenceable(8) %103)
  br label %104

104:                                              ; preds = %84
  %105 = load i32, ptr %19, align 4, !tbaa !27
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %19, align 4, !tbaa !27
  br label %73, !llvm.loop !31

107:                                              ; preds = %79
  br label %128

108:                                              ; preds = %61
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.tinyply::PlyProperty", ptr %109, i32 0, i32 1
  %111 = load i8, ptr %110, align 8, !tbaa !28
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = load ptr, ptr %15, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %113, i32 0, i32 0
  %115 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %114) #6
  %116 = getelementptr inbounds %"struct.tinyply::PlyData", ptr %115, i32 0, i32 2
  %117 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %116)
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %118, i32 0, i32 1
  %120 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %119) #6
  %121 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %120, i32 0, i32 0
  %122 = load i64, ptr %121, align 8, !tbaa !29
  %123 = getelementptr inbounds i8, ptr %117, i64 %122
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::ParsingHelper", ptr %124, i32 0, i32 1
  %126 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %125) #6
  %127 = getelementptr inbounds %"struct.tinyply::PlyFile::PlyFileImpl::PlyCursor", ptr %126, i32 0, i32 0
  call void @_ZN7tinyply7PlyFile11PlyFileImpl20write_property_asciiENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %20, i8 noundef zeroext %111, ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef %123, ptr noundef nonnull align 8 dereferenceable(8) %127)
  br label %128

128:                                              ; preds = %108, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %129

129:                                              ; preds = %128
  %130 = 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 %50

131:                                              ; preds = %52
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef @.str.25)
  br label %134

134:                                              ; preds = %131
  %135 = load i64, ptr %10, align 8, !tbaa !9
  %136 = add i64 %135, 1
  store i64 %136, ptr %10, align 8, !tbaa !9
  br label %34, !llvm.loop !33

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

138:                                              ; preds = %137
  %139 = 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 %29

140:                                              ; preds = %31
  ret void

141:                                              ; preds = %80
  %142 = load ptr, ptr %17, align 8
  %143 = load i32, ptr %18, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145
}

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

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

; 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: 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"_ZTSN7tinyply10PlyElementE", !13, i64 0, !10, i64 32, !15, i64 40}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !10, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"_ZTSSt6vectorIN7tinyply11PlyPropertyESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!20, !22, i64 33}
!20 = !{!"_ZTSN7tinyply11PlyPropertyE", !13, i64 0, !21, i64 32, !22, i64 33, !21, i64 34, !23, i64 36}
!21 = !{!"_ZTSN7tinyply4TypeE", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"int", !7, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!20, !23, i64 36}
!27 = !{!23, !23, i64 0}
!28 = !{!20, !21, i64 32}
!29 = !{!30, !10, i64 0}
!30 = !{!"_ZTSN7tinyply7PlyFile11PlyFileImpl9PlyCursorE", !10, i64 0, !10, i64 8}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}


; 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 }

@.str.24 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 @_ZN7tinyply7PlyFile11PlyFileImpl20write_property_asciiENS_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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; 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 @_ZN7tinyply7PlyFile11PlyFileImpl20write_ascii_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
  tail call void @_ZN7tinyply7PlyFile11PlyFileImpl12write_headerERSo(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %9 = tail call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  store ptr %9, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %10 = tail call ptr @_ZNSt6vectorIN7tinyply10PlyElementESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  store ptr %10, ptr %4, align 8
  %11 = 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) #6
  br i1 %11, label %.lr.ph38, label %._crit_edge39

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

.lr.ph38:                                         ; preds = %2, %._crit_edge36
  %12 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %13 = getelementptr inbounds i8, ptr %12, i64 32
  %14 = load i64, ptr %13, align 8, !tbaa !5
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %._crit_edge36, label %.lr.ph35

.lr.ph35:                                         ; preds = %.lr.ph38
  %15 = getelementptr inbounds i8, ptr %12, i64 40
  br label %18

._crit_edge36:                                    ; preds = %._crit_edge, %.lr.ph38
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7tinyply10PlyElementESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %17 = 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) #6
  br i1 %17, label %.lr.ph38, label %._crit_edge39

18:                                               ; preds = %.lr.ph35, %._crit_edge
  %.03033 = phi i64 [ 0, %.lr.ph35 ], [ %23, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %19 = call ptr @_ZNSt6vectorIN7tinyply11PlyPropertyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  store ptr %19, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %20 = call ptr @_ZNSt6vectorIN7tinyply11PlyPropertyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  store ptr %20, ptr %6, align 8
  %21 = 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) #6
  br i1 %21, label %.lr.ph32, label %._crit_edge

._crit_edge:                                      ; preds = %.loopexit, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull @.str.25)
  %23 = add nuw i64 %.03033, 1
  %24 = load i64, ptr %13, align 8, !tbaa !5
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %18, label %._crit_edge36, !llvm.loop !17

.lr.ph32:                                         ; preds = %18, %.loopexit
  %26 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  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) %12, ptr noundef nonnull align 8 dereferenceable(32) %26)
  %27 = 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 %28 unwind label %41

28:                                               ; preds = %.lr.ph32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  %29 = getelementptr inbounds i8, ptr %26, i64 33
  %30 = load i8, ptr %29, align 1, !tbaa !19, !range !24, !noundef !25
  %31 = trunc nuw i8 %30 to i1
  br i1 %31, label %32, label %55

32:                                               ; preds = %28
  %33 = getelementptr inbounds i8, ptr %26, i64 36
  %34 = load i32, ptr %33, align 4, !tbaa !26
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %34)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull @.str.24)
  %37 = load i32, ptr %33, align 4, !tbaa !26
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %32
  %39 = getelementptr inbounds i8, ptr %26, i64 32
  %40 = getelementptr inbounds i8, ptr %27, i64 16
  br label %43

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

43:                                               ; preds = %.lr.ph, %43
  %.031 = phi i32 [ 0, %.lr.ph ], [ %52, %43 ]
  %44 = load i8, ptr %39, align 8, !tbaa !27
  %45 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %47 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %46)
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %40) #6
  %49 = load i64, ptr %48, align 8, !tbaa !28
  %50 = getelementptr inbounds i8, ptr %47, i64 %49
  %51 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %40) #6
  call void @_ZN7tinyply7PlyFile11PlyFileImpl20write_property_asciiENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %0, i8 noundef zeroext %44, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %50, ptr noundef nonnull align 8 dereferenceable(8) %51)
  %52 = add nuw nsw i32 %.031, 1
  %53 = load i32, ptr %33, align 4, !tbaa !26
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %43, label %.loopexit, !llvm.loop !30

55:                                               ; preds = %28
  %56 = getelementptr inbounds i8, ptr %26, i64 32
  %57 = load i8, ptr %56, align 8, !tbaa !27
  %58 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %27) #6
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  %60 = call noundef ptr @_ZN7tinyply6Buffer3getEv(ptr noundef nonnull align 8 dereferenceable(24) %59)
  %61 = getelementptr inbounds i8, ptr %27, i64 16
  %62 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %61) #6
  %63 = load i64, ptr %62, align 8, !tbaa !28
  %64 = getelementptr inbounds i8, ptr %60, i64 %63
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7tinyply7PlyFile11PlyFileImpl9PlyCursorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %61) #6
  call void @_ZN7tinyply7PlyFile11PlyFileImpl20write_property_asciiENS_4TypeERSoPhRm(ptr noundef nonnull align 8 dereferenceable(128) %0, i8 noundef zeroext %57, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %64, ptr noundef nonnull align 8 dereferenceable(8) %65)
  br label %.loopexit

.loopexit:                                        ; preds = %43, %32, %55
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN7tinyply11PlyPropertyESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %67 = 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) #6
  br i1 %67, label %.lr.ph32, label %._crit_edge
}

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

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

; 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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, !12, i64 32}
!6 = !{!"_ZTSN7tinyply10PlyElementE", !7, i64 0, !12, i64 32, !13, i64 40}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSSt6vectorIN7tinyply11PlyPropertyESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN7tinyply11PlyPropertyESaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !22, i64 33}
!20 = !{!"_ZTSN7tinyply11PlyPropertyE", !7, i64 0, !21, i64 32, !22, i64 33, !21, i64 34, !23, i64 36}
!21 = !{!"_ZTSN7tinyply4TypeE", !10, i64 0}
!22 = !{!"bool", !10, i64 0}
!23 = !{!"int", !10, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!20, !23, i64 36}
!27 = !{!20, !21, i64 32}
!28 = !{!29, !12, i64 0}
!29 = !{!"_ZTSN7tinyply7PlyFile11PlyFileImpl9PlyCursorE", !12, i64 0, !12, i64 8}
!30 = distinct !{!30, !18}


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