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

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { %"struct.std::pair.0", %"struct.std::pair.2" }
%"struct.std::pair.0" = type <{ double, i32, [4 x i8] }>
%"struct.std::pair.2" = type { double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@v = external dso_local global %"class.std::vector", align 8
@res = external dso_local global [20 x double], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z1fd(double noundef) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair.0", align 8
  %8 = alloca { double, i32 }, align 8
  %9 = alloca %"struct.std::pair.2", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %26 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %27 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %29
  %31 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %30, ptr noundef null)
  %32 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %33 = getelementptr i8, ptr %32, i64 -24
  %34 = load i64, ptr %33, align 8
  %35 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %34
  %36 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %35, ptr noundef null)
  %37 = 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)
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %54, %0
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = load i32, ptr @n, align 4, !tbaa !8
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  %48 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store { double, i32 } %48, ptr %8, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %7, ptr align 8 %8, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %49 = call { double, double } @_ZSt9make_pairIRdS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %50 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  %51 = extractvalue { double, double } %49, 0
  store double %51, ptr %50, align 8
  %52 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  %53 = extractvalue { double, double } %49, 1
  store double %53, ptr %52, align 8
  call void @_ZSt9make_pairISt4pairIdiES0_IddEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %6, ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 8 dereferenceable(32) %6)
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %54

54:                                               ; preds = %44
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %2, align 4, !tbaa !8
  br label %39, !llvm.loop !11

57:                                               ; preds = %43
  %58 = call ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  %60 = call ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #8
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIS2_IdiES2_IddEESt6vectorIS5_SaIS5_EEEEEvT_SB_(ptr %63, ptr %65)
  %66 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %67 = getelementptr i8, ptr %66, i64 -24
  %68 = load i64, ptr %67, align 8
  %69 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %68
  %70 = call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %69, i64 noundef 15)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store double 0.000000e+00, ptr %12, align 8, !tbaa !13
  br label %71

71:                                               ; preds = %219, %57
  %72 = load i32, ptr @t, align 4, !tbaa !8
  %73 = sitofp i32 %72 to double
  %74 = load double, ptr %12, align 8, !tbaa !13
  %75 = fcmp ogt double %73, %74
  br i1 %75, label %76, label %223

76:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store double 0x3D719799812DEA11, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %77 = load i32, ptr @t, align 4, !tbaa !8
  %78 = sitofp i32 %77 to double
  %79 = load double, ptr %12, align 8, !tbaa !13
  %80 = fsub double %78, %79
  %81 = fadd double %80, 0x3D719799812DEA11
  store double %81, ptr %14, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  br label %82

82:                                               ; preds = %98, %76
  %83 = load double, ptr %14, align 8, !tbaa !13
  %84 = load double, ptr %13, align 8, !tbaa !13
  %85 = fsub double %83, %84
  %86 = fcmp ogt double %85, 0x3D719799812DEA11
  br i1 %86, label %87, label %99

87:                                               ; preds = %82
  %88 = load double, ptr %14, align 8, !tbaa !13
  %89 = load double, ptr %13, align 8, !tbaa !13
  %90 = fadd double %88, %89
  %91 = fdiv double %90, 2.000000e+00
  store double %91, ptr %15, align 8, !tbaa !13
  %92 = load double, ptr %15, align 8, !tbaa !13
  %93 = call noundef zeroext i1 @_Z1fd(double noundef %92)
  br i1 %93, label %94, label %96

94:                                               ; preds = %87
  %95 = load double, ptr %15, align 8, !tbaa !13
  store double %95, ptr %14, align 8, !tbaa !13
  br label %98

96:                                               ; preds = %87
  %97 = load double, ptr %15, align 8, !tbaa !13
  store double %97, ptr %13, align 8, !tbaa !13
  br label %98

98:                                               ; preds = %96, %94
  br label %82, !llvm.loop !15

99:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %100 = load double, ptr %13, align 8, !tbaa !13
  %101 = fadd double %100, 0x3D719799812DEA11
  store double %101, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %103

103:                                              ; preds = %123, %99
  %104 = load i32, ptr %18, align 4, !tbaa !8
  %105 = load i32, ptr @n, align 4, !tbaa !8
  %106 = icmp slt i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %126

108:                                              ; preds = %103
  %109 = load i32, ptr %18, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %110) #8
  %112 = getelementptr inbounds %"struct.std::pair", ptr %111, i32 0, i32 1
  %113 = getelementptr inbounds %"struct.std::pair.2", ptr %112, i32 0, i32 0
  %114 = load double, ptr %113, align 8, !tbaa !16
  %115 = load double, ptr %16, align 8, !tbaa !13
  %116 = load i32, ptr %18, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %117) #8
  %119 = getelementptr inbounds %"struct.std::pair", ptr %118, i32 0, i32 0
  %120 = getelementptr inbounds %"struct.std::pair.0", ptr %119, i32 0, i32 0
  %121 = load double, ptr %120, align 8, !tbaa !20
  %122 = call double @llvm.fmuladd.f64(double %114, double %115, double %121)
  store double %122, ptr %120, align 8, !tbaa !20
  br label %123

123:                                              ; preds = %108
  %124 = load i32, ptr %18, align 4, !tbaa !8
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %18, align 4, !tbaa !8
  br label %103, !llvm.loop !21

126:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 1, ptr %23, align 4, !tbaa !8
  br label %127

127:                                              ; preds = %216, %126
  %128 = load i32, ptr %23, align 4, !tbaa !8
  %129 = load i32, ptr @n, align 4, !tbaa !8
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %219

132:                                              ; preds = %127
  %133 = load i32, ptr %23, align 4, !tbaa !8
  %134 = sub nsw i32 %133, 1
  %135 = icmp sge i32 %134, 0
  br i1 %135, label %136, label %215

136:                                              ; preds = %132
  %137 = load i32, ptr %23, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %138) #8
  %140 = getelementptr inbounds %"struct.std::pair", ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %"struct.std::pair.0", ptr %140, i32 0, i32 0
  %142 = load double, ptr %141, align 8, !tbaa !20
  %143 = load i32, ptr %23, align 4, !tbaa !8
  %144 = sub nsw i32 %143, 1
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %145) #8
  %147 = getelementptr inbounds %"struct.std::pair", ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %"struct.std::pair.0", ptr %147, i32 0, i32 0
  %149 = load double, ptr %148, align 8, !tbaa !20
  %150 = fcmp ole double %142, %149
  br i1 %150, label %151, label %215

151:                                              ; preds = %136
  %152 = load i32, ptr %23, align 4, !tbaa !8
  %153 = sub nsw i32 %152, 1
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %154) #8
  %156 = getelementptr inbounds %"struct.std::pair", ptr %155, i32 0, i32 1
  %157 = getelementptr inbounds %"struct.std::pair.2", ptr %156, i32 0, i32 0
  %158 = load double, ptr %157, align 8, !tbaa !16
  store double %158, ptr %19, align 8, !tbaa !13
  %159 = load i32, ptr %23, align 4, !tbaa !8
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %160) #8
  %162 = getelementptr inbounds %"struct.std::pair", ptr %161, i32 0, i32 1
  %163 = getelementptr inbounds %"struct.std::pair.2", ptr %162, i32 0, i32 0
  %164 = load double, ptr %163, align 8, !tbaa !16
  store double %164, ptr %20, align 8, !tbaa !13
  %165 = load i32, ptr %23, align 4, !tbaa !8
  %166 = sub nsw i32 %165, 1
  %167 = sext i32 %166 to i64
  %168 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %167) #8
  %169 = getelementptr inbounds %"struct.std::pair", ptr %168, i32 0, i32 1
  %170 = getelementptr inbounds %"struct.std::pair.2", ptr %169, i32 0, i32 1
  %171 = load double, ptr %170, align 8, !tbaa !22
  store double %171, ptr %21, align 8, !tbaa !13
  %172 = load i32, ptr %23, align 4, !tbaa !8
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %173) #8
  %175 = getelementptr inbounds %"struct.std::pair", ptr %174, i32 0, i32 1
  %176 = getelementptr inbounds %"struct.std::pair.2", ptr %175, i32 0, i32 1
  %177 = load double, ptr %176, align 8, !tbaa !22
  store double %177, ptr %22, align 8, !tbaa !13
  %178 = load double, ptr %21, align 8, !tbaa !13
  %179 = load double, ptr %22, align 8, !tbaa !13
  %180 = fsub double %178, %179
  %181 = load double, ptr %19, align 8, !tbaa !13
  %182 = load double, ptr %22, align 8, !tbaa !13
  %183 = load double, ptr %20, align 8, !tbaa !13
  %184 = fmul double %182, %183
  %185 = fmul double %184, 2.000000e+00
  %186 = call double @llvm.fmuladd.f64(double %180, double %181, double %185)
  %187 = load double, ptr %21, align 8, !tbaa !13
  %188 = load double, ptr %22, align 8, !tbaa !13
  %189 = fadd double %187, %188
  %190 = fdiv double %186, %189
  %191 = load i32, ptr %23, align 4, !tbaa !8
  %192 = sub nsw i32 %191, 1
  %193 = sext i32 %192 to i64
  %194 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %193) #8
  %195 = getelementptr inbounds %"struct.std::pair", ptr %194, i32 0, i32 1
  %196 = getelementptr inbounds %"struct.std::pair.2", ptr %195, i32 0, i32 0
  store double %190, ptr %196, align 8, !tbaa !16
  %197 = load double, ptr %22, align 8, !tbaa !13
  %198 = load double, ptr %21, align 8, !tbaa !13
  %199 = fsub double %197, %198
  %200 = load double, ptr %20, align 8, !tbaa !13
  %201 = load double, ptr %21, align 8, !tbaa !13
  %202 = load double, ptr %19, align 8, !tbaa !13
  %203 = fmul double %201, %202
  %204 = fmul double %203, 2.000000e+00
  %205 = call double @llvm.fmuladd.f64(double %199, double %200, double %204)
  %206 = load double, ptr %21, align 8, !tbaa !13
  %207 = load double, ptr %22, align 8, !tbaa !13
  %208 = fadd double %206, %207
  %209 = fdiv double %205, %208
  %210 = load i32, ptr %23, align 4, !tbaa !8
  %211 = sext i32 %210 to i64
  %212 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %211) #8
  %213 = getelementptr inbounds %"struct.std::pair", ptr %212, i32 0, i32 1
  %214 = getelementptr inbounds %"struct.std::pair.2", ptr %213, i32 0, i32 0
  store double %209, ptr %214, align 8, !tbaa !16
  br label %215

215:                                              ; preds = %151, %136, %132
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %23, align 4, !tbaa !8
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %23, align 4, !tbaa !8
  br label %127, !llvm.loop !23

219:                                              ; preds = %131
  %220 = load double, ptr %16, align 8, !tbaa !13
  %221 = load double, ptr %12, align 8, !tbaa !13
  %222 = fadd double %221, %220
  store double %222, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %71, !llvm.loop !24

223:                                              ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !8
  br label %224

224:                                              ; preds = %244, %223
  %225 = load i32, ptr %24, align 4, !tbaa !8
  %226 = load i32, ptr @n, align 4, !tbaa !8
  %227 = icmp slt i32 %225, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %247

229:                                              ; preds = %224
  %230 = load i32, ptr %24, align 4, !tbaa !8
  %231 = sext i32 %230 to i64
  %232 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %231) #8
  %233 = getelementptr inbounds %"struct.std::pair", ptr %232, i32 0, i32 0
  %234 = getelementptr inbounds %"struct.std::pair.0", ptr %233, i32 0, i32 0
  %235 = load double, ptr %234, align 8, !tbaa !20
  %236 = load i32, ptr %24, align 4, !tbaa !8
  %237 = sext i32 %236 to i64
  %238 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %237) #8
  %239 = getelementptr inbounds %"struct.std::pair", ptr %238, i32 0, i32 0
  %240 = getelementptr inbounds %"struct.std::pair.0", ptr %239, i32 0, i32 1
  %241 = load i32, ptr %240, align 8, !tbaa !25
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [20 x double], ptr @res, i64 0, i64 %242
  store double %235, ptr %243, align 8, !tbaa !13
  br label %244

244:                                              ; preds = %229
  %245 = load i32, ptr %24, align 4, !tbaa !8
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %24, align 4, !tbaa !8
  br label %224, !llvm.loop !26

247:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !8
  br label %248

248:                                              ; preds = %261, %247
  %249 = load i32, ptr %25, align 4, !tbaa !8
  %250 = load i32, ptr @n, align 4, !tbaa !8
  %251 = icmp slt i32 %249, %250
  br i1 %251, label %253, label %252

252:                                              ; preds = %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %264

253:                                              ; preds = %248
  %254 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %255 = load i32, ptr %25, align 4, !tbaa !8
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [20 x double], ptr @res, i64 0, i64 %256
  %258 = load double, ptr %257, align 8, !tbaa !13
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %254, double noundef %258)
  %260 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %259, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %261

261:                                              ; preds = %253
  %262 = load i32, ptr %25, align 4, !tbaa !8
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %25, align 4, !tbaa !8
  br label %248, !llvm.loop !27

264:                                              ; preds = %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  ret i32 0
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 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)) #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: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIdiES0_IddEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZSt9make_pairIRdS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIS2_IdiES2_IddEESt6vectorIS5_SaIS5_EEEEEvT_SB_(ptr, ptr) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) #2 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) #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)) #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

; 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)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { "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 nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #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 = !{!17, !14, i64 16}
!17 = !{!"_ZTSSt4pairIS_IdiES_IddEE", !18, i64 0, !19, i64 16}
!18 = !{!"_ZTSSt4pairIdiE", !14, i64 0, !9, i64 8}
!19 = !{!"_ZTSSt4pairIddE", !14, i64 0, !14, i64 8}
!20 = !{!17, !14, i64 0}
!21 = distinct !{!21, !12}
!22 = !{!17, !14, i64 24}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = !{!17, !9, i64 8}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<double, int>, std::pair<double, double>>, std::allocator<std::pair<std::pair<double, int>, std::pair<double, double>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::pair" = type { %"struct.std::pair.0", %"struct.std::pair.2" }
%"struct.std::pair.0" = type <{ double, i32, [4 x i8] }>
%"struct.std::pair.2" = type { double, double }

@n = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@v = external dso_local global %"class.std::vector", align 8
@res = external dso_local local_unnamed_addr global [20 x double], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z1fd(double noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair.0", align 8
  %7 = alloca %"struct.std::pair.2", align 8
  %8 = alloca i32, align 4
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %17
  %19 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = 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)
  %21 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(4) @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !8
  %22 = load i32, ptr @n, align 4, !tbaa !8
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %24 = getelementptr inbounds i8, ptr %7, i64 8
  br label %35

._crit_edge:                                      ; preds = %35, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %25 = call ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  %26 = call ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @v) #7
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIS2_IdiES2_IddEESt6vectorIS5_SaIS5_EEEEEvT_SB_(ptr %25, ptr %26)
  %27 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %28 = getelementptr i8, ptr %27, i64 -24
  %29 = load i64, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %29
  %31 = call noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216) %30, i64 noundef 15)
  %32 = load i32, ptr @t, align 4, !tbaa !8
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph74.preheader, label %._crit_edge..preheader59_crit_edge

._crit_edge..preheader59_crit_edge:               ; preds = %._crit_edge
  %.pre = load i32, ptr @n, align 4, !tbaa !8
  br label %.preheader59

.lr.ph74.preheader:                               ; preds = %._crit_edge
  %34 = uitofp nneg i32 %32 to double
  br label %.lr.ph74

35:                                               ; preds = %.lr.ph, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %39 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %.fca.0.extract = extractvalue { double, i32 } %39, 0
  %.fca.1.extract = extractvalue { double, i32 } %39, 1
  store double %.fca.0.extract, ptr %6, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %40 = call { double, double } @_ZSt9make_pairIRdS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %41 = extractvalue { double, double } %40, 0
  store double %41, ptr %7, align 8
  %42 = extractvalue { double, double } %40, 1
  store double %42, ptr %24, align 8
  call void @_ZSt9make_pairISt4pairIdiES0_IddEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %5, ptr noundef nonnull align 8 dereferenceable(12) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %43 = load i32, ptr %1, align 4, !tbaa !8
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %1, align 4, !tbaa !8
  %45 = load i32, ptr @n, align 4, !tbaa !8
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %35, label %._crit_edge, !llvm.loop !11

.preheader59:                                     ; preds = %._crit_edge71, %._crit_edge..preheader59_crit_edge
  %47 = phi i32 [ %.pre, %._crit_edge..preheader59_crit_edge ], [ %73, %._crit_edge71 ]
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph76, label %._crit_edge79

.lr.ph74:                                         ; preds = %.lr.ph74.preheader, %._crit_edge71
  %49 = phi double [ %76, %._crit_edge71 ], [ %34, %.lr.ph74.preheader ]
  %.05272 = phi double [ %74, %._crit_edge71 ], [ 0.000000e+00, %.lr.ph74.preheader ]
  %50 = fsub double %49, %.05272
  %51 = fadd double %50, 0x3D719799812DEA11
  %52 = fadd double %51, 0xBD719799812DEA11
  %53 = fcmp ogt double %52, 0x3D719799812DEA11
  br i1 %53, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %.lr.ph74, %.lr.ph64
  %.05362 = phi double [ %.053., %.lr.ph64 ], [ 0x3D719799812DEA11, %.lr.ph74 ]
  %.05461 = phi double [ %..054, %.lr.ph64 ], [ %51, %.lr.ph74 ]
  %54 = fadd double %.05461, %.05362
  %55 = fmul double %54, 5.000000e-01
  %56 = call noundef zeroext i1 @_Z1fd(double noundef %55)
  %..054 = select i1 %56, double %55, double %.05461
  %.053. = select i1 %56, double %.05362, double %55
  %57 = fsub double %..054, %.053.
  %58 = fcmp ogt double %57, 0x3D719799812DEA11
  br i1 %58, label %.lr.ph64, label %._crit_edge65, !llvm.loop !13

._crit_edge65:                                    ; preds = %.lr.ph64, %.lr.ph74
  %.053.lcssa = phi double [ 0x3D719799812DEA11, %.lr.ph74 ], [ %.053., %.lr.ph64 ]
  %59 = fadd double %.053.lcssa, 0x3D719799812DEA11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %61 = load i32, ptr @n, align 4, !tbaa !8
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %.lr.ph68, label %._crit_edge71

.preheader60:                                     ; preds = %.lr.ph68
  %63 = icmp sgt i32 %70, 1
  br i1 %63, label %.lr.ph70, label %._crit_edge71

.lr.ph68:                                         ; preds = %._crit_edge65, %.lr.ph68
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph68 ], [ 0, %._crit_edge65 ]
  %64 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #7
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load double, ptr %65, align 8, !tbaa !14
  %67 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #7
  %68 = load double, ptr %67, align 8, !tbaa !19
  %69 = call double @llvm.fmuladd.f64(double %66, double %59, double %68)
  store double %69, ptr %67, align 8, !tbaa !19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = load i32, ptr @n, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %indvars.iv.next, %71
  br i1 %72, label %.lr.ph68, label %.preheader60, !llvm.loop !20

._crit_edge71:                                    ; preds = %112, %._crit_edge65, %.preheader60
  %73 = phi i32 [ %70, %.preheader60 ], [ %61, %._crit_edge65 ], [ %113, %112 ]
  %74 = fadd double %.05272, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  %75 = load i32, ptr @t, align 4, !tbaa !8
  %76 = sitofp i32 %75 to double
  %77 = fcmp olt double %74, %76
  br i1 %77, label %.lr.ph74, label %.preheader59, !llvm.loop !21

.lr.ph70:                                         ; preds = %.preheader60, %112
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %112 ], [ 1, %.preheader60 ]
  %78 = add nsw i64 %indvars.iv81, -1
  %79 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv81) #7
  %80 = load double, ptr %79, align 8, !tbaa !19
  %81 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %78) #7
  %82 = load double, ptr %81, align 8, !tbaa !19
  %83 = fcmp ugt double %80, %82
  br i1 %83, label %112, label %84

84:                                               ; preds = %.lr.ph70
  %85 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %78) #7
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  %87 = load double, ptr %86, align 8, !tbaa !14
  %88 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv81) #7
  %89 = getelementptr inbounds i8, ptr %88, i64 16
  %90 = load double, ptr %89, align 8, !tbaa !14
  %91 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %78) #7
  %92 = getelementptr inbounds i8, ptr %91, i64 24
  %93 = load double, ptr %92, align 8, !tbaa !22
  %94 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv81) #7
  %95 = getelementptr inbounds i8, ptr %94, i64 24
  %96 = load double, ptr %95, align 8, !tbaa !22
  %97 = fsub double %93, %96
  %98 = fmul double %90, %96
  %99 = fmul double %98, 2.000000e+00
  %100 = call double @llvm.fmuladd.f64(double %97, double %87, double %99)
  %101 = fadd double %93, %96
  %102 = fdiv double %100, %101
  %103 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %78) #7
  %104 = getelementptr inbounds i8, ptr %103, i64 16
  store double %102, ptr %104, align 8, !tbaa !14
  %105 = fsub double %96, %93
  %106 = fmul double %87, %93
  %107 = fmul double %106, 2.000000e+00
  %108 = call double @llvm.fmuladd.f64(double %105, double %90, double %107)
  %109 = fdiv double %108, %101
  %110 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv81) #7
  %111 = getelementptr inbounds i8, ptr %110, i64 16
  store double %109, ptr %111, align 8, !tbaa !14
  br label %112

112:                                              ; preds = %.lr.ph70, %84
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %113 = load i32, ptr @n, align 4, !tbaa !8
  %114 = sext i32 %113 to i64
  %115 = icmp slt i64 %indvars.iv.next82, %114
  br i1 %115, label %.lr.ph70, label %._crit_edge71, !llvm.loop !23

.preheader:                                       ; preds = %.lr.ph76
  %116 = icmp sgt i32 %124, 0
  br i1 %116, label %.lr.ph78, label %._crit_edge79

.lr.ph76:                                         ; preds = %.preheader59, %.lr.ph76
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.lr.ph76 ], [ 0, %.preheader59 ]
  %117 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv84) #7
  %118 = load double, ptr %117, align 8, !tbaa !19
  %119 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv84) #7
  %120 = getelementptr inbounds i8, ptr %119, i64 8
  %121 = load i32, ptr %120, align 8, !tbaa !24
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [20 x double], ptr @res, i64 0, i64 %122
  store double %118, ptr %123, align 8, !tbaa !25
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %124 = load i32, ptr @n, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = icmp slt i64 %indvars.iv.next85, %125
  br i1 %126, label %.lr.ph76, label %.preheader, !llvm.loop !26

._crit_edge79:                                    ; preds = %.lr.ph78, %.preheader59, %.preheader
  ret i32 0

.lr.ph78:                                         ; preds = %.preheader, %.lr.ph78
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %.lr.ph78 ], [ 0, %.preheader ]
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %128 = getelementptr inbounds [20 x double], ptr @res, i64 0, i64 %indvars.iv87
  %129 = load double, ptr %128, align 8, !tbaa !25
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %127, double noundef %129)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %132 = load i32, ptr @n, align 4, !tbaa !8
  %133 = sext i32 %132 to i64
  %134 = icmp slt i64 %indvars.iv.next88, %133
  br i1 %134, label %.lr.ph78, label %._crit_edge79, !llvm.loop !27
}

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 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 #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)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairISt4pairIdiES0_IddEES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZSt9make_pairIRdS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIS2_IdiES2_IddEESt6vectorIS5_SaIS5_EEEEEvT_SB_(ptr, ptr) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt4pairIS0_IdiES0_IddEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base9precisionEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) local_unnamed_addr #2 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 #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)) #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: 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)) #6

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { "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 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 = !{!"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 = distinct !{!13, !12}
!14 = !{!15, !17, i64 16}
!15 = !{!"_ZTSSt4pairIS_IdiES_IddEE", !16, i64 0, !18, i64 16}
!16 = !{!"_ZTSSt4pairIdiE", !17, i64 0, !9, i64 8}
!17 = !{!"double", !10, i64 0}
!18 = !{!"_ZTSSt4pairIddE", !17, i64 0, !17, i64 8}
!19 = !{!15, !17, i64 0}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{!15, !17, i64 24}
!23 = distinct !{!23, !12}
!24 = !{!15, !9, i64 8}
!25 = !{!17, !17, i64 0}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}


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