; LLVM IR from ahampriyanshu/algo-ds-101 :: Algorithms/Array (rotate_matrix_90degree)

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

30:                                               ; preds = %54, %0
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %57

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

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

40:                                               ; preds = %36
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %53

41:                                               ; preds = %36
  %42 = load i32, ptr %7, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = mul nsw i64 %43, %25
  %45 = getelementptr inbounds i32, ptr %28, i64 %44
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %45, i64 %47
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %48)
  br label %50

50:                                               ; preds = %41
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %9, align 4, !tbaa !5
  br label %36, !llvm.loop !9

53:                                               ; preds = %40
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %7, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %7, align 4, !tbaa !5
  br label %30, !llvm.loop !11

57:                                               ; preds = %34
  %58 = 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)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %60 = 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)
  %61 = 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)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %90, %57
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %93

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

69:                                               ; preds = %85, %68
  %70 = load i32, ptr %11, align 4, !tbaa !5
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %69
  %75 = load i32, ptr %10, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = mul nsw i64 %76, %25
  %78 = getelementptr inbounds i32, ptr %28, i64 %77
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds i32, ptr %78, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @.str.6)
  br label %85

85:                                               ; preds = %74
  %86 = load i32, ptr %11, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %11, align 4, !tbaa !5
  br label %69, !llvm.loop !12

88:                                               ; preds = %73
  %89 = 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 %90

90:                                               ; preds = %88
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %10, align 4, !tbaa !5
  br label %63, !llvm.loop !13

93:                                               ; preds = %67
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = icmp eq i32 %94, 1
  br i1 %95, label %96, label %207

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %203, %96
  %98 = load i32, ptr %12, align 4, !tbaa !5
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = sdiv i32 %99, 2
  %101 = icmp slt i32 %98, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %97
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %206

103:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %104 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %104, ptr %13, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %199, %103
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = sub nsw i32 %107, %108
  %110 = sub nsw i32 %109, 1
  %111 = icmp slt i32 %106, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %105
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %202

113:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %114 = load i32, ptr %12, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = mul nsw i64 %115, %25
  %117 = getelementptr inbounds i32, ptr %28, i64 %116
  %118 = load i32, ptr %13, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  store i32 %121, ptr %14, align 4, !tbaa !5
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = mul nsw i64 %123, %25
  %125 = getelementptr inbounds i32, ptr %28, i64 %124
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = sub nsw i32 %126, 1
  %128 = load i32, ptr %12, align 4, !tbaa !5
  %129 = sub nsw i32 %127, %128
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %125, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = mul nsw i64 %134, %25
  %136 = getelementptr inbounds i32, ptr %28, i64 %135
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %136, i64 %138
  store i32 %132, ptr %139, align 4, !tbaa !5
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = sub nsw i32 %140, 1
  %142 = load i32, ptr %12, align 4, !tbaa !5
  %143 = sub nsw i32 %141, %142
  %144 = sext i32 %143 to i64
  %145 = mul nsw i64 %144, %25
  %146 = getelementptr inbounds i32, ptr %28, i64 %145
  %147 = load i32, ptr %2, align 4, !tbaa !5
  %148 = sub nsw i32 %147, 1
  %149 = load i32, ptr %13, align 4, !tbaa !5
  %150 = sub nsw i32 %148, %149
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i32, ptr %146, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = mul nsw i64 %155, %25
  %157 = getelementptr inbounds i32, ptr %28, i64 %156
  %158 = load i32, ptr %2, align 4, !tbaa !5
  %159 = sub nsw i32 %158, 1
  %160 = load i32, ptr %12, align 4, !tbaa !5
  %161 = sub nsw i32 %159, %160
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i32, ptr %157, i64 %162
  store i32 %153, ptr %163, align 4, !tbaa !5
  %164 = load i32, ptr %2, align 4, !tbaa !5
  %165 = sub nsw i32 %164, 1
  %166 = load i32, ptr %13, align 4, !tbaa !5
  %167 = sub nsw i32 %165, %166
  %168 = sext i32 %167 to i64
  %169 = mul nsw i64 %168, %25
  %170 = getelementptr inbounds i32, ptr %28, i64 %169
  %171 = load i32, ptr %12, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %170, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = load i32, ptr %2, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 1
  %177 = load i32, ptr %12, align 4, !tbaa !5
  %178 = sub nsw i32 %176, %177
  %179 = sext i32 %178 to i64
  %180 = mul nsw i64 %179, %25
  %181 = getelementptr inbounds i32, ptr %28, i64 %180
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = sub nsw i32 %182, 1
  %184 = load i32, ptr %13, align 4, !tbaa !5
  %185 = sub nsw i32 %183, %184
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i32, ptr %181, i64 %186
  store i32 %174, ptr %187, align 4, !tbaa !5
  %188 = load i32, ptr %14, align 4, !tbaa !5
  %189 = load i32, ptr %2, align 4, !tbaa !5
  %190 = sub nsw i32 %189, 1
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = sub nsw i32 %190, %191
  %193 = sext i32 %192 to i64
  %194 = mul nsw i64 %193, %25
  %195 = getelementptr inbounds i32, ptr %28, i64 %194
  %196 = load i32, ptr %12, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %195, i64 %197
  store i32 %188, ptr %198, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %199

199:                                              ; preds = %113
  %200 = load i32, ptr %13, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %13, align 4, !tbaa !5
  br label %105, !llvm.loop !14

202:                                              ; preds = %112
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %12, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %12, align 4, !tbaa !5
  br label %97, !llvm.loop !15

206:                                              ; preds = %102
  br label %324

207:                                              ; preds = %93
  %208 = load i32, ptr %6, align 4, !tbaa !5
  %209 = icmp eq i32 %208, 2
  br i1 %209, label %210, label %321

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

211:                                              ; preds = %317, %210
  %212 = load i32, ptr %15, align 4, !tbaa !5
  %213 = load i32, ptr %2, align 4, !tbaa !5
  %214 = sdiv i32 %213, 2
  %215 = icmp slt i32 %212, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %211
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %320

217:                                              ; preds = %211
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %218 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %218, ptr %16, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %313, %217
  %220 = load i32, ptr %16, align 4, !tbaa !5
  %221 = load i32, ptr %2, align 4, !tbaa !5
  %222 = load i32, ptr %15, align 4, !tbaa !5
  %223 = sub nsw i32 %221, %222
  %224 = sub nsw i32 %223, 1
  %225 = icmp slt i32 %220, %224
  br i1 %225, label %227, label %226

226:                                              ; preds = %219
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %316

227:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %228 = load i32, ptr %15, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = mul nsw i64 %229, %25
  %231 = getelementptr inbounds i32, ptr %28, i64 %230
  %232 = load i32, ptr %16, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds i32, ptr %231, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !5
  store i32 %235, ptr %17, align 4, !tbaa !5
  %236 = load i32, ptr %2, align 4, !tbaa !5
  %237 = sub nsw i32 %236, 1
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = sub nsw i32 %237, %238
  %240 = sext i32 %239 to i64
  %241 = mul nsw i64 %240, %25
  %242 = getelementptr inbounds i32, ptr %28, i64 %241
  %243 = load i32, ptr %15, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds i32, ptr %242, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = load i32, ptr %15, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = mul nsw i64 %248, %25
  %250 = getelementptr inbounds i32, ptr %28, i64 %249
  %251 = load i32, ptr %16, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds i32, ptr %250, i64 %252
  store i32 %246, ptr %253, align 4, !tbaa !5
  %254 = load i32, ptr %2, align 4, !tbaa !5
  %255 = sub nsw i32 %254, 1
  %256 = load i32, ptr %15, align 4, !tbaa !5
  %257 = sub nsw i32 %255, %256
  %258 = sext i32 %257 to i64
  %259 = mul nsw i64 %258, %25
  %260 = getelementptr inbounds i32, ptr %28, i64 %259
  %261 = load i32, ptr %2, align 4, !tbaa !5
  %262 = sub nsw i32 %261, 1
  %263 = load i32, ptr %16, align 4, !tbaa !5
  %264 = sub nsw i32 %262, %263
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds i32, ptr %260, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = load i32, ptr %2, align 4, !tbaa !5
  %269 = sub nsw i32 %268, 1
  %270 = load i32, ptr %16, align 4, !tbaa !5
  %271 = sub nsw i32 %269, %270
  %272 = sext i32 %271 to i64
  %273 = mul nsw i64 %272, %25
  %274 = getelementptr inbounds i32, ptr %28, i64 %273
  %275 = load i32, ptr %15, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds i32, ptr %274, i64 %276
  store i32 %267, ptr %277, align 4, !tbaa !5
  %278 = load i32, ptr %16, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = mul nsw i64 %279, %25
  %281 = getelementptr inbounds i32, ptr %28, i64 %280
  %282 = load i32, ptr %2, align 4, !tbaa !5
  %283 = sub nsw i32 %282, 1
  %284 = load i32, ptr %15, align 4, !tbaa !5
  %285 = sub nsw i32 %283, %284
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds i32, ptr %281, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = load i32, ptr %2, align 4, !tbaa !5
  %290 = sub nsw i32 %289, 1
  %291 = load i32, ptr %15, align 4, !tbaa !5
  %292 = sub nsw i32 %290, %291
  %293 = sext i32 %292 to i64
  %294 = mul nsw i64 %293, %25
  %295 = getelementptr inbounds i32, ptr %28, i64 %294
  %296 = load i32, ptr %2, align 4, !tbaa !5
  %297 = sub nsw i32 %296, 1
  %298 = load i32, ptr %16, align 4, !tbaa !5
  %299 = sub nsw i32 %297, %298
  %300 = sext i32 %299 to i64
  %301 = getelementptr inbounds i32, ptr %295, i64 %300
  store i32 %288, ptr %301, align 4, !tbaa !5
  %302 = load i32, ptr %17, align 4, !tbaa !5
  %303 = load i32, ptr %16, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = mul nsw i64 %304, %25
  %306 = getelementptr inbounds i32, ptr %28, i64 %305
  %307 = load i32, ptr %2, align 4, !tbaa !5
  %308 = sub nsw i32 %307, 1
  %309 = load i32, ptr %15, align 4, !tbaa !5
  %310 = sub nsw i32 %308, %309
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds i32, ptr %306, i64 %311
  store i32 %302, ptr %312, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %313

313:                                              ; preds = %227
  %314 = load i32, ptr %16, align 4, !tbaa !5
  %315 = add nsw i32 %314, 1
  store i32 %315, ptr %16, align 4, !tbaa !5
  br label %219, !llvm.loop !16

316:                                              ; preds = %226
  br label %317

317:                                              ; preds = %316
  %318 = load i32, ptr %15, align 4, !tbaa !5
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %15, align 4, !tbaa !5
  br label %211, !llvm.loop !17

320:                                              ; preds = %216
  br label %323

321:                                              ; preds = %207
  %322 = 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)
  br label %323

323:                                              ; preds = %321, %320
  br label %324

324:                                              ; preds = %323, %206
  %325 = load i32, ptr %6, align 4, !tbaa !5
  %326 = icmp eq i32 %325, 1
  br i1 %326, label %330, label %327

327:                                              ; preds = %324
  %328 = load i32, ptr %6, align 4, !tbaa !5
  %329 = icmp eq i32 %328, 2
  br i1 %329, label %330, label %363

330:                                              ; preds = %327, %324
  %331 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %332

332:                                              ; preds = %359, %330
  %333 = load i32, ptr %18, align 4, !tbaa !5
  %334 = load i32, ptr %2, align 4, !tbaa !5
  %335 = icmp slt i32 %333, %334
  br i1 %335, label %337, label %336

336:                                              ; preds = %332
  store i32 26, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %362

337:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %338

338:                                              ; preds = %354, %337
  %339 = load i32, ptr %19, align 4, !tbaa !5
  %340 = load i32, ptr %2, align 4, !tbaa !5
  %341 = icmp slt i32 %339, %340
  br i1 %341, label %343, label %342

342:                                              ; preds = %338
  store i32 29, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %357

343:                                              ; preds = %338
  %344 = load i32, ptr %18, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = mul nsw i64 %345, %25
  %347 = getelementptr inbounds i32, ptr %28, i64 %346
  %348 = load i32, ptr %19, align 4, !tbaa !5
  %349 = sext i32 %348 to i64
  %350 = getelementptr inbounds i32, ptr %347, i64 %349
  %351 = load i32, ptr %350, align 4, !tbaa !5
  %352 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %351)
  %353 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %352, ptr noundef @.str.6)
  br label %354

354:                                              ; preds = %343
  %355 = load i32, ptr %19, align 4, !tbaa !5
  %356 = add nsw i32 %355, 1
  store i32 %356, ptr %19, align 4, !tbaa !5
  br label %338, !llvm.loop !18

357:                                              ; preds = %342
  %358 = 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 %359

359:                                              ; preds = %357
  %360 = load i32, ptr %18, align 4, !tbaa !5
  %361 = add nsw i32 %360, 1
  store i32 %361, ptr %18, align 4, !tbaa !5
  br label %332, !llvm.loop !19

362:                                              ; preds = %336
  br label %363

363:                                              ; preds = %362, %327
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %364 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %364)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %365 = load i32, ptr %1, align 4
  ret i32 %365
}

; 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: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 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

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

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


; 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 [34 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str.1 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %3 = 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)
  %4 = 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)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = zext i32 %5 to i64
  %7 = call ptr @llvm.stacksave.p0()
  %8 = mul nuw i64 %6, %6
  %9 = alloca i32, i64 %8, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %10 = 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)
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.preheader83, label %._crit_edge86

.preheader83:                                     ; preds = %0, %._crit_edge
  %13 = phi i32 [ %24, %._crit_edge ], [ %11, %0 ]
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %._crit_edge ], [ 0, %0 ]
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %.preheader83.._crit_edge_crit_edge

.preheader83.._crit_edge_crit_edge:               ; preds = %.preheader83
  %.pre151 = sext i32 %13 to i64
  br label %._crit_edge

.lr.ph:                                           ; preds = %.preheader83
  %15 = mul nuw nsw i64 %indvars.iv114, %6
  %16 = getelementptr inbounds i32, ptr %9, i64 %15
  br label %26

._crit_edge86:                                    ; preds = %._crit_edge, %0
  %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.2)
  %18 = 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.3)
  %19 = 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)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.preheader82, label %._crit_edge91

._crit_edge:                                      ; preds = %26, %.preheader83.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre151, %.preheader83.._crit_edge_crit_edge ], [ %30, %26 ]
  %24 = phi i32 [ %13, %.preheader83.._crit_edge_crit_edge ], [ %29, %26 ]
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %25 = icmp slt i64 %indvars.iv.next115, %.pre-phi
  br i1 %25, label %.preheader83, label %._crit_edge86, !llvm.loop !9

26:                                               ; preds = %.lr.ph, %26
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %26 ]
  %27 = getelementptr inbounds i32, ptr %16, i64 %indvars.iv
  %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) %27)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr %1, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %26, label %._crit_edge, !llvm.loop !12

.preheader82:                                     ; preds = %._crit_edge86, %._crit_edge89
  %32 = phi i32 [ %48, %._crit_edge89 ], [ %22, %._crit_edge86 ]
  %indvars.iv120 = phi i64 [ %indvars.iv.next121, %._crit_edge89 ], [ 0, %._crit_edge86 ]
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph88, label %._crit_edge89

.lr.ph88:                                         ; preds = %.preheader82
  %34 = mul nuw nsw i64 %indvars.iv120, %6
  %35 = getelementptr inbounds i32, ptr %9, i64 %34
  br label %51

._crit_edge91:                                    ; preds = %._crit_edge89, %._crit_edge86
  %.lcssa = phi i32 [ %22, %._crit_edge86 ], [ %48, %._crit_edge89 ]
  %36 = load i32, ptr %2, align 4
  switch i32 %36, label %.loopexit78 [
    i32 1, label %.preheader77
    i32 2, label %.preheader80
  ]

.preheader80:                                     ; preds = %._crit_edge91
  %37 = icmp sgt i32 %.lcssa, 1
  br i1 %37, label %.preheader79.lr.ph, label %.loopexit78.thread

.preheader79.lr.ph:                               ; preds = %.preheader80
  %38 = lshr i32 %.lcssa, 1
  %39 = add nsw i32 %.lcssa, -1
  %40 = zext nneg i32 %.lcssa to i64
  %41 = zext nneg i32 %39 to i64
  %wide.trip.count131 = zext nneg i32 %38 to i64
  br label %.preheader79

.preheader77:                                     ; preds = %._crit_edge91
  %42 = icmp sgt i32 %.lcssa, 1
  br i1 %42, label %.preheader76.lr.ph, label %.loopexit78.thread

.preheader76.lr.ph:                               ; preds = %.preheader77
  %43 = lshr i32 %.lcssa, 1
  %44 = add nsw i32 %.lcssa, -1
  %45 = zext nneg i32 %.lcssa to i64
  %46 = zext nneg i32 %44 to i64
  %wide.trip.count143 = zext nneg i32 %43 to i64
  br label %.preheader76

._crit_edge89:                                    ; preds = %51, %.preheader82
  %47 = 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_)
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next121, %49
  br i1 %50, label %.preheader82, label %._crit_edge91, !llvm.loop !13

51:                                               ; preds = %.lr.ph88, %51
  %indvars.iv117 = phi i64 [ 0, %.lr.ph88 ], [ %indvars.iv.next118, %51 ]
  %52 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv117
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %53)
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @.str.6)
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = icmp slt i64 %indvars.iv.next118, %57
  br i1 %58, label %51, label %._crit_edge89, !llvm.loop !14

.preheader76:                                     ; preds = %.preheader76.lr.ph, %._crit_edge100
  %indvars.iv138 = phi i32 [ %44, %.preheader76.lr.ph ], [ %indvars.iv.next139, %._crit_edge100 ]
  %indvars.iv133 = phi i64 [ 0, %.preheader76.lr.ph ], [ %indvars.iv.next134, %._crit_edge100 ]
  %59 = xor i64 %indvars.iv133, -1
  %60 = add nsw i64 %45, %59
  %61 = icmp slt i64 %indvars.iv133, %60
  br i1 %61, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %.preheader76
  %62 = mul nuw nsw i64 %indvars.iv133, %6
  %63 = getelementptr inbounds i32, ptr %9, i64 %62
  %64 = sub nsw i64 %46, %indvars.iv133
  %65 = mul nsw i64 %64, %6
  %66 = getelementptr inbounds i32, ptr %9, i64 %65
  %invariant.gep101 = getelementptr i32, ptr %9, i64 %indvars.iv133
  %wide.trip.count140 = zext i32 %indvars.iv138 to i64
  br label %67

._crit_edge100:                                   ; preds = %67, %.preheader76
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %indvars.iv.next139 = add i32 %indvars.iv138, -1
  %exitcond144.not = icmp eq i64 %indvars.iv.next134, %wide.trip.count143
  br i1 %exitcond144.not, label %.loopexit78.thread, label %.preheader76, !llvm.loop !15

67:                                               ; preds = %.lr.ph99, %67
  %indvars.iv135 = phi i64 [ %indvars.iv133, %.lr.ph99 ], [ %indvars.iv.next136, %67 ]
  %68 = getelementptr inbounds i32, ptr %63, i64 %indvars.iv135
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = mul nuw nsw i64 %indvars.iv135, %6
  %71 = getelementptr inbounds i32, ptr %9, i64 %70
  %72 = getelementptr inbounds i32, ptr %71, i64 %60
  %73 = load i32, ptr %72, align 4, !tbaa !5
  store i32 %73, ptr %68, align 4, !tbaa !5
  %74 = sub nsw i64 %46, %indvars.iv135
  %75 = getelementptr inbounds i32, ptr %66, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = getelementptr inbounds i32, ptr %71, i64 %64
  store i32 %76, ptr %77, align 4, !tbaa !5
  %78 = mul nsw i64 %74, %6
  %gep102 = getelementptr i32, ptr %invariant.gep101, i64 %78
  %79 = load i32, ptr %gep102, align 4, !tbaa !5
  store i32 %79, ptr %75, align 4, !tbaa !5
  %80 = xor i64 %indvars.iv135, -1
  %81 = add nsw i64 %45, %80
  %82 = mul nsw i64 %81, %6
  %gep104 = getelementptr i32, ptr %invariant.gep101, i64 %82
  store i32 %69, ptr %gep104, align 4, !tbaa !5
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond141.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count140
  br i1 %exitcond141.not, label %._crit_edge100, label %67, !llvm.loop !16

.preheader79:                                     ; preds = %.preheader79.lr.ph, %._crit_edge94
  %indvars.iv128 = phi i32 [ %39, %.preheader79.lr.ph ], [ %indvars.iv.next129, %._crit_edge94 ]
  %indvars.iv123 = phi i64 [ 0, %.preheader79.lr.ph ], [ %indvars.iv.next124, %._crit_edge94 ]
  %83 = xor i64 %indvars.iv123, -1
  %84 = add nsw i64 %40, %83
  %85 = icmp slt i64 %indvars.iv123, %84
  br i1 %85, label %.lr.ph93, label %._crit_edge94

.lr.ph93:                                         ; preds = %.preheader79
  %86 = mul nuw nsw i64 %indvars.iv123, %6
  %87 = getelementptr inbounds i32, ptr %9, i64 %86
  %invariant.gep = getelementptr i32, ptr %9, i64 %indvars.iv123
  %88 = sub nsw i64 %41, %indvars.iv123
  %89 = mul nsw i64 %88, %6
  %90 = getelementptr inbounds i32, ptr %9, i64 %89
  %wide.trip.count = zext i32 %indvars.iv128 to i64
  br label %91

._crit_edge94:                                    ; preds = %91, %.preheader79
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %indvars.iv.next129 = add i32 %indvars.iv128, -1
  %exitcond132.not = icmp eq i64 %indvars.iv.next124, %wide.trip.count131
  br i1 %exitcond132.not, label %.loopexit78.thread, label %.preheader79, !llvm.loop !17

91:                                               ; preds = %.lr.ph93, %91
  %indvars.iv125 = phi i64 [ %indvars.iv123, %.lr.ph93 ], [ %indvars.iv.next126, %91 ]
  %92 = getelementptr inbounds i32, ptr %87, i64 %indvars.iv125
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = xor i64 %indvars.iv125, -1
  %95 = add nsw i64 %40, %94
  %96 = mul nsw i64 %95, %6
  %gep = getelementptr i32, ptr %invariant.gep, i64 %96
  %97 = load i32, ptr %gep, align 4, !tbaa !5
  store i32 %97, ptr %92, align 4, !tbaa !5
  %98 = sub nsw i64 %41, %indvars.iv125
  %99 = getelementptr inbounds i32, ptr %90, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = mul nsw i64 %98, %6
  %gep96 = getelementptr i32, ptr %invariant.gep, i64 %101
  store i32 %100, ptr %gep96, align 4, !tbaa !5
  %102 = mul nuw nsw i64 %indvars.iv125, %6
  %103 = getelementptr inbounds i32, ptr %9, i64 %102
  %104 = getelementptr inbounds i32, ptr %103, i64 %88
  %105 = load i32, ptr %104, align 4, !tbaa !5
  store i32 %105, ptr %99, align 4, !tbaa !5
  %106 = getelementptr inbounds i32, ptr %103, i64 %84
  store i32 %93, ptr %106, align 4, !tbaa !5
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next126, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge94, label %91, !llvm.loop !18

.loopexit78:                                      ; preds = %._crit_edge91
  %107 = 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)
  %.pre = load i32, ptr %2, align 4
  %108 = add i32 %.pre, -1
  %109 = icmp ult i32 %108, 2
  br i1 %109, label %.loopexit78.thread, label %.loopexit

.loopexit78.thread:                               ; preds = %._crit_edge94, %._crit_edge100, %.preheader77, %.preheader80, %.loopexit78
  %110 = 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.8)
  %111 = load i32, ptr %1, align 4, !tbaa !5
  %112 = icmp sgt i32 %111, 0
  br i1 %112, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.loopexit78.thread, %._crit_edge108
  %113 = phi i32 [ %118, %._crit_edge108 ], [ %111, %.loopexit78.thread ]
  %indvars.iv148 = phi i64 [ %indvars.iv.next149, %._crit_edge108 ], [ 0, %.loopexit78.thread ]
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %.lr.ph107, label %._crit_edge108

.lr.ph107:                                        ; preds = %.preheader
  %115 = mul nuw nsw i64 %indvars.iv148, %6
  %116 = getelementptr inbounds i32, ptr %9, i64 %115
  br label %121

._crit_edge108:                                   ; preds = %121, %.preheader
  %117 = 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_)
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %118 = load i32, ptr %1, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next149, %119
  br i1 %120, label %.preheader, label %.loopexit, !llvm.loop !19

121:                                              ; preds = %.lr.ph107, %121
  %indvars.iv145 = phi i64 [ 0, %.lr.ph107 ], [ %indvars.iv.next146, %121 ]
  %122 = getelementptr inbounds i32, ptr %116, i64 %indvars.iv145
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %123)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull @.str.6)
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %126 = load i32, ptr %1, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = icmp slt i64 %indvars.iv.next146, %127
  br i1 %128, label %121, label %._crit_edge108, !llvm.loop !20

.loopexit:                                        ; preds = %._crit_edge108, %.loopexit78.thread, %.loopexit78
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.stackrestore.p0(ptr %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  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 nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #4

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

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

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

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


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