; LLVM IR from ThePhysicsGuys/Physics3D :: graphics/mesh/vectorMesh.ll (ZN3P3D8Graphics10VectorMeshC2EPKfmm)

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

%"struct.P3D::Graphics::BufferDataType::Info" = type <{ %"class.std::__cxx11::basic_string", i32, i32, i32, i8, [3 x i8] }>
%"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] }
%"struct.P3D::Graphics::BufferLayout" = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"struct.P3D::Graphics::BufferElement" = type <{ %"class.std::__cxx11::basic_string", %"struct.P3D::Graphics::BufferDataType::Info", i8, i8, [6 x i8] }>
%"class.std::allocator.0" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.P3D::Graphics::VectorMesh" = type { %"class.P3D::Graphics::AbstractMesh.base", ptr, %"struct.P3D::Graphics::BufferLayout", i64, i64 }
%"class.P3D::Graphics::AbstractMesh.base" = type <{ ptr, ptr, i32 }>
%"class.P3D::Graphics::AbstractMesh" = type <{ ptr, ptr, i32, [4 x i8] }>

@_ZN3P3D8Graphics8Renderer5POINTE = external global i32, align 4
@_ZTVN3P3D8Graphics10VectorMeshE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN3P3D8Graphics14BufferDataType6FLOAT3E = external global %"struct.P3D::Graphics::BufferDataType::Info", align 8
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE = external global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics10VectorMeshC2EPKfmm(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"struct.P3D::Graphics::BufferLayout", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::initializer_list", align 8
  %12 = alloca [3 x %"struct.P3D::Graphics::BufferElement"], align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.0", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.0", align 1
  %22 = alloca i1, align 1
  %23 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  store i64 %3, ptr %8, align 8, !tbaa !9
  %24 = load ptr, ptr %5, align 8
  %25 = load i32, ptr @_ZN3P3D8Graphics8Renderer5POINTE, align 4, !tbaa !11
  call void @_ZN3P3D8Graphics12AbstractMeshC2Ej(ptr noundef nonnull align 8 dereferenceable(20) %24, i32 noundef %25)
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN3P3D8Graphics10VectorMeshE, i32 0, i32 0, i32 2), ptr %24, align 8, !tbaa !13
  %26 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 1
  store ptr null, ptr %26, align 8, !tbaa !15
  %27 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 2
  call void @_ZN3P3D8Graphics12BufferLayoutC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %27)
  %28 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 3
  %29 = load i64, ptr %7, align 8, !tbaa !9
  store i64 %29, ptr %28, align 8, !tbaa !23
  %30 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 4
  %31 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %31, ptr %30, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 264, ptr %12) #7
  store i1 true, ptr %22, align 1
  store ptr %12, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %32 unwind label %72

32:                                               ; preds = %4
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %12, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType6FLOAT3E, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %33 unwind label %76

33:                                               ; preds = %32
  %34 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %12, i64 1
  store ptr %34, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %35 unwind label %80

35:                                               ; preds = %33
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %34, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType6FLOAT3E, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %36 unwind label %84

36:                                               ; preds = %35
  %37 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %12, i64 2
  store ptr %37, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %38 unwind label %88

38:                                               ; preds = %36
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %37, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType6FLOAT3E, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %39 unwind label %92

39:                                               ; preds = %38
  store i1 false, ptr %22, align 1
  %40 = getelementptr inbounds %"class.std::initializer_list", ptr %11, i32 0, i32 0
  store ptr %12, ptr %40, align 8, !tbaa !25
  %41 = getelementptr inbounds %"class.std::initializer_list", ptr %11, i32 0, i32 1
  store i64 3, ptr %41, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  call void @_ZNSaIN3P3D8Graphics13BufferElementEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  %42 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8
  %44 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %45 = load i64, ptr %44, align 8
  invoke void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr %43, i64 %45, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %46 unwind label %96

46:                                               ; preds = %39
  invoke void @_ZN3P3D8Graphics12BufferLayoutC2ERKSt6vectorINS0_13BufferElementESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %47 unwind label %100

47:                                               ; preds = %46
  %48 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 2
  %49 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN3P3D8Graphics12BufferLayoutaSEOS1_(ptr noundef nonnull align 8 dereferenceable(28) %48, ptr noundef nonnull align 8 dereferenceable(28) %9) #7
  call void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %9) #7
  call void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @_ZNSt15__new_allocatorIN3P3D8Graphics13BufferElementEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  %50 = getelementptr inbounds [3 x %"struct.P3D::Graphics::BufferElement"], ptr %12, i32 0, i32 0
  %51 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %50, i64 3
  br label %52

52:                                               ; preds = %52, %47
  %53 = phi ptr [ %51, %47 ], [ %54, %52 ]
  %54 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %53, i64 -1
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %54) #7
  %55 = icmp eq ptr %54, %50
  br i1 %55, label %56, label %52

56:                                               ; preds = %52
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  %57 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #8
          to label %58 unwind label %128

58:                                               ; preds = %56
  %59 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 2
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load i64, ptr %8, align 8, !tbaa !9
  %62 = mul i64 9, %61
  %63 = mul i64 %62, 4
  %64 = load i32, ptr @_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE, align 4, !tbaa !11
  invoke void @_ZN3P3D8Graphics12VertexBufferC1ERKNS0_12BufferLayoutEPKvmj(ptr noundef nonnull align 8 dereferenceable(64) %57, ptr noundef nonnull align 8 dereferenceable(28) %59, ptr noundef %60, i64 noundef %63, i32 noundef %64)
          to label %65 unwind label %132

65:                                               ; preds = %58
  %66 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 1
  store ptr %57, ptr %66, align 8, !tbaa !15
  %67 = getelementptr inbounds %"class.P3D::Graphics::AbstractMesh", ptr %24, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !28
  %69 = getelementptr inbounds %"class.P3D::Graphics::VectorMesh", ptr %24, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !15
  invoke void @_ZN3P3D8Graphics11VertexArray9addBufferEPNS0_12VertexBufferE(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef %70)
          to label %71 unwind label %128

71:                                               ; preds = %65
  ret void

72:                                               ; preds = %4
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %16, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %17, align 4
  br label %117

76:                                               ; preds = %32
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %16, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %17, align 4
  br label %116

80:                                               ; preds = %33
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %16, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %17, align 4
  br label %115

84:                                               ; preds = %35
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %16, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %17, align 4
  br label %114

88:                                               ; preds = %36
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %16, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %17, align 4
  br label %113

92:                                               ; preds = %38
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %16, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %17, align 4
  br label %112

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

100:                                              ; preds = %46
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %16, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %17, align 4
  call void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %104

104:                                              ; preds = %100, %96
  call void @_ZNSt15__new_allocatorIN3P3D8Graphics13BufferElementEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  %105 = getelementptr inbounds [3 x %"struct.P3D::Graphics::BufferElement"], ptr %12, i32 0, i32 0
  %106 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %105, i64 3
  br label %107

107:                                              ; preds = %107, %104
  %108 = phi ptr [ %106, %104 ], [ %109, %107 ]
  %109 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %108, i64 -1
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %109) #7
  %110 = icmp eq ptr %109, %105
  br i1 %110, label %111, label %107

111:                                              ; preds = %107
  br label %112

112:                                              ; preds = %111, %92
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %113

113:                                              ; preds = %112, %88
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  br label %114

114:                                              ; preds = %113, %84
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %115

115:                                              ; preds = %114, %80
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %116

116:                                              ; preds = %115, %76
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %117

117:                                              ; preds = %116, %72
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  %118 = load i1, ptr %22, align 1
  br i1 %118, label %119, label %127

119:                                              ; preds = %117
  %120 = load ptr, ptr %13, align 8
  %121 = icmp eq ptr %12, %120
  br i1 %121, label %126, label %122

122:                                              ; preds = %122, %119
  %123 = phi ptr [ %120, %119 ], [ %124, %122 ]
  %124 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %123, i64 -1
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %124) #7
  %125 = icmp eq ptr %124, %12
  br i1 %125, label %126, label %122

126:                                              ; preds = %122, %119
  br label %127

127:                                              ; preds = %126, %117
  call void @llvm.lifetime.end.p0(i64 264, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  br label %136

128:                                              ; preds = %65, %56
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %16, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %17, align 4
  br label %136

132:                                              ; preds = %58
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %16, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %17, align 4
  call void @_ZdlPvm(ptr noundef %57, i64 noundef 64) #9
  br label %136

136:                                              ; preds = %132, %128, %127
  call void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %27) #7
  br label %137

137:                                              ; preds = %136
  %138 = load ptr, ptr %16, align 8
  %139 = load i32, ptr %17, align 4
  %140 = insertvalue { ptr, i32 } poison, ptr %138, 0
  %141 = insertvalue { ptr, i32 } %140, i32 %139, 1
  resume { ptr, i32 } %141
}

declare void @_ZN3P3D8Graphics12AbstractMeshC2Ej(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12BufferLayoutC2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(45), i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12BufferLayoutC2ERKSt6vectorINS0_13BufferElementESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(28) ptr @_ZN3P3D8Graphics12BufferLayoutaSEOS1_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82)) unnamed_addr #4 align 2

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

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

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

declare void @_ZN3P3D8Graphics12VertexBufferC1ERKNS0_12BufferLayoutEPKvmj(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(28), ptr noundef, i64 noundef, i32 noundef) unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

declare void @_ZN3P3D8Graphics11VertexArray9addBufferEPNS0_12VertexBufferE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !6, i64 24}
!16 = !{!"_ZTSN3P3D8Graphics10VectorMeshE", !17, i64 0, !6, i64 24, !18, i64 32, !10, i64 64, !10, i64 72}
!17 = !{!"_ZTSN3P3D8Graphics12AbstractMeshE", !6, i64 8, !12, i64 16}
!18 = !{!"_ZTSN3P3D8Graphics12BufferLayoutE", !19, i64 0, !12, i64 24}
!19 = !{!"_ZTSSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIN3P3D8Graphics13BufferElementESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3P3D8Graphics13BufferElementESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN3P3D8Graphics13BufferElementESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!16, !10, i64 64}
!24 = !{!16, !10, i64 72}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTSSt16initializer_listIN3P3D8Graphics13BufferElementEE", !6, i64 0, !10, i64 8}
!27 = !{!26, !10, i64 8}
!28 = !{!17, !6, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.P3D::Graphics::BufferDataType::Info" = type <{ %"class.std::__cxx11::basic_string", i32, i32, i32, i8, [3 x i8] }>
%"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] }
%"struct.P3D::Graphics::BufferLayout" = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Graphics::BufferElement, std::allocator<P3D::Graphics::BufferElement>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.P3D::Graphics::BufferElement" = type <{ %"class.std::__cxx11::basic_string", %"struct.P3D::Graphics::BufferDataType::Info", i8, i8, [6 x i8] }>
%"class.std::allocator.0" = type { i8 }
%"class.std::allocator" = type { i8 }

@_ZN3P3D8Graphics8Renderer5POINTE = external local_unnamed_addr global i32, align 4
@_ZTVN3P3D8Graphics10VectorMeshE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN3P3D8Graphics14BufferDataType6FLOAT3E = external global %"struct.P3D::Graphics::BufferDataType::Info", align 8
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE = external local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics10VectorMeshC2EPKfmm(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, i64 noundef %2, i64 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.P3D::Graphics::BufferLayout", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca [3 x %"struct.P3D::Graphics::BufferElement"], align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.0", align 1
  %14 = alloca %"class.std::allocator", align 1
  %15 = load i32, ptr @_ZN3P3D8Graphics8Renderer5POINTE, align 4, !tbaa !5
  tail call void @_ZN3P3D8Graphics12AbstractMeshC2Ej(ptr noundef nonnull align 8 dereferenceable(20) %0, i32 noundef %15)
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN3P3D8Graphics10VectorMeshE, i64 16), ptr %0, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr null, ptr %16, align 8, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN3P3D8Graphics12BufferLayoutC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %17)
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 %2, ptr %18, align 8, !tbaa !21
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  store i64 %3, ptr %19, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 264, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %20 unwind label %.thread

20:                                               ; preds = %4
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType6FLOAT3E, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %21 unwind label %42

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %7, i64 88
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %23 unwind label %44

23:                                               ; preds = %21
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %22, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType6FLOAT3E, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %24 unwind label %46

24:                                               ; preds = %23
  %25 = getelementptr inbounds i8, ptr %7, i64 176
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %26 unwind label %48

26:                                               ; preds = %24
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %25, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType6FLOAT3E, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %27 unwind label %50

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #7
  call void @_ZNSaIN3P3D8Graphics13BufferElementEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr nonnull %7, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %28 unwind label %52

28:                                               ; preds = %27
  invoke void @_ZN3P3D8Graphics12BufferLayoutC2ERKSt6vectorINS0_13BufferElementESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %29 unwind label %54

29:                                               ; preds = %28
  %30 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN3P3D8Graphics12BufferLayoutaSEOS1_(ptr noundef nonnull align 8 dereferenceable(28) %17, ptr noundef nonnull align 8 dereferenceable(28) %5) #7
  call void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #7
  call void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @_ZNSt15__new_allocatorIN3P3D8Graphics13BufferElementEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  %31 = getelementptr inbounds i8, ptr %7, i64 176
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %31) #7
  %32 = getelementptr inbounds i8, ptr %7, i64 88
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %32) #7
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  %33 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #8
          to label %34 unwind label %67

34:                                               ; preds = %29
  %35 = mul i64 %3, 36
  %36 = load i32, ptr @_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE, align 4, !tbaa !5
  invoke void @_ZN3P3D8Graphics12VertexBufferC1ERKNS0_12BufferLayoutEPKvmj(ptr noundef nonnull align 8 dereferenceable(64) %33, ptr noundef nonnull align 8 dereferenceable(28) %17, ptr noundef %1, i64 noundef %35, i32 noundef %36)
          to label %37 unwind label %69

37:                                               ; preds = %34
  store ptr %33, ptr %16, align 8, !tbaa !11
  %38 = getelementptr inbounds i8, ptr %0, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !23
  invoke void @_ZN3P3D8Graphics11VertexArray9addBufferEPNS0_12VertexBufferE(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull %33)
          to label %40 unwind label %67

40:                                               ; preds = %37
  ret void

.thread:                                          ; preds = %4
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %.loopexit

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

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

46:                                               ; preds = %23
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %60

48:                                               ; preds = %24
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %59

50:                                               ; preds = %26
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit42

52:                                               ; preds = %27
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit42.loopexit

54:                                               ; preds = %28
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %.loopexit42.loopexit

.loopexit42.loopexit:                             ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZNSt15__new_allocatorIN3P3D8Graphics13BufferElementEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #7
  %56 = getelementptr inbounds i8, ptr %7, i64 176
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %56) #7
  %57 = getelementptr inbounds i8, ptr %7, i64 88
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %57) #7
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %7) #7
  br label %.loopexit42

.loopexit42:                                      ; preds = %.loopexit42.loopexit, %50
  %.pn.pn = phi { ptr, i32 } [ %51, %50 ], [ %.pn, %.loopexit42.loopexit ]
  %58 = phi i1 [ false, %50 ], [ true, %.loopexit42.loopexit ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %59

59:                                               ; preds = %.loopexit42, %48
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.loopexit42 ], [ %49, %48 ]
  %.1 = phi i1 [ %58, %.loopexit42 ], [ false, %48 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %60

60:                                               ; preds = %59, %46
  %.023 = phi ptr [ %25, %59 ], [ %22, %46 ]
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %59 ], [ %47, %46 ]
  %.2 = phi i1 [ %.1, %59 ], [ false, %46 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %61

61:                                               ; preds = %60, %44
  %.124 = phi ptr [ %.023, %60 ], [ %22, %44 ]
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %60 ], [ %45, %44 ]
  %.3 = phi i1 [ %.2, %60 ], [ false, %44 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %62

62:                                               ; preds = %42, %61
  %.225 = phi ptr [ %.124, %61 ], [ %7, %42 ]
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %61 ], [ %43, %42 ]
  %.4 = phi i1 [ %.3, %61 ], [ false, %42 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %63 = icmp eq ptr %7, %.225
  %or.cond = select i1 %.4, i1 true, i1 %63
  br i1 %or.cond, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %62, %.preheader
  %64 = phi ptr [ %65, %.preheader ], [ %.225, %62 ]
  %65 = getelementptr inbounds i8, ptr %64, i64 -88
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %65) #7
  %66 = icmp eq ptr %65, %7
  br i1 %66, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %.thread, %62
  %.pn.pn.pn.pn.pn.pn.pn41 = phi { ptr, i32 } [ %41, %.thread ], [ %.pn.pn.pn.pn.pn.pn, %62 ], [ %.pn.pn.pn.pn.pn.pn, %.preheader ]
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %71

67:                                               ; preds = %37, %29
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %34
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %33, i64 noundef 64) #9
  br label %71

71:                                               ; preds = %69, %67, %.loopexit
  %.pn35 = phi { ptr, i32 } [ %68, %67 ], [ %70, %69 ], [ %.pn.pn.pn.pn.pn.pn.pn41, %.loopexit ]
  call void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %17) #7
  resume { ptr, i32 } %.pn35
}

declare void @_ZN3P3D8Graphics12AbstractMeshC2Ej(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12BufferLayoutC2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(45), i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D8Graphics12BufferLayoutC2ERKSt6vectorINS0_13BufferElementESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(28) ptr @_ZN3P3D8Graphics12BufferLayoutaSEOS1_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82)) unnamed_addr #4 align 2

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

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

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

declare void @_ZN3P3D8Graphics12VertexBufferC1ERKNS0_12BufferLayoutEPKvmj(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(28), ptr noundef, i64 noundef, i32 noundef) unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

declare void @_ZN3P3D8Graphics11VertexArray9addBufferEPNS0_12VertexBufferE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !14, i64 24}
!12 = !{!"_ZTSN3P3D8Graphics10VectorMeshE", !13, i64 0, !14, i64 24, !15, i64 32, !20, i64 64, !20, i64 72}
!13 = !{!"_ZTSN3P3D8Graphics12AbstractMeshE", !14, i64 8, !6, i64 16}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"_ZTSN3P3D8Graphics12BufferLayoutE", !16, i64 0, !6, i64 24}
!16 = !{!"_ZTSSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN3P3D8Graphics13BufferElementESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN3P3D8Graphics13BufferElementESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN3P3D8Graphics13BufferElementESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!20 = !{!"long", !7, i64 0}
!21 = !{!12, !20, i64 64}
!22 = !{!12, !20, i64 72}
!23 = !{!13, !14, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass