; 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::mat" = type { [4 x %"struct.glm::vec"] }
%"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.Lava::Entity" = type { %"class.Lava::SceneObject", ptr, ptr, ptr, ptr }
%"class.Lava::SceneObject" = 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 }
%"struct.Lava::Material" = type <{ ptr, ptr, ptr, %"struct.glm::vec.28", [4 x i8], ptr, i32, i8, i8, [2 x i8], [3 x float], float, float, [4 x i8] }>
%"struct.glm::vec.28" = type { %union.anon.29, %union.anon.30, %union.anon.31 }
%union.anon.29 = type { float }
%union.anon.30 = type { float }
%union.anon.31 = type { float }

@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 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 @_ZN4Lava6OpenGL18GLStandardRenderer16PushInstanceDataEPNS_6EntityE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.glm::mat", align 4
  %6 = alloca %"class.std::shared_ptr", align 8
  %7 = alloca %"struct.glm::mat", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #4
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %"class.Lava::Entity", ptr %13, i32 0, i32 1
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  call void @_ZN4Lava9Transform23GetTransformationMatrixEv(ptr dead_on_unwind writable sret(%"struct.glm::mat") align 4 %5, ptr noundef nonnull align 4 dereferenceable(36) %15)
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  %16 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %12, i32 0, i32 3
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %17, i32 noundef 0)
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %5, i64 64, i1 false), !tbaa.struct !29
  %19 = load ptr, ptr %18, align 8, !tbaa !31
  %20 = getelementptr inbounds ptr, ptr %19, i64 6
  %21 = load ptr, ptr %20, align 8
  invoke void %21(ptr noundef nonnull align 8 dereferenceable(36) %18, ptr noundef @.str.10, ptr noundef byval(%"struct.glm::mat") align 8 %7)
          to label %22 unwind label %47

22:                                               ; preds = %2
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %23 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %12, i32 0, i32 3
  %24 = load ptr, ptr %23, align 8, !tbaa !12
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %10, ptr noundef nonnull align 8 dereferenceable(40) %24, i32 noundef 1)
  %25 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %10) #4
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.Lava::Entity", ptr %26, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !33
  %29 = getelementptr inbounds %"struct.Lava::Material", ptr %28, i32 0, i32 11
  %30 = load float, ptr %29, align 4, !tbaa !34
  %31 = load ptr, ptr %25, align 8, !tbaa !31
  %32 = getelementptr inbounds ptr, ptr %31, i64 1
  %33 = load ptr, ptr %32, align 8
  invoke void %33(ptr noundef nonnull align 8 dereferenceable(36) %25, ptr noundef @.str.11, float noundef %30)
          to label %34 unwind label %51

34:                                               ; preds = %22
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  %35 = getelementptr inbounds %"class.Lava::OpenGL::GLStandardRenderer", ptr %12, i32 0, i32 3
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %36, i32 noundef 1)
  %37 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.Lava::Entity", ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !33
  %41 = getelementptr inbounds %"struct.Lava::Material", ptr %40, i32 0, i32 12
  %42 = load float, ptr %41, align 8, !tbaa !40
  %43 = load ptr, ptr %37, align 8, !tbaa !31
  %44 = getelementptr inbounds ptr, ptr %43, i64 1
  %45 = load ptr, ptr %44, align 8
  invoke void %45(ptr noundef nonnull align 8 dereferenceable(36) %37, ptr noundef @.str.12, float noundef %42)
          to label %46 unwind label %55

46:                                               ; preds = %34
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #4
  ret void

47:                                               ; preds = %2
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %8, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %9, align 4
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  br label %59

51:                                               ; preds = %22
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %8, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %9, align 4
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  br label %59

55:                                               ; preds = %34
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %8, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %9, align 4
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  br label %59

59:                                               ; preds = %55, %51, %47
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #4
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %8, align 8
  %62 = load i32, ptr %9, align 4
  %63 = insertvalue { ptr, i32 } poison, ptr %61, 0
  %64 = insertvalue { ptr, i32 } %63, i32 %62, 1
  resume { ptr, i32 } %64
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Lava9Transform23GetTransformationMatrixEv(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat") align 4, ptr noundef nonnull align 4 dereferenceable(36)) #3 align 2

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"="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 = { 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, !6, i64 8}
!10 = !{!"_ZTSN4Lava6EntityE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!"_ZTSN4Lava11SceneObjectE"}
!12 = !{!13, !6, i64 88}
!13 = !{!"_ZTSN4Lava6OpenGL18GLStandardRendererE", !14, i64 0, !16, i64 16, !25, i64 64, !6, i64 88}
!14 = !{!"_ZTSN4Lava14EntityRendererE", !15, i64 0}
!15 = !{!"_ZTSN4Lava12BaseRendererE", !6, i64 8}
!16 = !{!"_ZTSSt3mapIPN4Lava12MeshRendererEPSt6vectorIPNS0_6EntityESaIS5_EESt4lessIS2_ESaISt4pairIKS2_S8_EEE", !17, i64 0}
!17 = !{!"_ZTSSt8_Rb_treeIPN4Lava12MeshRendererESt4pairIKS2_PSt6vectorIPNS0_6EntityESaIS7_EEESt10_Select1stISB_ESt4lessIS2_ESaISB_EE", !18, i64 0}
!18 = !{!"_ZTSNSt8_Rb_treeIPN4Lava12MeshRendererESt4pairIKS2_PSt6vectorIPNS0_6EntityESaIS7_EEESt10_Select1stISB_ESt4lessIS2_ESaISB_EE13_Rb_tree_implISF_Lb1EEE", !19, i64 0, !21, i64 8}
!19 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIPN4Lava12MeshRendererEEE", !20, i64 0}
!20 = !{!"_ZTSSt4lessIPN4Lava12MeshRendererEE"}
!21 = !{!"_ZTSSt15_Rb_tree_header", !22, i64 0, !24, i64 32}
!22 = !{!"_ZTSSt18_Rb_tree_node_base", !23, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIPN4Lava6EntityESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIPN4Lava6EntityESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN4Lava6EntityESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPN4Lava6EntityESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{i64 0, i64 64, !30}
!30 = !{!7, !7, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"vtable pointer", !8, i64 0}
!33 = !{!10, !6, i64 32}
!34 = !{!35, !39, i64 68}
!35 = !{!"_ZTSN4Lava8MaterialE", !6, i64 0, !6, i64 8, !6, i64 16, !36, i64 24, !6, i64 40, !37, i64 48, !38, i64 52, !38, i64 53, !7, i64 56, !39, i64 68, !39, i64 72}
!36 = !{!"_ZTSN3glm3vecILi3EfLNS_9qualifierE0EEE", !7, i64 0, !7, i64 4, !7, i64 8}
!37 = !{!"int", !7, i64 0}
!38 = !{!"bool", !7, i64 0}
!39 = !{!"float", !7, i64 0}
!40 = !{!35, !39, i64 72}


; 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 }
%"struct.glm::mat" = type { [4 x %"struct.glm::vec"] }
%"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 }

@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [13 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 @_ZN4Lava6OpenGL18GLStandardRenderer16PushInstanceDataEPNS_6EntityE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(96) %0, ptr nocapture noundef readonly %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.glm::mat", align 8
  %4 = alloca %"class.std::shared_ptr", align 8
  %5 = alloca %"class.std::shared_ptr", align 8
  %6 = alloca %"class.std::shared_ptr", align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #3
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4Lava9Transform23GetTransformationMatrixEv(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat") align 4 %3, ptr noundef nonnull align 4 dereferenceable(36) %8)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %4, ptr noundef nonnull align 8 dereferenceable(40) %10, i32 noundef 0)
  %11 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  %12 = load ptr, ptr %11, align 8, !tbaa !28
  %13 = getelementptr inbounds i8, ptr %12, i64 48
  %14 = load ptr, ptr %13, align 8
  invoke void %14(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull @.str.10, ptr noundef nonnull byval(%"struct.glm::mat") align 8 %3)
          to label %15 unwind label %35

15:                                               ; preds = %2
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %16 = load ptr, ptr %9, align 8, !tbaa !11
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %16, i32 noundef 1)
  %17 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  %18 = getelementptr inbounds i8, ptr %1, i64 32
  %19 = load ptr, ptr %18, align 8, !tbaa !30
  %20 = getelementptr inbounds i8, ptr %19, i64 68
  %21 = load float, ptr %20, align 4, !tbaa !31
  %22 = load ptr, ptr %17, align 8, !tbaa !28
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load ptr, ptr %23, align 8
  invoke void %24(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull @.str.11, float noundef %21)
          to label %25 unwind label %37

25:                                               ; preds = %15
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  %26 = load ptr, ptr %9, align 8, !tbaa !11
  call void @_ZN4Lava10ShaderBank9GetShaderEi(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %26, i32 noundef 1)
  %27 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #3
  %28 = load ptr, ptr %18, align 8, !tbaa !30
  %29 = getelementptr inbounds i8, ptr %28, i64 72
  %30 = load float, ptr %29, align 8, !tbaa !37
  %31 = load ptr, ptr %27, align 8, !tbaa !28
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load ptr, ptr %32, align 8
  invoke void %33(ptr noundef nonnull align 8 dereferenceable(36) %27, ptr noundef nonnull @.str.12, float noundef %30)
          to label %34 unwind label %39

34:                                               ; preds = %25
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #3
  ret void

35:                                               ; preds = %2
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  br label %41

37:                                               ; preds = %15
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  br label %41

39:                                               ; preds = %25
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4Lava6ShaderELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  br label %41

41:                                               ; preds = %39, %37, %35
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #3
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Lava9Transform23GetTransformationMatrixEv(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat") align 4, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #2 align 2

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"="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 = { 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, !8, i64 8}
!6 = !{!"_ZTSN4Lava6EntityE", !7, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32}
!7 = !{!"_ZTSN4Lava11SceneObjectE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !8, i64 88}
!12 = !{!"_ZTSN4Lava6OpenGL18GLStandardRendererE", !13, i64 0, !15, i64 16, !24, i64 64, !8, i64 88}
!13 = !{!"_ZTSN4Lava14EntityRendererE", !14, i64 0}
!14 = !{!"_ZTSN4Lava12BaseRendererE", !8, 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, !8, i64 8, !8, i64 16, !8, i64 24}
!22 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!23 = !{!"long", !9, 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", !8, i64 0, !8, i64 8, !8, i64 16}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !10, i64 0}
!30 = !{!6, !8, i64 32}
!31 = !{!32, !36, i64 68}
!32 = !{!"_ZTSN4Lava8MaterialE", !8, i64 0, !8, i64 8, !8, i64 16, !33, i64 24, !8, i64 40, !34, i64 48, !35, i64 52, !35, i64 53, !9, i64 56, !36, i64 68, !36, i64 72}
!33 = !{!"_ZTSN3glm3vecILi3EfLNS_9qualifierE0EEE", !9, i64 0, !9, i64 4, !9, i64 8}
!34 = !{!"int", !9, i64 0}
!35 = !{!"bool", !9, i64 0}
!36 = !{!"float", !9, i64 0}
!37 = !{!32, !36, i64 72}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass