; LLVM IR from DionysiosB/CodeForces :: 0600-0699 (641E-LittleArtemAndTimeMachine)

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

%struct.act = type { i64, i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl" }
%"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl" = type { %"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl_data" }
%"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, std::pair<const long, std::vector<long>>, std::_Select1st<std::pair<const long, std::vector<long>>>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, std::pair<const long, std::vector<long>>, std::_Select1st<std::pair<const long, std::vector<long>>>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.13" = type { ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator.14" = type { ptr }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5tcomp3actS_(ptr noundef byval(%struct.act) align 8, ptr noundef byval(%struct.act) align 8) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.std::map", align 8
  %11 = alloca %"class.std::map", align 8
  %12 = alloca %"class.std::vector.3", align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %24 = alloca i64, align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %29 = alloca %"struct.std::pair", align 8
  %30 = alloca i64, align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.14", align 8
  %33 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #7
  %35 = load i64, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  call void @_ZNSaI3actEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  invoke void @_ZNSt6vectorI3actSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %35, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %36 unwind label %42

36:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorI3actED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %62, %36
  %38 = load i64, ptr %7, align 8, !tbaa !5
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %40 = icmp slt i64 %38, %39
  br i1 %40, label %46, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %69

42:                                               ; preds = %0
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %5, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %6, align 4
  call void @_ZNSt15__new_allocatorI3actED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  br label %300

46:                                               ; preds = %37
  %47 = load i64, ptr %7, align 8, !tbaa !5
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %47) #7
  %49 = getelementptr inbounds %struct.act, ptr %48, i32 0, i32 0
  %50 = load i64, ptr %7, align 8, !tbaa !5
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %50) #7
  %52 = getelementptr inbounds %struct.act, ptr %51, i32 0, i32 1
  %53 = load i64, ptr %7, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %53) #7
  %55 = getelementptr inbounds %struct.act, ptr %54, i32 0, i32 2
  %56 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %49, ptr noundef %52, ptr noundef %55)
          to label %57 unwind label %65

57:                                               ; preds = %46
  %58 = load i64, ptr %7, align 8, !tbaa !5
  %59 = load i64, ptr %7, align 8, !tbaa !5
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %59) #7
  %61 = getelementptr inbounds %struct.act, ptr %60, i32 0, i32 3
  store i64 %58, ptr %61, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %57
  %63 = load i64, ptr %7, align 8, !tbaa !5
  %64 = add nsw i64 %63, 1
  store i64 %64, ptr %7, align 8, !tbaa !5
  br label %37, !llvm.loop !11

65:                                               ; preds = %46
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %5, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %299

69:                                               ; preds = %41
  %70 = call ptr @_ZNSt6vectorI3actSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  %72 = call ptr @_ZNSt6vectorI3actSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3actSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr %75, ptr %77, ptr noundef @_Z5tcomp3actS_)
          to label %78 unwind label %84

78:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %259, %78
  %80 = load i64, ptr %13, align 8, !tbaa !5
  %81 = load i64, ptr %2, align 8, !tbaa !5
  %82 = icmp slt i64 %80, %81
  br i1 %82, label %88, label %83

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %263

84:                                               ; preds = %69
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %5, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %6, align 4
  br label %299

88:                                               ; preds = %79
  %89 = load i64, ptr %13, align 8, !tbaa !5
  %90 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %89) #7
  %91 = getelementptr inbounds %struct.act, ptr %90, i32 0, i32 0
  %92 = load i64, ptr %91, align 8, !tbaa !13
  %93 = icmp eq i64 %92, 1
  br i1 %93, label %94, label %127

94:                                               ; preds = %88
  %95 = load i64, ptr %13, align 8, !tbaa !5
  %96 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %95) #7
  %97 = getelementptr inbounds %struct.act, ptr %96, i32 0, i32 2
  %98 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %99 unwind label %123

99:                                               ; preds = %94
  %100 = load i64, ptr %13, align 8, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %100) #7
  %102 = getelementptr inbounds %struct.act, ptr %101, i32 0, i32 3
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(8) %102)
          to label %103 unwind label %123

103:                                              ; preds = %99
  %104 = load i64, ptr %13, align 8, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %104) #7
  %106 = getelementptr inbounds %struct.act, ptr %105, i32 0, i32 2
  %107 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %106)
          to label %108 unwind label %123

108:                                              ; preds = %103
  %109 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #7
  %110 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %14, i32 0, i32 0
  store ptr %109, ptr %110, align 8
  %111 = load i64, ptr %13, align 8, !tbaa !5
  %112 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %111) #7
  %113 = getelementptr inbounds %struct.act, ptr %112, i32 0, i32 2
  %114 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %113)
          to label %115 unwind label %123

115:                                              ; preds = %108
  %116 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #7
  %117 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %15, i32 0, i32 0
  store ptr %116, ptr %117, align 8
  %118 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %14, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %15, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEEvT_S7_(ptr %119, ptr %121)
          to label %122 unwind label %123

122:                                              ; preds = %115
  br label %258

123:                                              ; preds = %154, %147, %142, %138, %133, %115, %108, %103, %99, %94
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %5, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %6, align 4
  br label %262

127:                                              ; preds = %88
  %128 = load i64, ptr %13, align 8, !tbaa !5
  %129 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %128) #7
  %130 = getelementptr inbounds %struct.act, ptr %129, i32 0, i32 0
  %131 = load i64, ptr %130, align 8, !tbaa !13
  %132 = icmp eq i64 %131, 2
  br i1 %132, label %133, label %162

133:                                              ; preds = %127
  %134 = load i64, ptr %13, align 8, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %134) #7
  %136 = getelementptr inbounds %struct.act, ptr %135, i32 0, i32 2
  %137 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %136)
          to label %138 unwind label %123

138:                                              ; preds = %133
  %139 = load i64, ptr %13, align 8, !tbaa !5
  %140 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %139) #7
  %141 = getelementptr inbounds %struct.act, ptr %140, i32 0, i32 3
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %137, ptr noundef nonnull align 8 dereferenceable(8) %141)
          to label %142 unwind label %123

142:                                              ; preds = %138
  %143 = load i64, ptr %13, align 8, !tbaa !5
  %144 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %143) #7
  %145 = getelementptr inbounds %struct.act, ptr %144, i32 0, i32 2
  %146 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %145)
          to label %147 unwind label %123

147:                                              ; preds = %142
  %148 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %146) #7
  %149 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %16, i32 0, i32 0
  store ptr %148, ptr %149, align 8
  %150 = load i64, ptr %13, align 8, !tbaa !5
  %151 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %150) #7
  %152 = getelementptr inbounds %struct.act, ptr %151, i32 0, i32 2
  %153 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %152)
          to label %154 unwind label %123

154:                                              ; preds = %147
  %155 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %153) #7
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %17, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  %157 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %16, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8
  %159 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %17, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEEvT_S7_(ptr %158, ptr %160)
          to label %161 unwind label %123

161:                                              ; preds = %154
  br label %257

162:                                              ; preds = %127
  %163 = load i64, ptr %13, align 8, !tbaa !5
  %164 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %163) #7
  %165 = getelementptr inbounds %struct.act, ptr %164, i32 0, i32 0
  %166 = load i64, ptr %165, align 8, !tbaa !13
  %167 = icmp eq i64 %166, 3
  br i1 %167, label %168, label %256

168:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %169 = load i64, ptr %13, align 8, !tbaa !5
  %170 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %169) #7
  %171 = getelementptr inbounds %struct.act, ptr %170, i32 0, i32 2
  %172 = load i64, ptr %171, align 8, !tbaa !14
  store i64 %172, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %173 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %174 unwind label %232

174:                                              ; preds = %168
  %175 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %173) #7
  %176 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %21, i32 0, i32 0
  store ptr %175, ptr %176, align 8
  %177 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %178 unwind label %232

178:                                              ; preds = %174
  %179 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %177) #7
  %180 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %22, i32 0, i32 0
  store ptr %179, ptr %180, align 8
  %181 = load i64, ptr %13, align 8, !tbaa !5
  %182 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %181) #7
  %183 = getelementptr inbounds %struct.act, ptr %182, i32 0, i32 3
  %184 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %21, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8
  %186 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %22, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8
  %188 = invoke ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEElET_S7_S7_RKT0_(ptr %185, ptr %187, ptr noundef nonnull align 8 dereferenceable(8) %183)
          to label %189 unwind label %232

189:                                              ; preds = %178
  %190 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %20, i32 0, i32 0
  store ptr %188, ptr %190, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %191 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %192 unwind label %236

192:                                              ; preds = %189
  %193 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %191) #7
  %194 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %23, i32 0, i32 0
  store ptr %193, ptr %194, align 8
  %195 = call noundef i64 @_ZN9__gnu_cxxmiIPlSt6vectorIlSaIlEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  store i64 %195, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %196 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %197 unwind label %241

197:                                              ; preds = %192
  %198 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %196) #7
  %199 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %26, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  %200 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %201 unwind label %241

201:                                              ; preds = %197
  %202 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %200) #7
  %203 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %27, i32 0, i32 0
  store ptr %202, ptr %203, align 8
  %204 = load i64, ptr %13, align 8, !tbaa !5
  %205 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %204) #7
  %206 = getelementptr inbounds %struct.act, ptr %205, i32 0, i32 3
  %207 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %26, i32 0, i32 0
  %208 = load ptr, ptr %207, align 8
  %209 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %27, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8
  %211 = invoke ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEElET_S7_S7_RKT0_(ptr %208, ptr %210, ptr noundef nonnull align 8 dereferenceable(8) %206)
          to label %212 unwind label %241

212:                                              ; preds = %201
  %213 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %25, i32 0, i32 0
  store ptr %211, ptr %213, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %214 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %215 unwind label %245

215:                                              ; preds = %212
  %216 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %214) #7
  %217 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.13", ptr %28, i32 0, i32 0
  store ptr %216, ptr %217, align 8
  %218 = call noundef i64 @_ZN9__gnu_cxxmiIPlSt6vectorIlSaIlEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  store i64 %218, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  %219 = load i64, ptr %13, align 8, !tbaa !5
  %220 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %219) #7
  %221 = getelementptr inbounds %struct.act, ptr %220, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %222 = load i64, ptr %19, align 8, !tbaa !5
  %223 = load i64, ptr %24, align 8, !tbaa !5
  %224 = sub nsw i64 %222, %223
  store i64 %224, ptr %30, align 8, !tbaa !5
  %225 = invoke { i64, i64 } @_ZSt9make_pairIRllESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %221, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %226 unwind label %250

226:                                              ; preds = %215
  %227 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 0
  %228 = extractvalue { i64, i64 } %225, 0
  store i64 %228, ptr %227, align 8
  %229 = getelementptr inbounds { i64, i64 }, ptr %29, i32 0, i32 1
  %230 = extractvalue { i64, i64 } %225, 1
  store i64 %230, ptr %229, align 8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(16) %29)
          to label %231 unwind label %250

231:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %256

232:                                              ; preds = %178, %174, %168
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %5, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %6, align 4
  br label %240

236:                                              ; preds = %189
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %5, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %240

240:                                              ; preds = %236, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %255

241:                                              ; preds = %201, %197, %192
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %5, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %6, align 4
  br label %249

245:                                              ; preds = %212
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %5, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %249

249:                                              ; preds = %245, %241
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %254

250:                                              ; preds = %226, %215
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %5, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  br label %254

254:                                              ; preds = %250, %249
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %255

255:                                              ; preds = %254, %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %262

256:                                              ; preds = %231, %162
  br label %257

257:                                              ; preds = %256, %161
  br label %258

258:                                              ; preds = %257, %122
  br label %259

259:                                              ; preds = %258
  %260 = load i64, ptr %13, align 8, !tbaa !5
  %261 = add nsw i64 %260, 1
  store i64 %261, ptr %13, align 8, !tbaa !5
  br label %79, !llvm.loop !15

262:                                              ; preds = %255, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %298

263:                                              ; preds = %83
  %264 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %265 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %31, i32 0, i32 0
  store ptr %264, ptr %265, align 8
  %266 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %267 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %32, i32 0, i32 0
  store ptr %266, ptr %267, align 8
  %268 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %31, i32 0, i32 0
  %269 = load ptr, ptr %268, align 8
  %270 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.14", ptr %32, i32 0, i32 0
  %271 = load ptr, ptr %270, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %269, ptr %271)
          to label %272 unwind label %278

272:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  store i64 0, ptr %33, align 8, !tbaa !5
  br label %273

273:                                              ; preds = %289, %272
  %274 = load i64, ptr %33, align 8, !tbaa !5
  %275 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  %276 = icmp ult i64 %274, %275
  br i1 %276, label %282, label %277

277:                                              ; preds = %273
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %296

278:                                              ; preds = %263
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %5, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %6, align 4
  br label %298

282:                                              ; preds = %273
  %283 = load i64, ptr %33, align 8, !tbaa !5
  %284 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %283) #7
  %285 = getelementptr inbounds %"struct.std::pair", ptr %284, i32 0, i32 1
  %286 = load i64, ptr %285, align 8, !tbaa !16
  %287 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %286)
          to label %288 unwind label %292

288:                                              ; preds = %282
  br label %289

289:                                              ; preds = %288
  %290 = load i64, ptr %33, align 8, !tbaa !5
  %291 = add nsw i64 %290, 1
  store i64 %291, ptr %33, align 8, !tbaa !5
  br label %273, !llvm.loop !18

292:                                              ; preds = %282
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %5, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %298

296:                                              ; preds = %277
  store i32 0, ptr %1, align 4
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #7
  call void @_ZNSt6vectorI3actSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %297 = load i32, ptr %1, align 4
  ret i32 %297

298:                                              ; preds = %292, %278, %262
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #7
  br label %299

299:                                              ; preds = %298, %84, %65
  call void @_ZNSt6vectorI3actSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %300

300:                                              ; preds = %299, %42
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %301

301:                                              ; preds = %300
  %302 = load ptr, ptr %5, align 8
  %303 = load i32, ptr %6, align 4
  %304 = insertvalue { ptr, i32 } poison, ptr %302, 0
  %305 = insertvalue { ptr, i32 } %304, i32 %303, 1
  resume { ptr, i32 } %305
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI3actSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, 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) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3actSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr, ptr, ptr noundef) #5

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPlSt6vectorIlSaIlEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEElET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRllESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

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

declare i32 @printf(ptr noundef, ...) #3

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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 #6 = { 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 #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 = !{!10, !6, i64 24}
!10 = !{!"_ZTS3act", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 0}
!14 = !{!10, !6, i64 16}
!15 = distinct !{!15, !12}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!18 = distinct !{!18, !12}


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

%struct.act = type { i64, i64, i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl" }
%"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl" = type { %"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl_data" }
%"struct.std::_Vector_base<act, std::allocator<act>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long, std::pair<const long, std::vector<long>>, std::_Select1st<std::pair<const long, std::vector<long>>>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, std::pair<const long, std::vector<long>>, std::_Select1st<std::pair<const long, std::vector<long>>>, std::less<long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long, long>, std::allocator<std::pair<long, long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.13" = type { ptr }
%"struct.std::pair" = type { i64, i64 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5tcomp3actS_(ptr noundef byval(%struct.act) align 8, ptr noundef byval(%struct.act) align 8) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::map", align 8
  %5 = alloca %"class.std::map", align 8
  %6 = alloca %"class.std::vector.3", align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.13", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  %15 = load i64, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaI3actEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt6vectorI3actSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %15, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %16 unwind label %21

16:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorI3actED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %16
  %19 = call ptr @_ZNSt6vectorI3actSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %20 = call ptr @_ZNSt6vectorI3actSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3actSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr %19, ptr %20, ptr noundef nonnull @_Z5tcomp3actS_)
          to label %34 unwind label %41

21:                                               ; preds = %0
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI3actED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %157

.lr.ph:                                           ; preds = %16, %.lr.ph
  %.05164 = phi i64 [ %31, %.lr.ph ], [ 0, %16 ]
  %23 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05164) #7
  %24 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05164) #7
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05164) #7
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %23, ptr noundef nonnull %25, ptr noundef nonnull %27)
  %29 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05164) #7
  %30 = getelementptr inbounds i8, ptr %29, i64 24
  store i64 %.05164, ptr %30, align 8, !tbaa !9
  %31 = add nuw nsw i64 %.05164, 1
  %32 = load i64, ptr %1, align 8, !tbaa !5
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !11

34:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt6vectorISt4pairIllESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %35 = load i64, ptr %1, align 8, !tbaa !5
  %36 = icmp sgt i64 %35, 0
  br i1 %36, label %.lr.ph67, label %._crit_edge68

.lr.ph67:                                         ; preds = %34
  %37 = getelementptr inbounds i8, ptr %12, i64 8
  br label %43

._crit_edge68:                                    ; preds = %142, %34
  %38 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %39 = call ptr @_ZNSt6vectorISt4pairIllESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIllESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %38, ptr %39)
          to label %.preheader unwind label %146

.preheader:                                       ; preds = %._crit_edge68
  %40 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %.not = icmp eq i64 %40, 0
  br i1 %.not, label %._crit_edge71, label %.lr.ph70

41:                                               ; preds = %._crit_edge
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %156

43:                                               ; preds = %.lr.ph67, %142
  %.05265 = phi i64 [ 0, %.lr.ph67 ], [ %143, %142 ]
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %45 = load i64, ptr %44, align 8, !tbaa !13
  %46 = icmp eq i64 %45, 1
  %47 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  br i1 %46, label %48, label %65

48:                                               ; preds = %43
  %49 = getelementptr inbounds i8, ptr %47, i64 16
  %50 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %51 unwind label %63

51:                                               ; preds = %48
  %52 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %53 = getelementptr inbounds i8, ptr %52, i64 24
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(8) %53)
          to label %54 unwind label %63

54:                                               ; preds = %51
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %57 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %58 unwind label %63

58:                                               ; preds = %54
  %59 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #7
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %62 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %61)
          to label %.invoke unwind label %63

63:                                               ; preds = %.invoke, %79, %75, %72, %69, %58, %54, %51, %48
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %155

65:                                               ; preds = %43
  %66 = load i64, ptr %47, align 8, !tbaa !13
  %67 = icmp eq i64 %66, 2
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  br i1 %67, label %69, label %86

69:                                               ; preds = %65
  %70 = getelementptr inbounds i8, ptr %68, i64 16
  %71 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %70)
          to label %72 unwind label %63

72:                                               ; preds = %69
  %73 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %74 = getelementptr inbounds i8, ptr %73, i64 24
  invoke void @_ZNSt6vectorIlSaIlEE9push_backERKl(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(8) %74)
          to label %75 unwind label %63

75:                                               ; preds = %72
  %76 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %77 = getelementptr inbounds i8, ptr %76, i64 16
  %78 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %77)
          to label %79 unwind label %63

79:                                               ; preds = %75
  %80 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #7
  %81 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  %83 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %82)
          to label %.invoke unwind label %63

.invoke:                                          ; preds = %79, %58
  %.sink = phi ptr [ %62, %58 ], [ %83, %79 ]
  %84 = phi ptr [ %59, %58 ], [ %80, %79 ]
  %85 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %.sink) #7
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEEEvT_S7_(ptr %84, ptr %85)
          to label %142 unwind label %63

86:                                               ; preds = %65
  %87 = load i64, ptr %68, align 8, !tbaa !13
  %88 = icmp eq i64 %87, 3
  br i1 %88, label %89, label %142

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %90 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %91 = getelementptr inbounds i8, ptr %90, i64 16
  %92 = load i64, ptr %91, align 8, !tbaa !14
  store i64 %92, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %93 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %94 unwind label %129

94:                                               ; preds = %89
  %95 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %93) #7
  %96 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %97 unwind label %129

97:                                               ; preds = %94
  %98 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %96) #7
  %99 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %100 = getelementptr inbounds i8, ptr %99, i64 24
  %101 = invoke ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEElET_S7_S7_RKT0_(ptr %95, ptr %98, ptr noundef nonnull align 8 dereferenceable(8) %100)
          to label %102 unwind label %129

102:                                              ; preds = %97
  store ptr %101, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %103 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %104 unwind label %131

104:                                              ; preds = %102
  %105 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %103) #7
  store ptr %105, ptr %9, align 8
  %106 = call noundef i64 @_ZN9__gnu_cxxmiIPlSt6vectorIlSaIlEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %107 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %108 unwind label %134

108:                                              ; preds = %104
  %109 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %107) #7
  %110 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %111 unwind label %134

111:                                              ; preds = %108
  %112 = call ptr @_ZNSt6vectorIlSaIlEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #7
  %113 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %114 = getelementptr inbounds i8, ptr %113, i64 24
  %115 = invoke ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEElET_S7_S7_RKT0_(ptr %109, ptr %112, ptr noundef nonnull align 8 dereferenceable(8) %114)
          to label %116 unwind label %134

116:                                              ; preds = %111
  store ptr %115, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %117 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %118 unwind label %136

118:                                              ; preds = %116
  %119 = call ptr @_ZNSt6vectorIlSaIlEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %117) #7
  store ptr %119, ptr %11, align 8
  %120 = call noundef i64 @_ZN9__gnu_cxxmiIPlSt6vectorIlSaIlEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %121 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI3actSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05265) #7
  %122 = getelementptr inbounds i8, ptr %121, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %123 = sub nsw i64 %106, %120
  store i64 %123, ptr %13, align 8, !tbaa !5
  %124 = invoke { i64, i64 } @_ZSt9make_pairIRllESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %125 unwind label %139

125:                                              ; preds = %118
  %126 = extractvalue { i64, i64 } %124, 0
  store i64 %126, ptr %12, align 8
  %127 = extractvalue { i64, i64 } %124, 1
  store i64 %127, ptr %37, align 8
  invoke void @_ZNSt6vectorISt4pairIllESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %128 unwind label %139

128:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %142

129:                                              ; preds = %97, %94, %89
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %133

131:                                              ; preds = %102
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  br label %133

133:                                              ; preds = %131, %129
  %.pn = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %141

134:                                              ; preds = %111, %108, %104
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %138

136:                                              ; preds = %116
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %138

138:                                              ; preds = %136, %134
  %.pn54 = phi { ptr, i32 } [ %137, %136 ], [ %135, %134 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %141

139:                                              ; preds = %125, %118
  %140 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  br label %141

141:                                              ; preds = %138, %139, %133
  %.pn56.pn = phi { ptr, i32 } [ %.pn, %133 ], [ %140, %139 ], [ %.pn54, %138 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %155

142:                                              ; preds = %.invoke, %86, %128
  %143 = add nuw nsw i64 %.05265, 1
  %144 = load i64, ptr %1, align 8, !tbaa !5
  %145 = icmp slt i64 %143, %144
  br i1 %145, label %43, label %._crit_edge68, !llvm.loop !15

._crit_edge71:                                    ; preds = %.lr.ph70, %.preheader
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt6vectorI3actSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

146:                                              ; preds = %._crit_edge68
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %155

.lr.ph70:                                         ; preds = %.preheader, %.lr.ph70
  %.069 = phi i64 [ %152, %.lr.ph70 ], [ 0, %.preheader ]
  %148 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt4pairIllESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.069) #7
  %149 = getelementptr inbounds i8, ptr %148, i64 8
  %150 = load i64, ptr %149, align 8, !tbaa !16
  %151 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %150)
  %152 = add nuw nsw i64 %.069, 1
  %153 = call noundef i64 @_ZNKSt6vectorISt4pairIllESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %154 = icmp ult i64 %152, %153
  br i1 %154, label %.lr.ph70, label %._crit_edge71, !llvm.loop !18

155:                                              ; preds = %63, %141, %146
  %.pn59.pn = phi { ptr, i32 } [ %147, %146 ], [ %64, %63 ], [ %.pn56.pn, %141 ]
  call void @_ZNSt6vectorISt4pairIllESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #7
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  br label %156

156:                                              ; preds = %155, %41
  %.pn59.pn.pn = phi { ptr, i32 } [ %.pn59.pn, %155 ], [ %42, %41 ]
  call void @_ZNSt6vectorI3actSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  br label %157

157:                                              ; preds = %156, %21
  %.pn59.pn.pn.pn = phi { ptr, i32 } [ %.pn59.pn.pn, %156 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn59.pn.pn.pn
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI3actSaIS0_EEC2EmRKS1_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, 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) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIP3actSt6vectorIS2_SaIS2_EEEEPFbS2_S2_EEvT_SA_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #5

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

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9__gnu_cxxmiIPlSt6vectorIlSaIlEEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS8_SB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt11upper_boundIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlSaIlEEEElET_S7_S7_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZSt9make_pairIRllESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

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

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

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

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { 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 #6 = { 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 #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 = !{!10, !6, i64 24}
!10 = !{!"_ZTS3act", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!10, !6, i64 0}
!14 = !{!10, !6, i64 16}
!15 = distinct !{!15, !12}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTSSt4pairIllE", !6, i64 0, !6, i64 8}
!18 = distinct !{!18, !12}


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