; LLVM IR from manishbisht/Competitive-Programming :: Codechef/APRIL21B (Worthy Matrix)

; 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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; 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 i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %29
  %31 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %30, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  %32 = 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)
  br label %33

33:                                               ; preds = %254, %0
  %34 = load i32, ptr %2, align 4, !tbaa !8
  %35 = add nsw i32 %34, -1
  store i32 %35, ptr %2, align 4, !tbaa !8
  %36 = icmp sgt i32 %34, 0
  br i1 %36, label %37, label %259

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %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) %3)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %41 = load i32, ptr %3, align 4, !tbaa !8
  %42 = add nsw i32 %41, 1
  %43 = zext i32 %42 to i64
  %44 = load i32, ptr %4, align 4, !tbaa !8
  %45 = add nsw i32 %44, 1
  %46 = zext i32 %45 to i64
  %47 = call ptr @llvm.stacksave.p0()
  store ptr %47, ptr %6, align 8
  %48 = mul nuw i64 %43, %46
  %49 = alloca i64, i64 %48, align 16
  store i64 %43, ptr %7, align 8
  store i64 %46, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !8
  br label %50

50:                                               ; preds = %74, %37
  %51 = load i32, ptr %9, align 4, !tbaa !8
  %52 = load i32, ptr %3, align 4, !tbaa !8
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %77

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

56:                                               ; preds = %70, %55
  %57 = load i32, ptr %11, align 4, !tbaa !8
  %58 = load i32, ptr %4, align 4, !tbaa !8
  %59 = icmp sle i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %73

61:                                               ; preds = %56
  %62 = load i32, ptr %9, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = mul nsw i64 %63, %46
  %65 = getelementptr inbounds i64, ptr %49, i64 %64
  %66 = load i32, ptr %11, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i64, ptr %65, i64 %67
  %69 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %68)
  br label %70

70:                                               ; preds = %61
  %71 = load i32, ptr %11, align 4, !tbaa !8
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %11, align 4, !tbaa !8
  br label %56, !llvm.loop !11

73:                                               ; preds = %60
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %9, align 4, !tbaa !8
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %9, align 4, !tbaa !8
  br label %50, !llvm.loop !13

77:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %78

78:                                               ; preds = %119, %77
  %79 = load i32, ptr %13, align 4, !tbaa !8
  %80 = load i32, ptr %3, align 4, !tbaa !8
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

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

83:                                               ; preds = %78
  store i64 0, ptr %12, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %84

84:                                               ; preds = %115, %83
  %85 = load i32, ptr %14, align 4, !tbaa !8
  %86 = load i32, ptr %4, align 4, !tbaa !8
  %87 = icmp sle i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  store i32 13, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %118

89:                                               ; preds = %84
  %90 = load i32, ptr %13, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = mul nsw i64 %91, %46
  %93 = getelementptr inbounds i64, ptr %49, i64 %92
  %94 = load i32, ptr %14, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i64, ptr %93, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !14
  %98 = load i64, ptr %12, align 8, !tbaa !14
  %99 = add nsw i64 %97, %98
  %100 = load i32, ptr %13, align 4, !tbaa !8
  %101 = sext i32 %100 to i64
  %102 = mul nsw i64 %101, %46
  %103 = getelementptr inbounds i64, ptr %49, i64 %102
  %104 = load i32, ptr %14, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i64, ptr %103, i64 %105
  store i64 %99, ptr %106, align 8, !tbaa !14
  %107 = load i32, ptr %13, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = mul nsw i64 %108, %46
  %110 = getelementptr inbounds i64, ptr %49, i64 %109
  %111 = load i32, ptr %14, align 4, !tbaa !8
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i64, ptr %110, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !14
  store i64 %114, ptr %12, align 8, !tbaa !14
  br label %115

115:                                              ; preds = %89
  %116 = load i32, ptr %14, align 4, !tbaa !8
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %14, align 4, !tbaa !8
  br label %84, !llvm.loop !16

118:                                              ; preds = %88
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %13, align 4, !tbaa !8
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %13, align 4, !tbaa !8
  br label %78, !llvm.loop !17

122:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 0, ptr %15, align 4, !tbaa !8
  br label %123

123:                                              ; preds = %164, %122
  %124 = load i32, ptr %15, align 4, !tbaa !8
  %125 = load i32, ptr %4, align 4, !tbaa !8
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 16, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %167

128:                                              ; preds = %123
  store i64 0, ptr %12, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !8
  br label %129

129:                                              ; preds = %160, %128
  %130 = load i32, ptr %16, align 4, !tbaa !8
  %131 = load i32, ptr %3, align 4, !tbaa !8
  %132 = icmp sle i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  store i32 19, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %163

134:                                              ; preds = %129
  %135 = load i32, ptr %16, align 4, !tbaa !8
  %136 = sext i32 %135 to i64
  %137 = mul nsw i64 %136, %46
  %138 = getelementptr inbounds i64, ptr %49, i64 %137
  %139 = load i32, ptr %15, align 4, !tbaa !8
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i64, ptr %138, i64 %140
  %142 = load i64, ptr %141, align 8, !tbaa !14
  %143 = load i64, ptr %12, align 8, !tbaa !14
  %144 = add nsw i64 %142, %143
  %145 = load i32, ptr %16, align 4, !tbaa !8
  %146 = sext i32 %145 to i64
  %147 = mul nsw i64 %146, %46
  %148 = getelementptr inbounds i64, ptr %49, i64 %147
  %149 = load i32, ptr %15, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds i64, ptr %148, i64 %150
  store i64 %144, ptr %151, align 8, !tbaa !14
  %152 = load i32, ptr %16, align 4, !tbaa !8
  %153 = sext i32 %152 to i64
  %154 = mul nsw i64 %153, %46
  %155 = getelementptr inbounds i64, ptr %49, i64 %154
  %156 = load i32, ptr %15, align 4, !tbaa !8
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i64, ptr %155, i64 %157
  %159 = load i64, ptr %158, align 8, !tbaa !14
  store i64 %159, ptr %12, align 8, !tbaa !14
  br label %160

160:                                              ; preds = %134
  %161 = load i32, ptr %16, align 4, !tbaa !8
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %16, align 4, !tbaa !8
  br label %129, !llvm.loop !18

163:                                              ; preds = %133
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %15, align 4, !tbaa !8
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %15, align 4, !tbaa !8
  br label %123, !llvm.loop !19

167:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  store i64 0, ptr %17, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 1, ptr %18, align 4, !tbaa !8
  br label %168

168:                                              ; preds = %251, %167
  %169 = load i32, ptr %18, align 4, !tbaa !8
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %171 = load i32, ptr %170, align 4, !tbaa !8
  %172 = icmp sle i32 %169, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %168
  store i32 22, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %254

174:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %175 = load i32, ptr %18, align 4, !tbaa !8
  store i32 %175, ptr %19, align 4, !tbaa !8
  br label %176

176:                                              ; preds = %247, %174
  %177 = load i32, ptr %19, align 4, !tbaa !8
  %178 = load i32, ptr %3, align 4, !tbaa !8
  %179 = icmp sle i32 %177, %178
  br i1 %179, label %181, label %180

180:                                              ; preds = %176
  store i32 25, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %250

181:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %182 = load i32, ptr %18, align 4, !tbaa !8
  store i32 %182, ptr %20, align 4, !tbaa !8
  br label %183

183:                                              ; preds = %243, %181
  %184 = load i32, ptr %20, align 4, !tbaa !8
  %185 = load i32, ptr %4, align 4, !tbaa !8
  %186 = icmp sle i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 28, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %246

188:                                              ; preds = %183
  %189 = load i32, ptr %19, align 4, !tbaa !8
  %190 = load i32, ptr %18, align 4, !tbaa !8
  %191 = sub nsw i32 %189, %190
  %192 = sext i32 %191 to i64
  %193 = mul nsw i64 %192, %46
  %194 = getelementptr inbounds i64, ptr %49, i64 %193
  %195 = load i32, ptr %20, align 4, !tbaa !8
  %196 = load i32, ptr %18, align 4, !tbaa !8
  %197 = sub nsw i32 %195, %196
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i64, ptr %194, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !14
  %201 = load i32, ptr %19, align 4, !tbaa !8
  %202 = sext i32 %201 to i64
  %203 = mul nsw i64 %202, %46
  %204 = getelementptr inbounds i64, ptr %49, i64 %203
  %205 = load i32, ptr %20, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds i64, ptr %204, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !14
  %209 = add nsw i64 %200, %208
  %210 = load i32, ptr %19, align 4, !tbaa !8
  %211 = load i32, ptr %18, align 4, !tbaa !8
  %212 = sub nsw i32 %210, %211
  %213 = sext i32 %212 to i64
  %214 = mul nsw i64 %213, %46
  %215 = getelementptr inbounds i64, ptr %49, i64 %214
  %216 = load i32, ptr %20, align 4, !tbaa !8
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i64, ptr %215, i64 %217
  %219 = load i64, ptr %218, align 8, !tbaa !14
  %220 = load i32, ptr %19, align 4, !tbaa !8
  %221 = sext i32 %220 to i64
  %222 = mul nsw i64 %221, %46
  %223 = getelementptr inbounds i64, ptr %49, i64 %222
  %224 = load i32, ptr %20, align 4, !tbaa !8
  %225 = load i32, ptr %18, align 4, !tbaa !8
  %226 = sub nsw i32 %224, %225
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds i64, ptr %223, i64 %227
  %229 = load i64, ptr %228, align 8, !tbaa !14
  %230 = add nsw i64 %219, %229
  %231 = sub nsw i64 %209, %230
  %232 = sitofp i64 %231 to double
  %233 = load i32, ptr %18, align 4, !tbaa !8
  %234 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %233, i32 noundef 2)
  %235 = fdiv double %232, %234
  %236 = load i32, ptr %5, align 4, !tbaa !8
  %237 = sitofp i32 %236 to double
  %238 = fcmp oge double %235, %237
  br i1 %238, label %239, label %242

239:                                              ; preds = %188
  %240 = load i64, ptr %17, align 8, !tbaa !14
  %241 = add nsw i64 %240, 1
  store i64 %241, ptr %17, align 8, !tbaa !14
  br label %242

242:                                              ; preds = %239, %188
  br label %243

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

246:                                              ; preds = %187
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %19, align 4, !tbaa !8
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %19, align 4, !tbaa !8
  br label %176, !llvm.loop !21

250:                                              ; preds = %180
  br label %251

251:                                              ; preds = %250
  %252 = load i32, ptr %18, align 4, !tbaa !8
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %18, align 4, !tbaa !8
  br label %168, !llvm.loop !22

254:                                              ; preds = %173
  %255 = load i64, ptr %17, align 8, !tbaa !14
  %256 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %255)
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %256, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  %258 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %258)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %33, !llvm.loop !23

259:                                              ; preds = %33
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %260 = load i32, ptr %1, align 4
  ret i32 %260
}

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

; 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #5 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 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7

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

; 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 = { 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 = { 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 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !10, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !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" }

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

; 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 i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %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 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %13
  %15 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %16 = 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)
  %17 = load i32, ptr %1, align 4, !tbaa !8
  %18 = add nsw i32 %17, -1
  store i32 %18, ptr %1, align 4, !tbaa !8
  %19 = icmp sgt i32 %17, 0
  br i1 %19, label %.lr.ph117, label %._crit_edge118

.lr.ph117:                                        ; preds = %0, %._crit_edge114
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %20 = 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)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %23 = load i32, ptr %2, align 4, !tbaa !8
  %24 = add nsw i32 %23, 1
  %25 = zext i32 %24 to i64
  %26 = load i32, ptr %3, align 4, !tbaa !8
  %27 = add nsw i32 %26, 1
  %28 = zext i32 %27 to i64
  %29 = call ptr @llvm.stacksave.p0()
  %30 = mul nuw i64 %28, %25
  %31 = alloca i64, i64 %30, align 16
  %32 = load i32, ptr %2, align 4, !tbaa !8
  %.not82 = icmp slt i32 %32, 1
  %.pre155.pre = load i32, ptr %3, align 4, !tbaa !8
  br i1 %.not82, label %.preheader79, label %.preheader76.lr.ph

.preheader76.lr.ph:                               ; preds = %.lr.ph117
  %33 = icmp slt i32 %.pre155.pre, 1
  br i1 %33, label %.preheader75.lr.ph, label %.preheader76

.preheader79:                                     ; preds = %._crit_edge, %.lr.ph117
  %.pre155 = phi i32 [ %.pre155.pre, %.lr.ph117 ], [ %42, %._crit_edge ]
  %.lcssa = phi i32 [ %32, %.lr.ph117 ], [ %41, %._crit_edge ]
  %.not6389 = icmp slt i32 %.lcssa, 0
  br i1 %.not6389, label %.preheader78, label %.preheader75.lr.ph

.preheader75.lr.ph:                               ; preds = %.preheader76.lr.ph, %.preheader79
  %.lcssa163 = phi i32 [ %.lcssa, %.preheader79 ], [ %32, %.preheader76.lr.ph ]
  %.pre155161 = phi i32 [ %.pre155, %.preheader79 ], [ %.pre155.pre, %.preheader76.lr.ph ]
  %.not6984 = icmp slt i32 %.pre155161, 0
  br i1 %.not6984, label %.preheader77, label %.preheader75.preheader

.preheader75.preheader:                           ; preds = %.preheader75.lr.ph
  %34 = add nuw i32 %.pre155161, 1
  %35 = add nuw i32 %.lcssa163, 1
  %wide.trip.count134 = zext i32 %35 to i64
  %wide.trip.count = zext i32 %34 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %36 = icmp ult i32 %.pre155161, 3
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader75

.preheader76:                                     ; preds = %.preheader76.lr.ph, %._crit_edge
  %37 = phi i32 [ %41, %._crit_edge ], [ %32, %.preheader76.lr.ph ]
  %38 = phi i32 [ %42, %._crit_edge ], [ %.pre155.pre, %.preheader76.lr.ph ]
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %._crit_edge ], [ 1, %.preheader76.lr.ph ]
  %.not7080 = icmp slt i32 %38, 1
  br i1 %.not7080, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader76
  %39 = mul nuw nsw i64 %indvars.iv125, %28
  %40 = getelementptr inbounds i64, ptr %31, i64 %39
  br label %44

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader76
  %41 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %37, %.preheader76 ]
  %42 = phi i32 [ %47, %._crit_edge.loopexit ], [ %38, %.preheader76 ]
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %43 = sext i32 %41 to i64
  %.not.not = icmp slt i64 %indvars.iv125, %43
  br i1 %.not.not, label %.preheader76, label %.preheader79, !llvm.loop !11

44:                                               ; preds = %.lr.ph, %44
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %44 ]
  %45 = getelementptr inbounds i64, ptr %40, i64 %indvars.iv
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %45)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = load i32, ptr %3, align 4, !tbaa !8
  %48 = sext i32 %47 to i64
  %.not70.not = icmp slt i64 %indvars.iv, %48
  br i1 %.not70.not, label %44, label %._crit_edge.loopexit, !llvm.loop !14

.preheader78:                                     ; preds = %._crit_edge88, %.preheader79
  %.not6389166 = phi i1 [ true, %.preheader79 ], [ false, %._crit_edge88 ]
  %.lcssa164 = phi i32 [ %.lcssa, %.preheader79 ], [ %.lcssa163, %._crit_edge88 ]
  %.pre155162 = phi i32 [ %.pre155, %.preheader79 ], [ %.pre155161, %._crit_edge88 ]
  %.not6496 = icmp slt i32 %.pre155162, 0
  %brmerge = or i1 %.not6496, %.not6389166
  br i1 %brmerge, label %.preheader77, label %.preheader74.preheader

.preheader74.preheader:                           ; preds = %.preheader78
  %49 = add nuw i32 %.lcssa164, 1
  %50 = add nuw i32 %.pre155162, 1
  %wide.trip.count144 = zext i32 %50 to i64
  %wide.trip.count139 = zext i32 %49 to i64
  %xtraiter184 = and i64 %wide.trip.count139, 3
  %51 = icmp ult i32 %.lcssa164, 3
  %unroll_iter187 = and i64 %wide.trip.count139, 4294967292
  %lcmp.mod186.not = icmp eq i64 %xtraiter184, 0
  br label %.preheader74

.preheader75:                                     ; preds = %.preheader75.preheader, %._crit_edge88
  %indvars.iv131 = phi i64 [ 0, %.preheader75.preheader ], [ %indvars.iv.next132, %._crit_edge88 ]
  %52 = mul nuw nsw i64 %indvars.iv131, %28
  %53 = getelementptr inbounds i64, ptr %31, i64 %52
  br i1 %36, label %._crit_edge88.unr-lcssa, label %.preheader75.new

._crit_edge88.unr-lcssa:                          ; preds = %.preheader75.new, %.preheader75
  %indvars.iv128.unr = phi i64 [ 0, %.preheader75 ], [ %indvars.iv.next129.3, %.preheader75.new ]
  %.05985.unr = phi i64 [ 0, %.preheader75 ], [ %68, %.preheader75.new ]
  br i1 %lcmp.mod.not, label %._crit_edge88, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge88.unr-lcssa, %.epil.preheader
  %indvars.iv128.epil = phi i64 [ %indvars.iv.next129.epil, %.epil.preheader ], [ %indvars.iv128.unr, %._crit_edge88.unr-lcssa ]
  %.05985.epil = phi i64 [ %56, %.epil.preheader ], [ %.05985.unr, %._crit_edge88.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge88.unr-lcssa ]
  %54 = getelementptr inbounds i64, ptr %53, i64 %indvars.iv128.epil
  %55 = load i64, ptr %54, align 8, !tbaa !15
  %56 = add nsw i64 %55, %.05985.epil
  store i64 %56, ptr %54, align 8, !tbaa !15
  %indvars.iv.next129.epil = add nuw nsw i64 %indvars.iv128.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge88, label %.epil.preheader, !llvm.loop !17

._crit_edge88:                                    ; preds = %.epil.preheader, %._crit_edge88.unr-lcssa
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond135.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count134
  br i1 %exitcond135.not, label %.preheader78, label %.preheader75, !llvm.loop !19

.preheader75.new:                                 ; preds = %.preheader75, %.preheader75.new
  %indvars.iv128 = phi i64 [ %indvars.iv.next129.3, %.preheader75.new ], [ 0, %.preheader75 ]
  %.05985 = phi i64 [ %68, %.preheader75.new ], [ 0, %.preheader75 ]
  %niter = phi i64 [ %niter.next.3, %.preheader75.new ], [ 0, %.preheader75 ]
  %57 = getelementptr inbounds i64, ptr %53, i64 %indvars.iv128
  %58 = load i64, ptr %57, align 8, !tbaa !15
  %59 = add nsw i64 %58, %.05985
  store i64 %59, ptr %57, align 8, !tbaa !15
  %indvars.iv.next129 = or disjoint i64 %indvars.iv128, 1
  %60 = getelementptr inbounds i64, ptr %53, i64 %indvars.iv.next129
  %61 = load i64, ptr %60, align 8, !tbaa !15
  %62 = add nsw i64 %61, %59
  store i64 %62, ptr %60, align 8, !tbaa !15
  %indvars.iv.next129.1 = or disjoint i64 %indvars.iv128, 2
  %63 = getelementptr inbounds i64, ptr %53, i64 %indvars.iv.next129.1
  %64 = load i64, ptr %63, align 8, !tbaa !15
  %65 = add nsw i64 %64, %62
  store i64 %65, ptr %63, align 8, !tbaa !15
  %indvars.iv.next129.2 = or disjoint i64 %indvars.iv128, 3
  %66 = getelementptr inbounds i64, ptr %53, i64 %indvars.iv.next129.2
  %67 = load i64, ptr %66, align 8, !tbaa !15
  %68 = add nsw i64 %67, %65
  store i64 %68, ptr %66, align 8, !tbaa !15
  %indvars.iv.next129.3 = add nuw nsw i64 %indvars.iv128, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge88.unr-lcssa, label %.preheader75.new, !llvm.loop !20

.preheader77:                                     ; preds = %._crit_edge95, %.preheader78, %.preheader75.lr.ph
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %70 = load i32, ptr %69, align 4, !tbaa !8
  %.not65110 = icmp slt i32 %70, 1
  br i1 %.not65110, label %._crit_edge114, label %.preheader73

.preheader74:                                     ; preds = %.preheader74.preheader, %._crit_edge95
  %indvars.iv141 = phi i64 [ 0, %.preheader74.preheader ], [ %indvars.iv.next142, %._crit_edge95 ]
  %invariant.gep = getelementptr inbounds i64, ptr %31, i64 %indvars.iv141
  br i1 %51, label %._crit_edge95.unr-lcssa, label %.preheader74.new

._crit_edge95.unr-lcssa:                          ; preds = %.preheader74.new, %.preheader74
  %indvars.iv136.unr = phi i64 [ 0, %.preheader74 ], [ %indvars.iv.next137.3, %.preheader74.new ]
  %.16092.unr = phi i64 [ 0, %.preheader74 ], [ %85, %.preheader74.new ]
  br i1 %lcmp.mod186.not, label %._crit_edge95, label %.epil.preheader183

.epil.preheader183:                               ; preds = %._crit_edge95.unr-lcssa, %.epil.preheader183
  %indvars.iv136.epil = phi i64 [ %indvars.iv.next137.epil, %.epil.preheader183 ], [ %indvars.iv136.unr, %._crit_edge95.unr-lcssa ]
  %.16092.epil = phi i64 [ %73, %.epil.preheader183 ], [ %.16092.unr, %._crit_edge95.unr-lcssa ]
  %epil.iter185 = phi i64 [ %epil.iter185.next, %.epil.preheader183 ], [ 0, %._crit_edge95.unr-lcssa ]
  %71 = mul nuw nsw i64 %indvars.iv136.epil, %28
  %gep.epil = getelementptr inbounds i64, ptr %invariant.gep, i64 %71
  %72 = load i64, ptr %gep.epil, align 8, !tbaa !15
  %73 = add nsw i64 %72, %.16092.epil
  store i64 %73, ptr %gep.epil, align 8, !tbaa !15
  %indvars.iv.next137.epil = add nuw nsw i64 %indvars.iv136.epil, 1
  %epil.iter185.next = add i64 %epil.iter185, 1
  %epil.iter185.cmp.not = icmp eq i64 %epil.iter185.next, %xtraiter184
  br i1 %epil.iter185.cmp.not, label %._crit_edge95, label %.epil.preheader183, !llvm.loop !21

._crit_edge95:                                    ; preds = %.epil.preheader183, %._crit_edge95.unr-lcssa
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next142, %wide.trip.count144
  br i1 %exitcond145.not, label %.preheader77, label %.preheader74, !llvm.loop !22

.preheader74.new:                                 ; preds = %.preheader74, %.preheader74.new
  %indvars.iv136 = phi i64 [ %indvars.iv.next137.3, %.preheader74.new ], [ 0, %.preheader74 ]
  %.16092 = phi i64 [ %85, %.preheader74.new ], [ 0, %.preheader74 ]
  %niter188 = phi i64 [ %niter188.next.3, %.preheader74.new ], [ 0, %.preheader74 ]
  %74 = mul nuw nsw i64 %indvars.iv136, %28
  %gep = getelementptr inbounds i64, ptr %invariant.gep, i64 %74
  %75 = load i64, ptr %gep, align 8, !tbaa !15
  %76 = add nsw i64 %75, %.16092
  store i64 %76, ptr %gep, align 8, !tbaa !15
  %indvars.iv.next137 = or disjoint i64 %indvars.iv136, 1
  %77 = mul nuw nsw i64 %indvars.iv.next137, %28
  %gep.1 = getelementptr inbounds i64, ptr %invariant.gep, i64 %77
  %78 = load i64, ptr %gep.1, align 8, !tbaa !15
  %79 = add nsw i64 %78, %76
  store i64 %79, ptr %gep.1, align 8, !tbaa !15
  %indvars.iv.next137.1 = or disjoint i64 %indvars.iv136, 2
  %80 = mul nuw nsw i64 %indvars.iv.next137.1, %28
  %gep.2 = getelementptr inbounds i64, ptr %invariant.gep, i64 %80
  %81 = load i64, ptr %gep.2, align 8, !tbaa !15
  %82 = add nsw i64 %81, %79
  store i64 %82, ptr %gep.2, align 8, !tbaa !15
  %indvars.iv.next137.2 = or disjoint i64 %indvars.iv136, 3
  %83 = mul nuw nsw i64 %indvars.iv.next137.2, %28
  %gep.3 = getelementptr inbounds i64, ptr %invariant.gep, i64 %83
  %84 = load i64, ptr %gep.3, align 8, !tbaa !15
  %85 = add nsw i64 %84, %82
  store i64 %85, ptr %gep.3, align 8, !tbaa !15
  %indvars.iv.next137.3 = add nuw nsw i64 %indvars.iv136, 4
  %niter188.next.3 = add i64 %niter188, 4
  %niter188.ncmp.3 = icmp eq i64 %niter188.next.3, %unroll_iter187
  br i1 %niter188.ncmp.3, label %._crit_edge95.unr-lcssa, label %.preheader74.new, !llvm.loop !23

.preheader73:                                     ; preds = %.preheader77, %._crit_edge107
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %._crit_edge107 ], [ 1, %.preheader77 ]
  %.054111 = phi i64 [ %.1.lcssa, %._crit_edge107 ], [ 0, %.preheader77 ]
  %86 = load i32, ptr %2, align 4, !tbaa !8
  %87 = sext i32 %86 to i64
  %.not66104 = icmp sgt i64 %indvars.iv146, %87
  br i1 %.not66104, label %._crit_edge107, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader73
  %88 = load i32, ptr %3, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  %90 = icmp sgt i64 %indvars.iv146, %89
  br i1 %90, label %._crit_edge107, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %91 = trunc nuw nsw i64 %indvars.iv146 to i32
  br label %.preheader

._crit_edge114:                                   ; preds = %._crit_edge107, %.preheader77
  %.054.lcssa = phi i64 [ 0, %.preheader77 ], [ %.1.lcssa, %._crit_edge107 ]
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.054.lcssa)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @.str)
  call void @llvm.stackrestore.p0(ptr %29)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %94 = load i32, ptr %1, align 4, !tbaa !8
  %95 = add nsw i32 %94, -1
  store i32 %95, ptr %1, align 4, !tbaa !8
  %96 = icmp sgt i32 %94, 0
  br i1 %96, label %.lr.ph117, label %._crit_edge118, !llvm.loop !24

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge102
  %97 = phi i32 [ %86, %.preheader.preheader ], [ %108, %._crit_edge102 ]
  %98 = phi i32 [ %88, %.preheader.preheader ], [ %109, %._crit_edge102 ]
  %indvars.iv151 = phi i64 [ %indvars.iv146, %.preheader.preheader ], [ %indvars.iv.next152, %._crit_edge102 ]
  %.1105 = phi i64 [ %.054111, %.preheader.preheader ], [ %.2.lcssa, %._crit_edge102 ]
  %99 = sext i32 %98 to i64
  %.not6798 = icmp sgt i64 %indvars.iv146, %99
  br i1 %.not6798, label %._crit_edge102, label %.lr.ph101

.lr.ph101:                                        ; preds = %.preheader
  %100 = sub nuw nsw i64 %indvars.iv151, %indvars.iv146
  %101 = mul nuw nsw i64 %100, %28
  %102 = getelementptr inbounds i64, ptr %31, i64 %101
  %103 = mul nuw nsw i64 %indvars.iv151, %28
  %104 = getelementptr inbounds i64, ptr %31, i64 %103
  br label %111

._crit_edge107:                                   ; preds = %._crit_edge102, %.preheader.lr.ph, %.preheader73
  %.1.lcssa = phi i64 [ %.054111, %.preheader73 ], [ %.054111, %.preheader.lr.ph ], [ %.2.lcssa, %._crit_edge102 ]
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %106 = load i32, ptr %105, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %.not65.not = icmp slt i64 %indvars.iv146, %107
  br i1 %.not65.not, label %.preheader73, label %._crit_edge114, !llvm.loop !25

._crit_edge102.loopexit:                          ; preds = %111
  %.pre156 = load i32, ptr %2, align 4, !tbaa !8
  br label %._crit_edge102

._crit_edge102:                                   ; preds = %._crit_edge102.loopexit, %.preheader
  %108 = phi i32 [ %97, %.preheader ], [ %.pre156, %._crit_edge102.loopexit ]
  %109 = phi i32 [ %98, %.preheader ], [ %130, %._crit_edge102.loopexit ]
  %.2.lcssa = phi i64 [ %.1105, %.preheader ], [ %.3, %._crit_edge102.loopexit ]
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %110 = sext i32 %108 to i64
  %.not66.not = icmp slt i64 %indvars.iv151, %110
  br i1 %.not66.not, label %.preheader, label %._crit_edge107, !llvm.loop !26

111:                                              ; preds = %.lr.ph101, %111
  %indvars.iv148 = phi i64 [ %indvars.iv146, %.lr.ph101 ], [ %indvars.iv.next149, %111 ]
  %.299 = phi i64 [ %.1105, %.lr.ph101 ], [ %.3, %111 ]
  %112 = sub nuw nsw i64 %indvars.iv148, %indvars.iv146
  %113 = getelementptr inbounds i64, ptr %102, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !15
  %115 = getelementptr inbounds i64, ptr %104, i64 %indvars.iv148
  %116 = load i64, ptr %115, align 8, !tbaa !15
  %117 = getelementptr inbounds i64, ptr %102, i64 %indvars.iv148
  %118 = load i64, ptr %117, align 8, !tbaa !15
  %119 = getelementptr inbounds i64, ptr %104, i64 %112
  %120 = load i64, ptr %119, align 8, !tbaa !15
  %.neg72 = add i64 %116, %114
  %121 = add i64 %118, %120
  %122 = sub i64 %.neg72, %121
  %123 = sitofp i64 %122 to double
  %124 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %91, i32 noundef 2)
  %125 = fdiv double %123, %124
  %126 = load i32, ptr %4, align 4, !tbaa !8
  %127 = sitofp i32 %126 to double
  %128 = fcmp oge double %125, %127
  %129 = zext i1 %128 to i64
  %.3 = add nsw i64 %.299, %129
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %130 = load i32, ptr %3, align 4, !tbaa !8
  %131 = sext i32 %130 to i64
  %.not67.not = icmp slt i64 %indvars.iv148, %131
  br i1 %.not67.not, label %111, label %._crit_edge102.loopexit, !llvm.loop !27

._crit_edge118:                                   ; preds = %._crit_edge114, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0
}

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

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 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 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) local_unnamed_addr #6

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

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

; 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 = { 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 = { 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, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12, !13}
!27 = distinct !{!27, !12}


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