; LLVM IR from ThePhysicsGuys/Physics3D :: graphics/mesh/pointMesh.ll (ZN3P3D8Graphics9PointMeshC2EPKfmm)

; 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::PointMesh" = 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
@_ZTVN3P3D8Graphics9PointMeshE = 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 [6 x i8], align 1
@_ZN3P3D8Graphics14BufferDataType5FLOATE = external global %"struct.P3D::Graphics::BufferDataType::Info", align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE = external global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics9PointMeshC2EPKfmm(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 [4 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 %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator.0", align 1
  %24 = alloca i1, align 1
  %25 = 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
  %26 = load ptr, ptr %5, align 8
  %27 = load i32, ptr @_ZN3P3D8Graphics8Renderer5POINTE, align 4, !tbaa !11
  call void @_ZN3P3D8Graphics12AbstractMeshC2Ej(ptr noundef nonnull align 8 dereferenceable(20) %26, i32 noundef %27)
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN3P3D8Graphics9PointMeshE, i32 0, i32 0, i32 2), ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 1
  store ptr null, ptr %28, align 8, !tbaa !15
  %29 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 2
  call void @_ZN3P3D8Graphics12BufferLayoutC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %29)
  %30 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 3
  %31 = load i64, ptr %7, align 8, !tbaa !9
  store i64 %31, ptr %30, align 8, !tbaa !23
  %32 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 4
  %33 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %33, ptr %32, 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 352, ptr %12) #7
  store i1 true, ptr %24, 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 %34 unwind label %76

34:                                               ; 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 %35 unwind label %80

35:                                               ; preds = %34
  %36 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %12, i64 1
  store ptr %36, 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 %37 unwind label %84

37:                                               ; preds = %35
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %36, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType5FLOATE, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %38 unwind label %88

38:                                               ; preds = %37
  %39 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %12, i64 2
  store ptr %39, 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 %40 unwind label %92

40:                                               ; preds = %38
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %39, 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 %41 unwind label %96

41:                                               ; preds = %40
  %42 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %12, i64 3
  store ptr %42, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %43 unwind label %100

43:                                               ; preds = %41
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %42, ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType6FLOAT3E, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %44 unwind label %104

44:                                               ; preds = %43
  store i1 false, ptr %24, align 1
  %45 = getelementptr inbounds %"class.std::initializer_list", ptr %11, i32 0, i32 0
  store ptr %12, ptr %45, align 8, !tbaa !25
  %46 = getelementptr inbounds %"class.std::initializer_list", ptr %11, i32 0, i32 1
  store i64 4, ptr %46, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #7
  call void @_ZNSaIN3P3D8Graphics13BufferElementEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  %47 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %50 = load i64, ptr %49, align 8
  invoke void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr %48, i64 %50, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %51 unwind label %108

51:                                               ; preds = %44
  invoke void @_ZN3P3D8Graphics12BufferLayoutC2ERKSt6vectorINS0_13BufferElementESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(28) %9, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %52 unwind label %112

52:                                               ; preds = %51
  %53 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 2
  %54 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN3P3D8Graphics12BufferLayoutaSEOS1_(ptr noundef nonnull align 8 dereferenceable(28) %53, 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) %25) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  %55 = getelementptr inbounds [4 x %"struct.P3D::Graphics::BufferElement"], ptr %12, i32 0, i32 0
  %56 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %55, i64 4
  br label %57

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

61:                                               ; preds = %57
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  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 352, 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
  %62 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #8
          to label %63 unwind label %142

63:                                               ; preds = %61
  %64 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 2
  %65 = load i64, ptr %8, align 8, !tbaa !9
  %66 = mul i64 10, %65
  %67 = mul i64 %66, 4
  %68 = load i32, ptr @_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE, align 4, !tbaa !11
  invoke void @_ZN3P3D8Graphics12VertexBufferC1ERKNS0_12BufferLayoutEPKvmj(ptr noundef nonnull align 8 dereferenceable(64) %62, ptr noundef nonnull align 8 dereferenceable(28) %64, ptr noundef null, i64 noundef %67, i32 noundef %68)
          to label %69 unwind label %146

69:                                               ; preds = %63
  %70 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 1
  store ptr %62, ptr %70, align 8, !tbaa !15
  %71 = getelementptr inbounds %"class.P3D::Graphics::AbstractMesh", ptr %26, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !28
  %73 = getelementptr inbounds %"class.P3D::Graphics::PointMesh", ptr %26, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  invoke void @_ZN3P3D8Graphics11VertexArray9addBufferEPNS0_12VertexBufferE(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef %74)
          to label %75 unwind label %142

75:                                               ; preds = %69
  ret void

76:                                               ; preds = %4
  %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 %131

80:                                               ; preds = %34
  %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 %130

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 %129

88:                                               ; preds = %37
  %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 %128

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 %127

96:                                               ; preds = %40
  %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 %126

100:                                              ; preds = %41
  %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
  br label %125

104:                                              ; preds = %43
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %16, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %17, align 4
  br label %124

108:                                              ; preds = %44
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %16, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %17, align 4
  br label %116

112:                                              ; preds = %51
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %16, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %17, align 4
  call void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %116

116:                                              ; preds = %112, %108
  call void @_ZNSt15__new_allocatorIN3P3D8Graphics13BufferElementEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  %117 = getelementptr inbounds [4 x %"struct.P3D::Graphics::BufferElement"], ptr %12, i32 0, i32 0
  %118 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %117, i64 4
  br label %119

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

123:                                              ; preds = %119
  br label %124

124:                                              ; preds = %123, %104
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %125

125:                                              ; preds = %124, %100
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #7
  br label %126

126:                                              ; preds = %125, %96
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %127

127:                                              ; preds = %126, %92
  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 %128

128:                                              ; preds = %127, %88
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %129

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

130:                                              ; preds = %129, %80
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %131

131:                                              ; preds = %130, %76
  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
  %132 = load i1, ptr %24, align 1
  br i1 %132, label %133, label %141

133:                                              ; preds = %131
  %134 = load ptr, ptr %13, align 8
  %135 = icmp eq ptr %12, %134
  br i1 %135, label %140, label %136

136:                                              ; preds = %136, %133
  %137 = phi ptr [ %134, %133 ], [ %138, %136 ]
  %138 = getelementptr inbounds %"struct.P3D::Graphics::BufferElement", ptr %137, i64 -1
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %138) #7
  %139 = icmp eq ptr %138, %12
  br i1 %139, label %140, label %136

140:                                              ; preds = %136, %133
  br label %141

141:                                              ; preds = %140, %131
  call void @llvm.lifetime.end.p0(i64 352, 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 %150

142:                                              ; preds = %69, %61
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %16, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %17, align 4
  br label %150

146:                                              ; preds = %63
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %16, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %17, align 4
  call void @_ZdlPvm(ptr noundef %62, i64 noundef 64) #9
  br label %150

150:                                              ; preds = %146, %142, %141
  call void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %29) #7
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %16, align 8
  %153 = load i32, ptr %17, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

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 = !{!"_ZTSN3P3D8Graphics9PointMeshE", !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
@_ZTVN3P3D8Graphics9PointMeshE = 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 [6 x i8], align 1
@_ZN3P3D8Graphics14BufferDataType5FLOATE = external global %"struct.P3D::Graphics::BufferDataType::Info", align 8
@.str.2 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE = external local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics9PointMeshC2EPKfmm(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr nocapture noundef readnone %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 [4 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::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = alloca %"class.std::allocator", align 1
  %17 = load i32, ptr @_ZN3P3D8Graphics8Renderer5POINTE, align 4, !tbaa !5
  tail call void @_ZN3P3D8Graphics12AbstractMeshC2Ej(ptr noundef nonnull align 8 dereferenceable(20) %0, i32 noundef %17)
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN3P3D8Graphics9PointMeshE, i64 16), ptr %0, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr null, ptr %18, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN3P3D8Graphics12BufferLayoutC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  store i64 %2, ptr %20, align 8, !tbaa !21
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  store i64 %3, ptr %21, 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 352, 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 %22 unwind label %.thread

22:                                               ; 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 %23 unwind label %48

23:                                               ; preds = %22
  %24 = 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 %25 unwind label %50

25:                                               ; preds = %23
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %24, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(45) @_ZN3P3D8Graphics14BufferDataType5FLOATE, i1 noundef zeroext false, i1 noundef zeroext false)
          to label %26 unwind label %52

26:                                               ; preds = %25
  %27 = 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 %28 unwind label %54

28:                                               ; preds = %26
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %27, 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 %29 unwind label %56

29:                                               ; preds = %28
  %30 = getelementptr inbounds i8, ptr %7, i64 264
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %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 nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %31 unwind label %58

31:                                               ; preds = %29
  invoke void @_ZN3P3D8Graphics13BufferElementC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_14BufferDataType4InfoEbb(ptr noundef nonnull align 8 dereferenceable(82) %30, 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 %32 unwind label %60

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  call void @_ZNSaIN3P3D8Graphics13BufferElementEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EEC2ESt16initializer_listIS2_ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr nonnull %7, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %33 unwind label %62

33:                                               ; preds = %32
  invoke void @_ZN3P3D8Graphics12BufferLayoutC2ERKSt6vectorINS0_13BufferElementESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %34 unwind label %64

34:                                               ; preds = %33
  %35 = call noundef nonnull align 8 dereferenceable(28) ptr @_ZN3P3D8Graphics12BufferLayoutaSEOS1_(ptr noundef nonnull align 8 dereferenceable(28) %19, 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) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  %36 = getelementptr inbounds i8, ptr %7, i64 264
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %36) #7
  %37 = getelementptr inbounds i8, ptr %7, i64 176
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %37) #7
  %38 = getelementptr inbounds i8, ptr %7, i64 88
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %38) #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) %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 nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #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 352, 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
  %39 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #8
          to label %40 unwind label %80

40:                                               ; preds = %34
  %41 = mul i64 %3, 40
  %42 = load i32, ptr @_ZN3P3D8Graphics8Renderer12DYNAMIC_DRAWE, align 4, !tbaa !5
  invoke void @_ZN3P3D8Graphics12VertexBufferC1ERKNS0_12BufferLayoutEPKvmj(ptr noundef nonnull align 8 dereferenceable(64) %39, ptr noundef nonnull align 8 dereferenceable(28) %19, ptr noundef null, i64 noundef %41, i32 noundef %42)
          to label %43 unwind label %82

43:                                               ; preds = %40
  store ptr %39, ptr %18, align 8, !tbaa !11
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  invoke void @_ZN3P3D8Graphics11VertexArray9addBufferEPNS0_12VertexBufferE(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull %39)
          to label %46 unwind label %80

46:                                               ; preds = %43
  ret void

.thread:                                          ; preds = %4
  %47 = 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

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

50:                                               ; preds = %23
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %74

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

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

56:                                               ; preds = %28
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %71

58:                                               ; preds = %29
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %70

60:                                               ; preds = %31
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit49

62:                                               ; preds = %32
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit49.loopexit

64:                                               ; preds = %33
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN3P3D8Graphics13BufferElementESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  br label %.loopexit49.loopexit

.loopexit49.loopexit:                             ; preds = %64, %62
  %.pn = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @_ZNSt15__new_allocatorIN3P3D8Graphics13BufferElementEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  %66 = getelementptr inbounds i8, ptr %7, i64 264
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %66) #7
  %67 = getelementptr inbounds i8, ptr %7, i64 176
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %67) #7
  %68 = getelementptr inbounds i8, ptr %7, i64 88
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %68) #7
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %7) #7
  br label %.loopexit49

.loopexit49:                                      ; preds = %.loopexit49.loopexit, %60
  %.pn.pn = phi { ptr, i32 } [ %61, %60 ], [ %.pn, %.loopexit49.loopexit ]
  %69 = phi i1 [ false, %60 ], [ true, %.loopexit49.loopexit ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %70

70:                                               ; preds = %.loopexit49, %58
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %.loopexit49 ], [ %59, %58 ]
  %.1 = phi i1 [ %69, %.loopexit49 ], [ false, %58 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %71

71:                                               ; preds = %70, %56
  %.026 = phi ptr [ %30, %70 ], [ %27, %56 ]
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %70 ], [ %57, %56 ]
  %.2 = phi i1 [ %.1, %70 ], [ false, %56 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %72

72:                                               ; preds = %71, %54
  %.127 = phi ptr [ %.026, %71 ], [ %27, %54 ]
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %71 ], [ %55, %54 ]
  %.3 = phi i1 [ %.2, %71 ], [ false, %54 ]
  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 %73

73:                                               ; preds = %72, %52
  %.228 = phi ptr [ %.127, %72 ], [ %24, %52 ]
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %72 ], [ %53, %52 ]
  %.4 = phi i1 [ %.3, %72 ], [ false, %52 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %74

74:                                               ; preds = %73, %50
  %.329 = phi ptr [ %.228, %73 ], [ %24, %50 ]
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %73 ], [ %51, %50 ]
  %.5 = phi i1 [ %.4, %73 ], [ false, %50 ]
  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 %75

75:                                               ; preds = %48, %74
  %.430 = phi ptr [ %.329, %74 ], [ %7, %48 ]
  %.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn.pn, %74 ], [ %49, %48 ]
  %.6 = phi i1 [ %.5, %74 ], [ false, %48 ]
  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
  %76 = icmp eq ptr %7, %.430
  %or.cond = select i1 %.6, i1 true, i1 %76
  br i1 %or.cond, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %75, %.preheader
  %77 = phi ptr [ %78, %.preheader ], [ %.430, %75 ]
  %78 = getelementptr inbounds i8, ptr %77, i64 -88
  call void @_ZN3P3D8Graphics13BufferElementD2Ev(ptr noundef nonnull align 8 dereferenceable(82) %78) #7
  %79 = icmp eq ptr %78, %7
  br i1 %79, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %.thread, %75
  %.pn.pn.pn.pn.pn.pn.pn.pn.pn48 = phi { ptr, i32 } [ %47, %.thread ], [ %.pn.pn.pn.pn.pn.pn.pn.pn, %75 ], [ %.pn.pn.pn.pn.pn.pn.pn.pn, %.preheader ]
  call void @llvm.lifetime.end.p0(i64 352, 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 %84

80:                                               ; preds = %43, %34
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %40
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %39, i64 noundef 64) #9
  br label %84

84:                                               ; preds = %82, %80, %.loopexit
  %.pn42 = phi { ptr, i32 } [ %81, %80 ], [ %83, %82 ], [ %.pn.pn.pn.pn.pn.pn.pn.pn.pn48, %.loopexit ]
  call void @_ZN3P3D8Graphics12BufferLayoutD2Ev(ptr noundef nonnull align 8 dereferenceable(28) %19) #7
  resume { ptr, i32 } %.pn42
}

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 = !{!"_ZTSN3P3D8Graphics9PointMeshE", !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,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass