; LLVM IR from tangjz/acm-icpc :: lydsy (1400)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ex0 = external dso_local global i32, align 4
@ex1 = external dso_local global i32, align 4
@upp = external dso_local global i64, align 8
@pre = external dso_local global [21 x [101 x %"class.std::vector"]], align 16
@suf = external dso_local global [21 x [101 x %"class.std::vector"]], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@stderr = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z9findSplitiii(i32 noundef, i32 noundef, i32 noundef) #0

; 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 uwtable
declare dso_local void @_Z6updatePA101_St6vectorISt4pairIyyESaIS1_EEi(ptr noundef, i32 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z5poweriiy(i32 noundef, i32 noundef, i64 noundef) #3

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 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) #4

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, 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 i64, align 8
  store i32 0, ptr %1, align 4
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @ex0, ptr noundef @ex1, ptr noundef @m, ptr noundef @upp)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %25 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %25, ptr %2, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %46, %0
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %43

29:                                               ; preds = %26
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = load i32, ptr @ex0, align 4, !tbaa !5
  %32 = load i64, ptr @upp, align 8, !tbaa !9
  %33 = call noundef i64 @_Z5poweriiy(i32 noundef %30, i32 noundef %31, i64 noundef %32)
  %34 = load i64, ptr @upp, align 8, !tbaa !9
  %35 = icmp ugt i64 %33, %34
  br i1 %35, label %41, label %36

36:                                               ; preds = %29
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr @ex1, align 4, !tbaa !5
  %39 = call noundef i64 @_Z5poweriiy(i32 noundef %37, i32 noundef %38, i64 noundef 9223372036854775807)
  %40 = icmp ugt i64 %39, 9223372036854775807
  br label %41

41:                                               ; preds = %36, %29
  %42 = phi i1 [ true, %29 ], [ %40, %36 ]
  br label %43

43:                                               ; preds = %41, %26
  %44 = phi i1 [ false, %26 ], [ %42, %41 ]
  br i1 %44, label %45, label %49

45:                                               ; preds = %43
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr %2, align 4, !tbaa !5
  br label %26, !llvm.loop !11

49:                                               ; preds = %43
  %50 = load i32, ptr @n, align 4, !tbaa !5
  %51 = load i32, ptr @m, align 4, !tbaa !5
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = call noundef i32 @_Z9findSplitiii(i32 noundef %50, i32 noundef %51, i32 noundef %52)
  store i32 %53, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  store i64 0, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store i64 0, ptr %5, align 8, !tbaa !9
  %54 = call { i64, i64 } @_ZSt9make_pairIyyESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %55 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 0
  %56 = extractvalue { i64, i64 } %54, 0
  store i64 %56, ptr %55, align 8
  %57 = getelementptr inbounds { i64, i64 }, ptr %3, i32 0, i32 1
  %58 = extractvalue { i64, i64 } %54, 1
  store i64 %58, ptr %57, align 8
  call void @_ZNSt6vectorISt4pairIyyESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @pre, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store i64 0, ptr %8, align 8, !tbaa !9
  %59 = call { i64, i64 } @_ZSt9make_pairIyyESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %60 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %61 = extractvalue { i64, i64 } %59, 0
  store i64 %61, ptr %60, align 8
  %62 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %63 = extractvalue { i64, i64 } %59, 1
  store i64 %63, ptr %62, align 8
  call void @_ZNSt6vectorISt4pairIyyESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @suf, ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %71, %49
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %74

69:                                               ; preds = %64
  %70 = load i32, ptr %9, align 4, !tbaa !5
  call void @_Z6updatePA101_St6vectorISt4pairIyyESaIS1_EEi(ptr noundef @pre, i32 noundef %70)
  br label %71

71:                                               ; preds = %69
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %9, align 4, !tbaa !5
  br label %64, !llvm.loop !13

74:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %75 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %75, ptr %10, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %83, %74
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = icmp sgt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %86

81:                                               ; preds = %76
  %82 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z6updatePA101_St6vectorISt4pairIyyESaIS1_EEi(ptr noundef @suf, i32 noundef %82)
  br label %83

83:                                               ; preds = %81
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = add nsw i32 %84, -1
  store i32 %85, ptr %10, align 4, !tbaa !5
  br label %76, !llvm.loop !14

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

87:                                               ; preds = %216, %86
  %88 = load i32, ptr %12, align 4, !tbaa !5
  %89 = load i32, ptr @n, align 4, !tbaa !5
  %90 = icmp sle i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %219

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

93:                                               ; preds = %212, %92
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = load i32, ptr %14, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = icmp sle i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %93
  store i32 14, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %215

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

101:                                              ; preds = %208, %100
  %102 = load i32, ptr %15, align 4, !tbaa !5
  %103 = load i32, ptr @m, align 4, !tbaa !5
  %104 = icmp sle i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %211

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %107 = load i32, ptr %12, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [21 x [101 x %"class.std::vector"]], ptr @pre, i64 0, i64 %108
  %110 = load i32, ptr %15, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [101 x %"class.std::vector"], ptr %109, i64 0, i64 %111
  store ptr %112, ptr %16, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %113 = load i32, ptr %14, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [21 x [101 x %"class.std::vector"]], ptr @suf, i64 0, i64 %114
  %116 = load i32, ptr @m, align 4, !tbaa !5
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = sub nsw i32 %116, %117
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [101 x %"class.std::vector"], ptr %115, i64 0, i64 %119
  store ptr %120, ptr %17, align 8, !tbaa !15
  %121 = load ptr, ptr %16, align 8, !tbaa !15
  %122 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIyyESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %121) #8
  br i1 %122, label %126, label %123

123:                                              ; preds = %106
  %124 = load ptr, ptr %17, align 8, !tbaa !15
  %125 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIyyESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %124) #8
  br i1 %125, label %126, label %127

126:                                              ; preds = %123, %106
  store i32 19, ptr %13, align 4
  br label %205

127:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %128 = load ptr, ptr %16, align 8, !tbaa !15
  %129 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %128) #8
  %130 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %129, ptr %130, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %131 = load ptr, ptr %17, align 8, !tbaa !15
  %132 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %131) #8
  %133 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %132, ptr %133, align 8
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %134, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %135

135:                                              ; preds = %202, %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %136 = load ptr, ptr %16, align 8, !tbaa !15
  %137 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %136) #8
  %138 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %137, ptr %138, align 8
  %139 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIyyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br i1 %139, label %140, label %204

140:                                              ; preds = %135
  br label %141

141:                                              ; preds = %159, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %142 = load ptr, ptr %17, align 8, !tbaa !15
  %143 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %142) #8
  %144 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %143, ptr %144, align 8
  %145 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIyyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  br i1 %145, label %146, label %156

146:                                              ; preds = %141
  %147 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %148 = getelementptr inbounds %"struct.std::pair", ptr %147, i32 0, i32 0
  %149 = load i64, ptr %148, align 8, !tbaa !18
  %150 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %151 = getelementptr inbounds %"struct.std::pair", ptr %150, i32 0, i32 0
  %152 = load i64, ptr %151, align 8, !tbaa !18
  %153 = add i64 %149, %152
  %154 = load i64, ptr @upp, align 8, !tbaa !9
  %155 = icmp ugt i64 %153, %154
  br label %156

156:                                              ; preds = %146, %141
  %157 = phi i1 [ false, %141 ], [ %155, %146 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br i1 %157, label %158, label %161

158:                                              ; preds = %156
  br label %159

159:                                              ; preds = %158
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  br label %141, !llvm.loop !20

161:                                              ; preds = %156
  %162 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %163 = getelementptr inbounds %"struct.std::pair", ptr %162, i32 0, i32 0
  %164 = load i64, ptr %163, align 8, !tbaa !18
  %165 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %166 = getelementptr inbounds %"struct.std::pair", ptr %165, i32 0, i32 0
  %167 = load i64, ptr %166, align 8, !tbaa !18
  %168 = add i64 %164, %167
  %169 = load i64, ptr @upp, align 8, !tbaa !9
  %170 = icmp ugt i64 %168, %169
  br i1 %170, label %171, label %172

171:                                              ; preds = %161
  br label %204

172:                                              ; preds = %161
  %173 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %174 = getelementptr inbounds %"struct.std::pair", ptr %173, i32 0, i32 0
  %175 = load i64, ptr %174, align 8, !tbaa !18
  %176 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %177 = getelementptr inbounds %"struct.std::pair", ptr %176, i32 0, i32 0
  %178 = load i64, ptr %177, align 8, !tbaa !18
  %179 = add i64 %175, %178
  %180 = load i64, ptr @upp, align 8, !tbaa !9
  %181 = icmp eq i64 %179, %180
  br i1 %181, label %182, label %201

182:                                              ; preds = %172
  %183 = load ptr, ptr @stderr, align 8, !tbaa !15
  %184 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %185 = getelementptr inbounds %"struct.std::pair", ptr %184, i32 0, i32 1
  %186 = load i64, ptr %185, align 8, !tbaa !21
  %187 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %188 = getelementptr inbounds %"struct.std::pair", ptr %187, i32 0, i32 1
  %189 = load i64, ptr %188, align 8, !tbaa !21
  %190 = add i64 %186, %189
  %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef @.str.4, i64 noundef %190) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %192 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %193 = getelementptr inbounds %"struct.std::pair", ptr %192, i32 0, i32 1
  %194 = load i64, ptr %193, align 8, !tbaa !21
  %195 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #8
  %196 = getelementptr inbounds %"struct.std::pair", ptr %195, i32 0, i32 1
  %197 = load i64, ptr %196, align 8, !tbaa !21
  %198 = add i64 %194, %197
  store i64 %198, ptr %23, align 8, !tbaa !9
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIyERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %200 = load i64, ptr %199, align 8, !tbaa !9
  store i64 %200, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %201

201:                                              ; preds = %182, %172
  br label %202

202:                                              ; preds = %201
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br label %135, !llvm.loop !22

204:                                              ; preds = %171, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  store i32 0, ptr %13, align 4
  br label %205

205:                                              ; preds = %204, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %206 = load i32, ptr %13, align 4
  switch i32 %206, label %223 [
    i32 0, label %207
    i32 19, label %208
  ]

207:                                              ; preds = %205
  br label %208

208:                                              ; preds = %207, %205
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %15, align 4, !tbaa !5
  br label %101, !llvm.loop !23

211:                                              ; preds = %105
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %14, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %14, align 4, !tbaa !5
  br label %93, !llvm.loop !24

215:                                              ; preds = %99
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %12, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %12, align 4, !tbaa !5
  br label %87, !llvm.loop !25

219:                                              ; preds = %91
  %220 = load i64, ptr %11, align 8, !tbaa !9
  %221 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i64 noundef %220)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %222 = load i32, ptr %1, align 4
  ret i32 %222

223:                                              ; preds = %205
  unreachable
}

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

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

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

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

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

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

!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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{i64 0, i64 8, !15}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTSSt4pairIyyE", !10, i64 0, !10, i64 8}
!20 = distinct !{!20, !12}
!21 = !{!19, !10, i64 8}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !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"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned long long, unsigned long long>, std::allocator<std::pair<unsigned long long, unsigned long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ex0 = external dso_local global i32, align 4
@ex1 = external dso_local global i32, align 4
@upp = external dso_local global i64, align 8
@pre = external dso_local global [21 x [101 x %"class.std::vector"]], align 16
@suf = external dso_local global [21 x [101 x %"class.std::vector"]], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z9findSplitiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; 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 uwtable
declare dso_local void @_Z6updatePA101_St6vectorISt4pairIyyESaIS1_EEi(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z5poweriiy(i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %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.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca i64, align 8
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @ex0, ptr noundef nonnull @ex1, ptr noundef nonnull @m, ptr noundef nonnull @upp)
  %15 = load i32, ptr @m, align 4, !tbaa !5
  %.not47 = icmp eq i32 %15, 0
  br i1 %.not47, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %.pre80 = load i64, ptr @upp, align 8, !tbaa !9
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.critedge2
  %16 = phi i64 [ %25, %.critedge2 ], [ %.pre80, %.lr.ph.preheader ]
  %.048 = phi i32 [ %26, %.critedge2 ], [ %15, %.lr.ph.preheader ]
  %17 = load i32, ptr @ex0, align 4, !tbaa !5
  %18 = tail call noundef i64 @_Z5poweriiy(i32 noundef %.048, i32 noundef %17, i64 noundef %16)
  %19 = load i64, ptr @upp, align 8, !tbaa !9
  %20 = icmp ugt i64 %18, %19
  br i1 %20, label %.critedge2, label %21

21:                                               ; preds = %.lr.ph
  %22 = load i32, ptr @ex1, align 4, !tbaa !5
  %23 = tail call noundef i64 @_Z5poweriiy(i32 noundef %.048, i32 noundef %22, i64 noundef 9223372036854775807)
  %24 = icmp slt i64 %23, 0
  %.pre = load i64, ptr @upp, align 8, !tbaa !9
  br i1 %24, label %.critedge2, label %.critedge.loopexit

.critedge2:                                       ; preds = %.lr.ph, %21
  %25 = phi i64 [ %19, %.lr.ph ], [ %.pre, %21 ]
  %26 = add nsw i32 %.048, -1
  %.not = icmp eq i32 %26, 0
  br i1 %.not, label %.critedge.loopexit, label %.lr.ph, !llvm.loop !11

.critedge.loopexit:                               ; preds = %.critedge2, %21
  %.0.lcssa.ph = phi i32 [ %.048, %21 ], [ 0, %.critedge2 ]
  %.pre81 = load i32, ptr @m, align 4, !tbaa !5
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %0
  %27 = phi i32 [ 0, %0 ], [ %.pre81, %.critedge.loopexit ]
  %.0.lcssa = phi i32 [ 0, %0 ], [ %.0.lcssa.ph, %.critedge.loopexit ]
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = tail call noundef i32 @_Z9findSplitiii(i32 noundef %28, i32 noundef %27, i32 noundef %.0.lcssa)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  store i64 0, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 0, ptr %3, align 8, !tbaa !9
  %30 = call { i64, i64 } @_ZSt9make_pairIyyESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %31 = extractvalue { i64, i64 } %30, 0
  store i64 %31, ptr %1, align 8
  %32 = getelementptr inbounds i8, ptr %1, i64 8
  %33 = extractvalue { i64, i64 } %30, 1
  store i64 %33, ptr %32, align 8
  call void @_ZNSt6vectorISt4pairIyyESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @pre, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 0, ptr %6, align 8, !tbaa !9
  %34 = call { i64, i64 } @_ZSt9make_pairIyyESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %35 = extractvalue { i64, i64 } %34, 0
  store i64 %35, ptr %4, align 8
  %36 = getelementptr inbounds i8, ptr %4, i64 8
  %37 = extractvalue { i64, i64 } %34, 1
  store i64 %37, ptr %36, align 8
  call void @_ZNSt6vectorISt4pairIyyESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @suf, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  %.not4151 = icmp slt i32 %29, 1
  br i1 %.not4151, label %._crit_edge, label %.lr.ph53

._crit_edge:                                      ; preds = %.lr.ph53, %.critedge
  %38 = load i32, ptr @m, align 4, !tbaa !5
  %39 = icmp sgt i32 %38, %29
  br i1 %39, label %.lr.ph56, label %._crit_edge57

.lr.ph53:                                         ; preds = %.critedge, %.lr.ph53
  %.03852 = phi i32 [ %40, %.lr.ph53 ], [ 1, %.critedge ]
  call void @_Z6updatePA101_St6vectorISt4pairIyyESaIS1_EEi(ptr noundef nonnull @pre, i32 noundef %.03852)
  %40 = add nuw i32 %.03852, 1
  %exitcond.not = icmp eq i32 %.03852, %29
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph53, !llvm.loop !13

._crit_edge57:                                    ; preds = %.lr.ph56, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store i64 -9223372036854775808, ptr %7, align 8, !tbaa !9
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %.not4268 = icmp slt i32 %41, 0
  br i1 %.not4268, label %._crit_edge71, label %.preheader46

.lr.ph56:                                         ; preds = %._crit_edge, %.lr.ph56
  %.03754 = phi i32 [ %42, %.lr.ph56 ], [ %38, %._crit_edge ]
  call void @_Z6updatePA101_St6vectorISt4pairIyyESaIS1_EEi(ptr noundef nonnull @suf, i32 noundef %.03754)
  %42 = add nsw i32 %.03754, -1
  %43 = icmp sgt i32 %42, %29
  br i1 %43, label %.lr.ph56, label %._crit_edge57, !llvm.loop !14

.preheader46:                                     ; preds = %._crit_edge57, %._crit_edge67
  %44 = phi i32 [ %53, %._crit_edge67 ], [ %41, %._crit_edge57 ]
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %._crit_edge67 ], [ 0, %._crit_edge57 ]
  %45 = sext i32 %44 to i64
  %.not4365 = icmp sgt i64 %indvars.iv77, %45
  %46 = load i32, ptr @m, align 4
  %47 = icmp slt i32 %46, 0
  %or.cond = select i1 %.not4365, i1 true, i1 %47
  br i1 %or.cond, label %._crit_edge67, label %.preheader45

._crit_edge71.loopexit:                           ; preds = %._crit_edge67
  %.pre83 = load i64, ptr %7, align 8, !tbaa !9
  br label %._crit_edge71

._crit_edge71:                                    ; preds = %._crit_edge71.loopexit, %._crit_edge57
  %48 = phi i64 [ %.pre83, %._crit_edge71.loopexit ], [ -9223372036854775808, %._crit_edge57 ]
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %48)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  ret i32 0

.preheader45:                                     ; preds = %.preheader46, %._crit_edge64
  %50 = phi i32 [ %54, %._crit_edge64 ], [ %44, %.preheader46 ]
  %51 = phi i32 [ %55, %._crit_edge64 ], [ %44, %.preheader46 ]
  %52 = phi i32 [ %56, %._crit_edge64 ], [ %46, %.preheader46 ]
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %._crit_edge64 ], [ 0, %.preheader46 ]
  %.not4461 = icmp slt i32 %52, 0
  br i1 %.not4461, label %._crit_edge64, label %.lr.ph63

._crit_edge67.loopexit72:                         ; preds = %._crit_edge64
  %.pre84 = sext i32 %54 to i64
  br label %._crit_edge67

._crit_edge67:                                    ; preds = %._crit_edge67.loopexit72, %.preheader46
  %.pre-phi = phi i64 [ %.pre84, %._crit_edge67.loopexit72 ], [ %45, %.preheader46 ]
  %53 = phi i32 [ %54, %._crit_edge67.loopexit72 ], [ %44, %.preheader46 ]
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %.not42.not = icmp slt i64 %indvars.iv77, %.pre-phi
  br i1 %.not42.not, label %.preheader46, label %._crit_edge71.loopexit, !llvm.loop !15

._crit_edge64.loopexit:                           ; preds = %126
  %.pre82 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge64

._crit_edge64:                                    ; preds = %._crit_edge64.loopexit, %.preheader45
  %54 = phi i32 [ %.pre82, %._crit_edge64.loopexit ], [ %50, %.preheader45 ]
  %55 = phi i32 [ %.pre82, %._crit_edge64.loopexit ], [ %51, %.preheader45 ]
  %56 = phi i32 [ %127, %._crit_edge64.loopexit ], [ %52, %.preheader45 ]
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %57 = add nuw nsw i64 %indvars.iv.next75, %indvars.iv77
  %58 = trunc nuw i64 %57 to i32
  %.not43 = icmp slt i32 %55, %58
  br i1 %.not43, label %._crit_edge67.loopexit72, label %.preheader45, !llvm.loop !16

.lr.ph63:                                         ; preds = %.preheader45, %126
  %indvars.iv = phi i64 [ %indvars.iv.next, %126 ], [ 0, %.preheader45 ]
  %59 = phi i32 [ %127, %126 ], [ %52, %.preheader45 ]
  %60 = getelementptr inbounds [21 x [101 x %"class.std::vector"]], ptr @pre, i64 0, i64 %indvars.iv77, i64 %indvars.iv
  %61 = trunc nuw nsw i64 %indvars.iv to i32
  %62 = sub nsw i32 %59, %61
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [21 x [101 x %"class.std::vector"]], ptr @suf, i64 0, i64 %indvars.iv74, i64 %63
  %65 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIyyESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %60) #6
  br i1 %65, label %126, label %66

66:                                               ; preds = %.lr.ph63
  %67 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIyyESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #6
  br i1 %67, label %126, label %68

68:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %69 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %60) #6
  store ptr %69, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %70 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #6
  store ptr %70, ptr %10, align 8
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  %72 = load i64, ptr %71, align 8, !tbaa !18
  store i64 %72, ptr %9, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %73 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %60) #6
  store ptr %73, ptr %11, align 8
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIyyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br i1 %74, label %.preheader, label %._crit_edge59

.preheader:                                       ; preds = %68, %122
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %75 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #6
  store ptr %75, ptr %12, align 8
  %76 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIyyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br i1 %76, label %.lr.ph58, label %.critedge4

.lr.ph58:                                         ; preds = %.preheader, %84
  %77 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %78 = load i64, ptr %77, align 8, !tbaa !20
  %79 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %80 = load i64, ptr %79, align 8, !tbaa !20
  %81 = add i64 %80, %78
  %82 = load i64, ptr @upp, align 8, !tbaa !9
  %83 = icmp ugt i64 %81, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br i1 %83, label %84, label %.loopexit

84:                                               ; preds = %.lr.ph58
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEmmEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %86 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #6
  store ptr %86, ptr %12, align 8
  %87 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIyyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br i1 %87, label %.lr.ph58, label %.critedge4, !llvm.loop !22

.critedge4:                                       ; preds = %84, %.preheader
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph58, %.critedge4
  %88 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %89 = load i64, ptr %88, align 8, !tbaa !20
  %90 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %91 = load i64, ptr %90, align 8, !tbaa !20
  %92 = add i64 %91, %89
  %93 = load i64, ptr @upp, align 8, !tbaa !9
  %94 = icmp ugt i64 %92, %93
  br i1 %94, label %._crit_edge59, label %95

95:                                               ; preds = %.loopexit
  %96 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %97 = load i64, ptr %96, align 8, !tbaa !20
  %98 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %99 = load i64, ptr %98, align 8, !tbaa !20
  %100 = add i64 %99, %97
  %101 = load i64, ptr @upp, align 8, !tbaa !9
  %102 = icmp eq i64 %100, %101
  br i1 %102, label %103, label %122

103:                                              ; preds = %95
  %104 = load ptr, ptr @stderr, align 8, !tbaa !18
  %105 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %106 = getelementptr inbounds i8, ptr %105, i64 8
  %107 = load i64, ptr %106, align 8, !tbaa !23
  %108 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %109 = getelementptr inbounds i8, ptr %108, i64 8
  %110 = load i64, ptr %109, align 8, !tbaa !23
  %111 = add i64 %110, %107
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef nonnull @.str.4, i64 noundef %111) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %113 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  %114 = getelementptr inbounds i8, ptr %113, i64 8
  %115 = load i64, ptr %114, align 8, !tbaa !23
  %116 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %117 = getelementptr inbounds i8, ptr %116, i64 8
  %118 = load i64, ptr %117, align 8, !tbaa !23
  %119 = add i64 %118, %115
  store i64 %119, ptr %13, align 8, !tbaa !9
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIyERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %121 = load i64, ptr %120, align 8, !tbaa !9
  store i64 %121, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %122

122:                                              ; preds = %95, %103
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIyyESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %124 = call ptr @_ZNSt6vectorISt4pairIyyESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %60) #6
  store ptr %124, ptr %11, align 8
  %125 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIyyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br i1 %125, label %.preheader, label %._crit_edge59, !llvm.loop !24

._crit_edge59:                                    ; preds = %122, %.loopexit, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br label %126

126:                                              ; preds = %.lr.ph63, %66, %._crit_edge59
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %127 = load i32, ptr @m, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %.not44.not = icmp slt i64 %indvars.iv, %128
  br i1 %.not44.not, label %.lr.ph63, label %._crit_edge64.loopexit, !llvm.loop !25
}

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

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

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

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

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

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

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

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


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