; LLVM IR from sgtlaugh/algovault :: code_library (disjoint_sparse_table)

; 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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }
%struct.DisjointST = type { [32 x %"class.std::vector"] }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }

@constinit = external hidden constant [9 x i32], align 4
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@stderr = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::initializer_list", align 8
  %4 = alloca [9 x i32], align 4
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.DisjointST, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::mersenne_twister_engine", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %struct.DisjointST, align 8
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 36, ptr %4) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 @constinit, i64 36, i1 false), !tbaa.struct !5
  %17 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 0
  store ptr %4, ptr %17, align 8, !tbaa !9
  %18 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 1
  store i64 9, ptr %18, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  %19 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8
  %21 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 1
  %22 = load i64, ptr %21, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr %20, i64 %22, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %23 unwind label %30

23:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 36, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 768, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !14
  invoke void @_ZN10DisjointSTIiEC2ERKSt6vectorIiSaIiEERKi(ptr noundef nonnull align 8 dereferenceable(768) %8, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %24 unwind label %34

24:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  %25 = invoke noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 0, i32 noundef 0)
          to label %26 unwind label %38

26:                                               ; preds = %24
  %27 = icmp eq i32 %25, 5
  br i1 %27, label %28, label %29

28:                                               ; preds = %26
  br label %43

29:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 70, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

30:                                               ; preds = %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %6, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 36, ptr %4) #8
  br label %128

34:                                               ; preds = %23
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %6, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %127

38:                                               ; preds = %78, %71, %64, %57, %50, %43, %24
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %6, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %7, align 4
  br label %126

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %28
  %44 = invoke noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 0, i32 noundef 2)
          to label %45 unwind label %38

45:                                               ; preds = %43
  %46 = icmp eq i32 %44, 12
  br i1 %46, label %47, label %48

47:                                               ; preds = %45
  br label %50

48:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 71, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

49:                                               ; No predecessors!
  br label %50

50:                                               ; preds = %49, %47
  %51 = invoke noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 1, i32 noundef 4)
          to label %52 unwind label %38

52:                                               ; preds = %50
  %53 = icmp eq i32 %51, 27
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  br label %57

55:                                               ; preds = %52
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 72, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

56:                                               ; No predecessors!
  br label %57

57:                                               ; preds = %56, %54
  %58 = invoke noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 3, i32 noundef 5)
          to label %59 unwind label %38

59:                                               ; preds = %57
  %60 = icmp eq i32 %58, 24
  br i1 %60, label %61, label %62

61:                                               ; preds = %59
  br label %64

62:                                               ; preds = %59
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 73, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %61
  %65 = invoke noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 4, i32 noundef 7)
          to label %66 unwind label %38

66:                                               ; preds = %64
  %67 = icmp eq i32 %65, 86
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  br label %71

69:                                               ; preds = %66
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 74, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

70:                                               ; No predecessors!
  br label %71

71:                                               ; preds = %70, %68
  %72 = invoke noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 2, i32 noundef 6)
          to label %73 unwind label %38

73:                                               ; preds = %71
  %74 = icmp eq i32 %72, 34
  br i1 %74, label %75, label %76

75:                                               ; preds = %73
  br label %78

76:                                               ; preds = %73
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 75, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

77:                                               ; No predecessors!
  br label %78

78:                                               ; preds = %77, %75
  %79 = invoke noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 1, i32 noundef 8)
          to label %80 unwind label %38

80:                                               ; preds = %78
  %81 = icmp eq i32 %79, 129
  br i1 %81, label %82, label %83

82:                                               ; preds = %80
  br label %85

83:                                               ; preds = %80
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 76, ptr noundef @__PRETTY_FUNCTION__.main) #9
  unreachable

84:                                               ; No predecessors!
  br label %85

85:                                               ; preds = %84, %82
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.start.p0(i64 5000, ptr %10) #8
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %10, i64 noundef 0)
          to label %86 unwind label %91

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 2000000, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !14
  br label %87

87:                                               ; preds = %101, %86
  %88 = load i32, ptr %12, align 4, !tbaa !14
  %89 = icmp slt i32 %88, 2000000
  br i1 %89, label %95, label %90

90:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %108

91:                                               ; preds = %85
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  br label %125

95:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %96 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %10)
          to label %97 unwind label %104

97:                                               ; preds = %95
  %98 = urem i64 %96, 1000000000
  %99 = trunc i64 %98 to i32
  store i32 %99, ptr %13, align 4, !tbaa !14
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %100 unwind label %104

100:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %12, align 4, !tbaa !14
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %12, align 4, !tbaa !14
  br label %87, !llvm.loop !16

104:                                              ; preds = %97, %95
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %6, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %124

108:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %109 = call i64 @clock() #8
  store i64 %109, ptr %14, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 768, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !14
  invoke void @_ZN10DisjointSTIiEC2ERKSt6vectorIiSaIiEERKi(ptr noundef nonnull align 8 dereferenceable(768) %15, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %110 unwind label %120

110:                                              ; preds = %108
  %111 = call noundef nonnull align 8 dereferenceable(768) ptr @_ZN10DisjointSTIiEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(768) %8, ptr noundef nonnull align 8 dereferenceable(768) %15) #8
  call void @_ZN10DisjointSTIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 768, ptr %15) #8
  %112 = load ptr, ptr @stderr, align 8, !tbaa !19
  %113 = call i64 @clock() #8
  %114 = load i64, ptr %14, align 8, !tbaa !18
  %115 = sub nsw i64 %113, %114
  %116 = sitofp i64 %115 to double
  %117 = fdiv double %116, 1.000000e+06
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.8, double noundef %117) #8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 5000, ptr %10) #8
  call void @_ZN10DisjointSTIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %8) #8
  call void @llvm.lifetime.end.p0(i64 768, ptr %8) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #8
  %119 = load i32, ptr %1, align 4
  ret i32 %119

120:                                              ; preds = %108
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %6, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 768, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %124

124:                                              ; preds = %120, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %125

125:                                              ; preds = %124, %91
  call void @llvm.lifetime.end.p0(i64 5000, ptr %10) #8
  br label %126

126:                                              ; preds = %125, %38
  call void @_ZN10DisjointSTIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %8) #8
  br label %127

127:                                              ; preds = %126, %34
  call void @llvm.lifetime.end.p0(i64 768, ptr %8) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #8
  br label %128

128:                                              ; preds = %127, %30
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #8
  br label %129

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10DisjointSTIiEC2ERKSt6vectorIiSaIiEERKi(ptr noundef nonnull align 8 dereferenceable(768), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768), i32 noundef, i32 noundef) #3 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000)) #4 align 2

; Function Attrs: nounwind
declare i64 @clock() #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(768) ptr @_ZN10DisjointSTIiEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(768), ptr noundef nonnull align 8 dereferenceable(768)) #7 align 2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #6

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

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

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


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%struct.DisjointST = type { [32 x %"class.std::vector"] }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }

@constinit = external hidden local_unnamed_addr constant [9 x i32], align 4
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca [9 x i32], align 4
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %struct.DisjointST, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::mersenne_twister_engine", align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.DisjointST, align 8
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %2) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %2, ptr noundef nonnull align 4 dereferenceable(36) @constinit, i64 36, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nonnull %2, i64 9, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %10 unwind label %15

10:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 768, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store i32 0, ptr %5, align 4, !tbaa !9
  invoke void @_ZN10DisjointSTIiEC2ERKSt6vectorIiSaIiEERKi(ptr noundef nonnull align 8 dereferenceable(768) %4, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %11 unwind label %17

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  %12 = call noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 0, i32 noundef 0)
  %13 = icmp eq i32 %12, 5
  br i1 %13, label %19, label %14

14:                                               ; preds = %11
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 70, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %2) #9
  br label %68

17:                                               ; preds = %10
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  br label %67

19:                                               ; preds = %11
  %20 = call noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 0, i32 noundef 2)
  %21 = icmp eq i32 %20, 12
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 71, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

23:                                               ; preds = %19
  %24 = call noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 1, i32 noundef 4)
  %25 = icmp eq i32 %24, 27
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 72, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

27:                                               ; preds = %23
  %28 = call noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 3, i32 noundef 5)
  %29 = icmp eq i32 %28, 24
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 73, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

31:                                               ; preds = %27
  %32 = call noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 4, i32 noundef 7)
  %33 = icmp eq i32 %32, 86
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 74, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

35:                                               ; preds = %31
  %36 = call noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 2, i32 noundef 6)
  %37 = icmp eq i32 %36, 34
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 75, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

39:                                               ; preds = %35
  %40 = call noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 1, i32 noundef 8)
  %41 = icmp eq i32 %40, 129
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 76, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #10
  unreachable

43:                                               ; preds = %39
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %6) #9
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %6, i64 noundef 0)
          to label %.preheader unwind label %46

44:                                               ; preds = %52
  %45 = call i64 @clock() #9
  call void @llvm.lifetime.start.p0(i64 768, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  store i32 0, ptr %9, align 4, !tbaa !9
  invoke void @_ZN10DisjointSTIiEC2ERKSt6vectorIiSaIiEERKi(ptr noundef nonnull align 8 dereferenceable(768) %8, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %56 unwind label %64

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

.preheader:                                       ; preds = %43, %52
  %.014 = phi i32 [ %53, %52 ], [ 0, %43 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %48 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %6)
          to label %49 unwind label %54

49:                                               ; preds = %.preheader
  %50 = urem i64 %48, 1000000000
  %51 = trunc nuw nsw i64 %50 to i32
  store i32 %51, ptr %7, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %52 unwind label %54

52:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  %53 = add nuw nsw i32 %.014, 1
  %exitcond.not = icmp eq i32 %53, 2000000
  br i1 %exitcond.not, label %44, label %.preheader, !llvm.loop !11

54:                                               ; preds = %49, %.preheader
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  br label %66

56:                                               ; preds = %44
  %57 = call noundef nonnull align 8 dereferenceable(768) ptr @_ZN10DisjointSTIiEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(768) %4, ptr noundef nonnull align 8 dereferenceable(768) %8) #9
  call void @_ZN10DisjointSTIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 768, ptr nonnull %8) #9
  %58 = load ptr, ptr @stderr, align 8, !tbaa !13
  %59 = call i64 @clock() #9
  %60 = sub nsw i64 %59, %45
  %61 = sitofp i64 %60 to double
  %62 = fdiv double %61, 1.000000e+06
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str.8, double noundef %62) #11
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #9
  call void @_ZN10DisjointSTIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %4) #9
  call void @llvm.lifetime.end.p0(i64 768, ptr nonnull %4) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #9
  ret i32 0

64:                                               ; preds = %44
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 768, ptr nonnull %8) #9
  br label %66

66:                                               ; preds = %54, %64, %46
  %.pn.pn = phi { ptr, i32 } [ %47, %46 ], [ %55, %54 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #9
  call void @_ZN10DisjointSTIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %4) #9
  br label %67

67:                                               ; preds = %66, %17
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %66 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 768, ptr nonnull %4) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #9
  br label %68

68:                                               ; preds = %67, %15
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %67 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10DisjointSTIiEC2ERKSt6vectorIiSaIiEERKi(ptr noundef nonnull align 8 dereferenceable(768), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN10DisjointSTIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000), i64 noundef) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #4 align 2

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(768) ptr @_ZN10DisjointSTIiEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(768), ptr noundef nonnull align 8 dereferenceable(768)) local_unnamed_addr #7 align 2

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

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

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

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

attributes #0 = { mustprogress norecurse 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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 = { noreturn 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 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nounwind }
attributes #10 = { noreturn nounwind }
attributes #11 = { cold 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 = !{i64 0, i64 36, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass