; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/277 Division 2/Problem B (B)

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

@m = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@b = external dso_local global [100 x [100 x i32]], align 16
@a = external dso_local global [100 x [100 x i32]], align 16
@c = external dso_local global [100 x [100 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca 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
  store i32 0, ptr %1, align 4
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @m, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %47, %0
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = load i32, ptr @m, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %50

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

24:                                               ; preds = %43, %23
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %46

29:                                               ; preds = %24
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [100 x [100 x i32]], ptr @b, i64 0, i64 %31
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100 x i32], ptr %32, i64 0, i64 %34
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %35)
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %38
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [100 x i32], ptr %39, i64 0, i64 %41
  store i32 1, ptr %42, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %29
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %4, align 4, !tbaa !5
  br label %24, !llvm.loop !9

46:                                               ; preds = %28
  br label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %2, align 4, !tbaa !5
  br label %18, !llvm.loop !11

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

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

55:                                               ; preds = %51
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %112

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

57:                                               ; preds = %105, %56
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr @n, align 4, !tbaa !5
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %108

62:                                               ; preds = %57
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100 x [100 x i32]], ptr @b, i64 0, i64 %64
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100 x i32], ptr %65, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 0
  br i1 %70, label %71, label %104

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

72:                                               ; preds = %84, %71
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %87

77:                                               ; preds = %72
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %79
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100 x i32], ptr %80, i64 0, i64 %82
  store i32 0, ptr %83, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %77
  %85 = load i32, ptr %7, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %7, align 4, !tbaa !5
  br label %72, !llvm.loop !12

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

88:                                               ; preds = %100, %87
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = load i32, ptr @m, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %103

93:                                               ; preds = %88
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %95
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100 x i32], ptr %96, i64 0, i64 %98
  store i32 0, ptr %99, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %93
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !5
  br label %88, !llvm.loop !13

103:                                              ; preds = %92
  br label %104

104:                                              ; preds = %103, %62
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %6, align 4, !tbaa !5
  br label %57, !llvm.loop !14

108:                                              ; preds = %61
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %5, align 4, !tbaa !5
  br label %51, !llvm.loop !15

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

113:                                              ; preds = %181, %112
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = load i32, ptr @m, align 4, !tbaa !5
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %113
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %184

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

119:                                              ; preds = %177, %118
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = load i32, ptr @n, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %180

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

125:                                              ; preds = %147, %124
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = load i32, ptr @m, align 4, !tbaa !5
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 26, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %150

130:                                              ; preds = %125
  %131 = load i32, ptr %11, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %132
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100 x i32], ptr %133, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %139, label %146

139:                                              ; preds = %130
  %140 = load i32, ptr %9, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100 x [100 x i32]], ptr @c, i64 0, i64 %141
  %143 = load i32, ptr %10, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100 x i32], ptr %142, i64 0, i64 %144
  store i32 1, ptr %145, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %139, %130
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %11, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %11, align 4, !tbaa !5
  br label %125, !llvm.loop !16

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

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

155:                                              ; preds = %151
  store i32 29, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %176

156:                                              ; preds = %151
  %157 = load i32, ptr %9, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %158
  %160 = load i32, ptr %12, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100 x i32], ptr %159, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = icmp eq i32 %163, 1
  br i1 %164, label %165, label %172

165:                                              ; preds = %156
  %166 = load i32, ptr %9, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [100 x [100 x i32]], ptr @c, i64 0, i64 %167
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [100 x i32], ptr %168, i64 0, i64 %170
  store i32 1, ptr %171, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %165, %156
  br label %173

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

176:                                              ; preds = %155
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %10, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %10, align 4, !tbaa !5
  br label %119, !llvm.loop !18

180:                                              ; preds = %123
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %9, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %9, align 4, !tbaa !5
  br label %113, !llvm.loop !19

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

185:                                              ; preds = %222, %184
  %186 = load i32, ptr %13, align 4, !tbaa !5
  %187 = load i32, ptr @m, align 4, !tbaa !5
  %188 = icmp slt i32 %186, %187
  br i1 %188, label %190, label %189

189:                                              ; preds = %185
  store i32 32, ptr %3, align 4
  br label %225

190:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %216, %190
  %192 = load i32, ptr %14, align 4, !tbaa !5
  %193 = load i32, ptr @n, align 4, !tbaa !5
  %194 = icmp slt i32 %192, %193
  br i1 %194, label %196, label %195

195:                                              ; preds = %191
  store i32 35, ptr %3, align 4
  br label %219

196:                                              ; preds = %191
  %197 = load i32, ptr %13, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [100 x [100 x i32]], ptr @b, i64 0, i64 %198
  %200 = load i32, ptr %14, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100 x i32], ptr %199, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = load i32, ptr %13, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [100 x [100 x i32]], ptr @c, i64 0, i64 %205
  %207 = load i32, ptr %14, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [100 x i32], ptr %206, i64 0, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = icmp ne i32 %203, %210
  br i1 %211, label %212, label %215

212:                                              ; preds = %196
  %213 = 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)
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  br label %219

215:                                              ; preds = %196
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %14, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %14, align 4, !tbaa !5
  br label %191, !llvm.loop !20

219:                                              ; preds = %212, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %220 = load i32, ptr %3, align 4
  switch i32 %220, label %225 [
    i32 35, label %221
  ]

221:                                              ; preds = %219
  br label %222

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

225:                                              ; preds = %219, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %226 = load i32, ptr %3, align 4
  switch i32 %226, label %261 [
    i32 32, label %227
    i32 1, label %259
  ]

227:                                              ; preds = %225
  %228 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %229

229:                                              ; preds = %255, %227
  %230 = load i32, ptr %15, align 4, !tbaa !5
  %231 = load i32, ptr @m, align 4, !tbaa !5
  %232 = icmp slt i32 %230, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %229
  store i32 38, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %258

234:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %235

235:                                              ; preds = %250, %234
  %236 = load i32, ptr %16, align 4, !tbaa !5
  %237 = load i32, ptr @n, align 4, !tbaa !5
  %238 = icmp slt i32 %236, %237
  br i1 %238, label %240, label %239

239:                                              ; preds = %235
  store i32 41, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %253

240:                                              ; preds = %235
  %241 = load i32, ptr %15, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %242
  %244 = load i32, ptr %16, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [100 x i32], ptr %243, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %247)
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %248, ptr noundef @.str.4)
  br label %250

250:                                              ; preds = %240
  %251 = load i32, ptr %16, align 4, !tbaa !5
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %16, align 4, !tbaa !5
  br label %235, !llvm.loop !22

253:                                              ; preds = %239
  %254 = 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 %255

255:                                              ; preds = %253
  %256 = load i32, ptr %15, align 4, !tbaa !5
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %15, align 4, !tbaa !5
  br label %229, !llvm.loop !23

258:                                              ; preds = %233
  store i32 0, ptr %1, align 4
  br label %259

259:                                              ; preds = %258, %225
  %260 = load i32, ptr %1, align 4
  ret i32 %260

261:                                              ; preds = %225
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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

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

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

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

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

@m = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@b = external dso_local global [100 x [100 x i32]], align 16
@a = external dso_local local_unnamed_addr global [100 x [100 x i32]], align 16
@c = external dso_local local_unnamed_addr global [100 x [100 x i32]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = 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 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m, ptr noundef nonnull @n)
  %2 = load i32, ptr @m, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  %4 = load i32, ptr @n, align 4
  %5 = icmp sgt i32 %4, 0
  %or.cond = select i1 %3, i1 %5, i1 false
  br i1 %or.cond, label %.preheader88, label %._crit_edge127

.preheader88:                                     ; preds = %0, %._crit_edge
  %6 = phi i32 [ %24, %._crit_edge ], [ %2, %0 ]
  %7 = phi i32 [ %25, %._crit_edge ], [ %4, %0 ]
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %._crit_edge ], [ 0, %0 ]
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

.preheader87:                                     ; preds = %._crit_edge
  %9 = icmp sgt i32 %24, 0
  br i1 %9, label %.preheader86.lr.ph, label %._crit_edge127

.preheader86.lr.ph:                               ; preds = %.preheader87
  %.pr = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp sgt i32 %.pr, 0
  br i1 %10, label %.preheader86.us.us.preheader, label %._crit_edge127

.preheader86.us.us.preheader:                     ; preds = %.preheader86.lr.ph
  %11 = zext nneg i32 %.pr to i64
  %12 = shl nuw nsw i64 %11, 2
  %wide.trip.count155 = zext nneg i32 %24 to i64
  %xtraiter = and i64 %wide.trip.count155, 3
  %13 = icmp ult i32 %24, 4
  %unroll_iter = and i64 %wide.trip.count155, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader86.us.us

.preheader86.us.us:                               ; preds = %.preheader86.us.us.preheader, %._crit_edge97.split.us.split.us.us.us
  %indvar = phi i64 [ 0, %.preheader86.us.us.preheader ], [ %indvar.next, %._crit_edge97.split.us.split.us.us.us ]
  %14 = mul nuw nsw i64 %indvar, 400
  %scevgep = getelementptr i8, ptr @a, i64 %14
  br label %15

15:                                               ; preds = %..loopexit84_crit_edge.us.us.us.us, %.preheader86.us.us
  %indvars.iv149 = phi i64 [ %indvars.iv.next150, %..loopexit84_crit_edge.us.us.us.us ], [ 0, %.preheader86.us.us ]
  %16 = getelementptr inbounds [100 x [100 x i32]], ptr @b, i64 0, i64 %indvar, i64 %indvars.iv149
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %.preheader85.us.us.us.us.preheader, label %..loopexit84_crit_edge.us.us.us.us

.preheader85.us.us.us.us.preheader:               ; preds = %15
  tail call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %12, i1 false), !tbaa !5
  br i1 %13, label %..loopexit84_crit_edge.us.us.us.us.loopexit.unr-lcssa, label %..preheader83_crit_edge.us.us.us.us

..loopexit84_crit_edge.us.us.us.us.loopexit.unr-lcssa: ; preds = %..preheader83_crit_edge.us.us.us.us, %.preheader85.us.us.us.us.preheader
  %indvars.iv146.unr = phi i64 [ 0, %.preheader85.us.us.us.us.preheader ], [ %indvars.iv.next147.3, %..preheader83_crit_edge.us.us.us.us ]
  br i1 %lcmp.mod.not, label %..loopexit84_crit_edge.us.us.us.us, label %..preheader83_crit_edge.us.us.us.us.epil

..preheader83_crit_edge.us.us.us.us.epil:         ; preds = %..loopexit84_crit_edge.us.us.us.us.loopexit.unr-lcssa, %..preheader83_crit_edge.us.us.us.us.epil
  %indvars.iv146.epil = phi i64 [ %indvars.iv.next147.epil, %..preheader83_crit_edge.us.us.us.us.epil ], [ %indvars.iv146.unr, %..loopexit84_crit_edge.us.us.us.us.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %..preheader83_crit_edge.us.us.us.us.epil ], [ 0, %..loopexit84_crit_edge.us.us.us.us.loopexit.unr-lcssa ]
  %19 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv146.epil, i64 %indvars.iv149
  store i32 0, ptr %19, align 4, !tbaa !5
  %indvars.iv.next147.epil = add nuw nsw i64 %indvars.iv146.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %..loopexit84_crit_edge.us.us.us.us, label %..preheader83_crit_edge.us.us.us.us.epil, !llvm.loop !9

..loopexit84_crit_edge.us.us.us.us:               ; preds = %..loopexit84_crit_edge.us.us.us.us.loopexit.unr-lcssa, %..preheader83_crit_edge.us.us.us.us.epil, %15
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %exitcond153.not = icmp eq i64 %indvars.iv.next150, %11
  br i1 %exitcond153.not, label %._crit_edge97.split.us.split.us.us.us, label %15, !llvm.loop !11

..preheader83_crit_edge.us.us.us.us:              ; preds = %.preheader85.us.us.us.us.preheader, %..preheader83_crit_edge.us.us.us.us
  %indvars.iv146 = phi i64 [ %indvars.iv.next147.3, %..preheader83_crit_edge.us.us.us.us ], [ 0, %.preheader85.us.us.us.us.preheader ]
  %niter = phi i64 [ %niter.next.3, %..preheader83_crit_edge.us.us.us.us ], [ 0, %.preheader85.us.us.us.us.preheader ]
  %20 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv146, i64 %indvars.iv149
  store i32 0, ptr %20, align 4, !tbaa !5
  %indvars.iv.next147 = or disjoint i64 %indvars.iv146, 1
  %21 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv.next147, i64 %indvars.iv149
  store i32 0, ptr %21, align 4, !tbaa !5
  %indvars.iv.next147.1 = or disjoint i64 %indvars.iv146, 2
  %22 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv.next147.1, i64 %indvars.iv149
  store i32 0, ptr %22, align 4, !tbaa !5
  %indvars.iv.next147.2 = or disjoint i64 %indvars.iv146, 3
  %23 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv.next147.2, i64 %indvars.iv149
  store i32 0, ptr %23, align 4, !tbaa !5
  %indvars.iv.next147.3 = add nuw nsw i64 %indvars.iv146, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %..loopexit84_crit_edge.us.us.us.us.loopexit.unr-lcssa, label %..preheader83_crit_edge.us.us.us.us, !llvm.loop !13

._crit_edge97.split.us.split.us.us.us:            ; preds = %..loopexit84_crit_edge.us.us.us.us
  %indvar.next = add nuw nsw i64 %indvar, 1
  %exitcond156.not = icmp eq i64 %indvar.next, %wide.trip.count155
  br i1 %exitcond156.not, label %.preheader82, label %.preheader86.us.us, !llvm.loop !14

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader88
  %24 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %6, %.preheader88 ]
  %25 = phi i32 [ %31, %._crit_edge.loopexit ], [ %7, %.preheader88 ]
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %26 = sext i32 %24 to i64
  %27 = icmp slt i64 %indvars.iv.next141, %26
  br i1 %27, label %.preheader88, label %.preheader87, !llvm.loop !15

.lr.ph:                                           ; preds = %.preheader88, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader88 ]
  %28 = getelementptr inbounds [100 x [100 x i32]], ptr @b, i64 0, i64 %indvars.iv140, i64 %indvars.iv
  %29 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %28)
  %30 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv140, i64 %indvars.iv
  store i32 1, ptr %30, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr @n, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = icmp slt i64 %indvars.iv.next, %32
  br i1 %33, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !17

.preheader82:                                     ; preds = %._crit_edge97.split.us.split.us.us.us
  br i1 %9, label %.preheader81.lr.ph, label %._crit_edge127

.preheader81.lr.ph:                               ; preds = %.preheader82
  %.pr196 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp sgt i32 %.pr196, 0
  br i1 %34, label %.preheader81.us.us.preheader, label %._crit_edge127

.preheader81.us.us.preheader:                     ; preds = %.preheader81.lr.ph
  %wide.trip.count175 = zext nneg i32 %24 to i64
  %wide.trip.count170 = zext nneg i32 %.pr196 to i64
  %xtraiter239 = and i64 %wide.trip.count155, 1
  %35 = icmp eq i32 %24, 1
  %unroll_iter242 = and i64 %wide.trip.count155, 2147483646
  %lcmp.mod241.not = icmp eq i64 %xtraiter239, 0
  %min.iters.check = icmp ult i32 %.pr196, 8
  %n.vec = and i64 %wide.trip.count170, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count170
  br label %.preheader81.us.us

.preheader81.us.us:                               ; preds = %.preheader81.us.us.preheader, %._crit_edge114.split.us.split.us.us.us
  %indvars.iv172 = phi i64 [ 0, %.preheader81.us.us.preheader ], [ %indvars.iv.next173, %._crit_edge114.split.us.split.us.us.us ]
  br label %.preheader80.us.us.us.us

.preheader80.us.us.us.us:                         ; preds = %._crit_edge112.us.us.us.us, %.preheader81.us.us
  %indvars.iv167 = phi i64 [ %indvars.iv.next168, %._crit_edge112.us.us.us.us ], [ 0, %.preheader81.us.us ]
  %36 = getelementptr inbounds [100 x [100 x i32]], ptr @c, i64 0, i64 %indvars.iv172, i64 %indvars.iv167
  br i1 %35, label %..preheader79_crit_edge.us.us.us.us.preheader.unr-lcssa, label %.preheader80.us.us.us.us.new

..preheader79_crit_edge.us.us.us.us:              ; preds = %..preheader79_crit_edge.us.us.us.us.preheader237, %41
  %indvars.iv162 = phi i64 [ %indvars.iv.next163, %41 ], [ %indvars.iv162.ph, %..preheader79_crit_edge.us.us.us.us.preheader237 ]
  %37 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv172, i64 %indvars.iv162
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 1
  br i1 %39, label %40, label %41

40:                                               ; preds = %..preheader79_crit_edge.us.us.us.us
  store i32 1, ptr %36, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %40, %..preheader79_crit_edge.us.us.us.us
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count170
  br i1 %exitcond166.not, label %._crit_edge112.us.us.us.us, label %..preheader79_crit_edge.us.us.us.us, !llvm.loop !18

.preheader80.us.us.us.us.new:                     ; preds = %.preheader80.us.us.us.us, %51
  %indvars.iv157 = phi i64 [ %indvars.iv.next158.1, %51 ], [ 0, %.preheader80.us.us.us.us ]
  %niter243 = phi i64 [ %niter243.next.1, %51 ], [ 0, %.preheader80.us.us.us.us ]
  %42 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv157, i64 %indvars.iv167
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = icmp eq i32 %43, 1
  br i1 %44, label %45, label %46

45:                                               ; preds = %.preheader80.us.us.us.us.new
  store i32 1, ptr %36, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %45, %.preheader80.us.us.us.us.new
  %indvars.iv.next158 = or disjoint i64 %indvars.iv157, 1
  %47 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv.next158, i64 %indvars.iv167
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = icmp eq i32 %48, 1
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  store i32 1, ptr %36, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %50, %46
  %indvars.iv.next158.1 = add nuw nsw i64 %indvars.iv157, 2
  %niter243.next.1 = add i64 %niter243, 2
  %niter243.ncmp.1 = icmp eq i64 %niter243.next.1, %unroll_iter242
  br i1 %niter243.ncmp.1, label %..preheader79_crit_edge.us.us.us.us.preheader.unr-lcssa, label %.preheader80.us.us.us.us.new, !llvm.loop !21

..preheader79_crit_edge.us.us.us.us.preheader.unr-lcssa: ; preds = %51, %.preheader80.us.us.us.us
  %indvars.iv157.unr = phi i64 [ 0, %.preheader80.us.us.us.us ], [ %indvars.iv.next158.1, %51 ]
  br i1 %lcmp.mod241.not, label %..preheader79_crit_edge.us.us.us.us.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %..preheader79_crit_edge.us.us.us.us.preheader.unr-lcssa
  %52 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv157.unr, i64 %indvars.iv167
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %55, label %..preheader79_crit_edge.us.us.us.us.preheader

55:                                               ; preds = %.epil.preheader
  store i32 1, ptr %36, align 4, !tbaa !5
  br label %..preheader79_crit_edge.us.us.us.us.preheader

..preheader79_crit_edge.us.us.us.us.preheader:    ; preds = %.epil.preheader, %55, %..preheader79_crit_edge.us.us.us.us.preheader.unr-lcssa
  br i1 %min.iters.check, label %..preheader79_crit_edge.us.us.us.us.preheader237, label %vector.body

..preheader79_crit_edge.us.us.us.us.preheader237: ; preds = %middle.block, %..preheader79_crit_edge.us.us.us.us.preheader
  %indvars.iv162.ph = phi i64 [ 0, %..preheader79_crit_edge.us.us.us.us.preheader ], [ %n.vec, %middle.block ]
  br label %..preheader79_crit_edge.us.us.us.us

vector.body:                                      ; preds = %..preheader79_crit_edge.us.us.us.us.preheader, %76
  %index = phi i64 [ %index.next, %76 ], [ 0, %..preheader79_crit_edge.us.us.us.us.preheader ]
  %56 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv172, i64 %index
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %wide.load = load <4 x i32>, ptr %56, align 16, !tbaa !5
  %wide.load211 = load <4 x i32>, ptr %57, align 16, !tbaa !5
  %58 = icmp eq <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %59 = icmp eq <4 x i32> %wide.load211, <i32 1, i32 1, i32 1, i32 1>
  %60 = extractelement <4 x i1> %58, i64 0
  %61 = extractelement <4 x i1> %58, i64 1
  %62 = or i1 %60, %61
  %63 = extractelement <4 x i1> %58, i64 2
  %64 = or i1 %62, %63
  %65 = extractelement <4 x i1> %58, i64 3
  %66 = or i1 %64, %65
  %67 = extractelement <4 x i1> %59, i64 0
  %68 = or i1 %66, %67
  %69 = extractelement <4 x i1> %59, i64 1
  %70 = or i1 %68, %69
  %71 = extractelement <4 x i1> %59, i64 2
  %72 = or i1 %70, %71
  %73 = extractelement <4 x i1> %59, i64 3
  %74 = or i1 %72, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %vector.body
  store i32 1, ptr %36, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %vector.body, %75
  %index.next = add nuw i64 %index, 8
  %77 = icmp eq i64 %index.next, %n.vec
  br i1 %77, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %76
  br i1 %cmp.n, label %._crit_edge112.us.us.us.us, label %..preheader79_crit_edge.us.us.us.us.preheader237

._crit_edge112.us.us.us.us:                       ; preds = %41, %middle.block
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond171.not = icmp eq i64 %indvars.iv.next168, %wide.trip.count170
  br i1 %exitcond171.not, label %._crit_edge114.split.us.split.us.us.us, label %.preheader80.us.us.us.us, !llvm.loop !23

._crit_edge114.split.us.split.us.us.us:           ; preds = %._crit_edge112.us.us.us.us
  %indvars.iv.next173 = add nuw nsw i64 %indvars.iv172, 1
  %exitcond176.not = icmp eq i64 %indvars.iv.next173, %wide.trip.count175
  br i1 %exitcond176.not, label %.preheader78, label %.preheader81.us.us, !llvm.loop !24

.preheader78:                                     ; preds = %._crit_edge114.split.us.split.us.us.us
  br i1 %9, label %.preheader77.lr.ph, label %._crit_edge127

.preheader77.lr.ph:                               ; preds = %.preheader78
  %.pr205 = load i32, ptr @n, align 4, !tbaa !5
  %.not71122 = icmp sgt i32 %.pr205, 0
  br i1 %.not71122, label %.preheader77.us.preheader, label %._crit_edge127

.preheader77.us.preheader:                        ; preds = %.preheader77.lr.ph
  %wide.trip.count185 = zext nneg i32 %24 to i64
  %wide.trip.count180 = zext nneg i32 %.pr205 to i64
  br label %.preheader77.us

.preheader77.us:                                  ; preds = %.preheader77.us.preheader, %._crit_edge125.us
  %indvars.iv182 = phi i64 [ 0, %.preheader77.us.preheader ], [ %indvars.iv.next183, %._crit_edge125.us ]
  br label %79

78:                                               ; preds = %79
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %exitcond181.not = icmp eq i64 %indvars.iv.next178, %wide.trip.count180
  br i1 %exitcond181.not, label %._crit_edge125.us, label %79, !llvm.loop !25

79:                                               ; preds = %.preheader77.us, %78
  %indvars.iv177 = phi i64 [ 0, %.preheader77.us ], [ %indvars.iv.next178, %78 ]
  %80 = getelementptr inbounds [100 x [100 x i32]], ptr @b, i64 0, i64 %indvars.iv182, i64 %indvars.iv177
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = getelementptr inbounds [100 x [100 x i32]], ptr @c, i64 0, i64 %indvars.iv182, i64 %indvars.iv177
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %.not.us = icmp eq i32 %81, %83
  br i1 %.not.us, label %78, label %.split.us

._crit_edge125.us:                                ; preds = %78
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %exitcond186.not = icmp eq i64 %indvars.iv.next183, %wide.trip.count185
  br i1 %exitcond186.not, label %._crit_edge127, label %.preheader77.us, !llvm.loop !26

.split.us:                                        ; preds = %79
  %84 = 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.2)
  %85 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

._crit_edge127:                                   ; preds = %._crit_edge125.us, %.preheader81.lr.ph, %.preheader86.lr.ph, %0, %.preheader87, %.preheader82, %.preheader77.lr.ph, %.preheader78
  %86 = 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.3)
  %87 = load i32, ptr @m, align 4, !tbaa !5
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %._crit_edge127, %._crit_edge130
  %indvars.iv190 = phi i64 [ %indvars.iv.next191, %._crit_edge130 ], [ 0, %._crit_edge127 ]
  %89 = load i32, ptr @n, align 4, !tbaa !5
  %90 = icmp sgt i32 %89, 0
  br i1 %90, label %.lr.ph129, label %._crit_edge130

._crit_edge130:                                   ; preds = %.lr.ph129, %.preheader
  %91 = tail 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.next191 = add nuw nsw i64 %indvars.iv190, 1
  %92 = load i32, ptr @m, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = icmp slt i64 %indvars.iv.next191, %93
  br i1 %94, label %.preheader, label %.loopexit, !llvm.loop !27

.lr.ph129:                                        ; preds = %.preheader, %.lr.ph129
  %indvars.iv187 = phi i64 [ %indvars.iv.next188, %.lr.ph129 ], [ 0, %.preheader ]
  %95 = getelementptr inbounds [100 x [100 x i32]], ptr @a, i64 0, i64 %indvars.iv190, i64 %indvars.iv187
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %96)
  %98 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef nonnull @.str.4)
  %indvars.iv.next188 = add nuw nsw i64 %indvars.iv187, 1
  %99 = load i32, ptr @n, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = icmp slt i64 %indvars.iv.next188, %100
  br i1 %101, label %.lr.ph129, label %._crit_edge130, !llvm.loop !28

.loopexit:                                        ; preds = %._crit_edge130, %._crit_edge127, %.split.us
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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

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

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

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

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

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !16}
!16 = !{!"llvm.loop.unswitch.partial.disable"}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12, !19, !20}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12, !20, !19}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}


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