; LLVM IR from manishbisht/Competitive-Programming :: Codechef/AUG19A (MAXEXPR)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = 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 ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %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 double, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca i8, align 1
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::_Setprecision", align 4
  %23 = alloca i32, align 4
  %24 = alloca %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %26

26:                                               ; preds = %255, %0
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr %2, align 4, !tbaa !5
  %29 = icmp ne i32 %27, 0
  br i1 %29, label %30, label %257

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  %34 = zext i32 %33 to i64
  %35 = call ptr @llvm.stacksave.p0()
  store ptr %35, ptr %4, align 8
  %36 = alloca double, i64 %34, align 16
  store i64 %34, ptr %5, align 8
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  %39 = zext i32 %38 to i64
  %40 = alloca double, i64 %39, align 16
  store i64 %39, ptr %6, align 8
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  %43 = zext i32 %42 to i64
  %44 = alloca double, i64 %43, align 16
  store i64 %43, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %55, %30
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %58

50:                                               ; preds = %45
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %36, i64 %52
  %54 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %53)
  br label %55

55:                                               ; preds = %50
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %8, align 4, !tbaa !5
  br label %45, !llvm.loop !9

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

59:                                               ; preds = %69, %58
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = icmp sle i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %72

64:                                               ; preds = %59
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %40, i64 %66
  %68 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %67)
  br label %69

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

72:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %86, %72
  %74 = load i32, ptr %11, align 4, !tbaa !5
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = icmp sle i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  store i32 10, ptr %12, align 4
  br label %89

78:                                               ; preds = %73
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %40, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !12
  %83 = fcmp une double %82, 0.000000e+00
  br i1 %83, label %84, label %85

84:                                               ; preds = %78
  store i32 1, ptr %10, align 4, !tbaa !5
  store i32 10, ptr %12, align 4
  br label %89

85:                                               ; preds = %78
  br label %86

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

89:                                               ; preds = %84, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %108

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

94:                                               ; preds = %103, %93
  %95 = load i32, ptr %13, align 4, !tbaa !5
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  %98 = icmp slt i32 %95, %97
  br i1 %98, label %100, label %99

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

100:                                              ; preds = %94
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @.str.1)
  br label %103

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

106:                                              ; preds = %99
  %107 = 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

108:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  store double 0.000000e+00, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  store double 0.000000e+00, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %125, %108
  %110 = load i32, ptr %16, align 4, !tbaa !5
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = icmp sle i32 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %128

114:                                              ; preds = %109
  %115 = load i32, ptr %16, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %36, i64 %116
  %118 = load double, ptr %117, align 8, !tbaa !12
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds double, ptr %40, i64 %120
  %122 = load double, ptr %121, align 8, !tbaa !12
  %123 = load double, ptr %14, align 8, !tbaa !12
  %124 = call double @llvm.fmuladd.f64(double %118, double %122, double %123)
  store double %124, ptr %14, align 8, !tbaa !12
  br label %125

125:                                              ; preds = %114
  %126 = load i32, ptr %16, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %16, align 4, !tbaa !5
  br label %109, !llvm.loop !16

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

129:                                              ; preds = %142, %128
  %130 = load i32, ptr %17, align 4, !tbaa !5
  %131 = load i32, ptr %3, align 4, !tbaa !5
  %132 = icmp sle i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  store i32 19, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %145

134:                                              ; preds = %129
  %135 = load double, ptr %15, align 8, !tbaa !12
  %136 = load i32, ptr %17, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds double, ptr %36, i64 %137
  %139 = load double, ptr %138, align 8, !tbaa !12
  %140 = fdiv double 1.000000e+00, %139
  %141 = fadd double %135, %140
  store double %141, ptr %15, align 8, !tbaa !12
  br label %142

142:                                              ; preds = %134
  %143 = load i32, ptr %17, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %17, align 4, !tbaa !5
  br label %129, !llvm.loop !17

145:                                              ; preds = %133
  %146 = load double, ptr %14, align 8, !tbaa !12
  %147 = load double, ptr %15, align 8, !tbaa !12
  %148 = fdiv double %146, %147
  store double %148, ptr %14, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %174, %145
  %150 = load i32, ptr %18, align 4, !tbaa !5
  %151 = load i32, ptr %3, align 4, !tbaa !5
  %152 = icmp sle i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 22, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %177

154:                                              ; preds = %149
  %155 = load double, ptr %14, align 8, !tbaa !12
  %156 = load i32, ptr %18, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds double, ptr %36, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !12
  %160 = load i32, ptr %18, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds double, ptr %36, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !12
  %164 = fmul double %159, %163
  %165 = fdiv double %155, %164
  %166 = load i32, ptr %18, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds double, ptr %40, i64 %167
  %169 = load double, ptr %168, align 8, !tbaa !12
  %170 = fsub double %165, %169
  %171 = load i32, ptr %18, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds double, ptr %44, i64 %172
  store double %170, ptr %173, align 8, !tbaa !12
  br label %174

174:                                              ; preds = %154
  %175 = load i32, ptr %18, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %18, align 4, !tbaa !5
  br label %149, !llvm.loop !18

177:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  store double 0.000000e+00, ptr %19, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #9
  store i8 0, ptr %20, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  store i32 1, ptr %21, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %209, %177
  %179 = load i32, ptr %21, align 4, !tbaa !5
  %180 = load i32, ptr %3, align 4, !tbaa !5
  %181 = icmp sle i32 %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  store i32 25, ptr %12, align 4
  br label %212

183:                                              ; preds = %178
  %184 = load i32, ptr %21, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds double, ptr %44, i64 %185
  %187 = load double, ptr %186, align 8, !tbaa !12
  %188 = load i32, ptr %21, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds double, ptr %40, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !12
  %192 = fadd double %187, %191
  %193 = fcmp oge double %192, 0.000000e+00
  br i1 %193, label %194, label %207

194:                                              ; preds = %183
  %195 = load double, ptr %19, align 8, !tbaa !12
  %196 = load i32, ptr %21, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds double, ptr %44, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !12
  %200 = load i32, ptr %21, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds double, ptr %40, i64 %201
  %203 = load double, ptr %202, align 8, !tbaa !12
  %204 = fadd double %199, %203
  %205 = call double @sqrt(double noundef %204) #9
  %206 = fadd double %195, %205
  store double %206, ptr %19, align 8, !tbaa !12
  br label %208

207:                                              ; preds = %183
  store i8 1, ptr %20, align 1, !tbaa !19
  store i32 25, ptr %12, align 4
  br label %212

208:                                              ; preds = %194
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %21, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %21, align 4, !tbaa !5
  br label %178, !llvm.loop !21

212:                                              ; preds = %207, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %213

213:                                              ; preds = %212
  %214 = load i8, ptr %20, align 1, !tbaa !19, !range !22, !noundef !23
  %215 = trunc i8 %214 to i1
  %216 = zext i1 %215 to i32
  %217 = icmp eq i32 %216, 1
  br i1 %217, label %218, label %221

218:                                              ; preds = %213
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %219, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %254

221:                                              ; preds = %213
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %223 = call i32 @_ZSt12setprecisioni(i32 noundef 15)
  %224 = getelementptr inbounds %"struct.std::_Setprecision", ptr %22, i32 0, i32 0
  store i32 %223, ptr %224, align 4
  %225 = getelementptr inbounds %"struct.std::_Setprecision", ptr %22, i32 0, i32 0
  %226 = load i32, ptr %225, align 4
  %227 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %222, i32 %226)
  %228 = load double, ptr %19, align 8, !tbaa !12
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %227, double noundef %228)
  %230 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %229, ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 1, ptr %23, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %249, %221
  %232 = load i32, ptr %23, align 4, !tbaa !5
  %233 = load i32, ptr %3, align 4, !tbaa !5
  %234 = icmp sle i32 %232, %233
  br i1 %234, label %236, label %235

235:                                              ; preds = %231
  store i32 28, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %252

236:                                              ; preds = %231
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %238 = call i32 @_ZSt12setprecisioni(i32 noundef 15)
  %239 = getelementptr inbounds %"struct.std::_Setprecision", ptr %24, i32 0, i32 0
  store i32 %238, ptr %239, align 4
  %240 = getelementptr inbounds %"struct.std::_Setprecision", ptr %24, i32 0, i32 0
  %241 = load i32, ptr %240, align 4
  %242 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %237, i32 %241)
  %243 = load i32, ptr %23, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds double, ptr %44, i64 %244
  %246 = load double, ptr %245, align 8, !tbaa !12
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %242, double noundef %246)
  %248 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %247, ptr noundef @.str.1)
  br label %249

249:                                              ; preds = %236
  %250 = load i32, ptr %23, align 4, !tbaa !5
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %23, align 4, !tbaa !5
  br label %231, !llvm.loop !24

252:                                              ; preds = %235
  %253 = 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 %254

254:                                              ; preds = %252, %218
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %255

255:                                              ; preds = %254, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  %256 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %256)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %26, !llvm.loop !25

257:                                              ; preds = %26
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  %258 = load i32, ptr %1, align 4
  ret i32 %258
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #7

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #5 align 2

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = distinct !{!21, !10}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #11
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr %1, align 4, !tbaa !5
  %.not108 = icmp eq i32 %4, 0
  br i1 %.not108, label %._crit_edge111, label %.lr.ph110

.lr.ph110:                                        ; preds = %0, %.critedge._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #11
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = add nsw i32 %7, 1
  %9 = zext i32 %8 to i64
  %10 = call ptr @llvm.stacksave.p0()
  %11 = alloca double, i64 %9, align 16
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = add nsw i32 %12, 1
  %14 = zext i32 %13 to i64
  %15 = alloca double, i64 %14, align 16
  %16 = alloca double, i64 %14, align 16
  %.not5874 = icmp slt i32 %12, 1
  br i1 %.not5874, label %.critedge.preheader, label %.lr.ph

.preheader72:                                     ; preds = %.lr.ph
  %.not5976 = icmp slt i32 %19, 1
  br i1 %.not5976, label %.critedge.preheader, label %.lr.ph78

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

.preheader71:                                     ; preds = %.lr.ph78
  %.not6079 = icmp slt i32 %24, 1
  br i1 %.not6079, label %.critedge.preheader, label %.lr.ph81.preheader

.lr.ph81.preheader:                               ; preds = %.preheader71
  %21 = add nuw i32 %24, 1
  %wide.trip.count = zext i32 %21 to i64
  br label %.lr.ph81

.lr.ph78:                                         ; preds = %.preheader72, %.lr.ph78
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %.lr.ph78 ], [ 1, %.preheader72 ]
  %22 = getelementptr inbounds double, ptr %15, i64 %indvars.iv118
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %22)
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %.not59.not = icmp slt i64 %indvars.iv118, %25
  br i1 %.not59.not, label %.lr.ph78, label %.preheader71, !llvm.loop !11

26:                                               ; preds = %.lr.ph81
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next122, %wide.trip.count
  br i1 %exitcond.not, label %.critedge.preheader, label %.lr.ph81, !llvm.loop !12

.critedge.preheader:                              ; preds = %26, %.lr.ph110, %.preheader72, %.preheader71
  %27 = phi i32 [ %24, %.preheader71 ], [ %19, %.preheader72 ], [ %12, %.lr.ph110 ], [ %24, %26 ]
  %.not66105 = icmp slt i32 %27, 0
  br i1 %.not66105, label %.critedge._crit_edge, label %.critedge

.lr.ph81:                                         ; preds = %.lr.ph81.preheader, %26
  %indvars.iv121 = phi i64 [ 1, %.lr.ph81.preheader ], [ %indvars.iv.next122, %26 ]
  %28 = getelementptr inbounds double, ptr %15, i64 %indvars.iv121
  %29 = load double, ptr %28, align 8, !tbaa !13
  %30 = fcmp une double %29, 0.000000e+00
  br i1 %30, label %.lr.ph85.preheader, label %26

.lr.ph85.preheader:                               ; preds = %.lr.ph81
  %31 = zext nneg i32 %24 to i64
  %32 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %31, 3
  %33 = icmp ult i64 %32, 3
  br i1 %33, label %.lr.ph90.preheader.unr-lcssa, label %.lr.ph85.preheader.new

.lr.ph85.preheader.new:                           ; preds = %.lr.ph85.preheader
  %unroll_iter = and i64 %31, 2147483644
  br label %.lr.ph85

.critedge:                                        ; preds = %.critedge.preheader, %.critedge
  %.053106 = phi i32 [ %36, %.critedge ], [ 0, %.critedge.preheader ]
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @.str.1)
  %36 = add nuw nsw i32 %.053106, 1
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %.not66.not = icmp slt i32 %.053106, %37
  br i1 %.not66.not, label %.critedge, label %.critedge._crit_edge, !llvm.loop !15

.lr.ph90.preheader.unr-lcssa:                     ; preds = %.lr.ph85, %.lr.ph85.preheader
  %.lcssa163.ph = phi double [ poison, %.lr.ph85.preheader ], [ %64, %.lr.ph85 ]
  %indvars.iv124.unr = phi i64 [ 1, %.lr.ph85.preheader ], [ %indvars.iv.next125.3, %.lr.ph85 ]
  %.05283.unr = phi double [ 0.000000e+00, %.lr.ph85.preheader ], [ %64, %.lr.ph85 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph90.preheader, label %.lr.ph85.epil

.lr.ph85.epil:                                    ; preds = %.lr.ph90.preheader.unr-lcssa, %.lr.ph85.epil
  %indvars.iv124.epil = phi i64 [ %indvars.iv.next125.epil, %.lr.ph85.epil ], [ %indvars.iv124.unr, %.lr.ph90.preheader.unr-lcssa ]
  %.05283.epil = phi double [ %42, %.lr.ph85.epil ], [ %.05283.unr, %.lr.ph90.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph85.epil ], [ 0, %.lr.ph90.preheader.unr-lcssa ]
  %38 = getelementptr inbounds double, ptr %11, i64 %indvars.iv124.epil
  %39 = load double, ptr %38, align 8, !tbaa !13
  %40 = getelementptr inbounds double, ptr %15, i64 %indvars.iv124.epil
  %41 = load double, ptr %40, align 8, !tbaa !13
  %42 = call double @llvm.fmuladd.f64(double %39, double %41, double %.05283.epil)
  %indvars.iv.next125.epil = add nuw nsw i64 %indvars.iv124.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 %.lr.ph90.preheader, label %.lr.ph85.epil, !llvm.loop !16

.lr.ph90.preheader:                               ; preds = %.lr.ph85.epil, %.lr.ph90.preheader.unr-lcssa
  %.lcssa163 = phi double [ %.lcssa163.ph, %.lr.ph90.preheader.unr-lcssa ], [ %42, %.lr.ph85.epil ]
  %smax = call i32 @llvm.smax.i32(i32 %24, i32 1)
  %43 = zext nneg i32 %smax to i64
  %xtraiter167 = and i64 %43, 3
  %44 = icmp slt i32 %24, 4
  br i1 %44, label %.lr.ph95.preheader.unr-lcssa, label %.lr.ph90.preheader.new

.lr.ph90.preheader.new:                           ; preds = %.lr.ph90.preheader
  %unroll_iter171 = and i64 %43, 2147483644
  %invariant.gep = getelementptr inbounds i8, ptr %11, i64 8
  %invariant.gep179 = getelementptr inbounds i8, ptr %11, i64 16
  %invariant.gep181 = getelementptr inbounds i8, ptr %11, i64 24
  br label %.lr.ph90

.lr.ph85:                                         ; preds = %.lr.ph85, %.lr.ph85.preheader.new
  %indvars.iv124 = phi i64 [ 1, %.lr.ph85.preheader.new ], [ %indvars.iv.next125.3, %.lr.ph85 ]
  %.05283 = phi double [ 0.000000e+00, %.lr.ph85.preheader.new ], [ %64, %.lr.ph85 ]
  %niter = phi i64 [ 0, %.lr.ph85.preheader.new ], [ %niter.next.3, %.lr.ph85 ]
  %45 = getelementptr inbounds double, ptr %11, i64 %indvars.iv124
  %46 = load double, ptr %45, align 8, !tbaa !13
  %47 = getelementptr inbounds double, ptr %15, i64 %indvars.iv124
  %48 = load double, ptr %47, align 8, !tbaa !13
  %49 = call double @llvm.fmuladd.f64(double %46, double %48, double %.05283)
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %50 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.next125
  %51 = load double, ptr %50, align 8, !tbaa !13
  %52 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next125
  %53 = load double, ptr %52, align 8, !tbaa !13
  %54 = call double @llvm.fmuladd.f64(double %51, double %53, double %49)
  %indvars.iv.next125.1 = add nuw nsw i64 %indvars.iv124, 2
  %55 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.next125.1
  %56 = load double, ptr %55, align 8, !tbaa !13
  %57 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next125.1
  %58 = load double, ptr %57, align 8, !tbaa !13
  %59 = call double @llvm.fmuladd.f64(double %56, double %58, double %54)
  %indvars.iv.next125.2 = add nuw nsw i64 %indvars.iv124, 3
  %60 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.next125.2
  %61 = load double, ptr %60, align 8, !tbaa !13
  %62 = getelementptr inbounds double, ptr %15, i64 %indvars.iv.next125.2
  %63 = load double, ptr %62, align 8, !tbaa !13
  %64 = call double @llvm.fmuladd.f64(double %61, double %63, double %59)
  %indvars.iv.next125.3 = add nuw nsw i64 %indvars.iv124, 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 %.lr.ph90.preheader.unr-lcssa, label %.lr.ph85, !llvm.loop !18

.lr.ph95.preheader.unr-lcssa:                     ; preds = %.lr.ph90, %.lr.ph90.preheader
  %.lcssa164.ph = phi double [ poison, %.lr.ph90.preheader ], [ %91, %.lr.ph90 ]
  %indvars.iv129.unr = phi i64 [ 1, %.lr.ph90.preheader ], [ %indvars.iv.next130.3, %.lr.ph90 ]
  %.05188.unr = phi double [ 0.000000e+00, %.lr.ph90.preheader ], [ %91, %.lr.ph90 ]
  %lcmp.mod169.not = icmp eq i64 %xtraiter167, 0
  br i1 %lcmp.mod169.not, label %.lr.ph95.preheader, label %.lr.ph90.epil

.lr.ph90.epil:                                    ; preds = %.lr.ph95.preheader.unr-lcssa, %.lr.ph90.epil
  %indvars.iv129.epil = phi i64 [ %indvars.iv.next130.epil, %.lr.ph90.epil ], [ %indvars.iv129.unr, %.lr.ph95.preheader.unr-lcssa ]
  %.05188.epil = phi double [ %68, %.lr.ph90.epil ], [ %.05188.unr, %.lr.ph95.preheader.unr-lcssa ]
  %epil.iter168 = phi i64 [ %epil.iter168.next, %.lr.ph90.epil ], [ 0, %.lr.ph95.preheader.unr-lcssa ]
  %65 = getelementptr inbounds double, ptr %11, i64 %indvars.iv129.epil
  %66 = load double, ptr %65, align 8, !tbaa !13
  %67 = fdiv double 1.000000e+00, %66
  %68 = fadd double %.05188.epil, %67
  %indvars.iv.next130.epil = add nuw nsw i64 %indvars.iv129.epil, 1
  %epil.iter168.next = add i64 %epil.iter168, 1
  %epil.iter168.cmp.not = icmp eq i64 %epil.iter168.next, %xtraiter167
  br i1 %epil.iter168.cmp.not, label %.lr.ph95.preheader, label %.lr.ph90.epil, !llvm.loop !19

.lr.ph95.preheader:                               ; preds = %.lr.ph90.epil, %.lr.ph95.preheader.unr-lcssa
  %.lcssa164 = phi double [ %.lcssa164.ph, %.lr.ph95.preheader.unr-lcssa ], [ %68, %.lr.ph90.epil ]
  %69 = fdiv double %.lcssa163, %.lcssa164
  %smax137 = call i32 @llvm.smax.i32(i32 %24, i32 1)
  %70 = add nuw i32 %smax137, 1
  %wide.trip.count138 = zext i32 %70 to i64
  %71 = zext nneg i32 %smax to i64
  %min.iters.check = icmp eq i32 %24, 1
  br i1 %min.iters.check, label %.lr.ph95.preheader161, label %vector.ph

.lr.ph95.preheader161:                            ; preds = %middle.block, %.lr.ph95.preheader
  %indvars.iv134.ph = phi i64 [ 1, %.lr.ph95.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph95

vector.ph:                                        ; preds = %.lr.ph95.preheader
  %n.vec = and i64 %71, 2147483646
  %ind.end = or i64 %71, 1
  %broadcast.splatinsert = insertelement <2 x double> poison, double %69, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %72 = getelementptr inbounds double, ptr %11, i64 %offset.idx
  %wide.load = load <2 x double>, ptr %72, align 8, !tbaa !13
  %73 = fmul <2 x double> %wide.load, %wide.load
  %74 = fdiv <2 x double> %broadcast.splat, %73
  %75 = getelementptr inbounds double, ptr %15, i64 %offset.idx
  %wide.load158 = load <2 x double>, ptr %75, align 8, !tbaa !13
  %76 = fsub <2 x double> %74, %wide.load158
  %77 = getelementptr inbounds double, ptr %16, i64 %offset.idx
  store <2 x double> %76, ptr %77, align 8, !tbaa !13
  %index.next = add nuw i64 %index, 2
  %78 = icmp eq i64 %index.next, %n.vec
  br i1 %78, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %71
  br i1 %cmp.n, label %.lr.ph99.preheader, label %.lr.ph95.preheader161

.lr.ph90:                                         ; preds = %.lr.ph90, %.lr.ph90.preheader.new
  %indvars.iv129 = phi i64 [ 1, %.lr.ph90.preheader.new ], [ %indvars.iv.next130.3, %.lr.ph90 ]
  %.05188 = phi double [ 0.000000e+00, %.lr.ph90.preheader.new ], [ %91, %.lr.ph90 ]
  %niter172 = phi i64 [ 0, %.lr.ph90.preheader.new ], [ %niter172.next.3, %.lr.ph90 ]
  %79 = getelementptr inbounds double, ptr %11, i64 %indvars.iv129
  %80 = load double, ptr %79, align 8, !tbaa !13
  %81 = fdiv double 1.000000e+00, %80
  %82 = fadd double %.05188, %81
  %gep = getelementptr inbounds double, ptr %invariant.gep, i64 %indvars.iv129
  %83 = load double, ptr %gep, align 8, !tbaa !13
  %84 = fdiv double 1.000000e+00, %83
  %85 = fadd double %82, %84
  %gep180 = getelementptr inbounds double, ptr %invariant.gep179, i64 %indvars.iv129
  %86 = load double, ptr %gep180, align 8, !tbaa !13
  %87 = fdiv double 1.000000e+00, %86
  %88 = fadd double %85, %87
  %gep182 = getelementptr inbounds double, ptr %invariant.gep181, i64 %indvars.iv129
  %89 = load double, ptr %gep182, align 8, !tbaa !13
  %90 = fdiv double 1.000000e+00, %89
  %91 = fadd double %88, %90
  %indvars.iv.next130.3 = add nuw nsw i64 %indvars.iv129, 4
  %niter172.next.3 = add i64 %niter172, 4
  %niter172.ncmp.3 = icmp eq i64 %niter172.next.3, %unroll_iter171
  br i1 %niter172.ncmp.3, label %.lr.ph95.preheader.unr-lcssa, label %.lr.ph90, !llvm.loop !23

.lr.ph95:                                         ; preds = %.lr.ph95.preheader161, %.lr.ph95
  %indvars.iv134 = phi i64 [ %indvars.iv.next135, %.lr.ph95 ], [ %indvars.iv134.ph, %.lr.ph95.preheader161 ]
  %92 = getelementptr inbounds double, ptr %11, i64 %indvars.iv134
  %93 = load double, ptr %92, align 8, !tbaa !13
  %94 = fmul double %93, %93
  %95 = fdiv double %69, %94
  %96 = getelementptr inbounds double, ptr %15, i64 %indvars.iv134
  %97 = load double, ptr %96, align 8, !tbaa !13
  %98 = fsub double %95, %97
  %99 = getelementptr inbounds double, ptr %16, i64 %indvars.iv134
  store double %98, ptr %99, align 8, !tbaa !13
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next135, %wide.trip.count138
  br i1 %exitcond139.not, label %.lr.ph99.preheader, label %.lr.ph95, !llvm.loop !24

.lr.ph99.preheader:                               ; preds = %.lr.ph95, %middle.block
  br label %.lr.ph99

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %106
  %indvars.iv140 = phi i64 [ %indvars.iv.next141, %106 ], [ 1, %.lr.ph99.preheader ]
  %.04797 = phi double [ %108, %106 ], [ 0.000000e+00, %.lr.ph99.preheader ]
  %100 = getelementptr inbounds double, ptr %16, i64 %indvars.iv140
  %101 = load double, ptr %100, align 8, !tbaa !13
  %102 = getelementptr inbounds double, ptr %15, i64 %indvars.iv140
  %103 = load double, ptr %102, align 8, !tbaa !13
  %104 = fadd double %101, %103
  %105 = fcmp ult double %104, 0.000000e+00
  br i1 %105, label %111, label %106

106:                                              ; preds = %.lr.ph99
  %107 = call double @sqrt(double noundef %104) #11
  %108 = fadd double %.04797, %107
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %.not64.not.not = icmp slt i64 %indvars.iv140, %110
  br i1 %.not64.not.not, label %.lr.ph99, label %.critedge68, !llvm.loop !25

111:                                              ; preds = %.lr.ph99
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %.critedge._crit_edge

.critedge68:                                      ; preds = %106
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %114 = call i32 @_ZSt12setprecisioni(i32 noundef 15)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %113, i32 %114)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %115, double noundef %108)
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull @.str.1)
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %.not65101 = icmp slt i32 %118, 1
  br i1 %.not65101, label %.critedge._crit_edge, label %.lr.ph103

.lr.ph103:                                        ; preds = %.critedge68, %.lr.ph103
  %indvars.iv143 = phi i64 [ %indvars.iv.next144, %.lr.ph103 ], [ 1, %.critedge68 ]
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %120 = call i32 @_ZSt12setprecisioni(i32 noundef 15)
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %119, i32 %120)
  %122 = getelementptr inbounds double, ptr %16, i64 %indvars.iv143
  %123 = load double, ptr %122, align 8, !tbaa !13
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %121, double noundef %123)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull @.str.1)
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %.not65.not = icmp slt i64 %indvars.iv143, %127
  br i1 %.not65.not, label %.lr.ph103, label %.critedge._crit_edge, !llvm.loop !26

.critedge._crit_edge:                             ; preds = %.lr.ph103, %.critedge, %.critedge68, %.critedge.preheader, %111
  %.sink = phi ptr [ %112, %111 ], [ @_ZSt4cout, %.critedge.preheader ], [ @_ZSt4cout, %.critedge68 ], [ @_ZSt4cout, %.critedge ], [ @_ZSt4cout, %.lr.ph103 ]
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.stackrestore.p0(ptr %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #11
  %129 = load i32, ptr %1, align 4, !tbaa !5
  %130 = add nsw i32 %129, -1
  store i32 %130, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %129, 0
  br i1 %.not, label %._crit_edge111, label %.lr.ph110, !llvm.loop !27

._crit_edge111:                                   ; preds = %.critedge._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #11
  ret i32 0
}

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #8

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

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

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

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

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

; 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 i32 @llvm.smax.i32(i32, i32) #10

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 #9 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { 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 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !10, !21, !22}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = !{!"llvm.loop.unroll.runtime.disable"}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10, !22, !21}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}


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