; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/LONG/AUG15/STETSKLX/A.ll (Z3dfsii)

; 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<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@l = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@g = external dso_local global [100100 x %"class.std::vector"], align 16
@good = external dso_local global [100100 x [51 x i32]], align 16
@gp = external dso_local global [100100 x [51 x i32]], align 16
@inf = external dso_local global i32, align 4
@up = external dso_local global i32, align 4
@down = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@order = external dso_local global [100100 x i32], align 16
@e = external dso_local global i32, align 4
@parent = external dso_local global [100100 x i32], align 16
@flag = external dso_local global [100100 x i32], align 16
@tp1 = external dso_local global i32, align 4
@tp2 = external dso_local global i32, align 4
@m = external dso_local global [51 x i32], align 16
@ok = external dso_local global i8, align 1
@in = external dso_local global [1000 x %"struct.std::pair"], align 16
@out = external dso_local global [1000 x %"struct.std::pair"], align 16

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsii(i32 noundef %0, i32 noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::pair", align 4
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::pair", align 4
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca %"struct.std::pair", align 4
  %26 = alloca %"struct.std::pair", align 4
  %27 = alloca i32, align 4
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %29 = load i32, ptr @e, align 4, !tbaa !5
  %30 = sub nsw i32 %29, 1
  store i32 %30, ptr %5, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %473, %2
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = icmp sge i32 %32, 0
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %476

35:                                               ; preds = %31
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100100 x i32], ptr @order, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %39, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %54, %35
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = load i32, ptr @r, align 4, !tbaa !5
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %57

45:                                               ; preds = %40
  %46 = load i32, ptr @inf, align 4, !tbaa !5
  %47 = sub nsw i32 0, %46
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %49
  %51 = load i32, ptr %7, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [51 x i32], ptr %50, i64 0, i64 %52
  store i32 %47, ptr %53, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %45
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %7, align 4, !tbaa !5
  br label %40, !llvm.loop !9

57:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %59
  %61 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %60) #4
  %62 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %61, ptr %62, align 8
  br label %63

63:                                               ; preds = %150, %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %65
  %67 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %66) #4
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br i1 %69, label %71, label %70

70:                                               ; preds = %63
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %153

71:                                               ; preds = %63
  %72 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %73 = getelementptr inbounds %"struct.std::pair", ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !11
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100100 x i32], ptr @parent, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp eq i32 %74, %78
  br i1 %79, label %80, label %90

80:                                               ; preds = %71
  %81 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %82 = getelementptr inbounds %"struct.std::pair", ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 4, !tbaa !13
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  %86 = zext i1 %85 to i32
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100100 x i32], ptr @flag, i64 0, i64 %88
  store i32 %86, ptr %89, align 4, !tbaa !5
  br label %150

90:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %91 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %92 = getelementptr inbounds %"struct.std::pair", ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !13
  %94 = load i32, ptr %4, align 4, !tbaa !5
  %95 = icmp sle i32 %93, %94
  %96 = zext i1 %95 to i32
  store i32 %96, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %146, %90
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = load i32, ptr @r, align 4, !tbaa !5
  %100 = icmp sle i32 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %149

102:                                              ; preds = %97
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %104
  %106 = load i32, ptr %11, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [51 x i32], ptr %105, i64 0, i64 %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %109 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  %110 = getelementptr inbounds %"struct.std::pair", ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %112
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 1
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [51 x i32], ptr %113, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = add nsw i32 %118, %119
  store i32 %120, ptr %12, align 4, !tbaa !5
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %108, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %124
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [51 x i32], ptr %125, i64 0, i64 %127
  store i32 %122, ptr %128, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %130
  %132 = load i32, ptr %11, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [51 x i32], ptr %131, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = mul nsw i32 2, %135
  %137 = load i32, ptr %11, align 4, !tbaa !5
  %138 = sub nsw i32 %136, %137
  %139 = icmp sgt i32 %138, 0
  br i1 %139, label %140, label %145

140:                                              ; preds = %102
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = load i32, ptr @l, align 4, !tbaa !5
  %143 = icmp sge i32 %141, %142
  br i1 %143, label %144, label %145

144:                                              ; preds = %140
  store i8 1, ptr @ok, align 1, !tbaa !14
  br label %145

145:                                              ; preds = %144, %140, %102
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %11, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %11, align 4, !tbaa !5
  br label %97, !llvm.loop !16

149:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %150

150:                                              ; preds = %149, %80
  %151 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #4
  %152 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %151, ptr %152, align 8
  br label %63, !llvm.loop !17

153:                                              ; preds = %70
  %154 = load i32, ptr %3, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100100 x i32], ptr @parent, i64 0, i64 %155
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = icmp ne i32 %157, -1
  br i1 %158, label %159, label %192

159:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %188, %159
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = load i32, ptr @r, align 4, !tbaa !5
  %163 = icmp sle i32 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %191

165:                                              ; preds = %160
  %166 = load i32, ptr %3, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %167
  %169 = load i32, ptr %14, align 4, !tbaa !5
  %170 = sub nsw i32 %169, 1
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [51 x i32], ptr %168, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = load i32, ptr %3, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100100 x i32], ptr @flag, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = add nsw i32 %173, %177
  %179 = mul nsw i32 2, %178
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = sub nsw i32 %179, %180
  %182 = load i32, ptr %3, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %183
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [51 x i32], ptr %184, i64 0, i64 %186
  store i32 %181, ptr %187, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %165
  %189 = load i32, ptr %14, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %14, align 4, !tbaa !5
  br label %160, !llvm.loop !18

191:                                              ; preds = %164
  br label %192

192:                                              ; preds = %191, %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  %193 = load i32, ptr @inf, align 4, !tbaa !5
  %194 = sub nsw i32 0, %193
  store i32 %194, ptr @m, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %195 = load i32, ptr %3, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %196
  %198 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %197) #4
  %199 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %198, ptr %199, align 8
  br label %200

200:                                              ; preds = %469, %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %201 = load i32, ptr %3, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %202
  %204 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %203) #4
  %205 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %204, ptr %205, align 8
  %206 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br i1 %206, label %208, label %207

207:                                              ; preds = %200
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %472

208:                                              ; preds = %200
  %209 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %210 = getelementptr inbounds %"struct.std::pair", ptr %209, i32 0, i32 0
  %211 = load i32, ptr %210, align 4, !tbaa !11
  %212 = load i32, ptr %3, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [100100 x i32], ptr @parent, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = icmp eq i32 %211, %215
  br i1 %216, label %217, label %218

217:                                              ; preds = %208
  br label %469

218:                                              ; preds = %208
  %219 = load i32, ptr %15, align 4, !tbaa !5
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %221, label %244

221:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %240, %221
  %223 = load i32, ptr %18, align 4, !tbaa !5
  %224 = load i32, ptr @r, align 4, !tbaa !5
  %225 = icmp sle i32 %223, %224
  br i1 %225, label %227, label %226

226:                                              ; preds = %222
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %243

227:                                              ; preds = %222
  %228 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %229 = getelementptr inbounds %"struct.std::pair", ptr %228, i32 0, i32 0
  %230 = load i32, ptr %229, align 4, !tbaa !11
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %231
  %233 = load i32, ptr %18, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [51 x i32], ptr %232, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = load i32, ptr %18, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %238
  store i32 %236, ptr %239, align 4, !tbaa !5
  br label %240

240:                                              ; preds = %227
  %241 = load i32, ptr %18, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %18, align 4, !tbaa !5
  br label %222, !llvm.loop !19

243:                                              ; preds = %226
  br label %466

244:                                              ; preds = %218
  store i32 0, ptr @tp1, align 4, !tbaa !5
  store i32 0, ptr @tp2, align 4, !tbaa !5
  %245 = load i32, ptr @r, align 4, !tbaa !5
  store i32 %245, ptr @up, align 4, !tbaa !5
  %246 = load i32, ptr @l, align 4, !tbaa !5
  store i32 %246, ptr @down, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %247 = load i32, ptr @up, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %248
  %250 = load i32, ptr @up, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %251
  %253 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %249, ptr noundef nonnull align 4 dereferenceable(4) %252)
  store i64 %253, ptr %19, align 4
  %254 = load i32, ptr @tp1, align 4, !tbaa !5
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr @tp1, align 4, !tbaa !5
  %256 = sext i32 %254 to i64
  %257 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %256
  %258 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %257, ptr noundef nonnull align 4 dereferenceable(8) %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %259 = load i32, ptr @up, align 4, !tbaa !5
  %260 = sub nsw i32 %259, 1
  store i32 %260, ptr %20, align 4, !tbaa !5
  br label %261

261:                                              ; preds = %286, %244
  %262 = load i32, ptr %20, align 4, !tbaa !5
  %263 = load i32, ptr @down, align 4, !tbaa !5
  %264 = icmp sge i32 %262, %263
  br i1 %264, label %266, label %265

265:                                              ; preds = %261
  store i32 23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %289

266:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %267 = load i32, ptr %20, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %268
  %270 = load i32, ptr @tp1, align 4, !tbaa !5
  %271 = sub nsw i32 %270, 1
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %272
  %274 = getelementptr inbounds %"struct.std::pair", ptr %273, i32 0, i32 0
  %275 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %269, ptr noundef nonnull align 4 dereferenceable(4) %274)
  %276 = load i32, ptr %20, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %277
  %279 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %275, ptr noundef nonnull align 4 dereferenceable(4) %278)
  store i64 %279, ptr %21, align 4
  %280 = load i32, ptr @tp1, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %281
  %283 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %282, ptr noundef nonnull align 4 dereferenceable(8) %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  %284 = load i32, ptr @tp1, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr @tp1, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %266
  %287 = load i32, ptr %20, align 4, !tbaa !5
  %288 = add nsw i32 %287, -1
  store i32 %288, ptr %20, align 4, !tbaa !5
  br label %261, !llvm.loop !20

289:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  store i32 1, ptr %22, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %436, %289
  %291 = load i32, ptr %22, align 4, !tbaa !5
  %292 = load i32, ptr @r, align 4, !tbaa !5
  %293 = icmp sle i32 %291, %292
  br i1 %293, label %295, label %294

294:                                              ; preds = %290
  store i32 26, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %439

295:                                              ; preds = %290
  %296 = load i32, ptr @up, align 4, !tbaa !5
  %297 = add nsw i32 %296, -1
  store i32 %297, ptr @up, align 4, !tbaa !5
  %298 = load i32, ptr @down, align 4, !tbaa !5
  %299 = add nsw i32 %298, -1
  store i32 %299, ptr @down, align 4, !tbaa !5
  %300 = load i32, ptr @down, align 4, !tbaa !5
  %301 = icmp sge i32 %300, 0
  br i1 %301, label %302, label %339

302:                                              ; preds = %295
  %303 = load i32, ptr @tp1, align 4, !tbaa !5
  %304 = icmp eq i32 %303, 0
  br i1 %304, label %305, label %318

305:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %306 = load i32, ptr @down, align 4, !tbaa !5
  %307 = sext i32 %306 to i64
  %308 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %307
  %309 = load i32, ptr @down, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %310
  %312 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %308, ptr noundef nonnull align 4 dereferenceable(4) %311)
  store i64 %312, ptr %23, align 4
  %313 = load i32, ptr @tp1, align 4, !tbaa !5
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr @tp1, align 4, !tbaa !5
  %315 = sext i32 %313 to i64
  %316 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %315
  %317 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %316, ptr noundef nonnull align 4 dereferenceable(8) %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %338

318:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %319 = load i32, ptr @tp1, align 4, !tbaa !5
  %320 = sub nsw i32 %319, 1
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %321
  %323 = getelementptr inbounds %"struct.std::pair", ptr %322, i32 0, i32 0
  %324 = load i32, ptr @down, align 4, !tbaa !5
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %325
  %327 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %323, ptr noundef nonnull align 4 dereferenceable(4) %326)
  %328 = load i32, ptr @down, align 4, !tbaa !5
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %329
  %331 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %327, ptr noundef nonnull align 4 dereferenceable(4) %330)
  store i64 %331, ptr %24, align 4
  %332 = load i32, ptr @tp1, align 4, !tbaa !5
  %333 = sext i32 %332 to i64
  %334 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %333
  %335 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %334, ptr noundef nonnull align 4 dereferenceable(8) %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  %336 = load i32, ptr @tp1, align 4, !tbaa !5
  %337 = add nsw i32 %336, 1
  store i32 %337, ptr @tp1, align 4, !tbaa !5
  br label %338

338:                                              ; preds = %318, %305
  br label %339

339:                                              ; preds = %338, %295
  %340 = load i32, ptr @tp2, align 4, !tbaa !5
  %341 = icmp eq i32 %340, 0
  br i1 %341, label %342, label %391

342:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %343 = load i32, ptr @tp1, align 4, !tbaa !5
  %344 = sub nsw i32 %343, 1
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %345
  %347 = getelementptr inbounds %"struct.std::pair", ptr %346, i32 0, i32 1
  %348 = load i32, ptr @tp1, align 4, !tbaa !5
  %349 = sub nsw i32 %348, 1
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %350
  %352 = getelementptr inbounds %"struct.std::pair", ptr %351, i32 0, i32 1
  %353 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %347, ptr noundef nonnull align 4 dereferenceable(4) %352)
  store i64 %353, ptr %25, align 4
  %354 = load i32, ptr @tp2, align 4, !tbaa !5
  %355 = add nsw i32 %354, 1
  store i32 %355, ptr @tp2, align 4, !tbaa !5
  %356 = sext i32 %354 to i64
  %357 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %356
  %358 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %357, ptr noundef nonnull align 4 dereferenceable(8) %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  %359 = load i32, ptr @tp1, align 4, !tbaa !5
  %360 = add nsw i32 %359, -1
  store i32 %360, ptr @tp1, align 4, !tbaa !5
  br label %361

361:                                              ; preds = %364, %342
  %362 = load i32, ptr @tp1, align 4, !tbaa !5
  %363 = icmp sgt i32 %362, 0
  br i1 %363, label %364, label %390

364:                                              ; preds = %361
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %365 = load i32, ptr @tp2, align 4, !tbaa !5
  %366 = sub nsw i32 %365, 1
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %367
  %369 = getelementptr inbounds %"struct.std::pair", ptr %368, i32 0, i32 0
  %370 = load i32, ptr @tp1, align 4, !tbaa !5
  %371 = sub nsw i32 %370, 1
  %372 = sext i32 %371 to i64
  %373 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %372
  %374 = getelementptr inbounds %"struct.std::pair", ptr %373, i32 0, i32 1
  %375 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %369, ptr noundef nonnull align 4 dereferenceable(4) %374)
  %376 = load i32, ptr @tp1, align 4, !tbaa !5
  %377 = sub nsw i32 %376, 1
  %378 = sext i32 %377 to i64
  %379 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %378
  %380 = getelementptr inbounds %"struct.std::pair", ptr %379, i32 0, i32 1
  %381 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %375, ptr noundef nonnull align 4 dereferenceable(4) %380)
  store i64 %381, ptr %26, align 4
  %382 = load i32, ptr @tp2, align 4, !tbaa !5
  %383 = sext i32 %382 to i64
  %384 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %383
  %385 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %384, ptr noundef nonnull align 4 dereferenceable(8) %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  %386 = load i32, ptr @tp1, align 4, !tbaa !5
  %387 = add nsw i32 %386, -1
  store i32 %387, ptr @tp1, align 4, !tbaa !5
  %388 = load i32, ptr @tp2, align 4, !tbaa !5
  %389 = add nsw i32 %388, 1
  store i32 %389, ptr @tp2, align 4, !tbaa !5
  br label %361, !llvm.loop !21

390:                                              ; preds = %361
  br label %391

391:                                              ; preds = %390, %339
  %392 = load i32, ptr @tp2, align 4, !tbaa !5
  %393 = icmp sgt i32 %392, 0
  br i1 %393, label %394, label %397

394:                                              ; preds = %391
  %395 = load i32, ptr @tp2, align 4, !tbaa !5
  %396 = add nsw i32 %395, -1
  store i32 %396, ptr @tp2, align 4, !tbaa !5
  br label %397

397:                                              ; preds = %394, %391
  %398 = load i32, ptr @inf, align 4, !tbaa !5
  %399 = sub nsw i32 0, %398
  store i32 %399, ptr @mx, align 4, !tbaa !5
  %400 = load i32, ptr @tp1, align 4, !tbaa !5
  %401 = icmp sgt i32 %400, 0
  br i1 %401, label %402, label %410

402:                                              ; preds = %397
  %403 = load i32, ptr @tp1, align 4, !tbaa !5
  %404 = sub nsw i32 %403, 1
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %405
  %407 = getelementptr inbounds %"struct.std::pair", ptr %406, i32 0, i32 0
  %408 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %407)
  %409 = load i32, ptr %408, align 4, !tbaa !5
  store i32 %409, ptr @mx, align 4, !tbaa !5
  br label %410

410:                                              ; preds = %402, %397
  %411 = load i32, ptr @tp2, align 4, !tbaa !5
  %412 = icmp sgt i32 %411, 0
  br i1 %412, label %413, label %421

413:                                              ; preds = %410
  %414 = load i32, ptr @tp2, align 4, !tbaa !5
  %415 = sub nsw i32 %414, 1
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %416
  %418 = getelementptr inbounds %"struct.std::pair", ptr %417, i32 0, i32 0
  %419 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %418)
  %420 = load i32, ptr %419, align 4, !tbaa !5
  store i32 %420, ptr @mx, align 4, !tbaa !5
  br label %421

421:                                              ; preds = %413, %410
  %422 = load i32, ptr @mx, align 4, !tbaa !5
  %423 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %424 = getelementptr inbounds %"struct.std::pair", ptr %423, i32 0, i32 0
  %425 = load i32, ptr %424, align 4, !tbaa !11
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %426
  %428 = load i32, ptr %22, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [51 x i32], ptr %427, i64 0, i64 %429
  %431 = load i32, ptr %430, align 4, !tbaa !5
  %432 = add nsw i32 %422, %431
  %433 = icmp sgt i32 %432, 0
  br i1 %433, label %434, label %435

434:                                              ; preds = %421
  store i8 1, ptr @ok, align 1, !tbaa !14
  br label %435

435:                                              ; preds = %434, %421
  br label %436

436:                                              ; preds = %435
  %437 = load i32, ptr %22, align 4, !tbaa !5
  %438 = add nsw i32 %437, 1
  store i32 %438, ptr %22, align 4, !tbaa !5
  br label %290, !llvm.loop !22

439:                                              ; preds = %294
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  store i32 1, ptr %27, align 4, !tbaa !5
  br label %440

440:                                              ; preds = %462, %439
  %441 = load i32, ptr %27, align 4, !tbaa !5
  %442 = load i32, ptr @r, align 4, !tbaa !5
  %443 = icmp sle i32 %441, %442
  br i1 %443, label %445, label %444

444:                                              ; preds = %440
  store i32 31, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  br label %465

445:                                              ; preds = %440
  %446 = load i32, ptr %27, align 4, !tbaa !5
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %447
  %449 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %450 = getelementptr inbounds %"struct.std::pair", ptr %449, i32 0, i32 0
  %451 = load i32, ptr %450, align 4, !tbaa !11
  %452 = sext i32 %451 to i64
  %453 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %452
  %454 = load i32, ptr %27, align 4, !tbaa !5
  %455 = sext i32 %454 to i64
  %456 = getelementptr inbounds [51 x i32], ptr %453, i64 0, i64 %455
  %457 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %448, ptr noundef nonnull align 4 dereferenceable(4) %456)
  %458 = load i32, ptr %457, align 4, !tbaa !5
  %459 = load i32, ptr %27, align 4, !tbaa !5
  %460 = sext i32 %459 to i64
  %461 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %460
  store i32 %458, ptr %461, align 4, !tbaa !5
  br label %462

462:                                              ; preds = %445
  %463 = load i32, ptr %27, align 4, !tbaa !5
  %464 = add nsw i32 %463, 1
  store i32 %464, ptr %27, align 4, !tbaa !5
  br label %440, !llvm.loop !23

465:                                              ; preds = %444
  br label %466

466:                                              ; preds = %465, %243
  %467 = load i32, ptr %15, align 4, !tbaa !5
  %468 = add nsw i32 %467, 1
  store i32 %468, ptr %15, align 4, !tbaa !5
  br label %469

469:                                              ; preds = %466, %217
  %470 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %16, i32 noundef 0) #4
  %471 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %470, ptr %471, align 8
  br label %200, !llvm.loop !24

472:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %473

473:                                              ; preds = %472
  %474 = load i32, ptr %5, align 4, !tbaa !5
  %475 = add nsw i32 %474, -1
  store i32 %475, ptr %5, align 4, !tbaa !5
  br label %31, !llvm.loop !25

476:                                              ; preds = %34
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { nounwind }

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

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


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

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

@l = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local global [100100 x %"class.std::vector"], align 16
@good = external dso_local global [100100 x [51 x i32]], align 16
@gp = external dso_local global [100100 x [51 x i32]], align 16
@inf = external dso_local local_unnamed_addr global i32, align 4
@up = external dso_local local_unnamed_addr global i32, align 4
@down = external dso_local local_unnamed_addr global i32, align 4
@mx = external dso_local global i32, align 4
@order = external dso_local local_unnamed_addr global [100100 x i32], align 16
@e = external dso_local local_unnamed_addr global i32, align 4
@parent = external dso_local local_unnamed_addr global [100100 x i32], align 16
@flag = external dso_local local_unnamed_addr global [100100 x i32], align 16
@tp1 = external dso_local local_unnamed_addr global i32, align 4
@tp2 = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local global [51 x i32], align 16
@ok = external dso_local local_unnamed_addr global i8, align 1
@in = external dso_local global [1000 x %"struct.std::pair"], align 16
@out = external dso_local global [1000 x %"struct.std::pair"], align 16

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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 ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3dfsii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = load i32, ptr @e, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph115.preheader, label %._crit_edge116

.lr.ph115.preheader:                              ; preds = %2
  %16 = zext nneg i32 %14 to i64
  br label %.lr.ph115

._crit_edge116:                                   ; preds = %._crit_edge111, %2
  ret void

.lr.ph115:                                        ; preds = %.lr.ph115.preheader, %._crit_edge111
  %indvars.iv139 = phi i64 [ %16, %.lr.ph115.preheader ], [ %indvars.iv.next140, %._crit_edge111 ]
  %indvars.iv.next140 = add nsw i64 %indvars.iv139, -1
  %17 = getelementptr inbounds [100100 x i32], ptr @order, i64 0, i64 %indvars.iv.next140
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = load i32, ptr @r, align 4, !tbaa !5
  %.not81 = icmp slt i32 %19, 1
  br i1 %.not81, label %.lr.ph115.._crit_edge_crit_edge, label %.lr.ph

.lr.ph115.._crit_edge_crit_edge:                  ; preds = %.lr.ph115
  %.pre145 = sext i32 %18 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph115
  %20 = load i32, ptr @inf, align 4, !tbaa !5
  %21 = sub nsw i32 0, %20
  %22 = sext i32 %18 to i64
  %23 = add nuw i32 %19, 1
  %wide.trip.count = zext i32 %23 to i64
  %24 = zext nneg i32 %19 to i64
  %min.iters.check155 = icmp ult i32 %19, 8
  br i1 %min.iters.check155, label %scalar.ph154.preheader, label %vector.ph156

scalar.ph154.preheader:                           ; preds = %middle.block153, %.lr.ph
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph ], [ %ind.end159, %middle.block153 ]
  br label %scalar.ph154

vector.ph156:                                     ; preds = %.lr.ph
  %n.vec158 = and i64 %24, 2147483640
  %ind.end159 = or disjoint i64 %n.vec158, 1
  %broadcast.splatinsert164 = insertelement <4 x i32> poison, i32 %21, i64 0
  %broadcast.splat165 = shufflevector <4 x i32> %broadcast.splatinsert164, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body161

vector.body161:                                   ; preds = %vector.body161, %vector.ph156
  %index162 = phi i64 [ 0, %vector.ph156 ], [ %index.next166, %vector.body161 ]
  %offset.idx163 = or disjoint i64 %index162, 1
  %25 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %22, i64 %offset.idx163
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  store <4 x i32> %broadcast.splat165, ptr %25, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat165, ptr %26, align 4, !tbaa !5
  %index.next166 = add nuw i64 %index162, 8
  %27 = icmp eq i64 %index.next166, %n.vec158
  br i1 %27, label %middle.block153, label %vector.body161, !llvm.loop !9

middle.block153:                                  ; preds = %vector.body161
  %cmp.n167 = icmp eq i64 %n.vec158, %24
  br i1 %cmp.n167, label %._crit_edge, label %scalar.ph154.preheader

._crit_edge:                                      ; preds = %scalar.ph154, %middle.block153, %.lr.ph115.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre145, %.lr.ph115.._crit_edge_crit_edge ], [ %22, %middle.block153 ], [ %22, %scalar.ph154 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %28 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %.pre-phi
  %29 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  store ptr %29, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %30 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  store ptr %30, ptr %4, align 8
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br i1 %31, label %.lr.ph88, label %._crit_edge89

.lr.ph88:                                         ; preds = %._crit_edge
  %32 = getelementptr inbounds [100100 x i32], ptr @parent, i64 0, i64 %.pre-phi
  %33 = getelementptr inbounds [100100 x i32], ptr @flag, i64 0, i64 %.pre-phi
  br label %53

scalar.ph154:                                     ; preds = %scalar.ph154.preheader, %scalar.ph154
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph154 ], [ %indvars.iv.ph, %scalar.ph154.preheader ]
  %34 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %22, i64 %indvars.iv
  store i32 %21, ptr %34, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph154, !llvm.loop !13

._crit_edge89:                                    ; preds = %.loopexit78, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %35 = getelementptr inbounds [100100 x i32], ptr @parent, i64 0, i64 %.pre-phi
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not67 = icmp eq i32 %36, -1
  br i1 %.not67, label %.loopexit80, label %.preheader79

.preheader79:                                     ; preds = %._crit_edge89
  %37 = load i32, ptr @r, align 4, !tbaa !5
  %.not6890 = icmp slt i32 %37, 1
  br i1 %.not6890, label %.loopexit80, label %.lr.ph92

.lr.ph92:                                         ; preds = %.preheader79
  %38 = getelementptr inbounds [100100 x i32], ptr @flag, i64 0, i64 %.pre-phi
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nuw i32 %37, 1
  %wide.trip.count125 = zext i32 %40 to i64
  %41 = zext nneg i32 %37 to i64
  %min.iters.check = icmp ult i32 %37, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph92
  %indvars.iv122.ph = phi i64 [ 1, %.lr.ph92 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph92
  %n.vec = and i64 %41, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %39, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %42 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %.pre-phi, i64 %index
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load = load <4 x i32>, ptr %42, align 4, !tbaa !5
  %wide.load152 = load <4 x i32>, ptr %43, align 4, !tbaa !5
  %44 = add nsw <4 x i32> %broadcast.splat, %wide.load
  %45 = add nsw <4 x i32> %broadcast.splat, %wide.load152
  %46 = shl nsw <4 x i32> %44, <i32 1, i32 1, i32 1, i32 1>
  %47 = shl nsw <4 x i32> %45, <i32 1, i32 1, i32 1, i32 1>
  %48 = sub nsw <4 x i32> %46, %vec.ind
  %49 = sub nsw <4 x i32> %47, %step.add
  %50 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %.pre-phi, i64 %offset.idx
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  store <4 x i32> %48, ptr %50, align 4, !tbaa !5
  store <4 x i32> %49, ptr %51, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %52 = icmp eq i64 %index.next, %n.vec
  br i1 %52, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %41
  br i1 %cmp.n, label %.loopexit80, label %scalar.ph.preheader

53:                                               ; preds = %.lr.ph88, %.loopexit78
  %54 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %55 = load i32, ptr %54, align 4, !tbaa !15
  %56 = load i32, ptr %32, align 4, !tbaa !5
  %57 = icmp eq i32 %55, %56
  %58 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %59 = getelementptr inbounds i8, ptr %58, i64 4
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = icmp sle i32 %60, %1
  %62 = zext i1 %61 to i32
  br i1 %57, label %63, label %64

63:                                               ; preds = %53
  store i32 %62, ptr %33, align 4, !tbaa !5
  br label %.loopexit78

64:                                               ; preds = %53
  %65 = load i32, ptr @r, align 4, !tbaa !5
  %.not7383 = icmp slt i32 %65, 1
  br i1 %.not7383, label %.loopexit78, label %.lr.ph86

.lr.ph86:                                         ; preds = %64, %82
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %82 ], [ 1, %64 ]
  %66 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %.pre-phi, i64 %indvars.iv119
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %67 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %68 = load i32, ptr %67, align 4, !tbaa !15
  %69 = sext i32 %68 to i64
  %70 = add nsw i64 %indvars.iv119, -1
  %71 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %69, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, %62
  store i32 %73, ptr %5, align 4, !tbaa !5
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %66, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %75 = load i32, ptr %74, align 4, !tbaa !5
  store i32 %75, ptr %66, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %76 = shl nsw i32 %75, 1
  %77 = sext i32 %76 to i64
  %78 = icmp sge i64 %indvars.iv119, %77
  %79 = load i32, ptr @l, align 4
  %80 = sext i32 %79 to i64
  %.not74 = icmp slt i64 %indvars.iv119, %80
  %or.cond = select i1 %78, i1 true, i1 %.not74
  br i1 %or.cond, label %82, label %81

81:                                               ; preds = %.lr.ph86
  store i8 1, ptr @ok, align 1, !tbaa !18
  br label %82

82:                                               ; preds = %.lr.ph86, %81
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %83 = load i32, ptr @r, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %.not73.not = icmp slt i64 %indvars.iv119, %84
  br i1 %.not73.not, label %.lr.ph86, label %.loopexit78, !llvm.loop !20

.loopexit78:                                      ; preds = %82, %64, %63
  %85 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef 0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %86 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  store ptr %86, ptr %4, align 8
  %87 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br i1 %87, label %53, label %._crit_edge89, !llvm.loop !21

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %scalar.ph ], [ %indvars.iv122.ph, %scalar.ph.preheader ]
  %88 = add nsw i64 %indvars.iv122, -1
  %89 = getelementptr inbounds [100100 x [51 x i32]], ptr @good, i64 0, i64 %.pre-phi, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %39, %90
  %92 = shl nsw i32 %91, 1
  %93 = trunc nuw nsw i64 %indvars.iv122 to i32
  %94 = sub nsw i32 %92, %93
  %95 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %.pre-phi, i64 %indvars.iv122
  store i32 %94, ptr %95, align 4, !tbaa !5
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond126.not = icmp eq i64 %indvars.iv.next123, %wide.trip.count125
  br i1 %exitcond126.not, label %.loopexit80, label %scalar.ph, !llvm.loop !22

.loopexit80:                                      ; preds = %scalar.ph, %middle.block, %.preheader79, %._crit_edge89
  %96 = load i32, ptr @inf, align 4, !tbaa !5
  %97 = sub nsw i32 0, %96
  store i32 %97, ptr @m, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %98 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  store ptr %98, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %99 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  store ptr %99, ptr %7, align 8
  %100 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %100, label %.lr.ph110, label %._crit_edge111

._crit_edge111:                                   ; preds = %270, %.loopexit80
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %101 = icmp sgt i64 %indvars.iv139, 1
  br i1 %101, label %.lr.ph115, label %._crit_edge116, !llvm.loop !23

.lr.ph110:                                        ; preds = %.loopexit80, %270
  %.059108 = phi i32 [ %.1, %270 ], [ 0, %.loopexit80 ]
  %102 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %103 = load i32, ptr %102, align 4, !tbaa !15
  %104 = load i32, ptr %35, align 4, !tbaa !5
  %105 = icmp eq i32 %103, %104
  br i1 %105, label %270, label %106

106:                                              ; preds = %.lr.ph110
  %107 = icmp eq i32 %.059108, 0
  br i1 %107, label %.preheader, label %117

.preheader:                                       ; preds = %106
  %108 = load i32, ptr @r, align 4, !tbaa !5
  %.not72105 = icmp slt i32 %108, 1
  br i1 %.not72105, label %.loopexit, label %.lr.ph107

.lr.ph107:                                        ; preds = %.preheader, %.lr.ph107
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %.lr.ph107 ], [ 1, %.preheader ]
  %109 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %110 = load i32, ptr %109, align 4, !tbaa !15
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %111, i64 %indvars.iv136
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %indvars.iv136
  store i32 %113, ptr %114, align 4, !tbaa !5
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %115 = load i32, ptr @r, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %.not72.not = icmp slt i64 %indvars.iv136, %116
  br i1 %.not72.not, label %.lr.ph107, label %.loopexit, !llvm.loop !24

117:                                              ; preds = %106
  store i32 0, ptr @tp1, align 4, !tbaa !5
  store i32 0, ptr @tp2, align 4, !tbaa !5
  %118 = load i32, ptr @r, align 4, !tbaa !5
  store i32 %118, ptr @up, align 4, !tbaa !5
  %119 = load i32, ptr @l, align 4, !tbaa !5
  store i32 %119, ptr @down, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %120 = sext i32 %118 to i64
  %121 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %120
  %122 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %121, ptr noundef nonnull align 4 dereferenceable(4) %121)
  store i64 %122, ptr %8, align 8
  %123 = load i32, ptr @tp1, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr @tp1, align 4, !tbaa !5
  %125 = sext i32 %123 to i64
  %126 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %125
  %127 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %126, ptr noundef nonnull align 4 dereferenceable(8) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %128 = load i32, ptr @up, align 4, !tbaa !5
  %129 = load i32, ptr @down, align 4, !tbaa !5
  %.not69.not93 = icmp sgt i32 %128, %129
  br i1 %.not69.not93, label %.lr.ph96.preheader, label %.preheader77

.lr.ph96.preheader:                               ; preds = %117
  %130 = sext i32 %128 to i64
  %.pre = load i32, ptr @tp1, align 4, !tbaa !5
  br label %.lr.ph96

.preheader77:                                     ; preds = %.lr.ph96, %117
  %131 = load i32, ptr @r, align 4, !tbaa !5
  %.not7099 = icmp slt i32 %131, 1
  br i1 %.not7099, label %.loopexit, label %.lr.ph101

.lr.ph96:                                         ; preds = %.lr.ph96.preheader, %.lr.ph96
  %132 = phi i32 [ %.pre, %.lr.ph96.preheader ], [ %144, %.lr.ph96 ]
  %indvars.iv127 = phi i64 [ %130, %.lr.ph96.preheader ], [ %indvars.iv.next128, %.lr.ph96 ]
  %indvars.iv.next128 = add nsw i64 %indvars.iv127, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %133 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %indvars.iv.next128
  %134 = add nsw i32 %132, -1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %135
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %133, ptr noundef nonnull align 4 dereferenceable(4) %136)
  %138 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %137, ptr noundef nonnull align 4 dereferenceable(4) %133)
  store i64 %138, ptr %9, align 8
  %139 = load i32, ptr @tp1, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %140
  %142 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %141, ptr noundef nonnull align 4 dereferenceable(8) %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  %143 = load i32, ptr @tp1, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr @tp1, align 4, !tbaa !5
  %145 = load i32, ptr @down, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %.not69.not = icmp sgt i64 %indvars.iv.next128, %146
  br i1 %.not69.not, label %.lr.ph96, label %.preheader77, !llvm.loop !25

.preheader75:                                     ; preds = %257
  %.not71102 = icmp slt i32 %258, 1
  br i1 %.not71102, label %.loopexit, label %.lr.ph104

.lr.ph101:                                        ; preds = %.preheader77, %257
  %indvars.iv130 = phi i64 [ %indvars.iv.next131, %257 ], [ 1, %.preheader77 ]
  %147 = load i32, ptr @up, align 4, !tbaa !5
  %148 = add nsw i32 %147, -1
  store i32 %148, ptr @up, align 4, !tbaa !5
  %149 = load i32, ptr @down, align 4, !tbaa !5
  %150 = add nsw i32 %149, -1
  store i32 %150, ptr @down, align 4, !tbaa !5
  %151 = icmp sgt i32 %149, 0
  br i1 %151, label %152, label %181

152:                                              ; preds = %.lr.ph101
  %153 = load i32, ptr @tp1, align 4, !tbaa !5
  %154 = icmp eq i32 %153, 0
  br i1 %154, label %155, label %164

155:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %156 = zext nneg i32 %150 to i64
  %157 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %156
  %158 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %157, ptr noundef nonnull align 4 dereferenceable(4) %157)
  store i64 %158, ptr %10, align 8
  %159 = load i32, ptr @tp1, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr @tp1, align 4, !tbaa !5
  %161 = sext i32 %159 to i64
  %162 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %161
  %163 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %162, ptr noundef nonnull align 4 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %181

164:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %165 = add nsw i32 %153, -1
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %166
  %168 = zext nneg i32 %150 to i64
  %169 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %168
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %167, ptr noundef nonnull align 4 dereferenceable(4) %169)
  %171 = load i32, ptr @down, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %172
  %174 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %170, ptr noundef nonnull align 4 dereferenceable(4) %173)
  store i64 %174, ptr %11, align 8
  %175 = load i32, ptr @tp1, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %176
  %178 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %177, ptr noundef nonnull align 4 dereferenceable(8) %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  %179 = load i32, ptr @tp1, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr @tp1, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %155, %164, %.lr.ph101
  %182 = load i32, ptr @tp2, align 4, !tbaa !5
  %183 = icmp eq i32 %182, 0
  br i1 %183, label %184, label %thread-pre-split

184:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %185 = load i32, ptr @tp1, align 4, !tbaa !5
  %186 = add nsw i32 %185, -1
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %187, i32 1
  %189 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %188, ptr noundef nonnull align 4 dereferenceable(4) %188)
  store i64 %189, ptr %12, align 8
  %190 = load i32, ptr @tp2, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr @tp2, align 4, !tbaa !5
  %192 = sext i32 %190 to i64
  %193 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %192
  %194 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %193, ptr noundef nonnull align 4 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %195 = load i32, ptr @tp1, align 4, !tbaa !5
  %196 = add nsw i32 %195, -1
  store i32 %196, ptr @tp1, align 4, !tbaa !5
  %197 = icmp sgt i32 %195, 1
  %.pr.pre = load i32, ptr @tp2, align 4, !tbaa !5
  br i1 %197, label %.lr.ph98, label %thread-pre-split

.lr.ph98:                                         ; preds = %184, %.lr.ph98
  %198 = phi i32 [ %219, %.lr.ph98 ], [ %.pr.pre, %184 ]
  %199 = phi i32 [ %217, %.lr.ph98 ], [ %196, %184 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %200 = add nsw i32 %198, -1
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %201
  %203 = add nsw i32 %199, -1
  %204 = zext nneg i32 %203 to i64
  %205 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %204, i32 1
  %206 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %202, ptr noundef nonnull align 4 dereferenceable(4) %205)
  %207 = load i32, ptr @tp1, align 4, !tbaa !5
  %208 = add nsw i32 %207, -1
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %209, i32 1
  %211 = call i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4) %206, ptr noundef nonnull align 4 dereferenceable(4) %210)
  store i64 %211, ptr %13, align 8
  %212 = load i32, ptr @tp2, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %213
  %215 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %214, ptr noundef nonnull align 4 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  %216 = load i32, ptr @tp1, align 4, !tbaa !5
  %217 = add nsw i32 %216, -1
  store i32 %217, ptr @tp1, align 4, !tbaa !5
  %218 = load i32, ptr @tp2, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr @tp2, align 4, !tbaa !5
  %220 = icmp sgt i32 %216, 1
  br i1 %220, label %.lr.ph98, label %thread-pre-split, !llvm.loop !26

thread-pre-split:                                 ; preds = %.lr.ph98, %184, %181
  %221 = phi i32 [ %182, %181 ], [ %.pr.pre, %184 ], [ %219, %.lr.ph98 ]
  %222 = icmp sgt i32 %221, 0
  br i1 %222, label %223, label %225

223:                                              ; preds = %thread-pre-split
  %224 = add nsw i32 %221, -1
  store i32 %224, ptr @tp2, align 4, !tbaa !5
  br label %225

225:                                              ; preds = %223, %thread-pre-split
  %226 = phi i32 [ %224, %223 ], [ %221, %thread-pre-split ]
  %227 = load i32, ptr @inf, align 4, !tbaa !5
  %228 = sub nsw i32 0, %227
  store i32 %228, ptr @mx, align 4, !tbaa !5
  %229 = load i32, ptr @tp1, align 4, !tbaa !5
  %230 = icmp sgt i32 %229, 0
  br i1 %230, label %231, label %237

231:                                              ; preds = %225
  %232 = add nsw i32 %229, -1
  %233 = zext nneg i32 %232 to i64
  %234 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @in, i64 0, i64 %233
  %235 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %234)
  %236 = load i32, ptr %235, align 4, !tbaa !5
  store i32 %236, ptr @mx, align 4, !tbaa !5
  %.pre144 = load i32, ptr @tp2, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %231, %225
  %238 = phi i32 [ %236, %231 ], [ %228, %225 ]
  %239 = phi i32 [ %.pre144, %231 ], [ %226, %225 ]
  %240 = icmp sgt i32 %239, 0
  br i1 %240, label %241, label %247

241:                                              ; preds = %237
  %242 = add nsw i32 %239, -1
  %243 = zext nneg i32 %242 to i64
  %244 = getelementptr inbounds [1000 x %"struct.std::pair"], ptr @out, i64 0, i64 %243
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @mx, ptr noundef nonnull align 4 dereferenceable(4) %244)
  %246 = load i32, ptr %245, align 4, !tbaa !5
  store i32 %246, ptr @mx, align 4, !tbaa !5
  br label %247

247:                                              ; preds = %241, %237
  %248 = phi i32 [ %246, %241 ], [ %238, %237 ]
  %249 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %250 = load i32, ptr %249, align 4, !tbaa !15
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %251, i64 %indvars.iv130
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = add nsw i32 %253, %248
  %255 = icmp sgt i32 %254, 0
  br i1 %255, label %256, label %257

256:                                              ; preds = %247
  store i8 1, ptr @ok, align 1, !tbaa !18
  br label %257

257:                                              ; preds = %247, %256
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %258 = load i32, ptr @r, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %.not70.not = icmp slt i64 %indvars.iv130, %259
  br i1 %.not70.not, label %.lr.ph101, label %.preheader75, !llvm.loop !27

.lr.ph104:                                        ; preds = %.preheader75, %.lr.ph104
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %.lr.ph104 ], [ 1, %.preheader75 ]
  %260 = getelementptr inbounds [51 x i32], ptr @m, i64 0, i64 %indvars.iv133
  %261 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %262 = load i32, ptr %261, align 4, !tbaa !15
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [100100 x [51 x i32]], ptr @gp, i64 0, i64 %263, i64 %indvars.iv133
  %265 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %260, ptr noundef nonnull align 4 dereferenceable(4) %264)
  %266 = load i32, ptr %265, align 4, !tbaa !5
  store i32 %266, ptr %260, align 4, !tbaa !5
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %267 = load i32, ptr @r, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %.not71.not = icmp slt i64 %indvars.iv133, %268
  br i1 %.not71.not, label %.lr.ph104, label %.loopexit, !llvm.loop !28

.loopexit:                                        ; preds = %.lr.ph104, %.lr.ph107, %.preheader77, %.preheader75, %.preheader
  %269 = add nsw i32 %.059108, 1
  br label %270

270:                                              ; preds = %.lr.ph110, %.loopexit
  %.1 = phi i32 [ %.059108, %.lr.ph110 ], [ %269, %.loopexit ]
  %271 = call ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %272 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #4
  store ptr %272, ptr %7, align 8
  %273 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %273, label %.lr.ph110, label %._crit_edge111, !llvm.loop !29
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRKiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS4_INS5_IT0_E4typeEE6__typeEEOS6_OSB_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass