; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/1435 (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_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::_Setw" = type { i32 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca [100 x [100 x i32]], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca 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
  %20 = alloca %"struct.std::_Setw", align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 40000, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  br label %21

21:                                               ; preds = %259, %0
  br label %22

22:                                               ; preds = %21
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %22
  br label %261

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

28:                                               ; preds = %74, %27
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %70, %33
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %34
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %62

42:                                               ; preds = %39
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %62

45:                                               ; preds = %42
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sub nsw i32 %47, 1
  %49 = icmp ne i32 %46, %48
  br i1 %49, label %50, label %62

50:                                               ; preds = %45
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sub nsw i32 %52, 1
  %54 = icmp ne i32 %51, %53
  br i1 %54, label %55, label %62

55:                                               ; preds = %50
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %57
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100 x i32], ptr %58, i64 0, i64 %60
  store i32 0, ptr %61, align 4, !tbaa !5
  br label %69

62:                                               ; preds = %50, %45, %42, %39
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %64
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100 x i32], ptr %65, i64 0, i64 %67
  store i32 1, ptr %68, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %62, %55
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !5
  br label %34, !llvm.loop !9

73:                                               ; preds = %38
  br label %74

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

77:                                               ; preds = %32
  store i32 2, ptr %6, align 4, !tbaa !5
  store i32 1, ptr %4, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = sub nsw i32 %78, %79
  store i32 %80, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %81 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %81, ptr %12, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %114, %77
  %83 = load i32, ptr %12, align 4, !tbaa !5
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = sdiv i32 %84, 2
  %86 = icmp sle i32 %83, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %82
  store i32 10, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %117

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

90:                                               ; preds = %103, %88
  %91 = load i32, ptr %13, align 4, !tbaa !5
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = icmp sle i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %106

95:                                               ; preds = %90
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = load i32, ptr %12, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %98
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100 x i32], ptr %99, i64 0, i64 %101
  store i32 %96, ptr %102, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %95
  %104 = load i32, ptr %13, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %13, align 4, !tbaa !5
  br label %90, !llvm.loop !12

106:                                              ; preds = %94
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %6, align 4, !tbaa !5
  %109 = load i32, ptr %4, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %4, align 4, !tbaa !5
  %111 = load i32, ptr %5, align 4, !tbaa !5
  %112 = add nsw i32 %111, -1
  store i32 %112, ptr %5, align 4, !tbaa !5
  %113 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %113, ptr %11, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %106
  %115 = load i32, ptr %12, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %12, align 4, !tbaa !5
  br label %82, !llvm.loop !13

117:                                              ; preds = %87
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = srem i32 %118, 2
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %127

121:                                              ; preds = %117
  %122 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %122, ptr %7, align 4, !tbaa !5
  %123 = load i32, ptr %2, align 4, !tbaa !5
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = sub nsw i32 %123, %124
  %126 = sub nsw i32 %125, 1
  store i32 %126, ptr %5, align 4, !tbaa !5
  br label %133

127:                                              ; preds = %117
  %128 = load i32, ptr %11, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %7, align 4, !tbaa !5
  %130 = load i32, ptr %2, align 4, !tbaa !5
  %131 = load i32, ptr %5, align 4, !tbaa !5
  %132 = sub nsw i32 %130, %131
  store i32 %132, ptr %5, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %127, %121
  %134 = load i32, ptr %4, align 4, !tbaa !5
  %135 = sub nsw i32 %134, 2
  store i32 %135, ptr %4, align 4, !tbaa !5
  %136 = load i32, ptr %6, align 4, !tbaa !5
  %137 = sub nsw i32 %136, 2
  store i32 %137, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %138 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %138, ptr %14, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %170, %133
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = load i32, ptr %2, align 4, !tbaa !5
  %142 = sub nsw i32 %141, 1
  %143 = icmp slt i32 %140, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %139
  store i32 16, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %173

145:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %146 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %146, ptr %15, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %160, %145
  %148 = load i32, ptr %15, align 4, !tbaa !5
  %149 = load i32, ptr %5, align 4, !tbaa !5
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  store i32 19, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %163

152:                                              ; preds = %147
  %153 = load i32, ptr %6, align 4, !tbaa !5
  %154 = load i32, ptr %14, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %155
  %157 = load i32, ptr %15, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100 x i32], ptr %156, i64 0, i64 %158
  store i32 %153, ptr %159, align 4, !tbaa !5
  br label %160

160:                                              ; preds = %152
  %161 = load i32, ptr %15, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %15, align 4, !tbaa !5
  br label %147, !llvm.loop !14

163:                                              ; preds = %151
  %164 = load i32, ptr %6, align 4, !tbaa !5
  %165 = add nsw i32 %164, -1
  store i32 %165, ptr %6, align 4, !tbaa !5
  %166 = load i32, ptr %4, align 4, !tbaa !5
  %167 = add nsw i32 %166, -1
  store i32 %167, ptr %4, align 4, !tbaa !5
  %168 = load i32, ptr %5, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %5, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %163
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %14, align 4, !tbaa !5
  br label %139, !llvm.loop !15

173:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 2, ptr %16, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %214, %173
  %175 = load i32, ptr %16, align 4, !tbaa !5
  %176 = load i32, ptr %2, align 4, !tbaa !5
  %177 = icmp slt i32 %175, %176
  br i1 %177, label %179, label %178

178:                                              ; preds = %174
  store i32 22, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %217

179:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %180

180:                                              ; preds = %210, %179
  %181 = load i32, ptr %17, align 4, !tbaa !5
  %182 = load i32, ptr %2, align 4, !tbaa !5
  %183 = icmp slt i32 %181, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %180
  store i32 25, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %213

185:                                              ; preds = %180
  %186 = load i32, ptr %16, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %187
  %189 = load i32, ptr %17, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [100 x i32], ptr %188, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = icmp eq i32 %192, 0
  br i1 %193, label %194, label %209

194:                                              ; preds = %185
  %195 = load i32, ptr %16, align 4, !tbaa !5
  %196 = sub nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %197
  %199 = load i32, ptr %17, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [100 x i32], ptr %198, i64 0, i64 %200
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = load i32, ptr %16, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %204
  %206 = load i32, ptr %17, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [100 x i32], ptr %205, i64 0, i64 %207
  store i32 %202, ptr %208, align 4, !tbaa !5
  br label %209

209:                                              ; preds = %194, %185
  br label %210

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

213:                                              ; preds = %184
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %16, align 4, !tbaa !5
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %16, align 4, !tbaa !5
  br label %174, !llvm.loop !17

217:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %218

218:                                              ; preds = %256, %217
  %219 = load i32, ptr %18, align 4, !tbaa !5
  %220 = load i32, ptr %2, align 4, !tbaa !5
  %221 = icmp slt i32 %219, %220
  br i1 %221, label %223, label %222

222:                                              ; preds = %218
  store i32 28, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %259

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

224:                                              ; preds = %251, %223
  %225 = load i32, ptr %19, align 4, !tbaa !5
  %226 = load i32, ptr %2, align 4, !tbaa !5
  %227 = icmp slt i32 %225, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %224
  store i32 31, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %254

229:                                              ; preds = %224
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5rightRSt8ios_base)
  %231 = call i32 @_ZSt4setwi(i32 noundef 3)
  %232 = getelementptr inbounds %"struct.std::_Setw", ptr %20, i32 0, i32 0
  store i32 %231, ptr %232, align 4
  %233 = getelementptr inbounds %"struct.std::_Setw", ptr %20, i32 0, i32 0
  %234 = load i32, ptr %233, align 4
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %230, i32 %234)
  %236 = load i32, ptr %18, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [100 x [100 x i32]], ptr %3, i64 0, i64 %237
  %239 = load i32, ptr %19, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [100 x i32], ptr %238, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %235, i32 noundef %242)
  %244 = load i32, ptr %19, align 4, !tbaa !5
  %245 = load i32, ptr %2, align 4, !tbaa !5
  %246 = sub nsw i32 %245, 1
  %247 = icmp slt i32 %244, %246
  br i1 %247, label %248, label %250

248:                                              ; preds = %229
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %250

250:                                              ; preds = %248, %229
  br label %251

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

254:                                              ; preds = %228
  %255 = 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 %256

256:                                              ; preds = %254
  %257 = load i32, ptr %18, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %18, align 4, !tbaa !5
  br label %218, !llvm.loop !19

259:                                              ; preds = %222
  %260 = 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_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %21, !llvm.loop !20

261:                                              ; preds = %26
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 40000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %262 = load i32, ptr %1, align 4
  ret i32 %262
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8), i32) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5rightRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt4setwi(i32 noundef) #5

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

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

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

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

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


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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca [100 x [100 x i32]], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %2) #7
  %3 = 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)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %._crit_edge133, label %.preheader95

.preheader95:                                     ; preds = %0, %._crit_edge131
  %6 = phi i32 [ %98, %._crit_edge131 ], [ %4, %0 ]
  %.072132 = phi i32 [ %.1.lcssa, %._crit_edge131 ], [ undef, %0 ]
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.preheader92.lr.ph, label %._crit_edge99.split.us.thread

._crit_edge99.split.us.thread:                    ; preds = %.preheader95
  %8 = add nsw i32 %6, -2
  br label %._crit_edge99.split.us.._crit_edge112_crit_edge

.preheader92.lr.ph:                               ; preds = %.preheader95
  %9 = add nsw i32 %6, -1
  %10 = zext nneg i32 %9 to i64
  %wide.trip.count154 = zext nneg i32 %6 to i64
  %exitcond.peel.not = icmp eq i32 %6, 1
  %11 = add nsw i64 %wide.trip.count154, -1
  %min.iters.check253 = icmp ult i32 %6, 9
  %n.vec256 = and i64 %11, -8
  %ind.end257 = or disjoint i64 %n.vec256, 1
  %broadcast.splatinsert263 = insertelement <4 x i64> poison, i64 %10, i64 0
  %broadcast.splat264 = shufflevector <4 x i64> %broadcast.splatinsert263, <4 x i64> poison, <4 x i32> zeroinitializer
  %cmp.n266 = icmp eq i64 %11, %n.vec256
  %min.iters.check242 = icmp ult i32 %6, 8
  %n.vec245 = and i64 %wide.trip.count154, 2147483640
  %cmp.n250 = icmp eq i64 %n.vec245, %wide.trip.count154
  %min.iters.check231 = icmp ult i32 %6, 8
  %n.vec234 = and i64 %wide.trip.count154, 2147483640
  %cmp.n239 = icmp eq i64 %n.vec234, %wide.trip.count154
  br label %.preheader92.us

.preheader92.us:                                  ; preds = %.preheader92.us.backedge, %.preheader92.lr.ph
  %indvars.iv151 = phi i64 [ 0, %.preheader92.lr.ph ], [ %indvars.iv151.be, %.preheader92.us.backedge ]
  %.not134 = icmp eq i64 %indvars.iv151, 0
  br i1 %.not134, label %.lr.ph.split.us.us.preheader, label %.lr.ph.split.us102

.lr.ph.split.us.us.preheader:                     ; preds = %.preheader92.us
  br i1 %min.iters.check231, label %.lr.ph.split.us.us.preheader268, label %vector.body236

.lr.ph.split.us.us.preheader268:                  ; preds = %middle.block229, %.lr.ph.split.us.us.preheader
  %indvars.iv146.ph = phi i64 [ 0, %.lr.ph.split.us.us.preheader ], [ %n.vec234, %middle.block229 ]
  br label %.lr.ph.split.us.us

vector.body236:                                   ; preds = %.lr.ph.split.us.us.preheader, %vector.body236
  %index237 = phi i64 [ %index.next238, %vector.body236 ], [ 0, %.lr.ph.split.us.us.preheader ]
  %12 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 0, i64 %index237
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %12, align 16, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %13, align 16, !tbaa !5
  %index.next238 = add nuw i64 %index237, 8
  %14 = icmp eq i64 %index.next238, %n.vec234
  br i1 %14, label %middle.block229, label %vector.body236, !llvm.loop !9

middle.block229:                                  ; preds = %vector.body236
  br i1 %cmp.n239, label %._crit_edge.us, label %.lr.ph.split.us.us.preheader268

.lr.ph.split.split.us103:                         ; preds = %.lr.ph.split.split.us103.preheader271, %.lr.ph.split.split.us103
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split.split.us103 ], [ %indvars.iv.ph, %.lr.ph.split.split.us103.preheader271 ]
  %.not87.us = icmp eq i64 %indvars.iv, %10
  %spec.select = zext i1 %.not87.us to i32
  %15 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv151, i64 %indvars.iv
  store i32 %spec.select, ptr %15, align 4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count154
  br i1 %exitcond.not, label %._crit_edge.us, label %.lr.ph.split.split.us103, !llvm.loop !13

.lr.ph.split.us102:                               ; preds = %.preheader92.us
  %.not86.us = icmp eq i64 %indvars.iv151, %10
  %.not86.fr.us = freeze i1 %.not86.us
  br i1 %.not86.fr.us, label %.lr.ph.split.split.us.us.preheader, label %.lr.ph.split.split.us103.preheader

.lr.ph.split.split.us.us.preheader:               ; preds = %.lr.ph.split.us102
  br i1 %min.iters.check242, label %.lr.ph.split.split.us.us.preheader269, label %vector.body247

.lr.ph.split.split.us.us.preheader269:            ; preds = %middle.block240, %.lr.ph.split.split.us.us.preheader
  %indvars.iv141.ph = phi i64 [ 0, %.lr.ph.split.split.us.us.preheader ], [ %n.vec245, %middle.block240 ]
  br label %.lr.ph.split.split.us.us

vector.body247:                                   ; preds = %.lr.ph.split.split.us.us.preheader, %vector.body247
  %index248 = phi i64 [ %index.next249, %vector.body247 ], [ 0, %.lr.ph.split.split.us.us.preheader ]
  %16 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv151, i64 %index248
  %17 = getelementptr inbounds i8, ptr %16, i64 16
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %16, align 16, !tbaa !5
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %17, align 16, !tbaa !5
  %index.next249 = add nuw i64 %index248, 8
  %18 = icmp eq i64 %index.next249, %n.vec245
  br i1 %18, label %middle.block240, label %vector.body247, !llvm.loop !15

middle.block240:                                  ; preds = %vector.body247
  br i1 %cmp.n250, label %._crit_edge.us, label %.lr.ph.split.split.us.us.preheader269

.lr.ph.split.split.us103.preheader:               ; preds = %.lr.ph.split.us102
  %19 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv151, i64 0
  store i32 1, ptr %19, align 16
  br i1 %exitcond.peel.not, label %._crit_edge.us.thread, label %.lr.ph.split.split.us103.preheader210

.lr.ph.split.split.us103.preheader210:            ; preds = %.lr.ph.split.split.us103.preheader
  br i1 %min.iters.check253, label %.lr.ph.split.split.us103.preheader271, label %vector.body259

.lr.ph.split.split.us103.preheader271:            ; preds = %middle.block251, %.lr.ph.split.split.us103.preheader210
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.split.split.us103.preheader210 ], [ %ind.end257, %middle.block251 ]
  br label %.lr.ph.split.split.us103

vector.body259:                                   ; preds = %.lr.ph.split.split.us103.preheader210, %vector.body259
  %index260 = phi i64 [ %index.next265, %vector.body259 ], [ 0, %.lr.ph.split.split.us103.preheader210 ]
  %vec.ind = phi <4 x i64> [ %vec.ind.next, %vector.body259 ], [ <i64 1, i64 2, i64 3, i64 4>, %.lr.ph.split.split.us103.preheader210 ]
  %step.add = add <4 x i64> %vec.ind, <i64 4, i64 4, i64 4, i64 4>
  %offset.idx262 = or disjoint i64 %index260, 1
  %20 = icmp eq <4 x i64> %vec.ind, %broadcast.splat264
  %21 = icmp eq <4 x i64> %step.add, %broadcast.splat264
  %22 = zext <4 x i1> %20 to <4 x i32>
  %23 = zext <4 x i1> %21 to <4 x i32>
  %24 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv151, i64 %offset.idx262
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  store <4 x i32> %22, ptr %24, align 4
  store <4 x i32> %23, ptr %25, align 4
  %index.next265 = add nuw i64 %index260, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %26 = icmp eq i64 %index.next265, %n.vec256
  br i1 %26, label %middle.block251, label %vector.body259, !llvm.loop !16

middle.block251:                                  ; preds = %vector.body259
  br i1 %cmp.n266, label %._crit_edge.us, label %.lr.ph.split.split.us103.preheader271

._crit_edge.us:                                   ; preds = %.lr.ph.split.split.us103, %.lr.ph.split.split.us.us, %.lr.ph.split.us.us, %middle.block251, %middle.block240, %middle.block229
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count154
  br i1 %exitcond155.not, label %._crit_edge99.split.us, label %.preheader92.us.backedge

._crit_edge.us.thread:                            ; preds = %.lr.ph.split.split.us103.preheader
  %indvars.iv.next152203 = add nuw nsw i64 %indvars.iv151, 1
  br label %.preheader92.us.backedge

.preheader92.us.backedge:                         ; preds = %._crit_edge.us.thread, %._crit_edge.us
  %indvars.iv151.be = phi i64 [ %indvars.iv.next152, %._crit_edge.us ], [ %indvars.iv.next152203, %._crit_edge.us.thread ]
  br label %.preheader92.us, !llvm.loop !17

.lr.ph.split.us.us:                               ; preds = %.lr.ph.split.us.us.preheader268, %.lr.ph.split.us.us
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %.lr.ph.split.us.us ], [ %indvars.iv146.ph, %.lr.ph.split.us.us.preheader268 ]
  %27 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 0, i64 %indvars.iv146
  store i32 1, ptr %27, align 4, !tbaa !5
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %wide.trip.count154
  br i1 %exitcond150.not, label %._crit_edge.us, label %.lr.ph.split.us.us, !llvm.loop !18

.lr.ph.split.split.us.us:                         ; preds = %.lr.ph.split.split.us.us.preheader269, %.lr.ph.split.split.us.us
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %.lr.ph.split.split.us.us ], [ %indvars.iv141.ph, %.lr.ph.split.split.us.us.preheader269 ]
  %28 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv151, i64 %indvars.iv141
  store i32 1, ptr %28, align 4, !tbaa !5
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next142, %wide.trip.count154
  br i1 %exitcond145.not, label %._crit_edge.us, label %.lr.ph.split.split.us.us, !llvm.loop !19

._crit_edge99.split.us:                           ; preds = %._crit_edge.us
  %29 = add nsw i32 %6, -2
  %30 = lshr i32 %6, 1
  %.not107 = icmp eq i32 %6, 1
  br i1 %.not107, label %._crit_edge99.split.us.._crit_edge112_crit_edge, label %.preheader91.preheader

._crit_edge99.split.us.._crit_edge112_crit_edge:  ; preds = %._crit_edge99.split.us.thread, %._crit_edge99.split.us
  %31 = phi i32 [ %8, %._crit_edge99.split.us.thread ], [ %29, %._crit_edge99.split.us ]
  %.pre201 = add nsw i32 %6, -1
  br label %._crit_edge112

.preheader91.preheader:                           ; preds = %._crit_edge99.split.us
  %32 = add nsw i32 %6, -1
  %33 = add nuw nsw i32 %30, 1
  %wide.trip.count168 = zext nneg i32 %33 to i64
  br label %.preheader91

.preheader91:                                     ; preds = %.preheader91.preheader, %._crit_edge
  %indvar212 = phi i64 [ 0, %.preheader91.preheader ], [ %indvar.next213, %._crit_edge ]
  %indvars.iv161 = phi i32 [ %32, %.preheader91.preheader ], [ %indvars.iv.next162, %._crit_edge ]
  %indvars.iv156 = phi i64 [ 1, %.preheader91.preheader ], [ %indvars.iv.next157, %._crit_edge ]
  %.076110 = phi i32 [ 2, %.preheader91.preheader ], [ %54, %._crit_edge ]
  %.078109 = phi i32 [ %29, %.preheader91.preheader ], [ %55, %._crit_edge ]
  %34 = xor i64 %indvar212, -1
  %35 = zext i32 %indvars.iv161 to i64
  %36 = add i64 %34, %35
  %37 = sext i32 %.078109 to i64
  %.not85105 = icmp sgt i64 %indvars.iv156, %37
  br i1 %.not85105, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader91
  %wide.trip.count163 = zext i32 %indvars.iv161 to i64
  %min.iters.check216 = icmp ult i64 %36, 8
  br i1 %min.iters.check216, label %scalar.ph215.preheader, label %vector.ph217

scalar.ph215.preheader:                           ; preds = %middle.block214, %.lr.ph
  %indvars.iv158.ph = phi i64 [ %indvars.iv156, %.lr.ph ], [ %ind.end220, %middle.block214 ]
  br label %scalar.ph215

vector.ph217:                                     ; preds = %.lr.ph
  %n.vec219 = and i64 %36, -8
  %ind.end220 = add i64 %indvars.iv156, %n.vec219
  %broadcast.splatinsert225 = insertelement <4 x i32> poison, i32 %.076110, i64 0
  %broadcast.splat226 = shufflevector <4 x i32> %broadcast.splatinsert225, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body222

vector.body222:                                   ; preds = %vector.body222, %vector.ph217
  %index223 = phi i64 [ 0, %vector.ph217 ], [ %index.next227, %vector.body222 ]
  %offset.idx224 = add i64 %indvars.iv156, %index223
  %38 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv156, i64 %offset.idx224
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  store <4 x i32> %broadcast.splat226, ptr %38, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat226, ptr %39, align 4, !tbaa !5
  %index.next227 = add nuw i64 %index223, 8
  %40 = icmp eq i64 %index.next227, %n.vec219
  br i1 %40, label %middle.block214, label %vector.body222, !llvm.loop !20

middle.block214:                                  ; preds = %vector.body222
  %cmp.n228 = icmp eq i64 %36, %n.vec219
  br i1 %cmp.n228, label %._crit_edge, label %scalar.ph215.preheader

._crit_edge112.loopexit:                          ; preds = %._crit_edge
  %41 = sub i32 %29, %30
  %42 = trunc nuw nsw i64 %indvars.iv156 to i32
  br label %._crit_edge112

._crit_edge112:                                   ; preds = %._crit_edge99.split.us.._crit_edge112_crit_edge, %._crit_edge112.loopexit
  %.pre-phi = phi i32 [ %.pre201, %._crit_edge99.split.us.._crit_edge112_crit_edge ], [ %32, %._crit_edge112.loopexit ]
  %.080.lcssa = phi i32 [ 1, %._crit_edge99.split.us.._crit_edge112_crit_edge ], [ %33, %._crit_edge112.loopexit ]
  %.078.lcssa = phi i32 [ %31, %._crit_edge99.split.us.._crit_edge112_crit_edge ], [ %41, %._crit_edge112.loopexit ]
  %.076.lcssa = phi i32 [ 2, %._crit_edge99.split.us.._crit_edge112_crit_edge ], [ %54, %._crit_edge112.loopexit ]
  %.1.lcssa = phi i32 [ %.072132, %._crit_edge99.split.us.._crit_edge112_crit_edge ], [ %42, %._crit_edge112.loopexit ]
  %43 = and i32 %6, 1
  %.075 = add i32 %.1.lcssa, %43
  %44 = icmp slt i32 %.075, %.pre-phi
  br i1 %44, label %.preheader90.preheader, label %.preheader94

.preheader90.preheader:                           ; preds = %._crit_edge112
  %45 = add nsw i32 %.076.lcssa, -2
  %46 = icmp eq i32 %43, 0
  %47 = xor i32 %.078.lcssa, -1
  %48 = sub i32 0, %.078.lcssa
  %.179.p = select i1 %46, i32 %47, i32 %48
  %.179 = add i32 %.179.p, %6
  %49 = sext i32 %.080.lcssa to i64
  %50 = add nsw i64 %49, -2
  %51 = sext i32 %.075 to i64
  %52 = sext i32 %.pre-phi to i64
  %53 = sext i32 %.179 to i64
  br label %.preheader90

._crit_edge:                                      ; preds = %scalar.ph215, %middle.block214, %.preheader91
  %54 = add nuw nsw i32 %.076110, 1
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %55 = add nsw i32 %.078109, -1
  %indvars.iv.next162 = add i32 %indvars.iv161, -1
  %exitcond169.not = icmp eq i64 %indvars.iv.next157, %wide.trip.count168
  %indvar.next213 = add i64 %indvar212, 1
  br i1 %exitcond169.not, label %._crit_edge112.loopexit, label %.preheader91, !llvm.loop !21

scalar.ph215:                                     ; preds = %scalar.ph215.preheader, %scalar.ph215
  %indvars.iv158 = phi i64 [ %indvars.iv.next159, %scalar.ph215 ], [ %indvars.iv158.ph, %scalar.ph215.preheader ]
  %56 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv156, i64 %indvars.iv158
  store i32 %.076110, ptr %56, align 4, !tbaa !5
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %exitcond164.not = icmp eq i64 %indvars.iv.next159, %wide.trip.count163
  br i1 %exitcond164.not, label %._crit_edge, label %scalar.ph215, !llvm.loop !22

.preheader94:                                     ; preds = %._crit_edge118, %._crit_edge112
  %57 = icmp sgt i32 %6, 2
  br i1 %57, label %.preheader89.us.preheader, label %.preheader93

.preheader89.us.preheader:                        ; preds = %.preheader94
  %wide.trip.count192 = zext nneg i32 %6 to i64
  %58 = add nsw i64 %wide.trip.count192, -1
  %xtraiter = and i64 %58, 1
  %unroll_iter = and i64 %58, -2
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader89.us

.preheader89.us:                                  ; preds = %.preheader89.us.preheader, %._crit_edge125.us
  %indvars.iv189 = phi i64 [ 2, %.preheader89.us.preheader ], [ %indvars.iv.next190, %._crit_edge125.us ]
  %59 = add nsw i64 %indvars.iv189, -1
  br label %60

60:                                               ; preds = %74, %.preheader89.us
  %indvars.iv184 = phi i64 [ 1, %.preheader89.us ], [ %indvars.iv.next185.1, %74 ]
  %niter = phi i64 [ 0, %.preheader89.us ], [ %niter.next.1, %74 ]
  %61 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv189, i64 %indvars.iv184
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %67

64:                                               ; preds = %60
  %65 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %59, i64 %indvars.iv184
  %66 = load i32, ptr %65, align 4, !tbaa !5
  store i32 %66, ptr %61, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %64, %60
  %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
  %68 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv189, i64 %indvars.iv.next185
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %67
  %72 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %59, i64 %indvars.iv.next185
  %73 = load i32, ptr %72, align 4, !tbaa !5
  store i32 %73, ptr %68, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %71, %67
  %indvars.iv.next185.1 = add nuw nsw i64 %indvars.iv184, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge125.us.unr-lcssa, label %60, !llvm.loop !23

._crit_edge125.us.unr-lcssa:                      ; preds = %74
  br i1 %lcmp.mod.not, label %._crit_edge125.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge125.us.unr-lcssa
  %75 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv189, i64 %indvars.iv.next185.1
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %._crit_edge125.us

78:                                               ; preds = %.epil.preheader
  %79 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %59, i64 %indvars.iv.next185.1
  %80 = load i32, ptr %79, align 4, !tbaa !5
  store i32 %80, ptr %75, align 4, !tbaa !5
  br label %._crit_edge125.us

._crit_edge125.us:                                ; preds = %.epil.preheader, %78, %._crit_edge125.us.unr-lcssa
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %exitcond193.not = icmp eq i64 %indvars.iv.next190, %wide.trip.count192
  br i1 %exitcond193.not, label %.preheader93, label %.preheader89.us, !llvm.loop !24

.preheader90:                                     ; preds = %.preheader90.preheader, %._crit_edge118
  %indvar = phi i64 [ 0, %.preheader90.preheader ], [ %indvar.next, %._crit_edge118 ]
  %indvars.iv177 = phi i64 [ %53, %.preheader90.preheader ], [ %indvars.iv.next178, %._crit_edge118 ]
  %indvars.iv175 = phi i64 [ %51, %.preheader90.preheader ], [ %indvars.iv.next176, %._crit_edge118 ]
  %indvars.iv170 = phi i64 [ %50, %.preheader90.preheader ], [ %indvars.iv.next171, %._crit_edge118 ]
  %.177121 = phi i32 [ %45, %.preheader90.preheader ], [ %90, %._crit_edge118 ]
  %81 = xor i64 %indvar, -1
  %82 = add i64 %81, %49
  %smax = call i64 @llvm.smax.i64(i64 %82, i64 %indvars.iv177)
  %reass.sub = sub i64 %indvar, %49
  %83 = add i64 %reass.sub, 2
  %84 = add i64 %smax, %83
  %sext = shl i64 %indvars.iv170, 32
  %85 = ashr exact i64 %sext, 32
  %86 = icmp slt i64 %85, %indvars.iv177
  br i1 %86, label %.lr.ph117.preheader, label %._crit_edge118

.lr.ph117.preheader:                              ; preds = %.preheader90
  %min.iters.check = icmp ult i64 %84, 8
  br i1 %min.iters.check, label %.lr.ph117.preheader267, label %vector.ph

.lr.ph117.preheader267:                           ; preds = %middle.block, %.lr.ph117.preheader
  %indvars.iv172.ph = phi i64 [ %indvars.iv170, %.lr.ph117.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph117

vector.ph:                                        ; preds = %.lr.ph117.preheader
  %n.vec = and i64 %84, -8
  %ind.end = add i64 %indvars.iv170, %n.vec
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.177121, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %indvars.iv170, %index
  %87 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv175, i64 %offset.idx
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  store <4 x i32> %broadcast.splat, ptr %87, align 4, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %88, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %89 = icmp eq i64 %index.next, %n.vec
  br i1 %89, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %84, %n.vec
  br i1 %cmp.n, label %._crit_edge118, label %.lr.ph117.preheader267

._crit_edge118:                                   ; preds = %.lr.ph117, %middle.block, %.preheader90
  %90 = add nsw i32 %.177121, -1
  %indvars.iv.next171 = add nsw i64 %indvars.iv170, -1
  %indvars.iv.next178 = add nsw i64 %indvars.iv177, 1
  %indvars.iv.next176 = add nsw i64 %indvars.iv175, 1
  %91 = icmp slt i64 %indvars.iv.next176, %52
  %indvar.next = add i64 %indvar, 1
  br i1 %91, label %.preheader90, label %.preheader94, !llvm.loop !26

.lr.ph117:                                        ; preds = %.lr.ph117.preheader267, %.lr.ph117
  %indvars.iv172 = phi i64 [ %indvars.iv.next173, %.lr.ph117 ], [ %indvars.iv172.ph, %.lr.ph117.preheader267 ]
  %92 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv175, i64 %indvars.iv172
  store i32 %.177121, ptr %92, align 4, !tbaa !5
  %indvars.iv.next173 = add nsw i64 %indvars.iv172, 1
  %93 = icmp slt i64 %indvars.iv.next173, %indvars.iv177
  br i1 %93, label %.lr.ph117, label %._crit_edge118, !llvm.loop !27

.preheader93:                                     ; preds = %._crit_edge125.us, %.preheader94
  br i1 %7, label %.preheader, label %._crit_edge131

.preheader:                                       ; preds = %.preheader93, %._crit_edge129
  %94 = phi i32 [ %101, %._crit_edge129 ], [ %6, %.preheader93 ]
  %indvars.iv197 = phi i64 [ %indvars.iv.next198, %._crit_edge129 ], [ 0, %.preheader93 ]
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.lr.ph128, label %._crit_edge129

._crit_edge131:                                   ; preds = %._crit_edge129, %.preheader93
  %96 = 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_)
  %97 = 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)
  %98 = load i32, ptr %1, align 4, !tbaa !5
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %._crit_edge133, label %.preheader95, !llvm.loop !28

._crit_edge129:                                   ; preds = %116, %.preheader
  %100 = 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.next198 = add nuw nsw i64 %indvars.iv197, 1
  %101 = load i32, ptr %1, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = icmp slt i64 %indvars.iv.next198, %102
  br i1 %103, label %.preheader, label %._crit_edge131, !llvm.loop !29

.lr.ph128:                                        ; preds = %.preheader, %116
  %indvars.iv194 = phi i64 [ %indvars.iv.next195, %116 ], [ 0, %.preheader ]
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5rightRSt8ios_base)
  %105 = call i32 @_ZSt4setwi(i32 noundef 3)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw(ptr noundef nonnull align 8 dereferenceable(8) %104, i32 %105)
  %107 = getelementptr inbounds [100 x [100 x i32]], ptr %2, i64 0, i64 %indvars.iv197, i64 %indvars.iv194
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %106, i32 noundef %108)
  %110 = load i32, ptr %1, align 4, !tbaa !5
  %111 = add nsw i32 %110, -1
  %112 = sext i32 %111 to i64
  %113 = icmp slt i64 %indvars.iv194, %112
  br i1 %113, label %114, label %116

114:                                              ; preds = %.lr.ph128
  %115 = 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)
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %.lr.ph128, %114
  %117 = phi i32 [ %110, %.lr.ph128 ], [ %.pre, %114 ]
  %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1
  %118 = sext i32 %117 to i64
  %119 = icmp slt i64 %indvars.iv.next195, %118
  br i1 %119, label %.lr.ph128, label %._crit_edge129, !llvm.loop !30

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5rightRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt4setwi(i32 noundef) local_unnamed_addr #5

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #6

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

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

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


; Effective O3 passes: ADCEPass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass