; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/363 Division 1/Problem C (C)

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

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@p = external dso_local global [20 x double], align 16
@ans = external dso_local global [20 x double], align 16
@dp = external dso_local global [1048576 x double], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 double, 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 %"struct.std::_Setprecision", align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %15 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %22 = getelementptr i8, ptr %21, i64 -24
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %23
  %25 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %24, ptr noundef null)
  %26 = 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)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 4 dereferenceable(4) @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %28

28:                                               ; preds = %38, %0
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %30 = load i32, ptr @n, align 4, !tbaa !8
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %2, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %35
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %36)
  br label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %2, align 4, !tbaa !8
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !8
  br label %28, !llvm.loop !11

41:                                               ; preds = %32
  %42 = load i32, ptr @n, align 4, !tbaa !8
  %43 = load i32, ptr @k, align 4, !tbaa !8
  %44 = icmp eq i32 %42, %43
  br i1 %44, label %45, label %69

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %46

46:                                               ; preds = %64, %45
  %47 = load i32, ptr %3, align 4, !tbaa !8
  %48 = load i32, ptr @n, align 4, !tbaa !8
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

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

51:                                               ; preds = %46
  %52 = load i32, ptr %3, align 4, !tbaa !8
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !13
  %56 = fcmp une double %55, 0.000000e+00
  br i1 %56, label %57, label %60

57:                                               ; preds = %51
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 1)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %58, i8 noundef signext 32)
  br label %63

60:                                               ; preds = %51
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %61, i8 noundef signext 32)
  br label %63

63:                                               ; preds = %60, %57
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %3, align 4, !tbaa !8
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %3, align 4, !tbaa !8
  br label %46, !llvm.loop !15

67:                                               ; preds = %50
  %68 = 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_)
  store i32 0, ptr %1, align 4
  br label %223

69:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %70 = load i32, ptr @n, align 4, !tbaa !8
  %71 = shl i32 1, %70
  store i32 %71, ptr %4, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %72

72:                                               ; preds = %111, %69
  %73 = load i32, ptr %5, align 4, !tbaa !8
  %74 = load i32, ptr %4, align 4, !tbaa !8
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

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

77:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store double 0.000000e+00, ptr %7, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !8
  br label %78

78:                                               ; preds = %97, %77
  %79 = load i32, ptr %8, align 4, !tbaa !8
  %80 = load i32, ptr @n, align 4, !tbaa !8
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

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

83:                                               ; preds = %78
  %84 = load i32, ptr %5, align 4, !tbaa !8
  %85 = load i32, ptr %8, align 4, !tbaa !8
  %86 = shl i32 1, %85
  %87 = and i32 %84, %86
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %96

89:                                               ; preds = %83
  %90 = load i32, ptr %8, align 4, !tbaa !8
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %91
  %93 = load double, ptr %92, align 8, !tbaa !13
  %94 = load double, ptr %7, align 8, !tbaa !13
  %95 = fadd double %94, %93
  store double %95, ptr %7, align 8, !tbaa !13
  br label %96

96:                                               ; preds = %89, %83
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %8, align 4, !tbaa !8
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %8, align 4, !tbaa !8
  br label %78, !llvm.loop !16

100:                                              ; preds = %82
  %101 = load double, ptr %7, align 8, !tbaa !13
  %102 = fcmp oeq double %101, 1.000000e+00
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  store double 0.000000e+00, ptr %7, align 8, !tbaa !13
  br label %104

104:                                              ; preds = %103, %100
  %105 = load double, ptr %7, align 8, !tbaa !13
  %106 = fsub double 1.000000e+00, %105
  %107 = fdiv double 1.000000e+00, %106
  %108 = load i32, ptr %5, align 4, !tbaa !8
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %109
  store double %107, ptr %110, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %111

111:                                              ; preds = %104
  %112 = load i32, ptr %5, align 4, !tbaa !8
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %5, align 4, !tbaa !8
  br label %72, !llvm.loop !17

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

115:                                              ; preds = %150, %114
  %116 = load i32, ptr %9, align 4, !tbaa !8
  %117 = load i32, ptr @n, align 4, !tbaa !8
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %153

120:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %121

121:                                              ; preds = %146, %120
  %122 = load i32, ptr %10, align 4, !tbaa !8
  %123 = load i32, ptr %4, align 4, !tbaa !8
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %149

126:                                              ; preds = %121
  %127 = load i32, ptr %10, align 4, !tbaa !8
  %128 = load i32, ptr %9, align 4, !tbaa !8
  %129 = shl i32 1, %128
  %130 = and i32 %127, %129
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %145

132:                                              ; preds = %126
  %133 = load i32, ptr %10, align 4, !tbaa !8
  %134 = load i32, ptr %9, align 4, !tbaa !8
  %135 = shl i32 1, %134
  %136 = xor i32 %133, %135
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %137
  %139 = load double, ptr %138, align 8, !tbaa !13
  %140 = load i32, ptr %10, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %141
  %143 = load double, ptr %142, align 8, !tbaa !13
  %144 = fsub double %143, %139
  store double %144, ptr %142, align 8, !tbaa !13
  br label %145

145:                                              ; preds = %132, %126
  br label %146

146:                                              ; preds = %145
  %147 = load i32, ptr %10, align 4, !tbaa !8
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %10, align 4, !tbaa !8
  br label %121, !llvm.loop !18

149:                                              ; preds = %125
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %9, align 4, !tbaa !8
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %9, align 4, !tbaa !8
  br label %115, !llvm.loop !19

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

154:                                              ; preds = %196, %153
  %155 = load i32, ptr %11, align 4, !tbaa !8
  %156 = load i32, ptr %4, align 4, !tbaa !8
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %199

159:                                              ; preds = %154
  %160 = load i32, ptr %11, align 4, !tbaa !8
  %161 = call i32 @llvm.ctpop.i32(i32 %160)
  %162 = load i32, ptr @k, align 4, !tbaa !8
  %163 = icmp sge i32 %161, %162
  br i1 %163, label %164, label %165

164:                                              ; preds = %159
  br label %196

165:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %166

166:                                              ; preds = %192, %165
  %167 = load i32, ptr %12, align 4, !tbaa !8
  %168 = load i32, ptr @n, align 4, !tbaa !8
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  store i32 23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %195

171:                                              ; preds = %166
  %172 = load i32, ptr %11, align 4, !tbaa !8
  %173 = load i32, ptr %12, align 4, !tbaa !8
  %174 = shl i32 1, %173
  %175 = and i32 %172, %174
  %176 = icmp eq i32 %175, 0
  br i1 %176, label %177, label %191

177:                                              ; preds = %171
  %178 = load i32, ptr %12, align 4, !tbaa !8
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %179
  %181 = load double, ptr %180, align 8, !tbaa !13
  %182 = load i32, ptr %11, align 4, !tbaa !8
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !13
  %186 = load i32, ptr %12, align 4, !tbaa !8
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [20 x double], ptr @ans, i64 0, i64 %187
  %189 = load double, ptr %188, align 8, !tbaa !13
  %190 = call double @llvm.fmuladd.f64(double %181, double %185, double %189)
  store double %190, ptr %188, align 8, !tbaa !13
  br label %191

191:                                              ; preds = %177, %171
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %12, align 4, !tbaa !8
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %12, align 4, !tbaa !8
  br label %166, !llvm.loop !20

195:                                              ; preds = %170
  br label %196

196:                                              ; preds = %195, %164
  %197 = load i32, ptr %11, align 4, !tbaa !8
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %11, align 4, !tbaa !8
  br label %154, !llvm.loop !21

199:                                              ; preds = %158
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %201 = call i32 @_ZSt12setprecisioni(i32 noundef 15)
  %202 = getelementptr inbounds %"struct.std::_Setprecision", ptr %13, i32 0, i32 0
  store i32 %201, ptr %202, align 4
  %203 = getelementptr inbounds %"struct.std::_Setprecision", ptr %13, i32 0, i32 0
  %204 = load i32, ptr %203, align 4
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %200, i32 %204)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %206

206:                                              ; preds = %218, %199
  %207 = load i32, ptr %14, align 4, !tbaa !8
  %208 = load i32, ptr @n, align 4, !tbaa !8
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  store i32 26, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %221

211:                                              ; preds = %206
  %212 = load i32, ptr %14, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [20 x double], ptr @ans, i64 0, i64 %213
  %215 = load double, ptr %214, align 8, !tbaa !13
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %215)
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %216, i8 noundef signext 32)
  br label %218

218:                                              ; preds = %211
  %219 = load i32, ptr %14, align 4, !tbaa !8
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %14, align 4, !tbaa !8
  br label %206, !llvm.loop !22

221:                                              ; preds = %210
  %222 = 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_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %223

223:                                              ; preds = %221, %67
  %224 = load i32, ptr %1, align 4
  ret i32 %224
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #4 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #1

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

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

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

; 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) #1

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}


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

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

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@p = external dso_local global [20 x double], align 16
@ans = external dso_local local_unnamed_addr global [20 x double], align 16
@dp = external dso_local local_unnamed_addr global [1048576 x double], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; 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 #0 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)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = 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)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %14 = load i32, ptr @n, align 4, !tbaa !8
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %16 = phi i32 [ %14, %0 ], [ %22, %.lr.ph ]
  %17 = load i32, ptr @k, align 4, !tbaa !8
  %18 = icmp eq i32 %16, %17
  br i1 %18, label %.preheader, label %33

.preheader:                                       ; preds = %._crit_edge
  %19 = icmp sgt i32 %16, 0
  br i1 %19, label %.lr.ph83, label %._crit_edge84

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %20 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv
  %21 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @n, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.lr.ph83:                                         ; preds = %.preheader, %.lr.ph83
  %indvars.iv128 = phi i64 [ %indvars.iv.next129, %.lr.ph83 ], [ 0, %.preheader ]
  %25 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv128
  %26 = load double, ptr %25, align 8, !tbaa !13
  %27 = fcmp une double %26, 0.000000e+00
  %. = zext i1 %27 to i32
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %28, i8 noundef signext 32)
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %30 = load i32, ptr @n, align 4, !tbaa !8
  %31 = sext i32 %30 to i64
  %32 = icmp slt i64 %indvars.iv.next129, %31
  br i1 %32, label %.lr.ph83, label %._crit_edge84, !llvm.loop !15

33:                                               ; preds = %._crit_edge
  %34 = shl nuw i32 1, %16
  %.not86 = icmp eq i32 %16, 31
  br i1 %.not86, label %._crit_edge77, label %.preheader60.lr.ph

.preheader60.lr.ph:                               ; preds = %33
  %35 = icmp sgt i32 %16, 0
  %smax104 = tail call i32 @llvm.smax.i32(i32 %34, i32 1)
  %wide.trip.count105 = zext nneg i32 %smax104 to i64
  br i1 %35, label %.preheader60.us.preheader, label %.preheader60.preheader

.preheader60.preheader:                           ; preds = %.preheader60.lr.ph
  %min.iters.check = icmp slt i32 %34, 4
  br i1 %min.iters.check, label %.preheader60, label %vector.ph

vector.ph:                                        ; preds = %.preheader60.preheader
  %n.vec = and i64 %wide.trip.count105, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %36 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %index
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %36, align 16, !tbaa !13
  store <2 x double> <double 1.000000e+00, double 1.000000e+00>, ptr %37, align 16, !tbaa !13
  %index.next = add nuw i64 %index, 4
  %38 = icmp eq i64 %index.next, %n.vec
  br i1 %38, label %.preheader59, label %vector.body, !llvm.loop !16

.preheader60.us.preheader:                        ; preds = %.preheader60.lr.ph
  %wide.trip.count99 = zext nneg i32 %16 to i64
  %xtraiter = and i64 %wide.trip.count99, 1
  %39 = icmp eq i32 %16, 1
  %unroll_iter = and i64 %wide.trip.count99, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader60.us

.preheader60.us:                                  ; preds = %.preheader60.us.preheader, %._crit_edge65.us
  %indvars.iv101 = phi i64 [ 0, %.preheader60.us.preheader ], [ %indvars.iv.next102, %._crit_edge65.us ]
  %40 = trunc nuw nsw i64 %indvars.iv101 to i32
  br i1 %39, label %._crit_edge65.us.unr-lcssa, label %.preheader60.us.new

.preheader60.us.new:                              ; preds = %.preheader60.us, %56
  %indvars.iv96 = phi i64 [ %indvars.iv.next97.1, %56 ], [ 0, %.preheader60.us ]
  %.04862.us = phi double [ %.1.us.1, %56 ], [ 0.000000e+00, %.preheader60.us ]
  %niter = phi i64 [ %niter.next.1, %56 ], [ 0, %.preheader60.us ]
  %41 = trunc nuw nsw i64 %indvars.iv96 to i32
  %42 = shl nuw i32 1, %41
  %43 = and i32 %42, %40
  %.not55.us = icmp eq i32 %43, 0
  br i1 %.not55.us, label %48, label %44

44:                                               ; preds = %.preheader60.us.new
  %45 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv96
  %46 = load double, ptr %45, align 16, !tbaa !13
  %47 = fadd double %.04862.us, %46
  br label %48

48:                                               ; preds = %44, %.preheader60.us.new
  %.1.us = phi double [ %47, %44 ], [ %.04862.us, %.preheader60.us.new ]
  %indvars.iv.next97 = or disjoint i64 %indvars.iv96, 1
  %49 = trunc nuw nsw i64 %indvars.iv.next97 to i32
  %50 = shl nuw i32 1, %49
  %51 = and i32 %50, %40
  %.not55.us.1 = icmp eq i32 %51, 0
  br i1 %.not55.us.1, label %56, label %52

52:                                               ; preds = %48
  %53 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv.next97
  %54 = load double, ptr %53, align 8, !tbaa !13
  %55 = fadd double %.1.us, %54
  br label %56

56:                                               ; preds = %52, %48
  %.1.us.1 = phi double [ %55, %52 ], [ %.1.us, %48 ]
  %indvars.iv.next97.1 = add nuw nsw i64 %indvars.iv96, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge65.us.unr-lcssa, label %.preheader60.us.new, !llvm.loop !19

._crit_edge65.us.unr-lcssa:                       ; preds = %56, %.preheader60.us
  %.1.us.lcssa.ph = phi double [ poison, %.preheader60.us ], [ %.1.us.1, %56 ]
  %indvars.iv96.unr = phi i64 [ 0, %.preheader60.us ], [ %indvars.iv.next97.1, %56 ]
  %.04862.us.unr = phi double [ 0.000000e+00, %.preheader60.us ], [ %.1.us.1, %56 ]
  br i1 %lcmp.mod.not, label %._crit_edge65.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge65.us.unr-lcssa
  %57 = trunc nuw nsw i64 %indvars.iv96.unr to i32
  %58 = shl nuw i32 1, %57
  %59 = and i32 %58, %40
  %.not55.us.epil = icmp eq i32 %59, 0
  br i1 %.not55.us.epil, label %._crit_edge65.us, label %60

60:                                               ; preds = %.epil.preheader
  %61 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv96.unr
  %62 = load double, ptr %61, align 8, !tbaa !13
  %63 = fadd double %.04862.us.unr, %62
  br label %._crit_edge65.us

._crit_edge65.us:                                 ; preds = %.epil.preheader, %60, %._crit_edge65.us.unr-lcssa
  %.1.us.lcssa = phi double [ %.1.us.lcssa.ph, %._crit_edge65.us.unr-lcssa ], [ %63, %60 ], [ %.04862.us.unr, %.epil.preheader ]
  %64 = fcmp oeq double %.1.us.lcssa, 1.000000e+00
  %65 = fsub double 1.000000e+00, %.1.us.lcssa
  %66 = fdiv double 1.000000e+00, %65
  %67 = select i1 %64, double 1.000000e+00, double %66
  %68 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %indvars.iv101
  store double %67, ptr %68, align 8, !tbaa !13
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next102, %wide.trip.count105
  br i1 %exitcond106.not, label %.preheader59, label %.preheader60.us, !llvm.loop !20

.preheader60:                                     ; preds = %.preheader60.preheader
  store double 1.000000e+00, ptr @dp, align 16, !tbaa !13
  %exitcond.not = icmp slt i32 %34, 2
  br i1 %exitcond.not, label %.preheader59, label %.preheader60.1, !llvm.loop !21

.preheader60.1:                                   ; preds = %.preheader60
  store double 1.000000e+00, ptr getelementptr inbounds (i8, ptr @dp, i64 8), align 8, !tbaa !13
  store double 1.000000e+00, ptr getelementptr inbounds (i8, ptr @dp, i64 16), align 16, !tbaa !13
  br label %.preheader59

.preheader59:                                     ; preds = %vector.body, %.preheader60, %.preheader60.1, %._crit_edge65.us
  %69 = icmp sgt i32 %16, 0
  br i1 %69, label %.preheader58.lr.ph, label %.lr.ph76

.preheader58.lr.ph:                               ; preds = %.preheader59
  br i1 %.not86, label %._crit_edge77, label %.preheader58.us.preheader

.preheader58.us.preheader:                        ; preds = %.preheader58.lr.ph
  %smax110 = tail call i32 @llvm.smax.i32(i32 %34, i32 1)
  %wide.trip.count111 = zext nneg i32 %smax110 to i64
  %xtraiter142 = and i64 %wide.trip.count111, 1
  %70 = icmp slt i32 %34, 2
  %unroll_iter144 = and i64 %wide.trip.count111, 2147483646
  %lcmp.mod143.not = icmp eq i64 %xtraiter142, 0
  br label %.preheader58.us

.preheader58.us:                                  ; preds = %.preheader58.us.preheader, %._crit_edge70.us
  %.04671.us = phi i32 [ %104, %._crit_edge70.us ], [ 0, %.preheader58.us.preheader ]
  %71 = shl nuw i32 1, %.04671.us
  br i1 %70, label %._crit_edge70.us.unr-lcssa, label %.preheader58.us.new

.preheader58.us.new:                              ; preds = %.preheader58.us, %93
  %indvars.iv107 = phi i64 [ %indvars.iv.next108.1, %93 ], [ 0, %.preheader58.us ]
  %niter145 = phi i64 [ %niter145.next.1, %93 ], [ 0, %.preheader58.us ]
  %72 = trunc nuw nsw i64 %indvars.iv107 to i32
  %73 = and i32 %71, %72
  %.not54.us = icmp eq i32 %73, 0
  br i1 %.not54.us, label %82, label %74

74:                                               ; preds = %.preheader58.us.new
  %75 = xor i32 %71, %72
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !13
  %79 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %indvars.iv107
  %80 = load double, ptr %79, align 16, !tbaa !13
  %81 = fsub double %80, %78
  store double %81, ptr %79, align 16, !tbaa !13
  br label %82

82:                                               ; preds = %74, %.preheader58.us.new
  %indvars.iv.next108 = or disjoint i64 %indvars.iv107, 1
  %83 = trunc nuw nsw i64 %indvars.iv.next108 to i32
  %84 = and i32 %71, %83
  %.not54.us.1 = icmp eq i32 %84, 0
  br i1 %.not54.us.1, label %93, label %85

85:                                               ; preds = %82
  %86 = xor i32 %71, %83
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !13
  %90 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %indvars.iv.next108
  %91 = load double, ptr %90, align 8, !tbaa !13
  %92 = fsub double %91, %89
  store double %92, ptr %90, align 8, !tbaa !13
  br label %93

93:                                               ; preds = %85, %82
  %indvars.iv.next108.1 = add nuw nsw i64 %indvars.iv107, 2
  %niter145.next.1 = add i64 %niter145, 2
  %niter145.ncmp.1 = icmp eq i64 %niter145.next.1, %unroll_iter144
  br i1 %niter145.ncmp.1, label %._crit_edge70.us.unr-lcssa, label %.preheader58.us.new, !llvm.loop !22

._crit_edge70.us.unr-lcssa:                       ; preds = %93, %.preheader58.us
  %indvars.iv107.unr = phi i64 [ 0, %.preheader58.us ], [ %indvars.iv.next108.1, %93 ]
  br i1 %lcmp.mod143.not, label %._crit_edge70.us, label %.epil.preheader141

.epil.preheader141:                               ; preds = %._crit_edge70.us.unr-lcssa
  %94 = trunc nuw nsw i64 %indvars.iv107.unr to i32
  %95 = and i32 %71, %94
  %.not54.us.epil = icmp eq i32 %95, 0
  br i1 %.not54.us.epil, label %._crit_edge70.us, label %96

96:                                               ; preds = %.epil.preheader141
  %97 = xor i32 %71, %94
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !13
  %101 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %indvars.iv107.unr
  %102 = load double, ptr %101, align 8, !tbaa !13
  %103 = fsub double %102, %100
  store double %103, ptr %101, align 8, !tbaa !13
  br label %._crit_edge70.us

._crit_edge70.us:                                 ; preds = %.epil.preheader141, %96, %._crit_edge70.us.unr-lcssa
  %104 = add nuw nsw i32 %.04671.us, 1
  %exitcond113.not = icmp eq i32 %104, %16
  br i1 %exitcond113.not, label %.preheader57, label %.preheader58.us, !llvm.loop !23

.preheader57:                                     ; preds = %._crit_edge70.us
  br i1 %.not86, label %._crit_edge77, label %.lr.ph76

.lr.ph76:                                         ; preds = %.preheader59, %.preheader57
  %105 = icmp slt i32 %16, 1
  %smax122 = tail call i32 @llvm.smax.i32(i32 %34, i32 1)
  %wide.trip.count123 = zext nneg i32 %smax122 to i64
  %wide.trip.count117 = zext i32 %16 to i64
  %xtraiter147 = and i64 %wide.trip.count117, 1
  %106 = icmp eq i32 %16, 1
  %unroll_iter149 = and i64 %wide.trip.count117, 2147483646
  %lcmp.mod148.not = icmp eq i64 %xtraiter147, 0
  br label %112

._crit_edge77:                                    ; preds = %.loopexit, %33, %.preheader58.lr.ph, %.preheader57
  %107 = 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)
  %108 = tail call i32 @_ZSt12setprecisioni(i32 noundef 15)
  %109 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %107, i32 %108)
  %110 = load i32, ptr @n, align 4, !tbaa !8
  %111 = icmp sgt i32 %110, 0
  br i1 %111, label %.lr.ph80, label %._crit_edge84

112:                                              ; preds = %.lr.ph76, %.loopexit
  %indvars.iv119 = phi i64 [ 0, %.lr.ph76 ], [ %indvars.iv.next120, %.loopexit ]
  %113 = trunc nuw nsw i64 %indvars.iv119 to i32
  %114 = tail call range(i32 0, 32) i32 @llvm.ctpop.i32(i32 %113)
  %.not = icmp sge i32 %114, %17
  %brmerge = or i1 %.not, %105
  br i1 %brmerge, label %.loopexit, label %.lr.ph73

.lr.ph73:                                         ; preds = %112
  %115 = getelementptr inbounds [1048576 x double], ptr @dp, i64 0, i64 %indvars.iv119
  br i1 %106, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph73.new

.lr.ph73.new:                                     ; preds = %.lr.ph73, %139
  %indvars.iv114 = phi i64 [ %indvars.iv.next115.1, %139 ], [ 0, %.lr.ph73 ]
  %niter150 = phi i64 [ %niter150.next.1, %139 ], [ 0, %.lr.ph73 ]
  %116 = trunc nuw nsw i64 %indvars.iv114 to i32
  %117 = shl nuw i32 1, %116
  %118 = and i32 %117, %113
  %119 = icmp eq i32 %118, 0
  br i1 %119, label %120, label %127

120:                                              ; preds = %.lr.ph73.new
  %121 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv114
  %122 = load double, ptr %121, align 16, !tbaa !13
  %123 = load double, ptr %115, align 8, !tbaa !13
  %124 = getelementptr inbounds [20 x double], ptr @ans, i64 0, i64 %indvars.iv114
  %125 = load double, ptr %124, align 16, !tbaa !13
  %126 = tail call double @llvm.fmuladd.f64(double %122, double %123, double %125)
  store double %126, ptr %124, align 16, !tbaa !13
  br label %127

127:                                              ; preds = %.lr.ph73.new, %120
  %indvars.iv.next115 = or disjoint i64 %indvars.iv114, 1
  %128 = trunc nuw nsw i64 %indvars.iv.next115 to i32
  %129 = shl nuw i32 1, %128
  %130 = and i32 %129, %113
  %131 = icmp eq i32 %130, 0
  br i1 %131, label %132, label %139

132:                                              ; preds = %127
  %133 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv.next115
  %134 = load double, ptr %133, align 8, !tbaa !13
  %135 = load double, ptr %115, align 8, !tbaa !13
  %136 = getelementptr inbounds [20 x double], ptr @ans, i64 0, i64 %indvars.iv.next115
  %137 = load double, ptr %136, align 8, !tbaa !13
  %138 = tail call double @llvm.fmuladd.f64(double %134, double %135, double %137)
  store double %138, ptr %136, align 8, !tbaa !13
  br label %139

139:                                              ; preds = %132, %127
  %indvars.iv.next115.1 = add nuw nsw i64 %indvars.iv114, 2
  %niter150.next.1 = add i64 %niter150, 2
  %niter150.ncmp.1 = icmp eq i64 %niter150.next.1, %unroll_iter149
  br i1 %niter150.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph73.new, !llvm.loop !24

.loopexit.loopexit.unr-lcssa:                     ; preds = %139, %.lr.ph73
  %indvars.iv114.unr = phi i64 [ 0, %.lr.ph73 ], [ %indvars.iv.next115.1, %139 ]
  br i1 %lcmp.mod148.not, label %.loopexit, label %.epil.preheader146

.epil.preheader146:                               ; preds = %.loopexit.loopexit.unr-lcssa
  %140 = trunc nuw nsw i64 %indvars.iv114.unr to i32
  %141 = shl nuw i32 1, %140
  %142 = and i32 %141, %113
  %143 = icmp eq i32 %142, 0
  br i1 %143, label %144, label %.loopexit

144:                                              ; preds = %.epil.preheader146
  %145 = getelementptr inbounds [20 x double], ptr @p, i64 0, i64 %indvars.iv114.unr
  %146 = load double, ptr %145, align 8, !tbaa !13
  %147 = load double, ptr %115, align 8, !tbaa !13
  %148 = getelementptr inbounds [20 x double], ptr @ans, i64 0, i64 %indvars.iv114.unr
  %149 = load double, ptr %148, align 8, !tbaa !13
  %150 = tail call double @llvm.fmuladd.f64(double %146, double %147, double %149)
  store double %150, ptr %148, align 8, !tbaa !13
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %144, %.epil.preheader146, %112
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %exitcond124.not = icmp eq i64 %indvars.iv.next120, %wide.trip.count123
  br i1 %exitcond124.not, label %._crit_edge77, label %112, !llvm.loop !25

.lr.ph80:                                         ; preds = %._crit_edge77, %.lr.ph80
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %.lr.ph80 ], [ 0, %._crit_edge77 ]
  %151 = getelementptr inbounds [20 x double], ptr @ans, i64 0, i64 %indvars.iv125
  %152 = load double, ptr %151, align 8, !tbaa !13
  %153 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %152)
  %154 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %153, i8 noundef signext 32)
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %155 = load i32, ptr @n, align 4, !tbaa !8
  %156 = sext i32 %155 to i64
  %157 = icmp slt i64 %indvars.iv.next126, %156
  br i1 %157, label %.lr.ph80, label %._crit_edge84, !llvm.loop !26

._crit_edge84:                                    ; preds = %.lr.ph80, %.lr.ph83, %._crit_edge77, %.preheader
  %158 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #4 align 2

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 #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #1

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctpop.i32(i32) #5

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

; 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 #1

; 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 #0 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)) #1

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

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

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

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12, !18, !17}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}


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