; LLVM IR from merpheus-dev/LavaEngine :: src/Platforms/OpenGL (GLParticleRenderer)

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

%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.13" = type { %"class.std::__shared_ptr.14" }
%"class.std::__shared_ptr.14" = type { ptr, %"class.std::__shared_count" }
%"class.Lava::OpenGL::GLParticleRenderer" = type { %"class.Lava::ParticleRenderer", %"class.std::vector", ptr, ptr, ptr, %"class.std::shared_ptr" }
%"class.Lava::ParticleRenderer" = type { %"class.Lava::BaseRenderer", ptr }
%"class.Lava::BaseRenderer" = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Lava::ParticleSystem *, std::allocator<Lava::ParticleSystem *>>::_Vector_impl" }
%"struct.std::_Vector_base<Lava::ParticleSystem *, std::allocator<Lava::ParticleSystem *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Lava::ParticleSystem *, std::allocator<Lava::ParticleSystem *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Lava::ParticleSystem *, std::allocator<Lava::ParticleSystem *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Lava::VertexBufferElement" = type { ptr, i32 }

@_ZTVN4Lava6OpenGL18GLParticleRendererE = external dso_local unnamed_addr constant { [8 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava6OpenGL18GLParticleRendererC2EPNS_5SceneE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::shared_ptr", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::shared_ptr.13", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4Lava16ParticleRendererC2EPNS_5SceneE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %12)
  store ptr getelementptr inbounds inrange(-16, 48) ({ [8 x ptr] }, ptr @_ZTVN4Lava6OpenGL18GLParticleRendererE, i32 0, i32 0, i32 2), ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 1
  call void @_ZNSt6vectorIPN4Lava14ParticleSystemESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  %14 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 5
  call void @_ZNSt10shared_ptrIN4Lava6OpenGL14GLVertexBufferEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #8
  %15 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #9
          to label %16 unwind label %60

16:                                               ; preds = %2
  call void @llvm.memset.p0.i64(ptr align 16 %15, i8 0, i64 40, i1 false)
  call void @_ZN4Lava6OpenGL12GLShaderBankC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #8
  %17 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 2
  store ptr %15, ptr %17, align 8, !tbaa !11
  %18 = load ptr, ptr %11, align 8, !tbaa !9
  %19 = getelementptr inbounds ptr, ptr %18, i64 5
  %20 = load ptr, ptr %19, align 8
  invoke void %20(ptr noundef nonnull align 8 dereferenceable(88) %11)
          to label %21 unwind label %60

21:                                               ; preds = %16
  %22 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 2
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds ptr, ptr %24, i64 5
  %26 = load ptr, ptr %25, align 8
  invoke void %26(ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %27 unwind label %60

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 1, ptr %7, align 4, !tbaa !22
  %28 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #9
          to label %29 unwind label %64

29:                                               ; preds = %27
  call void @llvm.memset.p0.i64(ptr align 16 %28, i8 0, i64 16, i1 false)
  %30 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 3
  store ptr %28, ptr %30, align 8, !tbaa !24
  %31 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !24
  %33 = getelementptr inbounds %"struct.Lava::VertexBufferElement", ptr %32, i32 0, i32 0
  store ptr @.str, ptr %33, align 8, !tbaa !25
  %34 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 3
  %35 = load ptr, ptr %34, align 8, !tbaa !24
  %36 = getelementptr inbounds %"struct.Lava::VertexBufferElement", ptr %35, i32 0, i32 1
  store i32 2, ptr %36, align 8, !tbaa !27
  %37 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #9
          to label %38 unwind label %64

38:                                               ; preds = %29
  invoke void @_ZN4Lava6OpenGL5GLVAOC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %37)
          to label %39 unwind label %68

39:                                               ; preds = %38
  %40 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 4
  store ptr %37, ptr %40, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %41 = getelementptr inbounds %"class.Lava::ParticleRenderer", ptr %11, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 8, ptr %9, align 4, !tbaa !22
  invoke void @_Z9CreateRefIN4Lava6OpenGL14GLVertexBufferEJRPfiEESt10shared_ptrIT_EDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %42 unwind label %72

42:                                               ; preds = %39
  %43 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 5
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN4Lava6OpenGL14GLVertexBufferEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @_ZNSt12__shared_ptrIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  %45 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 5
  %46 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %45) #8
  %47 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !24
  %49 = load ptr, ptr %46, align 8, !tbaa !9
  %50 = getelementptr inbounds ptr, ptr %49, i64 6
  %51 = load ptr, ptr %50, align 8
  invoke void %51(ptr noundef nonnull align 8 dereferenceable(36) %46, ptr noundef %48, ptr noundef %7)
          to label %52 unwind label %64

52:                                               ; preds = %42
  %53 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %55 = getelementptr inbounds %"class.Lava::OpenGL::GLParticleRenderer", ptr %11, i32 0, i32 5
  call void @_ZNSt10shared_ptrIN4Lava12VertexBufferEEC2INS0_6OpenGL14GLVertexBufferEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %55) #8
  %56 = load ptr, ptr %54, align 8, !tbaa !9
  %57 = getelementptr inbounds ptr, ptr %56, i64 4
  %58 = load ptr, ptr %57, align 8
  invoke void %58(ptr noundef nonnull align 8 dereferenceable(56) %54, ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef 0)
          to label %59 unwind label %76

59:                                               ; preds = %52
  call void @_ZNSt12__shared_ptrIN4Lava12VertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  ret void

60:                                               ; preds = %21, %16, %2
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %5, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %6, align 4
  br label %81

64:                                               ; preds = %42, %29, %27
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %5, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %6, align 4
  br label %80

68:                                               ; preds = %38
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %5, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %37, i64 noundef 56) #10
  br label %80

72:                                               ; preds = %39
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %5, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  br label %80

76:                                               ; preds = %52
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %5, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %6, align 4
  call void @_ZNSt12__shared_ptrIN4Lava12VertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  br label %80

80:                                               ; preds = %76, %72, %68, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %81

81:                                               ; preds = %80, %60
  call void @_ZNSt12__shared_ptrIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #8
  call void @_ZNSt6vectorIPN4Lava14ParticleSystemESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @_ZN4Lava12BaseRendererD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %5, align 8
  %84 = load i32, ptr %6, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN4Lava6OpenGL5GLVAOC1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9CreateRefIN4Lava6OpenGL14GLVertexBufferEJRPfiEESt10shared_ptrIT_EDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN4Lava12VertexBufferEEC2INS0_6OpenGL14GLVertexBufferEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"_ZTSN4Lava6OpenGL18GLParticleRendererE", !13, i64 0, !15, i64 24, !6, i64 48, !6, i64 56, !6, i64 64, !19, i64 72}
!13 = !{!"_ZTSN4Lava16ParticleRendererE", !14, i64 0, !6, i64 16}
!14 = !{!"_ZTSN4Lava12BaseRendererE", !6, i64 8}
!15 = !{!"_ZTSSt6vectorIPN4Lava14ParticleSystemESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPN4Lava14ParticleSystemESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN4Lava14ParticleSystemESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN4Lava14ParticleSystemESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSSt10shared_ptrIN4Lava6OpenGL14GLVertexBufferEE", !20, i64 0}
!20 = !{!"_ZTSSt12__shared_ptrIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !21, i64 8}
!21 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"int", !7, i64 0}
!24 = !{!12, !6, i64 56}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTSN4Lava19VertexBufferElementE", !6, i64 0, !23, i64 8}
!27 = !{!26, !23, i64 8}
!28 = !{!12, !6, i64 64}


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

%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.13" = type { %"class.std::__shared_ptr.14" }
%"class.std::__shared_ptr.14" = type { ptr, %"class.std::__shared_count" }

@_ZTVN4Lava6OpenGL18GLParticleRendererE = external dso_local unnamed_addr constant { [8 x ptr] }, align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava6OpenGL18GLParticleRendererC2EPNS_5SceneE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::shared_ptr", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::shared_ptr.13", align 8
  tail call void @_ZN4Lava16ParticleRendererC2EPNS_5SceneE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1)
  store ptr getelementptr inbounds inrange(-16, 48) (i8, ptr @_ZTVN4Lava6OpenGL18GLParticleRendererE, i64 16), ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZNSt6vectorIPN4Lava14ParticleSystemESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @_ZNSt10shared_ptrIN4Lava6OpenGL14GLVertexBufferEEC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  %9 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #9
          to label %10 unwind label %43

10:                                               ; preds = %2
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %9, i8 0, i64 40, i1 false)
  tail call void @_ZN4Lava6OpenGL12GLShaderBankC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #8
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %9, ptr %11, align 8, !tbaa !8
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 40
  %14 = load ptr, ptr %13, align 8
  invoke void %14(ptr noundef nonnull align 8 dereferenceable(88) %0)
          to label %15 unwind label %43

15:                                               ; preds = %10
  %16 = load ptr, ptr %11, align 8, !tbaa !8
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 40
  %19 = load ptr, ptr %18, align 8
  invoke void %19(ptr noundef nonnull align 8 dereferenceable(40) %16)
          to label %20 unwind label %43

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 1, ptr %3, align 4, !tbaa !21
  %21 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #9
          to label %22 unwind label %45

22:                                               ; preds = %20
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %21, i8 0, i64 16, i1 false)
  %23 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %21, ptr %23, align 8, !tbaa !23
  store ptr @.str, ptr %21, align 8, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %21, i64 8
  store i32 2, ptr %24, align 8, !tbaa !26
  %25 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
          to label %26 unwind label %45

26:                                               ; preds = %22
  invoke void @_ZN4Lava6OpenGL5GLVAOC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25)
          to label %27 unwind label %47

27:                                               ; preds = %26
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %25, ptr %28, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  %29 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 8, ptr %5, align 4, !tbaa !21
  invoke void @_Z9CreateRefIN4Lava6OpenGL14GLVertexBufferEJRPfiEESt10shared_ptrIT_EDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %30 unwind label %49

30:                                               ; preds = %27
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt10shared_ptrIN4Lava6OpenGL14GLVertexBufferEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @_ZNSt12__shared_ptrIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  %32 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  %33 = load ptr, ptr %23, align 8, !tbaa !23
  %34 = load ptr, ptr %32, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 48
  %36 = load ptr, ptr %35, align 8
  invoke void %36(ptr noundef nonnull align 8 dereferenceable(36) %32, ptr noundef %33, ptr noundef nonnull %3)
          to label %37 unwind label %45

37:                                               ; preds = %30
  %38 = load ptr, ptr %28, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  call void @_ZNSt10shared_ptrIN4Lava12VertexBufferEEC2INS0_6OpenGL14GLVertexBufferEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 32
  %41 = load ptr, ptr %40, align 8
  invoke void %41(ptr noundef nonnull align 8 dereferenceable(56) %38, ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef 0)
          to label %42 unwind label %51

42:                                               ; preds = %37
  call void @_ZNSt12__shared_ptrIN4Lava12VertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  ret void

43:                                               ; preds = %15, %10, %2
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %54

45:                                               ; preds = %30, %22, %20
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %53

47:                                               ; preds = %26
  %48 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %25, i64 noundef 56) #10
  br label %53

49:                                               ; preds = %27
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  br label %53

51:                                               ; preds = %37
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4Lava12VertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  br label %53

53:                                               ; preds = %51, %49, %47, %45
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %46, %45 ], [ %50, %49 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %54

54:                                               ; preds = %53, %43
  %.pn.pn = phi { ptr, i32 } [ %.pn, %53 ], [ %44, %43 ]
  call void @_ZNSt12__shared_ptrIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  call void @_ZNSt6vectorIPN4Lava14ParticleSystemESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @_ZN4Lava12BaseRendererD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare void @_ZN4Lava6OpenGL5GLVAOC1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9CreateRefIN4Lava6OpenGL14GLVertexBufferEJRPfiEESt10shared_ptrIT_EDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN4Lava12VertexBufferEEC2INS0_6OpenGL14GLVertexBufferEvEERKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !12, i64 48}
!9 = !{!"_ZTSN4Lava6OpenGL18GLParticleRendererE", !10, i64 0, !14, i64 24, !12, i64 48, !12, i64 56, !12, i64 64, !18, i64 72}
!10 = !{!"_ZTSN4Lava16ParticleRendererE", !11, i64 0, !12, i64 16}
!11 = !{!"_ZTSN4Lava12BaseRendererE", !12, i64 8}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIPN4Lava14ParticleSystemESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN4Lava14ParticleSystemESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN4Lava14ParticleSystemESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN4Lava14ParticleSystemESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!18 = !{!"_ZTSSt10shared_ptrIN4Lava6OpenGL14GLVertexBufferEE", !19, i64 0}
!19 = !{!"_ZTSSt12__shared_ptrIN4Lava6OpenGL14GLVertexBufferELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !20, i64 8}
!20 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"int", !13, i64 0}
!23 = !{!9, !12, i64 56}
!24 = !{!25, !12, i64 0}
!25 = !{!"_ZTSN4Lava19VertexBufferElementE", !12, i64 0, !22, i64 8}
!26 = !{!25, !22, i64 8}
!27 = !{!9, !12, i64 64}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass