; LLVM IR from MakeContributions/DSA :: algorithms/CPlusPlus/Arrays (matrix-multiplication)

; 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 [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = 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 i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = zext i32 %28 to i64
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = zext i32 %30 to i64
  %32 = call ptr @llvm.stacksave.p0()
  store ptr %32, ptr %6, align 8
  %33 = mul nuw i64 %29, %31
  %34 = alloca i32, i64 %33, align 16
  store i64 %29, ptr %7, align 8
  store i64 %31, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %59, %0
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %62

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %55, %40
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %58

46:                                               ; preds = %41
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 %48, %31
  %50 = getelementptr inbounds i32, ptr %34, i64 %49
  %51 = load i32, ptr %11, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %50, i64 %52
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %53)
  br label %55

55:                                               ; preds = %46
  %56 = load i32, ptr %11, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %11, align 4, !tbaa !5
  br label %41, !llvm.loop !9

58:                                               ; preds = %45
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %9, align 4, !tbaa !5
  br label %35, !llvm.loop !11

62:                                               ; preds = %39
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = zext i32 %65 to i64
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = mul nuw i64 %66, %68
  %70 = alloca i32, i64 %69, align 16
  store i64 %66, ptr %12, align 8
  store i64 %68, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %95, %62
  %72 = load i32, ptr %14, align 4, !tbaa !5
  %73 = load i32, ptr %4, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %98

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %91, %76
  %78 = load i32, ptr %15, align 4, !tbaa !5
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %94

82:                                               ; preds = %77
  %83 = load i32, ptr %14, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = mul nsw i64 %84, %68
  %86 = getelementptr inbounds i32, ptr %70, i64 %85
  %87 = load i32, ptr %15, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %89)
  br label %91

91:                                               ; preds = %82
  %92 = load i32, ptr %15, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %15, align 4, !tbaa !5
  br label %77, !llvm.loop !12

94:                                               ; preds = %81
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %14, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %14, align 4, !tbaa !5
  br label %71, !llvm.loop !13

98:                                               ; preds = %75
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = load i32, ptr %4, align 4, !tbaa !5
  %101 = icmp ne i32 %99, %100
  br i1 %101, label %102, label %104

102:                                              ; preds = %98
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %227

104:                                              ; preds = %98
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = zext i32 %105 to i64
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = zext i32 %107 to i64
  %109 = call ptr @llvm.stacksave.p0()
  store ptr %109, ptr %16, align 8
  %110 = mul nuw i64 %106, %108
  %111 = alloca i32, i64 %110, align 16
  store i64 %106, ptr %17, align 8
  store i64 %108, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %135, %104
  %113 = load i32, ptr %19, align 4, !tbaa !5
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %138

117:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %131, %117
  %119 = load i32, ptr %20, align 4, !tbaa !5
  %120 = load i32, ptr %5, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %134

123:                                              ; preds = %118
  %124 = load i32, ptr %19, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = mul nsw i64 %125, %108
  %127 = getelementptr inbounds i32, ptr %111, i64 %126
  %128 = load i32, ptr %20, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds i32, ptr %127, i64 %129
  store i32 0, ptr %130, align 4, !tbaa !5
  br label %131

131:                                              ; preds = %123
  %132 = load i32, ptr %20, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %20, align 4, !tbaa !5
  br label %118, !llvm.loop !14

134:                                              ; preds = %122
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %19, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %19, align 4, !tbaa !5
  br label %112, !llvm.loop !15

138:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %191, %138
  %140 = load i32, ptr %21, align 4, !tbaa !5
  %141 = load i32, ptr %2, align 4, !tbaa !5
  %142 = icmp slt i32 %140, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %139
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %194

144:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %187, %144
  %146 = load i32, ptr %22, align 4, !tbaa !5
  %147 = load i32, ptr %5, align 4, !tbaa !5
  %148 = icmp slt i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 23, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %190

150:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %183, %150
  %152 = load i32, ptr %23, align 4, !tbaa !5
  %153 = load i32, ptr %4, align 4, !tbaa !5
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 26, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %186

156:                                              ; preds = %151
  %157 = load i32, ptr %21, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = mul nsw i64 %158, %31
  %160 = getelementptr inbounds i32, ptr %34, i64 %159
  %161 = load i32, ptr %23, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %160, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = load i32, ptr %23, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = mul nsw i64 %166, %68
  %168 = getelementptr inbounds i32, ptr %70, i64 %167
  %169 = load i32, ptr %22, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i32, ptr %168, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = mul nsw i32 %164, %172
  %174 = load i32, ptr %21, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = mul nsw i64 %175, %108
  %177 = getelementptr inbounds i32, ptr %111, i64 %176
  %178 = load i32, ptr %22, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds i32, ptr %177, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = add nsw i32 %181, %173
  store i32 %182, ptr %180, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %156
  %184 = load i32, ptr %23, align 4, !tbaa !5
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %23, align 4, !tbaa !5
  br label %151, !llvm.loop !16

186:                                              ; preds = %155
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %22, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %22, align 4, !tbaa !5
  br label %145, !llvm.loop !17

190:                                              ; preds = %149
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %21, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %21, align 4, !tbaa !5
  br label %139, !llvm.loop !18

194:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %195

195:                                              ; preds = %222, %194
  %196 = load i32, ptr %24, align 4, !tbaa !5
  %197 = load i32, ptr %2, align 4, !tbaa !5
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %200, label %199

199:                                              ; preds = %195
  store i32 29, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %225

200:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %201

201:                                              ; preds = %217, %200
  %202 = load i32, ptr %25, align 4, !tbaa !5
  %203 = load i32, ptr %5, align 4, !tbaa !5
  %204 = icmp slt i32 %202, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %201
  store i32 32, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %220

206:                                              ; preds = %201
  %207 = load i32, ptr %24, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = mul nsw i64 %208, %108
  %210 = getelementptr inbounds i32, ptr %111, i64 %209
  %211 = load i32, ptr %25, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds i32, ptr %210, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %214)
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %215, ptr noundef @.str.1)
  br label %217

217:                                              ; preds = %206
  %218 = load i32, ptr %25, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %25, align 4, !tbaa !5
  br label %201, !llvm.loop !19

220:                                              ; preds = %205
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  br label %222

222:                                              ; preds = %220
  %223 = load i32, ptr %24, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %24, align 4, !tbaa !5
  br label %195, !llvm.loop !20

225:                                              ; preds = %199
  %226 = load ptr, ptr %16, align 8
  call void @llvm.stackrestore.p0(ptr %226)
  br label %227

227:                                              ; preds = %225, %102
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  %228 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %228)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %229 = load i32, ptr %1, align 4
  ret i32 %229
}

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

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

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

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

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }
attributes #4 = { 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 #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


; 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 [47 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  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
  %5 = 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)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = zext i32 %7 to i64
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = zext i32 %9 to i64
  %11 = call ptr @llvm.stacksave.p0()
  %12 = mul nuw i64 %10, %8
  %13 = alloca i32, i64 %12, align 16
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  %16 = load i32, ptr %2, align 4
  %17 = icmp sgt i32 %16, 0
  %or.cond138 = select i1 %15, i1 %17, i1 false
  br i1 %or.cond138, label %.preheader55, label %._crit_edge59

.preheader55:                                     ; preds = %0, %._crit_edge
  %18 = phi i32 [ %33, %._crit_edge ], [ %14, %0 ]
  %19 = phi i32 [ %34, %._crit_edge ], [ %16, %0 ]
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %._crit_edge ], [ 0, %0 ]
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader55
  %21 = mul nuw nsw i64 %indvars.iv94, %10
  %22 = getelementptr inbounds i32, ptr %13, i64 %21
  br label %37

._crit_edge59:                                    ; preds = %._crit_edge, %0
  %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) %3)
  %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) %4)
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = zext i32 %25 to i64
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = mul nuw i64 %28, %26
  %30 = alloca i32, i64 %29, align 16
  %31 = icmp sgt i32 %25, 0
  %32 = icmp sgt i32 %27, 0
  %or.cond = select i1 %31, i1 %32, i1 false
  br i1 %or.cond, label %.preheader54, label %._crit_edge64

._crit_edge.loopexit:                             ; preds = %37
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader55
  %33 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %18, %.preheader55 ]
  %34 = phi i32 [ %40, %._crit_edge.loopexit ], [ %19, %.preheader55 ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %35 = sext i32 %33 to i64
  %36 = icmp slt i64 %indvars.iv.next95, %35
  br i1 %36, label %.preheader55, label %._crit_edge59, !llvm.loop !9

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

.preheader54:                                     ; preds = %._crit_edge59, %._crit_edge62
  %43 = phi i32 [ %50, %._crit_edge62 ], [ %25, %._crit_edge59 ]
  %44 = phi i32 [ %51, %._crit_edge62 ], [ %27, %._crit_edge59 ]
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %._crit_edge62 ], [ 0, %._crit_edge59 ]
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %.preheader54
  %46 = mul nuw nsw i64 %indvars.iv100, %28
  %47 = getelementptr inbounds i32, ptr %30, i64 %46
  br label %54

._crit_edge64:                                    ; preds = %._crit_edge62, %._crit_edge59
  %48 = phi i32 [ %27, %._crit_edge59 ], [ %51, %._crit_edge62 ]
  %.lcssa56 = phi i32 [ %25, %._crit_edge59 ], [ %50, %._crit_edge62 ]
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %49, %.lcssa56
  br i1 %.not, label %62, label %60

._crit_edge62.loopexit:                           ; preds = %54
  %.pre128 = load i32, ptr %3, align 4, !tbaa !5
  br label %._crit_edge62

._crit_edge62:                                    ; preds = %._crit_edge62.loopexit, %.preheader54
  %50 = phi i32 [ %.pre128, %._crit_edge62.loopexit ], [ %43, %.preheader54 ]
  %51 = phi i32 [ %57, %._crit_edge62.loopexit ], [ %44, %.preheader54 ]
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %52 = sext i32 %50 to i64
  %53 = icmp slt i64 %indvars.iv.next101, %52
  br i1 %53, label %.preheader54, label %._crit_edge64, !llvm.loop !13

54:                                               ; preds = %.lr.ph61, %54
  %indvars.iv97 = phi i64 [ 0, %.lr.ph61 ], [ %indvars.iv.next98, %54 ]
  %55 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv97
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %55)
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next98, %58
  br i1 %59, label %54, label %._crit_edge62.loopexit, !llvm.loop !14

60:                                               ; preds = %._crit_edge64
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %155

62:                                               ; preds = %._crit_edge64
  %63 = load i32, ptr %1, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = zext i32 %48 to i64
  %66 = call ptr @llvm.stacksave.p0()
  %67 = mul nuw i64 %65, %64
  %68 = alloca i32, i64 %67, align 16
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %.preheader53.lr.ph, label %._crit_edge86

.preheader53.lr.ph:                               ; preds = %62
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.preheader53.us.preheader, label %.preheader.preheader

.preheader53.us.preheader:                        ; preds = %.preheader53.lr.ph
  %73 = shl nuw nsw i64 %65, 2
  %74 = zext nneg i32 %71 to i64
  %75 = shl nuw nsw i64 %74, 2
  %wide.trip.count = zext nneg i32 %69 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %76 = icmp ult i32 %69, 8
  br i1 %76, label %.preheader52.unr-lcssa, label %.preheader53.us.preheader.new

.preheader53.us.preheader.new:                    ; preds = %.preheader53.us.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  br label %.preheader53.us

.preheader53.us:                                  ; preds = %.preheader53.us, %.preheader53.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader53.us.preheader.new ], [ %indvar.next.7, %.preheader53.us ]
  %niter = phi i64 [ 0, %.preheader53.us.preheader.new ], [ %niter.next.7, %.preheader53.us ]
  %77 = mul nuw nsw i64 %73, %indvar
  %scevgep = getelementptr i8, ptr %68, i64 %77
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next = or disjoint i64 %indvar, 1
  %78 = mul nuw nsw i64 %73, %indvar.next
  %scevgep.1 = getelementptr i8, ptr %68, i64 %78
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.1, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.1 = or disjoint i64 %indvar, 2
  %79 = mul nuw nsw i64 %73, %indvar.next.1
  %scevgep.2 = getelementptr i8, ptr %68, i64 %79
  call void @llvm.memset.p0.i64(ptr align 8 %scevgep.2, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.2 = or disjoint i64 %indvar, 3
  %80 = mul nuw nsw i64 %73, %indvar.next.2
  %scevgep.3 = getelementptr i8, ptr %68, i64 %80
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.3, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.3 = or disjoint i64 %indvar, 4
  %81 = mul nuw nsw i64 %73, %indvar.next.3
  %scevgep.4 = getelementptr i8, ptr %68, i64 %81
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep.4, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.4 = or disjoint i64 %indvar, 5
  %82 = mul nuw nsw i64 %73, %indvar.next.4
  %scevgep.5 = getelementptr i8, ptr %68, i64 %82
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.5, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.5 = or disjoint i64 %indvar, 6
  %83 = mul nuw nsw i64 %73, %indvar.next.5
  %scevgep.6 = getelementptr i8, ptr %68, i64 %83
  call void @llvm.memset.p0.i64(ptr align 8 %scevgep.6, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.6 = or disjoint i64 %indvar, 7
  %84 = mul nuw nsw i64 %73, %indvar.next.6
  %scevgep.7 = getelementptr i8, ptr %68, i64 %84
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.7, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader52.unr-lcssa, label %.preheader53.us, !llvm.loop !15

.preheader52.unr-lcssa:                           ; preds = %.preheader53.us, %.preheader53.us.preheader
  %indvar.unr = phi i64 [ 0, %.preheader53.us.preheader ], [ %indvar.next.7, %.preheader53.us ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader52, label %.preheader53.us.epil

.preheader53.us.epil:                             ; preds = %.preheader52.unr-lcssa, %.preheader53.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader53.us.epil ], [ %indvar.unr, %.preheader52.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader53.us.epil ], [ 0, %.preheader52.unr-lcssa ]
  %85 = mul nuw nsw i64 %73, %indvar.epil
  %scevgep.epil = getelementptr i8, ptr %68, i64 %85
  call void @llvm.memset.p0.i64(ptr align 4 %scevgep.epil, i8 0, i64 %75, i1 false), !tbaa !5
  %indvar.next.epil = add nuw nsw i64 %indvar.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 %.preheader52, label %.preheader53.us.epil, !llvm.loop !16

.preheader52:                                     ; preds = %.preheader53.us.epil, %.preheader52.unr-lcssa
  br i1 %70, label %.preheader51.lr.ph, label %._crit_edge86

.preheader51.lr.ph:                               ; preds = %.preheader52
  %.pr = load i32, ptr %4, align 4, !tbaa !5
  %86 = icmp sgt i32 %.pr, 0
  %87 = load i32, ptr %3, align 4
  %88 = icmp sgt i32 %87, 0
  %or.cond136 = select i1 %86, i1 %88, i1 false
  br i1 %or.cond136, label %.preheader51.us.us.preheader, label %.preheader.preheader

.preheader51.us.us.preheader:                     ; preds = %.preheader51.lr.ph
  %wide.trip.count120 = zext nneg i32 %69 to i64
  %wide.trip.count115 = zext nneg i32 %.pr to i64
  %wide.trip.count110 = zext nneg i32 %87 to i64
  %min.iters.check = icmp ugt i32 %87, 7
  %ident.check.not = icmp eq i32 %27, 1
  %or.cond147 = select i1 %min.iters.check, i1 %ident.check.not, i1 false
  %n.vec = and i64 %wide.trip.count110, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count110
  %xtraiter155 = and i64 %wide.trip.count110, 3
  %lcmp.mod156.not = icmp eq i64 %xtraiter155, 0
  br label %.preheader51.us.us

.preheader51.us.us:                               ; preds = %.preheader51.us.us.preheader, %._crit_edge76.split.us.us.us
  %indvars.iv117 = phi i64 [ 0, %.preheader51.us.us.preheader ], [ %indvars.iv.next118, %._crit_edge76.split.us.us.us ]
  %89 = mul nuw nsw i64 %indvars.iv117, %10
  %90 = getelementptr inbounds i32, ptr %13, i64 %89
  %91 = mul nuw nsw i64 %indvars.iv117, %65
  %92 = getelementptr inbounds i32, ptr %68, i64 %91
  br label %.preheader50.us.us.us

.preheader50.us.us.us:                            ; preds = %._crit_edge73.us.us.us, %.preheader51.us.us
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %._crit_edge73.us.us.us ], [ 0, %.preheader51.us.us ]
  %invariant.gep.us.us.us = getelementptr inbounds i32, ptr %30, i64 %indvars.iv112
  %93 = getelementptr inbounds i32, ptr %92, i64 %indvars.iv112
  %.promoted.us.us.us = load i32, ptr %93, align 4, !tbaa !5
  br i1 %or.cond147, label %vector.ph, label %scalar.ph.preheader

vector.ph:                                        ; preds = %.preheader50.us.us.us
  %94 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.promoted.us.us.us, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %94, %vector.ph ], [ %101, %vector.body ]
  %vec.phi143 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %102, %vector.body ]
  %95 = getelementptr inbounds i32, ptr %90, i64 %index
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  %wide.load = load <4 x i32>, ptr %95, align 4, !tbaa !5
  %wide.load144 = load <4 x i32>, ptr %96, align 4, !tbaa !5
  %97 = getelementptr inbounds i32, ptr %invariant.gep.us.us.us, i64 %index
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  %wide.load145 = load <4 x i32>, ptr %97, align 4, !tbaa !5
  %wide.load146 = load <4 x i32>, ptr %98, align 4, !tbaa !5
  %99 = mul nsw <4 x i32> %wide.load145, %wide.load
  %100 = mul nsw <4 x i32> %wide.load146, %wide.load144
  %101 = add <4 x i32> %vec.phi, %99
  %102 = add <4 x i32> %vec.phi143, %100
  %index.next = add nuw i64 %index, 8
  %103 = icmp eq i64 %index.next, %n.vec
  br i1 %103, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %102, %101
  %104 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge73.us.us.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader50.us.us.us
  %indvars.iv107.ph = phi i64 [ 0, %.preheader50.us.us.us ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ %.promoted.us.us.us, %.preheader50.us.us.us ], [ %104, %middle.block ]
  br i1 %lcmp.mod156.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv107.prol = phi i64 [ %indvars.iv.next108.prol, %scalar.ph.prol ], [ %indvars.iv107.ph, %scalar.ph.preheader ]
  %105 = phi i32 [ %111, %scalar.ph.prol ], [ %.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %106 = getelementptr inbounds i32, ptr %90, i64 %indvars.iv107.prol
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = mul nuw nsw i64 %indvars.iv107.prol, %28
  %gep.us.us.us.prol = getelementptr inbounds i32, ptr %invariant.gep.us.us.us, i64 %108
  %109 = load i32, ptr %gep.us.us.us.prol, align 4, !tbaa !5
  %110 = mul nsw i32 %109, %107
  %111 = add nsw i32 %105, %110
  %indvars.iv.next108.prol = add nuw nsw i64 %indvars.iv107.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter155
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !21

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.lcssa150.unr = phi i32 [ poison, %scalar.ph.preheader ], [ %111, %scalar.ph.prol ]
  %indvars.iv107.unr = phi i64 [ %indvars.iv107.ph, %scalar.ph.preheader ], [ %indvars.iv.next108.prol, %scalar.ph.prol ]
  %.unr = phi i32 [ %.ph, %scalar.ph.preheader ], [ %111, %scalar.ph.prol ]
  %112 = sub nsw i64 %indvars.iv107.ph, %wide.trip.count110
  %113 = icmp ugt i64 %112, -4
  br i1 %113, label %._crit_edge73.us.us.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv107 = phi i64 [ %indvars.iv.next108.3, %scalar.ph ], [ %indvars.iv107.unr, %scalar.ph.prol.loopexit ]
  %114 = phi i32 [ %138, %scalar.ph ], [ %.unr, %scalar.ph.prol.loopexit ]
  %115 = getelementptr inbounds i32, ptr %90, i64 %indvars.iv107
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = mul nuw nsw i64 %indvars.iv107, %28
  %gep.us.us.us = getelementptr inbounds i32, ptr %invariant.gep.us.us.us, i64 %117
  %118 = load i32, ptr %gep.us.us.us, align 4, !tbaa !5
  %119 = mul nsw i32 %118, %116
  %120 = add nsw i32 %114, %119
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %121 = getelementptr inbounds i32, ptr %90, i64 %indvars.iv.next108
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = mul nuw nsw i64 %indvars.iv.next108, %28
  %gep.us.us.us.1 = getelementptr inbounds i32, ptr %invariant.gep.us.us.us, i64 %123
  %124 = load i32, ptr %gep.us.us.us.1, align 4, !tbaa !5
  %125 = mul nsw i32 %124, %122
  %126 = add nsw i32 %120, %125
  %indvars.iv.next108.1 = add nuw nsw i64 %indvars.iv107, 2
  %127 = getelementptr inbounds i32, ptr %90, i64 %indvars.iv.next108.1
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = mul nuw nsw i64 %indvars.iv.next108.1, %28
  %gep.us.us.us.2 = getelementptr inbounds i32, ptr %invariant.gep.us.us.us, i64 %129
  %130 = load i32, ptr %gep.us.us.us.2, align 4, !tbaa !5
  %131 = mul nsw i32 %130, %128
  %132 = add nsw i32 %126, %131
  %indvars.iv.next108.2 = add nuw nsw i64 %indvars.iv107, 3
  %133 = getelementptr inbounds i32, ptr %90, i64 %indvars.iv.next108.2
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = mul nuw nsw i64 %indvars.iv.next108.2, %28
  %gep.us.us.us.3 = getelementptr inbounds i32, ptr %invariant.gep.us.us.us, i64 %135
  %136 = load i32, ptr %gep.us.us.us.3, align 4, !tbaa !5
  %137 = mul nsw i32 %136, %134
  %138 = add nsw i32 %132, %137
  %indvars.iv.next108.3 = add nuw nsw i64 %indvars.iv107, 4
  %exitcond111.not.3 = icmp eq i64 %indvars.iv.next108.3, %wide.trip.count110
  br i1 %exitcond111.not.3, label %._crit_edge73.us.us.us, label %scalar.ph, !llvm.loop !22

._crit_edge73.us.us.us:                           ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %104, %middle.block ], [ %.lcssa150.unr, %scalar.ph.prol.loopexit ], [ %138, %scalar.ph ]
  store i32 %.lcssa, ptr %93, align 4, !tbaa !5
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %exitcond116.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count115
  br i1 %exitcond116.not, label %._crit_edge76.split.us.us.us, label %.preheader50.us.us.us, !llvm.loop !23

._crit_edge76.split.us.us.us:                     ; preds = %._crit_edge73.us.us.us
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %exitcond121.not = icmp eq i64 %indvars.iv.next118, %wide.trip.count120
  br i1 %exitcond121.not, label %.preheader49, label %.preheader51.us.us, !llvm.loop !24

.preheader49:                                     ; preds = %._crit_edge76.split.us.us.us
  br i1 %70, label %.preheader.preheader, label %._crit_edge86

.preheader.preheader:                             ; preds = %.preheader53.lr.ph, %.preheader51.lr.ph, %.preheader49
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge84
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %._crit_edge84 ], [ 0, %.preheader.preheader ]
  %139 = load i32, ptr %4, align 4, !tbaa !5
  %140 = icmp sgt i32 %139, 0
  br i1 %140, label %.lr.ph83, label %._crit_edge84

.lr.ph83:                                         ; preds = %.preheader
  %141 = mul nuw nsw i64 %indvars.iv125, %65
  %142 = getelementptr inbounds i32, ptr %68, i64 %141
  br label %147

._crit_edge86:                                    ; preds = %._crit_edge84, %62, %.preheader52, %.preheader49
  call void @llvm.stackrestore.p0(ptr %66)
  br label %155

._crit_edge84:                                    ; preds = %147, %.preheader
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %144 = load i32, ptr %1, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = icmp slt i64 %indvars.iv.next126, %145
  br i1 %146, label %.preheader, label %._crit_edge86, !llvm.loop !25

147:                                              ; preds = %.lr.ph83, %147
  %indvars.iv122 = phi i64 [ 0, %.lr.ph83 ], [ %indvars.iv.next123, %147 ]
  %148 = getelementptr inbounds i32, ptr %142, i64 %indvars.iv122
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull @.str.1)
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %152 = load i32, ptr %4, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = icmp slt i64 %indvars.iv.next123, %153
  br i1 %154, label %147, label %._crit_edge84, !llvm.loop !26

155:                                              ; preds = %._crit_edge86, %60
  call void @llvm.stackrestore.p0(ptr %11)
  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
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6

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


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