; LLVM IR from merpheus-dev/LavaEngine :: src/Core/Scene.ll (ZN4Lava5Scene10LoadLightsEv)

; 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::vec" = type { %union.anon, %union.anon.7, %union.anon.8 }
%union.anon = type { float }
%union.anon.7 = type { float }
%union.anon.8 = type { float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.17 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.17 = type { i64, [8 x i8] }
%"class.std::allocator.14" = type { i8 }
%"class.Lava::Scene" = type { ptr, %"class.tinyxml2::XMLDocument", ptr, %"class.std::vector", ptr }
%"class.tinyxml2::XMLDocument" = type { %"class.tinyxml2::XMLNode", i8, i8, i32, i32, %"class.tinyxml2::StrPair", i32, ptr, i32, i32, %"class.tinyxml2::DynArray", %"class.tinyxml2::MemPoolT", %"class.tinyxml2::MemPoolT.1", %"class.tinyxml2::MemPoolT.3", %"class.tinyxml2::MemPoolT.5" }
%"class.tinyxml2::XMLNode" = type { ptr, ptr, ptr, %"class.tinyxml2::StrPair", i32, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.tinyxml2::StrPair" = type { i32, ptr, ptr }
%"class.tinyxml2::DynArray" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.0", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::MemPool" = type { ptr }
%"class.tinyxml2::DynArray.0" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.1" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.2", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.2" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.3" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.4", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.4" = type { ptr, [10 x ptr], i32, i32 }
%"class.tinyxml2::MemPoolT.5" = type { %"class.tinyxml2::MemPool", %"class.tinyxml2::DynArray.6", ptr, i32, i32, i32, i32 }
%"class.tinyxml2::DynArray.6" = type { ptr, [10 x ptr], i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Lava::SceneObject *, std::allocator<Lava::SceneObject *>>::_Vector_impl" }
%"struct.std::_Vector_base<Lava::SceneObject *, std::allocator<Lava::SceneObject *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Lava::SceneObject *, std::allocator<Lava::SceneObject *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Lava::SceneObject *, std::allocator<Lava::SceneObject *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Lava::DataContainers::SceneData" = type { %"struct.glm::vec", float, ptr, float, %"class.std::vector.9" }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Lava::Light" = type { %"struct.glm::vec", %"struct.glm::vec", float, %"struct.glm::vec" }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava5Scene10LoadLightsEv(ptr noundef nonnull align 8 dereferenceable(824) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.glm::vec", align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca { <2 x float>, float }, align 4
  %14 = alloca %"struct.glm::vec", align 4
  %15 = alloca { <2 x float>, float }, align 8
  %16 = alloca %"struct.glm::vec", align 4
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.14", align 1
  %20 = alloca %"struct.glm::vec", align 4
  %21 = alloca { <2 x float>, float }, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  %23 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 32) #11
  call void @llvm.memset.p0.i64(ptr align 16 %23, i8 0, i64 32, i1 false)
  %24 = getelementptr inbounds %"class.Lava::Scene", ptr %22, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds %"struct.Lava::DataContainers::SceneData", ptr %25, i32 0, i32 2
  store ptr %23, ptr %26, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #12
  %27 = getelementptr inbounds %"class.Lava::Scene", ptr %22, i32 0, i32 1
  %28 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %27, ptr noundef @.str)
  %29 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %28, ptr noundef @.str.1)
  %30 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %29, ptr noundef @.str.2)
  store ptr %30, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #12
  store i32 0, ptr %4, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #12
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %31, ptr noundef null)
  store ptr %32, ptr %5, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %106, %1
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 2, ptr %6, align 4
  br label %123

37:                                               ; preds = %33
  %38 = load i32, ptr %4, align 4, !tbaa !40
  %39 = icmp sgt i32 %38, 3
  br i1 %39, label %40, label %41

40:                                               ; preds = %37
  store i32 2, ptr %6, align 4
  br label %123

41:                                               ; preds = %37
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = call noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %42)
  %44 = call i32 (ptr, ...) @printf(ptr noundef %43)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #12
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %45, ptr noundef @.str.3)
  %47 = call noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120) %46)
  store ptr %47, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #12
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %48, ptr noundef @.str.4)
  %50 = call noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120) %49)
  store ptr %50, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #12
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %51, ptr noundef @.str.5)
  %53 = call noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120) %52)
  store ptr %53, ptr %9, align 8, !tbaa !5
  %54 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #11
  invoke void @_ZN3glm3vecILi3EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %10, float noundef 1.000000e+00)
          to label %55 unwind label %109

55:                                               ; preds = %41
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %10, i64 12, i1 false)
  %56 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 0
  %57 = load <2 x float>, ptr %56, align 4
  %58 = getelementptr inbounds { <2 x float>, float }, ptr %13, i32 0, i32 1
  %59 = load float, ptr %58, align 4
  invoke void @_ZN4Lava16DirectionalLightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40) %54, <2 x float> %57, float %59)
          to label %60 unwind label %109

60:                                               ; preds = %55
  %61 = getelementptr inbounds %"class.Lava::Scene", ptr %22, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds %"struct.Lava::DataContainers::SceneData", ptr %62, i32 0, i32 2
  %64 = load ptr, ptr %63, align 8, !tbaa !32
  %65 = load i32, ptr %4, align 4, !tbaa !40
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %64, i64 noundef %66)
  store ptr %54, ptr %67, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #12
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = call { <2 x float>, float } @_ZNK4Lava5Scene13parse_vector3EPKc(ptr noundef nonnull align 8 dereferenceable(824) %22, ptr noundef %68)
  store { <2 x float>, float } %69, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %15, i64 12, i1 false)
  %70 = getelementptr inbounds %"class.Lava::Scene", ptr %22, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds %"struct.Lava::DataContainers::SceneData", ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !32
  %74 = load i32, ptr %4, align 4, !tbaa !40
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %73, i64 noundef %75)
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.Lava::Light", ptr %77, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %14, i64 12, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #12
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #12
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = call { <2 x float>, float } @_ZNK4Lava5Scene13parse_vector3EPKc(ptr noundef nonnull align 8 dereferenceable(824) %22, ptr noundef %79)
  store { <2 x float>, float } %80, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  %81 = getelementptr inbounds %"class.Lava::Scene", ptr %22, i32 0, i32 2
  %82 = load ptr, ptr %81, align 8, !tbaa !9
  %83 = getelementptr inbounds %"struct.Lava::DataContainers::SceneData", ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !32
  %85 = load i32, ptr %4, align 4, !tbaa !40
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %84, i64 noundef %86)
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.Lava::Light", ptr %88, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %89, ptr align 4 %16, i64 12, i1 false), !tbaa.struct !41
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #12
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #12
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #12
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #12
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %90, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %91 unwind label %113

91:                                               ; preds = %60
  %92 = invoke noundef float @_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef null)
          to label %93 unwind label %117

93:                                               ; preds = %91
  %94 = getelementptr inbounds %"class.Lava::Scene", ptr %22, i32 0, i32 2
  %95 = load ptr, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds %"struct.Lava::DataContainers::SceneData", ptr %95, i32 0, i32 2
  %97 = load ptr, ptr %96, align 8, !tbaa !32
  %98 = load i32, ptr %4, align 4, !tbaa !40
  %99 = sext i32 %98 to i64
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %97, i64 noundef %99)
          to label %101 unwind label %117

101:                                              ; preds = %93
  %102 = load ptr, ptr %100, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.Lava::Light", ptr %102, i32 0, i32 2
  store float %92, ptr %103, align 4, !tbaa !43
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #12
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #12
  %104 = load i32, ptr %4, align 4, !tbaa !40
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %4, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  br label %106

106:                                              ; preds = %101
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = call noundef ptr @_ZN8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %107, ptr noundef null)
  store ptr %108, ptr %5, align 8, !tbaa !5
  br label %33, !llvm.loop !45

109:                                              ; preds = %55, %41
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %11, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %54, i64 noundef 40) #13
  br label %122

113:                                              ; preds = %60
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %11, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %12, align 4
  br label %121

117:                                              ; preds = %93, %91
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %11, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #12
  br label %121

121:                                              ; preds = %117, %113
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #12
  br label %122

122:                                              ; preds = %121, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #12
  br label %150

123:                                              ; preds = %40, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #12
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %135, %124
  %126 = load i32, ptr %4, align 4, !tbaa !40
  %127 = icmp sle i32 %126, 3
  br i1 %127, label %128, label %149

128:                                              ; preds = %125
  %129 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #11
  invoke void @_ZN3glm3vecILi3EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %20, float noundef 0.000000e+00)
          to label %130 unwind label %145

130:                                              ; preds = %128
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %20, i64 12, i1 false)
  %131 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 0
  %132 = load <2 x float>, ptr %131, align 4
  %133 = getelementptr inbounds { <2 x float>, float }, ptr %21, i32 0, i32 1
  %134 = load float, ptr %133, align 4
  invoke void @_ZN4Lava5LightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40) %129, <2 x float> %132, float %134)
          to label %135 unwind label %145

135:                                              ; preds = %130
  %136 = getelementptr inbounds %"class.Lava::Scene", ptr %22, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = getelementptr inbounds %"struct.Lava::DataContainers::SceneData", ptr %137, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !32
  %140 = load i32, ptr %4, align 4, !tbaa !40
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %139, i64 noundef %141)
  store ptr %129, ptr %142, align 8, !tbaa !5
  %143 = load i32, ptr %4, align 4, !tbaa !40
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %4, align 4, !tbaa !40
  br label %125, !llvm.loop !47

145:                                              ; preds = %130, %128
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %11, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %129, i64 noundef 40) #13
  br label %150

149:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #12
  ret void

150:                                              ; preds = %145, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #12
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %11, align 8
  %153 = load i32, ptr %12, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) #5 align 2

declare i32 @printf(ptr noundef, ...) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120)) #5 align 2

declare noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm3vecILi3EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Lava16DirectionalLightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40), <2 x float>, float) unnamed_addr #3 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) #8

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK4Lava5Scene13parse_vector3EPKc(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #9

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #10 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 #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #10 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Lava5LightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40), <2 x float>, float) unnamed_addr #3 align 2

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

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { 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 #10 = { 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 #11 = { builtin allocsize(0) }
attributes #12 = { nounwind }
attributes #13 = { builtin 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 784}
!10 = !{!"_ZTSN4Lava5SceneE", !6, i64 0, !11, i64 8, !6, i64 784, !28, i64 792, !6, i64 816}
!11 = !{!"_ZTSN8tinyxml211XMLDocumentE", !12, i64 0, !15, i64 104, !15, i64 105, !16, i64 108, !17, i64 112, !13, i64 120, !14, i64 144, !6, i64 152, !14, i64 160, !14, i64 164, !18, i64 168, !19, i64 264, !22, i64 392, !24, i64 520, !26, i64 648}
!12 = !{!"_ZTSN8tinyxml27XMLNodeE", !6, i64 8, !6, i64 16, !13, i64 24, !14, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!13 = !{!"_ZTSN8tinyxml27StrPairE", !14, i64 0, !6, i64 8, !6, i64 16}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN8tinyxml28XMLErrorE", !7, i64 0}
!17 = !{!"_ZTSN8tinyxml210WhitespaceE", !7, i64 0}
!18 = !{!"_ZTSN8tinyxml28DynArrayIPNS_7XMLNodeELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!19 = !{!"_ZTSN8tinyxml28MemPoolTILi120EEE", !20, i64 0, !21, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!20 = !{!"_ZTSN8tinyxml27MemPoolE"}
!21 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi120EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!22 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !20, i64 0, !23, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!23 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!24 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !20, i64 0, !25, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!25 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!26 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !20, i64 0, !27, i64 8, !6, i64 104, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124}
!27 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !6, i64 0, !7, i64 8, !14, i64 88, !14, i64 92}
!28 = !{!"_ZTSSt6vectorIPN4Lava11SceneObjectESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIPN4Lava11SceneObjectESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN4Lava11SceneObjectESaIS2_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPN4Lava11SceneObjectESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!33, !6, i64 16}
!33 = !{!"_ZTSN4Lava14DataContainers9SceneDataE", !34, i64 0, !35, i64 12, !6, i64 16, !35, i64 24, !36, i64 32}
!34 = !{!"_ZTSN3glm3vecILi3EfLNS_9qualifierE0EEE", !7, i64 0, !7, i64 4, !7, i64 8}
!35 = !{!"float", !7, i64 0}
!36 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = !{!14, !14, i64 0}
!41 = !{i64 0, i64 4, !42, i64 4, i64 4, !42, i64 8, i64 4, !42}
!42 = !{!7, !7, i64 0}
!43 = !{!44, !35, i64 24}
!44 = !{!"_ZTSN4Lava5LightE", !34, i64 0, !34, i64 12, !35, i64 24, !34, i64 28}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}
!47 = distinct !{!47, !46}


; 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::vec" = type { %union.anon, %union.anon.7, %union.anon.8 }
%union.anon = type { float }
%union.anon.7 = type { float }
%union.anon.8 = type { float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.17 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.17 = type { i64, [8 x i8] }
%"class.std::allocator.14" = type { i8 }

@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [10 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Lava5Scene10LoadLightsEv(ptr noundef nonnull align 8 dereferenceable(824) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.glm::vec", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.14", align 1
  %5 = alloca %"struct.glm::vec", align 8
  %6 = tail call noalias noundef nonnull dereferenceable(32) ptr @_Znwm(i64 noundef 32) #11
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, i8 0, i64 32, i1 false)
  %7 = getelementptr inbounds i8, ptr %0, i64 784
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %6, ptr %9, align 8, !tbaa !31
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = tail call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %10, ptr noundef nonnull @.str)
  %12 = tail call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %11, ptr noundef nonnull @.str.1)
  %13 = tail call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %12, ptr noundef nonnull @.str.2)
  %14 = tail call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %13, ptr noundef null)
  %.not48 = icmp eq ptr %14, null
  br i1 %.not48, label %.lr.ph52, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %.sroa.211.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  br label %17

.preheader:                                       ; preds = %52
  %15 = icmp ult i64 %indvars.iv, 3
  br i1 %15, label %.lr.ph52, label %._crit_edge

.lr.ph52:                                         ; preds = %1, %.preheader
  %.0.lcssa64 = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %1 ]
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %16 = and i64 %.0.lcssa64, 4294967295
  br label %64

17:                                               ; preds = %.lr.ph, %52
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %52 ]
  %.03249 = phi ptr [ %14, %.lr.ph ], [ %55, %52 ]
  %18 = call noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120) %.03249)
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %18)
  %20 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03249, ptr noundef nonnull @.str.3)
  %21 = call noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120) %20)
  %22 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03249, ptr noundef nonnull @.str.4)
  %23 = call noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120) %22)
  %24 = call noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03249, ptr noundef nonnull @.str.5)
  %25 = call noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120) %24)
  %26 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #11
  call void @_ZN3glm3vecILi3EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %2, float noundef 1.000000e+00)
  %.sroa.010.0.copyload = load <2 x float>, ptr %2, align 8
  %.sroa.211.0.copyload = load float, ptr %.sroa.211.0..sroa_idx, align 8
  invoke void @_ZN4Lava16DirectionalLightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40) %26, <2 x float> %.sroa.010.0.copyload, float %.sroa.211.0.copyload)
          to label %27 unwind label %57

27:                                               ; preds = %17
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !31
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %30, i64 noundef %indvars.iv)
  store ptr %26, ptr %31, align 8, !tbaa !39
  %32 = call { <2 x float>, float } @_ZNK4Lava5Scene13parse_vector3EPKc(ptr noundef nonnull align 8 dereferenceable(824) %0, ptr noundef %21)
  %.fca.0.extract4 = extractvalue { <2 x float>, float } %32, 0
  %.fca.1.extract5 = extractvalue { <2 x float>, float } %32, 1
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !31
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %35, i64 noundef %indvars.iv)
  %37 = load ptr, ptr %36, align 8, !tbaa !39
  store <2 x float> %.fca.0.extract4, ptr %37, align 4
  %.sroa.49.0..sroa_idx = getelementptr inbounds i8, ptr %37, i64 8
  store float %.fca.1.extract5, ptr %.sroa.49.0..sroa_idx, align 4, !tbaa !40
  %38 = call { <2 x float>, float } @_ZNK4Lava5Scene13parse_vector3EPKc(ptr noundef nonnull align 8 dereferenceable(824) %0, ptr noundef %23)
  %.fca.0.extract = extractvalue { <2 x float>, float } %38, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %38, 1
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %41 = load ptr, ptr %40, align 8, !tbaa !31
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %41, i64 noundef %indvars.iv)
  %43 = load ptr, ptr %42, align 8, !tbaa !39
  %44 = getelementptr inbounds i8, ptr %43, i64 12
  store <2 x float> %.fca.0.extract, ptr %44, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %43, i64 20
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #12
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #12
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #12
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %45 unwind label %59

45:                                               ; preds = %27
  %46 = invoke noundef float @_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef null)
          to label %47 unwind label %61

47:                                               ; preds = %45
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !31
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %50, i64 noundef %indvars.iv)
          to label %52 unwind label %61

52:                                               ; preds = %47
  %53 = load ptr, ptr %51, align 8, !tbaa !39
  %54 = getelementptr inbounds i8, ptr %53, i64 24
  store float %46, ptr %54, align 4, !tbaa !41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #12
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = call noundef ptr @_ZN8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104) %.03249, ptr noundef null)
  %.not = icmp eq ptr %55, null
  %56 = icmp ugt i64 %indvars.iv, 2
  %or.cond = select i1 %.not, i1 true, i1 %56
  br i1 %or.cond, label %.preheader, label %17, !llvm.loop !43

57:                                               ; preds = %17
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 40) #13
  br label %73

59:                                               ; preds = %27
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %63

61:                                               ; preds = %47, %45
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #12
  br label %63

63:                                               ; preds = %61, %59
  %.pn = phi { ptr, i32 } [ %62, %61 ], [ %60, %59 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #12
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #12
  br label %73

64:                                               ; preds = %.lr.ph52, %66
  %indvars.iv60 = phi i64 [ %16, %.lr.ph52 ], [ %indvars.iv.next61, %66 ]
  %65 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #11
  call void @_ZN3glm3vecILi3EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef 0.000000e+00)
  %.sroa.0.0.copyload = load <2 x float>, ptr %5, align 8
  %.sroa.2.0.copyload = load float, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZN4Lava5LightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40) %65, <2 x float> %.sroa.0.0.copyload, float %.sroa.2.0.copyload)
          to label %66 unwind label %71

66:                                               ; preds = %64
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  %69 = load ptr, ptr %68, align 8, !tbaa !31
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32) %69, i64 noundef %indvars.iv60)
  store ptr %65, ptr %70, align 8, !tbaa !39
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next61, 4
  br i1 %exitcond.not, label %._crit_edge, label %64, !llvm.loop !45

71:                                               ; preds = %64
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %65, i64 noundef 40) #13
  br label %73

._crit_edge:                                      ; preds = %66, %.preheader
  ret void

73:                                               ; preds = %57, %63, %71
  %.pn40 = phi { ptr, i32 } [ %72, %71 ], [ %.pn, %63 ], [ %58, %57 ]
  resume { ptr, i32 } %.pn40
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml27XMLNode17FirstChildElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK8tinyxml210XMLElement4NameEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #5 align 2

declare noundef ptr @_ZNK8tinyxml210XMLElement7GetTextEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm3vecILi3EfLNS_9qualifierE0EEC2Ef(ptr noundef nonnull align 4 dereferenceable(12), float noundef) unnamed_addr #8 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Lava16DirectionalLightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40), <2 x float>, float) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIPN4Lava5LightELm4EE2atEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZNK4Lava5Scene13parse_vector3EPKc(ptr noundef nonnull align 8 dereferenceable(824), ptr noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNSt7__cxx114stofERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #9

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #10 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 #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #10 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8tinyxml27XMLNode18NextSiblingElementEPKc(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Lava5LightC2EN3glm3vecILi3EfLNS1_9qualifierE0EEE(ptr noundef nonnull align 4 dereferenceable(40), <2 x float>, float) unnamed_addr #3 align 2

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

attributes #0 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nofree nounwind "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 = { "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 #8 = { 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 #9 = { 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 #10 = { 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 #11 = { builtin allocsize(0) }
attributes #12 = { nounwind }
attributes #13 = { builtin 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, !7, i64 784}
!6 = !{!"_ZTSN4Lava5SceneE", !7, i64 0, !10, i64 8, !7, i64 784, !27, i64 792, !7, i64 816}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN8tinyxml211XMLDocumentE", !11, i64 0, !14, i64 104, !14, i64 105, !15, i64 108, !16, i64 112, !12, i64 120, !13, i64 144, !7, i64 152, !13, i64 160, !13, i64 164, !17, i64 168, !18, i64 264, !21, i64 392, !23, i64 520, !25, i64 648}
!11 = !{!"_ZTSN8tinyxml27XMLNodeE", !7, i64 8, !7, i64 16, !12, i64 24, !13, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96}
!12 = !{!"_ZTSN8tinyxml27StrPairE", !13, i64 0, !7, i64 8, !7, i64 16}
!13 = !{!"int", !8, i64 0}
!14 = !{!"bool", !8, i64 0}
!15 = !{!"_ZTSN8tinyxml28XMLErrorE", !8, i64 0}
!16 = !{!"_ZTSN8tinyxml210WhitespaceE", !8, i64 0}
!17 = !{!"_ZTSN8tinyxml28DynArrayIPNS_7XMLNodeELi10EEE", !7, i64 0, !8, i64 8, !13, i64 88, !13, i64 92}
!18 = !{!"_ZTSN8tinyxml28MemPoolTILi120EEE", !19, i64 0, !20, i64 8, !7, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!19 = !{!"_ZTSN8tinyxml27MemPoolE"}
!20 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi120EE5BlockELi10EEE", !7, i64 0, !8, i64 8, !13, i64 88, !13, i64 92}
!21 = !{!"_ZTSN8tinyxml28MemPoolTILi80EEE", !19, i64 0, !22, i64 8, !7, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!22 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi80EE5BlockELi10EEE", !7, i64 0, !8, i64 8, !13, i64 88, !13, i64 92}
!23 = !{!"_ZTSN8tinyxml28MemPoolTILi112EEE", !19, i64 0, !24, i64 8, !7, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!24 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi112EE5BlockELi10EEE", !7, i64 0, !8, i64 8, !13, i64 88, !13, i64 92}
!25 = !{!"_ZTSN8tinyxml28MemPoolTILi104EEE", !19, i64 0, !26, i64 8, !7, i64 104, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124}
!26 = !{!"_ZTSN8tinyxml28DynArrayIPNS_8MemPoolTILi104EE5BlockELi10EEE", !7, i64 0, !8, i64 8, !13, i64 88, !13, i64 92}
!27 = !{!"_ZTSSt6vectorIPN4Lava11SceneObjectESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIPN4Lava11SceneObjectESaIS2_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIPN4Lava11SceneObjectESaIS2_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIPN4Lava11SceneObjectESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!31 = !{!32, !7, i64 16}
!32 = !{!"_ZTSN4Lava14DataContainers9SceneDataE", !33, i64 0, !34, i64 12, !7, i64 16, !34, i64 24, !35, i64 32}
!33 = !{!"_ZTSN3glm3vecILi3EfLNS_9qualifierE0EEE", !8, i64 0, !8, i64 4, !8, i64 8}
!34 = !{!"float", !8, i64 0}
!35 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!39 = !{!7, !7, i64 0}
!40 = !{!8, !8, i64 0}
!41 = !{!42, !34, i64 24}
!42 = !{!"_ZTSN4Lava5LightE", !33, i64 0, !33, i64 12, !34, i64 24, !33, i64 28}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = distinct !{!45, !44}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass