; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2016.02 (cbarn2)

; 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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %26 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %27 = getelementptr i8, ptr %26, i64 -24
  %28 = load i64, ptr %27, align 8
  %29 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %28
  %30 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %29, ptr noundef null)
  %31 = load ptr, ptr @stdin, align 8, !tbaa !8
  %32 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %31)
  %33 = load ptr, ptr @stdout, align 8, !tbaa !8
  %34 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %37 = load i32, ptr %2, align 4, !tbaa !11
  %38 = zext i32 %37 to i64
  %39 = call ptr @llvm.stacksave.p0()
  store ptr %39, ptr %4, align 8
  %40 = alloca i32, i64 %38, align 16
  store i64 %38, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %51, %0
  %42 = load i32, ptr %6, align 4, !tbaa !11
  %43 = load i32, ptr %2, align 4, !tbaa !11
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %54

46:                                               ; preds = %41
  %47 = load i32, ptr %6, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %40, i64 %48
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %49)
  br label %51

51:                                               ; preds = %46
  %52 = load i32, ptr %6, align 4, !tbaa !11
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %6, align 4, !tbaa !11
  br label %41, !llvm.loop !13

54:                                               ; preds = %45
  %55 = load i32, ptr %2, align 4, !tbaa !11
  %56 = add nsw i32 %55, 1
  %57 = zext i32 %56 to i64
  %58 = load i32, ptr %3, align 4, !tbaa !11
  %59 = add nsw i32 %58, 1
  %60 = zext i32 %59 to i64
  %61 = mul nuw i64 %57, %60
  %62 = alloca i64, i64 %61, align 16
  store i64 %57, ptr %7, align 8
  store i64 %60, ptr %8, align 8
  %63 = load i32, ptr %2, align 4, !tbaa !11
  %64 = zext i32 %63 to i64
  %65 = load i32, ptr %2, align 4, !tbaa !11
  %66 = zext i32 %65 to i64
  %67 = mul nuw i64 %64, %66
  %68 = alloca i64, i64 %67, align 16
  store i64 %64, ptr %9, align 8
  store i64 %66, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  store i64 2147483647, ptr %11, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %69

69:                                               ; preds = %238, %54
  %70 = load i32, ptr %12, align 4, !tbaa !11
  %71 = load i32, ptr %2, align 4, !tbaa !11
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %241

74:                                               ; preds = %69
  %75 = mul nsw i64 0, %66
  %76 = getelementptr inbounds i64, ptr %68, i64 %75
  %77 = load i32, ptr %2, align 4, !tbaa !11
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = mul nsw i64 %79, %66
  %81 = getelementptr inbounds i64, ptr %68, i64 %80
  %82 = load i32, ptr %2, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i64, ptr %81, i64 %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 2147483647, ptr %14, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %76, ptr noundef %84, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !11
  br label %85

85:                                               ; preds = %123, %74
  %86 = load i32, ptr %15, align 4, !tbaa !11
  %87 = load i32, ptr %2, align 4, !tbaa !11
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %90, label %89

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

90:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %91

91:                                               ; preds = %119, %90
  %92 = load i32, ptr %15, align 4, !tbaa !11
  %93 = load i32, ptr %17, align 4, !tbaa !11
  %94 = add nsw i32 %92, %93
  %95 = load i32, ptr %2, align 4, !tbaa !11
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %98, label %97

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

98:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %99 = load i32, ptr %15, align 4, !tbaa !11
  %100 = load i32, ptr %17, align 4, !tbaa !11
  %101 = add nsw i32 %99, %100
  store i32 %101, ptr %18, align 4, !tbaa !11
  %102 = load i32, ptr %17, align 4, !tbaa !11
  %103 = load i32, ptr %18, align 4, !tbaa !11
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %40, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !11
  %107 = mul nsw i32 %102, %106
  %108 = sext i32 %107 to i64
  %109 = load i64, ptr %16, align 8, !tbaa !15
  %110 = add nsw i64 %109, %108
  store i64 %110, ptr %16, align 8, !tbaa !15
  %111 = load i64, ptr %16, align 8, !tbaa !15
  %112 = load i32, ptr %15, align 4, !tbaa !11
  %113 = sext i32 %112 to i64
  %114 = mul nsw i64 %113, %66
  %115 = getelementptr inbounds i64, ptr %68, i64 %114
  %116 = load i32, ptr %18, align 4, !tbaa !11
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i64, ptr %115, i64 %117
  store i64 %111, ptr %118, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %119

119:                                              ; preds = %98
  %120 = load i32, ptr %17, align 4, !tbaa !11
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %17, align 4, !tbaa !11
  br label %91, !llvm.loop !17

122:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %15, align 4, !tbaa !11
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %15, align 4, !tbaa !11
  br label %85, !llvm.loop !18

126:                                              ; preds = %89
  %127 = mul nsw i64 0, %60
  %128 = getelementptr inbounds i64, ptr %62, i64 %127
  %129 = load i32, ptr %2, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = mul nsw i64 %130, %60
  %132 = getelementptr inbounds i64, ptr %62, i64 %131
  %133 = load i32, ptr %3, align 4, !tbaa !11
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds i64, ptr %132, i64 %134
  %136 = getelementptr inbounds i64, ptr %135, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 2147483647, ptr %19, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %128, ptr noundef %136, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  %137 = mul nsw i64 0, %60
  %138 = getelementptr inbounds i64, ptr %62, i64 %137
  %139 = getelementptr inbounds i64, ptr %138, i64 0
  store i64 0, ptr %139, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  store i32 1, ptr %20, align 4, !tbaa !11
  br label %140

140:                                              ; preds = %208, %126
  %141 = load i32, ptr %20, align 4, !tbaa !11
  %142 = load i32, ptr %2, align 4, !tbaa !11
  %143 = icmp sle i32 %141, %142
  br i1 %143, label %145, label %144

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

145:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 1, ptr %21, align 4, !tbaa !11
  br label %146

146:                                              ; preds = %204, %145
  %147 = load i32, ptr %21, align 4, !tbaa !11
  %148 = load i32, ptr %3, align 4, !tbaa !11
  %149 = icmp sle i32 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %146
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %207

151:                                              ; preds = %146
  %152 = load i32, ptr %20, align 4, !tbaa !11
  %153 = sext i32 %152 to i64
  %154 = mul nsw i64 %153, %60
  %155 = getelementptr inbounds i64, ptr %62, i64 %154
  %156 = load i32, ptr %21, align 4, !tbaa !11
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i64, ptr %155, i64 %157
  store i64 2147483647, ptr %158, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %159

159:                                              ; preds = %200, %151
  %160 = load i32, ptr %22, align 4, !tbaa !11
  %161 = load i32, ptr %20, align 4, !tbaa !11
  %162 = icmp slt i32 %160, %161
  br i1 %162, label %164, label %163

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

164:                                              ; preds = %159
  %165 = load i32, ptr %20, align 4, !tbaa !11
  %166 = sext i32 %165 to i64
  %167 = mul nsw i64 %166, %60
  %168 = getelementptr inbounds i64, ptr %62, i64 %167
  %169 = load i32, ptr %21, align 4, !tbaa !11
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i64, ptr %168, i64 %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %172 = load i32, ptr %22, align 4, !tbaa !11
  %173 = sext i32 %172 to i64
  %174 = mul nsw i64 %173, %60
  %175 = getelementptr inbounds i64, ptr %62, i64 %174
  %176 = load i32, ptr %21, align 4, !tbaa !11
  %177 = sub nsw i32 %176, 1
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds i64, ptr %175, i64 %178
  %180 = load i64, ptr %179, align 8, !tbaa !15
  %181 = load i32, ptr %22, align 4, !tbaa !11
  %182 = sext i32 %181 to i64
  %183 = mul nsw i64 %182, %66
  %184 = getelementptr inbounds i64, ptr %68, i64 %183
  %185 = load i32, ptr %20, align 4, !tbaa !11
  %186 = sub nsw i32 %185, 1
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i64, ptr %184, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !15
  %190 = add nsw i64 %180, %189
  store i64 %190, ptr %23, align 8, !tbaa !15
  %191 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %171, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %192 = load i64, ptr %191, align 8, !tbaa !15
  %193 = load i32, ptr %20, align 4, !tbaa !11
  %194 = sext i32 %193 to i64
  %195 = mul nsw i64 %194, %60
  %196 = getelementptr inbounds i64, ptr %62, i64 %195
  %197 = load i32, ptr %21, align 4, !tbaa !11
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i64, ptr %196, i64 %198
  store i64 %192, ptr %199, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %200

200:                                              ; preds = %164
  %201 = load i32, ptr %22, align 4, !tbaa !11
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %22, align 4, !tbaa !11
  br label %159, !llvm.loop !19

203:                                              ; preds = %163
  br label %204

204:                                              ; preds = %203
  %205 = load i32, ptr %21, align 4, !tbaa !11
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr %21, align 4, !tbaa !11
  br label %146, !llvm.loop !20

207:                                              ; preds = %150
  br label %208

208:                                              ; preds = %207
  %209 = load i32, ptr %20, align 4, !tbaa !11
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %20, align 4, !tbaa !11
  br label %140, !llvm.loop !21

211:                                              ; preds = %144
  %212 = load i32, ptr %2, align 4, !tbaa !11
  %213 = sext i32 %212 to i64
  %214 = mul nsw i64 %213, %60
  %215 = getelementptr inbounds i64, ptr %62, i64 %214
  %216 = load i32, ptr %3, align 4, !tbaa !11
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i64, ptr %215, i64 %217
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %218)
  %220 = load i64, ptr %219, align 8, !tbaa !15
  store i64 %220, ptr %11, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 1, ptr %24, align 4, !tbaa !11
  br label %221

221:                                              ; preds = %234, %211
  %222 = load i32, ptr %24, align 4, !tbaa !11
  %223 = load i32, ptr %2, align 4, !tbaa !11
  %224 = icmp slt i32 %222, %223
  br i1 %224, label %226, label %225

225:                                              ; preds = %221
  store i32 23, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %237

226:                                              ; preds = %221
  %227 = load i32, ptr %24, align 4, !tbaa !11
  %228 = sub nsw i32 %227, 1
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds i32, ptr %40, i64 %229
  %231 = load i32, ptr %24, align 4, !tbaa !11
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds i32, ptr %40, i64 %232
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %230, ptr noundef nonnull align 4 dereferenceable(4) %233) #8
  br label %234

234:                                              ; preds = %226
  %235 = load i32, ptr %24, align 4, !tbaa !11
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %24, align 4, !tbaa !11
  br label %221, !llvm.loop !22

237:                                              ; preds = %225
  br label %238

238:                                              ; preds = %237
  %239 = load i32, ptr %12, align 4, !tbaa !11
  %240 = add nsw i32 %239, 1
  store i32 %240, ptr %12, align 4, !tbaa !11
  br label %69, !llvm.loop !23

241:                                              ; preds = %73
  %242 = load i64, ptr %11, align 8, !tbaa !15
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %242)
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %243, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  %245 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %245)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %246 = load i32, ptr %1, align 4
  ret i32 %246
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7 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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

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

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


; 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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = load ptr, ptr @stdin, align 8, !tbaa !8
  %14 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %13)
  %15 = load ptr, ptr @stdout, align 8, !tbaa !8
  %16 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %19 = load i32, ptr %1, align 4, !tbaa !11
  %20 = zext i32 %19 to i64
  %21 = call ptr @llvm.stacksave.p0()
  %22 = alloca i32, i64 %20, align 16
  %23 = load i32, ptr %1, align 4, !tbaa !11
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %25 = phi i32 [ %23, %0 ], [ %39, %.lr.ph ]
  %26 = add nsw i32 %25, 1
  %27 = zext i32 %26 to i64
  %28 = load i32, ptr %2, align 4, !tbaa !11
  %29 = add nsw i32 %28, 1
  %30 = zext i32 %29 to i64
  %31 = mul nuw i64 %30, %27
  %32 = alloca i64, i64 %31, align 16
  %33 = zext i32 %25 to i64
  %34 = mul nuw i64 %33, %33
  %35 = alloca i64, i64 %34, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store i64 2147483647, ptr %3, align 8, !tbaa !13
  %36 = icmp sgt i32 %25, 0
  br i1 %36, label %.lr.ph85, label %._crit_edge86

.lr.ph85:                                         ; preds = %._crit_edge
  %invariant.gep69 = getelementptr i8, ptr %32, i64 -8
  %invariant.gep = getelementptr i8, ptr %35, i64 -8
  br label %45

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %37 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %39 = load i32, ptr %1, align 4, !tbaa !11
  %40 = sext i32 %39 to i64
  %41 = icmp slt i64 %indvars.iv.next, %40
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge86.loopexit:                           ; preds = %._crit_edge82
  %.pre115 = load i64, ptr %3, align 8, !tbaa !13
  br label %._crit_edge86

._crit_edge86:                                    ; preds = %._crit_edge86.loopexit, %._crit_edge
  %42 = phi i64 [ %.pre115, %._crit_edge86.loopexit ], [ 2147483647, %._crit_edge ]
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.stackrestore.p0(ptr %21)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

45:                                               ; preds = %.lr.ph85, %._crit_edge82
  %46 = phi i32 [ %25, %.lr.ph85 ], [ %124, %._crit_edge82 ]
  %.04683 = phi i32 [ 0, %.lr.ph85 ], [ %125, %._crit_edge82 ]
  %47 = add nsw i32 %46, -1
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 %48, %33
  %50 = getelementptr inbounds i64, ptr %35, i64 %49
  %51 = sext i32 %46 to i64
  %52 = getelementptr inbounds i64, ptr %50, i64 %51
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 2147483647, ptr %4, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %35, ptr noundef nonnull %52, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %53 = load i32, ptr %1, align 4, !tbaa !11
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.preheader54.preheader, label %._crit_edge61

.preheader54.preheader:                           ; preds = %45
  %wide.trip.count98 = zext nneg i32 %53 to i64
  br label %.preheader54

.preheader54:                                     ; preds = %.preheader54.preheader, %76
  %indvars.iv95 = phi i64 [ 0, %.preheader54.preheader ], [ %indvars.iv.next96, %76 ]
  %indvars.iv93 = phi i32 [ %53, %.preheader54.preheader ], [ %indvars.iv.next94, %76 ]
  %55 = zext i32 %indvars.iv93 to i64
  %56 = mul nuw nsw i64 %indvars.iv95, %33
  %57 = getelementptr inbounds i64, ptr %35, i64 %56
  %xtraiter = and i64 %55, 1
  %58 = icmp eq i32 %indvars.iv93, 1
  br i1 %58, label %.unr-lcssa, label %.preheader54.new

.preheader54.new:                                 ; preds = %.preheader54
  %unroll_iter = and i64 %55, 4294967294
  br label %77

._crit_edge61:                                    ; preds = %76, %45
  %59 = sext i32 %53 to i64
  %60 = mul nsw i64 %59, %30
  %61 = getelementptr inbounds i64, ptr %32, i64 %60
  %62 = load i32, ptr %2, align 4, !tbaa !11
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i64, ptr %61, i64 %63
  %65 = getelementptr inbounds i8, ptr %64, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 2147483647, ptr %5, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull %32, ptr noundef nonnull %65, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  store i64 0, ptr %32, align 16, !tbaa !13
  %66 = load i32, ptr %1, align 4, !tbaa !11
  %.not75 = icmp slt i32 %66, 1
  %.pre114 = load i32, ptr %2, align 4, !tbaa !11
  %67 = icmp slt i32 %.pre114, 1
  %or.cond = select i1 %.not75, i1 true, i1 %67
  br i1 %or.cond, label %._crit_edge77, label %.preheader

.unr-lcssa:                                       ; preds = %77, %.preheader54
  %indvars.iv90.unr = phi i64 [ 0, %.preheader54 ], [ %indvars.iv.next91.1, %77 ]
  %.04458.unr = phi i64 [ 0, %.preheader54 ], [ %92, %77 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %76, label %.epilog-lcssa

.epilog-lcssa:                                    ; preds = %.unr-lcssa
  %68 = add nuw nsw i64 %indvars.iv90.unr, %indvars.iv95
  %69 = getelementptr inbounds i32, ptr %22, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = trunc nuw nsw i64 %indvars.iv90.unr to i32
  %72 = mul nsw i32 %70, %71
  %73 = sext i32 %72 to i64
  %74 = add nsw i64 %.04458.unr, %73
  %75 = getelementptr inbounds i64, ptr %57, i64 %68
  store i64 %74, ptr %75, align 8, !tbaa !13
  br label %76

76:                                               ; preds = %.unr-lcssa, %.epilog-lcssa
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %indvars.iv.next94 = add i32 %indvars.iv93, -1
  %exitcond99.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count98
  br i1 %exitcond99.not, label %._crit_edge61, label %.preheader54, !llvm.loop !17

77:                                               ; preds = %77, %.preheader54.new
  %indvars.iv90 = phi i64 [ 0, %.preheader54.new ], [ %indvars.iv.next91.1, %77 ]
  %.04458 = phi i64 [ 0, %.preheader54.new ], [ %92, %77 ]
  %niter = phi i64 [ 0, %.preheader54.new ], [ %niter.next.1, %77 ]
  %78 = add nuw nsw i64 %indvars.iv90, %indvars.iv95
  %79 = getelementptr inbounds i32, ptr %22, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !11
  %81 = trunc nuw nsw i64 %indvars.iv90 to i32
  %82 = mul nsw i32 %80, %81
  %83 = sext i32 %82 to i64
  %84 = add nsw i64 %.04458, %83
  %85 = getelementptr inbounds i64, ptr %57, i64 %78
  store i64 %84, ptr %85, align 8, !tbaa !13
  %indvars.iv.next91 = or disjoint i64 %indvars.iv90, 1
  %86 = add nuw nsw i64 %indvars.iv.next91, %indvars.iv95
  %87 = getelementptr inbounds i32, ptr %22, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !11
  %89 = trunc nuw nsw i64 %indvars.iv.next91 to i32
  %90 = mul nsw i32 %88, %89
  %91 = sext i32 %90 to i64
  %92 = add nsw i64 %84, %91
  %93 = getelementptr inbounds i64, ptr %57, i64 %86
  store i64 %92, ptr %93, align 8, !tbaa !13
  %indvars.iv.next91.1 = add nuw nsw i64 %indvars.iv90, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.unr-lcssa, label %77, !llvm.loop !18

.preheader:                                       ; preds = %._crit_edge61, %._crit_edge74
  %94 = phi i32 [ %108, %._crit_edge74 ], [ %66, %._crit_edge61 ]
  %95 = phi i32 [ %109, %._crit_edge74 ], [ %.pre114, %._crit_edge61 ]
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %._crit_edge74 ], [ 1, %._crit_edge61 ]
  %.not5371 = icmp slt i32 %95, 1
  br i1 %.not5371, label %._crit_edge74, label %.lr.ph73

.lr.ph73:                                         ; preds = %.preheader
  %96 = mul nuw nsw i64 %indvars.iv108, %30
  %97 = getelementptr inbounds i64, ptr %32, i64 %96
  %gep70 = getelementptr i64, ptr %invariant.gep, i64 %indvars.iv108
  br label %111

._crit_edge77:                                    ; preds = %._crit_edge74, %._crit_edge61
  %98 = phi i32 [ %.pre114, %._crit_edge61 ], [ %109, %._crit_edge74 ]
  %.lcssa55 = phi i32 [ %66, %._crit_edge61 ], [ %108, %._crit_edge74 ]
  %99 = sext i32 %.lcssa55 to i64
  %100 = mul nsw i64 %99, %30
  %101 = getelementptr inbounds i64, ptr %32, i64 %100
  %102 = sext i32 %98 to i64
  %103 = getelementptr inbounds i64, ptr %101, i64 %102
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %103)
  %105 = load i64, ptr %104, align 8, !tbaa !13
  store i64 %105, ptr %3, align 8, !tbaa !13
  %106 = load i32, ptr %1, align 4, !tbaa !11
  %107 = icmp sgt i32 %106, 1
  br i1 %107, label %.lr.ph81, label %._crit_edge82

._crit_edge74.loopexit:                           ; preds = %113
  %.pre = load i32, ptr %1, align 4, !tbaa !11
  br label %._crit_edge74

._crit_edge74:                                    ; preds = %._crit_edge74.loopexit, %.preheader
  %108 = phi i32 [ %.pre, %._crit_edge74.loopexit ], [ %94, %.preheader ]
  %109 = phi i32 [ %114, %._crit_edge74.loopexit ], [ %95, %.preheader ]
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %110 = sext i32 %108 to i64
  %.not.not = icmp slt i64 %indvars.iv108, %110
  br i1 %.not.not, label %.preheader, label %._crit_edge77, !llvm.loop !19

111:                                              ; preds = %.lr.ph73, %113
  %indvars.iv105 = phi i64 [ 1, %.lr.ph73 ], [ %indvars.iv.next106, %113 ]
  %112 = getelementptr inbounds i64, ptr %97, i64 %indvars.iv105
  store i64 2147483647, ptr %112, align 8, !tbaa !13
  %gep = getelementptr i64, ptr %invariant.gep69, i64 %indvars.iv105
  br label %116

113:                                              ; preds = %116
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %114 = load i32, ptr %2, align 4, !tbaa !11
  %115 = sext i32 %114 to i64
  %.not53.not = icmp slt i64 %indvars.iv105, %115
  br i1 %.not53.not, label %111, label %._crit_edge74.loopexit, !llvm.loop !21

116:                                              ; preds = %111, %116
  %indvars.iv100 = phi i64 [ 0, %111 ], [ %indvars.iv.next101, %116 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %117 = mul nuw nsw i64 %indvars.iv100, %30
  %gep64 = getelementptr i64, ptr %gep, i64 %117
  %118 = load i64, ptr %gep64, align 8, !tbaa !13
  %119 = mul nuw nsw i64 %indvars.iv100, %33
  %gep67 = getelementptr i64, ptr %gep70, i64 %119
  %120 = load i64, ptr %gep67, align 8, !tbaa !13
  %121 = add nsw i64 %120, %118
  store i64 %121, ptr %6, align 8, !tbaa !13
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %123 = load i64, ptr %122, align 8, !tbaa !13
  store i64 %123, ptr %112, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next101, %indvars.iv108
  br i1 %exitcond104.not, label %113, label %116, !llvm.loop !22

._crit_edge82:                                    ; preds = %.lr.ph81, %._crit_edge77
  %124 = phi i32 [ %106, %._crit_edge77 ], [ %129, %.lr.ph81 ]
  %125 = add nuw nsw i32 %.04683, 1
  %126 = icmp slt i32 %125, %124
  br i1 %126, label %45, label %._crit_edge86.loopexit, !llvm.loop !23

.lr.ph81:                                         ; preds = %._crit_edge77, %.lr.ph81
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %.lr.ph81 ], [ 1, %._crit_edge77 ]
  %127 = getelementptr i32, ptr %22, i64 %indvars.iv111
  %128 = getelementptr i8, ptr %127, i64 -4
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %128, ptr noundef nonnull align 4 dereferenceable(4) %127) #8
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %129 = load i32, ptr %1, align 4, !tbaa !11
  %130 = sext i32 %129 to i64
  %131 = icmp slt i64 %indvars.iv.next112, %130
  br i1 %131, label %.lr.ph81, label %._crit_edge82, !llvm.loop !24
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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 #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #4

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

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

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


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