; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Codesprints 2016/Codesprint April/Problem F/F.ll (Z10preprocessv)

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

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

@least = external dso_local global [5001 x i32], align 16
@combination = external dso_local global [5001 x %"struct.std::pair.0"], align 16
@dp = external dso_local global [5001 x [2 x i32]], align 16
@best = external dso_local global [5001 x [2 x %"class.std::vector"]], align 16
@id = external dso_local global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10preprocessv() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %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 i32, align 4
  %9 = alloca %"struct.std::pair.0", align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca { i64, i32 }, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  store i32 1, ptr %1, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %26, %0
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 5001
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  br label %29

22:                                               ; preds = %18
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %24
  store i32 1000000000, ptr %25, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %22
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %1, align 4, !tbaa !5
  br label %18, !llvm.loop !9

29:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %43, %29
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 5001
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %46

34:                                               ; preds = %30
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %36
  %38 = getelementptr inbounds [2 x i32], ptr %37, i64 0, i64 1
  store i32 1000000000, ptr %38, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %40
  %42 = getelementptr inbounds [2 x i32], ptr %41, i64 0, i64 0
  store i32 1000000000, ptr %42, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %34
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %2, align 4, !tbaa !5
  br label %30, !llvm.loop !11

46:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %112, %46
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = icmp slt i32 %48, 101
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %115

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

52:                                               ; preds = %108, %51
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = add nsw i32 %53, %54
  %56 = icmp slt i32 %55, 101
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %111

58:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %104, %58
  %60 = load i32, ptr %3, align 4, !tbaa !5
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = add nsw i32 %60, %61
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = add nsw i32 %62, %63
  %65 = icmp slt i32 %64, 101
  br i1 %65, label %67, label %66

66:                                               ; preds = %59
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %107

67:                                               ; preds = %59
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = mul nsw i32 %68, %69
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = mul nsw i32 %70, %71
  %73 = icmp slt i32 %72, 5001
  br i1 %73, label %74, label %103

74:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = mul nsw i32 %75, %76
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = mul nsw i32 %77, %78
  store i32 %79, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %80 = load i32, ptr %3, align 4, !tbaa !5
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = add nsw i32 %80, %81
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = add nsw i32 %82, %83
  store i32 %84, ptr %8, align 4, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = icmp slt i32 %85, %89
  br i1 %90, label %91, label %102

91:                                               ; preds = %74
  %92 = load i32, ptr %8, align 4, !tbaa !5
  %93 = load i32, ptr %7, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %94
  store i32 %92, ptr %95, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %96 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %96, ptr %10, align 4
  %97 = call { i64, i32 } @_ZSt9make_pairIRiSt4pairIiiEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store { i64, i32 } %97, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 8 %11, i64 12, i1 false)
  %98 = load i32, ptr %7, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @combination, i64 0, i64 %99
  %101 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt4pairIiS_IiiEEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %100, ptr noundef nonnull align 4 dereferenceable(12) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #5
  br label %102

102:                                              ; preds = %91, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %103

103:                                              ; preds = %102, %67
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %6, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %6, align 4, !tbaa !5
  br label %59, !llvm.loop !12

107:                                              ; preds = %66
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %5, align 4, !tbaa !5
  br label %52, !llvm.loop !13

111:                                              ; preds = %57
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %3, align 4, !tbaa !5
  br label %47, !llvm.loop !14

115:                                              ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %150, %115
  %117 = load i32, ptr %12, align 4, !tbaa !5
  %118 = icmp slt i32 %117, 5001
  br i1 %118, label %120, label %119

119:                                              ; preds = %116
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %153

120:                                              ; preds = %116
  %121 = load i32, ptr %12, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %126
  %128 = load i32, ptr @id, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [2 x i32], ptr %127, i64 0, i64 %129
  store i32 %124, ptr %130, align 4, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %132
  %134 = load i32, ptr @id, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [2 x i32], ptr %133, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp ne i32 %137, 1000000000
  br i1 %138, label %139, label %149

139:                                              ; preds = %120
  %140 = load i32, ptr %12, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %141
  %143 = load i32, ptr @id, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [2 x %"class.std::vector"], ptr %142, i64 0, i64 %144
  %146 = load i32, ptr %12, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @combination, i64 0, i64 %147
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %145, ptr noundef nonnull align 4 dereferenceable(12) %148)
  br label %149

149:                                              ; preds = %139, %120
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %12, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %12, align 4, !tbaa !5
  br label %116, !llvm.loop !15

153:                                              ; preds = %119
  %154 = load i32, ptr @id, align 4, !tbaa !5
  %155 = xor i32 %154, 1
  store i32 %155, ptr @id, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %189, %153
  %157 = load i32, ptr %13, align 4, !tbaa !5
  %158 = icmp slt i32 %157, 5001
  br i1 %158, label %160, label %159

159:                                              ; preds = %156
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %192

160:                                              ; preds = %156
  %161 = load i32, ptr %13, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %162
  %164 = load i32, ptr @id, align 4, !tbaa !5
  %165 = sub nsw i32 1, %164
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [2 x i32], ptr %163, i64 0, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !5
  %169 = load i32, ptr %13, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %170
  %172 = load i32, ptr @id, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [2 x i32], ptr %171, i64 0, i64 %173
  store i32 %168, ptr %174, align 4, !tbaa !5
  %175 = load i32, ptr %13, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %176
  %178 = load i32, ptr @id, align 4, !tbaa !5
  %179 = sub nsw i32 1, %178
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [2 x %"class.std::vector"], ptr %177, i64 0, i64 %180
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %183
  %185 = load i32, ptr @id, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [2 x %"class.std::vector"], ptr %184, i64 0, i64 %186
  %188 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %187, ptr noundef nonnull align 8 dereferenceable(24) %181)
  br label %189

189:                                              ; preds = %160
  %190 = load i32, ptr %13, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %13, align 4, !tbaa !5
  br label %156, !llvm.loop !16

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

193:                                              ; preds = %308, %192
  %194 = load i32, ptr %14, align 4, !tbaa !5
  %195 = icmp slt i32 %194, 5001
  br i1 %195, label %197, label %196

196:                                              ; preds = %193
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %311

197:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %304, %197
  %199 = load i32, ptr %14, align 4, !tbaa !5
  %200 = load i32, ptr %15, align 4, !tbaa !5
  %201 = add nsw i32 %199, %200
  %202 = icmp slt i32 %201, 5001
  br i1 %202, label %204, label %203

203:                                              ; preds = %198
  store i32 26, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %307

204:                                              ; preds = %198
  %205 = load i32, ptr %14, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = load i32, ptr %15, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %210
  %212 = load i32, ptr @id, align 4, !tbaa !5
  %213 = sub nsw i32 1, %212
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [2 x i32], ptr %211, i64 0, i64 %214
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = add nsw i32 %208, %216
  %218 = load i32, ptr %14, align 4, !tbaa !5
  %219 = load i32, ptr %15, align 4, !tbaa !5
  %220 = add nsw i32 %218, %219
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %221
  %223 = load i32, ptr @id, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [2 x i32], ptr %222, i64 0, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = icmp slt i32 %217, %226
  br i1 %227, label %228, label %303

228:                                              ; preds = %204
  %229 = load i32, ptr %14, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = load i32, ptr %15, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %234
  %236 = load i32, ptr @id, align 4, !tbaa !5
  %237 = sub nsw i32 1, %236
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [2 x i32], ptr %235, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = add nsw i32 %232, %240
  %242 = load i32, ptr %14, align 4, !tbaa !5
  %243 = load i32, ptr %15, align 4, !tbaa !5
  %244 = add nsw i32 %242, %243
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %245
  %247 = load i32, ptr @id, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [2 x i32], ptr %246, i64 0, i64 %248
  store i32 %241, ptr %249, align 4, !tbaa !5
  %250 = load i32, ptr %14, align 4, !tbaa !5
  %251 = load i32, ptr %15, align 4, !tbaa !5
  %252 = add nsw i32 %250, %251
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %253
  %255 = load i32, ptr @id, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [2 x %"class.std::vector"], ptr %254, i64 0, i64 %256
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %257) #5
  %258 = load i32, ptr %14, align 4, !tbaa !5
  %259 = load i32, ptr %15, align 4, !tbaa !5
  %260 = add nsw i32 %258, %259
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %261
  %263 = load i32, ptr @id, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [2 x %"class.std::vector"], ptr %262, i64 0, i64 %264
  %266 = load i32, ptr %14, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @combination, i64 0, i64 %267
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %265, ptr noundef nonnull align 4 dereferenceable(12) %268)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %269 = load i32, ptr %15, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %270
  %272 = load i32, ptr @id, align 4, !tbaa !5
  %273 = sub nsw i32 1, %272
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [2 x %"class.std::vector"], ptr %271, i64 0, i64 %274
  %276 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %275) #5
  %277 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %276, ptr %277, align 8
  br label %278

278:                                              ; preds = %300, %228
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %279 = load i32, ptr %15, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %280
  %282 = load i32, ptr @id, align 4, !tbaa !5
  %283 = sub nsw i32 1, %282
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [2 x %"class.std::vector"], ptr %281, i64 0, i64 %284
  %286 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %285) #5
  %287 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %286, ptr %287, align 8
  %288 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br i1 %288, label %290, label %289

289:                                              ; preds = %278
  store i32 29, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %302

290:                                              ; preds = %278
  %291 = load i32, ptr %14, align 4, !tbaa !5
  %292 = load i32, ptr %15, align 4, !tbaa !5
  %293 = add nsw i32 %291, %292
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %294
  %296 = load i32, ptr @id, align 4, !tbaa !5
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [2 x %"class.std::vector"], ptr %295, i64 0, i64 %297
  %299 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %298, ptr noundef nonnull align 4 dereferenceable(12) %299)
  br label %300

300:                                              ; preds = %290
  %301 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  br label %278, !llvm.loop !17

302:                                              ; preds = %289
  br label %303

303:                                              ; preds = %302, %204
  br label %304

304:                                              ; preds = %303
  %305 = load i32, ptr %15, align 4, !tbaa !5
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %15, align 4, !tbaa !5
  br label %198, !llvm.loop !18

307:                                              ; preds = %203
  br label %308

308:                                              ; preds = %307
  %309 = load i32, ptr %14, align 4, !tbaa !5
  %310 = add nsw i32 %309, 1
  store i32 %310, ptr %14, align 4, !tbaa !5
  br label %193, !llvm.loop !19

311:                                              ; preds = %196
  ret void
}

; 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 { i64, i32 } @_ZSt9make_pairIRiSt4pairIiiEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8)) #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

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


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

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

@least = external dso_local local_unnamed_addr global [5001 x i32], align 16
@combination = external dso_local global [5001 x %"struct.std::pair.0"], align 16
@dp = external dso_local local_unnamed_addr global [5001 x [2 x i32]], align 16
@best = external dso_local global [5001 x [2 x %"class.std::vector"]], align 16
@id = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10preprocessv() local_unnamed_addr #0 {
vector.ph:
  %0 = alloca i32, align 4
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair.0", align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next.4, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %7 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %offset.idx
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %7, align 4, !tbaa !5
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %8, align 4, !tbaa !5
  %offset.idx.1 = add nuw nsw i64 %index, 9
  %9 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %offset.idx.1
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %9, align 4, !tbaa !5
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %10, align 4, !tbaa !5
  %offset.idx.2 = add nuw nsw i64 %index, 17
  %11 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %offset.idx.2
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %11, align 4, !tbaa !5
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %12, align 4, !tbaa !5
  %offset.idx.3 = add nuw nsw i64 %index, 25
  %13 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %offset.idx.3
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %13, align 4, !tbaa !5
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %14, align 4, !tbaa !5
  %offset.idx.4 = add nuw nsw i64 %index, 33
  %15 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %offset.idx.4
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %15, align 4, !tbaa !5
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %16, align 4, !tbaa !5
  %index.next.4 = add nuw nsw i64 %index, 40
  %17 = icmp eq i64 %index.next.4, 5000
  br i1 %17, label %vector.body129, label %vector.body, !llvm.loop !9

vector.body129:                                   ; preds = %vector.body, %vector.body129
  %index130 = phi i64 [ %index.next132.1, %vector.body129 ], [ 0, %vector.body ]
  %offset.idx131 = or disjoint i64 %index130, 1
  %18 = or disjoint i64 %index130, 3
  %19 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %offset.idx131
  %20 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %18
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %19, align 8, !tbaa !5
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %20, align 8, !tbaa !5
  %offset.idx131.1 = or disjoint i64 %index130, 5
  %21 = or disjoint i64 %index130, 7
  %22 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %offset.idx131.1
  %23 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %21
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %22, align 8, !tbaa !5
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %23, align 8, !tbaa !5
  %index.next132.1 = add nuw nsw i64 %index130, 8
  %24 = icmp eq i64 %index.next132.1, 5000
  br i1 %24, label %middle.block125, label %vector.body129, !llvm.loop !13

middle.block125:                                  ; preds = %vector.body129
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #4
  store i32 1, ptr %0, align 4, !tbaa !5
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  br label %25

.loopexit:                                        ; preds = %._crit_edge66, %._crit_edge66.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #4
  %.pre115 = load i32, ptr @id, align 4, !tbaa !5
  br label %67

25:                                               ; preds = %middle.block125, %._crit_edge66
  %26 = phi i32 [ 1, %middle.block125 ], [ %28, %._crit_edge66 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 1, ptr %1, align 4, !tbaa !5
  %27 = icmp slt i32 %26, 100
  br i1 %27, label %.lr.ph65, label %._crit_edge66.thread

._crit_edge66.thread:                             ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  br label %.loopexit

._crit_edge66:                                    ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %28 = add nsw i32 %35, 1
  store i32 %28, ptr %0, align 4, !tbaa !5
  %29 = icmp slt i32 %35, 100
  br i1 %29, label %25, label %.loopexit, !llvm.loop !14

.lr.ph65:                                         ; preds = %25, %._crit_edge
  %30 = phi i32 [ %35, %._crit_edge ], [ %26, %25 ]
  %31 = phi i32 [ %36, %._crit_edge ], [ 1, %25 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  %32 = add i32 %30, 1
  %33 = add i32 %32, %31
  %34 = icmp slt i32 %33, 101
  br i1 %34, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %56, %.lr.ph65
  %35 = phi i32 [ %30, %.lr.ph65 ], [ %57, %56 ]
  %.lcssa = phi i32 [ %31, %.lr.ph65 ], [ %58, %56 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %36 = add nsw i32 %.lcssa, 1
  store i32 %36, ptr %1, align 4, !tbaa !5
  %37 = add nsw i32 %35, %36
  %38 = icmp slt i32 %37, 101
  br i1 %38, label %.lr.ph65, label %._crit_edge66, !llvm.loop !15

.lr.ph:                                           ; preds = %.lr.ph65, %56
  %39 = phi i32 [ %57, %56 ], [ %30, %.lr.ph65 ]
  %40 = phi i32 [ %58, %56 ], [ %31, %.lr.ph65 ]
  %41 = phi i32 [ %59, %56 ], [ %30, %.lr.ph65 ]
  %42 = phi i32 [ %63, %56 ], [ %33, %.lr.ph65 ]
  %storemerge5763 = phi i32 [ %61, %56 ], [ 1, %.lr.ph65 ]
  %43 = mul i32 %41, %storemerge5763
  %44 = mul i32 %43, %40
  %45 = icmp slt i32 %44, 5001
  br i1 %45, label %46, label %56

46:                                               ; preds = %.lr.ph
  %47 = sext i32 %44 to i64
  %48 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = icmp slt i32 %42, %49
  br i1 %50, label %51, label %56

51:                                               ; preds = %46
  store i32 %42, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %52 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %52, ptr %4, align 8
  %53 = call { i64, i32 } @_ZSt9make_pairIRiSt4pairIiiEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %.fca.0.extract = extractvalue { i64, i32 } %53, 0
  %.fca.1.extract = extractvalue { i64, i32 } %53, 1
  store i64 %.fca.0.extract, ptr %3, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %54 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @combination, i64 0, i64 %47
  %55 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt4pairIiS_IiiEEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #4
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  %.pre112 = load i32, ptr %0, align 4, !tbaa !5
  %.pre113 = load i32, ptr %1, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %46, %51, %.lr.ph
  %57 = phi i32 [ %39, %46 ], [ %.pre112, %51 ], [ %39, %.lr.ph ]
  %58 = phi i32 [ %40, %46 ], [ %.pre113, %51 ], [ %40, %.lr.ph ]
  %59 = phi i32 [ %41, %46 ], [ %.pre112, %51 ], [ %41, %.lr.ph ]
  %60 = phi i32 [ %storemerge5763, %46 ], [ %.pre, %51 ], [ %storemerge5763, %.lr.ph ]
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %2, align 4, !tbaa !5
  %62 = add i32 %59, %61
  %63 = add i32 %62, %58
  %64 = icmp slt i32 %63, 101
  br i1 %64, label %.lr.ph, label %._crit_edge, !llvm.loop !16

65:                                               ; preds = %76
  %66 = xor i32 %77, 1
  store i32 %66, ptr @id, align 4, !tbaa !5
  br label %78

67:                                               ; preds = %.loopexit, %76
  %68 = phi i32 [ %.pre115, %.loopexit ], [ %77, %76 ]
  %indvars.iv84 = phi i64 [ 1, %.loopexit ], [ %indvars.iv.next85, %76 ]
  %69 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %indvars.iv84
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = sext i32 %68 to i64
  %72 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %indvars.iv84, i64 %71
  store i32 %70, ptr %72, align 4, !tbaa !5
  %.not = icmp eq i32 %70, 1000000000
  br i1 %.not, label %76, label %73

73:                                               ; preds = %67
  %74 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv84, i64 %71
  %75 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @combination, i64 0, i64 %indvars.iv84
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef nonnull align 4 dereferenceable(12) %75)
  %.pre114 = load i32, ptr @id, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %67, %73
  %77 = phi i32 [ %68, %67 ], [ %.pre114, %73 ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next85, 5001
  br i1 %exitcond87.not, label %65, label %67, !llvm.loop !17

78:                                               ; preds = %65, %78
  %indvars.iv88 = phi i64 [ 1, %65 ], [ %indvars.iv.next89, %78 ]
  %79 = load i32, ptr @id, align 4, !tbaa !5
  %80 = sub nsw i32 1, %79
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %indvars.iv88, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sext i32 %79 to i64
  %85 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %indvars.iv88, i64 %84
  store i32 %83, ptr %85, align 4, !tbaa !5
  %86 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv88, i64 %81
  %87 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv88, i64 %84
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef nonnull align 8 dereferenceable(24) %86)
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond91.not = icmp eq i64 %indvars.iv.next89, 5001
  br i1 %exitcond91.not, label %.preheader, label %78, !llvm.loop !18

.preheader:                                       ; preds = %78, %._crit_edge75
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %._crit_edge75 ], [ 1, %78 ]
  %indvars.iv104 = phi i64 [ %indvars.iv.next105, %._crit_edge75 ], [ 5000, %78 ]
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %._crit_edge75 ], [ 2, %78 ]
  %89 = icmp ult i64 %indvars.iv106, 5000
  br i1 %89, label %.lr.ph74, label %._crit_edge75

.lr.ph74:                                         ; preds = %.preheader
  %90 = getelementptr inbounds [5001 x i32], ptr @least, i64 0, i64 %indvars.iv106
  %91 = getelementptr inbounds [5001 x %"struct.std::pair.0"], ptr @combination, i64 0, i64 %indvars.iv106
  br label %93

92:                                               ; preds = %._crit_edge75
  ret void

._crit_edge75:                                    ; preds = %132, %.preheader
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %indvars.iv.next105 = add nsw i64 %indvars.iv104, -1
  %exitcond111.not = icmp eq i64 %indvars.iv.next107, 5001
  br i1 %exitcond111.not, label %92, label %.preheader, !llvm.loop !19

93:                                               ; preds = %.lr.ph74, %132
  %indvars.iv96 = phi i64 [ 1, %.lr.ph74 ], [ %indvars.iv.next97, %132 ]
  %indvars.iv94 = phi i64 [ %indvars.iv92, %.lr.ph74 ], [ %indvars.iv.next95, %132 ]
  %94 = load i32, ptr %90, align 4, !tbaa !5
  %95 = load i32, ptr @id, align 4, !tbaa !5
  %96 = sub nsw i32 1, %95
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %indvars.iv96, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = add nsw i32 %99, %94
  %101 = sext i32 %95 to i64
  %102 = getelementptr inbounds [5001 x [2 x i32]], ptr @dp, i64 0, i64 %indvars.iv94, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = icmp slt i32 %100, %103
  br i1 %104, label %105, label %132

105:                                              ; preds = %93
  store i32 %100, ptr %102, align 4, !tbaa !5
  %106 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv94, i64 %101
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #4
  %107 = load i32, ptr @id, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv94, i64 %108
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %109, ptr noundef nonnull align 4 dereferenceable(12) %91)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %110 = load i32, ptr @id, align 4, !tbaa !5
  %111 = sub nsw i32 1, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv96, i64 %112
  %114 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #4
  store ptr %114, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %115 = load i32, ptr @id, align 4, !tbaa !5
  %116 = sub nsw i32 1, %115
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv96, i64 %117
  %119 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %118) #4
  store ptr %119, ptr %6, align 8
  %120 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %120, label %.lr.ph71, label %._crit_edge72

._crit_edge72:                                    ; preds = %.lr.ph71, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %132

.lr.ph71:                                         ; preds = %105, %.lr.ph71
  %121 = load i32, ptr @id, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv94, i64 %122
  %124 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %123, ptr noundef nonnull align 4 dereferenceable(12) %124)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %126 = load i32, ptr @id, align 4, !tbaa !5
  %127 = sub nsw i32 1, %126
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [5001 x [2 x %"class.std::vector"]], ptr @best, i64 0, i64 %indvars.iv96, i64 %128
  %130 = call ptr @_ZNSt6vectorISt4pairIiS0_IiiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %129) #4
  store ptr %130, ptr %6, align 8
  %131 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %131, label %.lr.ph71, label %._crit_edge72, !llvm.loop !20

132:                                              ; preds = %93, %._crit_edge72
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond103.not = icmp eq i64 %indvars.iv.next97, %indvars.iv104
  br i1 %exitcond103.not, label %._crit_edge75, label %93, !llvm.loop !21
}

; 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 { i64, i32 } @_ZSt9make_pairIRiSt4pairIiiEES1_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #0

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) 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_iteratorIPSt4pairIiS1_IiiEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !11, !12}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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