; LLVM IR from ThePhysicsGuys/Physics3D :: application (builtinWorlds)

; 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.P3D::Graphics::ColorTemplate" = type { %union.anon.64 }
%union.anon.64 = type { %struct.anon.65 }
%struct.anon.65 = type { float, float, float, float }
%"class.P3D::Shape" = type { %"class.P3D::intrusive_ptr", %"class.P3D::DiagonalMatrix" }
%"class.P3D::intrusive_ptr" = type { ptr }
%"class.P3D::DiagonalMatrix" = type { [3 x double] }
%"class.P3D::Application::EntityBuilder" = type <{ ptr, i32, [4 x i8] }>
%"class.P3D::GlobalCFrame" = type { %"struct.P3D::PositionTemplate", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%"struct.P3D::PartProperties" = type { double, double, double, %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.33 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.33 = type { i64, [8 x i8] }
%"class.std::allocator.30" = type { i8 }
%"class.P3D::intrusive_ptr.100" = type { ptr }
%"class.P3D::Application::Screen" = type { %"class.P3D::Engine::Registry", ptr, ptr, %"struct.P3D::Vector.50", %"struct.P3D::Application::Camera", %"class.P3D::Engine::LayerStack", %"class.P3D::Application::EventHandler", %"class.Util::Properties", %"class.std::shared_ptr", ptr, ptr }
%"class.P3D::Engine::Registry" = type <{ %"class.std::set", %"class.std::vector.37", %"class.std::unordered_map", %"class.std::queue", i32, [4 x i8] }>
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, P3D::Engine::Registry<unsigned long>::entity_compare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, P3D::Engine::Registry<unsigned long>::entity_compare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *, std::allocator<std::unordered_multimap<unsigned int, P3D::intrusive_ptr<P3D::RC>> *>>::_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 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl" = type { %"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" }
%"struct.std::_Deque_base<unsigned int, std::allocator<unsigned int>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.P3D::Vector.50" = type { %union.anon.51 }
%union.anon.51 = type { [2 x i32] }
%"struct.P3D::Application::Camera" = type { i8, double, double, %"struct.P3D::Vector", i8, double, double, %"struct.P3D::Vector", i8, i8, %"class.P3D::GlobalCFrame", double, double, i8, double, float, float, float, float, %"class.P3D::Matrix.53", %"class.P3D::Matrix.53", %"class.P3D::Matrix.53", %"class.P3D::Matrix.53", %"class.P3D::Matrix.53", ptr }
%"class.P3D::Matrix.53" = type { [16 x float] }
%"class.P3D::Engine::LayerStack" = type <{ %"class.std::vector.54", i32, [4 x i8] }>
%"class.std::vector.54" = type { %"struct.std::_Vector_base.55" }
%"struct.std::_Vector_base.55" = type { %"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl" }
%"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<P3D::Engine::Layer *, std::allocator<P3D::Engine::Layer *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.P3D::Application::EventHandler" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.Util::Properties" = type { %"class.std::__cxx11::basic_string", %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree.59" }
%"class.std::_Rb_tree.59" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.P3D::Application::ExtendedPart" = type <{ %"class.P3D::Part", i32, [4 x i8] }>
%"class.P3D::Part" = type { %"class.P3D::GlobalCFrame", ptr, ptr, %"class.P3D::Shape", double, %"struct.P3D::PartProperties" }
%"struct.P3D::Graphics::Comp::Material" = type <{ %"struct.P3D::RC", [8 x %"class.std::shared_ptr.77"], %"struct.P3D::Graphics::ColorTemplate", float, float, float, [4 x i8] }>
%"struct.P3D::RC" = type { ptr, i64 }
%"class.std::shared_ptr.77" = type { %"class.std::__shared_ptr.78" }
%"class.std::__shared_ptr.78" = type { ptr, %"class.std::__shared_count" }

@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZN3P3D8Graphics6ColorsL3REDE = external hidden constant %"struct.P3D::Graphics::ColorTemplate", align 4

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D11Application15buildFloorWorldERNS0_6ScreenERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(1024), ptr noundef nonnull align 8 dereferenceable(224)) #3

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

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

declare void @_ZN3P3D11sphereShapeEd(ptr dead_on_unwind writable sret(%"class.P3D::Shape") align 8, double noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D12GlobalCFrameC2ERKNS_16PositionTemplateINS_3FixILl32EEEEE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11Application15buildDebugWorldERNS0_6ScreenERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(1024) %0, ptr noundef nonnull align 8 dereferenceable(224) %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.P3D::Application::EntityBuilder", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.P3D::Shape", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.P3D::GlobalCFrame", align 8
  %17 = alloca %"struct.P3D::PositionTemplate", align 8
  %18 = alloca %"struct.P3D::PartProperties", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.30", align 1
  %21 = alloca i1, align 1
  %22 = alloca %"class.P3D::intrusive_ptr.100", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3P3D11Application15buildFloorWorldERNS0_6ScreenERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(1024) %23, ptr noundef nonnull align 8 dereferenceable(224) %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #9
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %"class.P3D::Application::Screen", ptr %25, i32 0, i32 0
  call void @_ZN3P3D11Application13EntityBuilderC2ERNS_6Engine8RegistryImEE(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 8 dereferenceable(212) %26)
  %27 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN3P3D11Application13EntityBuilder4nameIJRA8_KcEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 1 dereferenceable(8) @.str.17)
  %28 = call noundef i32 @_ZNK3P3D11Application13EntityBuilder3getEv(ptr noundef nonnull align 8 dereferenceable(12) %27)
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #9
  store i32 %28, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 10, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %125, %2
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %128

34:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %121, %34
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %124

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %90, %40
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %120

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %47 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 208) #10
  store i1 true, ptr %21, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #9
  invoke void @_ZN3P3D11sphereShapeEd(ptr dead_on_unwind writable sret(%"class.P3D::Shape") align 8 %13, double noundef 4.500000e-01)
          to label %48 unwind label %93

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 96, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sitofp i32 %49 to double
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = add nsw i32 2, %51
  %53 = sitofp i32 %52 to double
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = sitofp i32 %54 to double
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %17, double noundef %50, double noundef %53, double noundef %55) #9
  invoke void @_ZN3P3D12GlobalCFrameC2ERKNS_16PositionTemplateINS_3FixILl32EEEEE(ptr noundef nonnull align 8 dereferenceable(96) %16, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %56 unwind label %97

56:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #9
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 48, i1 false)
  call void @_ZN3P3D14PartPropertiesC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %57 unwind label %101

57:                                               ; preds = %56
  invoke void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204) %47, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(96) %16, ptr noundef nonnull align 8 dereferenceable(48) %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %58 unwind label %105

58:                                               ; preds = %57
  store i1 false, ptr %21, align 1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr %16) #9
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  store ptr %47, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.P3D::Application::Screen", ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.P3D::Application::ExtendedPart", ptr %61, i32 0, i32 1
  call void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp8MaterialEJRKNS4_13ColorTemplateIfEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind writable sret(%"class.P3D::intrusive_ptr.100") align 8 %22, ptr noundef nonnull align 8 dereferenceable(212) %60, ptr noundef nonnull align 4 dereferenceable(4) %62, ptr noundef nonnull align 4 dereferenceable(16) @_ZN3P3D8Graphics6ColorsL3REDE) #9
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = sitofp i32 %63 to float
  %65 = fmul float 1.000000e+00, %64
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = sitofp i32 %66 to float
  %68 = fdiv float %65, %67
  %69 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  %70 = getelementptr inbounds %"struct.P3D::Graphics::Comp::Material", ptr %69, i32 0, i32 3
  store float %68, ptr %70, align 8, !tbaa !11
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = sitofp i32 %71 to float
  %73 = fmul float 1.000000e+00, %72
  %74 = load i32, ptr %7, align 4, !tbaa !9
  %75 = sitofp i32 %74 to float
  %76 = fdiv float %73, %75
  %77 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  %78 = getelementptr inbounds %"struct.P3D::Graphics::Comp::Material", ptr %77, i32 0, i32 4
  store float %76, ptr %78, align 4, !tbaa !17
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = sitofp i32 %79 to float
  %81 = fmul float 1.000000e+00, %80
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = sitofp i32 %82 to float
  %84 = fdiv float %81, %83
  %85 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  %86 = getelementptr inbounds %"struct.P3D::Graphics::Comp::Material", ptr %85, i32 0, i32 5
  store float %84, ptr %86, align 8, !tbaa !18
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3P3D14WorldPrototype14addTerrainPartEPNS_4PartEi(ptr noundef nonnull align 8 dereferenceable(224) %87, ptr noundef %88, i32 noundef 0)
          to label %89 unwind label %115

89:                                               ; preds = %58
  call void @_ZN3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !19

93:                                               ; preds = %46
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %14, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %15, align 4
  br label %111

97:                                               ; preds = %48
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %14, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %15, align 4
  br label %110

101:                                              ; preds = %56
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %14, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %15, align 4
  br label %109

105:                                              ; preds = %57
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %14, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  br label %109

109:                                              ; preds = %105, %101
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #9
  br label %110

110:                                              ; preds = %109, %97
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr %16) #9
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  br label %111

111:                                              ; preds = %110, %93
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  %112 = load i1, ptr %21, align 1
  br i1 %112, label %113, label %114

113:                                              ; preds = %111
  call void @_ZdlPvm(ptr noundef %47, i64 noundef 208) #11
  br label %114

114:                                              ; preds = %113, %111
  br label %119

115:                                              ; preds = %58
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %14, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %15, align 4
  call void @_ZN3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %119

119:                                              ; preds = %115, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %129

120:                                              ; preds = %45
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %10, align 4, !tbaa !9
  br label %35, !llvm.loop !21

124:                                              ; preds = %39
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %8, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %8, align 4, !tbaa !9
  br label %29, !llvm.loop !22

128:                                              ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  ret void

129:                                              ; preds = %119
  %130 = load ptr, ptr %14, align 8
  %131 = load i32, ptr %15, align 4
  %132 = insertvalue { ptr, i32 } poison, ptr %130, 0
  %133 = insertvalue { ptr, i32 } %132, i32 %131, 1
  resume { ptr, i32 } %133
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D14PartPropertiesC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp8MaterialEJRKNS4_13ColorTemplateIfEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.100") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(16)) #2 align 2

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

declare void @_ZN3P3D14WorldPrototype14addTerrainPartEPNS_4PartEi(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef, i32 noundef) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 "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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !16, i64 160}
!12 = !{!"_ZTSN3P3D8Graphics4Comp8MaterialE", !13, i64 0, !7, i64 16, !15, i64 144, !16, i64 160, !16, i64 164, !16, i64 168}
!13 = !{!"_ZTSN3P3D2RCE", !14, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN3P3D8Graphics13ColorTemplateIfEE", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!12, !16, i64 164}
!18 = !{!12, !16, i64 168}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


; 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.P3D::Graphics::ColorTemplate" = type { %union.anon.64 }
%union.anon.64 = type { %struct.anon.65 }
%struct.anon.65 = type { float, float, float, float }
%"class.P3D::Shape" = type { %"class.P3D::intrusive_ptr", %"class.P3D::DiagonalMatrix" }
%"class.P3D::intrusive_ptr" = type { ptr }
%"class.P3D::DiagonalMatrix" = type { [3 x double] }
%"class.P3D::Application::EntityBuilder" = type <{ ptr, i32, [4 x i8] }>
%"class.P3D::GlobalCFrame" = type { %"struct.P3D::PositionTemplate", %"class.P3D::MatrixRotationTemplate" }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"class.P3D::MatrixRotationTemplate" = type { %"class.P3D::Matrix" }
%"class.P3D::Matrix" = type { [9 x double] }
%"struct.P3D::PartProperties" = type { double, double, double, %"struct.P3D::Vector" }
%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.33 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.33 = type { i64, [8 x i8] }
%"class.std::allocator.30" = type { i8 }
%"class.P3D::intrusive_ptr.100" = type { ptr }

@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZN3P3D8Graphics6ColorsL3REDE = external hidden constant %"struct.P3D::Graphics::ColorTemplate", align 4

; 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4

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

; Function Attrs: nounwind
declare void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D11Application15buildFloorWorldERNS0_6ScreenERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(1024), ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #3

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

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

declare void @_ZN3P3D11sphereShapeEd(ptr dead_on_unwind writable sret(%"class.P3D::Shape") align 8, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3P3D12GlobalCFrameC2ERKNS_16PositionTemplateINS_3FixILl32EEEEE(ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D11Application15buildDebugWorldERNS0_6ScreenERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(1024) %0, ptr noundef nonnull align 8 dereferenceable(224) %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.P3D::Application::EntityBuilder", align 8
  %5 = alloca %"class.P3D::Shape", align 8
  %6 = alloca %"class.P3D::GlobalCFrame", align 8
  %7 = alloca %"struct.P3D::PositionTemplate", align 8
  %8 = alloca %"struct.P3D::PartProperties", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.30", align 1
  %11 = alloca %"class.P3D::intrusive_ptr.100", align 8
  tail call void @_ZN3P3D11Application15buildFloorWorldERNS0_6ScreenERNS0_11PlayerWorldE(ptr noundef nonnull align 8 dereferenceable(1024) %0, ptr noundef nonnull align 8 dereferenceable(224) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  call void @_ZN3P3D11Application13EntityBuilderC2ERNS_6Engine8RegistryImEE(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 8 dereferenceable(212) %0)
  %12 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN3P3D11Application13EntityBuilder4nameIJRA8_KcEEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 1 dereferenceable(8) @.str.17)
  %13 = call noundef i32 @_ZNK3P3D11Application13EntityBuilder3getEv(ptr noundef nonnull align 8 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  store i32 %13, ptr %3, align 4, !tbaa !5
  br label %.preheader39

.preheader39:                                     ; preds = %2, %22
  %.03146 = phi i32 [ 0, %2 ], [ %23, %22 ]
  %14 = uitofp nneg i32 %.03146 to double
  %15 = uitofp nneg i32 %.03146 to float
  %16 = fdiv float %15, 1.000000e+01
  br label %.preheader

17:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  ret void

.preheader:                                       ; preds = %.preheader39, %24
  %.03345 = phi i32 [ 0, %.preheader39 ], [ %25, %24 ]
  %18 = add nuw nsw i32 %.03345, 2
  %19 = uitofp nneg i32 %18 to double
  %20 = uitofp nneg i32 %.03345 to float
  %21 = fdiv float %20, 1.000000e+01
  br label %26

22:                                               ; preds = %24
  %23 = add nuw nsw i32 %.03146, 1
  %exitcond53.not = icmp eq i32 %23, 10
  br i1 %exitcond53.not, label %17, label %.preheader39, !llvm.loop !9

24:                                               ; preds = %42
  %25 = add nuw nsw i32 %.03345, 1
  %exitcond52.not = icmp eq i32 %25, 10
  br i1 %exitcond52.not, label %22, label %.preheader, !llvm.loop !11

26:                                               ; preds = %.preheader, %42
  %.03244 = phi i32 [ 0, %.preheader ], [ %43, %42 ]
  %27 = call noalias noundef nonnull dereferenceable(208) ptr @_Znwm(i64 noundef 208) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  invoke void @_ZN3P3D11sphereShapeEd(ptr dead_on_unwind nonnull writable sret(%"class.P3D::Shape") align 8 %5, double noundef 4.500000e-01)
          to label %28 unwind label %44

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #9
  %29 = uitofp nneg i32 %.03244 to double
  call void @_ZN3P3D16PositionTemplateINS_3FixILl32EEEEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %7, double noundef %14, double noundef %19, double noundef %29) #9
  invoke void @_ZN3P3D12GlobalCFrameC2ERKNS_16PositionTemplateINS_3FixILl32EEEEE(ptr noundef nonnull align 8 dereferenceable(96) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %30 unwind label %46

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %8, i8 0, i64 48, i1 false)
  call void @_ZN3P3D14PartPropertiesC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %31 unwind label %48

31:                                               ; preds = %30
  invoke void @_ZN3P3D11Application12ExtendedPartC1ERKNS_5ShapeERKNS_12GlobalCFrameERKNS_14PartPropertiesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKj(ptr noundef nonnull align 8 dereferenceable(204) %27, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(96) %6, ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %32 unwind label %50

32:                                               ; preds = %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #9
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  %33 = getelementptr inbounds i8, ptr %27, i64 200
  call void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp8MaterialEJRKNS4_13ColorTemplateIfEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.P3D::intrusive_ptr.100") align 8 %11, ptr noundef nonnull align 8 dereferenceable(212) %0, ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(16) @_ZN3P3D8Graphics6ColorsL3REDE) #9
  %34 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  %35 = getelementptr inbounds i8, ptr %34, i64 160
  store float %16, ptr %35, align 8, !tbaa !12
  %36 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  %37 = getelementptr inbounds i8, ptr %36, i64 164
  store float %21, ptr %37, align 4, !tbaa !18
  %38 = uitofp nneg i32 %.03244 to float
  %39 = fdiv float %38, 1.000000e+01
  %40 = call noundef ptr @_ZNK3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  %41 = getelementptr inbounds i8, ptr %40, i64 168
  store float %39, ptr %41, align 8, !tbaa !19
  invoke void @_ZN3P3D14WorldPrototype14addTerrainPartEPNS_4PartEi(ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef nonnull %27, i32 noundef 0)
          to label %42 unwind label %55

42:                                               ; preds = %32
  call void @_ZN3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  %43 = add nuw nsw i32 %.03244, 1
  %exitcond.not = icmp eq i32 %43, 10
  br i1 %exitcond.not, label %24, label %26, !llvm.loop !20

44:                                               ; preds = %26
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %54

46:                                               ; preds = %28
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %53

48:                                               ; preds = %30
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %31
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #9
  br label %53

53:                                               ; preds = %52, %46
  %.pn.pn = phi { ptr, i32 } [ %.pn, %52 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %6) #9
  call void @_ZN3P3D5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  br label %54

54:                                               ; preds = %53, %44
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %53 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  call void @_ZdlPvm(ptr noundef nonnull %27, i64 noundef 208) #11
  br label %57

55:                                               ; preds = %32
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3P3D13intrusive_ptrINS_8Graphics4Comp8MaterialEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  br label %57

57:                                               ; preds = %54, %55
  %.pn37 = phi { ptr, i32 } [ %56, %55 ], [ %.pn.pn.pn, %54 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn37
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D14PartPropertiesC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3D6Engine8RegistryImE3addINS_8Graphics4Comp8MaterialEJRKNS4_13ColorTemplateIfEEEEENS_13intrusive_ptrIT_EERKjDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.P3D::intrusive_ptr.100") align 8, ptr noundef nonnull align 8 dereferenceable(212), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2 align 2

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

declare void @_ZN3P3D14WorldPrototype14addTerrainPartEPNS_4PartEi(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 "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 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !17, i64 160}
!13 = !{!"_ZTSN3P3D8Graphics4Comp8MaterialE", !14, i64 0, !7, i64 16, !16, i64 144, !17, i64 160, !17, i64 164, !17, i64 168}
!14 = !{!"_ZTSN3P3D2RCE", !15, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN3P3D8Graphics13ColorTemplateIfEE", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!13, !17, i64 164}
!19 = !{!13, !17, i64 168}
!20 = distinct !{!20, !10}


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