; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/286 Division 2/Problem E (1)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@h = external dso_local global [100010 x i64], align 16
@a = external dso_local global [100010 x i64], align 16
@l = external dso_local global [100010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", 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 i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i8, align 1
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca [10010 x i32], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  %25 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %26 = 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)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) @p)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %30

30:                                               ; preds = %44, %0
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = load i32, ptr @n, align 4, !tbaa !8
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %30
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %37
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %38)
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %41
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(8) %42)
  br label %44

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

47:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %48

48:                                               ; preds = %69, %47
  %49 = load i32, ptr %3, align 4, !tbaa !8
  %50 = load i32, ptr @n, align 4, !tbaa !8
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %72

53:                                               ; preds = %48
  %54 = load i32, ptr %3, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !13
  %58 = load i32, ptr %3, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !13
  %62 = load i32, ptr @m, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = mul nsw i64 %61, %63
  %65 = add nsw i64 %57, %64
  %66 = load i32, ptr %3, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %67
  store i64 %65, ptr %68, align 8, !tbaa !13
  br label %69

69:                                               ; preds = %53
  %70 = load i32, ptr %3, align 4, !tbaa !8
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %3, align 4, !tbaa !8
  br label %48, !llvm.loop !15

72:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  store i64 0, ptr %4, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  store i64 20000000000000, ptr %5, align 8, !tbaa !13
  br label %73

73:                                               ; preds = %267, %72
  %74 = load i64, ptr %4, align 8, !tbaa !13
  %75 = add nsw i64 %74, 1
  %76 = load i64, ptr %5, align 8, !tbaa !13
  %77 = icmp slt i64 %75, %76
  br i1 %77, label %78, label %269

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %79 = load i64, ptr %4, align 8, !tbaa !13
  %80 = load i64, ptr %5, align 8, !tbaa !13
  %81 = add nsw i64 %79, %80
  %82 = sdiv i64 %81, 2
  store i64 %82, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  store i8 1, ptr %7, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  store i64 0, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %83

83:                                               ; preds = %106, %78
  %84 = load i32, ptr %9, align 4, !tbaa !8
  %85 = load i32, ptr @n, align 4, !tbaa !8
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %109

88:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store i64 0, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %89 = load i32, ptr %9, align 4, !tbaa !8
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !13
  %93 = load i64, ptr %6, align 8, !tbaa !13
  %94 = sub nsw i64 %92, %93
  %95 = load i32, ptr @p, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = add nsw i64 %94, %96
  %98 = sub nsw i64 %97, 1
  %99 = load i32, ptr @p, align 4, !tbaa !8
  %100 = sext i32 %99 to i64
  %101 = sdiv i64 %98, %100
  store i64 %101, ptr %11, align 8, !tbaa !13
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %103 = load i64, ptr %102, align 8, !tbaa !13
  %104 = load i64, ptr %8, align 8, !tbaa !13
  %105 = add nsw i64 %104, %103
  store i64 %105, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %106

106:                                              ; preds = %88
  %107 = load i32, ptr %9, align 4, !tbaa !8
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %9, align 4, !tbaa !8
  br label %83, !llvm.loop !18

109:                                              ; preds = %87
  %110 = load i64, ptr %8, align 8, !tbaa !13
  %111 = load i32, ptr @m, align 4, !tbaa !8
  %112 = load i32, ptr @k, align 4, !tbaa !8
  %113 = mul nsw i32 %111, %112
  %114 = sext i32 %113 to i64
  %115 = icmp sgt i64 %110, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %109
  store i8 0, ptr %7, align 1, !tbaa !16
  br label %260

117:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 40040, ptr %12) #8
  call void @llvm.memset.p0.i64(ptr align 16 %12, i8 0, i64 40040, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %118

118:                                              ; preds = %227, %117
  %119 = load i32, ptr %13, align 4, !tbaa !8
  %120 = load i32, ptr @n, align 4, !tbaa !8
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 13, ptr %14, align 4
  br label %230

123:                                              ; preds = %118
  %124 = load i32, ptr %13, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !13
  %128 = load i64, ptr %6, align 8, !tbaa !13
  %129 = icmp sgt i64 %127, %128
  br i1 %129, label %130, label %226

130:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %131 = load i32, ptr %13, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !13
  %135 = load i64, ptr %6, align 8, !tbaa !13
  %136 = sub nsw i64 %134, %135
  %137 = load i32, ptr @p, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = srem i64 %136, %138
  %140 = icmp eq i64 %139, 0
  br i1 %140, label %141, label %144

141:                                              ; preds = %130
  %142 = load i32, ptr @p, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  br label %154

144:                                              ; preds = %130
  %145 = load i32, ptr %13, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !13
  %149 = load i64, ptr %6, align 8, !tbaa !13
  %150 = sub nsw i64 %148, %149
  %151 = load i32, ptr @p, align 4, !tbaa !8
  %152 = sext i32 %151 to i64
  %153 = srem i64 %150, %152
  br label %154

154:                                              ; preds = %144, %141
  %155 = phi i64 [ %143, %141 ], [ %153, %144 ]
  store i64 %155, ptr %15, align 8, !tbaa !13
  br label %156

156:                                              ; preds = %218, %154
  %157 = load i64, ptr %15, align 8, !tbaa !13
  %158 = load i32, ptr %13, align 4, !tbaa !8
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !13
  %162 = load i64, ptr %6, align 8, !tbaa !13
  %163 = sub nsw i64 %161, %162
  %164 = icmp sle i64 %157, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %156
  store i32 16, ptr %14, align 4
  br label %223

166:                                              ; preds = %156
  %167 = load i64, ptr %15, align 8, !tbaa !13
  %168 = load i32, ptr %13, align 4, !tbaa !8
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %169
  %171 = load i64, ptr %170, align 8, !tbaa !13
  %172 = sub nsw i64 %167, %171
  %173 = icmp sle i64 %172, 0
  br i1 %173, label %174, label %178

174:                                              ; preds = %166
  %175 = getelementptr inbounds [10010 x i32], ptr %12, i64 0, i64 0
  %176 = load i32, ptr %175, align 16, !tbaa !8
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %175, align 16, !tbaa !8
  br label %217

178:                                              ; preds = %166
  %179 = load i64, ptr %15, align 8, !tbaa !13
  %180 = load i32, ptr %13, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %181
  %183 = load i64, ptr %182, align 8, !tbaa !13
  %184 = sub nsw i64 %179, %183
  %185 = load i32, ptr %13, align 4, !tbaa !8
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %186
  %188 = load i64, ptr %187, align 8, !tbaa !13
  %189 = load i32, ptr @m, align 4, !tbaa !8
  %190 = sub nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = mul nsw i64 %188, %191
  %193 = icmp sgt i64 %184, %192
  br i1 %193, label %194, label %195

194:                                              ; preds = %178
  store i8 0, ptr %7, align 1, !tbaa !16
  store i32 19, ptr %14, align 4
  br label %223

195:                                              ; preds = %178
  %196 = load i64, ptr %15, align 8, !tbaa !13
  %197 = load i32, ptr %13, align 4, !tbaa !8
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !13
  %201 = sub nsw i64 %196, %200
  %202 = load i32, ptr %13, align 4, !tbaa !8
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %203
  %205 = load i64, ptr %204, align 8, !tbaa !13
  %206 = add nsw i64 %201, %205
  %207 = sub nsw i64 %206, 1
  %208 = load i32, ptr %13, align 4, !tbaa !8
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %209
  %211 = load i64, ptr %210, align 8, !tbaa !13
  %212 = sdiv i64 %207, %211
  %213 = getelementptr inbounds [10010 x i32], ptr %12, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !8
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %213, align 4, !tbaa !8
  br label %216

216:                                              ; preds = %195
  br label %217

217:                                              ; preds = %216, %174
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr @p, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = load i64, ptr %15, align 8, !tbaa !13
  %222 = add nsw i64 %221, %220
  store i64 %222, ptr %15, align 8, !tbaa !13
  br label %156, !llvm.loop !19

223:                                              ; preds = %194, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  %224 = load i32, ptr %14, align 4
  switch i32 %224, label %230 [
    i32 16, label %225
  ]

225:                                              ; preds = %223
  br label %226

226:                                              ; preds = %225, %123
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %13, align 4, !tbaa !8
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %13, align 4, !tbaa !8
  br label %118, !llvm.loop !20

230:                                              ; preds = %223, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  %231 = load i32, ptr %14, align 4
  switch i32 %231, label %257 [
    i32 13, label %232
  ]

232:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !8
  br label %233

233:                                              ; preds = %250, %232
  %234 = load i32, ptr %17, align 4, !tbaa !8
  %235 = load i32, ptr @m, align 4, !tbaa !8
  %236 = icmp slt i32 %234, %235
  br i1 %236, label %238, label %237

237:                                              ; preds = %233
  store i32 20, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %253

238:                                              ; preds = %233
  %239 = load i32, ptr %17, align 4, !tbaa !8
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [10010 x i32], ptr %12, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !8
  %243 = load i32, ptr %16, align 4, !tbaa !8
  %244 = add nsw i32 %243, %242
  store i32 %244, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %245 = load i32, ptr %16, align 4, !tbaa !8
  %246 = load i32, ptr @k, align 4, !tbaa !8
  %247 = sub nsw i32 %245, %246
  store i32 %247, ptr %19, align 4, !tbaa !8
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %249 = load i32, ptr %248, align 4, !tbaa !8
  store i32 %249, ptr %16, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %250

250:                                              ; preds = %238
  %251 = load i32, ptr %17, align 4, !tbaa !8
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %17, align 4, !tbaa !8
  br label %233, !llvm.loop !21

253:                                              ; preds = %237
  %254 = load i32, ptr %16, align 4, !tbaa !8
  %255 = icmp eq i32 %254, 0
  %256 = zext i1 %255 to i8
  store i8 %256, ptr %7, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  store i32 0, ptr %14, align 4
  br label %257

257:                                              ; preds = %253, %230
  call void @llvm.lifetime.end.p0(i64 40040, ptr %12) #8
  %258 = load i32, ptr %14, align 4
  switch i32 %258, label %274 [
    i32 0, label %259
    i32 19, label %261
  ]

259:                                              ; preds = %257
  br label %260

260:                                              ; preds = %259, %116
  br label %261

261:                                              ; preds = %260, %257
  %262 = load i64, ptr %6, align 8, !tbaa !13
  %263 = load i8, ptr %7, align 1, !tbaa !16, !range !22, !noundef !23
  %264 = trunc i8 %263 to i1
  br i1 %264, label %265, label %266

265:                                              ; preds = %261
  br label %267

266:                                              ; preds = %261
  br label %267

267:                                              ; preds = %266, %265
  %268 = phi ptr [ %5, %265 ], [ %4, %266 ]
  store i64 %262, ptr %268, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %73, !llvm.loop !24

269:                                              ; preds = %73
  %270 = load i64, ptr %5, align 8, !tbaa !13
  %271 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %270)
  %272 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %271, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  %273 = load i32, ptr %1, align 4
  ret i32 %273

274:                                              ; preds = %257
  unreachable
}

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

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

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

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

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !10, i64 0}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !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
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@h = external dso_local global [100010 x i64], align 16
@a = external dso_local global [100010 x i64], align 16
@l = external dso_local local_unnamed_addr global [100010 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", 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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [10010 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %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 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @p)
  %16 = load i32, ptr @n, align 4, !tbaa !8
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %.preheader.preheader

.preheader76:                                     ; preds = %.lr.ph
  %18 = icmp sgt i32 %36, 0
  br i1 %18, label %.lr.ph80, label %.preheader.preheader

.lr.ph80:                                         ; preds = %.preheader76
  %19 = load i32, ptr @m, align 4, !tbaa !8
  %20 = sext i32 %19 to i64
  %wide.trip.count = zext nneg i32 %36 to i64
  %min.iters.check = icmp ult i32 %36, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph80
  %indvars.iv105.ph = phi i64 [ 0, %.lr.ph80 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph80
  %n.vec = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %20, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %21 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %index
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %wide.load = load <2 x i64>, ptr %21, align 16, !tbaa !11
  %wide.load146 = load <2 x i64>, ptr %22, align 16, !tbaa !11
  %23 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %index
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %wide.load147 = load <2 x i64>, ptr %23, align 16, !tbaa !11
  %wide.load148 = load <2 x i64>, ptr %24, align 16, !tbaa !11
  %25 = mul nsw <2 x i64> %wide.load147, %broadcast.splat
  %26 = mul nsw <2 x i64> %wide.load148, %broadcast.splat
  %27 = add nsw <2 x i64> %25, %wide.load
  %28 = add nsw <2 x i64> %26, %wide.load146
  %29 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %index
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  store <2 x i64> %27, ptr %29, align 16, !tbaa !11
  store <2 x i64> %28, ptr %30, align 16, !tbaa !11
  %index.next = add nuw i64 %index, 4
  %31 = icmp eq i64 %index.next, %n.vec
  br i1 %31, label %middle.block, label %vector.body, !llvm.loop !13

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

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %32 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %indvars.iv
  %33 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %32)
  %34 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv
  %35 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %36 = load i32, ptr @n, align 4, !tbaa !8
  %37 = sext i32 %36 to i64
  %38 = icmp slt i64 %indvars.iv.next, %37
  br i1 %38, label %.lr.ph, label %.preheader76, !llvm.loop !17

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %scalar.ph ], [ %indvars.iv105.ph, %scalar.ph.preheader ]
  %39 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %indvars.iv105
  %40 = load i64, ptr %39, align 8, !tbaa !11
  %41 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv105
  %42 = load i64, ptr %41, align 8, !tbaa !11
  %43 = mul nsw i64 %42, %20
  %44 = add nsw i64 %43, %40
  %45 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %indvars.iv105
  store i64 %44, ptr %45, align 8, !tbaa !11
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next106, %wide.trip.count
  br i1 %exitcond.not, label %.preheader.preheader, label %scalar.ph, !llvm.loop !18

.preheader.preheader:                             ; preds = %scalar.ph, %middle.block, %0, %.preheader76
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.thread130
  %.06499 = phi i64 [ %118, %.thread130 ], [ 20000000000000, %.preheader.preheader ]
  %.06698 = phi i64 [ %117, %.thread130 ], [ 0, %.preheader.preheader ]
  %46 = add nuw nsw i64 %.06499, %.06698
  %47 = lshr i64 %46, 1
  %48 = load i32, ptr @n, align 4, !tbaa !8
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph83, label %._crit_edge

.lr.ph83:                                         ; preds = %.preheader
  %50 = xor i64 %47, -1
  br label %56

._crit_edge:                                      ; preds = %56, %.preheader
  %.060.lcssa = phi i64 [ 0, %.preheader ], [ %66, %56 ]
  %.lcssa = phi i32 [ %48, %.preheader ], [ %67, %56 ]
  %51 = load i32, ptr @m, align 4, !tbaa !8
  %52 = load i32, ptr @k, align 4, !tbaa !8
  %53 = mul nsw i32 %52, %51
  %54 = sext i32 %53 to i64
  %55 = icmp sgt i64 %.060.lcssa, %54
  br i1 %55, label %.thread130, label %70

56:                                               ; preds = %.lr.ph83, %56
  %indvars.iv108 = phi i64 [ 0, %.lr.ph83 ], [ %indvars.iv.next109, %56 ]
  %.06081 = phi i64 [ 0, %.lr.ph83 ], [ %66, %56 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store i64 0, ptr %1, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %57 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %indvars.iv108
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = load i32, ptr @p, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = add i64 %58, %50
  %62 = add i64 %61, %60
  %63 = sdiv i64 %62, %60
  store i64 %63, ptr %2, align 8, !tbaa !11
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = add nsw i64 %65, %.06081
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %67 = load i32, ptr @n, align 4, !tbaa !8
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next109, %68
  br i1 %69, label %56, label %._crit_edge, !llvm.loop !19

70:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 40040, ptr nonnull %3) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40040) %3, i8 0, i64 40040, i1 false)
  %.not7390 = icmp slt i32 %.lcssa, 1
  br i1 %.not7390, label %.critedge.preheader.loopexit, label %.lr.ph93

.lr.ph93:                                         ; preds = %70
  %71 = load i32, ptr @p, align 4
  %72 = sext i32 %71 to i64
  %73 = add nsw i32 %51, -1
  %74 = sext i32 %73 to i64
  %wide.trip.count114 = zext nneg i32 %.lcssa to i64
  br label %75

75:                                               ; preds = %.lr.ph93, %.thread
  %indvars.iv111 = phi i64 [ 0, %.lr.ph93 ], [ %indvars.iv.next112, %.thread ]
  %76 = getelementptr inbounds [100010 x i64], ptr @l, i64 0, i64 %indvars.iv111
  %77 = load i64, ptr %76, align 8, !tbaa !11
  %78 = icmp sgt i64 %77, %47
  br i1 %78, label %79, label %.thread

79:                                               ; preds = %75
  %80 = sub nsw i64 %77, %47
  %81 = srem i64 %80, %72
  %82 = icmp eq i64 %81, 0
  %. = select i1 %82, i64 %72, i64 %81
  %.not86 = icmp sgt i64 %., %80
  br i1 %.not86, label %.thread, label %.lr.ph89

.lr.ph89:                                         ; preds = %79
  %83 = getelementptr inbounds [100010 x i64], ptr @h, i64 0, i64 %indvars.iv111
  %84 = load i64, ptr %83, align 8, !tbaa !11
  %85 = getelementptr inbounds [100010 x i64], ptr @a, i64 0, i64 %indvars.iv111
  br label %86

86:                                               ; preds = %.lr.ph89, %103
  %.05687 = phi i64 [ %., %.lr.ph89 ], [ %104, %103 ]
  %87 = sub nsw i64 %.05687, %84
  %88 = icmp slt i64 %87, 1
  br i1 %88, label %89, label %92

89:                                               ; preds = %86
  %90 = load i32, ptr %3, align 16, !tbaa !8
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %3, align 16, !tbaa !8
  br label %103

92:                                               ; preds = %86
  %93 = load i64, ptr %85, align 8, !tbaa !11
  %94 = mul nsw i64 %93, %74
  %95 = icmp sgt i64 %87, %94
  br i1 %95, label %.cont.thread123, label %96

.cont.thread123:                                  ; preds = %92
  call void @llvm.lifetime.end.p0(i64 40040, ptr nonnull %3) #8
  br label %.thread130

96:                                               ; preds = %92
  %97 = add nsw i64 %87, -1
  %98 = add i64 %97, %93
  %99 = sdiv i64 %98, %93
  %100 = getelementptr inbounds [10010 x i32], ptr %3, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !8
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %100, align 4, !tbaa !8
  br label %103

103:                                              ; preds = %89, %96
  %104 = add nsw i64 %.05687, %72
  %.not = icmp sgt i64 %104, %80
  br i1 %.not, label %.thread, label %86, !llvm.loop !20

.thread:                                          ; preds = %103, %79, %75
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count114
  br i1 %exitcond115.not, label %.critedge.preheader.loopexit, label %75, !llvm.loop !21

.critedge.preheader.loopexit:                     ; preds = %.thread, %70
  %105 = icmp sgt i32 %51, 0
  br i1 %105, label %.critedge, label %.thread133

.thread133:                                       ; preds = %.critedge.preheader.loopexit
  call void @llvm.lifetime.end.p0(i64 40040, ptr nonnull %3) #8
  br label %.thread130

.critedge:                                        ; preds = %.critedge.preheader.loopexit, %.critedge
  %indvars.iv116 = phi i64 [ %indvars.iv.next117, %.critedge ], [ 0, %.critedge.preheader.loopexit ]
  %.05594 = phi i32 [ %.fr, %.critedge ], [ 0, %.critedge.preheader.loopexit ]
  %106 = getelementptr inbounds [10010 x i32], ptr %3, i64 0, i64 %indvars.iv116
  %107 = load i32, ptr %106, align 4, !tbaa !8
  %108 = add nsw i32 %107, %.05594
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %109 = load i32, ptr @k, align 4, !tbaa !8
  %110 = sub i32 %108, %109
  store i32 %110, ptr %5, align 4, !tbaa !8
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %.fr = freeze i32 %112
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %113 = load i32, ptr @m, align 4, !tbaa !8
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next117, %114
  br i1 %115, label %.critedge, label %.cont, !llvm.loop !22

.cont:                                            ; preds = %.critedge
  %116 = icmp eq i32 %.fr, 0
  call void @llvm.lifetime.end.p0(i64 40040, ptr nonnull %3) #8
  %spec.select = select i1 %116, i64 %.06698, i64 %47
  %spec.select149 = select i1 %116, i64 %47, i64 %.06499
  br label %.thread130

.thread130:                                       ; preds = %.cont, %.thread133, %._crit_edge, %.cont.thread123
  %117 = phi i64 [ %47, %.cont.thread123 ], [ %47, %._crit_edge ], [ %.06698, %.thread133 ], [ %spec.select, %.cont ]
  %118 = phi i64 [ %.06499, %.cont.thread123 ], [ %.06499, %._crit_edge ], [ %47, %.thread133 ], [ %spec.select149, %.cont ]
  %119 = add nuw nsw i64 %117, 1
  %120 = icmp slt i64 %119, %118
  br i1 %120, label %.preheader, label %121, !llvm.loop !23

121:                                              ; preds = %.thread130
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %118)
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #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 #2

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

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14, !16, !15}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


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