; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/CROC 2016 - Elimination Round (Rated Unofficial Edition)/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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@dp = external dso_local global [2001000 x i64], align 16
@sum = external dso_local global [2001000 x i64], align 16
@last = external dso_local global [2001000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %10 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %18
  %20 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = 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)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %24 = load i32, ptr @k, align 4, !tbaa !8
  %25 = icmp eq i32 %24, 1
  br i1 %25, label %26, label %34

26:                                               ; preds = %0
  %27 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #6
  %28 = load i32, ptr @n, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  %30 = add i64 %27, %29
  %31 = add i64 %30, 1
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %31)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  br label %237

34:                                               ; preds = %0
  store i64 1, ptr @dp, align 16, !tbaa !11
  store i64 1, ptr @sum, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %35 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #6
  %36 = trunc i64 %35 to i32
  store i32 %36, ptr %2, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %37

37:                                               ; preds = %118, %34
  %38 = load i32, ptr %3, align 4, !tbaa !8
  %39 = load i32, ptr %2, align 4, !tbaa !8
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %121

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %43 = load i32, ptr %3, align 4, !tbaa !8
  %44 = sub nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %45)
  %47 = load i8, ptr %46, align 1, !tbaa !13
  %48 = sext i8 %47 to i32
  %49 = sub nsw i32 %48, 97
  store i32 %49, ptr %4, align 4, !tbaa !8
  %50 = load i32, ptr %3, align 4, !tbaa !8
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !11
  %55 = load i32, ptr %4, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = sub nsw i64 %58, 1
  %60 = icmp sge i64 %59, 0
  br i1 %60, label %61, label %69

61:                                               ; preds = %42
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !11
  %66 = sub nsw i64 %65, 1
  %67 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !11
  br label %70

69:                                               ; preds = %42
  br label %70

70:                                               ; preds = %69, %61
  %71 = phi i64 [ %68, %61 ], [ 0, %69 ]
  %72 = sub nsw i64 %54, %71
  %73 = load i32, ptr %3, align 4, !tbaa !8
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %74
  store i64 %72, ptr %75, align 8, !tbaa !11
  %76 = load i32, ptr %3, align 4, !tbaa !8
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !11
  %80 = icmp sge i64 %79, 1000000007
  br i1 %80, label %81, label %87

81:                                               ; preds = %70
  %82 = load i32, ptr %3, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %86 = sub nsw i64 %85, 1000000007
  store i64 %86, ptr %84, align 8, !tbaa !11
  br label %87

87:                                               ; preds = %81, %70
  %88 = load i32, ptr %3, align 4, !tbaa !8
  %89 = sub nsw i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !11
  %93 = load i32, ptr %3, align 4, !tbaa !8
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !11
  %97 = add nsw i64 %92, %96
  %98 = load i32, ptr %3, align 4, !tbaa !8
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %99
  store i64 %97, ptr %100, align 8, !tbaa !11
  %101 = load i32, ptr %3, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !11
  %105 = icmp sge i64 %104, 1000000007
  br i1 %105, label %106, label %112

106:                                              ; preds = %87
  %107 = load i32, ptr %3, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !11
  %111 = sub nsw i64 %110, 1000000007
  store i64 %111, ptr %109, align 8, !tbaa !11
  br label %112

112:                                              ; preds = %106, %87
  %113 = load i32, ptr %3, align 4, !tbaa !8
  %114 = sext i32 %113 to i64
  %115 = load i32, ptr %4, align 4, !tbaa !8
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %116
  store i64 %114, ptr %117, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %118

118:                                              ; preds = %112
  %119 = load i32, ptr %3, align 4, !tbaa !8
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %3, align 4, !tbaa !8
  br label %37, !llvm.loop !14

121:                                              ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %122 = load i32, ptr %2, align 4, !tbaa !8
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %5, align 4, !tbaa !8
  br label %124

124:                                              ; preds = %225, %121
  %125 = load i32, ptr %5, align 4, !tbaa !8
  %126 = load i32, ptr %2, align 4, !tbaa !8
  %127 = load i32, ptr @n, align 4, !tbaa !8
  %128 = add nsw i32 %126, %127
  %129 = icmp sle i32 %125, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %124
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %228

131:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1000000000, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %132

132:                                              ; preds = %153, %131
  %133 = load i32, ptr %9, align 4, !tbaa !8
  %134 = load i32, ptr @k, align 4, !tbaa !8
  %135 = icmp slt i32 %133, %134
  br i1 %135, label %137, label %136

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

137:                                              ; preds = %132
  %138 = load i32, ptr %9, align 4, !tbaa !8
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %139
  %141 = load i64, ptr %140, align 8, !tbaa !11
  %142 = load i32, ptr %7, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  %144 = icmp slt i64 %141, %143
  br i1 %144, label %145, label %152

145:                                              ; preds = %137
  %146 = load i32, ptr %9, align 4, !tbaa !8
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %147
  %149 = load i64, ptr %148, align 8, !tbaa !11
  %150 = trunc i64 %149 to i32
  store i32 %150, ptr %7, align 4, !tbaa !8
  %151 = load i32, ptr %9, align 4, !tbaa !8
  store i32 %151, ptr %8, align 4, !tbaa !8
  br label %152

152:                                              ; preds = %145, %137
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %9, align 4, !tbaa !8
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %9, align 4, !tbaa !8
  br label %132, !llvm.loop !16

156:                                              ; preds = %136
  %157 = load i32, ptr %5, align 4, !tbaa !8
  %158 = sub nsw i32 %157, 1
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %159
  %161 = load i64, ptr %160, align 8, !tbaa !11
  %162 = load i32, ptr %8, align 4, !tbaa !8
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %163
  %165 = load i64, ptr %164, align 8, !tbaa !11
  %166 = sub nsw i64 %165, 1
  %167 = icmp sge i64 %166, 0
  br i1 %167, label %168, label %176

168:                                              ; preds = %156
  %169 = load i32, ptr %8, align 4, !tbaa !8
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !11
  %173 = sub nsw i64 %172, 1
  %174 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %173
  %175 = load i64, ptr %174, align 8, !tbaa !11
  br label %177

176:                                              ; preds = %156
  br label %177

177:                                              ; preds = %176, %168
  %178 = phi i64 [ %175, %168 ], [ 0, %176 ]
  %179 = sub nsw i64 %161, %178
  %180 = load i32, ptr %5, align 4, !tbaa !8
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %181
  store i64 %179, ptr %182, align 8, !tbaa !11
  %183 = load i32, ptr %5, align 4, !tbaa !8
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !11
  %187 = icmp sge i64 %186, 1000000007
  br i1 %187, label %188, label %194

188:                                              ; preds = %177
  %189 = load i32, ptr %5, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %190
  %192 = load i64, ptr %191, align 8, !tbaa !11
  %193 = sub nsw i64 %192, 1000000007
  store i64 %193, ptr %191, align 8, !tbaa !11
  br label %194

194:                                              ; preds = %188, %177
  %195 = load i32, ptr %5, align 4, !tbaa !8
  %196 = sub nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !11
  %200 = load i32, ptr %5, align 4, !tbaa !8
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %201
  %203 = load i64, ptr %202, align 8, !tbaa !11
  %204 = add nsw i64 %199, %203
  %205 = load i32, ptr %5, align 4, !tbaa !8
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %206
  store i64 %204, ptr %207, align 8, !tbaa !11
  %208 = load i32, ptr %5, align 4, !tbaa !8
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %209
  %211 = load i64, ptr %210, align 8, !tbaa !11
  %212 = icmp sge i64 %211, 1000000007
  br i1 %212, label %213, label %219

213:                                              ; preds = %194
  %214 = load i32, ptr %5, align 4, !tbaa !8
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %215
  %217 = load i64, ptr %216, align 8, !tbaa !11
  %218 = sub nsw i64 %217, 1000000007
  store i64 %218, ptr %216, align 8, !tbaa !11
  br label %219

219:                                              ; preds = %213, %194
  %220 = load i32, ptr %5, align 4, !tbaa !8
  %221 = sext i32 %220 to i64
  %222 = load i32, ptr %8, align 4, !tbaa !8
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %223
  store i64 %221, ptr %224, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %225

225:                                              ; preds = %219
  %226 = load i32, ptr %5, align 4, !tbaa !8
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %5, align 4, !tbaa !8
  br label %124, !llvm.loop !17

228:                                              ; preds = %130
  %229 = load i32, ptr @n, align 4, !tbaa !8
  %230 = load i32, ptr %2, align 4, !tbaa !8
  %231 = add nsw i32 %229, %230
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %232
  %234 = load i64, ptr %233, align 8, !tbaa !11
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %234)
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %235, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %237

237:                                              ; preds = %228, %26
  %238 = load i32, ptr %1, align 4
  ret i32 %238
}

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4 align 2

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

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

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


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@_Z1sB5cxx11 = external dso_local global %"class.std::__cxx11::basic_string", align 8
@dp = external dso_local local_unnamed_addr global [2001000 x i64], align 16
@sum = external dso_local local_unnamed_addr global [2001000 x i64], align 16
@last = external dso_local local_unnamed_addr global [2001000 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) @k)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11)
  %15 = load i32, ptr @k, align 4, !tbaa !8
  %16 = icmp eq i32 %15, 1
  br i1 %16, label %17, label %24

17:                                               ; preds = %0
  %18 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #5
  %19 = load i32, ptr @n, align 4, !tbaa !8
  %20 = sext i32 %19 to i64
  %21 = add i64 %18, 1
  %22 = add i64 %21, %20
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %22)
  br label %133

24:                                               ; preds = %0
  store i64 1, ptr @dp, align 16, !tbaa !11
  store i64 1, ptr @sum, align 16, !tbaa !11
  %25 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11) #5
  %26 = trunc i64 %25 to i32
  %.not65 = icmp slt i32 %26, 1
  %.pre = add i32 %26, 1
  br i1 %.not65, label %.preheader64, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %24
  %wide.trip.count = zext i32 %.pre to i64
  br label %.lr.ph

.preheader64:                                     ; preds = %101, %24
  %27 = load i32, ptr @n, align 4, !tbaa !8
  %28 = add nsw i32 %27, %26
  %.not57.not72 = icmp sgt i32 %27, 0
  br i1 %.not57.not72, label %.preheader.lr.ph, label %.preheader64.._crit_edge76_crit_edge

.preheader64.._crit_edge76_crit_edge:             ; preds = %.preheader64
  %.pre91 = sext i32 %28 to i64
  br label %._crit_edge76

.preheader.lr.ph:                                 ; preds = %.preheader64
  %29 = load i32, ptr @k, align 4, !tbaa !8
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.preheader.us.preheader, label %.preheader.lr.ph.split

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %31 = sext i32 %.pre to i64
  %32 = sext i32 %28 to i64
  %wide.trip.count86 = zext nneg i32 %29 to i64
  %xtraiter = and i64 %wide.trip.count86, 3
  %33 = icmp ult i32 %29, 4
  %unroll_iter = and i64 %wide.trip.count86, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %38
  %indvars.iv88 = phi i64 [ %31, %.preheader.us.preheader ], [ %indvars.iv.next89, %38 ]
  %.04274.us = phi i32 [ undef, %.preheader.us.preheader ], [ %spec.select62.us.lcssa, %38 ]
  %.045.in73.us = phi i64 [ %25, %.preheader.us.preheader ], [ %indvars.iv88, %38 ]
  br i1 %33, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new

34:                                               ; preds = %._crit_edge.us
  %35 = add nsw i64 %83, -1
  %36 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !11
  br label %38

38:                                               ; preds = %34, %._crit_edge.us
  %39 = phi i64 [ %37, %34 ], [ 0, %._crit_edge.us ]
  %40 = sub nsw i64 %80, %39
  %41 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %indvars.iv88
  %42 = icmp sgt i64 %40, 1000000006
  %43 = add nsw i64 %40, -1000000007
  %spec.select63.us = select i1 %42, i64 %43, i64 %40
  store i64 %spec.select63.us, ptr %41, align 8, !tbaa !11
  %44 = add nsw i64 %spec.select63.us, %80
  %45 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %indvars.iv88
  %46 = icmp sgt i64 %44, 1000000006
  %47 = add nsw i64 %44, -1000000007
  %storemerge58.us = select i1 %46, i64 %47, i64 %44
  store i64 %storemerge58.us, ptr %45, align 8, !tbaa !11
  store i64 %indvars.iv88, ptr %82, align 8, !tbaa !11
  %indvars.iv.next89 = add nsw i64 %indvars.iv88, 1
  %.not57.not.us = icmp slt i64 %indvars.iv88, %32
  br i1 %.not57.not.us, label %.preheader.us, label %._crit_edge76, !llvm.loop !13

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %indvars.iv83 = phi i64 [ %indvars.iv.next84.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %.168.us = phi i32 [ %spec.select62.us.3, %.preheader.us.new ], [ %.04274.us, %.preheader.us ]
  %.04367.us = phi i32 [ %spec.select61.us.3, %.preheader.us.new ], [ 1000000000, %.preheader.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader.us.new ], [ 0, %.preheader.us ]
  %48 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %indvars.iv83
  %49 = load i64, ptr %48, align 16, !tbaa !11
  %50 = sext i32 %.04367.us to i64
  %51 = icmp slt i64 %49, %50
  %52 = trunc i64 %49 to i32
  %spec.select61.us = select i1 %51, i32 %52, i32 %.04367.us
  %53 = trunc nuw nsw i64 %indvars.iv83 to i32
  %spec.select62.us = select i1 %51, i32 %53, i32 %.168.us
  %indvars.iv.next84 = or disjoint i64 %indvars.iv83, 1
  %54 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %indvars.iv.next84
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = sext i32 %spec.select61.us to i64
  %57 = icmp slt i64 %55, %56
  %58 = trunc i64 %55 to i32
  %spec.select61.us.1 = select i1 %57, i32 %58, i32 %spec.select61.us
  %59 = trunc nuw nsw i64 %indvars.iv.next84 to i32
  %spec.select62.us.1 = select i1 %57, i32 %59, i32 %spec.select62.us
  %indvars.iv.next84.1 = or disjoint i64 %indvars.iv83, 2
  %60 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %indvars.iv.next84.1
  %61 = load i64, ptr %60, align 16, !tbaa !11
  %62 = sext i32 %spec.select61.us.1 to i64
  %63 = icmp slt i64 %61, %62
  %64 = trunc i64 %61 to i32
  %spec.select61.us.2 = select i1 %63, i32 %64, i32 %spec.select61.us.1
  %65 = trunc nuw nsw i64 %indvars.iv.next84.1 to i32
  %spec.select62.us.2 = select i1 %63, i32 %65, i32 %spec.select62.us.1
  %indvars.iv.next84.2 = or disjoint i64 %indvars.iv83, 3
  %66 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %indvars.iv.next84.2
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = sext i32 %spec.select61.us.2 to i64
  %69 = icmp slt i64 %67, %68
  %70 = trunc i64 %67 to i32
  %spec.select61.us.3 = select i1 %69, i32 %70, i32 %spec.select61.us.2
  %71 = trunc nuw nsw i64 %indvars.iv.next84.2 to i32
  %spec.select62.us.3 = select i1 %69, i32 %71, i32 %spec.select62.us.2
  %indvars.iv.next84.3 = add nuw nsw i64 %indvars.iv83, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !15

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader.us.new, %.preheader.us
  %spec.select62.us.lcssa.ph = phi i32 [ poison, %.preheader.us ], [ %spec.select62.us.3, %.preheader.us.new ]
  %indvars.iv83.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next84.3, %.preheader.us.new ]
  %.168.us.unr = phi i32 [ %.04274.us, %.preheader.us ], [ %spec.select62.us.3, %.preheader.us.new ]
  %.04367.us.unr = phi i32 [ 1000000000, %.preheader.us ], [ %spec.select61.us.3, %.preheader.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %indvars.iv83.epil = phi i64 [ %indvars.iv.next84.epil, %.epil.preheader ], [ %indvars.iv83.unr, %._crit_edge.us.unr-lcssa ]
  %.168.us.epil = phi i32 [ %spec.select62.us.epil, %.epil.preheader ], [ %.168.us.unr, %._crit_edge.us.unr-lcssa ]
  %.04367.us.epil = phi i32 [ %spec.select61.us.epil, %.epil.preheader ], [ %.04367.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %72 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %indvars.iv83.epil
  %73 = load i64, ptr %72, align 8, !tbaa !11
  %74 = sext i32 %.04367.us.epil to i64
  %75 = icmp slt i64 %73, %74
  %76 = trunc i64 %73 to i32
  %spec.select61.us.epil = select i1 %75, i32 %76, i32 %.04367.us.epil
  %77 = trunc nuw nsw i64 %indvars.iv83.epil to i32
  %spec.select62.us.epil = select i1 %75, i32 %77, i32 %.168.us.epil
  %indvars.iv.next84.epil = add nuw nsw i64 %indvars.iv83.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.us, label %.epil.preheader, !llvm.loop !16

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %spec.select62.us.lcssa = phi i32 [ %spec.select62.us.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %spec.select62.us.epil, %.epil.preheader ]
  %sext92 = shl i64 %.045.in73.us, 32
  %78 = ashr exact i64 %sext92, 32
  %79 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !11
  %81 = sext i32 %spec.select62.us.lcssa to i64
  %82 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !11
  %84 = icmp sgt i64 %83, 0
  br i1 %84, label %34, label %38

.preheader.lr.ph.split:                           ; preds = %.preheader.lr.ph
  %last.promoted = load i64, ptr @last, align 16, !tbaa !11
  %85 = sext i32 %.pre to i64
  %86 = sext i32 %28 to i64
  br label %.preheader

.lr.ph:                                           ; preds = %.lr.ph.preheader, %101
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %101 ]
  %87 = add nsw i64 %indvars.iv, -1
  %88 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) @_Z1sB5cxx11, i64 noundef %87)
  %89 = load i8, ptr %88, align 1, !tbaa !18
  %90 = sext i8 %89 to i64
  %91 = add nsw i64 %90, -97
  %92 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %87
  %93 = load i64, ptr %92, align 8, !tbaa !11
  %94 = getelementptr inbounds [2001000 x i64], ptr @last, i64 0, i64 %91
  %95 = load i64, ptr %94, align 8, !tbaa !11
  %96 = icmp sgt i64 %95, 0
  br i1 %96, label %97, label %101

97:                                               ; preds = %.lr.ph
  %98 = add nsw i64 %95, -1
  %99 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !11
  br label %101

101:                                              ; preds = %.lr.ph, %97
  %102 = phi i64 [ %100, %97 ], [ 0, %.lr.ph ]
  %103 = sub nsw i64 %93, %102
  %104 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %indvars.iv
  %105 = icmp sgt i64 %103, 1000000006
  %106 = add nsw i64 %103, -1000000007
  %spec.select = select i1 %105, i64 %106, i64 %103
  store i64 %spec.select, ptr %104, align 8, !tbaa !11
  %107 = add nsw i64 %spec.select, %93
  %108 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %indvars.iv
  %109 = icmp sgt i64 %107, 1000000006
  %110 = add nsw i64 %107, -1000000007
  %storemerge60 = select i1 %109, i64 %110, i64 %107
  store i64 %storemerge60, ptr %108, align 8, !tbaa !11
  store i64 %indvars.iv, ptr %94, align 8, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader64, label %.lr.ph, !llvm.loop !19

.preheader:                                       ; preds = %.preheader.lr.ph.split, %123
  %indvars.iv80 = phi i64 [ %85, %.preheader.lr.ph.split ], [ %indvars.iv.next81, %123 ]
  %111 = phi i64 [ %last.promoted, %.preheader.lr.ph.split ], [ %indvars.iv80, %123 ]
  %.045.in73 = phi i64 [ %25, %.preheader.lr.ph.split ], [ %indvars.iv80, %123 ]
  %sext = shl i64 %.045.in73, 32
  %112 = ashr exact i64 %sext, 32
  %113 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !11
  %115 = icmp sgt i64 %111, 0
  br i1 %115, label %119, label %123

._crit_edge76.split:                              ; preds = %123
  store i64 %indvars.iv80, ptr @last, align 16, !tbaa !11
  br label %._crit_edge76

._crit_edge76:                                    ; preds = %38, %.preheader64.._crit_edge76_crit_edge, %._crit_edge76.split
  %.pre-phi = phi i64 [ %.pre91, %.preheader64.._crit_edge76_crit_edge ], [ %86, %._crit_edge76.split ], [ %32, %38 ]
  %116 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %.pre-phi
  %117 = load i64, ptr %116, align 8, !tbaa !11
  %118 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %117)
  br label %133

119:                                              ; preds = %.preheader
  %120 = add nsw i64 %111, -1
  %121 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !11
  br label %123

123:                                              ; preds = %.preheader, %119
  %124 = phi i64 [ %122, %119 ], [ 0, %.preheader ]
  %125 = sub nsw i64 %114, %124
  %126 = getelementptr inbounds [2001000 x i64], ptr @dp, i64 0, i64 %indvars.iv80
  %127 = icmp sgt i64 %125, 1000000006
  %128 = add nsw i64 %125, -1000000007
  %spec.select63 = select i1 %127, i64 %128, i64 %125
  store i64 %spec.select63, ptr %126, align 8, !tbaa !11
  %129 = add nsw i64 %spec.select63, %114
  %130 = getelementptr inbounds [2001000 x i64], ptr @sum, i64 0, i64 %indvars.iv80
  %131 = icmp sgt i64 %129, 1000000006
  %132 = add nsw i64 %129, -1000000007
  %storemerge58 = select i1 %131, i64 %132, i64 %129
  store i64 %storemerge58, ptr %130, align 8, !tbaa !11
  %indvars.iv.next81 = add nsw i64 %indvars.iv80, 1
  %.not57.not = icmp slt i64 %indvars.iv80, %86
  br i1 %.not57.not, label %.preheader, label %._crit_edge76.split, !llvm.loop !13

133:                                              ; preds = %._crit_edge76, %17
  %.sink = phi ptr [ %118, %._crit_edge76 ], [ %23, %17 ]
  %134 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !14}


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