; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/WF/Easy Medium/CHRL4 (A)

; 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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, 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 <{ double, i32, [4 x i8] }>

@a = external dso_local global [100100 x i32], align 16
@dp = external dso_local global [100100 x double], align 16
@ptr = external dso_local global [100100 x i32], align 16
@dq = external dso_local global %"class.std::deque", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca { double, i32 }, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca { double, i32 }, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %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) %2)
  %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) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  %28 = load i32, ptr %2, align 4, !tbaa !8
  %29 = sub nsw i32 %28, 1
  store i32 %29, ptr %4, align 4, !tbaa !8
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %31 = load i32, ptr %30, align 4, !tbaa !8
  store i32 %31, ptr %3, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %32

32:                                               ; preds = %42, %0
  %33 = load i32, ptr %5, align 4, !tbaa !8
  %34 = load i32, ptr %2, align 4, !tbaa !8
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

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

37:                                               ; preds = %32
  %38 = load i32, ptr %5, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %39
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %40)
  br label %42

42:                                               ; preds = %37
  %43 = load i32, ptr %5, align 4, !tbaa !8
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !8
  br label %32, !llvm.loop !11

45:                                               ; preds = %36
  %46 = load i32, ptr @a, align 16, !tbaa !8
  %47 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %46)
  store double %47, ptr @dp, align 16, !tbaa !13
  store i32 -1, ptr @ptr, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 1, ptr %6, align 4, !tbaa !8
  br label %48

48:                                               ; preds = %86, %45
  %49 = load i32, ptr %6, align 4, !tbaa !8
  %50 = load i32, ptr %3, align 4, !tbaa !8
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %89

53:                                               ; preds = %48
  %54 = load double, ptr @dp, align 16, !tbaa !13
  %55 = load i32, ptr %6, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !8
  %59 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %58)
  %60 = fadd double %54, %59
  %61 = load i32, ptr %6, align 4, !tbaa !8
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %62
  store double %60, ptr %63, align 8, !tbaa !13
  %64 = load i32, ptr %6, align 4, !tbaa !8
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100100 x i32], ptr @ptr, i64 0, i64 %65
  store i32 0, ptr %66, align 4, !tbaa !8
  br label %67

67:                                               ; preds = %80, %53
  %68 = call noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  br i1 %68, label %78, label %69

69:                                               ; preds = %67
  %70 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  %71 = getelementptr inbounds %"struct.std::pair", ptr %70, i32 0, i32 0
  %72 = load double, ptr %71, align 8, !tbaa !15
  %73 = load i32, ptr %6, align 4, !tbaa !8
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !13
  %77 = fcmp oge double %72, %76
  br label %78

78:                                               ; preds = %69, %67
  %79 = phi i1 [ false, %67 ], [ %77, %69 ]
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  br label %67, !llvm.loop !17

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  %82 = load i32, ptr %6, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %83
  %85 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store { double, i32 } %85, 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 @_ZNSt5dequeISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @dq, ptr noundef nonnull align 8 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  br label %86

86:                                               ; preds = %81
  %87 = load i32, ptr %6, align 4, !tbaa !8
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %6, align 4, !tbaa !8
  br label %48, !llvm.loop !18

89:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %90 = load i32, ptr %3, align 4, !tbaa !8
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %9, align 4, !tbaa !8
  br label %92

92:                                               ; preds = %144, %89
  %93 = load i32, ptr %9, align 4, !tbaa !8
  %94 = load i32, ptr %2, align 4, !tbaa !8
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

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

97:                                               ; preds = %92
  %98 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  %99 = getelementptr inbounds %"struct.std::pair", ptr %98, i32 0, i32 0
  %100 = load double, ptr %99, align 8, !tbaa !15
  %101 = load i32, ptr %9, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !8
  %105 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %104)
  %106 = fadd double %100, %105
  %107 = load i32, ptr %9, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %108
  store double %106, ptr %109, align 8, !tbaa !13
  %110 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  %111 = getelementptr inbounds %"struct.std::pair", ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 8, !tbaa !19
  %113 = load i32, ptr %9, align 4, !tbaa !8
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100100 x i32], ptr @ptr, i64 0, i64 %114
  store i32 %112, ptr %115, align 4, !tbaa !8
  %116 = load i32, ptr %9, align 4, !tbaa !8
  %117 = load i32, ptr %3, align 4, !tbaa !8
  %118 = sub nsw i32 %116, %117
  %119 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  %120 = getelementptr inbounds %"struct.std::pair", ptr %119, i32 0, i32 1
  %121 = load i32, ptr %120, align 8, !tbaa !19
  %122 = icmp eq i32 %118, %121
  br i1 %122, label %123, label %124

123:                                              ; preds = %97
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  br label %124

124:                                              ; preds = %123, %97
  br label %125

125:                                              ; preds = %138, %124
  %126 = call noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  br i1 %126, label %136, label %127

127:                                              ; preds = %125
  %128 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  %129 = getelementptr inbounds %"struct.std::pair", ptr %128, i32 0, i32 0
  %130 = load double, ptr %129, align 8, !tbaa !15
  %131 = load i32, ptr %9, align 4, !tbaa !8
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !13
  %135 = fcmp oge double %130, %134
  br label %136

136:                                              ; preds = %127, %125
  %137 = phi i1 [ false, %125 ], [ %135, %127 ]
  br i1 %137, label %138, label %139

138:                                              ; preds = %136
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #8
  br label %125, !llvm.loop !20

139:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  %140 = load i32, ptr %9, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %141
  %143 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store { double, i32 } %143, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %11, i64 12, i1 false)
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @dq, ptr noundef nonnull align 8 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  br label %144

144:                                              ; preds = %139
  %145 = load i32, ptr %9, align 4, !tbaa !8
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %9, align 4, !tbaa !8
  br label %92, !llvm.loop !21

147:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 1, ptr %12, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store i64 1000000007, ptr %13, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %148 = load i32, ptr %2, align 4, !tbaa !8
  %149 = sub nsw i32 %148, 1
  store i32 %149, ptr %14, align 4, !tbaa !8
  br label %150

150:                                              ; preds = %153, %147
  %151 = load i32, ptr %14, align 4, !tbaa !8
  %152 = icmp ne i32 %151, -1
  br i1 %152, label %153, label %166

153:                                              ; preds = %150
  %154 = load i64, ptr %12, align 8, !tbaa !22
  %155 = load i32, ptr %14, align 4, !tbaa !8
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !8
  %159 = sext i32 %158 to i64
  %160 = mul nsw i64 %154, %159
  %161 = srem i64 %160, 1000000007
  store i64 %161, ptr %12, align 8, !tbaa !22
  %162 = load i32, ptr %14, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [100100 x i32], ptr @ptr, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !8
  store i32 %165, ptr %14, align 4, !tbaa !8
  br label %150, !llvm.loop !24

166:                                              ; preds = %150
  %167 = load i64, ptr %12, align 8, !tbaa !22
  %168 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %167)
  %169 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %168, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  ret i32 0
}

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(12)) #5 align 2

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #2 align 2

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree 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 = !{!16, !14, i64 0}
!16 = !{!"_ZTSSt4pairIdiE", !14, i64 0, !9, i64 8}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{!16, !9, i64 8}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = !{!23, !23, i64 0}
!23 = !{!"long long", !10, i64 0}
!24 = distinct !{!24, !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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, 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 <{ double, i32, [4 x i8] }>

@a = external dso_local global [100100 x i32], align 16
@dp = external dso_local global [100100 x double], align 16
@ptr = external dso_local local_unnamed_addr global [100100 x i32], align 16
@dq = external dso_local global %"class.std::deque", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

._crit_edge:                                      ; preds = %.lr.ph, %0
  %27 = load i32, ptr @a, align 16, !tbaa !8
  %28 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %27)
  store double %28, ptr @dp, align 16, !tbaa !11
  store i32 -1, ptr @ptr, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 1, ptr %4, align 4, !tbaa !8
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %.not23 = icmp slt i32 %29, 1
  br i1 %.not23, label %._crit_edge27, label %.lr.ph26

.lr.ph26:                                         ; preds = %._crit_edge
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  br label %37

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %30 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %indvars.iv
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = load i32, ptr %1, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next, %33
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge27:                                    ; preds = %.critedge, %._crit_edge
  %storemerge17.in31 = phi i32 [ %29, %._crit_edge ], [ %64, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %storemerge1732 = add nsw i32 %storemerge17.in31, 1
  store i32 %storemerge1732, ptr %6, align 4, !tbaa !8
  %35 = load i32, ptr %1, align 4, !tbaa !8
  %36 = icmp slt i32 %storemerge1732, %35
  br i1 %36, label %.lr.ph34, label %._crit_edge35

.lr.ph34:                                         ; preds = %._crit_edge27
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  br label %66

37:                                               ; preds = %.lr.ph26, %.critedge
  %storemerge24 = phi i32 [ 1, %.lr.ph26 ], [ %63, %.critedge ]
  %38 = load double, ptr @dp, align 16, !tbaa !11
  %39 = sext i32 %storemerge24 to i64
  %40 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !8
  %42 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %41)
  %43 = fadd double %38, %42
  %44 = load i32, ptr %4, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %45
  store double %43, ptr %46, align 8, !tbaa !11
  %47 = getelementptr inbounds [100100 x i32], ptr @ptr, i64 0, i64 %45
  store i32 0, ptr %47, align 4, !tbaa !8
  %48 = call noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  br i1 %48, label %.critedge, label %.lr.ph21

.lr.ph21:                                         ; preds = %37, %56
  %49 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = load i32, ptr %4, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = fcmp ult double %50, %54
  br i1 %55, label %.critedge, label %56

56:                                               ; preds = %.lr.ph21
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  %57 = call noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  br i1 %57, label %.critedge, label %.lr.ph21, !llvm.loop !17

.critedge:                                        ; preds = %.lr.ph21, %56, %37
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %58 = load i32, ptr %4, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %59
  %61 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %.fca.0.extract7 = extractvalue { double, i32 } %61, 0
  %.fca.1.extract8 = extractvalue { double, i32 } %61, 1
  store double %.fca.0.extract7, ptr %5, align 8
  store i32 %.fca.1.extract8, ptr %.sroa.210.0..sroa_idx, align 8
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @dq, ptr noundef nonnull align 8 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %4, align 4, !tbaa !8
  %64 = load i32, ptr %2, align 4, !tbaa !8
  %.not.not = icmp slt i32 %62, %64
  br i1 %.not.not, label %37, label %._crit_edge27, !llvm.loop !18

._crit_edge35:                                    ; preds = %.critedge2, %._crit_edge27
  %.lcssa = phi i32 [ %35, %._crit_edge27 ], [ %106, %.critedge2 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %.not1836 = icmp eq i32 %.lcssa, 0
  br i1 %.not1836, label %._crit_edge41, label %.lr.ph40.preheader

.lr.ph40.preheader:                               ; preds = %._crit_edge35
  %65 = add nsw i32 %.lcssa, -1
  br label %.lr.ph40

66:                                               ; preds = %.lr.ph34, %.critedge2
  %67 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  %68 = load double, ptr %67, align 8, !tbaa !15
  %69 = load i32, ptr %6, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = call noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %72)
  %74 = fadd double %68, %73
  %75 = load i32, ptr %6, align 4, !tbaa !8
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %76
  store double %74, ptr %77, align 8, !tbaa !11
  %78 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  %80 = load i32, ptr %79, align 8, !tbaa !19
  %81 = load i32, ptr %6, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100100 x i32], ptr @ptr, i64 0, i64 %82
  store i32 %80, ptr %83, align 4, !tbaa !8
  %84 = load i32, ptr %2, align 4, !tbaa !8
  %85 = sub nsw i32 %81, %84
  %86 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  %87 = getelementptr inbounds i8, ptr %86, i64 8
  %88 = load i32, ptr %87, align 8, !tbaa !19
  %89 = icmp eq i32 %85, %88
  br i1 %89, label %90, label %91

90:                                               ; preds = %66
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  br label %91

91:                                               ; preds = %90, %66
  %92 = call noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  br i1 %92, label %.critedge2, label %.lr.ph29

.lr.ph29:                                         ; preds = %91, %100
  %93 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt5dequeISt4pairIdiESaIS1_EE4backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  %94 = load double, ptr %93, align 8, !tbaa !15
  %95 = load i32, ptr %6, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !11
  %99 = fcmp ult double %94, %98
  br i1 %99, label %.critedge2, label %100

100:                                              ; preds = %.lr.ph29
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  %101 = call noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) @dq) #7
  br i1 %101, label %.critedge2, label %.lr.ph29, !llvm.loop !20

.critedge2:                                       ; preds = %.lr.ph29, %100, %91
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %102 = load i32, ptr %6, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100100 x double], ptr @dp, i64 0, i64 %103
  %105 = call { double, i32 } @_ZSt9make_pairIRdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %.fca.0.extract = extractvalue { double, i32 } %105, 0
  %.fca.1.extract = extractvalue { double, i32 } %105, 1
  store double %.fca.0.extract, ptr %7, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNSt5dequeISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80) @dq, ptr noundef nonnull align 8 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  %storemerge17.in = load i32, ptr %6, align 4, !tbaa !8
  %storemerge17 = add nsw i32 %storemerge17.in, 1
  store i32 %storemerge17, ptr %6, align 4, !tbaa !8
  %106 = load i32, ptr %1, align 4, !tbaa !8
  %107 = icmp slt i32 %storemerge17, %106
  br i1 %107, label %66, label %._crit_edge35, !llvm.loop !21

.lr.ph40:                                         ; preds = %.lr.ph40.preheader, %.lr.ph40
  %.038 = phi i32 [ %115, %.lr.ph40 ], [ %65, %.lr.ph40.preheader ]
  %.01537 = phi i64 [ %113, %.lr.ph40 ], [ 1, %.lr.ph40.preheader ]
  %108 = sext i32 %.038 to i64
  %109 = getelementptr inbounds [100100 x i32], ptr @a, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %111 = sext i32 %110 to i64
  %112 = mul nsw i64 %.01537, %111
  %113 = srem i64 %112, 1000000007
  %114 = getelementptr inbounds [100100 x i32], ptr @ptr, i64 0, i64 %108
  %115 = load i32, ptr %114, align 4, !tbaa !8
  %.not18 = icmp eq i32 %115, -1
  br i1 %.not18, label %._crit_edge41, label %.lr.ph40, !llvm.loop !22

._crit_edge41:                                    ; preds = %.lr.ph40, %._crit_edge35
  %.015.lcssa = phi i64 [ 1, %._crit_edge35 ], [ %113, %.lr.ph40 ]
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.015.lcssa)
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0
}

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

; 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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5dequeISt4pairIdiESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5dequeISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #5 align 2

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

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

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

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

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

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


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