; LLVM IR from amritansh22/Data-Structures-and-Algorithms-in-cpp :: matrix multiplication (main)

; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [42 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = 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 [10 x [10 x i32]], align 16
  %3 = alloca [10 x [10 x i32]], align 16
  %4 = alloca [10 x [10 x i32]], align 16
  %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 i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 400, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 400, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 400, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %18

18:                                               ; preds = %22, %0
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = icmp ne i32 %19, %20
  br i1 %21, label %22, label %30

22:                                               ; preds = %18
  %23 = 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)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br label %18, !llvm.loop !9

30:                                               ; preds = %18
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @.str.3)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %63, %30
  %35 = load i32, ptr %9, align 4, !tbaa !5
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %66

38:                                               ; preds = %34
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %59, %38
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %43, label %62

43:                                               ; preds = %39
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %45 = load i32, ptr %9, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %44, i32 noundef %46)
  %48 = load i32, ptr %10, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %47, i32 noundef %49)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @.str.5)
  %52 = load i32, ptr %9, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %53
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [10 x i32], ptr %54, i64 0, i64 %56
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %57)
  br label %59

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

62:                                               ; preds = %39
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %9, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %9, align 4, !tbaa !5
  br label %34, !llvm.loop !12

66:                                               ; preds = %34
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef @.str.6)
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %99, %66
  %71 = load i32, ptr %9, align 4, !tbaa !5
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %74, label %102

74:                                               ; preds = %70
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %95, %74
  %76 = load i32, ptr %10, align 4, !tbaa !5
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = icmp slt i32 %76, %77
  br i1 %78, label %79, label %98

79:                                               ; preds = %75
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %80, i32 noundef %82)
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %83, i32 noundef %85)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef @.str.5)
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [10 x [10 x i32]], ptr %3, i64 0, i64 %89
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [10 x i32], ptr %90, i64 0, i64 %92
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %93)
  br label %95

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

98:                                               ; preds = %75
  br label %99

99:                                               ; preds = %98
  %100 = load i32, ptr %9, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %9, align 4, !tbaa !5
  br label %70, !llvm.loop !14

102:                                              ; preds = %70
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %123, %102
  %104 = load i32, ptr %9, align 4, !tbaa !5
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %107, label %126

107:                                              ; preds = %103
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %119, %107
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = load i32, ptr %8, align 4, !tbaa !5
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %112, label %122

112:                                              ; preds = %108
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [10 x [10 x i32]], ptr %4, i64 0, i64 %114
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [10 x i32], ptr %115, i64 0, i64 %117
  store i32 0, ptr %118, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %112
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %10, align 4, !tbaa !5
  br label %108, !llvm.loop !15

122:                                              ; preds = %108
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %9, align 4, !tbaa !5
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %9, align 4, !tbaa !5
  br label %103, !llvm.loop !16

126:                                              ; preds = %103
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %173, %126
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = load i32, ptr %5, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %131, label %176

131:                                              ; preds = %127
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %169, %131
  %133 = load i32, ptr %10, align 4, !tbaa !5
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = icmp slt i32 %133, %134
  br i1 %135, label %136, label %172

136:                                              ; preds = %132
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %165, %136
  %138 = load i32, ptr %11, align 4, !tbaa !5
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %141, label %168

141:                                              ; preds = %137
  %142 = load i32, ptr %9, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %143
  %145 = load i32, ptr %11, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [10 x i32], ptr %144, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = load i32, ptr %11, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [10 x [10 x i32]], ptr %3, i64 0, i64 %150
  %152 = load i32, ptr %10, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [10 x i32], ptr %151, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = mul nsw i32 %148, %155
  %157 = load i32, ptr %9, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [10 x [10 x i32]], ptr %4, i64 0, i64 %158
  %160 = load i32, ptr %10, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [10 x i32], ptr %159, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add nsw i32 %163, %156
  store i32 %164, ptr %162, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %141
  %166 = load i32, ptr %11, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %11, align 4, !tbaa !5
  br label %137, !llvm.loop !17

168:                                              ; preds = %137
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %10, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %10, align 4, !tbaa !5
  br label %132, !llvm.loop !18

172:                                              ; preds = %132
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %9, align 4, !tbaa !5
  br label %127, !llvm.loop !19

176:                                              ; preds = %127
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %178 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %177, ptr noundef @.str.8)
  %179 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %210, %176
  %181 = load i32, ptr %9, align 4, !tbaa !5
  %182 = load i32, ptr %5, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %184, label %213

184:                                              ; preds = %180
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %185

185:                                              ; preds = %206, %184
  %186 = load i32, ptr %10, align 4, !tbaa !5
  %187 = load i32, ptr %8, align 4, !tbaa !5
  %188 = icmp slt i32 %186, %187
  br i1 %188, label %189, label %209

189:                                              ; preds = %185
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [10 x [10 x i32]], ptr %4, i64 0, i64 %192
  %194 = load i32, ptr %10, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [10 x i32], ptr %193, i64 0, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %190, i32 noundef %197)
  %199 = load i32, ptr %10, align 4, !tbaa !5
  %200 = load i32, ptr %8, align 4, !tbaa !5
  %201 = sub nsw i32 %200, 1
  %202 = icmp eq i32 %199, %201
  br i1 %202, label %203, label %205

203:                                              ; preds = %189
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %205

205:                                              ; preds = %203, %189
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %10, align 4, !tbaa !5
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %10, align 4, !tbaa !5
  br label %185, !llvm.loop !20

209:                                              ; preds = %185
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %9, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %9, align 4, !tbaa !5
  br label %180, !llvm.loop !21

213:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 400, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 400, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 400, ptr %2) #5
  ret i32 0
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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) #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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 = { 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 #3 = { "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 #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 = { 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}
!21 = distinct !{!21, !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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [42 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = 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 [10 x [10 x i32]], align 16
  %2 = alloca [10 x [10 x i32]], align 16
  %3 = alloca [10 x [10 x i32]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  %8 = tail 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)
  %9 = 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)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %11 = 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.1)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %14 = load i32, ptr %5, align 4, !tbaa !5
  %15 = load i32, ptr %6, align 4, !tbaa !5
  %.not54 = icmp eq i32 %14, %15
  br i1 %.not54, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  %16 = 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)
  %17 = 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)
  %18 = 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)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %20 = 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.1)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %.not = icmp eq i32 %23, %24
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %0
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.3)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  %30 = load i32, ptr %5, align 4
  %31 = icmp sgt i32 %30, 0
  %or.cond136 = select i1 %29, i1 %31, i1 false
  br i1 %or.cond136, label %.preheader53, label %._crit_edge59

.preheader53:                                     ; preds = %._crit_edge, %._crit_edge57
  %32 = phi i32 [ %48, %._crit_edge57 ], [ %28, %._crit_edge ]
  %33 = phi i32 [ %49, %._crit_edge57 ], [ %30, %._crit_edge ]
  %indvars.iv92 = phi i64 [ %35, %._crit_edge57 ], [ 0, %._crit_edge ]
  %34 = icmp sgt i32 %33, 0
  %35 = add nuw nsw i64 %indvars.iv92, 1
  br i1 %34, label %.lr.ph56, label %._crit_edge57

.lr.ph56:                                         ; preds = %.preheader53
  %36 = trunc nuw nsw i64 %35 to i32
  br label %37

37:                                               ; preds = %.lr.ph56, %37
  %indvars.iv = phi i64 [ 0, %.lr.ph56 ], [ %indvars.iv.next, %37 ]
  %38 = 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.4)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef %36)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = trunc nuw nsw i64 %indvars.iv.next to i32
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef %40)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @.str.5)
  %43 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv92, i64 %indvars.iv
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next, %46
  br i1 %47, label %37, label %._crit_edge57.loopexit, !llvm.loop !11

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

._crit_edge57:                                    ; preds = %.preheader53, %._crit_edge57.loopexit
  %48 = phi i32 [ %.pre, %._crit_edge57.loopexit ], [ %32, %.preheader53 ]
  %49 = phi i32 [ %45, %._crit_edge57.loopexit ], [ %33, %.preheader53 ]
  %50 = sext i32 %48 to i64
  %51 = icmp slt i64 %35, %50
  br i1 %51, label %.preheader53, label %._crit_edge59, !llvm.loop !12

._crit_edge59:                                    ; preds = %._crit_edge57, %._crit_edge
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull @.str.6)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  %57 = load i32, ptr %7, align 4
  %58 = icmp sgt i32 %57, 0
  %or.cond138 = select i1 %56, i1 %58, i1 false
  br i1 %or.cond138, label %.preheader52, label %.preheader51

.preheader52:                                     ; preds = %._crit_edge59, %._crit_edge62
  %59 = phi i32 [ %91, %._crit_edge62 ], [ %55, %._crit_edge59 ]
  %60 = phi i32 [ %92, %._crit_edge62 ], [ %57, %._crit_edge59 ]
  %indvars.iv98 = phi i64 [ %62, %._crit_edge62 ], [ 0, %._crit_edge59 ]
  %61 = icmp sgt i32 %60, 0
  %62 = add nuw nsw i64 %indvars.iv98, 1
  br i1 %61, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %.preheader52
  %63 = trunc nuw nsw i64 %62 to i32
  br label %80

.preheader51:                                     ; preds = %._crit_edge62, %._crit_edge59
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.preheader50.lr.ph, label %._crit_edge75

.preheader50.lr.ph:                               ; preds = %.preheader51
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.preheader50.us.preheader, label %._crit_edge75

.preheader50.us.preheader:                        ; preds = %.preheader50.lr.ph
  %68 = zext nneg i32 %66 to i64
  %69 = shl nuw nsw i64 %68, 2
  %wide.trip.count = zext nneg i32 %64 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %70 = icmp ult i32 %64, 8
  br i1 %70, label %.preheader49.unr-lcssa, label %.preheader50.us.preheader.new

.preheader50.us.preheader.new:                    ; preds = %.preheader50.us.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483640
  %invariant.gep = getelementptr i8, ptr %3, i64 80
  %invariant.gep156 = getelementptr i8, ptr %3, i64 120
  %invariant.gep158 = getelementptr i8, ptr %3, i64 160
  %invariant.gep160 = getelementptr i8, ptr %3, i64 200
  %invariant.gep162 = getelementptr i8, ptr %3, i64 240
  %invariant.gep164 = getelementptr i8, ptr %3, i64 280
  br label %.preheader50.us

.preheader50.us:                                  ; preds = %.preheader50.us, %.preheader50.us.preheader.new
  %indvar = phi i64 [ 0, %.preheader50.us.preheader.new ], [ %indvar.next.7, %.preheader50.us ]
  %niter = phi i64 [ 0, %.preheader50.us.preheader.new ], [ %niter.next.7, %.preheader50.us ]
  %71 = mul nuw nsw i64 %indvar, 40
  %scevgep = getelementptr i8, ptr %3, i64 %71
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %69, i1 false), !tbaa !5
  %72 = mul nuw i64 %indvar, 40
  %73 = or disjoint i64 %72, 40
  %scevgep.1 = getelementptr i8, ptr %3, i64 %73
  call void @llvm.memset.p0.i64(ptr align 8 %scevgep.1, i8 0, i64 %69, i1 false), !tbaa !5
  %74 = mul nuw i64 %indvar, 40
  %gep = getelementptr i8, ptr %invariant.gep, i64 %74
  call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %69, i1 false), !tbaa !5
  %75 = mul nuw i64 %indvar, 40
  %gep157 = getelementptr i8, ptr %invariant.gep156, i64 %75
  call void @llvm.memset.p0.i64(ptr align 8 %gep157, i8 0, i64 %69, i1 false), !tbaa !5
  %76 = mul nuw i64 %indvar, 40
  %gep159 = getelementptr i8, ptr %invariant.gep158, i64 %76
  call void @llvm.memset.p0.i64(ptr align 16 %gep159, i8 0, i64 %69, i1 false), !tbaa !5
  %77 = mul nuw i64 %indvar, 40
  %gep161 = getelementptr i8, ptr %invariant.gep160, i64 %77
  call void @llvm.memset.p0.i64(ptr align 8 %gep161, i8 0, i64 %69, i1 false), !tbaa !5
  %78 = mul nuw i64 %indvar, 40
  %gep163 = getelementptr i8, ptr %invariant.gep162, i64 %78
  call void @llvm.memset.p0.i64(ptr align 16 %gep163, i8 0, i64 %69, i1 false), !tbaa !5
  %79 = mul nuw i64 %indvar, 40
  %gep165 = getelementptr i8, ptr %invariant.gep164, i64 %79
  call void @llvm.memset.p0.i64(ptr align 8 %gep165, i8 0, i64 %69, 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 %.preheader49.unr-lcssa, label %.preheader50.us, !llvm.loop !14

80:                                               ; preds = %.lr.ph61, %80
  %indvars.iv95 = phi i64 [ 0, %.lr.ph61 ], [ %indvars.iv.next96, %80 ]
  %81 = 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.7)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %81, i32 noundef %63)
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %83 = trunc nuw nsw i64 %indvars.iv.next96 to i32
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %82, i32 noundef %83)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @.str.5)
  %86 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %indvars.iv98, i64 %indvars.iv95
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %86)
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next96, %89
  br i1 %90, label %80, label %._crit_edge62.loopexit, !llvm.loop !15

._crit_edge62.loopexit:                           ; preds = %80
  %.pre126 = load i32, ptr %6, align 4, !tbaa !5
  br label %._crit_edge62

._crit_edge62:                                    ; preds = %.preheader52, %._crit_edge62.loopexit
  %91 = phi i32 [ %.pre126, %._crit_edge62.loopexit ], [ %59, %.preheader52 ]
  %92 = phi i32 [ %88, %._crit_edge62.loopexit ], [ %60, %.preheader52 ]
  %93 = sext i32 %91 to i64
  %94 = icmp slt i64 %62, %93
  br i1 %94, label %.preheader52, label %.preheader51, !llvm.loop !16

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

.preheader50.us.epil:                             ; preds = %.preheader49.unr-lcssa, %.preheader50.us.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader50.us.epil ], [ %indvar.unr, %.preheader49.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader50.us.epil ], [ 0, %.preheader49.unr-lcssa ]
  %95 = mul nuw nsw i64 %indvar.epil, 40
  %scevgep.epil = getelementptr i8, ptr %3, i64 %95
  call void @llvm.memset.p0.i64(ptr align 8 %scevgep.epil, i8 0, i64 %69, 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 %.preheader49, label %.preheader50.us.epil, !llvm.loop !17

.preheader49:                                     ; preds = %.preheader50.us.epil, %.preheader49.unr-lcssa
  br i1 %65, label %.preheader48.lr.ph, label %._crit_edge75

.preheader48.lr.ph:                               ; preds = %.preheader49
  %.pr = load i32, ptr %7, align 4, !tbaa !5
  %96 = icmp sgt i32 %.pr, 0
  %97 = load i32, ptr %5, align 4
  %98 = icmp sgt i32 %97, 0
  %or.cond = select i1 %96, i1 %98, i1 false
  br i1 %or.cond, label %.preheader48.us.us.preheader, label %._crit_edge75

.preheader48.us.us.preheader:                     ; preds = %.preheader48.lr.ph
  %wide.trip.count118 = zext nneg i32 %64 to i64
  %wide.trip.count113 = zext nneg i32 %.pr to i64
  %wide.trip.count108 = zext nneg i32 %97 to i64
  %min.iters.check = icmp ult i32 %97, 8
  %n.vec = and i64 %wide.trip.count108, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count108
  br label %.preheader48.us.us

.preheader48.us.us:                               ; preds = %.preheader48.us.us.preheader, %._crit_edge73.split.us.us.us
  %indvars.iv115 = phi i64 [ 0, %.preheader48.us.us.preheader ], [ %indvars.iv.next116, %._crit_edge73.split.us.us.us ]
  br label %.preheader47.us.us.us

.preheader47.us.us.us:                            ; preds = %._crit_edge70.us.us.us, %.preheader48.us.us
  %indvars.iv110 = phi i64 [ %indvars.iv.next111, %._crit_edge70.us.us.us ], [ 0, %.preheader48.us.us ]
  %99 = getelementptr inbounds [10 x [10 x i32]], ptr %3, i64 0, i64 %indvars.iv115, i64 %indvars.iv110
  %.promoted.us.us.us = load i32, ptr %99, align 4, !tbaa !5
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.preheader47.us.us.us
  %100 = 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> [ %100, %vector.ph ], [ %136, %vector.body ]
  %vec.phi144 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %137, %vector.body ]
  %101 = or disjoint i64 %index, 1
  %102 = or disjoint i64 %index, 2
  %103 = or disjoint i64 %index, 3
  %104 = or disjoint i64 %index, 4
  %105 = or disjoint i64 %index, 5
  %106 = or disjoint i64 %index, 6
  %107 = or disjoint i64 %index, 7
  %108 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv115, i64 %index
  %109 = getelementptr inbounds i8, ptr %108, i64 16
  %wide.load = load <4 x i32>, ptr %108, align 8, !tbaa !5
  %wide.load145 = load <4 x i32>, ptr %109, align 8, !tbaa !5
  %110 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %index, i64 %indvars.iv110
  %111 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %101, i64 %indvars.iv110
  %112 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %102, i64 %indvars.iv110
  %113 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %103, i64 %indvars.iv110
  %114 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %104, i64 %indvars.iv110
  %115 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %105, i64 %indvars.iv110
  %116 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %106, i64 %indvars.iv110
  %117 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %107, i64 %indvars.iv110
  %118 = load i32, ptr %110, align 4, !tbaa !5
  %119 = load i32, ptr %111, align 4, !tbaa !5
  %120 = load i32, ptr %112, align 4, !tbaa !5
  %121 = load i32, ptr %113, align 4, !tbaa !5
  %122 = insertelement <4 x i32> poison, i32 %118, i64 0
  %123 = insertelement <4 x i32> %122, i32 %119, i64 1
  %124 = insertelement <4 x i32> %123, i32 %120, i64 2
  %125 = insertelement <4 x i32> %124, i32 %121, i64 3
  %126 = load i32, ptr %114, align 4, !tbaa !5
  %127 = load i32, ptr %115, align 4, !tbaa !5
  %128 = load i32, ptr %116, align 4, !tbaa !5
  %129 = load i32, ptr %117, align 4, !tbaa !5
  %130 = insertelement <4 x i32> poison, i32 %126, i64 0
  %131 = insertelement <4 x i32> %130, i32 %127, i64 1
  %132 = insertelement <4 x i32> %131, i32 %128, i64 2
  %133 = insertelement <4 x i32> %132, i32 %129, i64 3
  %134 = mul nsw <4 x i32> %125, %wide.load
  %135 = mul nsw <4 x i32> %133, %wide.load145
  %136 = add <4 x i32> %vec.phi, %134
  %137 = add <4 x i32> %vec.phi144, %135
  %index.next = add nuw i64 %index, 8
  %138 = icmp eq i64 %index.next, %n.vec
  br i1 %138, label %middle.block, label %vector.body, !llvm.loop !19

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

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader47.us.us.us
  %indvars.iv105.ph = phi i64 [ 0, %.preheader47.us.us.us ], [ %n.vec, %middle.block ]
  %.ph = phi i32 [ %.promoted.us.us.us, %.preheader47.us.us.us ], [ %139, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %scalar.ph ], [ %indvars.iv105.ph, %scalar.ph.preheader ]
  %140 = phi i32 [ %146, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %141 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv115, i64 %indvars.iv105
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %indvars.iv105, i64 %indvars.iv110
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = mul nsw i32 %144, %142
  %146 = add nsw i32 %140, %145
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next106, %wide.trip.count108
  br i1 %exitcond109.not, label %._crit_edge70.us.us.us, label %scalar.ph, !llvm.loop !22

._crit_edge70.us.us.us:                           ; preds = %scalar.ph, %middle.block
  %.lcssa141 = phi i32 [ %139, %middle.block ], [ %146, %scalar.ph ]
  store i32 %.lcssa141, ptr %99, align 4, !tbaa !5
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond114.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count113
  br i1 %exitcond114.not, label %._crit_edge73.split.us.us.us, label %.preheader47.us.us.us, !llvm.loop !23

._crit_edge73.split.us.us.us:                     ; preds = %._crit_edge70.us.us.us
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond119.not = icmp eq i64 %indvars.iv.next116, %wide.trip.count118
  br i1 %exitcond119.not, label %._crit_edge75, label %.preheader48.us.us, !llvm.loop !24

._crit_edge75:                                    ; preds = %._crit_edge73.split.us.us.us, %.preheader50.lr.ph, %.preheader51, %.preheader48.lr.ph, %.preheader49
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull @.str.8)
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %148, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %150 = load i32, ptr %4, align 4, !tbaa !5
  %151 = icmp sgt i32 %150, 0
  %152 = load i32, ptr %7, align 4
  %153 = icmp sgt i32 %152, 0
  %or.cond140 = select i1 %151, i1 %153, i1 false
  br i1 %or.cond140, label %.preheader, label %._crit_edge84

.preheader:                                       ; preds = %._crit_edge75, %._crit_edge82
  %154 = phi i32 [ %171, %._crit_edge82 ], [ %150, %._crit_edge75 ]
  %155 = phi i32 [ %172, %._crit_edge82 ], [ %152, %._crit_edge75 ]
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %._crit_edge82 ], [ 0, %._crit_edge75 ]
  %156 = icmp sgt i32 %155, 0
  br i1 %156, label %.lr.ph81, label %._crit_edge82

.lr.ph81:                                         ; preds = %.preheader, %167
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %167 ], [ 0, %.preheader ]
  %157 = 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.9)
  %158 = getelementptr inbounds [10 x [10 x i32]], ptr %3, i64 0, i64 %indvars.iv123, i64 %indvars.iv120
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %157, i32 noundef %159)
  %161 = load i32, ptr %7, align 4, !tbaa !5
  %162 = add nsw i32 %161, -1
  %163 = zext i32 %162 to i64
  %164 = icmp eq i64 %indvars.iv120, %163
  br i1 %164, label %165, label %167

165:                                              ; preds = %.lr.ph81
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %.pre127 = load i32, ptr %7, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %.lr.ph81, %165
  %168 = phi i32 [ %161, %.lr.ph81 ], [ %.pre127, %165 ]
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %169 = sext i32 %168 to i64
  %170 = icmp slt i64 %indvars.iv.next121, %169
  br i1 %170, label %.lr.ph81, label %._crit_edge82.loopexit, !llvm.loop !25

._crit_edge82.loopexit:                           ; preds = %167
  %.pre128 = load i32, ptr %4, align 4, !tbaa !5
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %._crit_edge82.loopexit, %.preheader
  %171 = phi i32 [ %.pre128, %._crit_edge82.loopexit ], [ %154, %.preheader ]
  %172 = phi i32 [ %168, %._crit_edge82.loopexit ], [ %155, %.preheader ]
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %173 = sext i32 %171 to i64
  %174 = icmp slt i64 %indvars.iv.next124, %173
  br i1 %174, label %.preheader, label %._crit_edge84, !llvm.loop !26

._crit_edge84:                                    ; preds = %._crit_edge82, %._crit_edge75
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 400, 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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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: 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 = { 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 #3 = { "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 #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 = { 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}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10, !13}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !13}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !10, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !10, !21, !20}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10, !13}


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