; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2018.02 (dirtraverse)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, 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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z6dfscntxRA100000_St6vectorIxSaIxEExRA100000_x(i64 noundef, ptr noundef nonnull align 8 dereferenceable(2400000), i64 noundef, ptr noundef nonnull align 8 dereferenceable(800000)) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsxRA100000_St6vectorIxSaIxEExRA100000_xS5_S5_x(i64 noundef, ptr noundef nonnull align 8 dereferenceable(2400000), i64 noundef, ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(800000), i64 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca [100000 x %"class.std::vector"], align 16
  %4 = alloca [100000 x i64], align 16
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca [100000 x i64], align 16
  %15 = alloca [100000 x i64], align 16
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %19 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %20 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %22
  %24 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %23, ptr noundef null)
  %25 = load ptr, ptr @stdin, align 8, !tbaa !8
  %26 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %25)
  %27 = load ptr, ptr @stdout, align 8, !tbaa !8
  %28 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 2400000, ptr %3) #6
  %30 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %3, i32 0, i32 0
  %31 = getelementptr inbounds %"class.std::vector", ptr %30, i64 100000
  br label %32

32:                                               ; preds = %32, %0
  %33 = phi ptr [ %30, %0 ], [ %34, %32 ]
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #6
  %34 = getelementptr inbounds %"class.std::vector", ptr %33, i64 1
  %35 = icmp eq ptr %34, %31
  br i1 %35, label %36, label %32

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 800000, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !11
  br label %37

37:                                               ; preds = %93, %36
  %38 = load i64, ptr %5, align 8, !tbaa !11
  %39 = load i64, ptr %2, align 8, !tbaa !11
  %40 = icmp slt i64 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  %43 = invoke 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) %7)
          to label %44 unwind label %56

44:                                               ; preds = %42
  %45 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  %46 = add nsw i64 %45, 1
  %47 = load i64, ptr %5, align 8, !tbaa !11
  %48 = getelementptr inbounds [100000 x i64], ptr %4, i64 0, i64 %47
  store i64 %46, ptr %48, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %49 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %50 unwind label %60

50:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %51

51:                                               ; preds = %72, %50
  %52 = load i64, ptr %11, align 8, !tbaa !11
  %53 = load i64, ptr %10, align 8, !tbaa !11
  %54 = icmp slt i64 %52, %53
  br i1 %54, label %64, label %55

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

56:                                               ; preds = %42
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  br label %97

60:                                               ; preds = %44
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %8, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %9, align 4
  br label %96

64:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %65 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %66 unwind label %75

66:                                               ; preds = %64
  %67 = load i64, ptr %5, align 8, !tbaa !11
  %68 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %3, i64 0, i64 %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %69 = load i64, ptr %12, align 8, !tbaa !11
  %70 = sub nsw i64 %69, 1
  store i64 %70, ptr %13, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %71 unwind label %79

71:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %72

72:                                               ; preds = %71
  %73 = load i64, ptr %11, align 8, !tbaa !11
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %11, align 8, !tbaa !11
  br label %51, !llvm.loop !13

75:                                               ; preds = %64
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %8, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %9, align 4
  br label %83

79:                                               ; preds = %66
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %8, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %83

83:                                               ; preds = %79, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %96

84:                                               ; preds = %55
  %85 = load i64, ptr %10, align 8, !tbaa !11
  %86 = icmp eq i64 %85, 0
  br i1 %86, label %87, label %92

87:                                               ; preds = %84
  %88 = load i64, ptr %5, align 8, !tbaa !11
  %89 = getelementptr inbounds [100000 x i64], ptr %4, i64 0, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !11
  %91 = add nsw i64 %90, -1
  store i64 %91, ptr %89, align 8, !tbaa !11
  br label %92

92:                                               ; preds = %87, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  br label %93

93:                                               ; preds = %92
  %94 = load i64, ptr %5, align 8, !tbaa !11
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %5, align 8, !tbaa !11
  br label %37, !llvm.loop !15

96:                                               ; preds = %83, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %97

97:                                               ; preds = %96, %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %147

98:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 800000, ptr %14) #6
  %99 = load i64, ptr %2, align 8, !tbaa !11
  %100 = invoke noundef i64 @_Z6dfscntxRA100000_St6vectorIxSaIxEExRA100000_x(i64 noundef %99, ptr noundef nonnull align 8 dereferenceable(2400000) %3, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(800000) %14)
          to label %101 unwind label %110

101:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 800000, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %102 = load i64, ptr %2, align 8, !tbaa !11
  %103 = invoke noundef i64 @_Z3dfsxRA100000_St6vectorIxSaIxEExRA100000_xS5_S5_x(i64 noundef %102, ptr noundef nonnull align 8 dereferenceable(2400000) %3, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(800000) %4, ptr noundef nonnull align 8 dereferenceable(800000) %14, ptr noundef nonnull align 8 dereferenceable(800000) %15, i64 noundef -1)
          to label %104 unwind label %114

104:                                              ; preds = %101
  store i64 %103, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store i64 0, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  store i64 1, ptr %18, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %128, %104
  %106 = load i64, ptr %18, align 8, !tbaa !11
  %107 = load i64, ptr %2, align 8, !tbaa !11
  %108 = icmp slt i64 %106, %107
  br i1 %108, label %118, label %109

109:                                              ; preds = %105
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %131

110:                                              ; preds = %98
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %8, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %9, align 4
  br label %146

114:                                              ; preds = %101
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %8, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %9, align 4
  br label %145

118:                                              ; preds = %105
  %119 = load i64, ptr %18, align 8, !tbaa !11
  %120 = getelementptr inbounds [100000 x i64], ptr %4, i64 0, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !11
  %122 = load i64, ptr %18, align 8, !tbaa !11
  %123 = getelementptr inbounds [100000 x i64], ptr %14, i64 0, i64 %122
  %124 = load i64, ptr %123, align 8, !tbaa !11
  %125 = mul nsw i64 %121, %124
  %126 = load i64, ptr %17, align 8, !tbaa !11
  %127 = add nsw i64 %126, %125
  store i64 %127, ptr %17, align 8, !tbaa !11
  br label %128

128:                                              ; preds = %118
  %129 = load i64, ptr %18, align 8, !tbaa !11
  %130 = add nsw i64 %129, 1
  store i64 %130, ptr %18, align 8, !tbaa !11
  br label %105, !llvm.loop !16

131:                                              ; preds = %109
  %132 = load i64, ptr %17, align 8, !tbaa !11
  %133 = load i64, ptr %16, align 8, !tbaa !11
  %134 = add nsw i64 %132, %133
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %134)
          to label %136 unwind label %141

136:                                              ; preds = %131
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %138 unwind label %141

138:                                              ; preds = %136
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 800000, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 800000, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 800000, ptr %4) #6
  %139 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %3, i32 0, i32 0
  %140 = getelementptr inbounds %"class.std::vector", ptr %139, i64 100000
  br label %150

141:                                              ; preds = %136, %131
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %8, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %145

145:                                              ; preds = %141, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 800000, ptr %15) #6
  br label %146

146:                                              ; preds = %145, %110
  call void @llvm.lifetime.end.p0(i64 800000, ptr %14) #6
  br label %147

147:                                              ; preds = %146, %97
  call void @llvm.lifetime.end.p0(i64 800000, ptr %4) #6
  %148 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %3, i32 0, i32 0
  %149 = getelementptr inbounds %"class.std::vector", ptr %148, i64 100000
  br label %156

150:                                              ; preds = %150, %138
  %151 = phi ptr [ %140, %138 ], [ %152, %150 ]
  %152 = getelementptr inbounds %"class.std::vector", ptr %151, i64 -1
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %152) #6
  %153 = icmp eq ptr %152, %139
  br i1 %153, label %154, label %150

154:                                              ; preds = %150
  call void @llvm.lifetime.end.p0(i64 2400000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %155 = load i32, ptr %1, align 4
  ret i32 %155

156:                                              ; preds = %156, %147
  %157 = phi ptr [ %149, %147 ], [ %158, %156 ]
  %158 = getelementptr inbounds %"class.std::vector", ptr %157, i64 -1
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %158) #6
  %159 = icmp eq ptr %158, %148
  br i1 %159, label %160, label %156

160:                                              ; preds = %156
  call void @llvm.lifetime.end.p0(i64 2400000, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %161

161:                                              ; preds = %160
  %162 = load ptr, ptr %8, align 8
  %163 = load i32, ptr %9, align 4
  %164 = insertvalue { ptr, i32 } poison, ptr %162, 0
  %165 = insertvalue { ptr, i32 } %164, i32 %163, 1
  resume { ptr, i32 } %165
}

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 ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #3

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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) #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)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!"any pointer", !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, !14}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, 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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z6dfscntxRA100000_St6vectorIxSaIxEExRA100000_x(i64 noundef, ptr noundef nonnull align 8 dereferenceable(2400000), i64 noundef, ptr noundef nonnull align 8 dereferenceable(800000)) 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsxRA100000_St6vectorIxSaIxEExRA100000_xS5_S5_x(i64 noundef, ptr noundef nonnull align 8 dereferenceable(2400000), i64 noundef, ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(800000), ptr noundef nonnull align 8 dereferenceable(800000), i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca [100000 x %"class.std::vector"], align 16
  %3 = alloca [100000 x i64], align 16
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca [100000 x i64], align 16
  %9 = alloca [100000 x i64], align 16
  %10 = tail 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 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = load ptr, ptr @stdin, align 8, !tbaa !8
  %17 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %16)
  %18 = load ptr, ptr @stdout, align 8, !tbaa !8
  %19 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 2400000, ptr nonnull %2) #7
  br label %21

21:                                               ; preds = %21, %0
  %.idx = phi i64 [ 0, %0 ], [ %.add, %21 ]
  %.ptr = getelementptr inbounds i8, ptr %2, i64 %.idx
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr) #7
  %.add = add nuw nsw i64 %.idx, 24
  %22 = icmp eq i64 %.add, 2400000
  br i1 %22, label %23, label %21

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %2, i64 2400000
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %3) #7
  %25 = load i64, ptr %1, align 8, !tbaa !11
  %26 = icmp sgt i64 %25, 0
  br i1 %26, label %.lr.ph49, label %._crit_edge50

._crit_edge50:                                    ; preds = %57, %23
  %.lcssa41 = phi i64 [ %25, %23 ], [ %59, %57 ]
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %8) #7
  %27 = invoke noundef i64 @_Z6dfscntxRA100000_St6vectorIxSaIxEExRA100000_x(i64 noundef %.lcssa41, ptr noundef nonnull align 8 dereferenceable(2400000) %2, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(800000) %8)
          to label %63 unwind label %81

.lr.ph49:                                         ; preds = %23, %57
  %.02547 = phi i64 [ %58, %57 ], [ 0, %23 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  %28 = invoke 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) %4)
          to label %29 unwind label %38

29:                                               ; preds = %.lr.ph49
  %30 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  %31 = add nsw i64 %30, 1
  %32 = getelementptr inbounds [100000 x i64], ptr %3, i64 0, i64 %.02547
  store i64 %31, ptr %32, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %.preheader38 unwind label %40

.preheader38:                                     ; preds = %29
  %34 = load i64, ptr %5, align 8, !tbaa !11
  %35 = icmp sgt i64 %34, 0
  br i1 %35, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader38
  %36 = getelementptr inbounds [100000 x %"class.std::vector"], ptr %2, i64 0, i64 %.02547
  br label %42

._crit_edge:                                      ; preds = %47, %.preheader38
  %.lcssa = phi i64 [ %34, %.preheader38 ], [ %49, %47 ]
  %37 = icmp eq i64 %.lcssa, 0
  br i1 %37, label %56, label %57

38:                                               ; preds = %.lr.ph49
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %62

40:                                               ; preds = %29
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %61

42:                                               ; preds = %.lr.ph, %47
  %.01746 = phi i64 [ 0, %.lr.ph ], [ %48, %47 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %44 unwind label %51

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %45 = load i64, ptr %6, align 8, !tbaa !11
  %46 = add nsw i64 %45, -1
  store i64 %46, ptr %7, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %47 unwind label %53

47:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %48 = add nuw nsw i64 %.01746, 1
  %49 = load i64, ptr %5, align 8, !tbaa !11
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %42, label %._crit_edge, !llvm.loop !13

51:                                               ; preds = %42
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %44
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %55

55:                                               ; preds = %53, %51
  %.pn33 = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %61

56:                                               ; preds = %._crit_edge
  store i64 %30, ptr %32, align 8, !tbaa !11
  br label %57

57:                                               ; preds = %56, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  %58 = add nuw nsw i64 %.02547, 1
  %59 = load i64, ptr %1, align 8, !tbaa !11
  %60 = icmp slt i64 %58, %59
  br i1 %60, label %.lr.ph49, label %._crit_edge50, !llvm.loop !15

61:                                               ; preds = %55, %40
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %55 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %62

62:                                               ; preds = %61, %38
  %.pn33.pn.pn = phi { ptr, i32 } [ %.pn33.pn, %61 ], [ %39, %38 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %99

63:                                               ; preds = %._crit_edge50
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %9) #7
  %64 = load i64, ptr %1, align 8, !tbaa !11
  %65 = invoke noundef i64 @_Z3dfsxRA100000_St6vectorIxSaIxEExRA100000_xS5_S5_x(i64 noundef %64, ptr noundef nonnull align 8 dereferenceable(2400000) %2, i64 noundef 0, ptr noundef nonnull align 8 dereferenceable(800000) %3, ptr noundef nonnull align 8 dereferenceable(800000) %8, ptr noundef nonnull align 8 dereferenceable(800000) %9, i64 noundef -1)
          to label %.preheader unwind label %83

.preheader:                                       ; preds = %63
  %66 = load i64, ptr %1, align 8, !tbaa !11
  %67 = icmp sgt i64 %66, 1
  br i1 %67, label %.lr.ph54.preheader, label %._crit_edge55

.lr.ph54.preheader:                               ; preds = %.preheader
  %68 = add nsw i64 %66, -1
  %min.iters.check = icmp ult i64 %66, 5
  br i1 %min.iters.check, label %.lr.ph54.preheader70, label %vector.ph

.lr.ph54.preheader70:                             ; preds = %middle.block, %.lr.ph54.preheader
  %.053.ph = phi i64 [ 1, %.lr.ph54.preheader ], [ %ind.end, %middle.block ]
  %.01652.ph = phi i64 [ 0, %.lr.ph54.preheader ], [ %78, %middle.block ]
  br label %.lr.ph54

vector.ph:                                        ; preds = %.lr.ph54.preheader
  %n.vec = and i64 %68, -4
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %75, %vector.body ]
  %vec.phi66 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %76, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %69 = getelementptr inbounds [100000 x i64], ptr %3, i64 0, i64 %offset.idx
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %wide.load = load <2 x i64>, ptr %69, align 8, !tbaa !11
  %wide.load67 = load <2 x i64>, ptr %70, align 8, !tbaa !11
  %71 = getelementptr inbounds [100000 x i64], ptr %8, i64 0, i64 %offset.idx
  %72 = getelementptr inbounds i8, ptr %71, i64 16
  %wide.load68 = load <2 x i64>, ptr %71, align 8, !tbaa !11
  %wide.load69 = load <2 x i64>, ptr %72, align 8, !tbaa !11
  %73 = mul nsw <2 x i64> %wide.load68, %wide.load
  %74 = mul nsw <2 x i64> %wide.load69, %wide.load67
  %75 = add <2 x i64> %73, %vec.phi
  %76 = add <2 x i64> %74, %vec.phi66
  %index.next = add nuw i64 %index, 4
  %77 = icmp eq i64 %index.next, %n.vec
  br i1 %77, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %76, %75
  %78 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %68, %n.vec
  br i1 %cmp.n, label %._crit_edge55, label %.lr.ph54.preheader70

._crit_edge55:                                    ; preds = %.lr.ph54, %middle.block, %.preheader
  %.016.lcssa = phi i64 [ 0, %.preheader ], [ %78, %middle.block ], [ %90, %.lr.ph54 ]
  %79 = add nsw i64 %.016.lcssa, %65
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %79)
          to label %92 unwind label %95

81:                                               ; preds = %._crit_edge50
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %98

83:                                               ; preds = %63
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %97

.lr.ph54:                                         ; preds = %.lr.ph54.preheader70, %.lr.ph54
  %.053 = phi i64 [ %91, %.lr.ph54 ], [ %.053.ph, %.lr.ph54.preheader70 ]
  %.01652 = phi i64 [ %90, %.lr.ph54 ], [ %.01652.ph, %.lr.ph54.preheader70 ]
  %85 = getelementptr inbounds [100000 x i64], ptr %3, i64 0, i64 %.053
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = getelementptr inbounds [100000 x i64], ptr %8, i64 0, i64 %.053
  %88 = load i64, ptr %87, align 8, !tbaa !11
  %89 = mul nsw i64 %88, %86
  %90 = add nsw i64 %89, %.01652
  %91 = add nuw nsw i64 %.053, 1
  %exitcond.not = icmp eq i64 %91, %66
  br i1 %exitcond.not, label %._crit_edge55, label %.lr.ph54, !llvm.loop !19

92:                                               ; preds = %._crit_edge55
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %94 unwind label %95

94:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %3) #7
  br label %100

95:                                               ; preds = %92, %._crit_edge55
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %97

97:                                               ; preds = %95, %83
  %.pn = phi { ptr, i32 } [ %96, %95 ], [ %84, %83 ]
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %9) #7
  br label %98

98:                                               ; preds = %97, %81
  %.pn.pn = phi { ptr, i32 } [ %.pn, %97 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %8) #7
  br label %99

99:                                               ; preds = %98, %62
  %.pn33.pn.pn.pn = phi { ptr, i32 } [ %.pn33.pn.pn, %62 ], [ %.pn.pn, %98 ]
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %3) #7
  br label %105

100:                                              ; preds = %100, %94
  %101 = phi ptr [ %24, %94 ], [ %102, %100 ]
  %102 = getelementptr inbounds i8, ptr %101, i64 -24
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %102) #7
  %103 = icmp eq ptr %102, %2
  br i1 %103, label %104, label %100

104:                                              ; preds = %100
  call void @llvm.lifetime.end.p0(i64 2400000, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

105:                                              ; preds = %105, %99
  %106 = phi ptr [ %24, %99 ], [ %107, %105 ]
  %107 = getelementptr inbounds i8, ptr %106, i64 -24
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %107) #7
  %108 = icmp eq ptr %107, %2
  br i1 %108, label %109, label %105

109:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 2400000, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn33.pn.pn.pn
}

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 ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #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 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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"any pointer", !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, !14, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !14, !18, !17}


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