; LLVM IR from Angelo1211/HybridRenderingEngine :: src/scene.ll (ZN5Scene13drawDepthPassERK6Shader)

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

%"struct.glm::mat" = type { [4 x %"struct.glm::vec.3"] }
%"struct.glm::vec.3" = type { %union.anon.4 }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { float, float, float, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%class.Scene = type { %struct.CubeMap, %struct.CubeMap, %struct.Texture, %struct.Skybox, i32, i8, ptr, %"class.std::__cxx11::basic_string", i8, %struct.DirectionalLight, ptr, %"class.std::vector", %"class.std::vector" }
%struct.CubeMap = type <{ %struct.Texture, i32, [4 x i8] }>
%struct.Texture = type { i32, i32, i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%struct.Skybox = type { i32, %struct.Texture, %struct.CubeMap }
%struct.DirectionalLight = type { %struct.BaseLight, %"struct.glm::vec", %"struct.glm::mat", %"struct.glm::mat", float, float }
%struct.BaseLight = type { %"struct.glm::vec", %"struct.glm::mat", i8, float, float, float, i32, i32 }
%"struct.glm::vec" = type { %union.anon.0 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { float, float, float }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl" }
%"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Model *, std::allocator<Model *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Camera = type <{ %"struct.glm::mat", %"struct.glm::mat", %struct.Frustum, %"class.std::set", %"struct.glm::vec", %"struct.glm::vec", %"struct.glm::vec", %"struct.glm::vec", float, float, %"struct.glm::vec", %"struct.glm::vec", %"struct.glm::vec", %"struct.glm::vec", %"struct.glm::vec", float, float, float, float, float, i32, [4 x i8] }>
%struct.Frustum = type { [6 x %struct.Plane], float, float, float, float, float, float }
%struct.Plane = type { %"struct.glm::vec", float }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, char, std::_Identity<char>, std::less<char>>::_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 }
%struct.Model = type { i8, %"struct.glm::mat", %"class.std::vector.11", %"class.std::unordered_map", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl" = type { %"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Mesh, std::allocator<Mesh>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@.str.30 = external hidden unnamed_addr constant [4 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

declare void @_ZNK6Shader3useEv(ptr noundef nonnull align 4 dereferenceable(4)) #3

; 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) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glmmlIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_S6_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat") align 4, ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) #5

declare void @_ZNK6Shader7setMat4ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN3glm3matILi4ELi4EfLNS8_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(64)) #3

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

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

declare void @_ZN5Model4drawERK6Shaderb(ptr noundef nonnull align 8 dereferenceable(216), ptr noundef nonnull align 4 dereferenceable(4), i1 noundef zeroext) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EEC2ERKf(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Scene13drawDepthPassERK6Shader(ptr noundef nonnull align 8 dereferenceable(792) %0, ptr noundef nonnull align 4 dereferenceable(4) %1) #2 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 float, align 4
  %7 = alloca %"struct.glm::mat", align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.glm::mat", align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store float 1.000000e+00, ptr %6, align 4, !tbaa !9
  call void @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EEC2ERKf(ptr noundef nonnull align 4 dereferenceable(64) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #7
  %16 = getelementptr inbounds %class.Scene, ptr %15, i32 0, i32 6
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds %struct.Camera, ptr %17, i32 0, i32 1
  %19 = getelementptr inbounds %class.Scene, ptr %15, i32 0, i32 6
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %struct.Camera, ptr %20, i32 0, i32 0
  call void @_ZN3glmmlIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_S6_(ptr dead_on_unwind writable sret(%"struct.glm::mat") align 4 %7, ptr noundef nonnull align 4 dereferenceable(64) %18, ptr noundef nonnull align 4 dereferenceable(64) %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !29
  br label %22

22:                                               ; preds = %43, %2
  %23 = load i32, ptr %8, align 4, !tbaa !29
  %24 = zext i32 %23 to i64
  %25 = getelementptr inbounds %class.Scene, ptr %15, i32 0, i32 12
  %26 = call noundef i64 @_ZNKSt6vectorIP5ModelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  %27 = icmp ult i64 %24, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %55

29:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %30 = getelementptr inbounds %class.Scene, ptr %15, i32 0, i32 12
  %31 = load i32, ptr %8, align 4, !tbaa !29
  %32 = zext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP5ModelSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %32) #7
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  store ptr %34, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #7
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.Model, ptr %35, i32 0, i32 1
  call void @_ZN3glmmlIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_S6_(ptr dead_on_unwind writable sret(%"struct.glm::mat") align 4 %10, ptr noundef nonnull align 4 dereferenceable(64) %7, ptr noundef nonnull align 4 dereferenceable(64) %36)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %10, i64 64, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #7
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK6Shader3useEv(ptr noundef nonnull align 4 dereferenceable(4) %37)
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.30, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %39 unwind label %46

39:                                               ; preds = %29
  invoke void @_ZNK6Shader7setMat4ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN3glm3matILi4ELi4EfLNS8_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 4 dereferenceable(64) %5)
          to label %40 unwind label %50

40:                                               ; preds = %39
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN5Model4drawERK6Shaderb(ptr noundef nonnull align 8 dereferenceable(216) %41, ptr noundef nonnull align 4 dereferenceable(4) %42, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %43

43:                                               ; preds = %40
  %44 = load i32, ptr %8, align 4, !tbaa !29
  %45 = add i32 %44, 1
  store i32 %45, ptr %8, align 4, !tbaa !29
  br label %22, !llvm.loop !32

46:                                               ; preds = %29
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %13, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %14, align 4
  br label %54

50:                                               ; preds = %39
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %13, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %54

54:                                               ; preds = %50, %46
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #7
  br label %56

55:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #7
  ret void

56:                                               ; preds = %54
  %57 = load ptr, ptr %13, align 8
  %58 = load i32, ptr %14, align 4
  %59 = insertvalue { ptr, i32 } poison, ptr %57, 0
  %60 = insertvalue { ptr, i32 } %59, i32 %58, 1
  resume { ptr, i32 } %60
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 = { 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 #6 = { inlinehint 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 #7 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 440}
!12 = !{!"_ZTS5Scene", !13, i64 0, !13, i64 88, !14, i64 176, !19, i64 256, !15, i64 432, !20, i64 436, !6, i64 440, !16, i64 448, !20, i64 480, !21, i64 484, !6, i64 736, !25, i64 744, !25, i64 768}
!13 = !{!"_ZTS7CubeMap", !14, i64 0, !15, i64 80}
!14 = !{!"_ZTS7Texture", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !16, i64 16, !16, i64 48}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !18, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTS6Skybox", !15, i64 0, !14, i64 8, !13, i64 88}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTS16DirectionalLight", !22, i64 0, !23, i64 100, !24, i64 112, !24, i64 176, !10, i64 240, !10, i64 244}
!22 = !{!"_ZTS9BaseLight", !23, i64 0, !24, i64 12, !20, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !15, i64 92, !15, i64 96}
!23 = !{!"_ZTSN3glm3vecILi3EfLNS_9qualifierE0EEE", !7, i64 0}
!24 = !{!"_ZTSN3glm3matILi4ELi4EfLNS_9qualifierE0EEE", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIP5ModelSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIP5ModelSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP5ModelSaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP5ModelSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!15, !15, i64 0}
!30 = !{i64 0, i64 64, !31}
!31 = !{!7, !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


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

%"struct.glm::mat" = type { [4 x %"struct.glm::vec.3"] }
%"struct.glm::vec.3" = type { %union.anon.4 }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { float, float, float, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.30 = external hidden unnamed_addr constant [4 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

declare void @_ZNK6Shader3useEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress 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) #4

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

declare void @_ZNK6Shader7setMat4ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN3glm3matILi4ELi4EfLNS8_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #3

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

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

declare void @_ZN5Model4drawERK6Shaderb(ptr noundef nonnull align 8 dereferenceable(216), ptr noundef nonnull align 4 dereferenceable(4), i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EEC2ERKf(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5Scene13drawDepthPassERK6Shader(ptr noundef nonnull align 8 dereferenceable(792) %0, ptr noundef nonnull align 4 dereferenceable(4) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.glm::mat", align 4
  %4 = alloca float, align 4
  %5 = alloca %"struct.glm::mat", align 4
  %6 = alloca %"struct.glm::mat", align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store float 1.000000e+00, ptr %4, align 4, !tbaa !5
  call void @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EEC2ERKf(ptr noundef nonnull align 4 dereferenceable(64) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #7
  %9 = getelementptr inbounds i8, ptr %0, i64 440
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %10, i64 64
  call void @_ZN3glmmlIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_S6_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat") align 4 %5, ptr noundef nonnull align 4 dereferenceable(64) %11, ptr noundef nonnull align 4 dereferenceable(64) %10)
  %12 = getelementptr inbounds i8, ptr %0, i64 768
  %13 = call noundef i64 @_ZNKSt6vectorIP5ModelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %19, %2
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  ret void

.lr.ph:                                           ; preds = %2, %19
  %14 = phi i64 [ %21, %19 ], [ 0, %2 ]
  %.01114 = phi i32 [ %20, %19 ], [ 0, %2 ]
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP5ModelSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %14) #7
  %16 = load ptr, ptr %15, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #7
  %17 = getelementptr inbounds i8, ptr %16, i64 4
  call void @_ZN3glmmlIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_S6_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat") align 4 %6, ptr noundef nonnull align 4 dereferenceable(64) %5, ptr noundef nonnull align 4 dereferenceable(64) %17)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) %3, ptr noundef nonnull align 4 dereferenceable(64) %6, i64 64, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #7
  call void @_ZNK6Shader3useEv(ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.30, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %18 unwind label %24

18:                                               ; preds = %.lr.ph
  invoke void @_ZNK6Shader7setMat4ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN3glm3matILi4ELi4EfLNS8_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 4 dereferenceable(64) %3)
          to label %19 unwind label %26

19:                                               ; preds = %18
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @_ZN5Model4drawERK6Shaderb(ptr noundef nonnull align 8 dereferenceable(216) %16, ptr noundef nonnull align 4 dereferenceable(4) %1, i1 noundef zeroext false)
  %20 = add i32 %.01114, 1
  %21 = zext i32 %20 to i64
  %22 = call noundef i64 @_ZNKSt6vectorIP5ModelSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %23 = icmp ugt i64 %22, %21
  br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !31

24:                                               ; preds = %.lr.ph
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %18
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { inlinehint 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 #6 = { inlinehint 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 #7 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !16, i64 440}
!10 = !{!"_ZTS5Scene", !11, i64 0, !11, i64 88, !12, i64 176, !18, i64 256, !13, i64 432, !19, i64 436, !16, i64 440, !14, i64 448, !19, i64 480, !20, i64 484, !16, i64 736, !24, i64 744, !24, i64 768}
!11 = !{!"_ZTS7CubeMap", !12, i64 0, !13, i64 80}
!12 = !{!"_ZTS7Texture", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !14, i64 16, !14, i64 48}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !17, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTS6Skybox", !13, i64 0, !12, i64 8, !11, i64 88}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTS16DirectionalLight", !21, i64 0, !22, i64 100, !23, i64 112, !23, i64 176, !6, i64 240, !6, i64 244}
!21 = !{!"_ZTS9BaseLight", !22, i64 0, !23, i64 12, !19, i64 76, !6, i64 80, !6, i64 84, !6, i64 88, !13, i64 92, !13, i64 96}
!22 = !{!"_ZTSN3glm3vecILi3EfLNS_9qualifierE0EEE", !7, i64 0}
!23 = !{!"_ZTSN3glm3matILi4ELi4EfLNS_9qualifierE0EEE", !7, i64 0}
!24 = !{!"_ZTSSt6vectorIP5ModelSaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIP5ModelSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIP5ModelSaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP5ModelSaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!28 = !{!16, !16, i64 0}
!29 = !{i64 0, i64 64, !30}
!30 = !{!7, !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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