; LLVM IR from Razakhel/RaZ :: src/RaZ/Application.ll (ZN3Raz11ApplicationC2Em)

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

%"class.Raz::Application" = type <{ %"class.std::vector", %"class.Raz::Bitset", %"struct.Raz::FrameTimeInfo", %"class.std::chrono::time_point", float, i8, [3 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::World>, std::allocator<std::unique_ptr<Raz::World>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::World>, std::allocator<std::unique_ptr<Raz::World>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::World>, std::allocator<std::unique_ptr<Raz::World>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::World>, std::allocator<std::unique_ptr<Raz::World>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::Bitset" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"struct.Raz::FrameTimeInfo" = type { float, float, i32, float }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz11ApplicationC2Em(ptr noundef nonnull align 8 dereferenceable(93) %0, i64 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %7 = load ptr, ptr %3, align 8
  %8 = getelementptr inbounds %"class.Raz::Application", ptr %7, i32 0, i32 0
  call void @llvm.memset.p0.i64(ptr align 8 %8, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  %9 = getelementptr inbounds %"class.Raz::Application", ptr %7, i32 0, i32 1
  call void @llvm.memset.p0.i64(ptr align 8 %9, i8 0, i64 40, i1 false)
  call void @_ZN3Raz6BitsetC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  %10 = getelementptr inbounds %"class.Raz::Application", ptr %7, i32 0, i32 2
  %11 = getelementptr inbounds %"struct.Raz::FrameTimeInfo", ptr %10, i32 0, i32 0
  store float 0.000000e+00, ptr %11, align 8, !tbaa !11
  %12 = getelementptr inbounds %"struct.Raz::FrameTimeInfo", ptr %10, i32 0, i32 1
  store float 0.000000e+00, ptr %12, align 4, !tbaa !15
  %13 = getelementptr inbounds %"struct.Raz::FrameTimeInfo", ptr %10, i32 0, i32 2
  store i32 0, ptr %13, align 8, !tbaa !16
  %14 = getelementptr inbounds %"struct.Raz::FrameTimeInfo", ptr %10, i32 0, i32 3
  store float 0x3F9110E460000000, ptr %14, align 4, !tbaa !17
  %15 = getelementptr inbounds %"class.Raz::Application", ptr %7, i32 0, i32 3
  %16 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #5
  %17 = getelementptr inbounds %"class.std::chrono::time_point", ptr %15, i32 0, i32 0
  %18 = getelementptr inbounds %"class.std::chrono::duration", ptr %17, i32 0, i32 0
  store i64 %16, ptr %18, align 8
  %19 = getelementptr inbounds %"class.Raz::Application", ptr %7, i32 0, i32 4
  store float 0.000000e+00, ptr %19, align 8, !tbaa !18
  %20 = getelementptr inbounds %"class.Raz::Application", ptr %7, i32 0, i32 5
  store i8 1, ptr %20, align 4, !tbaa !34
  %21 = getelementptr inbounds %"class.Raz::Application", ptr %7, i32 0, i32 0
  %22 = load i64, ptr %4, align 8, !tbaa !9
  invoke void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %22)
          to label %23 unwind label %24

23:                                               ; preds = %2
  ret void

24:                                               ; preds = %2
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %5, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %6, align 4
  call void @_ZN3Raz6BitsetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  call void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  br label %28

28:                                               ; preds = %24
  %29 = load ptr, ptr %5, align 8
  %30 = load i32, ptr %6, align 4
  %31 = insertvalue { ptr, i32 } poison, ptr %29, 0
  %32 = insertvalue { ptr, i32 } %31, i32 %30, 1
  resume { ptr, i32 } %32
}

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212system_clock3nowEv() #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #4 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN3Raz13FrameTimeInfoE", !13, i64 0, !13, i64 4, !14, i64 8, !13, i64 12}
!13 = !{!"float", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !13, i64 4}
!16 = !{!12, !14, i64 8}
!17 = !{!12, !13, i64 12}
!18 = !{!19, !13, i64 88}
!19 = !{!"_ZTSN3Raz11ApplicationE", !20, i64 0, !24, i64 24, !12, i64 64, !31, i64 80, !13, i64 88, !33, i64 92}
!20 = !{!"_ZTSSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3Raz6BitsetE", !25, i64 0}
!25 = !{!"_ZTSSt6vectorIbSaIbEE", !26, i64 0}
!26 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !27, i64 0}
!27 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !29, i64 0, !29, i64 16, !6, i64 32}
!29 = !{!"_ZTSSt13_Bit_iterator", !30, i64 0}
!30 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !14, i64 8}
!31 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !32, i64 0}
!32 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !10, i64 0}
!33 = !{!"bool", !7, i64 0}
!34 = !{!19, !33, i64 92}


; 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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz11ApplicationC2Em(ptr noundef nonnull align 8 dereferenceable(93) %0, i64 noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  tail call void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %3, i8 0, i64 40, i1 false)
  tail call void @_ZN3Raz6BitsetC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  %4 = getelementptr inbounds i8, ptr %0, i64 64
  store <2 x float> zeroinitializer, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 72
  store i32 0, ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds i8, ptr %0, i64 76
  store float 0x3F9110E460000000, ptr %6, align 4, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %0, i64 80
  %8 = tail call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #5
  store i64 %8, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  store float 0.000000e+00, ptr %9, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %0, i64 92
  store i8 1, ptr %10, align 4, !tbaa !31
  invoke void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %1)
          to label %11 unwind label %12

11:                                               ; preds = %2
  ret void

12:                                               ; preds = %2
  %13 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3Raz6BitsetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  tail call void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  resume { ptr, i32 } %13
}

; 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; Function Attrs: nounwind
declare i64 @_ZNSt6chrono3_V212system_clock3nowEv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #4 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN3Raz13FrameTimeInfoE", !6, i64 0, !6, i64 4, !11, i64 8, !6, i64 12}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 12}
!13 = !{!14, !6, i64 88}
!14 = !{!"_ZTSN3Raz11ApplicationE", !15, i64 0, !20, i64 24, !10, i64 64, !27, i64 80, !6, i64 88, !30, i64 92}
!15 = !{!"_ZTSSt6vectorISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz5WorldESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !19, i64 0, !19, i64 8, !19, i64 16}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!"_ZTSN3Raz6BitsetE", !21, i64 0}
!21 = !{!"_ZTSSt6vectorIbSaIbEE", !22, i64 0}
!22 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !23, i64 0}
!23 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !25, i64 0, !25, i64 16, !19, i64 32}
!25 = !{!"_ZTSSt13_Bit_iterator", !26, i64 0}
!26 = !{!"_ZTSSt18_Bit_iterator_base", !19, i64 0, !11, i64 8}
!27 = !{!"_ZTSNSt6chrono10time_pointINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEE", !28, i64 0}
!28 = !{!"_ZTSNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEE", !29, i64 0}
!29 = !{!"long", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!14, !30, i64 92}


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