; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101081J.ll (Z5solvev)

; 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" = type { i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr }

@_ZZ5solvevE1a = external hidden global [100001 x [11 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE3ord = external hidden global [100001 x i32], align 16
@_ZZ5solvevE3que = external hidden global [100001 x i32], align 16
@_ZZ5solvevE1f = external hidden global [100001 x %"struct.std::pair"], align 16
@_ZZ5solvevE4bits = external hidden global [100001 x %"struct.std::pair"], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %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", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::function", align 8
  %13 = alloca %class.anon, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::pair", align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::pair", align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %33

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

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

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

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

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

44:                                               ; preds = %39
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %46
  %48 = getelementptr inbounds [11 x i32], ptr %47, i64 0, i64 0
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr %48, i64 %50
  %52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %51)
  br label %53

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

56:                                               ; preds = %43
  br label %57

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

60:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = icmp sle i32 %61, 2
  br i1 %62, label %63, label %128

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

64:                                               ; preds = %86, %63
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

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

69:                                               ; preds = %64
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %72
  store i32 %70, ptr %73, align 4, !tbaa !5
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %75
  %77 = getelementptr inbounds [11 x i32], ptr %76, i64 0, i64 0
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr %8, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %80
  store i32 %78, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %82 = load i32, ptr %8, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %83
  %85 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %84, ptr noundef nonnull align 4 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %86

86:                                               ; preds = %69
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %8, align 4, !tbaa !5
  br label %64, !llvm.loop !12

89:                                               ; preds = %68
  %90 = load i32, ptr %1, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds i32, ptr @_ZZ5solvevE3que, i64 %91
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @_ZZ5solvevE3que, ptr noundef %92)
  %93 = load i32, ptr %1, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr @_ZZ5solvevE3que, i64 %94
  %96 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef @_ZZ5solvevE3que, ptr noundef %95)
  %97 = ptrtoint ptr %96 to i64
  %98 = sub i64 %97, ptrtoint (ptr @_ZZ5solvevE3que to i64)
  %99 = sdiv exact i64 %98, 4
  %100 = trunc i64 %99 to i32
  store i32 %100, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %124, %89
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = load i32, ptr %1, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

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

106:                                              ; preds = %101
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds i32, ptr @_ZZ5solvevE3que, i64 %108
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %111
  %113 = getelementptr inbounds [11 x i32], ptr %112, i64 0, i64 0
  %114 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @_ZZ5solvevE3que, ptr noundef %109, ptr noundef nonnull align 4 dereferenceable(4) %113)
  %115 = ptrtoint ptr %114 to i64
  %116 = sub i64 %115, ptrtoint (ptr @_ZZ5solvevE3que to i64)
  %117 = sdiv exact i64 %116, 4
  %118 = add nsw i64 %117, 1
  %119 = trunc i64 %118 to i32
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %121
  %123 = getelementptr inbounds [11 x i32], ptr %122, i64 0, i64 0
  store i32 %119, ptr %123, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %106
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %11, align 4, !tbaa !5
  br label %101, !llvm.loop !13

127:                                              ; preds = %105
  br label %128

128:                                              ; preds = %127, %60
  %129 = load i32, ptr %2, align 4, !tbaa !5
  %130 = icmp eq i32 %129, 2
  br i1 %130, label %131, label %141

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %132 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 0
  store ptr %12, ptr %132, align 8, !tbaa !14
  %133 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 1
  store ptr %7, ptr %133, align 8, !tbaa !14
  call void @"_ZNSt8functionIFviiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  %134 = load i32, ptr %1, align 4, !tbaa !5
  %135 = sub nsw i32 %134, 1
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef 0, i32 noundef %135)
          to label %136 unwind label %137

136:                                              ; preds = %131
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  br label %305

137:                                              ; preds = %131
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %14, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %353

141:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %142 = load i32, ptr %1, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %143
  %145 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %144, ptr noundef nonnull align 4 dereferenceable(8) %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %146 = load i32, ptr %1, align 4, !tbaa !5
  %147 = sub nsw i32 %146, 1
  store i32 %147, ptr %18, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %301, %141
  %149 = load i32, ptr %18, align 4, !tbaa !5
  %150 = icmp sge i32 %149, 0
  br i1 %150, label %152, label %151

151:                                              ; preds = %148
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %304

152:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 1, ptr %20, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %153 = load i32, ptr %18, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %154
  %156 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %155, ptr noundef nonnull align 4 dereferenceable(8) %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %157 = load i32, ptr %2, align 4, !tbaa !5
  %158 = icmp sgt i32 %157, 2
  br i1 %158, label %159, label %236

159:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %160 = load i32, ptr %1, align 4, !tbaa !5
  %161 = sub nsw i32 %160, 1
  store i32 %161, ptr %21, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %232, %159
  %163 = load i32, ptr %21, align 4, !tbaa !5
  %164 = load i32, ptr %18, align 4, !tbaa !5
  %165 = icmp sgt i32 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %235

167:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  %168 = load i32, ptr %18, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %169
  %171 = getelementptr inbounds %"struct.std::pair", ptr %170, i32 0, i32 0
  %172 = load i32, ptr %171, align 8, !tbaa !16
  %173 = load i32, ptr %21, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %174
  %176 = getelementptr inbounds %"struct.std::pair", ptr %175, i32 0, i32 0
  %177 = load i32, ptr %176, align 8, !tbaa !16
  %178 = add nsw i32 %177, 1
  %179 = icmp slt i32 %172, %178
  %180 = zext i1 %179 to i8
  store i8 %180, ptr %22, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %181

181:                                              ; preds = %214, %167
  %182 = load i8, ptr %22, align 1, !tbaa !18, !range !20, !noundef !21
  %183 = trunc i8 %182 to i1
  br i1 %183, label %184, label %188

184:                                              ; preds = %181
  %185 = load i32, ptr %23, align 4, !tbaa !5
  %186 = load i32, ptr %2, align 4, !tbaa !5
  %187 = icmp slt i32 %185, %186
  br label %188

188:                                              ; preds = %184, %181
  %189 = phi i1 [ false, %181 ], [ %187, %184 ]
  br i1 %189, label %191, label %190

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

191:                                              ; preds = %188
  %192 = load i32, ptr %18, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %193
  %195 = load i32, ptr %23, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [11 x i32], ptr %194, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = load i32, ptr %21, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %200
  %202 = load i32, ptr %23, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [11 x i32], ptr %201, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = icmp slt i32 %198, %205
  %207 = zext i1 %206 to i32
  %208 = load i8, ptr %22, align 1, !tbaa !18, !range !20, !noundef !21
  %209 = trunc i8 %208 to i1
  %210 = zext i1 %209 to i32
  %211 = and i32 %210, %207
  %212 = icmp ne i32 %211, 0
  %213 = zext i1 %212 to i8
  store i8 %213, ptr %22, align 1, !tbaa !18
  br label %214

214:                                              ; preds = %191
  %215 = load i32, ptr %23, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %23, align 4, !tbaa !5
  br label %181, !llvm.loop !22

217:                                              ; preds = %190
  %218 = load i8, ptr %22, align 1, !tbaa !18, !range !20, !noundef !21
  %219 = trunc i8 %218 to i1
  br i1 %219, label %220, label %231

220:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %221 = load i32, ptr %21, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %222
  %224 = getelementptr inbounds %"struct.std::pair", ptr %223, i32 0, i32 0
  %225 = load i32, ptr %224, align 8, !tbaa !16
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %25, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %227 = load i32, ptr %18, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %228
  %230 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %229, ptr noundef nonnull align 4 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %231

231:                                              ; preds = %220, %217
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  br label %232

232:                                              ; preds = %231
  %233 = load i32, ptr %21, align 4, !tbaa !5
  %234 = add nsw i32 %233, -1
  store i32 %234, ptr %21, align 4, !tbaa !5
  br label %162, !llvm.loop !23

235:                                              ; preds = %166
  br label %300

236:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %237 = load i32, ptr %18, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %238
  %240 = getelementptr inbounds [11 x i32], ptr %239, i64 0, i64 0
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %26, align 4, !tbaa !5
  br label %243

243:                                              ; preds = %260, %236
  %244 = load i32, ptr %26, align 4, !tbaa !5
  %245 = load i32, ptr %7, align 4, !tbaa !5
  %246 = icmp sle i32 %244, %245
  br i1 %246, label %248, label %247

247:                                              ; preds = %243
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %267

248:                                              ; preds = %243
  %249 = load i32, ptr %18, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %250
  %252 = load i32, ptr %26, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE4bits, i64 0, i64 %253
  %255 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3maxISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %251, ptr noundef nonnull align 4 dereferenceable(8) %254)
  %256 = load i32, ptr %18, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %257
  %259 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %258, ptr noundef nonnull align 4 dereferenceable(8) %255)
  br label %260

260:                                              ; preds = %248
  %261 = load i32, ptr %26, align 4, !tbaa !5
  %262 = load i32, ptr %26, align 4, !tbaa !5
  %263 = sub nsw i32 0, %262
  %264 = and i32 %261, %263
  %265 = load i32, ptr %26, align 4, !tbaa !5
  %266 = add nsw i32 %265, %264
  store i32 %266, ptr %26, align 4, !tbaa !5
  br label %243, !llvm.loop !24

267:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %268 = load i32, ptr %18, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %269
  %271 = getelementptr inbounds [11 x i32], ptr %270, i64 0, i64 0
  %272 = load i32, ptr %271, align 4, !tbaa !5
  store i32 %272, ptr %27, align 4, !tbaa !5
  br label %273

273:                                              ; preds = %292, %267
  %274 = load i32, ptr %27, align 4, !tbaa !5
  %275 = icmp sgt i32 %274, 0
  br i1 %275, label %277, label %276

276:                                              ; preds = %273
  store i32 26, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %299

277:                                              ; preds = %273
  %278 = load i32, ptr %27, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE4bits, i64 0, i64 %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %281 = load i32, ptr %18, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %282
  %284 = getelementptr inbounds %"struct.std::pair", ptr %283, i32 0, i32 0
  %285 = load i32, ptr %284, align 8, !tbaa !16
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %29, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %287 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3maxISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %280, ptr noundef nonnull align 4 dereferenceable(8) %28)
  %288 = load i32, ptr %27, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE4bits, i64 0, i64 %289
  %291 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %290, ptr noundef nonnull align 4 dereferenceable(8) %287)
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %292

292:                                              ; preds = %277
  %293 = load i32, ptr %27, align 4, !tbaa !5
  %294 = load i32, ptr %27, align 4, !tbaa !5
  %295 = sub nsw i32 0, %294
  %296 = and i32 %293, %295
  %297 = load i32, ptr %27, align 4, !tbaa !5
  %298 = sub nsw i32 %297, %296
  store i32 %298, ptr %27, align 4, !tbaa !5
  br label %273, !llvm.loop !25

299:                                              ; preds = %276
  br label %300

300:                                              ; preds = %299, %235
  br label %301

301:                                              ; preds = %300
  %302 = load i32, ptr %18, align 4, !tbaa !5
  %303 = add nsw i32 %302, -1
  store i32 %303, ptr %18, align 4, !tbaa !5
  br label %148, !llvm.loop !26

304:                                              ; preds = %151
  br label %305

305:                                              ; preds = %304, %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %322, %305
  %307 = load i32, ptr %30, align 4, !tbaa !5
  %308 = load i32, ptr %1, align 4, !tbaa !5
  %309 = icmp slt i32 %307, %308
  br i1 %309, label %311, label %310

310:                                              ; preds = %306
  store i32 29, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %325

311:                                              ; preds = %306
  %312 = load i32, ptr %6, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %313
  %315 = load i32, ptr %30, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %316
  %318 = call noundef zeroext i1 @_ZStltIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %314, ptr noundef nonnull align 4 dereferenceable(8) %317)
  br i1 %318, label %319, label %321

319:                                              ; preds = %311
  %320 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %320, ptr %6, align 4, !tbaa !5
  br label %321

321:                                              ; preds = %319, %311
  br label %322

322:                                              ; preds = %321
  %323 = load i32, ptr %30, align 4, !tbaa !5
  %324 = add nsw i32 %323, 1
  store i32 %324, ptr %30, align 4, !tbaa !5
  br label %306, !llvm.loop !27

325:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %326 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %326, ptr %31, align 4, !tbaa !5
  br label %327

327:                                              ; preds = %346, %325
  %328 = load i32, ptr %31, align 4, !tbaa !5
  %329 = load i32, ptr %1, align 4, !tbaa !5
  %330 = icmp slt i32 %328, %329
  br i1 %330, label %332, label %331

331:                                              ; preds = %327
  store i32 32, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %352

332:                                              ; preds = %327
  %333 = load i32, ptr %31, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  %335 = load i32, ptr %31, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %336
  %338 = getelementptr inbounds %"struct.std::pair", ptr %337, i32 0, i32 0
  %339 = load i32, ptr %338, align 8, !tbaa !16
  %340 = icmp eq i32 %339, 1
  %341 = zext i1 %340 to i64
  %342 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %341
  %343 = load i8, ptr %342, align 1, !tbaa !28
  %344 = sext i8 %343 to i32
  %345 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %334, i32 noundef %344)
  br label %346

346:                                              ; preds = %332
  %347 = load i32, ptr %31, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %348
  %350 = getelementptr inbounds %"struct.std::pair", ptr %349, i32 0, i32 1
  %351 = load i32, ptr %350, align 4, !tbaa !29
  store i32 %351, ptr %31, align 4, !tbaa !5
  br label %327, !llvm.loop !30

352:                                              ; preds = %331
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void

353:                                              ; preds = %137
  %354 = load ptr, ptr %14, align 8
  %355 = load i32, ptr %15, align 4
  %356 = insertvalue { ptr, i32 } poison, ptr %354, 0
  %357 = insertvalue { ptr, i32 } %356, i32 %355, 1
  resume { ptr, i32 } %357
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; 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)) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFviiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare i32 @printf(ptr noundef, ...) #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 = { "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 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = !{!7, !7, i64 0}
!29 = !{!17, !6, i64 4}
!30 = distinct !{!30, !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" = type { i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr }

@_ZZ5solvevE1a = external hidden global [100001 x [11 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE3ord = external hidden local_unnamed_addr global [100001 x i32], align 16
@_ZZ5solvevE3que = external hidden global [100001 x i32], align 16
@_ZZ5solvevE1f = external hidden global [100001 x %"struct.std::pair"], align 16
@_ZZ5solvevE4bits = external hidden global [100001 x %"struct.std::pair"], align 16
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::function", align 8
  %7 = alloca %class.anon, align 8
  %8 = alloca %"struct.std::pair", align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2, ptr noundef nonnull %1)
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.preheader62.lr.ph, label %._crit_edge66.thread

._crit_edge66.thread:                             ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  br label %.preheader61

.preheader62.lr.ph:                               ; preds = %0
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.preheader62, label %._crit_edge66

.preheader62:                                     ; preds = %.preheader62.lr.ph, %._crit_edge
  %23 = phi i32 [ %29, %._crit_edge ], [ %19, %.preheader62.lr.ph ]
  %24 = phi i32 [ %30, %._crit_edge ], [ %21, %.preheader62.lr.ph ]
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %._crit_edge ], [ 0, %.preheader62.lr.ph ]
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader62
  %invariant.gep = getelementptr inbounds i32, ptr @_ZZ5solvevE1a, i64 %indvars.iv111
  br label %33

._crit_edge66:                                    ; preds = %._crit_edge, %.preheader62.lr.ph
  %.lcssa63 = phi i32 [ %19, %.preheader62.lr.ph ], [ %29, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %26 = icmp slt i32 %.lcssa63, 3
  br i1 %26, label %.preheader61, label %.thread

.preheader61:                                     ; preds = %._crit_edge66.thread, %._crit_edge66
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph68, label %.preheader61.._crit_edge69_crit_edge

.preheader61.._crit_edge69_crit_edge:             ; preds = %.preheader61
  %.pre133 = sext i32 %27 to i64
  br label %._crit_edge69

._crit_edge.loopexit:                             ; preds = %33
  %.pre = load i32, ptr %2, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader62
  %29 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %23, %.preheader62 ]
  %30 = phi i32 [ %35, %._crit_edge.loopexit ], [ %24, %.preheader62 ]
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %31 = sext i32 %29 to i64
  %32 = icmp slt i64 %indvars.iv.next112, %31
  br i1 %32, label %.preheader62, label %._crit_edge66, !llvm.loop !9

33:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %gep = getelementptr inbounds [100001 x [11 x i32]], ptr %invariant.gep, i64 0, i64 %indvars.iv
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %gep)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %35 = load i32, ptr %1, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next, %36
  br i1 %37, label %33, label %._crit_edge.loopexit, !llvm.loop !12

._crit_edge69:                                    ; preds = %.lr.ph68, %.preheader61.._crit_edge69_crit_edge
  %.pre-phi134 = phi i64 [ %.pre133, %.preheader61.._crit_edge69_crit_edge ], [ %59, %.lr.ph68 ]
  %38 = getelementptr inbounds i32, ptr @_ZZ5solvevE3que, i64 %.pre-phi134
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @_ZZ5solvevE3que, ptr noundef nonnull %38)
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr @_ZZ5solvevE3que, i64 %40
  %42 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef nonnull @_ZZ5solvevE3que, ptr noundef nonnull %41)
  %43 = ptrtoint ptr %42 to i64
  %44 = sub i64 %43, ptrtoint (ptr @_ZZ5solvevE3que to i64)
  %45 = lshr exact i64 %44, 2
  %46 = trunc i64 %45 to i32
  store i32 %46, ptr %3, align 4, !tbaa !5
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph73.preheader, label %._crit_edge74

.lr.ph73.preheader:                               ; preds = %._crit_edge69
  %sext = shl i64 %44, 30
  %49 = ashr i64 %sext, 32
  %50 = getelementptr inbounds i32, ptr @_ZZ5solvevE3que, i64 %49
  br label %.lr.ph73

.lr.ph68:                                         ; preds = %.preheader61, %.lr.ph68
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %.lr.ph68 ], [ 0, %.preheader61 ]
  %51 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3ord, i64 0, i64 %indvars.iv114
  %52 = trunc nuw nsw i64 %indvars.iv114 to i32
  store i32 %52, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv114
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = getelementptr inbounds [100001 x i32], ptr @_ZZ5solvevE3que, i64 0, i64 %indvars.iv114
  store i32 %54, ptr %55, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %56 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv114
  %57 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %56, ptr noundef nonnull align 4 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %58 = load i32, ptr %1, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next115, %59
  br i1 %60, label %.lr.ph68, label %._crit_edge69, !llvm.loop !13

.lr.ph73:                                         ; preds = %.lr.ph73.preheader, %.lr.ph73
  %indvars.iv117 = phi i64 [ 0, %.lr.ph73.preheader ], [ %indvars.iv.next118, %.lr.ph73 ]
  %61 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv117
  %62 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @_ZZ5solvevE3que, ptr noundef nonnull %50, ptr noundef nonnull align 4 dereferenceable(4) %61)
  %63 = ptrtoint ptr %62 to i64
  %64 = sub i64 %63, ptrtoint (ptr @_ZZ5solvevE3que to i64)
  %65 = lshr exact i64 %64, 2
  %66 = trunc i64 %65 to i32
  %67 = add i32 %66, 1
  store i32 %67, ptr %61, align 4, !tbaa !5
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %68 = load i32, ptr %1, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = icmp slt i64 %indvars.iv.next118, %69
  br i1 %70, label %.lr.ph73, label %._crit_edge74, !llvm.loop !14

._crit_edge74:                                    ; preds = %.lr.ph73, %._crit_edge69
  %.pr = load i32, ptr %2, align 4, !tbaa !5
  %71 = icmp eq i32 %.pr, 2
  br i1 %71, label %72, label %.thread

72:                                               ; preds = %._crit_edge74
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  store ptr %6, ptr %7, align 8, !tbaa !15
  %73 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %3, ptr %73, align 8, !tbaa !15
  call void @"_ZNSt8functionIFviiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = add nsw i32 %74, -1
  invoke void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 0, i32 noundef %75)
          to label %76 unwind label %77

76:                                               ; preds = %72
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %155

77:                                               ; preds = %72
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %78

.thread:                                          ; preds = %._crit_edge66, %._crit_edge74
  %79 = phi i32 [ undef, %._crit_edge66 ], [ %46, %._crit_edge74 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %80 = load i32, ptr %1, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %81
  %83 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %82, ptr noundef nonnull align 4 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %storemerge.in94 = load i32, ptr %1, align 4, !tbaa !5
  %storemerge95 = add nsw i32 %storemerge.in94, -1
  store i32 %storemerge95, ptr %10, align 4, !tbaa !5
  %84 = icmp sgt i32 %storemerge.in94, 0
  br i1 %84, label %.lr.ph96, label %._crit_edge97

._crit_edge97:                                    ; preds = %.loopexit, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br label %155

.lr.ph96:                                         ; preds = %.thread, %.loopexit
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %86
  %88 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %87, ptr noundef nonnull align 4 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = icmp sgt i32 %89, 2
  br i1 %90, label %91, label %122

91:                                               ; preds = %.lr.ph96
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  %storemerge60.in88 = load i32, ptr %1, align 4, !tbaa !5
  %storemerge6089 = add nsw i32 %storemerge60.in88, -1
  store i32 %storemerge6089, ptr %13, align 4, !tbaa !5
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = icmp sgt i32 %storemerge6089, %92
  br i1 %93, label %.lr.ph92, label %._crit_edge93

._crit_edge93:                                    ; preds = %119, %91
  %storemerge.in132 = phi i32 [ %92, %91 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  br label %.loopexit

.lr.ph92:                                         ; preds = %91, %119
  %94 = phi i32 [ %120, %119 ], [ %92, %91 ]
  %storemerge6090 = phi i32 [ %storemerge60, %119 ], [ %storemerge6089, %91 ]
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %95
  %97 = load i32, ptr %96, align 8, !tbaa !17
  %98 = sext i32 %storemerge6090 to i64
  %99 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %98
  %100 = load i32, ptr %99, align 8, !tbaa !17
  %101 = icmp sle i32 %97, %100
  %102 = load i32, ptr %2, align 4
  %103 = icmp sgt i32 %102, 0
  %104 = select i1 %101, i1 %103, i1 false
  br i1 %104, label %.lr.ph85.preheader, label %._crit_edge86

.lr.ph85.preheader:                               ; preds = %.lr.ph92
  %105 = zext nneg i32 %102 to i64
  br label %.lr.ph85

._crit_edge86:                                    ; preds = %.lr.ph85, %.lr.ph92
  %.050.in.lcssa = phi i1 [ %101, %.lr.ph92 ], [ %110, %.lr.ph85 ]
  br i1 %.050.in.lcssa, label %113, label %119

.lr.ph85:                                         ; preds = %.lr.ph85.preheader, %.lr.ph85
  %indvars.iv120 = phi i64 [ 0, %.lr.ph85.preheader ], [ %indvars.iv.next121, %.lr.ph85 ]
  %106 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %95, i64 %indvars.iv120
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %98, i64 %indvars.iv120
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp slt i32 %107, %109
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %111 = icmp ult i64 %indvars.iv.next121, %105
  %112 = select i1 %110, i1 %111, i1 false
  br i1 %112, label %.lr.ph85, label %._crit_edge86, !llvm.loop !19

113:                                              ; preds = %._crit_edge86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %114 = add nsw i32 %100, 1
  store i32 %114, ptr %15, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %115 = load i32, ptr %10, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %116
  %118 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %117, ptr noundef nonnull align 4 dereferenceable(8) %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  %storemerge60.in.pre = load i32, ptr %13, align 4, !tbaa !5
  %.pre130 = load i32, ptr %10, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %113, %._crit_edge86
  %120 = phi i32 [ %.pre130, %113 ], [ %94, %._crit_edge86 ]
  %storemerge60.in = phi i32 [ %storemerge60.in.pre, %113 ], [ %storemerge6090, %._crit_edge86 ]
  %storemerge60 = add nsw i32 %storemerge60.in, -1
  store i32 %storemerge60, ptr %13, align 4, !tbaa !5
  %121 = icmp sgt i32 %storemerge60, %120
  br i1 %121, label %.lr.ph92, label %._crit_edge93, !llvm.loop !20

122:                                              ; preds = %.lr.ph96
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %.not75.not = icmp slt i32 %126, %79
  br i1 %.not75.not, label %.lr.ph78.preheader, label %._crit_edge79

.lr.ph78.preheader:                               ; preds = %122
  %127 = add nsw i32 %126, 1
  br label %.lr.ph78

._crit_edge79.loopexit:                           ; preds = %.lr.ph78
  %.pre126 = load i32, ptr %10, align 4, !tbaa !5
  %.phi.trans.insert = sext i32 %.pre126 to i64
  %.phi.trans.insert127 = getelementptr inbounds [100001 x [11 x i32]], ptr @_ZZ5solvevE1a, i64 0, i64 %.phi.trans.insert
  %.pre128 = load i32, ptr %.phi.trans.insert127, align 4, !tbaa !5
  br label %._crit_edge79

._crit_edge79:                                    ; preds = %._crit_edge79.loopexit, %122
  %128 = phi i32 [ %.pre128, %._crit_edge79.loopexit ], [ %126, %122 ]
  %129 = phi i32 [ %.pre126, %._crit_edge79.loopexit ], [ %123, %122 ]
  %130 = icmp sgt i32 %128, 0
  br i1 %130, label %.lr.ph82, label %.loopexit

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %.lr.ph78
  %.04876 = phi i32 [ %143, %.lr.ph78 ], [ %127, %.lr.ph78.preheader ]
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %132
  %134 = sext i32 %.04876 to i64
  %135 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE4bits, i64 0, i64 %134
  %136 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3maxISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %133, ptr noundef nonnull align 4 dereferenceable(8) %135)
  %137 = load i32, ptr %10, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %138
  %140 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %139, ptr noundef nonnull align 4 dereferenceable(8) %136)
  %141 = sub nsw i32 0, %.04876
  %142 = and i32 %.04876, %141
  %143 = add nsw i32 %142, %.04876
  %.not = icmp sgt i32 %143, %79
  br i1 %.not, label %._crit_edge79.loopexit, label %.lr.ph78, !llvm.loop !21

.lr.ph82:                                         ; preds = %._crit_edge79, %.lr.ph82
  %.04780 = phi i32 [ %153, %.lr.ph82 ], [ %128, %._crit_edge79 ]
  %144 = zext nneg i32 %.04780 to i64
  %145 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE4bits, i64 0, i64 %144
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  %146 = load i32, ptr %10, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %147
  %149 = load i32, ptr %148, align 8, !tbaa !17
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %17, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %151 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZSt3maxISt4pairIiiEERKT_S4_S4_(ptr noundef nonnull align 4 dereferenceable(8) %145, ptr noundef nonnull align 4 dereferenceable(8) %16)
  %152 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %145, ptr noundef nonnull align 4 dereferenceable(8) %151)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  %.not59 = add nsw i32 %.04780, -1
  %153 = and i32 %.not59, %.04780
  %.not141 = icmp eq i32 %153, 0
  br i1 %.not141, label %.loopexit.loopexit, label %.lr.ph82, !llvm.loop !22

.loopexit.loopexit:                               ; preds = %.lr.ph82
  %storemerge.in.pre = load i32, ptr %10, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %._crit_edge79, %._crit_edge93
  %storemerge.in = phi i32 [ %storemerge.in.pre, %.loopexit.loopexit ], [ %129, %._crit_edge79 ], [ %storemerge.in132, %._crit_edge93 ]
  %storemerge = add nsw i32 %storemerge.in, -1
  store i32 %storemerge, ptr %10, align 4, !tbaa !5
  %154 = icmp sgt i32 %storemerge.in, 0
  br i1 %154, label %.lr.ph96, label %._crit_edge97, !llvm.loop !23

155:                                              ; preds = %._crit_edge97, %76
  %156 = load i32, ptr %1, align 4, !tbaa !5
  %157 = icmp sgt i32 %156, 0
  br i1 %157, label %.lr.ph101, label %.preheader

.preheader:                                       ; preds = %.lr.ph101, %155
  %158 = phi i32 [ %156, %155 ], [ %165, %.lr.ph101 ]
  %.054.lcssa = phi i32 [ 0, %155 ], [ %spec.select, %.lr.ph101 ]
  %159 = icmp slt i32 %.054.lcssa, %158
  br i1 %159, label %.lr.ph104, label %._crit_edge105

.lr.ph101:                                        ; preds = %155, %.lr.ph101
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %.lr.ph101 ], [ 0, %155 ]
  %.05498 = phi i32 [ %spec.select, %.lr.ph101 ], [ 0, %155 ]
  %160 = sext i32 %.05498 to i64
  %161 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %160
  %162 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv123
  %163 = call noundef zeroext i1 @_ZStltIiiEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 4 dereferenceable(8) %161, ptr noundef nonnull align 4 dereferenceable(8) %162)
  %164 = trunc nuw nsw i64 %indvars.iv123 to i32
  %spec.select = select i1 %163, i32 %164, i32 %.05498
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %165 = load i32, ptr %1, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = icmp slt i64 %indvars.iv.next124, %166
  br i1 %167, label %.lr.ph101, label %.preheader, !llvm.loop !24

._crit_edge105:                                   ; preds = %.lr.ph104, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph104:                                        ; preds = %.preheader, %.lr.ph104
  %.0103 = phi i32 [ %179, %.lr.ph104 ], [ %.054.lcssa, %.preheader ]
  %168 = add nsw i32 %.0103, 1
  %169 = sext i32 %.0103 to i64
  %170 = getelementptr inbounds [100001 x %"struct.std::pair"], ptr @_ZZ5solvevE1f, i64 0, i64 %169
  %171 = load i32, ptr %170, align 8, !tbaa !17
  %172 = icmp eq i32 %171, 1
  %173 = zext i1 %172 to i64
  %174 = getelementptr inbounds [3 x i8], ptr @.str.3, i64 0, i64 %173
  %175 = load i8, ptr %174, align 1, !tbaa !25
  %176 = sext i8 %175 to i32
  %177 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %168, i32 noundef %176)
  %178 = getelementptr inbounds i8, ptr %170, i64 4
  %179 = load i32, ptr %178, align 4, !tbaa !26
  %180 = load i32, ptr %1, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %.lr.ph104, label %._crit_edge105, !llvm.loop !27
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIiiEC2IiRiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #3 align 2

; 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 #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFviiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFviiEEclEii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!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 = !{!7, !7, i64 0}
!26 = !{!18, !6, i64 4}
!27 = distinct !{!27, !10}


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