; LLVM IR from Razakhel/RaZ :: src/RaZ/World.ll (ZN3Raz5World7refreshEv)

; 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::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 }>
%"class.Raz::World" = type { %"class.std::vector", %"class.Raz::Bitset", %"class.std::vector.4", i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::System>, std::allocator<std::unique_ptr<Raz::System>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::System>, std::allocator<std::unique_ptr<Raz::System>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::System>, std::allocator<std::unique_ptr<Raz::System>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::System>, std::allocator<std::unique_ptr<Raz::System>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::Entity>, std::allocator<std::unique_ptr<Raz::Entity>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::Entity>, std::allocator<std::unique_ptr<Raz::Entity>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<Raz::Entity>, std::allocator<std::unique_ptr<Raz::Entity>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<Raz::Entity>, std::allocator<std::unique_ptr<Raz::Entity>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz5World7refreshEv(ptr noundef nonnull align 8 dereferenceable(104) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.Raz::Bitset", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8
  %12 = getelementptr inbounds %"class.Raz::World", ptr %11, i32 0, i32 2
  %13 = call noundef zeroext i1 @_ZNKSt6vectorISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  br i1 %13, label %14, label %15

14:                                               ; preds = %1
  br label %100

15:                                               ; preds = %1
  call void @_ZN3Raz5World12sortEntitiesEv(ptr noundef nonnull align 8 dereferenceable(104) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  br label %16

16:                                               ; preds = %97, %15
  %17 = load i64, ptr %3, align 8, !tbaa !9
  %18 = getelementptr inbounds %"class.Raz::World", ptr %11, i32 0, i32 3
  %19 = load i64, ptr %18, align 8, !tbaa !11
  %20 = icmp ult i64 %17, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %16
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %100

22:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %23 = getelementptr inbounds %"class.Raz::World", ptr %11, i32 0, i32 2
  %24 = load i64, ptr %3, align 8, !tbaa !9
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %24) #5
  store ptr %25, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6EntityESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %26) #5
  %28 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %27) #5
  br i1 %28, label %30, label %29

29:                                               ; preds = %22
  store i32 4, ptr %4, align 4
  br label %94

30:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %90, %30
  %32 = load i64, ptr %6, align 8, !tbaa !9
  %33 = getelementptr inbounds %"class.Raz::World", ptr %11, i32 0, i32 0
  %34 = call noundef i64 @_ZNKSt6vectorISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #5
  %35 = icmp ult i64 %32, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %31
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %93

37:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %38 = getelementptr inbounds %"class.Raz::World", ptr %11, i32 0, i32 0
  %39 = load i64, ptr %6, align 8, !tbaa !9
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %39) #5
  store ptr %40, ptr %7, align 8, !tbaa !5
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZSteqIN3Raz6SystemESt14default_deleteIS1_EEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr null) #5
  br i1 %42, label %47, label %43

43:                                               ; preds = %37
  %44 = getelementptr inbounds %"class.Raz::World", ptr %11, i32 0, i32 1
  %45 = load i64, ptr %6, align 8, !tbaa !9
  %46 = call noundef zeroext i1 @_ZNK3Raz6BitsetixEm(ptr noundef nonnull align 8 dereferenceable(40) %44, i64 noundef %45) #5
  br i1 %46, label %48, label %47

47:                                               ; preds = %43, %37
  store i32 7, ptr %4, align 4
  br label %87

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6SystemESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %49) #5
  %51 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK3Raz6System21getAcceptedComponentsEv(ptr noundef nonnull align 8 dereferenceable(72) %50)
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6EntityESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %52) #5
  %54 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK3Raz6Entity20getEnabledComponentsEv(ptr noundef nonnull align 8 dereferenceable(80) %53) #5
  call void @_ZNK3Raz6BitsetanERKS0_(ptr dead_on_unwind writable sret(%"class.Raz::Bitset") align 8 %8, ptr noundef nonnull align 8 dereferenceable(40) %51, ptr noundef nonnull align 8 dereferenceable(40) %54) #5
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6SystemESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #5
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt10unique_ptrIN3Raz6EntityESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %57) #5
  %59 = call noundef zeroext i1 @_ZNK3Raz6System14containsEntityERKNS_6EntityE(ptr noundef nonnull align 8 dereferenceable(72) %56, ptr noundef nonnull align 8 dereferenceable(80) %58) #5
  br i1 %59, label %75, label %60

60:                                               ; preds = %48
  %61 = call noundef zeroext i1 @_ZNK3Raz6Bitset7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  br i1 %61, label %74, label %62

62:                                               ; preds = %60
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6SystemESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %63) #5
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = load ptr, ptr %64, align 8, !tbaa !29
  %67 = getelementptr inbounds ptr, ptr %66, i64 4
  %68 = load ptr, ptr %67, align 8
  invoke void %68(ptr noundef nonnull align 8 dereferenceable(72) %64, ptr noundef nonnull align 8 dereferenceable(8) %65)
          to label %69 unwind label %70

69:                                               ; preds = %62
  br label %74

70:                                               ; preds = %77, %62
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %9, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %10, align 4
  call void @_ZN3Raz6BitsetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %101

74:                                               ; preds = %69, %60
  br label %86

75:                                               ; preds = %48
  %76 = call noundef zeroext i1 @_ZNK3Raz6Bitset7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  br i1 %76, label %77, label %85

77:                                               ; preds = %75
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6SystemESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %78) #5
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = load ptr, ptr %79, align 8, !tbaa !29
  %82 = getelementptr inbounds ptr, ptr %81, i64 5
  %83 = load ptr, ptr %82, align 8
  invoke void %83(ptr noundef nonnull align 8 dereferenceable(72) %79, ptr noundef nonnull align 8 dereferenceable(8) %80)
          to label %84 unwind label %70

84:                                               ; preds = %77
  br label %85

85:                                               ; preds = %84, %75
  br label %86

86:                                               ; preds = %85, %74
  call void @_ZN3Raz6BitsetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  store i32 0, ptr %4, align 4
  br label %87

87:                                               ; preds = %86, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %88 = load i32, ptr %4, align 4
  switch i32 %88, label %106 [
    i32 0, label %89
    i32 7, label %90
  ]

89:                                               ; preds = %87
  br label %90

90:                                               ; preds = %89, %87
  %91 = load i64, ptr %6, align 8, !tbaa !9
  %92 = add i64 %91, 1
  store i64 %92, ptr %6, align 8, !tbaa !9
  br label %31, !llvm.loop !31

93:                                               ; preds = %36
  store i32 0, ptr %4, align 4
  br label %94

94:                                               ; preds = %93, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %95 = load i32, ptr %4, align 4
  switch i32 %95, label %106 [
    i32 0, label %96
    i32 4, label %97
  ]

96:                                               ; preds = %94
  br label %97

97:                                               ; preds = %96, %94
  %98 = load i64, ptr %3, align 8, !tbaa !9
  %99 = add i64 %98, 1
  store i64 %99, ptr %3, align 8, !tbaa !9
  br label %16, !llvm.loop !33

100:                                              ; preds = %21, %14
  ret void

101:                                              ; preds = %70
  %102 = load ptr, ptr %9, align 8
  %103 = load i32, ptr %10, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105

106:                                              ; preds = %94, %87
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6BitsetixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Bitset7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN3Raz6SystemESt14default_deleteIS1_EEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8), ptr) #3

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

; Function Attrs: nounwind
declare void @_ZNK3Raz6BitsetanERKS0_(ptr dead_on_unwind writable sret(%"class.Raz::Bitset") align 8, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #4

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

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3Raz6System14containsEntityERKNS_6EntityE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(80)) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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, !10, i64 88}
!12 = !{!"_ZTSN3Raz5WorldE", !13, i64 0, !17, i64 24, !25, i64 64, !10, i64 88, !10, i64 96}
!13 = !{!"_ZTSSt6vectorISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSN3Raz6BitsetE", !18, i64 0}
!18 = !{!"_ZTSSt6vectorIbSaIbEE", !19, i64 0}
!19 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !20, i64 0}
!20 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !22, i64 0, !22, i64 16, !6, i64 32}
!22 = !{!"_ZTSSt13_Bit_iterator", !23, i64 0}
!23 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !24, i64 8}
!24 = !{!"int", !7, i64 0}
!25 = !{!"_ZTSSt6vectorISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}


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

%"class.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 }>

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Raz5World7refreshEv(ptr noundef nonnull align 8 dereferenceable(104) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.Raz::Bitset", align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 64
  %4 = tail call noundef zeroext i1 @_ZNKSt6vectorISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br i1 %4, label %.loopexit20, label %5

5:                                                ; preds = %1
  tail call void @_ZN3Raz5World12sortEntitiesEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  %6 = getelementptr inbounds i8, ptr %0, i64 88
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %.loopexit20, label %.lr.ph23

.lr.ph23:                                         ; preds = %5
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  br label %9

9:                                                ; preds = %.lr.ph23, %.loopexit
  %.022 = phi i64 [ 0, %.lr.ph23 ], [ %40, %.loopexit ]
  %10 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %.022) #5
  %11 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6EntityESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %12 = call noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  br i1 %12, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %9
  %13 = call noundef i64 @_ZNKSt6vectorISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %.not24 = icmp eq i64 %13, 0
  br i1 %.not24, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %36
  %.01921 = phi i64 [ %37, %36 ], [ 0, %.preheader ]
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.01921) #5
  %15 = call noundef zeroext i1 @_ZSteqIN3Raz6SystemESt14default_deleteIS1_EEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr null) #5
  br i1 %15, label %36, label %16

16:                                               ; preds = %.lr.ph
  %17 = call noundef zeroext i1 @_ZNK3Raz6BitsetixEm(ptr noundef nonnull align 8 dereferenceable(40) %8, i64 noundef %.01921) #5
  br i1 %17, label %18, label %36

18:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #5
  %19 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6SystemESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %20 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK3Raz6System21getAcceptedComponentsEv(ptr noundef nonnull align 8 dereferenceable(72) %19)
  %21 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6EntityESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %22 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK3Raz6Entity20getEnabledComponentsEv(ptr noundef nonnull align 8 dereferenceable(80) %21) #5
  call void @_ZNK3Raz6BitsetanERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.Raz::Bitset") align 8 %2, ptr noundef nonnull align 8 dereferenceable(40) %20, ptr noundef nonnull align 8 dereferenceable(40) %22) #5
  %23 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6SystemESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %24 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt10unique_ptrIN3Raz6EntityESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %25 = call noundef zeroext i1 @_ZNK3Raz6System14containsEntityERKNS_6EntityE(ptr noundef nonnull align 8 dereferenceable(72) %23, ptr noundef nonnull align 8 dereferenceable(80) %24) #5
  %26 = call noundef zeroext i1 @_ZNK3Raz6Bitset7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  br i1 %25, label %30, label %27

27:                                               ; preds = %18
  br i1 %26, label %35, label %.invoke

28:                                               ; preds = %.invoke
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3Raz6BitsetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #5
  resume { ptr, i32 } %29

30:                                               ; preds = %18
  br i1 %26, label %.invoke, label %35

.invoke:                                          ; preds = %30, %27
  %.sink26 = phi i64 [ 32, %27 ], [ 40, %30 ]
  %31 = call noundef ptr @_ZNKSt10unique_ptrIN3Raz6SystemESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  %32 = load ptr, ptr %31, align 8, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %32, i64 %.sink26
  %34 = load ptr, ptr %33, align 8
  invoke void %34(ptr noundef nonnull align 8 dereferenceable(72) %31, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %35 unwind label %28

35:                                               ; preds = %.invoke, %30, %27
  call void @_ZN3Raz6BitsetD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #5
  br label %36

36:                                               ; preds = %.lr.ph, %16, %35
  %37 = add nuw i64 %.01921, 1
  %38 = call noundef i64 @_ZNKSt6vectorISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  %39 = icmp ult i64 %37, %38
  br i1 %39, label %.lr.ph, label %.loopexit, !llvm.loop !29

.loopexit:                                        ; preds = %36, %.preheader, %9
  %40 = add nuw i64 %.022, 1
  %41 = load i64, ptr %6, align 8, !tbaa !5
  %42 = icmp ult i64 %40, %41
  br i1 %42, label %9, label %.loopexit20, !llvm.loop !31

.loopexit20:                                      ; preds = %.loopexit, %5, %1
  ret void
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Bitset7isEmptyEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3Raz6Entity9isEnabledEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIN3Raz6SystemESt14default_deleteIS1_EEbRKSt10unique_ptrIT_T0_EDn(ptr noundef nonnull align 8 dereferenceable(8), ptr) local_unnamed_addr #3

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

; Function Attrs: nounwind
declare void @_ZNK3Raz6BitsetanERKS0_(ptr dead_on_unwind writable sret(%"class.Raz::Bitset") align 8, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4

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

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3Raz6System14containsEntityERKNS_6EntityE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #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, !26, i64 88}
!6 = !{!"_ZTSN3Raz5WorldE", !7, i64 0, !14, i64 24, !22, i64 64, !26, i64 88, !26, i64 96}
!7 = !{!"_ZTSSt6vectorISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6SystemESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN3Raz6BitsetE", !15, i64 0}
!15 = !{!"_ZTSSt6vectorIbSaIbEE", !16, i64 0}
!16 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !17, i64 0}
!17 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !19, i64 0, !19, i64 16, !11, i64 32}
!19 = !{!"_ZTSSt13_Bit_iterator", !20, i64 0}
!20 = !{!"_ZTSSt18_Bit_iterator_base", !11, i64 0, !21, i64 8}
!21 = !{!"int", !12, i64 0}
!22 = !{!"_ZTSSt6vectorISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3Raz6EntityESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!26 = !{!"long", !12, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !13, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}


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