; LLVM IR from tangjz/acm-icpc :: lydsy (1491)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@e = external dso_local global [101 x [101 x i32]], align 16
@f = external dso_local global [101 x [101 x double]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 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 double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.memset.p0.i64(ptr align 16 @e, i8 63, i64 40804, i1 false)
  br label %14

14:                                               ; preds = %55, %0
  %15 = load i32, ptr @m, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr @m, align 4, !tbaa !5
  %17 = icmp ne i32 %15, 0
  br i1 %17, label %18, label %56

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2, ptr noundef %3, ptr noundef %4)
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %21
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [101 x i32], ptr %22, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = icmp sgt i32 %26, %27
  br i1 %28, label %29, label %55

29:                                               ; preds = %18
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %32
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [101 x i32], ptr %33, i64 0, i64 %35
  store i32 %30, ptr %36, align 4, !tbaa !5
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %38
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [101 x i32], ptr %39, i64 0, i64 %41
  store i32 %30, ptr %42, align 4, !tbaa !5
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %44
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [101 x double], ptr %45, i64 0, i64 %47
  store double 1.000000e+00, ptr %48, align 8, !tbaa !9
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %50
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [101 x double], ptr %51, i64 0, i64 %53
  store double 1.000000e+00, ptr %54, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %29, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %14, !llvm.loop !11

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

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

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

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

63:                                               ; preds = %191, %62
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = icmp sle i32 %64, %65
  br i1 %66, label %68, label %67

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

68:                                               ; preds = %63
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = icmp eq i32 %69, %70
  br i1 %71, label %72, label %73

72:                                               ; preds = %68
  br label %191

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %187, %73
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %79, label %78

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

79:                                               ; preds = %74
  %80 = load i32, ptr %7, align 4, !tbaa !5
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = icmp eq i32 %80, %81
  br i1 %82, label %111, label %83

83:                                               ; preds = %79
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = icmp eq i32 %84, %85
  br i1 %86, label %111, label %87

87:                                               ; preds = %83
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %89
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [101 x i32], ptr %90, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %96
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [101 x i32], ptr %97, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %103
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [101 x i32], ptr %104, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = add nsw i32 %101, %108
  %110 = icmp slt i32 %94, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %87, %83, %79
  br label %187

112:                                              ; preds = %87
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %114
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [101 x i32], ptr %115, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %121
  %123 = load i32, ptr %5, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [101 x i32], ptr %122, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %128
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [101 x i32], ptr %129, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = add nsw i32 %126, %133
  %135 = icmp sgt i32 %119, %134
  br i1 %135, label %136, label %164

136:                                              ; preds = %112
  %137 = load i32, ptr %7, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %138
  %140 = load i32, ptr %5, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [101 x i32], ptr %139, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = load i32, ptr %5, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %145
  %147 = load i32, ptr %8, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [101 x i32], ptr %146, i64 0, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = add nsw i32 %143, %150
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %153
  %155 = load i32, ptr %8, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [101 x i32], ptr %154, i64 0, i64 %156
  store i32 %151, ptr %157, align 4, !tbaa !5
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %159
  %161 = load i32, ptr %8, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [101 x double], ptr %160, i64 0, i64 %162
  store double 0.000000e+00, ptr %163, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %136, %112
  %165 = load i32, ptr %7, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %166
  %168 = load i32, ptr %5, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [101 x double], ptr %167, i64 0, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !9
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %173
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [101 x double], ptr %174, i64 0, i64 %176
  %178 = load double, ptr %177, align 8, !tbaa !9
  %179 = load i32, ptr %7, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %180
  %182 = load i32, ptr %8, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [101 x double], ptr %181, i64 0, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !9
  %186 = call double @llvm.fmuladd.f64(double %171, double %178, double %185)
  store double %186, ptr %184, align 8, !tbaa !9
  br label %187

187:                                              ; preds = %164, %111
  %188 = load i32, ptr %8, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %8, align 4, !tbaa !5
  br label %74, !llvm.loop !13

190:                                              ; preds = %78
  br label %191

191:                                              ; preds = %190, %72
  %192 = load i32, ptr %7, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %7, align 4, !tbaa !5
  br label %63, !llvm.loop !14

194:                                              ; preds = %67
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %5, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %5, align 4, !tbaa !5
  br label %57, !llvm.loop !15

198:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %290, %198
  %200 = load i32, ptr %9, align 4, !tbaa !5
  %201 = load i32, ptr @n, align 4, !tbaa !5
  %202 = icmp sle i32 %200, %201
  br i1 %202, label %204, label %203

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

204:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store double 0.000000e+00, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %284, %204
  %206 = load i32, ptr %11, align 4, !tbaa !5
  %207 = load i32, ptr @n, align 4, !tbaa !5
  %208 = icmp sle i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  store i32 16, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %287

210:                                              ; preds = %205
  %211 = load i32, ptr %11, align 4, !tbaa !5
  %212 = load i32, ptr %9, align 4, !tbaa !5
  %213 = icmp eq i32 %211, %212
  br i1 %213, label %214, label %215

214:                                              ; preds = %210
  br label %284

215:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %280, %215
  %217 = load i32, ptr %12, align 4, !tbaa !5
  %218 = load i32, ptr @n, align 4, !tbaa !5
  %219 = icmp sle i32 %217, %218
  br i1 %219, label %221, label %220

220:                                              ; preds = %216
  store i32 19, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %283

221:                                              ; preds = %216
  %222 = load i32, ptr %11, align 4, !tbaa !5
  %223 = load i32, ptr %12, align 4, !tbaa !5
  %224 = icmp eq i32 %222, %223
  br i1 %224, label %253, label %225

225:                                              ; preds = %221
  %226 = load i32, ptr %12, align 4, !tbaa !5
  %227 = load i32, ptr %9, align 4, !tbaa !5
  %228 = icmp eq i32 %226, %227
  br i1 %228, label %253, label %229

229:                                              ; preds = %225
  %230 = load i32, ptr %11, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %231
  %233 = load i32, ptr %12, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [101 x i32], ptr %232, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = load i32, ptr %11, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %238
  %240 = load i32, ptr %9, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [101 x i32], ptr %239, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !5
  %244 = load i32, ptr %9, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %245
  %247 = load i32, ptr %12, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [101 x i32], ptr %246, i64 0, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = add nsw i32 %243, %250
  %252 = icmp ne i32 %236, %251
  br i1 %252, label %253, label %254

253:                                              ; preds = %229, %225, %221
  br label %280

254:                                              ; preds = %229
  %255 = load i32, ptr %11, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %256
  %258 = load i32, ptr %9, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [101 x double], ptr %257, i64 0, i64 %259
  %261 = load double, ptr %260, align 8, !tbaa !9
  %262 = load i32, ptr %9, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %263
  %265 = load i32, ptr %12, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [101 x double], ptr %264, i64 0, i64 %266
  %268 = load double, ptr %267, align 8, !tbaa !9
  %269 = fmul double %261, %268
  %270 = load i32, ptr %11, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %271
  %273 = load i32, ptr %12, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [101 x double], ptr %272, i64 0, i64 %274
  %276 = load double, ptr %275, align 8, !tbaa !9
  %277 = fdiv double %269, %276
  %278 = load double, ptr %10, align 8, !tbaa !9
  %279 = fadd double %278, %277
  store double %279, ptr %10, align 8, !tbaa !9
  br label %280

280:                                              ; preds = %254, %253
  %281 = load i32, ptr %12, align 4, !tbaa !5
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %12, align 4, !tbaa !5
  br label %216, !llvm.loop !16

283:                                              ; preds = %220
  br label %284

284:                                              ; preds = %283, %214
  %285 = load i32, ptr %11, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %11, align 4, !tbaa !5
  br label %205, !llvm.loop !17

287:                                              ; preds = %209
  %288 = load double, ptr %10, align 8, !tbaa !9
  %289 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %288)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %290

290:                                              ; preds = %287
  %291 = load i32, ptr %9, align 4, !tbaa !5
  %292 = add nsw i32 %291, 1
  store i32 %292, ptr %9, align 4, !tbaa !5
  br label %199, !llvm.loop !18

293:                                              ; preds = %203
  ret i32 0
}

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare i32 @printf(ptr 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 nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@e = external dso_local local_unnamed_addr global [101 x [101 x i32]], align 16
@f = external dso_local local_unnamed_addr global [101 x [101 x double]], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40804) @e, i8 63, i64 40804, i1 false)
  %5 = load i32, ptr @m, align 4, !tbaa !5
  %6 = add nsw i32 %5, -1
  store i32 %6, ptr @m, align 4, !tbaa !5
  %.not86 = icmp eq i32 %5, 0
  br i1 %.not86, label %.preheader85, label %.lr.ph

.preheader85:                                     ; preds = %22, %0
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %.not7294 = icmp slt i32 %7, 1
  br i1 %.not7294, label %._crit_edge, label %.preheader84.preheader

.preheader84.preheader:                           ; preds = %.preheader85
  %8 = add nuw i32 %7, 1
  %wide.trip.count119 = zext i32 %8 to i64
  br label %.preheader84

.lr.ph:                                           ; preds = %0, %22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %10 = load i32, ptr %1, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %11, i64 %13
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = icmp sgt i32 %15, %16
  br i1 %17, label %18, label %22

18:                                               ; preds = %.lr.ph
  %19 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %13, i64 %11
  store i32 %16, ptr %19, align 4, !tbaa !5
  store i32 %16, ptr %14, align 4, !tbaa !5
  %20 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %13, i64 %11
  store double 1.000000e+00, ptr %20, align 8, !tbaa !9
  %21 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %11, i64 %13
  store double 1.000000e+00, ptr %21, align 8, !tbaa !9
  br label %22

22:                                               ; preds = %18, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr @m, align 4, !tbaa !5
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %.preheader85, label %.lr.ph, !llvm.loop !11

.preheader84:                                     ; preds = %.preheader84.preheader, %._crit_edge.split
  %indvars.iv116 = phi i64 [ 1, %.preheader84.preheader ], [ %indvars.iv.next117, %._crit_edge.split ]
  br label %25

.preheader81:                                     ; preds = %._crit_edge.split
  br i1 %.not7294, label %._crit_edge, label %.preheader80

._crit_edge.split:                                ; preds = %..loopexit83_crit_edge
  %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1
  %exitcond120.not = icmp eq i64 %indvars.iv.next117, %wide.trip.count119
  br i1 %exitcond120.not, label %.preheader81, label %.preheader84, !llvm.loop !13

25:                                               ; preds = %.preheader84, %..loopexit83_crit_edge
  %indvars.iv111 = phi i64 [ 1, %.preheader84 ], [ %indvars.iv.next112, %..loopexit83_crit_edge ]
  %26 = icmp eq i64 %indvars.iv111, %indvars.iv116
  br i1 %26, label %..loopexit83_crit_edge, label %.preheader82

.preheader82:                                     ; preds = %25
  %27 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %indvars.iv111, i64 %indvars.iv116
  %28 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv111, i64 %indvars.iv116
  br label %29

29:                                               ; preds = %.preheader82, %51
  %indvars.iv = phi i64 [ 1, %.preheader82 ], [ %indvars.iv.next, %51 ]
  %30 = icmp eq i64 %indvars.iv111, %indvars.iv
  %31 = icmp eq i64 %indvars.iv, %indvars.iv116
  %or.cond = or i1 %30, %31
  br i1 %or.cond, label %51, label %32

32:                                               ; preds = %29
  %33 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %indvars.iv111, i64 %indvars.iv
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr %27, align 4, !tbaa !5
  %36 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %indvars.iv116, i64 %indvars.iv
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = add nsw i32 %37, %35
  %39 = icmp slt i32 %34, %38
  br i1 %39, label %51, label %40

40:                                               ; preds = %32
  %41 = icmp sgt i32 %34, %38
  br i1 %41, label %42, label %._crit_edge134

._crit_edge134:                                   ; preds = %40
  %.phi.trans.insert = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv111, i64 %indvars.iv
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !9
  br label %44

42:                                               ; preds = %40
  store i32 %38, ptr %33, align 4, !tbaa !5
  %43 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv111, i64 %indvars.iv
  store double 0.000000e+00, ptr %43, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %._crit_edge134, %42
  %45 = phi double [ %.pre, %._crit_edge134 ], [ 0.000000e+00, %42 ]
  %46 = load double, ptr %28, align 8, !tbaa !9
  %47 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv116, i64 %indvars.iv
  %48 = load double, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv111, i64 %indvars.iv
  %50 = call double @llvm.fmuladd.f64(double %46, double %48, double %45)
  store double %50, ptr %49, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %29, %32, %44
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count119
  br i1 %exitcond.not, label %..loopexit83_crit_edge, label %29, !llvm.loop !14

..loopexit83_crit_edge:                           ; preds = %51, %25
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count119
  br i1 %exitcond115.not, label %._crit_edge.split, label %25, !llvm.loop !15

.preheader80:                                     ; preds = %.preheader81, %._crit_edge.split107
  %indvars.iv131 = phi i64 [ %indvars.iv.next132, %._crit_edge.split107 ], [ 1, %.preheader81 ]
  %52 = phi i32 [ %55, %._crit_edge.split107 ], [ %7, %.preheader81 ]
  %.not74100 = icmp slt i32 %52, 1
  br i1 %.not74100, label %._crit_edge.split107, label %.lr.ph104

.lr.ph104:                                        ; preds = %.preheader80
  %53 = add nuw i32 %52, 1
  %wide.trip.count129 = zext i32 %53 to i64
  br label %57

._crit_edge:                                      ; preds = %._crit_edge.split107, %.preheader85, %.preheader81
  ret i32 0

._crit_edge.split107:                             ; preds = %..loopexit_crit_edge, %.preheader80
  %.064.lcssa = phi double [ 0.000000e+00, %.preheader80 ], [ %.3, %..loopexit_crit_edge ]
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %.064.lcssa)
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %.not73.not = icmp slt i64 %indvars.iv131, %56
  br i1 %.not73.not, label %.preheader80, label %._crit_edge, !llvm.loop !16

57:                                               ; preds = %.lr.ph104, %..loopexit_crit_edge
  %indvars.iv126 = phi i64 [ 1, %.lr.ph104 ], [ %indvars.iv.next127, %..loopexit_crit_edge ]
  %.064101 = phi double [ 0.000000e+00, %.lr.ph104 ], [ %.3, %..loopexit_crit_edge ]
  %58 = icmp eq i64 %indvars.iv126, %indvars.iv131
  br i1 %58, label %..loopexit_crit_edge, label %.preheader

.preheader:                                       ; preds = %57
  %59 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %indvars.iv126, i64 %indvars.iv131
  %60 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv126, i64 %indvars.iv131
  br label %61

61:                                               ; preds = %.preheader, %80
  %indvars.iv121 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next122, %80 ]
  %.197 = phi double [ %.064101, %.preheader ], [ %.2, %80 ]
  %62 = icmp eq i64 %indvars.iv126, %indvars.iv121
  %63 = icmp eq i64 %indvars.iv121, %indvars.iv131
  %or.cond79 = or i1 %62, %63
  br i1 %or.cond79, label %80, label %64

64:                                               ; preds = %61
  %65 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %indvars.iv126, i64 %indvars.iv121
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = load i32, ptr %59, align 4, !tbaa !5
  %68 = getelementptr inbounds [101 x [101 x i32]], ptr @e, i64 0, i64 %indvars.iv131, i64 %indvars.iv121
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = add nsw i32 %69, %67
  %.not76 = icmp eq i32 %66, %70
  br i1 %.not76, label %71, label %80

71:                                               ; preds = %64
  %72 = load double, ptr %60, align 8, !tbaa !9
  %73 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv131, i64 %indvars.iv121
  %74 = load double, ptr %73, align 8, !tbaa !9
  %75 = fmul double %72, %74
  %76 = getelementptr inbounds [101 x [101 x double]], ptr @f, i64 0, i64 %indvars.iv126, i64 %indvars.iv121
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = fdiv double %75, %77
  %79 = fadd double %.197, %78
  br label %80

80:                                               ; preds = %61, %64, %71
  %.2 = phi double [ %.197, %61 ], [ %.197, %64 ], [ %79, %71 ]
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next122, %wide.trip.count129
  br i1 %exitcond125.not, label %..loopexit_crit_edge, label %61, !llvm.loop !17

..loopexit_crit_edge:                             ; preds = %80, %57
  %.3 = phi double [ %.064101, %57 ], [ %.2, %80 ]
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %exitcond130.not = icmp eq i64 %indvars.iv.next127, %wide.trip.count129
  br i1 %exitcond130.not, label %._crit_edge.split107, label %57, !llvm.loop !18
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress nofree norecurse 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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