; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/333 Division 2/Problem E (test)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ps = external dso_local global [250000 x i32], align 16
@dp = external dso_local global [250000 x x86_fp80], align 16
@ndp = external dso_local global [250000 x x86_fp80], align 16
@sum = external dso_local global [250000 x x86_fp80], align 16
@pen = external dso_local global i32, align 4
@ans = external dso_local global x86_fp80, align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 x86_fp80, align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %16 = load i32, ptr @m, align 4, !tbaa !5
  %17 = icmp eq i32 %16, 1
  br i1 %17, label %18, label %21

18:                                               ; preds = %0
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef 1.000000e+00)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %225

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

22:                                               ; preds = %38, %21
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp sle i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %41

27:                                               ; preds = %22
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [250000 x i32], ptr @ps, i64 0, i64 %29
  %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) %30)
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [250000 x i32], ptr @ps, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = load i32, ptr @pen, align 4, !tbaa !5
  %37 = add nsw i32 %36, %35
  store i32 %37, ptr @pen, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %27
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !9

41:                                               ; preds = %26
  store x86_fp80 0xK3FFF8000000000000000, ptr @dp, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %178, %41
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = icmp sle i32 %43, %44
  br i1 %45, label %47, label %46

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

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

48:                                               ; preds = %59, %47
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = load i32, ptr @m, align 4, !tbaa !5
  %52 = mul nsw i32 %50, %51
  %53 = icmp sle i32 %49, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %48
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %62

55:                                               ; preds = %48
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %57
  store x86_fp80 0xK00000000000000000000, ptr %58, align 16, !tbaa !11
  br label %59

59:                                               ; preds = %55
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !13

62:                                               ; preds = %54
  store x86_fp80 0xK00000000000000000000, ptr @sum, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %85, %62
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = load i32, ptr %3, align 4, !tbaa !5
  %66 = load i32, ptr @m, align 4, !tbaa !5
  %67 = mul nsw i32 %65, %66
  %68 = icmp sle i32 %64, %67
  br i1 %68, label %70, label %69

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

70:                                               ; preds = %63
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %73
  %75 = load x86_fp80, ptr %74, align 16, !tbaa !11
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sub nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %78
  %80 = load x86_fp80, ptr %79, align 16, !tbaa !11
  %81 = fadd x86_fp80 %75, %80
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %83
  store x86_fp80 %81, ptr %84, align 16, !tbaa !11
  br label %85

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

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

89:                                               ; preds = %155, %88
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = load i32, ptr @m, align 4, !tbaa !5
  %93 = mul nsw i32 %91, %92
  %94 = icmp sle i32 %90, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %89
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %158

96:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %97 = load i32, ptr %7, align 4, !tbaa !5
  %98 = load i32, ptr @m, align 4, !tbaa !5
  %99 = sub nsw i32 %97, %98
  store i32 %99, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = sub nsw i32 %100, 1
  store i32 %101, ptr %9, align 4, !tbaa !5
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = icmp slt i32 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %96
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %104, %96
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = icmp slt i32 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %105
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %108, %105
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %112
  %114 = load x86_fp80, ptr %113, align 16, !tbaa !11
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %116
  %118 = load x86_fp80, ptr %117, align 16, !tbaa !11
  %119 = fsub x86_fp80 %114, %118
  store x86_fp80 %119, ptr %10, align 16, !tbaa !11
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = load i32, ptr %3, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [250000 x i32], ptr @ps, i64 0, i64 %122
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = sub nsw i32 %120, %124
  %126 = icmp sge i32 %125, 0
  br i1 %126, label %127, label %150

127:                                              ; preds = %109
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = load i32, ptr %3, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [250000 x i32], ptr @ps, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sub nsw i32 %128, %132
  %134 = load i32, ptr %3, align 4, !tbaa !5
  %135 = load i32, ptr @m, align 4, !tbaa !5
  %136 = mul nsw i32 %134, %135
  %137 = icmp sle i32 %133, %136
  br i1 %137, label %138, label %150

138:                                              ; preds = %127
  %139 = load i32, ptr %7, align 4, !tbaa !5
  %140 = load i32, ptr %3, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [250000 x i32], ptr @ps, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sub nsw i32 %139, %143
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %145
  %147 = load x86_fp80, ptr %146, align 16, !tbaa !11
  %148 = load x86_fp80, ptr %10, align 16, !tbaa !11
  %149 = fsub x86_fp80 %148, %147
  store x86_fp80 %149, ptr %10, align 16, !tbaa !11
  br label %150

150:                                              ; preds = %138, %127, %109
  %151 = load x86_fp80, ptr %10, align 16, !tbaa !11
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %153
  store x86_fp80 %151, ptr %154, align 16, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %155

155:                                              ; preds = %150
  %156 = load i32, ptr %7, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %7, align 4, !tbaa !5
  br label %89, !llvm.loop !15

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

159:                                              ; preds = %174, %158
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = load i32, ptr %3, align 4, !tbaa !5
  %162 = load i32, ptr @m, align 4, !tbaa !5
  %163 = mul nsw i32 %161, %162
  %164 = icmp sle i32 %160, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %159
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %177

166:                                              ; preds = %159
  %167 = load i32, ptr %11, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %168
  %170 = load x86_fp80, ptr %169, align 16, !tbaa !11
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %172
  store x86_fp80 %170, ptr %173, align 16, !tbaa !11
  br label %174

174:                                              ; preds = %166
  %175 = load i32, ptr %11, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %11, align 4, !tbaa !5
  br label %159, !llvm.loop !16

177:                                              ; preds = %165
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %3, align 4, !tbaa !5
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %3, align 4, !tbaa !5
  br label %42, !llvm.loop !17

181:                                              ; preds = %46
  %182 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !18
  %183 = getelementptr i8, ptr %182, i64 -24
  %184 = load i64, ptr %183, align 8
  %185 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %184
  %186 = call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %185, i64 noundef 12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %187

187:                                              ; preds = %199, %181
  %188 = load i32, ptr %12, align 4, !tbaa !5
  %189 = load i32, ptr @pen, align 4, !tbaa !5
  %190 = icmp slt i32 %188, %189
  br i1 %190, label %192, label %191

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

192:                                              ; preds = %187
  %193 = load i32, ptr %12, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %194
  %196 = load x86_fp80, ptr %195, align 16, !tbaa !11
  %197 = load x86_fp80, ptr @ans, align 16, !tbaa !11
  %198 = fadd x86_fp80 %197, %196
  store x86_fp80 %198, ptr @ans, align 16, !tbaa !11
  br label %199

199:                                              ; preds = %192
  %200 = load i32, ptr %12, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %12, align 4, !tbaa !5
  br label %187, !llvm.loop !20

202:                                              ; preds = %191
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %204 = load x86_fp80, ptr @ans, align 16, !tbaa !11
  %205 = fadd x86_fp80 %204, 0xK3FFF8000000000000000
  %206 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %203, x86_fp80 noundef %205)
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %206, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %208 = load i32, ptr @m, align 4, !tbaa !5
  %209 = sub nsw i32 %208, 1
  %210 = load i32, ptr @n, align 4, !tbaa !5
  %211 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %209, i32 noundef %210)
  %212 = fpext double %211 to x86_fp80
  %213 = load x86_fp80, ptr @ans, align 16, !tbaa !11
  %214 = fdiv x86_fp80 %213, %212
  store x86_fp80 %214, ptr @ans, align 16, !tbaa !11
  %215 = load i32, ptr @m, align 4, !tbaa !5
  %216 = sub nsw i32 %215, 1
  %217 = sitofp i32 %216 to x86_fp80
  %218 = load x86_fp80, ptr @ans, align 16, !tbaa !11
  %219 = fmul x86_fp80 %218, %217
  store x86_fp80 %219, ptr @ans, align 16, !tbaa !11
  %220 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %221 = load x86_fp80, ptr @ans, align 16, !tbaa !11
  %222 = fadd x86_fp80 %221, 0xK3FFF8000000000000000
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %220, x86_fp80 noundef %222)
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %223, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %225

225:                                              ; preds = %202, %18
  %226 = load i32, ptr %1, align 4
  ret i32 %226
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) #6

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

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

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


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

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ps = external dso_local global [250000 x i32], align 16
@dp = external dso_local local_unnamed_addr global [250000 x x86_fp80], align 16
@ndp = external dso_local local_unnamed_addr global [250000 x x86_fp80], align 16
@sum = external dso_local local_unnamed_addr global [250000 x x86_fp80], align 16
@pen = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local local_unnamed_addr global x86_fp80, align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %3 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %4 = load i32, ptr @m, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 1
  br i1 %5, label %7, label %.preheader62

.preheader62:                                     ; preds = %0
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not65 = icmp slt i32 %6, 1
  br i1 %.not65, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %.preheader62
  store x86_fp80 0xK3FFF8000000000000000, ptr @dp, align 16, !tbaa !9
  br label %._crit_edge86

7:                                                ; preds = %0
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef 1.000000e+00)
  br label %130

._crit_edge:                                      ; preds = %.lr.ph
  store x86_fp80 0xK3FFF8000000000000000, ptr @dp, align 16, !tbaa !9
  %.not5484 = icmp slt i32 %18, 1
  br i1 %.not5484, label %._crit_edge86, label %.preheader61.lr.ph

.preheader61.lr.ph:                               ; preds = %._crit_edge
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %10 = add i32 %9, 1
  %11 = sext i32 %9 to i64
  %12 = add nuw i32 %18, 1
  %wide.trip.count116 = zext i32 %12 to i64
  %.not5673 = icmp eq i32 %9, 0
  br label %.preheader61

.lr.ph:                                           ; preds = %.preheader62, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader62 ]
  %13 = getelementptr inbounds [250000 x i32], ptr @ps, i64 0, i64 %indvars.iv
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %15 = load i32, ptr %13, align 4, !tbaa !5
  %16 = load i32, ptr @pen, align 4, !tbaa !5
  %17 = add nsw i32 %16, %15
  store i32 %17, ptr @pen, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %.not.not = icmp slt i64 %indvars.iv, %19
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader61:                                     ; preds = %.preheader61.lr.ph, %._crit_edge83
  %indvars.iv113 = phi i64 [ 1, %.preheader61.lr.ph ], [ %indvars.iv.next114, %._crit_edge83 ]
  %indvars.iv96 = phi i32 [ %10, %.preheader61.lr.ph ], [ %indvars.iv.next97, %._crit_edge83 ]
  %20 = zext i32 %indvars.iv96 to i64
  %21 = add nsw i64 %20, -1
  %22 = zext i32 %indvars.iv96 to i64
  %23 = add nsw i64 %22, -1
  %24 = zext i32 %indvars.iv96 to i64
  %25 = mul nsw i64 %indvars.iv113, %11
  %.not5567 = icmp slt i64 %25, 0
  br i1 %.not5567, label %.preheader.thread, label %.lr.ph69.preheader

.preheader.thread:                                ; preds = %.preheader61
  store x86_fp80 0xK00000000000000000000, ptr @sum, align 16, !tbaa !9
  br label %._crit_edge83

.lr.ph69.preheader:                               ; preds = %.preheader61
  %26 = add nsw i64 %24, -1
  %xtraiter = and i64 %24, 3
  %27 = icmp ult i64 %26, 3
  br i1 %27, label %._crit_edge70.unr-lcssa, label %.lr.ph69.preheader.new

.lr.ph69.preheader.new:                           ; preds = %.lr.ph69.preheader
  %unroll_iter = and i64 %24, 4294967292
  br label %.lr.ph69

._crit_edge86:                                    ; preds = %._crit_edge83, %._crit_edge.thread, %._crit_edge
  %28 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !13
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %30
  %32 = tail call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %31, i64 noundef 12)
  %33 = load i32, ptr @pen, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph89.preheader, label %96

.lr.ph89.preheader:                               ; preds = %._crit_edge86
  %ans.promoted = load x86_fp80, ptr @ans, align 16, !tbaa !9
  %wide.trip.count121 = zext nneg i32 %33 to i64
  %xtraiter141 = and i64 %wide.trip.count121, 3
  %35 = icmp ult i32 %33, 4
  br i1 %35, label %._crit_edge90.unr-lcssa, label %.lr.ph89.preheader.new

.lr.ph89.preheader.new:                           ; preds = %.lr.ph89.preheader
  %unroll_iter146 = and i64 %wide.trip.count121, 2147483644
  br label %.lr.ph89

._crit_edge70.unr-lcssa:                          ; preds = %.lr.ph69, %.lr.ph69.preheader
  %indvars.iv93.unr = phi i64 [ 0, %.lr.ph69.preheader ], [ %indvars.iv.next94.3, %.lr.ph69 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge70, label %.lr.ph69.epil

.lr.ph69.epil:                                    ; preds = %._crit_edge70.unr-lcssa, %.lr.ph69.epil
  %indvars.iv93.epil = phi i64 [ %indvars.iv.next94.epil, %.lr.ph69.epil ], [ %indvars.iv93.unr, %._crit_edge70.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph69.epil ], [ 0, %._crit_edge70.unr-lcssa ]
  %36 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv93.epil
  store x86_fp80 0xK00000000000000000000, ptr %36, align 16, !tbaa !9
  %indvars.iv.next94.epil = add nuw nsw i64 %indvars.iv93.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 %._crit_edge70, label %.lr.ph69.epil, !llvm.loop !15

._crit_edge70:                                    ; preds = %.lr.ph69.epil, %._crit_edge70.unr-lcssa
  store x86_fp80 0xK00000000000000000000, ptr @sum, align 16, !tbaa !9
  br i1 %.not5673, label %.preheader, label %.lr.ph76.preheader

.lr.ph76.preheader:                               ; preds = %._crit_edge70
  %xtraiter131 = and i64 %23, 1
  %37 = icmp eq i32 %indvars.iv96, 2
  br i1 %37, label %.preheader60.unr-lcssa, label %.lr.ph76.preheader.new

.lr.ph76.preheader.new:                           ; preds = %.lr.ph76.preheader
  %unroll_iter134 = and i64 %23, -2
  br label %.lr.ph76

.lr.ph69:                                         ; preds = %.lr.ph69, %.lr.ph69.preheader.new
  %indvars.iv93 = phi i64 [ 0, %.lr.ph69.preheader.new ], [ %indvars.iv.next94.3, %.lr.ph69 ]
  %niter = phi i64 [ 0, %.lr.ph69.preheader.new ], [ %niter.next.3, %.lr.ph69 ]
  %38 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv93
  store x86_fp80 0xK00000000000000000000, ptr %38, align 16, !tbaa !9
  %indvars.iv.next94 = or disjoint i64 %indvars.iv93, 1
  %39 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv.next94
  store x86_fp80 0xK00000000000000000000, ptr %39, align 16, !tbaa !9
  %indvars.iv.next94.1 = or disjoint i64 %indvars.iv93, 2
  %40 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv.next94.1
  store x86_fp80 0xK00000000000000000000, ptr %40, align 16, !tbaa !9
  %indvars.iv.next94.2 = or disjoint i64 %indvars.iv93, 3
  %41 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv.next94.2
  store x86_fp80 0xK00000000000000000000, ptr %41, align 16, !tbaa !9
  %indvars.iv.next94.3 = add nuw nsw i64 %indvars.iv93, 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 %._crit_edge70.unr-lcssa, label %.lr.ph69, !llvm.loop !17

.preheader60.unr-lcssa:                           ; preds = %.lr.ph76, %.lr.ph76.preheader
  %.unr = phi x86_fp80 [ 0xK00000000000000000000, %.lr.ph76.preheader ], [ %58, %.lr.ph76 ]
  %indvars.iv98.unr = phi i64 [ 1, %.lr.ph76.preheader ], [ %indvars.iv.next99.1, %.lr.ph76 ]
  %lcmp.mod133.not = icmp eq i64 %xtraiter131, 0
  br i1 %lcmp.mod133.not, label %.preheader60, label %.lr.ph76.epil

.lr.ph76.epil:                                    ; preds = %.preheader60.unr-lcssa
  %42 = add nsw i64 %indvars.iv98.unr, -1
  %43 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %42
  %44 = load x86_fp80, ptr %43, align 16, !tbaa !9
  %45 = fadd x86_fp80 %.unr, %44
  %46 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %indvars.iv98.unr
  store x86_fp80 %45, ptr %46, align 16, !tbaa !9
  br label %.preheader60

.preheader60:                                     ; preds = %.preheader60.unr-lcssa, %.lr.ph76.epil
  br i1 %.not5673, label %.preheader, label %.lr.ph79

.lr.ph79:                                         ; preds = %.preheader60
  %47 = getelementptr inbounds [250000 x i32], ptr @ps, i64 0, i64 %indvars.iv113
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %wide.trip.count106 = zext i32 %indvars.iv96 to i64
  br label %61

.lr.ph76:                                         ; preds = %.lr.ph76, %.lr.ph76.preheader.new
  %50 = phi x86_fp80 [ 0xK00000000000000000000, %.lr.ph76.preheader.new ], [ %58, %.lr.ph76 ]
  %indvars.iv98 = phi i64 [ 1, %.lr.ph76.preheader.new ], [ %indvars.iv.next99.1, %.lr.ph76 ]
  %niter135 = phi i64 [ 0, %.lr.ph76.preheader.new ], [ %niter135.next.1, %.lr.ph76 ]
  %51 = add nsw i64 %indvars.iv98, -1
  %52 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %51
  %53 = load x86_fp80, ptr %52, align 16, !tbaa !9
  %54 = fadd x86_fp80 %50, %53
  %55 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %indvars.iv98
  store x86_fp80 %54, ptr %55, align 16, !tbaa !9
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %56 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv98
  %57 = load x86_fp80, ptr %56, align 16, !tbaa !9
  %58 = fadd x86_fp80 %54, %57
  %59 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %indvars.iv.next99
  store x86_fp80 %58, ptr %59, align 16, !tbaa !9
  %indvars.iv.next99.1 = add nuw nsw i64 %indvars.iv98, 2
  %niter135.next.1 = add i64 %niter135, 2
  %niter135.ncmp.1 = icmp eq i64 %niter135.next.1, %unroll_iter134
  br i1 %niter135.ncmp.1, label %.preheader60.unr-lcssa, label %.lr.ph76, !llvm.loop !18

.preheader:                                       ; preds = %75, %._crit_edge70, %.preheader60
  br i1 %.not5567, label %._crit_edge83, label %.lr.ph82.preheader

.lr.ph82.preheader:                               ; preds = %.preheader
  %xtraiter136 = and i64 %20, 3
  %60 = icmp ult i64 %21, 3
  br i1 %60, label %._crit_edge83.loopexit.unr-lcssa, label %.lr.ph82.preheader.new

.lr.ph82.preheader.new:                           ; preds = %.lr.ph82.preheader
  %unroll_iter139 = and i64 %20, 4294967292
  br label %.lr.ph82

61:                                               ; preds = %.lr.ph79, %75
  %indvars.iv103 = phi i64 [ 1, %.lr.ph79 ], [ %indvars.iv.next104, %75 ]
  %62 = trunc i64 %indvars.iv103 to i32
  %63 = sub i32 %62, %9
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %63, i32 0)
  %64 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %indvars.iv103
  %65 = load x86_fp80, ptr %64, align 16, !tbaa !9
  %66 = zext nneg i32 %spec.store.select to i64
  %67 = getelementptr inbounds [250000 x x86_fp80], ptr @sum, i64 0, i64 %66
  %68 = load x86_fp80, ptr %67, align 16, !tbaa !9
  %69 = fsub x86_fp80 %65, %68
  %70 = sub nsw i64 %indvars.iv103, %49
  %or.cond = icmp ugt i64 %70, %25
  br i1 %or.cond, label %75, label %71

71:                                               ; preds = %61
  %72 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %70
  %73 = load x86_fp80, ptr %72, align 16, !tbaa !9
  %74 = fsub x86_fp80 %69, %73
  br label %75

75:                                               ; preds = %71, %61
  %.045 = phi x86_fp80 [ %74, %71 ], [ %69, %61 ]
  %76 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv103
  store x86_fp80 %.045, ptr %76, align 16, !tbaa !9
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond107.not = icmp eq i64 %indvars.iv.next104, %wide.trip.count106
  br i1 %exitcond107.not, label %.preheader, label %61, !llvm.loop !19

._crit_edge83.loopexit.unr-lcssa:                 ; preds = %.lr.ph82, %.lr.ph82.preheader
  %indvars.iv108.unr = phi i64 [ 0, %.lr.ph82.preheader ], [ %indvars.iv.next109.3, %.lr.ph82 ]
  %lcmp.mod138.not = icmp eq i64 %xtraiter136, 0
  br i1 %lcmp.mod138.not, label %._crit_edge83, label %.lr.ph82.epil

.lr.ph82.epil:                                    ; preds = %._crit_edge83.loopexit.unr-lcssa, %.lr.ph82.epil
  %indvars.iv108.epil = phi i64 [ %indvars.iv.next109.epil, %.lr.ph82.epil ], [ %indvars.iv108.unr, %._crit_edge83.loopexit.unr-lcssa ]
  %epil.iter137 = phi i64 [ %epil.iter137.next, %.lr.ph82.epil ], [ 0, %._crit_edge83.loopexit.unr-lcssa ]
  %77 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv108.epil
  %78 = load x86_fp80, ptr %77, align 16, !tbaa !9
  %79 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv108.epil
  store x86_fp80 %78, ptr %79, align 16, !tbaa !9
  %indvars.iv.next109.epil = add nuw nsw i64 %indvars.iv108.epil, 1
  %epil.iter137.next = add i64 %epil.iter137, 1
  %epil.iter137.cmp.not = icmp eq i64 %epil.iter137.next, %xtraiter136
  br i1 %epil.iter137.cmp.not, label %._crit_edge83, label %.lr.ph82.epil, !llvm.loop !20

._crit_edge83:                                    ; preds = %._crit_edge83.loopexit.unr-lcssa, %.lr.ph82.epil, %.preheader.thread, %.preheader
  %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1
  %indvars.iv.next97 = add i32 %indvars.iv96, %9
  %exitcond117.not = icmp eq i64 %indvars.iv.next114, %wide.trip.count116
  br i1 %exitcond117.not, label %._crit_edge86, label %.preheader61, !llvm.loop !21

.lr.ph82:                                         ; preds = %.lr.ph82, %.lr.ph82.preheader.new
  %indvars.iv108 = phi i64 [ 0, %.lr.ph82.preheader.new ], [ %indvars.iv.next109.3, %.lr.ph82 ]
  %niter140 = phi i64 [ 0, %.lr.ph82.preheader.new ], [ %niter140.next.3, %.lr.ph82 ]
  %80 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv108
  %81 = load x86_fp80, ptr %80, align 16, !tbaa !9
  %82 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv108
  store x86_fp80 %81, ptr %82, align 16, !tbaa !9
  %indvars.iv.next109 = or disjoint i64 %indvars.iv108, 1
  %83 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv.next109
  %84 = load x86_fp80, ptr %83, align 16, !tbaa !9
  %85 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv.next109
  store x86_fp80 %84, ptr %85, align 16, !tbaa !9
  %indvars.iv.next109.1 = or disjoint i64 %indvars.iv108, 2
  %86 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv.next109.1
  %87 = load x86_fp80, ptr %86, align 16, !tbaa !9
  %88 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv.next109.1
  store x86_fp80 %87, ptr %88, align 16, !tbaa !9
  %indvars.iv.next109.2 = or disjoint i64 %indvars.iv108, 3
  %89 = getelementptr inbounds [250000 x x86_fp80], ptr @ndp, i64 0, i64 %indvars.iv.next109.2
  %90 = load x86_fp80, ptr %89, align 16, !tbaa !9
  %91 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv.next109.2
  store x86_fp80 %90, ptr %91, align 16, !tbaa !9
  %indvars.iv.next109.3 = add nuw nsw i64 %indvars.iv108, 4
  %niter140.next.3 = add i64 %niter140, 4
  %niter140.ncmp.3 = icmp eq i64 %niter140.next.3, %unroll_iter139
  br i1 %niter140.ncmp.3, label %._crit_edge83.loopexit.unr-lcssa, label %.lr.ph82, !llvm.loop !22

._crit_edge90.unr-lcssa:                          ; preds = %.lr.ph89, %.lr.ph89.preheader
  %.lcssa.ph = phi x86_fp80 [ poison, %.lr.ph89.preheader ], [ %129, %.lr.ph89 ]
  %indvars.iv118.unr = phi i64 [ 0, %.lr.ph89.preheader ], [ %indvars.iv.next119.3, %.lr.ph89 ]
  %.unr143 = phi x86_fp80 [ %ans.promoted, %.lr.ph89.preheader ], [ %129, %.lr.ph89 ]
  %lcmp.mod144.not = icmp eq i64 %xtraiter141, 0
  br i1 %lcmp.mod144.not, label %._crit_edge90, label %.lr.ph89.epil

.lr.ph89.epil:                                    ; preds = %._crit_edge90.unr-lcssa, %.lr.ph89.epil
  %indvars.iv118.epil = phi i64 [ %indvars.iv.next119.epil, %.lr.ph89.epil ], [ %indvars.iv118.unr, %._crit_edge90.unr-lcssa ]
  %92 = phi x86_fp80 [ %95, %.lr.ph89.epil ], [ %.unr143, %._crit_edge90.unr-lcssa ]
  %epil.iter142 = phi i64 [ %epil.iter142.next, %.lr.ph89.epil ], [ 0, %._crit_edge90.unr-lcssa ]
  %93 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv118.epil
  %94 = load x86_fp80, ptr %93, align 16, !tbaa !9
  %95 = fadd x86_fp80 %94, %92
  %indvars.iv.next119.epil = add nuw nsw i64 %indvars.iv118.epil, 1
  %epil.iter142.next = add i64 %epil.iter142, 1
  %epil.iter142.cmp.not = icmp eq i64 %epil.iter142.next, %xtraiter141
  br i1 %epil.iter142.cmp.not, label %._crit_edge90, label %.lr.ph89.epil, !llvm.loop !23

._crit_edge90:                                    ; preds = %.lr.ph89.epil, %._crit_edge90.unr-lcssa
  %.lcssa = phi x86_fp80 [ %.lcssa.ph, %._crit_edge90.unr-lcssa ], [ %95, %.lr.ph89.epil ]
  store x86_fp80 %.lcssa, ptr @ans, align 16, !tbaa !9
  br label %96

96:                                               ; preds = %._crit_edge90, %._crit_edge86
  %97 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %98 = load x86_fp80, ptr @ans, align 16, !tbaa !9
  %99 = fadd x86_fp80 %98, 0xK3FFF8000000000000000
  %100 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %97, x86_fp80 noundef %99)
  %101 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %102 = load i32, ptr @m, align 4, !tbaa !5
  %103 = add nsw i32 %102, -1
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = tail call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef %103, i32 noundef %104)
  %106 = fpext double %105 to x86_fp80
  %107 = load x86_fp80, ptr @ans, align 16, !tbaa !9
  %108 = fdiv x86_fp80 %107, %106
  %109 = load i32, ptr @m, align 4, !tbaa !5
  %110 = add nsw i32 %109, -1
  %111 = sitofp i32 %110 to x86_fp80
  %112 = fmul x86_fp80 %108, %111
  store x86_fp80 %112, ptr @ans, align 16, !tbaa !9
  %113 = tail 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 = load x86_fp80, ptr @ans, align 16, !tbaa !9
  %115 = fadd x86_fp80 %114, 0xK3FFF8000000000000000
  %116 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %113, x86_fp80 noundef %115)
  br label %130

.lr.ph89:                                         ; preds = %.lr.ph89, %.lr.ph89.preheader.new
  %indvars.iv118 = phi i64 [ 0, %.lr.ph89.preheader.new ], [ %indvars.iv.next119.3, %.lr.ph89 ]
  %117 = phi x86_fp80 [ %ans.promoted, %.lr.ph89.preheader.new ], [ %129, %.lr.ph89 ]
  %niter147 = phi i64 [ 0, %.lr.ph89.preheader.new ], [ %niter147.next.3, %.lr.ph89 ]
  %118 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv118
  %119 = load x86_fp80, ptr %118, align 16, !tbaa !9
  %120 = fadd x86_fp80 %119, %117
  %indvars.iv.next119 = or disjoint i64 %indvars.iv118, 1
  %121 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv.next119
  %122 = load x86_fp80, ptr %121, align 16, !tbaa !9
  %123 = fadd x86_fp80 %122, %120
  %indvars.iv.next119.1 = or disjoint i64 %indvars.iv118, 2
  %124 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv.next119.1
  %125 = load x86_fp80, ptr %124, align 16, !tbaa !9
  %126 = fadd x86_fp80 %125, %123
  %indvars.iv.next119.2 = or disjoint i64 %indvars.iv118, 3
  %127 = getelementptr inbounds [250000 x x86_fp80], ptr @dp, i64 0, i64 %indvars.iv.next119.2
  %128 = load x86_fp80, ptr %127, align 16, !tbaa !9
  %129 = fadd x86_fp80 %128, %126
  %indvars.iv.next119.3 = add nuw nsw i64 %indvars.iv118, 4
  %niter147.next.3 = add i64 %niter147, 4
  %niter147.ncmp.3 = icmp eq i64 %niter147.next.3, %unroll_iter146
  br i1 %niter147.ncmp.3, label %._crit_edge90.unr-lcssa, label %.lr.ph89, !llvm.loop !24

130:                                              ; preds = %96, %7
  %.sink = phi ptr [ %116, %96 ], [ %8, %7 ]
  %131 = tail 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_)
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #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 #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) local_unnamed_addr #4 align 2

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

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

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

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

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

!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 = !{!"long double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.unroll.disable"}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !12}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass