; 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.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.glm::vec" = type { %union.anon, %union.anon.13, %union.anon.14, %union.anon.15 }
%union.anon = type { float }
%union.anon.13 = type { float }
%union.anon.14 = type { float }
%union.anon.15 = type { float }
%"class.__gnu_cxx::__normal_iterator.55" = 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 }
%"class.Lava::Entity" = type { %"class.Lava::SceneObject", ptr, ptr, ptr, ptr }
%"class.Lava::SceneObject" = type { ptr }
%"struct.Lava::Mesh" = type { ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32 }

@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava6OpenGL18GLStandardRenderer6RenderERSt3mapIPNS_12MeshRendererEPSt6vectorIPNS_6EntityESaIS7_EESt4lessIS4_ESaISt4pairIKS4_SA_EEEN3glm3vecILi4EfLNSJ_9qualifierE0EEE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, <2 x float> %2, <2 x float> %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.glm::vec", align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.55", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.55", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::shared_ptr", align 8
  %13 = alloca %"struct.glm::vec", align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 0
  store <2 x float> %2, ptr %16, align 4
  %17 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 1
  store <2 x float> %3, ptr %17, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8
  call void @glEnable(i32 noundef 12288)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %19 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %18, i32 0, i32 2
  store ptr %19, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  %21 = call ptr @_ZNSt6vectorIPN4Lava6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.55", ptr %9, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = call ptr @_ZNSt6vectorIPN4Lava6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.55", ptr %10, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  br label %26

26:                                               ; preds = %63, %4
  %27 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %69

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  store ptr %30, ptr %11, align 8, !tbaa !5
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = load ptr, ptr %18, align 8, !tbaa !9
  %34 = getelementptr inbounds ptr, ptr %33, i64 9
  %35 = load ptr, ptr %34, align 8
  call void %35(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef %32)
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = load ptr, ptr %18, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8
  call void %40(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef %37)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %41 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %18, i32 0, i32 3
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %12, ptr noundef nonnull align 8 dereferenceable(40) %42, i32 noundef 0)
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %5, i64 16, i1 false), !tbaa.struct !28
  %44 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %45 = load <2 x float>, ptr %44, align 4
  %46 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %47 = load <2 x float>, ptr %46, align 4
  %48 = load ptr, ptr %43, align 8, !tbaa !9
  %49 = getelementptr inbounds ptr, ptr %48, i64 5
  %50 = load ptr, ptr %49, align 8
  invoke void %50(ptr noundef nonnull align 8 dereferenceable(36) %43, ptr noundef @.str.16, <2 x float> %45, <2 x float> %47)
          to label %51 unwind label %65

51:                                               ; preds = %29
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.Lava::Entity", ptr %53, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !30
  %56 = getelementptr inbounds %"struct.Lava::Mesh", ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 8, !tbaa !33
  call void @glDrawElements(i32 noundef 4, i32 noundef %57, i32 noundef 5125, ptr noundef null)
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = load ptr, ptr %18, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %60, i64 10
  %62 = load ptr, ptr %61, align 8
  call void %62(ptr noundef nonnull align 8 dereferenceable(96) %18, ptr noundef %59)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %63

63:                                               ; preds = %51
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  br label %26

65:                                               ; preds = %29
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %14, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %15, align 4
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %70

69:                                               ; preds = %28
  call void @glDisable(i32 noundef 12288)
  ret void

70:                                               ; preds = %65
  %71 = load ptr, ptr %14, align 8
  %72 = load i32, ptr %15, align 4
  %73 = insertvalue { ptr, i32 } poison, ptr %71, 0
  %74 = insertvalue { ptr, i32 } %73, i32 %72, 1
  resume { ptr, i32 } %74
}

declare void @glEnable(i32 noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN4Lava6EntityESaIS2_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_cxxneIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

declare void @glDrawElements(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #4

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

declare void @glDisable(i32 noundef) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"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}
!28 = !{i64 0, i64 4, !29, i64 4, i64 4, !29, i64 8, i64 4, !29, i64 12, i64 4, !29}
!29 = !{!7, !7, i64 0}
!30 = !{!31, !6, i64 24}
!31 = !{!"_ZTSN4Lava6EntityE", !32, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!32 = !{!"_ZTSN4Lava11SceneObjectE"}
!33 = !{!34, !35, i64 8}
!34 = !{!"_ZTSN4Lava4MeshE", !6, i64 0, !35, i64 8, !6, i64 16, !35, i64 24, !6, i64 32, !35, i64 40, !6, i64 48, !35, i64 56, !6, i64 64, !35, i64 72, !6, i64 80, !35, i64 88}
!35 = !{!"int", !7, i64 0}


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

@.str.16 = external hidden unnamed_addr constant [10 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__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 @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava6OpenGL18GLStandardRenderer6RenderERSt3mapIPNS_12MeshRendererEPSt6vectorIPNS_6EntityESaIS7_EESt4lessIS4_ESaISt4pairIKS4_SA_EEEN3glm3vecILi4EfLNSJ_9qualifierE0EEE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(48) %1, <2 x float> %2, <2 x float> %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.55", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.55", align 8
  %7 = alloca %"class.std::shared_ptr", align 8
  tail call void @glEnable(i32 noundef 12288)
  %8 = getelementptr inbounds i8, ptr %0, i64 64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %9 = tail call ptr @_ZNSt6vectorIPN4Lava6EntityESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  store ptr %9, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %10 = tail call ptr @_ZNSt6vectorIPN4Lava6EntityESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  store ptr %10, ptr %6, align 8
  %11 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 88
  br label %13

._crit_edge:                                      ; preds = %28, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @glDisable(i32 noundef 12288)
  ret void

13:                                               ; preds = %.lr.ph, %28
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = load ptr, ptr %0, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %16, i64 72
  %18 = load ptr, ptr %17, align 8
  call void %18(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %15)
  %19 = load ptr, ptr %14, align 8, !tbaa !5
  %20 = load ptr, ptr %0, align 8, !tbaa !9
  %21 = getelementptr inbounds i8, ptr %20, i64 64
  %22 = load ptr, ptr %21, align 8
  call void %22(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %23 = load ptr, ptr %12, align 8, !tbaa !11
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %7, ptr noundef nonnull align 8 dereferenceable(40) %23, i32 noundef 0)
  %24 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds i8, ptr %25, i64 40
  %27 = load ptr, ptr %26, align 8
  invoke void %27(ptr noundef nonnull align 8 dereferenceable(36) %24, ptr noundef nonnull @.str.16, <2 x float> %2, <2 x float> %3)
          to label %28 unwind label %40

28:                                               ; preds = %13
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !28
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load i32, ptr %32, align 8, !tbaa !31
  call void @glDrawElements(i32 noundef 4, i32 noundef %33, i32 noundef 5125, ptr noundef null)
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  %35 = load ptr, ptr %0, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %35, i64 80
  %37 = load ptr, ptr %36, align 8
  call void %37(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %34)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %39, label %13, label %._crit_edge

40:                                               ; preds = %13
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  resume { ptr, i32 } %41
}

declare void @glEnable(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIPN4Lava6EntityESaIS2_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_cxxneIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(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_iteratorIPPN4Lava6EntityESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare void @glDrawElements(i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

declare void @glDisable(i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 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}
!28 = !{!29, !6, i64 24}
!29 = !{!"_ZTSN4Lava6EntityE", !30, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!30 = !{!"_ZTSN4Lava11SceneObjectE"}
!31 = !{!32, !33, i64 8}
!32 = !{!"_ZTSN4Lava4MeshE", !6, i64 0, !33, i64 8, !6, i64 16, !33, i64 24, !6, i64 32, !33, i64 40, !6, i64 48, !33, i64 56, !6, i64 64, !33, i64 72, !6, i64 80, !33, i64 88}
!33 = !{!"int", !7, i64 0}


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