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

; 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.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.Lava::OpenGL::GLStandardRenderer" = type { %"class.Lava::EntityRenderer", %"class.std::map", %"class.std::vector.3", ptr }
%"class.Lava::EntityRenderer" = type { %"class.Lava::BaseRenderer" }
%"class.Lava::BaseRenderer" = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<Lava::MeshRenderer *, std::pair<Lava::MeshRenderer *const, std::vector<Lava::Entity *> *>, std::_Select1st<std::pair<Lava::MeshRenderer *const, std::vector<Lava::Entity *> *>>, std::less<Lava::MeshRenderer *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<Lava::MeshRenderer *, std::pair<Lava::MeshRenderer *const, std::vector<Lava::Entity *> *>, std::_Select1st<std::pair<Lava::MeshRenderer *const, std::vector<Lava::Entity *> *>>, std::less<Lava::MeshRenderer *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<Lava::Entity *, std::allocator<Lava::Entity *>>::_Vector_impl" }
%"struct.std::_Vector_base<Lava::Entity *, std::allocator<Lava::Entity *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Lava::Entity *, std::allocator<Lava::Entity *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Lava::Entity *, std::allocator<Lava::Entity *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN4Lava6OpenGL18GLStandardRendererE = external dso_local unnamed_addr constant { [14 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava6OpenGL18GLStandardRendererC2EPNS_5SceneESt6vectorIPNS0_8GLShaderESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4Lava14EntityRendererC2EPNS_5SceneE(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef %14)
  store ptr getelementptr inbounds inrange(-16, 96) ({ [14 x ptr] }, ptr @_ZTVN4Lava6OpenGL18GLStandardRendererE, i32 0, i32 0, i32 2), ptr %13, align 8, !tbaa !9
  %15 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %13, i32 0, i32 1
  call void @_ZNSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #7
  %16 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %13, i32 0, i32 2
  call void @_ZNSt6vectorIPN4Lava6EntityESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  %17 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #8
          to label %18 unwind label %23

18:                                               ; preds = %3
  call void @llvm.memset.p0.i64(ptr align 16 %17, i8 0, i64 40, i1 false)
  call void @_ZN4Lava6OpenGL12GLShaderBankC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #7
  %19 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %13, i32 0, i32 3
  store ptr %17, ptr %19, align 8, !tbaa !11
  %20 = call noundef zeroext i1 @_ZNKSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  br i1 %20, label %21, label %27

21:                                               ; preds = %18
  invoke void @_ZN4Lava6OpenGL18GLStandardRenderer17LoadDefaultShaderERSt6vectorIPNS0_8GLShaderESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(96) %13, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %22 unwind label %23

22:                                               ; preds = %21
  br label %27

23:                                               ; preds = %50, %21, %3
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %7, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %8, align 4
  br label %57

27:                                               ; preds = %22, %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr %2, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = call ptr @_ZNSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #7
  %30 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %29, ptr %30, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = call ptr @_ZNSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  %33 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %32, ptr %33, align 8
  br label %34

34:                                               ; preds = %44, %27
  %35 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %35, label %37, label %36

36:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %50

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  store ptr %38, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %13, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  invoke void @_ZN4Lava6OpenGL12GLShaderBank9AddShaderEPNS0_8GLShaderE(ptr noundef nonnull align 8 dereferenceable(40) %40, ptr noundef %42)
          to label %43 unwind label %46

43:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %44

44:                                               ; preds = %43
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %34

46:                                               ; preds = %37
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %7, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %57

50:                                               ; preds = %36
  %51 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %13, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds ptr, ptr %53, i64 5
  %55 = load ptr, ptr %54, align 8
  invoke void %55(ptr noundef nonnull align 8 dereferenceable(40) %52)
          to label %56 unwind label %23

56:                                               ; preds = %50
  ret void

57:                                               ; preds = %46, %23
  call void @_ZNSt6vectorIPN4Lava6EntityESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  call void @_ZNSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #7
  call void @_ZN4Lava12BaseRendererD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #7
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %7, align 8
  %60 = load i32, ptr %8, align 4
  %61 = insertvalue { ptr, i32 } poison, ptr %59, 0
  %62 = insertvalue { ptr, i32 } %61, i32 %60, 1
  resume { ptr, i32 } %62
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPN4Lava6EntityESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

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

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

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

declare void @_ZN4Lava6OpenGL12GLShaderBank9AddShaderEPNS0_8GLShaderE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #6

; 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 nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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

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 = { nounwind }
attributes #8 = { builtin allocsize(0) }

!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 88}
!12 = !{!"_ZTSN4Lava6OpenGL18GLStandardRendererE", !13, i64 0, !15, i64 16, !24, i64 64, !6, i64 88}
!13 = !{!"_ZTSN4Lava14EntityRendererE", !14, i64 0}
!14 = !{!"_ZTSN4Lava12BaseRendererE", !6, i64 8}
!15 = !{!"_ZTSSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEE", !16, i64 0}
!16 = !{!"_ZTSSt8_Rb_treeIPN4Lava12MeshRendererESt4pairIKS2_PSt6vectorIPNS0_6EntityESaIS7_EEESt10_Select1stISB_ESt4lessIS2_ESaISB_EE", !17, i64 0}
!17 = !{!"_ZTSNSt8_Rb_treeIPN4Lava12MeshRendererESt4pairIKS2_PSt6vectorIPNS0_6EntityESaIS7_EEESt10_Select1stISB_ESt4lessIS2_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !18, i64 0, !20, i64 8}
!18 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIPN4Lava12MeshRendererEEE", !19, i64 0}
!19 = !{!"_ZTSSt4lessIPN4Lava12MeshRendererEE"}
!20 = !{!"_ZTSSt15_Rb_tree_header", !21, i64 0, !23, i64 32}
!21 = !{!"_ZTSSt18_Rb_tree_node_base", !22, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSSt6vectorIPN4Lava6EntityESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIPN4Lava6EntityESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN4Lava6EntityESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN4Lava6EntityESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


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

@_ZTVN4Lava6OpenGL18GLStandardRendererE = external dso_local unnamed_addr constant { [14 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava6OpenGL18GLStandardRendererC2EPNS_5SceneESt6vectorIPNS0_8GLShaderESaIS6_EE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  tail call void @_ZN4Lava14EntityRendererC2EPNS_5SceneE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1)
  store ptr getelementptr inbounds inrange(-16, 96) (i8, ptr @_ZTVN4Lava6OpenGL18GLStandardRendererE, i64 16), ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  %7 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZNSt6vectorIPN4Lava6EntityESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %8 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #8
          to label %9 unwind label %13

9:                                                ; preds = %3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %8, i8 0, i64 40, i1 false)
  tail call void @_ZN4Lava6OpenGL12GLShaderBankC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %10 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %8, ptr %10, align 8, !tbaa !8
  %11 = tail call noundef zeroext i1 @_ZNKSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  br i1 %11, label %12, label %15

12:                                               ; preds = %9
  invoke void @_ZN4Lava6OpenGL18GLStandardRenderer17LoadDefaultShaderERSt6vectorIPNS0_8GLShaderESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %15 unwind label %13

13:                                               ; preds = %._crit_edge, %12, %3
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %32

15:                                               ; preds = %12, %9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %16 = tail call ptr @_ZNSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  store ptr %16, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %17 = tail call ptr @_ZNSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  store ptr %17, ptr %5, align 8
  %18 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %26, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %19 = load ptr, ptr %10, align 8, !tbaa !8
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 40
  %22 = load ptr, ptr %21, align 8
  invoke void %22(ptr noundef nonnull align 8 dereferenceable(40) %19)
          to label %31 unwind label %13

.lr.ph:                                           ; preds = %15, %26
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %24 = load ptr, ptr %10, align 8, !tbaa !8
  %25 = load ptr, ptr %23, align 8, !tbaa !27
  invoke void @_ZN4Lava6OpenGL12GLShaderBank9AddShaderEPNS0_8GLShaderE(ptr noundef nonnull align 8 dereferenceable(40) %24, ptr noundef %25)
          to label %26 unwind label %29

26:                                               ; preds = %.lr.ph
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %28, label %.lr.ph, label %._crit_edge

29:                                               ; preds = %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %32

31:                                               ; preds = %._crit_edge
  ret void

32:                                               ; preds = %29, %13
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %14, %13 ]
  call void @_ZNSt6vectorIPN4Lava6EntityESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @_ZNSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @_ZN4Lava12BaseRendererD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #7
  resume { ptr, i32 } %.pn
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIPN4Lava6EntityESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIPN4Lava6OpenGL8GLShaderESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Lava6OpenGL18GLStandardRenderer17LoadDefaultShaderERSt6vectorIPNS0_8GLShaderESaIS4_EE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24)) local_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) #5

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

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

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

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

declare void @_ZN4Lava6OpenGL12GLShaderBank9AddShaderEPNS0_8GLShaderE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #6

; 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 nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Lava6OpenGL8GLShaderESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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

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 = { nounwind }
attributes #8 = { builtin allocsize(0) }

!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 88}
!9 = !{!"_ZTSN4Lava6OpenGL18GLStandardRendererE", !10, i64 0, !14, i64 16, !23, i64 64, !12, i64 88}
!10 = !{!"_ZTSN4Lava14EntityRendererE", !11, i64 0}
!11 = !{!"_ZTSN4Lava12BaseRendererE", !12, i64 8}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !7, i64 0}
!14 = !{!"_ZTSSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEE", !15, i64 0}
!15 = !{!"_ZTSSt8_Rb_treeIPN4Lava12MeshRendererESt4pairIKS2_PSt6vectorIPNS0_6EntityESaIS7_EEESt10_Select1stISB_ESt4lessIS2_ESaISB_EE", !16, i64 0}
!16 = !{!"_ZTSNSt8_Rb_treeIPN4Lava12MeshRendererESt4pairIKS2_PSt6vectorIPNS0_6EntityESaIS7_EEESt10_Select1stISB_ESt4lessIS2_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !17, i64 0, !19, i64 8}
!17 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIPN4Lava12MeshRendererEEE", !18, i64 0}
!18 = !{!"_ZTSSt4lessIPN4Lava12MeshRendererEE"}
!19 = !{!"_ZTSSt15_Rb_tree_header", !20, i64 0, !22, i64 32}
!20 = !{!"_ZTSSt18_Rb_tree_node_base", !21, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!21 = !{!"_ZTSSt14_Rb_tree_color", !13, i64 0}
!22 = !{!"long", !13, i64 0}
!23 = !{!"_ZTSSt6vectorIPN4Lava6EntityESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIPN4Lava6EntityESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIPN4Lava6EntityESaIS2_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN4Lava6EntityESaIS2_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!27 = !{!12, !12, i64 0}


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