; LLVM IR from 0r-gh0/NUMERICAL_ANALYSIS :: CODES (quadratic_curve_fitting)

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

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca [4 x [5 x float]], align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca [4 x float], align 16
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %1)
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  %21 = zext i32 %20 to i64
  %22 = call ptr @llvm.stacksave.p0()
  store ptr %22, ptr %2, align 8
  %23 = alloca float, i64 %21, align 16
  store i64 %21, ptr %3, align 8
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  %26 = zext i32 %25 to i64
  %27 = alloca float, i64 %26, align 16
  store i64 %26, ptr %4, align 8
  %28 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %42, %0
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = load i32, ptr %1, align 4, !tbaa !5
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %45

34:                                               ; preds = %29
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds float, ptr %23, i64 %36
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds float, ptr %27, i64 %39
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %37, ptr noundef %40)
  br label %42

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

45:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #7
  call void @llvm.memset.p0.i64(ptr align 16 %6, i8 0, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %137, %45
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = icmp sle i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %140

51:                                               ; preds = %46
  %52 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 1
  %53 = getelementptr inbounds [5 x float], ptr %52, i64 0, i64 1
  %54 = load float, ptr %53, align 4, !tbaa !11
  %55 = fadd float %54, 1.000000e+00
  store float %55, ptr %53, align 4, !tbaa !11
  %56 = load i32, ptr %7, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds float, ptr %23, i64 %57
  %59 = load float, ptr %58, align 4, !tbaa !11
  %60 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 1
  %61 = getelementptr inbounds [5 x float], ptr %60, i64 0, i64 2
  %62 = load float, ptr %61, align 4, !tbaa !11
  %63 = fadd float %62, %59
  store float %63, ptr %61, align 4, !tbaa !11
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds float, ptr %23, i64 %65
  %67 = load float, ptr %66, align 4, !tbaa !11
  %68 = fpext float %67 to double
  %69 = call double @pow(double noundef %68, double noundef 2.000000e+00) #7
  %70 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 1
  %71 = getelementptr inbounds [5 x float], ptr %70, i64 0, i64 3
  %72 = load float, ptr %71, align 4, !tbaa !11
  %73 = fpext float %72 to double
  %74 = fadd double %73, %69
  %75 = fptrunc double %74 to float
  store float %75, ptr %71, align 4, !tbaa !11
  %76 = load i32, ptr %7, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds float, ptr %23, i64 %77
  %79 = load float, ptr %78, align 4, !tbaa !11
  %80 = fpext float %79 to double
  %81 = call double @pow(double noundef %80, double noundef 3.000000e+00) #7
  %82 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 2
  %83 = getelementptr inbounds [5 x float], ptr %82, i64 0, i64 3
  %84 = load float, ptr %83, align 4, !tbaa !11
  %85 = fpext float %84 to double
  %86 = fadd double %85, %81
  %87 = fptrunc double %86 to float
  store float %87, ptr %83, align 4, !tbaa !11
  %88 = load i32, ptr %7, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %23, i64 %89
  %91 = load float, ptr %90, align 4, !tbaa !11
  %92 = fpext float %91 to double
  %93 = call double @pow(double noundef %92, double noundef 4.000000e+00) #7
  %94 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 3
  %95 = getelementptr inbounds [5 x float], ptr %94, i64 0, i64 3
  %96 = load float, ptr %95, align 4, !tbaa !11
  %97 = fpext float %96 to double
  %98 = fadd double %97, %93
  %99 = fptrunc double %98 to float
  store float %99, ptr %95, align 4, !tbaa !11
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds float, ptr %27, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !11
  %104 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 1
  %105 = getelementptr inbounds [5 x float], ptr %104, i64 0, i64 4
  %106 = load float, ptr %105, align 4, !tbaa !11
  %107 = fadd float %106, %103
  store float %107, ptr %105, align 4, !tbaa !11
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds float, ptr %23, i64 %109
  %111 = load float, ptr %110, align 4, !tbaa !11
  %112 = load i32, ptr %7, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %27, i64 %113
  %115 = load float, ptr %114, align 4, !tbaa !11
  %116 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 2
  %117 = getelementptr inbounds [5 x float], ptr %116, i64 0, i64 4
  %118 = load float, ptr %117, align 8, !tbaa !11
  %119 = call float @llvm.fmuladd.f32(float %111, float %115, float %118)
  store float %119, ptr %117, align 8, !tbaa !11
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds float, ptr %23, i64 %121
  %123 = load float, ptr %122, align 4, !tbaa !11
  %124 = fpext float %123 to double
  %125 = call double @pow(double noundef %124, double noundef 2.000000e+00) #7
  %126 = load i32, ptr %7, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds float, ptr %27, i64 %127
  %129 = load float, ptr %128, align 4, !tbaa !11
  %130 = fpext float %129 to double
  %131 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 3
  %132 = getelementptr inbounds [5 x float], ptr %131, i64 0, i64 4
  %133 = load float, ptr %132, align 4, !tbaa !11
  %134 = fpext float %133 to double
  %135 = call double @llvm.fmuladd.f64(double %125, double %130, double %134)
  %136 = fptrunc double %135 to float
  store float %136, ptr %132, align 4, !tbaa !11
  br label %137

137:                                              ; preds = %51
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %7, align 4, !tbaa !5
  br label %46, !llvm.loop !13

140:                                              ; preds = %50
  %141 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 1
  %142 = getelementptr inbounds [5 x float], ptr %141, i64 0, i64 2
  %143 = load float, ptr %142, align 4, !tbaa !11
  %144 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 2
  %145 = getelementptr inbounds [5 x float], ptr %144, i64 0, i64 1
  store float %143, ptr %145, align 4, !tbaa !11
  %146 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 1
  %147 = getelementptr inbounds [5 x float], ptr %146, i64 0, i64 3
  %148 = load float, ptr %147, align 4, !tbaa !11
  %149 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 2
  %150 = getelementptr inbounds [5 x float], ptr %149, i64 0, i64 2
  store float %148, ptr %150, align 8, !tbaa !11
  %151 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 1
  %152 = getelementptr inbounds [5 x float], ptr %151, i64 0, i64 3
  %153 = load float, ptr %152, align 4, !tbaa !11
  %154 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 3
  %155 = getelementptr inbounds [5 x float], ptr %154, i64 0, i64 1
  store float %153, ptr %155, align 4, !tbaa !11
  %156 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 2
  %157 = getelementptr inbounds [5 x float], ptr %156, i64 0, i64 3
  %158 = load float, ptr %157, align 4, !tbaa !11
  %159 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 3
  %160 = getelementptr inbounds [5 x float], ptr %159, i64 0, i64 2
  store float %158, ptr %160, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %218, %140
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = icmp sle i32 %162, 2
  br i1 %163, label %165, label %164

164:                                              ; preds = %161
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %221

165:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %166 = load i32, ptr %8, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %10, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %214, %165
  %169 = load i32, ptr %10, align 4, !tbaa !5
  %170 = icmp sle i32 %169, 3
  br i1 %170, label %172, label %171

171:                                              ; preds = %168
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %217

172:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %173 = load i32, ptr %10, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 %174
  %176 = load i32, ptr %8, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [5 x float], ptr %175, i64 0, i64 %177
  %179 = load float, ptr %178, align 4, !tbaa !11
  %180 = load i32, ptr %8, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 %181
  %183 = load i32, ptr %8, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [5 x float], ptr %182, i64 0, i64 %184
  %186 = load float, ptr %185, align 4, !tbaa !11
  %187 = fdiv float %179, %186
  store float %187, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %210, %172
  %189 = load i32, ptr %12, align 4, !tbaa !5
  %190 = icmp sle i32 %189, 4
  br i1 %190, label %192, label %191

191:                                              ; preds = %188
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %213

192:                                              ; preds = %188
  %193 = load float, ptr %11, align 4, !tbaa !11
  %194 = load i32, ptr %8, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 %195
  %197 = load i32, ptr %12, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [5 x float], ptr %196, i64 0, i64 %198
  %200 = load float, ptr %199, align 4, !tbaa !11
  %201 = load i32, ptr %10, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 %202
  %204 = load i32, ptr %12, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [5 x float], ptr %203, i64 0, i64 %205
  %207 = load float, ptr %206, align 4, !tbaa !11
  %208 = fneg float %193
  %209 = call float @llvm.fmuladd.f32(float %208, float %200, float %207)
  store float %209, ptr %206, align 4, !tbaa !11
  br label %210

210:                                              ; preds = %192
  %211 = load i32, ptr %12, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %12, align 4, !tbaa !5
  br label %188, !llvm.loop !14

213:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %214

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

217:                                              ; preds = %171
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %8, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %8, align 4, !tbaa !5
  br label %161, !llvm.loop !16

221:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 3, ptr %14, align 4, !tbaa !5
  br label %222

222:                                              ; preds = %268, %221
  %223 = load i32, ptr %14, align 4, !tbaa !5
  %224 = icmp sge i32 %223, 1
  br i1 %224, label %226, label %225

225:                                              ; preds = %222
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %271

226:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store float 0.000000e+00, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 3, ptr %16, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %246, %226
  %228 = load i32, ptr %16, align 4, !tbaa !5
  %229 = load i32, ptr %14, align 4, !tbaa !5
  %230 = icmp sgt i32 %228, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %227
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %249

232:                                              ; preds = %227
  %233 = load i32, ptr %16, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [4 x float], ptr %13, i64 0, i64 %234
  %236 = load float, ptr %235, align 4, !tbaa !11
  %237 = load i32, ptr %14, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 %238
  %240 = load i32, ptr %16, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [5 x float], ptr %239, i64 0, i64 %241
  %243 = load float, ptr %242, align 4, !tbaa !11
  %244 = load float, ptr %15, align 4, !tbaa !11
  %245 = call float @llvm.fmuladd.f32(float %236, float %243, float %244)
  store float %245, ptr %15, align 4, !tbaa !11
  br label %246

246:                                              ; preds = %232
  %247 = load i32, ptr %16, align 4, !tbaa !5
  %248 = add nsw i32 %247, -1
  store i32 %248, ptr %16, align 4, !tbaa !5
  br label %227, !llvm.loop !17

249:                                              ; preds = %231
  %250 = load i32, ptr %14, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 %251
  %253 = getelementptr inbounds [5 x float], ptr %252, i64 0, i64 4
  %254 = load float, ptr %253, align 4, !tbaa !11
  %255 = load float, ptr %15, align 4, !tbaa !11
  %256 = fsub float %254, %255
  %257 = load i32, ptr %14, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [4 x [5 x float]], ptr %6, i64 0, i64 %258
  %260 = load i32, ptr %14, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [5 x float], ptr %259, i64 0, i64 %261
  %263 = load float, ptr %262, align 4, !tbaa !11
  %264 = fdiv float %256, %263
  %265 = load i32, ptr %14, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [4 x float], ptr %13, i64 0, i64 %266
  store float %264, ptr %267, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %268

268:                                              ; preds = %249
  %269 = load i32, ptr %14, align 4, !tbaa !5
  %270 = add nsw i32 %269, -1
  store i32 %270, ptr %14, align 4, !tbaa !5
  br label %222, !llvm.loop !18

271:                                              ; preds = %225
  %272 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %273 = getelementptr inbounds [4 x float], ptr %13, i64 0, i64 1
  %274 = load float, ptr %273, align 4, !tbaa !11
  %275 = fpext float %274 to double
  %276 = getelementptr inbounds [4 x float], ptr %13, i64 0, i64 2
  %277 = load float, ptr %276, align 8, !tbaa !11
  %278 = fpext float %277 to double
  %279 = getelementptr inbounds [4 x float], ptr %13, i64 0, i64 3
  %280 = load float, ptr %279, align 4, !tbaa !11
  %281 = fpext float %280 to double
  %282 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, double noundef %275, double noundef %278, double noundef %281)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #7
  %283 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %283)
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void
}

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

declare i32 @printf(ptr noundef, ...) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #5

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

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

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

attributes #0 = { 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 = { 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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !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"

@.str = external hidden unnamed_addr constant [33 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local void @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = add nsw i32 %4, 1
  %6 = zext i32 %5 to i64
  %7 = call ptr @llvm.stacksave.p0()
  %8 = alloca float, i64 %6, align 16
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = add nsw i32 %9, 1
  %11 = zext i32 %10 to i64
  %12 = alloca float, i64 %11, align 16
  %13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %.not54 = icmp slt i32 %14, 1
  br i1 %.not54, label %._crit_edge83.2, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %15 = icmp slt i32 %19, 1
  br i1 %15, label %._crit_edge83.2, label %.lr.ph59

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %16 = getelementptr inbounds float, ptr %8, i64 %indvars.iv
  %17 = getelementptr inbounds float, ptr %12, i64 %indvars.iv
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %16, ptr noundef nonnull %17)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %.not.not = icmp slt i64 %indvars.iv, %20
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph59:                                         ; preds = %._crit_edge, %.lr.ph59
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %.lr.ph59 ], [ 1, %._crit_edge ]
  %21 = phi float [ %58, %.lr.ph59 ], [ 0.000000e+00, %._crit_edge ]
  %22 = phi float [ %48, %.lr.ph59 ], [ 0.000000e+00, %._crit_edge ]
  %23 = phi float [ %46, %.lr.ph59 ], [ 0.000000e+00, %._crit_edge ]
  %24 = phi float [ %59, %.lr.ph59 ], [ 0.000000e+00, %._crit_edge ]
  %25 = phi float [ %31, %.lr.ph59 ], [ 0.000000e+00, %._crit_edge ]
  %26 = phi float [ %28, %.lr.ph59 ], [ 0.000000e+00, %._crit_edge ]
  %27 = phi <2 x float> [ %38, %.lr.ph59 ], [ zeroinitializer, %._crit_edge ]
  %28 = fadd float %26, 1.000000e+00
  %29 = getelementptr inbounds float, ptr %8, i64 %indvars.iv94
  %30 = load float, ptr %29, align 4, !tbaa !11
  %31 = fadd float %30, %25
  %32 = fpext float %30 to double
  %square = fmul double %32, %32
  %33 = fpext <2 x float> %27 to <2 x double>
  %34 = call double @pow(double noundef %32, double noundef 3.000000e+00) #7
  %35 = insertelement <2 x double> poison, double %34, i64 0
  %36 = insertelement <2 x double> %35, double %square, i64 1
  %37 = fadd <2 x double> %36, %33
  %38 = fptrunc <2 x double> %37 to <2 x float>
  %39 = load float, ptr %29, align 4, !tbaa !11
  %40 = fpext float %39 to double
  %41 = call double @pow(double noundef %40, double noundef 4.000000e+00) #7
  %42 = fpext float %24 to double
  %43 = fadd double %41, %42
  %44 = getelementptr inbounds float, ptr %12, i64 %indvars.iv94
  %45 = load float, ptr %44, align 4, !tbaa !11
  %46 = fadd float %45, %23
  %47 = load float, ptr %29, align 4, !tbaa !11
  %48 = call float @llvm.fmuladd.f32(float %47, float %45, float %22)
  %49 = fpext float %47 to double
  %square53 = fmul double %49, %49
  %50 = fpext float %45 to double
  %51 = fpext float %21 to double
  %52 = call double @llvm.fmuladd.f64(double %square53, double %50, double %51)
  %53 = insertelement <2 x double> poison, double %52, i64 0
  %54 = insertelement <2 x double> %53, double %43, i64 1
  %55 = fptrunc <2 x double> %54 to <2 x float>
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %.not52.not = icmp slt i64 %indvars.iv94, %57
  %58 = extractelement <2 x float> %55, i64 0
  %59 = extractelement <2 x float> %55, i64 1
  br i1 %.not52.not, label %.lr.ph59, label %._crit_edge83.2.loopexit, !llvm.loop !13

._crit_edge83.2.loopexit:                         ; preds = %.lr.ph59
  %60 = insertelement <2 x float> poison, float %48, i64 0
  %61 = shufflevector <2 x float> %60, <2 x float> %38, <2 x i32> <i32 0, i32 2>
  %62 = insertelement <2 x float> %38, float %46, i64 0
  br label %._crit_edge83.2

._crit_edge83.2:                                  ; preds = %._crit_edge83.2.loopexit, %0, %._crit_edge
  %.sroa.10.0 = phi float [ 0.000000e+00, %._crit_edge ], [ 0.000000e+00, %0 ], [ %31, %._crit_edge83.2.loopexit ]
  %.sroa.3.0 = phi float [ 0.000000e+00, %._crit_edge ], [ 0.000000e+00, %0 ], [ %28, %._crit_edge83.2.loopexit ]
  %63 = phi <2 x float> [ zeroinitializer, %._crit_edge ], [ zeroinitializer, %0 ], [ %62, %._crit_edge83.2.loopexit ]
  %64 = phi <2 x float> [ zeroinitializer, %._crit_edge ], [ zeroinitializer, %0 ], [ %61, %._crit_edge83.2.loopexit ]
  %65 = phi <2 x float> [ zeroinitializer, %._crit_edge ], [ zeroinitializer, %0 ], [ %55, %._crit_edge83.2.loopexit ]
  %66 = fneg float %.sroa.10.0
  %67 = fdiv float %66, %.sroa.3.0
  %68 = extractelement <2 x float> %63, i64 1
  %69 = fneg float %68
  %70 = fdiv float %69, %.sroa.3.0
  %71 = extractelement <2 x float> %64, i64 1
  %72 = call float @llvm.fmuladd.f32(float %70, float %.sroa.10.0, float %71)
  %73 = fneg float %72
  %74 = call float @llvm.fmuladd.f32(float %67, float %.sroa.10.0, float %68)
  %75 = fdiv float %73, %74
  %76 = insertelement <2 x float> poison, float %67, i64 0
  %77 = shufflevector <2 x float> %76, <2 x float> poison, <2 x i32> zeroinitializer
  %78 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %77, <2 x float> %63, <2 x float> %64)
  %79 = insertelement <2 x float> poison, float %70, i64 0
  %80 = shufflevector <2 x float> %79, <2 x float> poison, <2 x i32> zeroinitializer
  %81 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %80, <2 x float> %63, <2 x float> %65)
  %82 = insertelement <2 x float> poison, float %75, i64 0
  %83 = shufflevector <2 x float> %82, <2 x float> poison, <2 x i32> zeroinitializer
  %84 = call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %83, <2 x float> %78, <2 x float> %81)
  %85 = extractelement <2 x float> %84, i64 0
  %86 = extractelement <2 x float> %84, i64 1
  %87 = fdiv float %85, %86
  %88 = extractelement <2 x float> %78, i64 1
  %89 = call float @llvm.fmuladd.f32(float %87, float %88, float 0.000000e+00)
  %90 = extractelement <2 x float> %78, i64 0
  %91 = fsub float %90, %89
  %92 = fdiv float %91, %74
  %93 = call float @llvm.fmuladd.f32(float %87, float %68, float 0.000000e+00)
  %94 = call float @llvm.fmuladd.f32(float %92, float %.sroa.10.0, float %93)
  %95 = extractelement <2 x float> %63, i64 0
  %96 = fsub float %95, %94
  %97 = fdiv float %96, %.sroa.3.0
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %99 = fpext float %97 to double
  %100 = fpext float %92 to double
  %101 = fpext float %87 to double
  %102 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %99, double noundef %100, double noundef %101)
  call void @llvm.stackrestore.p0(ptr %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void
}

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #6

attributes #0 = { nofree 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { mustprogress nofree nounwind willreturn memory(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !10}


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