; LLVM IR from brpapa/algorithms :: solutions/uva (10755)

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

@cube = external dso_local global [22 x [22 x [22 x i64]]], align 16
@accSum = external dso_local global [22 x [22 x [22 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3rsqiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

31:                                               ; preds = %225, %0
  %32 = load i32, ptr %2, align 4, !tbaa !8
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr %2, align 4, !tbaa !8
  %34 = icmp ne i32 %32, 0
  br i1 %34, label %35, label %233

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %36 = 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)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %152, %35
  %40 = load i32, ptr %6, align 4, !tbaa !8
  %41 = load i32, ptr %3, align 4, !tbaa !8
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %45

45:                                               ; preds = %148, %44
  %46 = load i32, ptr %8, align 4, !tbaa !8
  %47 = load i32, ptr %4, align 4, !tbaa !8
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

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

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %51

51:                                               ; preds = %144, %50
  %52 = load i32, ptr %9, align 4, !tbaa !8
  %53 = load i32, ptr %5, align 4, !tbaa !8
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  store i32 10, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %147

56:                                               ; preds = %51
  %57 = load i32, ptr %6, align 4, !tbaa !8
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @cube, i64 0, i64 %58
  %60 = load i32, ptr %8, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [22 x [22 x i64]], ptr %59, i64 0, i64 %61
  %63 = load i32, ptr %9, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [22 x i64], ptr %62, i64 0, i64 %64
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %65)
  %67 = load i32, ptr %6, align 4, !tbaa !8
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @cube, i64 0, i64 %68
  %70 = load i32, ptr %8, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [22 x [22 x i64]], ptr %69, i64 0, i64 %71
  %73 = load i32, ptr %9, align 4, !tbaa !8
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [22 x i64], ptr %72, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !11
  %77 = load i32, ptr %8, align 4, !tbaa !8
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %91

79:                                               ; preds = %56
  %80 = load i32, ptr %6, align 4, !tbaa !8
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %81
  %83 = load i32, ptr %8, align 4, !tbaa !8
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [22 x [22 x i64]], ptr %82, i64 0, i64 %85
  %87 = load i32, ptr %9, align 4, !tbaa !8
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [22 x i64], ptr %86, i64 0, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !11
  br label %92

91:                                               ; preds = %56
  br label %92

92:                                               ; preds = %91, %79
  %93 = phi i64 [ %90, %79 ], [ 0, %91 ]
  %94 = add nsw i64 %76, %93
  %95 = load i32, ptr %9, align 4, !tbaa !8
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %97, label %109

97:                                               ; preds = %92
  %98 = load i32, ptr %6, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %99
  %101 = load i32, ptr %8, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [22 x [22 x i64]], ptr %100, i64 0, i64 %102
  %104 = load i32, ptr %9, align 4, !tbaa !8
  %105 = sub nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [22 x i64], ptr %103, i64 0, i64 %106
  %108 = load i64, ptr %107, align 8, !tbaa !11
  br label %110

109:                                              ; preds = %92
  br label %110

110:                                              ; preds = %109, %97
  %111 = phi i64 [ %108, %97 ], [ 0, %109 ]
  %112 = add nsw i64 %94, %111
  %113 = load i32, ptr %8, align 4, !tbaa !8
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %115, label %131

115:                                              ; preds = %110
  %116 = load i32, ptr %9, align 4, !tbaa !8
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %118, label %131

118:                                              ; preds = %115
  %119 = load i32, ptr %6, align 4, !tbaa !8
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %120
  %122 = load i32, ptr %8, align 4, !tbaa !8
  %123 = sub nsw i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [22 x [22 x i64]], ptr %121, i64 0, i64 %124
  %126 = load i32, ptr %9, align 4, !tbaa !8
  %127 = sub nsw i32 %126, 1
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [22 x i64], ptr %125, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !11
  br label %132

131:                                              ; preds = %115, %110
  br label %132

132:                                              ; preds = %131, %118
  %133 = phi i64 [ %130, %118 ], [ 0, %131 ]
  %134 = sub nsw i64 %112, %133
  %135 = load i32, ptr %6, align 4, !tbaa !8
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %136
  %138 = load i32, ptr %8, align 4, !tbaa !8
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [22 x [22 x i64]], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %9, align 4, !tbaa !8
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [22 x i64], ptr %140, i64 0, i64 %142
  store i64 %134, ptr %143, align 8, !tbaa !11
  br label %144

144:                                              ; preds = %132
  %145 = load i32, ptr %9, align 4, !tbaa !8
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %9, align 4, !tbaa !8
  br label %51, !llvm.loop !13

147:                                              ; preds = %55
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %8, align 4, !tbaa !8
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %8, align 4, !tbaa !8
  br label %45, !llvm.loop !15

151:                                              ; preds = %49
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %6, align 4, !tbaa !8
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %6, align 4, !tbaa !8
  br label %39, !llvm.loop !16

155:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 -4557430888798830399, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %156

156:                                              ; preds = %222, %155
  %157 = load i32, ptr %11, align 4, !tbaa !8
  %158 = load i32, ptr %4, align 4, !tbaa !8
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %161, label %160

160:                                              ; preds = %156
  store i32 13, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %225

161:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %162

162:                                              ; preds = %218, %161
  %163 = load i32, ptr %12, align 4, !tbaa !8
  %164 = load i32, ptr %5, align 4, !tbaa !8
  %165 = icmp slt i32 %163, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %162
  store i32 16, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %221

167:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %168 = load i32, ptr %11, align 4, !tbaa !8
  store i32 %168, ptr %13, align 4, !tbaa !8
  br label %169

169:                                              ; preds = %214, %167
  %170 = load i32, ptr %13, align 4, !tbaa !8
  %171 = load i32, ptr %4, align 4, !tbaa !8
  %172 = icmp slt i32 %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %169
  store i32 19, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %217

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

176:                                              ; preds = %210, %174
  %177 = load i32, ptr %14, align 4, !tbaa !8
  %178 = load i32, ptr %5, align 4, !tbaa !8
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %181, label %180

180:                                              ; preds = %176
  store i32 22, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %213

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

182:                                              ; preds = %206, %181
  %183 = load i32, ptr %16, align 4, !tbaa !8
  %184 = load i32, ptr %3, align 4, !tbaa !8
  %185 = icmp slt i32 %183, %184
  br i1 %185, label %187, label %186

186:                                              ; preds = %182
  store i32 25, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %209

187:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %188 = load i32, ptr %16, align 4, !tbaa !8
  %189 = load i32, ptr %11, align 4, !tbaa !8
  %190 = load i32, ptr %12, align 4, !tbaa !8
  %191 = load i32, ptr %13, align 4, !tbaa !8
  %192 = load i32, ptr %14, align 4, !tbaa !8
  %193 = call noundef i64 @_Z3rsqiiiii(i32 noundef %188, i32 noundef %189, i32 noundef %190, i32 noundef %191, i32 noundef %192)
  store i64 %193, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %194 = load i64, ptr %15, align 8, !tbaa !11
  %195 = load i32, ptr %16, align 4, !tbaa !8
  %196 = load i32, ptr %11, align 4, !tbaa !8
  %197 = load i32, ptr %12, align 4, !tbaa !8
  %198 = load i32, ptr %13, align 4, !tbaa !8
  %199 = load i32, ptr %14, align 4, !tbaa !8
  %200 = call noundef i64 @_Z3rsqiiiii(i32 noundef %195, i32 noundef %196, i32 noundef %197, i32 noundef %198, i32 noundef %199)
  %201 = add nsw i64 %194, %200
  store i64 %201, ptr %18, align 8, !tbaa !11
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %203 = load i64, ptr %202, align 8, !tbaa !11
  store i64 %203, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  %204 = 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) %15)
  %205 = load i64, ptr %204, align 8, !tbaa !11
  store i64 %205, ptr %10, align 8, !tbaa !11
  br label %206

206:                                              ; preds = %187
  %207 = load i32, ptr %16, align 4, !tbaa !8
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %16, align 4, !tbaa !8
  br label %182, !llvm.loop !17

209:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %14, align 4, !tbaa !8
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %14, align 4, !tbaa !8
  br label %176, !llvm.loop !18

213:                                              ; preds = %180
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %13, align 4, !tbaa !8
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %13, align 4, !tbaa !8
  br label %169, !llvm.loop !19

217:                                              ; preds = %173
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %12, align 4, !tbaa !8
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %12, align 4, !tbaa !8
  br label %162, !llvm.loop !20

221:                                              ; preds = %166
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %11, align 4, !tbaa !8
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %11, align 4, !tbaa !8
  br label %156, !llvm.loop !21

225:                                              ; preds = %160
  %226 = load i64, ptr %10, align 8, !tbaa !11
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %226)
  %228 = load i32, ptr %2, align 4, !tbaa !8
  %229 = icmp sgt i32 %228, 0
  %230 = zext i1 %229 to i64
  %231 = select i1 %229, ptr @.str, ptr @.str.1
  %232 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %227, ptr noundef %231)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %31, !llvm.loop !22

233:                                              ; preds = %31
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %234 = load i32, ptr %1, align 4
  ret i32 %234
}

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

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

; 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: 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) #6

; 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

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

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

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


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

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

@cube = external dso_local global [22 x [22 x [22 x i64]]], align 16
@accSum = external dso_local local_unnamed_addr global [22 x [22 x [22 x i64]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z3rsqiiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %17
  %19 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %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) %1)
  %21 = load i32, ptr %1, align 4, !tbaa !8
  %22 = add nsw i32 %21, -1
  store i32 %22, ptr %1, align 4, !tbaa !8
  %.not85 = icmp eq i32 %21, 0
  br i1 %.not85, label %._crit_edge88, label %.lr.ph87

.lr.ph87:                                         ; preds = %0, %._crit_edge84
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %23 = 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)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = icmp sgt i32 %26, 0
  %.pre111 = load i32, ptr %3, align 4, !tbaa !8
  br i1 %27, label %.preheader63.lr.ph, label %._crit_edge68

.preheader63.lr.ph:                               ; preds = %.lr.ph87
  %28 = icmp sgt i32 %.pre111, 0
  br i1 %28, label %.preheader63, label %._crit_edge68.thread

._crit_edge68.thread:                             ; preds = %.preheader63.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 -4557430888798830399, ptr %5, align 8, !tbaa !11
  br label %._crit_edge84

.preheader63:                                     ; preds = %.preheader63.lr.ph, %._crit_edge66
  %29 = phi i32 [ %74, %._crit_edge66 ], [ %26, %.preheader63.lr.ph ]
  %30 = phi i32 [ %75, %._crit_edge66 ], [ %.pre111, %.preheader63.lr.ph ]
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %._crit_edge66 ], [ 0, %.preheader63.lr.ph ]
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.preheader61.lr.ph, label %._crit_edge66

.preheader61.lr.ph:                               ; preds = %.preheader63
  %32 = load i32, ptr %4, align 4, !tbaa !8
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.preheader61.preheader, label %._crit_edge66

.preheader61.preheader:                           ; preds = %.preheader61.lr.ph
  %34 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @cube, i64 0, i64 %indvars.iv108, i64 0, i64 0
  %35 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 0, i64 0
  br label %.preheader61

._crit_edge68:                                    ; preds = %._crit_edge66, %.lr.ph87
  %36 = phi i32 [ %26, %.lr.ph87 ], [ %74, %._crit_edge66 ]
  %37 = phi i32 [ %.pre111, %.lr.ph87 ], [ %75, %._crit_edge66 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 -4557430888798830399, ptr %5, align 8, !tbaa !11
  %38 = icmp sgt i32 %37, 0
  %39 = load i32, ptr %4, align 4
  %40 = icmp sgt i32 %39, 0
  %or.cond140 = select i1 %38, i1 %40, i1 false
  br i1 %or.cond140, label %.preheader62, label %._crit_edge84

.preheader61:                                     ; preds = %.preheader61.preheader, %._crit_edge
  %41 = phi i32 [ %32, %.preheader61.preheader ], [ %78, %._crit_edge ]
  %indvars.iv105 = phi i64 [ 0, %.preheader61.preheader ], [ %indvars.iv.next106, %._crit_edge ]
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader61
  %.not89 = icmp eq i64 %indvars.iv105, 0
  %43 = add nsw i64 %indvars.iv105, -1
  br i1 %.not89, label %.thread.peel, label %.thread.us.peel

.thread.us.peel:                                  ; preds = %.lr.ph
  %44 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @cube, i64 0, i64 %indvars.iv108, i64 %indvars.iv105, i64 0
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %44)
  %46 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 %43, i64 0
  %47 = load i64, ptr %46, align 16, !tbaa !11
  %48 = load i64, ptr %44, align 16, !tbaa !11
  %49 = add nsw i64 %47, %48
  %50 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 %indvars.iv105, i64 0
  store i64 %49, ptr %50, align 16, !tbaa !11
  %51 = load i32, ptr %4, align 4, !tbaa !8
  %52 = icmp sgt i32 %51, 1
  br i1 %52, label %.thread.us, label %._crit_edge

.thread.peel:                                     ; preds = %.lr.ph
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
  %54 = load i64, ptr %34, align 16, !tbaa !11
  store i64 %54, ptr %35, align 16, !tbaa !11
  %55 = load i32, ptr %4, align 4, !tbaa !8
  %56 = icmp sgt i32 %55, 1
  br i1 %56, label %.thread, label %._crit_edge

.thread.us:                                       ; preds = %.thread.us.peel, %.thread.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.thread.us ], [ 1, %.thread.us.peel ]
  %57 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @cube, i64 0, i64 %indvars.iv108, i64 %indvars.iv105, i64 %indvars.iv
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %57)
  %59 = add nsw i64 %indvars.iv, -1
  %60 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 %43, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !11
  %62 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 %indvars.iv105, i64 %59
  %63 = load i64, ptr %62, align 8, !tbaa !11
  %64 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 %43, i64 %indvars.iv
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = load i64, ptr %57, align 8, !tbaa !11
  %67 = add nsw i64 %65, %66
  %68 = add nsw i64 %63, %67
  %69 = sub nsw i64 %68, %61
  %70 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 %indvars.iv105, i64 %indvars.iv
  store i64 %69, ptr %70, align 8, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %71 = load i32, ptr %4, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = icmp slt i64 %indvars.iv.next, %72
  br i1 %73, label %.thread.us, label %._crit_edge, !llvm.loop !13

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

._crit_edge66:                                    ; preds = %.preheader61.lr.ph, %._crit_edge66.loopexit, %.preheader63
  %74 = phi i32 [ %.pre, %._crit_edge66.loopexit ], [ %29, %.preheader63 ], [ %29, %.preheader61.lr.ph ]
  %75 = phi i32 [ %79, %._crit_edge66.loopexit ], [ %30, %.preheader63 ], [ %30, %.preheader61.lr.ph ]
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %76 = sext i32 %74 to i64
  %77 = icmp slt i64 %indvars.iv.next109, %76
  br i1 %77, label %.preheader63, label %._crit_edge68, !llvm.loop !16

._crit_edge:                                      ; preds = %.thread.us, %.thread, %.thread.us.peel, %.thread.peel, %.preheader61
  %78 = phi i32 [ %41, %.preheader61 ], [ %55, %.thread.peel ], [ %51, %.thread.us.peel ], [ %90, %.thread ], [ %71, %.thread.us ]
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %79 = load i32, ptr %3, align 4, !tbaa !8
  %80 = sext i32 %79 to i64
  %81 = icmp slt i64 %indvars.iv.next106, %80
  br i1 %81, label %.preheader61, label %._crit_edge66.loopexit, !llvm.loop !18

.thread:                                          ; preds = %.thread.peel, %.thread
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %.thread ], [ 1, %.thread.peel ]
  %82 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @cube, i64 0, i64 %indvars.iv108, i64 0, i64 %indvars.iv101
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %82)
  %84 = add nsw i64 %indvars.iv101, -1
  %85 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = load i64, ptr %82, align 8, !tbaa !11
  %88 = add nsw i64 %86, %87
  %89 = getelementptr inbounds [22 x [22 x [22 x i64]]], ptr @accSum, i64 0, i64 %indvars.iv108, i64 0, i64 %indvars.iv101
  store i64 %88, ptr %89, align 8, !tbaa !11
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %90 = load i32, ptr %4, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %indvars.iv.next102, %91
  br i1 %92, label %.thread, label %._crit_edge, !llvm.loop !19

.preheader62:                                     ; preds = %._crit_edge68, %._crit_edge81
  %93 = phi i64 [ %119, %._crit_edge81 ], [ -4557430888798830399, %._crit_edge68 ]
  %94 = phi i32 [ %120, %._crit_edge81 ], [ %37, %._crit_edge68 ]
  %95 = phi i32 [ %121, %._crit_edge81 ], [ %39, %._crit_edge68 ]
  %96 = phi i32 [ %122, %._crit_edge81 ], [ %36, %._crit_edge68 ]
  %97 = phi i32 [ %123, %._crit_edge81 ], [ %36, %._crit_edge68 ]
  %98 = phi i32 [ %124, %._crit_edge81 ], [ %39, %._crit_edge68 ]
  %.05582 = phi i32 [ %125, %._crit_edge81 ], [ 0, %._crit_edge68 ]
  %99 = icmp sgt i32 %98, 0
  %100 = icmp slt i32 %.05582, %94
  %or.cond = and i1 %99, %100
  br i1 %or.cond, label %.preheader60, label %._crit_edge81

._crit_edge84:                                    ; preds = %._crit_edge81, %._crit_edge68.thread, %._crit_edge68
  %101 = phi i64 [ -4557430888798830399, %._crit_edge68 ], [ -4557430888798830399, %._crit_edge68.thread ], [ %119, %._crit_edge81 ]
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %101)
  %103 = load i32, ptr %1, align 4, !tbaa !8
  %104 = icmp sgt i32 %103, 0
  %105 = select i1 %104, ptr @.str, ptr @.str.1
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull %105)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %107 = load i32, ptr %1, align 4, !tbaa !8
  %108 = add nsw i32 %107, -1
  store i32 %108, ptr %1, align 4, !tbaa !8
  %.not = icmp eq i32 %107, 0
  br i1 %.not, label %._crit_edge88, label %.lr.ph87, !llvm.loop !20

.preheader60:                                     ; preds = %.preheader62, %._crit_edge78
  %109 = phi i64 [ %138, %._crit_edge78 ], [ %93, %.preheader62 ]
  %110 = phi i32 [ %139, %._crit_edge78 ], [ %94, %.preheader62 ]
  %111 = phi i32 [ %140, %._crit_edge78 ], [ %95, %.preheader62 ]
  %112 = phi i32 [ %141, %._crit_edge78 ], [ %94, %.preheader62 ]
  %113 = phi i32 [ %142, %._crit_edge78 ], [ %96, %.preheader62 ]
  %114 = phi i32 [ %143, %._crit_edge78 ], [ %97, %.preheader62 ]
  %115 = phi i32 [ %140, %._crit_edge78 ], [ %98, %.preheader62 ]
  %116 = phi i32 [ %144, %._crit_edge78 ], [ %94, %.preheader62 ]
  %.05479 = phi i32 [ %145, %._crit_edge78 ], [ 0, %.preheader62 ]
  %117 = icmp slt i32 %.05582, %116
  %118 = icmp slt i32 %.05479, %115
  %or.cond138 = and i1 %117, %118
  br i1 %or.cond138, label %.preheader, label %._crit_edge78

._crit_edge81:                                    ; preds = %._crit_edge78, %.preheader62
  %119 = phi i64 [ %93, %.preheader62 ], [ %138, %._crit_edge78 ]
  %120 = phi i32 [ %94, %.preheader62 ], [ %139, %._crit_edge78 ]
  %121 = phi i32 [ %95, %.preheader62 ], [ %140, %._crit_edge78 ]
  %122 = phi i32 [ %96, %.preheader62 ], [ %142, %._crit_edge78 ]
  %123 = phi i32 [ %97, %.preheader62 ], [ %143, %._crit_edge78 ]
  %124 = phi i32 [ %98, %.preheader62 ], [ %140, %._crit_edge78 ]
  %125 = add nuw nsw i32 %.05582, 1
  %126 = icmp slt i32 %125, %120
  br i1 %126, label %.preheader62, label %._crit_edge84, !llvm.loop !21

.preheader:                                       ; preds = %.preheader60, %._crit_edge75
  %127 = phi i64 [ %147, %._crit_edge75 ], [ %109, %.preheader60 ]
  %128 = phi i32 [ %148, %._crit_edge75 ], [ %110, %.preheader60 ]
  %129 = phi i32 [ %149, %._crit_edge75 ], [ %111, %.preheader60 ]
  %130 = phi i32 [ %150, %._crit_edge75 ], [ %112, %.preheader60 ]
  %131 = phi i32 [ %151, %._crit_edge75 ], [ %115, %.preheader60 ]
  %132 = phi i32 [ %152, %._crit_edge75 ], [ %113, %.preheader60 ]
  %133 = phi i32 [ %153, %._crit_edge75 ], [ %115, %.preheader60 ]
  %134 = phi i32 [ %154, %._crit_edge75 ], [ %114, %.preheader60 ]
  %135 = phi i32 [ %155, %._crit_edge75 ], [ %115, %.preheader60 ]
  %.05376 = phi i32 [ %156, %._crit_edge75 ], [ %.05582, %.preheader60 ]
  %136 = icmp slt i32 %.05479, %135
  br i1 %136, label %.lr.ph74, label %._crit_edge75

.lr.ph74:                                         ; preds = %.preheader
  %137 = icmp sgt i32 %134, 0
  br i1 %137, label %.lr.ph74.split, label %._crit_edge75

._crit_edge78:                                    ; preds = %._crit_edge75, %.preheader60
  %138 = phi i64 [ %109, %.preheader60 ], [ %147, %._crit_edge75 ]
  %139 = phi i32 [ %110, %.preheader60 ], [ %148, %._crit_edge75 ]
  %140 = phi i32 [ %111, %.preheader60 ], [ %149, %._crit_edge75 ]
  %141 = phi i32 [ %112, %.preheader60 ], [ %150, %._crit_edge75 ]
  %142 = phi i32 [ %113, %.preheader60 ], [ %152, %._crit_edge75 ]
  %143 = phi i32 [ %114, %.preheader60 ], [ %154, %._crit_edge75 ]
  %144 = phi i32 [ %116, %.preheader60 ], [ %150, %._crit_edge75 ]
  %145 = add nuw nsw i32 %.05479, 1
  %146 = icmp slt i32 %145, %140
  br i1 %146, label %.preheader60, label %._crit_edge81, !llvm.loop !22

._crit_edge75.loopexit:                           ; preds = %._crit_edge72
  %.pre113 = load i32, ptr %3, align 4, !tbaa !8
  br label %._crit_edge75

._crit_edge75:                                    ; preds = %.lr.ph74, %._crit_edge75.loopexit, %.preheader
  %147 = phi i64 [ %163, %._crit_edge75.loopexit ], [ %127, %.preheader ], [ %127, %.lr.ph74 ]
  %148 = phi i32 [ %.pre113, %._crit_edge75.loopexit ], [ %128, %.preheader ], [ %128, %.lr.ph74 ]
  %149 = phi i32 [ %164, %._crit_edge75.loopexit ], [ %129, %.preheader ], [ %129, %.lr.ph74 ]
  %150 = phi i32 [ %.pre113, %._crit_edge75.loopexit ], [ %130, %.preheader ], [ %130, %.lr.ph74 ]
  %151 = phi i32 [ %165, %._crit_edge75.loopexit ], [ %131, %.preheader ], [ %131, %.lr.ph74 ]
  %152 = phi i32 [ %166, %._crit_edge75.loopexit ], [ %132, %.preheader ], [ %132, %.lr.ph74 ]
  %153 = phi i32 [ %165, %._crit_edge75.loopexit ], [ %133, %.preheader ], [ %133, %.lr.ph74 ]
  %154 = phi i32 [ %166, %._crit_edge75.loopexit ], [ %134, %.preheader ], [ %134, %.lr.ph74 ]
  %155 = phi i32 [ %165, %._crit_edge75.loopexit ], [ %135, %.preheader ], [ %133, %.lr.ph74 ]
  %156 = add nuw nsw i32 %.05376, 1
  %157 = icmp slt i32 %156, %150
  br i1 %157, label %.preheader, label %._crit_edge78, !llvm.loop !23

.lr.ph74.split:                                   ; preds = %.lr.ph74, %._crit_edge72
  %158 = phi i64 [ %163, %._crit_edge72 ], [ %127, %.lr.ph74 ]
  %159 = phi i32 [ %164, %._crit_edge72 ], [ %129, %.lr.ph74 ]
  %160 = phi i32 [ %165, %._crit_edge72 ], [ %131, %.lr.ph74 ]
  %161 = phi i32 [ %166, %._crit_edge72 ], [ %132, %.lr.ph74 ]
  %.05273 = phi i32 [ %167, %._crit_edge72 ], [ %.05479, %.lr.ph74 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 0, ptr %6, align 8, !tbaa !11
  %162 = icmp sgt i32 %161, 0
  br i1 %162, label %.lr.ph71, label %._crit_edge72

._crit_edge72.loopexit:                           ; preds = %.lr.ph71
  %.pre112 = load i32, ptr %4, align 4, !tbaa !8
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge72.loopexit, %.lr.ph74.split
  %163 = phi i64 [ %176, %._crit_edge72.loopexit ], [ %158, %.lr.ph74.split ]
  %164 = phi i32 [ %.pre112, %._crit_edge72.loopexit ], [ %159, %.lr.ph74.split ]
  %165 = phi i32 [ %.pre112, %._crit_edge72.loopexit ], [ %160, %.lr.ph74.split ]
  %166 = phi i32 [ %178, %._crit_edge72.loopexit ], [ %161, %.lr.ph74.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %167 = add nuw nsw i32 %.05273, 1
  %168 = icmp slt i32 %167, %165
  br i1 %168, label %.lr.ph74.split, label %._crit_edge75.loopexit, !llvm.loop !24

.lr.ph71:                                         ; preds = %.lr.ph74.split, %.lr.ph71
  %.069 = phi i32 [ %177, %.lr.ph71 ], [ 0, %.lr.ph74.split ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %169 = call noundef i64 @_Z3rsqiiiii(i32 noundef %.069, i32 noundef %.05582, i32 noundef %.05479, i32 noundef %.05376, i32 noundef %.05273)
  store i64 %169, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %170 = load i64, ptr %6, align 8, !tbaa !11
  %171 = call noundef i64 @_Z3rsqiiiii(i32 noundef %.069, i32 noundef %.05582, i32 noundef %.05479, i32 noundef %.05376, i32 noundef %.05273)
  %172 = add nsw i64 %171, %170
  store i64 %172, ptr %8, align 8, !tbaa !11
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %174 = load i64, ptr %173, align 8, !tbaa !11
  store i64 %174, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %176 = load i64, ptr %175, align 8, !tbaa !11
  store i64 %176, ptr %5, align 8, !tbaa !11
  %177 = add nuw nsw i32 %.069, 1
  %178 = load i32, ptr %2, align 4, !tbaa !8
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %.lr.ph71, label %._crit_edge72.loopexit, !llvm.loop !25

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

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

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

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

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

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

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

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

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


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