; LLVM IR from kazunetakahashi/atcoder :: 2018/0217_hack-to-the-future-2018 (A)

; 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::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::chrono::duration.24" = type { i64 }
%class.state = type { %"class.std::vector", %"class.std::vector.10", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@rd = external dso_local global %"class.std::random_device", align 8
@A = external dso_local global [100 x [100 x i64]], align 16
@W = external dso_local global %"class.std::vector.5", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) #0 align 2

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4seedv() #0

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::chrono::time_point", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.std::chrono::time_point", align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.std::chrono::duration.24", align 8
  %13 = alloca %"class.std::chrono::duration", align 8
  %14 = alloca %"class.std::chrono::time_point", align 8
  %15 = alloca %"class.std::chrono::duration.24", align 8
  %16 = alloca %"class.std::chrono::duration", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.std::vector.5", align 8
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %class.state, align 8
  %30 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  %31 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  %32 = getelementptr inbounds %"class.std::chrono::time_point", ptr %2, i32 0, i32 0
  %33 = getelementptr inbounds %"class.std::chrono::duration", ptr %32, i32 0, i32 0
  store i64 %31, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %55, %0
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 100
  br i1 %36, label %38, label %37

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

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %51, %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 100
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %54

43:                                               ; preds = %39
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100 x [100 x i64]], ptr @A, i64 0, i64 %45
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100 x i64], ptr %46, i64 0, i64 %48
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %49)
  br label %51

51:                                               ; preds = %43
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %5, align 4, !tbaa !5
  br label %39, !llvm.loop !9

54:                                               ; preds = %42
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !5
  br label %34, !llvm.loop !11

58:                                               ; preds = %37
  call void @_Z4seedv()
  %59 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  %61 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %62 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %61, ptr %62, align 8
  %63 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %64, ptr %66)
  %67 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %69, ptr %70, align 8
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %72, ptr %74)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %75 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  %76 = getelementptr inbounds %"class.std::chrono::time_point", ptr %10, i32 0, i32 0
  %77 = getelementptr inbounds %"class.std::chrono::duration", ptr %76, i32 0, i32 0
  store i64 %75, ptr %77, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %78 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %79 = getelementptr inbounds %"class.std::chrono::duration", ptr %13, i32 0, i32 0
  store i64 %78, ptr %79, align 8
  %80 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %13)
  %81 = getelementptr inbounds %"class.std::chrono::duration.24", ptr %12, i32 0, i32 0
  store i64 %80, ptr %81, align 8
  %82 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
  %83 = sitofp i64 %82 to double
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  store double %83, ptr %11, align 8, !tbaa !12
  br label %84

84:                                               ; preds = %176, %58
  br label %85

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %86 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #8
  %87 = getelementptr inbounds %"class.std::chrono::time_point", ptr %14, i32 0, i32 0
  %88 = getelementptr inbounds %"class.std::chrono::duration", ptr %87, i32 0, i32 0
  store i64 %86, ptr %88, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %14, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %89 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %90 = getelementptr inbounds %"class.std::chrono::duration", ptr %16, i32 0, i32 0
  store i64 %89, ptr %90, align 8
  %91 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %16)
  %92 = getelementptr inbounds %"class.std::chrono::duration.24", ptr %15, i32 0, i32 0
  store i64 %91, ptr %92, align 8
  %93 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
  %94 = sitofp i64 %93 to double
  store double %94, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %95 = load double, ptr %11, align 8, !tbaa !12
  %96 = fcmp ogt double %95, 5.950000e+03
  br i1 %96, label %97, label %110

97:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %98 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %98, ptr %99, align 8
  %100 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %100, ptr %101, align 8
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8
  %106 = call ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEET_S8_S8_(ptr %103, ptr %105)
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %106, ptr %107, align 8
  %108 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @_ZN5state6show_VEv(ptr noundef nonnull align 8 dereferenceable(56) %108)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  %109 = load i32, ptr %1, align 4
  ret i32 %109

110:                                              ; preds = %85
  %111 = call noundef i64 @_ZNKSt6vectorI5stateSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %112 = icmp ugt i64 %111, 20
  br i1 %112, label %113, label %154

113:                                              ; preds = %110
  %114 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %115 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  %116 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %117 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %116, ptr %117, align 8
  %118 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %119, ptr %121)
  %122 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %123 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %122, ptr %123, align 8
  %124 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %125 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %124, ptr %125, align 8
  %126 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8
  %128 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %127, ptr %129)
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #8
  call void @_ZNSt6vectorI5stateSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %139, %113
  %131 = load i32, ptr %25, align 4, !tbaa !5
  %132 = icmp slt i32 %131, 10
  br i1 %132, label %134, label %133

133:                                              ; preds = %130
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %146

134:                                              ; preds = %130
  %135 = load i32, ptr %25, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %136) #8
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(56) %137)
          to label %138 unwind label %142

138:                                              ; preds = %134
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %25, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %25, align 4, !tbaa !5
  br label %130, !llvm.loop !17

142:                                              ; preds = %134
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %26, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %153

146:                                              ; preds = %133
  %147 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5stateSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) @W, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %148 unwind label %149

148:                                              ; preds = %146
  call void @_ZNSt6vectorI5stateSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %154

149:                                              ; preds = %146
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %26, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %27, align 4
  br label %153

153:                                              ; preds = %149, %142
  call void @_ZNSt6vectorI5stateSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #8
  br label %182

154:                                              ; preds = %148, %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %155 = call noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) @rd)
  %156 = call noundef i64 @_ZNKSt6vectorI5stateSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #8
  %157 = trunc i64 %156 to i32
  %158 = urem i32 %155, %157
  store i32 %158, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %29) #8
  %159 = load i32, ptr %28, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %160) #8
  call void @_ZN5stateC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(56) %161)
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %168, %154
  %163 = load i32, ptr %30, align 4, !tbaa !5
  %164 = icmp slt i32 %163, 10
  br i1 %164, label %166, label %165

165:                                              ; preds = %162
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %175

166:                                              ; preds = %162
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %29)
          to label %167 unwind label %171

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %30, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %30, align 4, !tbaa !5
  br label %162, !llvm.loop !18

171:                                              ; preds = %166
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %26, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %181

175:                                              ; preds = %165
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) @W, ptr noundef nonnull align 8 dereferenceable(56) %29)
          to label %176 unwind label %177

176:                                              ; preds = %175
  call void @_ZN5stateD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %84, !llvm.loop !19

177:                                              ; preds = %175
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %26, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %27, align 4
  br label %181

181:                                              ; preds = %177, %171
  call void @_ZN5stateD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %182

182:                                              ; preds = %181, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  br label %183

183:                                              ; preds = %182
  %184 = load ptr, ptr %26, align 8
  %185 = load i32, ptr %27, align 4
  %186 = insertvalue { ptr, i32 } poison, ptr %184, 0
  %187 = insertvalue { ptr, i32 } %186, i32 %185, 1
  resume { ptr, i32 } %187
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) #6

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEET_S8_S8_(ptr, ptr) #6

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5stateC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{i64 0, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; 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::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl" = type { %"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" }
%"struct.std::_Vector_base<state, std::allocator<state>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.std::chrono::duration.24" = type { i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.state = type { %"class.std::vector", %"class.std::vector.10", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<long long>, std::allocator<std::vector<long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<int, int, long long>, std::allocator<std::tuple<int, int, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@rd = external dso_local global %"class.std::random_device", align 8
@A = external dso_local global [100 x [100 x i64]], align 16
@W = external dso_local global %"class.std::vector.5", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #0 align 2

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4seedv() local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::chrono::time_point", align 8
  %2 = alloca %"class.std::chrono::time_point", align 8
  %3 = alloca %"class.std::chrono::duration.24", align 8
  %4 = alloca %"class.std::chrono::duration", align 8
  %5 = alloca %"class.std::chrono::duration.24", align 8
  %6 = alloca %"class.std::chrono::duration", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.std::vector.5", align 8
  %9 = alloca %class.state, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %10 = tail call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #7
  store i64 %10, ptr %1, align 8
  br label %.preheader

.preheader:                                       ; preds = %0, %25
  %indvars.iv41 = phi i64 [ 0, %0 ], [ %indvars.iv.next42, %25 ]
  br label %26

11:                                               ; preds = %25
  tail call void @_Z4seedv()
  %12 = tail call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %13 = tail call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %12, ptr %13)
  %14 = tail call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %15 = tail call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  tail call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %14, ptr %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %16 = tail call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #7
  store i64 %16, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %17 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %1)
  store i64 %17, ptr %4, align 8
  %18 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i64 %18, ptr %3, align 8
  %19 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %20 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #7
  store i64 %20, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %21 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %1)
  store i64 %21, ptr %6, align 8
  %22 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %6)
  store i64 %22, ptr %5, align 8
  %23 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %24 = icmp sgt i64 %23, 5950
  br i1 %24, label %._crit_edge, label %.lr.ph

25:                                               ; preds = %26
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %exitcond44.not = icmp eq i64 %indvars.iv.next42, 100
  br i1 %exitcond44.not, label %11, label %.preheader, !llvm.loop !9

26:                                               ; preds = %.preheader, %26
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %26 ]
  %27 = getelementptr inbounds [100 x [100 x i64]], ptr @A, i64 0, i64 %indvars.iv41, i64 %indvars.iv
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100
  br i1 %exitcond.not, label %25, label %26, !llvm.loop !11

._crit_edge:                                      ; preds = %86, %11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %29 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %30 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %31 = call ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEET_S8_S8_(ptr %29, ptr %30)
  store ptr %31, ptr %7, align 8
  %32 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @_ZN5state6show_VEv(ptr noundef nonnull align 8 dereferenceable(56) %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

.lr.ph:                                           ; preds = %11, %86
  %33 = call noundef i64 @_ZNKSt6vectorI5stateSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %34 = icmp ugt i64 %33, 20
  br i1 %34, label %35, label %67

35:                                               ; preds = %.lr.ph
  %36 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %37 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %36, ptr %37)
  %38 = call ptr @_ZNSt6vectorI5stateSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %39 = call ptr @_ZNSt6vectorI5stateSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr %38, ptr %39)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @_ZNSt6vectorI5stateSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %40 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 0) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %40)
          to label %41 unwind label %61

41:                                               ; preds = %35
  %42 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 1) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %42)
          to label %43 unwind label %61

43:                                               ; preds = %41
  %44 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 2) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %44)
          to label %45 unwind label %61

45:                                               ; preds = %43
  %46 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 3) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %46)
          to label %47 unwind label %61

47:                                               ; preds = %45
  %48 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 4) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %48)
          to label %49 unwind label %61

49:                                               ; preds = %47
  %50 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 5) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %50)
          to label %51 unwind label %61

51:                                               ; preds = %49
  %52 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 6) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %52)
          to label %53 unwind label %61

53:                                               ; preds = %51
  %54 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 7) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %54)
          to label %55 unwind label %61

55:                                               ; preds = %53
  %56 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 8) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %56)
          to label %57 unwind label %61

57:                                               ; preds = %55
  %58 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef 9) #7
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(56) %58)
          to label %59 unwind label %61

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI5stateSaIS0_EEaSERKS2_(ptr noundef nonnull align 8 dereferenceable(24) @W, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %63 unwind label %64

61:                                               ; preds = %57, %55, %53, %51, %49, %47, %45, %43, %41, %35
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %66

63:                                               ; preds = %59
  call void @_ZNSt6vectorI5stateSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %67

64:                                               ; preds = %59
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %66

66:                                               ; preds = %64, %61
  %.pn33 = phi { ptr, i32 } [ %62, %61 ], [ %65, %64 ]
  call void @_ZNSt6vectorI5stateSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %95

67:                                               ; preds = %63, %.lr.ph
  %68 = call noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) @rd)
  %69 = call noundef i64 @_ZNKSt6vectorI5stateSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @W) #7
  %70 = trunc i64 %69 to i32
  %71 = urem i32 %68, %70
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #7
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt6vectorI5stateSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @W, i64 noundef %72) #7
  call void @_ZN5stateC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 8 dereferenceable(56) %73)
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %74 unwind label %84

74:                                               ; preds = %67
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %75 unwind label %84

75:                                               ; preds = %74
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %76 unwind label %84

76:                                               ; preds = %75
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %77 unwind label %84

77:                                               ; preds = %76
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %78 unwind label %84

78:                                               ; preds = %77
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %79 unwind label %84

79:                                               ; preds = %78
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %80 unwind label %84

80:                                               ; preds = %79
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %81 unwind label %84

81:                                               ; preds = %80
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %82 unwind label %84

82:                                               ; preds = %81
  invoke void @_ZN5state7improveEv(ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %83 unwind label %84

83:                                               ; preds = %82
  invoke void @_ZNSt6vectorI5stateSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) @W, ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %86 unwind label %92

84:                                               ; preds = %82, %81, %80, %79, %78, %77, %76, %75, %74, %67
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %94

86:                                               ; preds = %83
  call void @_ZN5stateD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #7
  %87 = call i64 @_ZNSt6chrono3_V212system_clock3nowEv() #7
  store i64 %87, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %88 = call i64 @_ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %1)
  store i64 %88, ptr %6, align 8
  %89 = call i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %6)
  store i64 %89, ptr %5, align 8
  %90 = call noundef i64 @_ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %91 = icmp sgt i64 %90, 5950
  br i1 %91, label %._crit_edge, label %.lr.ph, !llvm.loop !12

92:                                               ; preds = %83
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %94

94:                                               ; preds = %92, %84
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %93, %92 ]
  call void @_ZN5stateD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #7
  br label %95

95:                                               ; preds = %94, %66
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %66 ], [ %.pn, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn33.pn
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEEvT_S8_(ptr, ptr) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11max_elementIN9__gnu_cxx17__normal_iteratorIP5stateSt6vectorIS2_SaIS2_EEEEET_S8_S8_(ptr, ptr) local_unnamed_addr #6

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5stateC2ERKS_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6 align 2

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

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


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