; LLVM IR from sgtlaugh/algovault :: code_library (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.SparseTable = 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 [82 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 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.SparseTable, align 8
  %9 = alloca %"class.std::mersenne_twister_engine", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca %struct.SparseTable, align 8
  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
  %15 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 0
  store ptr %4, ptr %15, align 8, !tbaa !9
  %16 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 1
  store i64 9, ptr %16, 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
  %17 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8
  %19 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 1
  %20 = load i64, ptr %19, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr %18, i64 %20, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %21 unwind label %28

21:                                               ; 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
  invoke void @_ZN11SparseTableIiEC2ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(768) %8, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %22 unwind label %32

22:                                               ; preds = %21
  %23 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 0, i32 noundef 0)
          to label %24 unwind label %36

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

26:                                               ; preds = %24
  br label %41

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

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %6, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, 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 %126

32:                                               ; preds = %21
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %6, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %7, align 4
  br label %125

36:                                               ; preds = %76, %69, %62, %55, %48, %41, %22
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %6, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %7, align 4
  br label %124

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40, %26
  %42 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 0, i32 noundef 2)
          to label %43 unwind label %36

43:                                               ; preds = %41
  %44 = icmp eq i32 %42, 1
  br i1 %44, label %45, label %46

45:                                               ; preds = %43
  br label %48

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

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %45
  %49 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 1, i32 noundef 4)
          to label %50 unwind label %36

50:                                               ; preds = %48
  %51 = icmp eq i32 %49, 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  br label %55

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

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54, %52
  %56 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 3, i32 noundef 5)
          to label %57 unwind label %36

57:                                               ; preds = %55
  %58 = icmp eq i32 %56, 4
  br i1 %58, label %59, label %60

59:                                               ; preds = %57
  br label %62

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

61:                                               ; No predecessors!
  br label %62

62:                                               ; preds = %61, %59
  %63 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 4, i32 noundef 7)
          to label %64 unwind label %36

64:                                               ; preds = %62
  %65 = icmp eq i32 %63, 4
  br i1 %65, label %66, label %67

66:                                               ; preds = %64
  br label %69

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

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %66
  %70 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 2, i32 noundef 6)
          to label %71 unwind label %36

71:                                               ; preds = %69
  %72 = icmp eq i32 %70, 1
  br i1 %72, label %73, label %74

73:                                               ; preds = %71
  br label %76

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

75:                                               ; No predecessors!
  br label %76

76:                                               ; preds = %75, %73
  %77 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %8, i32 noundef 1, i32 noundef 8)
          to label %78 unwind label %36

78:                                               ; preds = %76
  %79 = icmp eq i32 %77, 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  br label %83

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

82:                                               ; No predecessors!
  br label %83

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

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

85:                                               ; preds = %99, %84
  %86 = load i32, ptr %11, align 4, !tbaa !14
  %87 = icmp slt i32 %86, 2000000
  br i1 %87, label %93, label %88

88:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %106

89:                                               ; preds = %83
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %123

93:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %94 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %9)
          to label %95 unwind label %102

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

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

99:                                               ; preds = %98
  %100 = load i32, ptr %11, align 4, !tbaa !14
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %11, align 4, !tbaa !14
  br label %85, !llvm.loop !16

102:                                              ; preds = %95, %93
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %6, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %122

106:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %107 = call i64 @clock() #8
  store i64 %107, ptr %13, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 768, ptr %14) #8
  invoke void @_ZN11SparseTableIiEC2ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(768) %14, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %108 unwind label %118

108:                                              ; preds = %106
  %109 = call noundef nonnull align 8 dereferenceable(768) ptr @_ZN11SparseTableIiEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(768) %8, ptr noundef nonnull align 8 dereferenceable(768) %14) #8
  call void @_ZN11SparseTableIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %14) #8
  call void @llvm.lifetime.end.p0(i64 768, ptr %14) #8
  %110 = load ptr, ptr @stderr, align 8, !tbaa !19
  %111 = call i64 @clock() #8
  %112 = load i64, ptr %13, align 8, !tbaa !18
  %113 = sub nsw i64 %111, %112
  %114 = sitofp i64 %113 to double
  %115 = fdiv double %114, 1.000000e+06
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.8, double noundef %115) #8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 5000, ptr %9) #8
  call void @_ZN11SparseTableIiED2Ev(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
  %117 = load i32, ptr %1, align 4
  ret i32 %117

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

122:                                              ; preds = %118, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %123

123:                                              ; preds = %122, %89
  call void @llvm.lifetime.end.p0(i64 5000, ptr %9) #8
  br label %124

124:                                              ; preds = %123, %36
  call void @_ZN11SparseTableIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %8) #8
  br label %125

125:                                              ; preds = %124, %32
  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 %126

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

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

; 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 @_ZN11SparseTableIiEC2ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(768), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768), i32 noundef, i32 noundef) #4 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 @_ZN11SparseTableIiEaSEOS0_(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 @_ZN11SparseTableIiED2Ev(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.SparseTable = 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 [82 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 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.SparseTable, align 8
  %5 = alloca %"class.std::mersenne_twister_engine", align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.SparseTable, align 8
  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 %8 unwind label %14

8:                                                ; 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
  invoke void @_ZN11SparseTableIiEC2ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(768) %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %9 unwind label %16

9:                                                ; preds = %8
  %10 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 0, i32 noundef 0)
          to label %11 unwind label %18

11:                                               ; preds = %9
  %12 = icmp eq i32 %10, 5
  br i1 %12, label %20, label %13

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

14:                                               ; preds = %0
  %15 = 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 %76

16:                                               ; preds = %8
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %75

18:                                               ; preds = %45, %40, %35, %30, %25, %20, %9
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %74

20:                                               ; preds = %11
  %21 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 0, i32 noundef 2)
          to label %22 unwind label %18

22:                                               ; preds = %20
  %23 = icmp eq i32 %21, 1
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %22
  %26 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 1, i32 noundef 4)
          to label %27 unwind label %18

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

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

30:                                               ; preds = %27
  %31 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 3, i32 noundef 5)
          to label %32 unwind label %18

32:                                               ; preds = %30
  %33 = icmp eq i32 %31, 4
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %32
  %36 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 4, i32 noundef 7)
          to label %37 unwind label %18

37:                                               ; preds = %35
  %38 = icmp eq i32 %36, 4
  br i1 %38, label %40, label %39

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

40:                                               ; preds = %37
  %41 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 2, i32 noundef 6)
          to label %42 unwind label %18

42:                                               ; preds = %40
  %43 = icmp eq i32 %41, 1
  br i1 %43, label %45, label %44

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

45:                                               ; preds = %42
  %46 = invoke noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768) %4, i32 noundef 1, i32 noundef 8)
          to label %47 unwind label %18

47:                                               ; preds = %45
  %48 = icmp eq i32 %46, 1
  br i1 %48, label %50, label %49

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

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

51:                                               ; preds = %59
  %52 = call i64 @clock() #9
  call void @llvm.lifetime.start.p0(i64 768, ptr nonnull %7) #9
  invoke void @_ZN11SparseTableIiEC2ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(768) %7, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %63 unwind label %71

53:                                               ; preds = %50
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %73

.preheader:                                       ; preds = %50, %59
  %.016 = phi i32 [ %60, %59 ], [ 0, %50 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  %55 = invoke noundef i64 @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEclEv(ptr noundef nonnull align 8 dereferenceable(5000) %5)
          to label %56 unwind label %61

56:                                               ; preds = %.preheader
  %57 = urem i64 %55, 1000000000
  %58 = trunc nuw nsw i64 %57 to i32
  store i32 %58, ptr %6, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %59 unwind label %61

59:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  %60 = add nuw nsw i32 %.016, 1
  %exitcond.not = icmp eq i32 %60, 2000000
  br i1 %exitcond.not, label %51, label %.preheader, !llvm.loop !11

61:                                               ; preds = %56, %.preheader
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  br label %73

63:                                               ; preds = %51
  %64 = call noundef nonnull align 8 dereferenceable(768) ptr @_ZN11SparseTableIiEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(768) %4, ptr noundef nonnull align 8 dereferenceable(768) %7) #9
  call void @_ZN11SparseTableIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %7) #9
  call void @llvm.lifetime.end.p0(i64 768, ptr nonnull %7) #9
  %65 = load ptr, ptr @stderr, align 8, !tbaa !13
  %66 = call i64 @clock() #9
  %67 = sub nsw i64 %66, %52
  %68 = sitofp i64 %67 to double
  %69 = fdiv double %68, 1.000000e+06
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.8, double noundef %69) #11
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #9
  call void @_ZN11SparseTableIiED2Ev(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

71:                                               ; preds = %51
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 768, ptr nonnull %7) #9
  br label %73

73:                                               ; preds = %61, %71, %53
  %.pn.pn = phi { ptr, i32 } [ %54, %53 ], [ %62, %61 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #9
  br label %74

74:                                               ; preds = %73, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %73 ], [ %19, %18 ]
  call void @_ZN11SparseTableIiED2Ev(ptr noundef nonnull align 8 dereferenceable(768) %4) #9
  br label %75

75:                                               ; preds = %74, %16
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %74 ], [ %17, %16 ]
  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 %76

76:                                               ; preds = %75, %14
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %75 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn.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 @_ZN11SparseTableIiEC2ERKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(768), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN11SparseTableIiE5queryEii(ptr noundef nonnull align 8 dereferenceable(768), i32 noundef, i32 noundef) local_unnamed_addr #4 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 @_ZN11SparseTableIiEaSEOS0_(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 @_ZN11SparseTableIiED2Ev(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