; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Codesprints 2017/Codesprint 9/Problem F (F)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@a = external dso_local global [262144 x i32], align 16
@sum = external dso_local global [262144 x i32], align 16
@dp = external dso_local global [821 x [41 x i32]], align 16
@best = external dso_local global [821 x [41 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11sparseTablev() #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z3rmqii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  %22 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !8
  br label %28

28:                                               ; preds = %51, %0
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %30 = load i32, ptr @n, align 4, !tbaa !8
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %54

33:                                               ; preds = %28
  %34 = load i32, ptr %2, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %35
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %38 = load i32, ptr %2, align 4, !tbaa !8
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [262144 x i32], ptr @sum, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !8
  %43 = load i32, ptr %2, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !8
  %47 = add nsw i32 %42, %46
  %48 = load i32, ptr %2, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [262144 x i32], ptr @sum, i64 0, i64 %49
  store i32 %47, ptr %50, align 4, !tbaa !8
  br label %51

51:                                               ; preds = %33
  %52 = load i32, ptr %2, align 4, !tbaa !8
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %2, align 4, !tbaa !8
  br label %28, !llvm.loop !11

54:                                               ; preds = %32
  call void @_Z11sparseTablev()
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %55

55:                                               ; preds = %260, %54
  %56 = load i32, ptr %6, align 4, !tbaa !8
  %57 = load i32, ptr @n, align 4, !tbaa !8
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

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

60:                                               ; preds = %55
  %61 = load i32, ptr %6, align 4, !tbaa !8
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !8
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %66, label %259

66:                                               ; preds = %60
  %67 = load i32, ptr %6, align 4, !tbaa !8
  %68 = load i32, ptr %6, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %72
  %74 = load i32, ptr %6, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !8
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [41 x i32], ptr %73, i64 0, i64 %78
  store i32 %67, ptr %79, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %80 = load i32, ptr %6, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !8
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %8, align 4, !tbaa !8
  br label %85

85:                                               ; preds = %126, %66
  %86 = load i32, ptr %8, align 4, !tbaa !8
  %87 = load i32, ptr %6, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !8
  %91 = load i32, ptr %6, align 4, !tbaa !8
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !8
  %95 = add nsw i32 %94, 1
  %96 = mul nsw i32 %90, %95
  %97 = sdiv i32 %96, 2
  %98 = icmp sle i32 %86, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %85
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %129

100:                                              ; preds = %85
  %101 = load i32, ptr %8, align 4, !tbaa !8
  %102 = load i32, ptr %6, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !8
  %106 = sub nsw i32 %101, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %107
  %109 = load i32, ptr %6, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %113 = sub nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [41 x i32], ptr %108, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !8
  %117 = load i32, ptr %8, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %118
  %120 = load i32, ptr %6, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !8
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [41 x i32], ptr %119, i64 0, i64 %124
  store i32 %116, ptr %125, align 4, !tbaa !8
  br label %126

126:                                              ; preds = %100
  %127 = load i32, ptr %8, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !8
  br label %85, !llvm.loop !13

129:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %130 = load i32, ptr %6, align 4, !tbaa !8
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !8
  store i32 %133, ptr %9, align 4, !tbaa !8
  br label %134

134:                                              ; preds = %184, %129
  %135 = load i32, ptr %9, align 4, !tbaa !8
  %136 = load i32, ptr %6, align 4, !tbaa !8
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !8
  %140 = load i32, ptr %6, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !8
  %144 = add nsw i32 %143, 1
  %145 = mul nsw i32 %139, %144
  %146 = sdiv i32 %145, 2
  %147 = icmp sle i32 %135, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %134
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %187

149:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %150 = load i32, ptr %6, align 4, !tbaa !8
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !8
  store i32 %153, ptr %10, align 4, !tbaa !8
  br label %154

154:                                              ; preds = %180, %149
  %155 = load i32, ptr %10, align 4, !tbaa !8
  %156 = icmp slt i32 %155, 41
  br i1 %156, label %158, label %157

157:                                              ; preds = %154
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %183

158:                                              ; preds = %154
  %159 = load i32, ptr %9, align 4, !tbaa !8
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %160
  %162 = load i32, ptr %10, align 4, !tbaa !8
  %163 = sub nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [41 x i32], ptr %161, i64 0, i64 %164
  %166 = load i32, ptr %9, align 4, !tbaa !8
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %167
  %169 = load i32, ptr %10, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [41 x i32], ptr %168, i64 0, i64 %170
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %165, ptr noundef nonnull align 4 dereferenceable(4) %171)
  %173 = load i32, ptr %172, align 4, !tbaa !8
  %174 = load i32, ptr %9, align 4, !tbaa !8
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %175
  %177 = load i32, ptr %10, align 4, !tbaa !8
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [41 x i32], ptr %176, i64 0, i64 %178
  store i32 %173, ptr %179, align 4, !tbaa !8
  br label %180

180:                                              ; preds = %158
  %181 = load i32, ptr %10, align 4, !tbaa !8
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %10, align 4, !tbaa !8
  br label %154, !llvm.loop !14

183:                                              ; preds = %157
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %9, align 4, !tbaa !8
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %9, align 4, !tbaa !8
  br label %134, !llvm.loop !15

187:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 820, ptr %12, align 4, !tbaa !8
  br label %188

188:                                              ; preds = %255, %187
  %189 = load i32, ptr %12, align 4, !tbaa !8
  %190 = icmp sge i32 %189, 0
  br i1 %190, label %192, label %191

191:                                              ; preds = %188
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %258

192:                                              ; preds = %188
  %193 = load i32, ptr %12, align 4, !tbaa !8
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %194
  %196 = getelementptr inbounds [41 x i32], ptr %195, i64 0, i64 40
  %197 = load i32, ptr %196, align 4, !tbaa !8
  %198 = load i32, ptr %11, align 4, !tbaa !8
  %199 = icmp sgt i32 %197, %198
  br i1 %199, label %200, label %254

200:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %201 = load i32, ptr %11, align 4, !tbaa !8
  %202 = load i32, ptr %12, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %203
  %205 = getelementptr inbounds [41 x i32], ptr %204, i64 0, i64 40
  %206 = load i32, ptr %205, align 4, !tbaa !8
  %207 = sub nsw i32 %206, 1
  %208 = call i64 @_Z3rmqii(i32 noundef %201, i32 noundef %207)
  store i64 %208, ptr %13, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %209 = load i32, ptr %6, align 4, !tbaa !8
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [262144 x i32], ptr @sum, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !8
  %213 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %214 = load i32, ptr %213, align 4, !tbaa !16
  %215 = sub nsw i32 %212, %214
  %216 = load i32, ptr %12, align 4, !tbaa !8
  %217 = sub nsw i32 %215, %216
  store i32 %217, ptr %14, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %218 = load i32, ptr %6, align 4, !tbaa !8
  %219 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !18
  %221 = sub nsw i32 %218, %220
  store i32 %221, ptr %15, align 4, !tbaa !8
  %222 = load i32, ptr %14, align 4, !tbaa !8
  %223 = load i32, ptr %3, align 4, !tbaa !8
  %224 = icmp sgt i32 %222, %223
  br i1 %224, label %225, label %228

225:                                              ; preds = %200
  %226 = load i32, ptr %14, align 4, !tbaa !8
  store i32 %226, ptr %3, align 4, !tbaa !8
  %227 = load i32, ptr %15, align 4, !tbaa !8
  store i32 %227, ptr %5, align 4, !tbaa !8
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %248

228:                                              ; preds = %200
  %229 = load i32, ptr %14, align 4, !tbaa !8
  %230 = load i32, ptr %3, align 4, !tbaa !8
  %231 = icmp eq i32 %229, %230
  br i1 %231, label %232, label %247

232:                                              ; preds = %228
  %233 = load i32, ptr %15, align 4, !tbaa !8
  %234 = load i32, ptr %5, align 4, !tbaa !8
  %235 = icmp slt i32 %233, %234
  br i1 %235, label %236, label %238

236:                                              ; preds = %232
  %237 = load i32, ptr %15, align 4, !tbaa !8
  store i32 %237, ptr %5, align 4, !tbaa !8
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %246

238:                                              ; preds = %232
  %239 = load i32, ptr %15, align 4, !tbaa !8
  %240 = load i32, ptr %5, align 4, !tbaa !8
  %241 = icmp eq i32 %239, %240
  br i1 %241, label %242, label %245

242:                                              ; preds = %238
  %243 = load i32, ptr %4, align 4, !tbaa !8
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %4, align 4, !tbaa !8
  br label %245

245:                                              ; preds = %242, %238
  br label %246

246:                                              ; preds = %245, %236
  br label %247

247:                                              ; preds = %246, %228
  br label %248

248:                                              ; preds = %247, %225
  %249 = load i32, ptr %12, align 4, !tbaa !8
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %250
  %252 = getelementptr inbounds [41 x i32], ptr %251, i64 0, i64 40
  %253 = load i32, ptr %252, align 4, !tbaa !8
  store i32 %253, ptr %11, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %254

254:                                              ; preds = %248, %192
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %12, align 4, !tbaa !8
  %257 = add nsw i32 %256, -1
  store i32 %257, ptr %12, align 4, !tbaa !8
  br label %188, !llvm.loop !19

258:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %259

259:                                              ; preds = %258, %60
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %6, align 4, !tbaa !8
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %6, align 4, !tbaa !8
  br label %55, !llvm.loop !20

263:                                              ; preds = %59
  %264 = load i32, ptr %3, align 4, !tbaa !8
  %265 = icmp eq i32 %264, 0
  br i1 %265, label %266, label %268

266:                                              ; preds = %263
  %267 = load i32, ptr @n, align 4, !tbaa !8
  store i32 %267, ptr %4, align 4, !tbaa !8
  br label %268

268:                                              ; preds = %266, %263
  %269 = load i32, ptr %3, align 4, !tbaa !8
  %270 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %269)
  %271 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %270, i8 noundef signext 32)
  %272 = load i32, ptr %4, align 4, !tbaa !8
  %273 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %271, i32 noundef %272)
  %274 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %273, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  %275 = load i32, ptr %1, align 4
  ret i32 %275
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@n = external dso_local global i32, align 4
@a = external dso_local global [262144 x i32], align 16
@sum = external dso_local local_unnamed_addr global [262144 x i32], align 16
@dp = external dso_local global [821 x [41 x i32]], align 16
@best = external dso_local global [821 x [41 x i32]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11sparseTablev() local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_Z3rmqii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %13 = load i32, ptr @n, align 4, !tbaa !8
  %.not93 = icmp slt i32 %13, 1
  br i1 %.not93, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  tail call void @_Z11sparseTablev()
  %14 = load i32, ptr @n, align 4, !tbaa !8
  %.not87109 = icmp slt i32 %14, 1
  br i1 %.not87109, label %._crit_edge116.thread, label %.lr.ph115

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %15 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %indvars.iv
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %17 = add nsw i64 %indvars.iv, -1
  %18 = getelementptr inbounds [262144 x i32], ptr @sum, i64 0, i64 %17
  %19 = load i32, ptr %18, align 4, !tbaa !8
  %20 = load i32, ptr %15, align 4, !tbaa !8
  %21 = add nsw i32 %20, %19
  %22 = getelementptr inbounds [262144 x i32], ptr @sum, i64 0, i64 %indvars.iv
  store i32 %21, ptr %22, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr @n, align 4, !tbaa !8
  %24 = sext i32 %23 to i64
  %.not.not = icmp slt i64 %indvars.iv, %24
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge116:                                   ; preds = %.loopexit
  %25 = icmp eq i32 %.4, 0
  %spec.select144 = select i1 %25, i32 %100, i32 %.467
  br label %._crit_edge116.thread

._crit_edge116.thread:                            ; preds = %._crit_edge116, %._crit_edge
  %.062.lcssa141 = phi i32 [ 0, %._crit_edge ], [ %.4, %._crit_edge116 ]
  %26 = phi i32 [ %14, %._crit_edge ], [ %spec.select144, %._crit_edge116 ]
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.062.lcssa141)
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %27, i8 noundef signext 32)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef %26)
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph115:                                        ; preds = %._crit_edge, %.loopexit
  %31 = phi i32 [ %100, %.loopexit ], [ %14, %._crit_edge ]
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %.loopexit ], [ 1, %._crit_edge ]
  %.062113 = phi i32 [ %.4, %.loopexit ], [ 0, %._crit_edge ]
  %.063112 = phi i32 [ %.467, %.loopexit ], [ 0, %._crit_edge ]
  %.075110 = phi i32 [ %.479, %.loopexit ], [ 0, %._crit_edge ]
  %32 = getelementptr inbounds [262144 x i32], ptr @a, i64 0, i64 %indvars.iv134
  %33 = load i32, ptr %32, align 4, !tbaa !8
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %35, label %.loopexit

35:                                               ; preds = %.lr.ph115
  %36 = zext nneg i32 %33 to i64
  %37 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %36, i64 %36
  %38 = trunc nuw nsw i64 %indvars.iv134 to i32
  store i32 %38, ptr %37, align 4, !tbaa !8
  %39 = add nuw nsw i32 %33, 1
  %40 = mul nuw nsw i32 %39, %33
  %41 = lshr i32 %40, 1
  %.not88.not95 = icmp ult i32 %33, %41
  br i1 %.not88.not95, label %.lr.ph98, label %.preheader92

.lr.ph98:                                         ; preds = %35
  %42 = add nsw i32 %33, -1
  %43 = zext nneg i32 %42 to i64
  %44 = zext nneg i32 %33 to i64
  %wide.trip.count = zext nneg i32 %41 to i64
  %45 = sub nsw i64 %wide.trip.count, %44
  %xtraiter = and i64 %45, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph98
  %indvars.iv.next122.prol = add nuw nsw i64 %44, 1
  %46 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 1, i64 %43
  %47 = load i32, ptr %46, align 4, !tbaa !8
  %48 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %indvars.iv.next122.prol, i64 %36
  store i32 %47, ptr %48, align 4, !tbaa !8
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph98
  %indvars.iv121.unr = phi i64 [ %44, %.lr.ph98 ], [ %indvars.iv.next122.prol, %.prol.loopexit.unr-lcssa ]
  %49 = add nsw i64 %wide.trip.count, -1
  %50 = icmp eq i64 %49, %44
  br i1 %50, label %.preheader92, label %.lr.ph98.new

.preheader92:                                     ; preds = %.prol.loopexit, %.lr.ph98.new, %35
  %51 = lshr i32 %40, 1
  %.not89102 = icmp sgt i32 %33, %51
  br i1 %.not89102, label %.preheader91, label %.preheader

.lr.ph98.new:                                     ; preds = %.prol.loopexit, %.lr.ph98.new
  %indvars.iv121 = phi i64 [ %indvars.iv.next122.1, %.lr.ph98.new ], [ %indvars.iv121.unr, %.prol.loopexit ]
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %52 = sub nsw i64 %indvars.iv.next122, %44
  %53 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %52, i64 %43
  %54 = load i32, ptr %53, align 4, !tbaa !8
  %55 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %indvars.iv.next122, i64 %36
  store i32 %54, ptr %55, align 4, !tbaa !8
  %indvars.iv.next122.1 = add nuw nsw i64 %indvars.iv121, 2
  %56 = sub nsw i64 %indvars.iv.next122.1, %44
  %57 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %56, i64 %43
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %59 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %indvars.iv.next122.1, i64 %36
  store i32 %58, ptr %59, align 4, !tbaa !8
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next122.1, %wide.trip.count
  br i1 %exitcond.not.1, label %.preheader92, label %.lr.ph98.new, !llvm.loop !13

.preheader91:                                     ; preds = %._crit_edge101, %.preheader92
  %60 = getelementptr inbounds [262144 x i32], ptr @sum, i64 0, i64 %indvars.iv134
  br label %77

.preheader:                                       ; preds = %.preheader92, %._crit_edge101
  %61 = phi i32 [ %64, %._crit_edge101 ], [ %33, %.preheader92 ]
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %._crit_edge101 ], [ %36, %.preheader92 ]
  %62 = icmp slt i32 %61, 41
  br i1 %62, label %.lr.ph100, label %._crit_edge101

.lr.ph100:                                        ; preds = %.preheader
  %63 = sext i32 %61 to i64
  br label %69

._crit_edge101.loopexit:                          ; preds = %69
  %.pre = load i32, ptr %32, align 4, !tbaa !8
  br label %._crit_edge101

._crit_edge101:                                   ; preds = %._crit_edge101.loopexit, %.preheader
  %64 = phi i32 [ %.pre, %._crit_edge101.loopexit ], [ %61, %.preheader ]
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %65 = add nsw i32 %64, 1
  %66 = mul nsw i32 %65, %64
  %67 = sdiv i32 %66, 2
  %68 = trunc nuw i64 %indvars.iv128 to i32
  %.not89.not = icmp sgt i32 %67, %68
  br i1 %.not89.not, label %.preheader, label %.preheader91, !llvm.loop !14

69:                                               ; preds = %.lr.ph100, %69
  %indvars.iv124 = phi i64 [ %63, %.lr.ph100 ], [ %indvars.iv.next125, %69 ]
  %70 = add nsw i64 %indvars.iv124, -1
  %71 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %indvars.iv128, i64 %70
  %72 = getelementptr inbounds [821 x [41 x i32]], ptr @dp, i64 0, i64 %indvars.iv128, i64 %indvars.iv124
  %73 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %71, ptr noundef nonnull align 4 dereferenceable(4) %72)
  %74 = load i32, ptr %73, align 4, !tbaa !8
  %75 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %indvars.iv128, i64 %indvars.iv124
  store i32 %74, ptr %75, align 4, !tbaa !8
  %indvars.iv.next125 = add nsw i64 %indvars.iv124, 1
  %76 = and i64 %indvars.iv.next125, 4294967295
  %exitcond127.not = icmp eq i64 %76, 41
  br i1 %exitcond127.not, label %._crit_edge101.loopexit, label %69, !llvm.loop !15

77:                                               ; preds = %.preheader91, %99
  %indvars.iv131 = phi i64 [ 820, %.preheader91 ], [ %indvars.iv.next132, %99 ]
  %.1108 = phi i32 [ %.062113, %.preheader91 ], [ %.3, %99 ]
  %.164107 = phi i32 [ %.063112, %.preheader91 ], [ %.366, %99 ]
  %.069105 = phi i32 [ 0, %.preheader91 ], [ %.170, %99 ]
  %.176104 = phi i32 [ %.075110, %.preheader91 ], [ %.378, %99 ]
  %78 = getelementptr inbounds [821 x [41 x i32]], ptr @best, i64 0, i64 %indvars.iv131, i64 40
  %79 = load i32, ptr %78, align 4, !tbaa !8
  %80 = icmp sgt i32 %79, %.069105
  br i1 %80, label %81, label %99

81:                                               ; preds = %77
  %82 = add nsw i32 %79, -1
  %83 = tail call i64 @_Z3rmqii(i32 noundef %.069105, i32 noundef %82)
  %.sroa.0.0.extract.trunc = trunc i64 %83 to i32
  %.sroa.4.0.extract.shift = lshr i64 %83, 32
  %.sroa.4.0.extract.trunc = trunc nuw i64 %.sroa.4.0.extract.shift to i32
  %84 = load i32, ptr %60, align 4, !tbaa !8
  %85 = trunc nuw nsw i64 %indvars.iv131 to i32
  %86 = add i32 %85, %.sroa.0.0.extract.trunc
  %87 = sub i32 %84, %86
  %88 = sub nsw i32 %38, %.sroa.4.0.extract.trunc
  %89 = icmp sgt i32 %87, %.1108
  br i1 %89, label %97, label %90

90:                                               ; preds = %81
  %91 = icmp eq i32 %87, %.1108
  br i1 %91, label %92, label %97

92:                                               ; preds = %90
  %93 = icmp slt i32 %88, %.176104
  br i1 %93, label %97, label %94

94:                                               ; preds = %92
  %95 = icmp eq i32 %88, %.176104
  %96 = zext i1 %95 to i32
  %spec.select90 = add nsw i32 %.164107, %96
  br label %97

97:                                               ; preds = %94, %92, %81, %90
  %.277 = phi i32 [ %.176104, %90 ], [ %88, %81 ], [ %88, %92 ], [ %.176104, %94 ]
  %.265 = phi i32 [ %.164107, %90 ], [ 1, %81 ], [ 1, %92 ], [ %spec.select90, %94 ]
  %.2 = phi i32 [ %.1108, %90 ], [ %87, %81 ], [ %.1108, %92 ], [ %.1108, %94 ]
  %98 = load i32, ptr %78, align 4, !tbaa !8
  br label %99

99:                                               ; preds = %77, %97
  %.378 = phi i32 [ %.277, %97 ], [ %.176104, %77 ]
  %.170 = phi i32 [ %98, %97 ], [ %.069105, %77 ]
  %.366 = phi i32 [ %.265, %97 ], [ %.164107, %77 ]
  %.3 = phi i32 [ %.2, %97 ], [ %.1108, %77 ]
  %indvars.iv.next132 = add nsw i64 %indvars.iv131, -1
  %.not = icmp eq i64 %indvars.iv131, 0
  br i1 %.not, label %.loopexit.loopexit, label %77, !llvm.loop !16

.loopexit.loopexit:                               ; preds = %99
  %.pre137 = load i32, ptr @n, align 4, !tbaa !8
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph115
  %100 = phi i32 [ %31, %.lr.ph115 ], [ %.pre137, %.loopexit.loopexit ]
  %.479 = phi i32 [ %.075110, %.lr.ph115 ], [ %.378, %.loopexit.loopexit ]
  %.467 = phi i32 [ %.063112, %.lr.ph115 ], [ %.366, %.loopexit.loopexit ]
  %.4 = phi i32 [ %.062113, %.lr.ph115 ], [ %.3, %.loopexit.loopexit ]
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %101 = sext i32 %100 to i64
  %.not87.not = icmp slt i64 %indvars.iv134, %101
  br i1 %.not87.not, label %.lr.ph115, label %._crit_edge116, !llvm.loop !17
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #3

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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