; LLVM IR from paroj/gltut :: Tut 17 Spotlight on Textures/DoubleProjection.ll (Z11BuildLightsRKN3glm6detail7tmat4x4IfEE)

; 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.Framework::UniformIntBinder" = type <{ %"class.Framework::UniformBinderBase", i32, [4 x i8] }>
%"class.Framework::UniformBinderBase" = type { %"class.Framework::StateBinder", %"class.std::map" }
%"class.Framework::StateBinder" = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, int>, std::_Select1st<std::pair<const unsigned int, int>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, int>, std::_Select1st<std::pair<const unsigned int, int>>, std::less<unsigned int>>::_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.LightBlock = type { %"struct.glm::detail::tvec4", float, float, [2 x float], [4 x %struct.PerLight] }
%"struct.glm::detail::tvec4" = type { %union.anon.15 }
%union.anon.15 = type { %struct.anon.16 }
%struct.anon.16 = type { float, float, float, float }
%struct.PerLight = type { %"struct.glm::detail::tvec4", %"struct.glm::detail::tvec4" }

@g_lightUniformBuffer = external dso_local global i32, align 4
@g_lightNumBinder = external dso_local global %"class.Framework::UniformIntBinder", align 8
@_funcptr_glBindBuffer = external global ptr, align 8
@_funcptr_glBufferData = external global ptr, align 8

; 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 uwtable
define dso_local void @_Z11BuildLightsRKN3glm6detail7tmat4x4IfEE(ptr noundef nonnull align 4 dereferenceable(64) %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.LightBlock, align 4
  %4 = alloca %"struct.glm::detail::tvec4", align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca %"struct.glm::detail::tvec4", align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %"struct.glm::detail::tvec4", align 4
  %15 = alloca %"struct.glm::detail::tvec4", align 4
  %16 = alloca %"struct.glm::detail::tvec4", align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %"struct.glm::detail::tvec4", align 4
  %22 = alloca %"struct.glm::detail::tvec4", align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca %"struct.glm::detail::tvec4", align 4
  %29 = alloca %"struct.glm::detail::tvec4", align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 160, ptr %3) #5
  call void @_ZN10LightBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(160) %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store float 0x3FC99999A0000000, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store float 0x3FC99999A0000000, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store float 0x3FC99999A0000000, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store float 1.000000e+00, ptr %8, align 4, !tbaa !9
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %35 = getelementptr inbounds %struct.LightBlock, ptr %3, i32 0, i32 0
  %36 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  %37 = getelementptr inbounds %struct.LightBlock, ptr %3, i32 0, i32 1
  store float 0x3FA47AE140000000, ptr %37, align 4, !tbaa !11
  %38 = getelementptr inbounds %struct.LightBlock, ptr %3, i32 0, i32 2
  store float 3.000000e+00, ptr %38, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store float 2.000000e+00, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store float 2.000000e+00, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store float 2.500000e+00, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store float 1.000000e+00, ptr %13, align 4, !tbaa !9
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %39 = getelementptr inbounds %struct.LightBlock, ptr %3, i32 0, i32 4
  %40 = getelementptr inbounds [4 x %struct.PerLight], ptr %39, i64 0, i64 0
  %41 = getelementptr inbounds %struct.PerLight, ptr %40, i32 0, i32 1
  %42 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %43 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store float 0xBFC99999A0000000, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store float 5.000000e-01, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store float 5.000000e-01, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store float 0.000000e+00, ptr %20, align 4, !tbaa !9
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  call void @_ZN3glm9normalizeIfEENS_6detail5tvec4IT_EERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec4") align 4 %15, ptr noundef nonnull align 4 dereferenceable(16) %16)
  call void @_ZN3glm6detailmlIfEENS0_7tmat4x4IT_E8col_typeERKS4_RKNS4_8row_typeE(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec4") align 4 %14, ptr noundef nonnull align 4 dereferenceable(64) %43, ptr noundef nonnull align 4 dereferenceable(16) %15)
  %44 = getelementptr inbounds %struct.LightBlock, ptr %3, i32 0, i32 4
  %45 = getelementptr inbounds [4 x %struct.PerLight], ptr %44, i64 0, i64 0
  %46 = getelementptr inbounds %struct.PerLight, ptr %45, i32 0, i32 0
  %47 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %46, ptr noundef nonnull align 4 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store float 3.500000e+00, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store float 6.500000e+00, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store float 3.000000e+00, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store float 1.000000e+00, ptr %26, align 4, !tbaa !9
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store float 0x3FF3333340000000, ptr %27, align 4, !tbaa !9
  call void @_ZN3glm6detailmlIfEENS0_5tvec4IT_EERKS4_RKNS4_10value_typeE(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec4") align 4 %21, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %48 = getelementptr inbounds %struct.LightBlock, ptr %3, i32 0, i32 4
  %49 = getelementptr inbounds [4 x %struct.PerLight], ptr %48, i64 0, i64 1
  %50 = getelementptr inbounds %struct.PerLight, ptr %49, i32 0, i32 1
  %51 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %50, ptr noundef nonnull align 4 dereferenceable(16) %21)
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store float 5.000000e+00, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store float 6.000000e+00, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  store float 5.000000e-01, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store float 1.000000e+00, ptr %33, align 4, !tbaa !9
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @_ZN3glm6detailmlIfEENS0_7tmat4x4IT_E8col_typeERKS4_RKNS4_8row_typeE(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec4") align 4 %28, ptr noundef nonnull align 4 dereferenceable(64) %52, ptr noundef nonnull align 4 dereferenceable(16) %29)
  %53 = getelementptr inbounds %struct.LightBlock, ptr %3, i32 0, i32 4
  %54 = getelementptr inbounds [4 x %struct.PerLight], ptr %53, i64 0, i64 1
  %55 = getelementptr inbounds %struct.PerLight, ptr %54, i32 0, i32 0
  %56 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %55, ptr noundef nonnull align 4 dereferenceable(16) %28)
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  store i32 2, ptr %34, align 4, !tbaa !15
  call void @_ZN9Framework16UniformIntBinder8SetValueERKi(ptr noundef nonnull align 8 dereferenceable(60) @g_lightNumBinder, ptr noundef nonnull align 4 dereferenceable(4) %34)
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  %57 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !5
  %58 = load i32, ptr @g_lightUniformBuffer, align 4, !tbaa !15
  call void %57(i32 noundef 35345, i32 noundef %58)
  %59 = load ptr, ptr @_funcptr_glBufferData, align 8, !tbaa !5
  call void %59(i32 noundef 35345, i64 noundef 160, ptr noundef %3, i32 noundef 35040)
  call void @llvm.lifetime.end.p0(i64 160, ptr %3) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10LightBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(160)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm6detailmlIfEENS0_7tmat4x4IT_E8col_typeERKS4_RKNS4_8row_typeE(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec4") align 4, ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(16)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm9normalizeIfEENS_6detail5tvec4IT_EERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec4") align 4, ptr noundef nonnull align 4 dereferenceable(16)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm6detailmlIfEENS0_5tvec4IT_EERKS4_RKNS4_10value_typeE(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec4") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9Framework16UniformIntBinder8SetValueERKi(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTS10LightBlock", !13, i64 0, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32}
!13 = !{!"_ZTSN3glm6detail5tvec4IfEE", !7, i64 0}
!14 = !{!12, !10, i64 20}
!15 = !{!16, !16, i64 0}
!16 = !{!"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.Framework::UniformIntBinder" = type <{ %"class.Framework::UniformBinderBase", i32, [4 x i8] }>
%"class.Framework::UniformBinderBase" = type { %"class.Framework::StateBinder", %"class.std::map" }
%"class.Framework::StateBinder" = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, int>, std::_Select1st<std::pair<const unsigned int, int>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, int>, std::_Select1st<std::pair<const unsigned int, int>>, std::less<unsigned int>>::_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.LightBlock = type { %"struct.glm::detail::tvec4", float, float, [2 x float], [4 x %struct.PerLight] }
%"struct.glm::detail::tvec4" = type { %union.anon.15 }
%union.anon.15 = type { %struct.anon.16 }
%struct.anon.16 = type { float, float, float, float }
%struct.PerLight = type { %"struct.glm::detail::tvec4", %"struct.glm::detail::tvec4" }

@g_lightUniformBuffer = external dso_local local_unnamed_addr global i32, align 4
@g_lightNumBinder = external dso_local global %"class.Framework::UniformIntBinder", align 8
@_funcptr_glBindBuffer = external local_unnamed_addr global ptr, align 8
@_funcptr_glBufferData = external local_unnamed_addr global ptr, align 8

; 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 uwtable
define dso_local void @_Z11BuildLightsRKN3glm6detail7tmat4x4IfEE(ptr noundef nonnull align 4 dereferenceable(64) %0) local_unnamed_addr #1 {
  %2 = alloca %struct.LightBlock, align 4
  %3 = alloca %"struct.glm::detail::tvec4", align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca %"struct.glm::detail::tvec4", align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca %"struct.glm::detail::tvec4", align 4
  %14 = alloca %"struct.glm::detail::tvec4", align 4
  %15 = alloca %"struct.glm::detail::tvec4", align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca %"struct.glm::detail::tvec4", align 4
  %21 = alloca %"struct.glm::detail::tvec4", align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca %"struct.glm::detail::tvec4", align 4
  %28 = alloca %"struct.glm::detail::tvec4", align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %2) #5
  call void @_ZN10LightBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(160) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store float 0x3FC99999A0000000, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store float 0x3FC99999A0000000, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store float 0x3FC99999A0000000, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store float 1.000000e+00, ptr %7, align 4, !tbaa !5
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %34 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %35 = getelementptr inbounds i8, ptr %2, i64 16
  store <2 x float> <float 0x3FA47AE140000000, float 3.000000e+00>, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store float 2.000000e+00, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  store float 2.000000e+00, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  store float 2.500000e+00, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  store float 1.000000e+00, ptr %12, align 4, !tbaa !5
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %36 = getelementptr inbounds i8, ptr %2, i64 32
  %37 = getelementptr inbounds i8, ptr %2, i64 48
  %38 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(16) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #5
  store float 0xBFC99999A0000000, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #5
  store float 5.000000e-01, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #5
  store float 5.000000e-01, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #5
  store float 0.000000e+00, ptr %19, align 4, !tbaa !5
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @_ZN3glm9normalizeIfEENS_6detail5tvec4IT_EERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec4") align 4 %14, ptr noundef nonnull align 4 dereferenceable(16) %15)
  call void @_ZN3glm6detailmlIfEENS0_7tmat4x4IT_E8col_typeERKS4_RKNS4_8row_typeE(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec4") align 4 %13, ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(16) %14)
  %39 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(16) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #5
  store float 3.500000e+00, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #5
  store float 6.500000e+00, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #5
  store float 3.000000e+00, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #5
  store float 1.000000e+00, ptr %25, align 4, !tbaa !5
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #5
  store float 0x3FF3333340000000, ptr %26, align 4, !tbaa !5
  call void @_ZN3glm6detailmlIfEENS0_5tvec4IT_EERKS4_RKNS4_10value_typeE(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec4") align 4 %20, ptr noundef nonnull align 4 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %40 = getelementptr inbounds i8, ptr %2, i64 64
  %41 = getelementptr inbounds i8, ptr %2, i64 80
  %42 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %41, ptr noundef nonnull align 4 dereferenceable(16) %20)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %27) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #5
  store float 5.000000e+00, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #5
  store float 6.000000e+00, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #5
  store float 5.000000e-01, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #5
  store float 1.000000e+00, ptr %32, align 4, !tbaa !5
  call void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32)
  call void @_ZN3glm6detailmlIfEENS0_7tmat4x4IT_E8col_typeERKS4_RKNS4_8row_typeE(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec4") align 4 %27, ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(16) %28)
  %43 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(16) %27)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %27) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %33) #5
  store i32 2, ptr %33, align 4, !tbaa !9
  call void @_ZN9Framework16UniformIntBinder8SetValueERKi(ptr noundef nonnull align 8 dereferenceable(60) @g_lightNumBinder, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #5
  %44 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !11
  %45 = load i32, ptr @g_lightUniformBuffer, align 4, !tbaa !9
  call void %44(i32 noundef 35345, i32 noundef %45)
  %46 = load ptr, ptr @_funcptr_glBufferData, align 8, !tbaa !11
  call void %46(i32 noundef 35345, i64 noundef 160, ptr noundef nonnull %2, i32 noundef 35040)
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %2) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10LightBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(160)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm6detail5tvec4IfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZN3glm6detail5tvec4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm9normalizeIfEENS_6detail5tvec4IT_EERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec4") align 4, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm6detailmlIfEENS0_5tvec4IT_EERKS4_RKNS4_10value_typeE(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec4") align 4, ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9Framework16UniformIntBinder8SetValueERKi(ptr noundef nonnull align 8 dereferenceable(60), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass