; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2016.03 (diamond)

; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7binSrchiPii(i32 noundef, ptr noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::basic_ifstream", align 8
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [50000 x i32], align 16
  %9 = alloca [50000 x i32], align 16
  %10 = alloca [50000 x i32], align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %2, ptr noundef @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.1, i32 noundef 16)
          to label %18 unwind label %28

18:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %20 unwind label %32

20:                                               ; preds = %18
  %21 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %22 unwind label %32

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %42, %22
  %24 = load i32, ptr %12, align 4, !tbaa !5
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %36, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %49

28:                                               ; preds = %0
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %4, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %5, align 4
  br label %185

32:                                               ; preds = %49, %20, %18
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %4, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %5, align 4
  br label %184

36:                                               ; preds = %23
  %37 = load i32, ptr %12, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [50000 x i32], ptr %8, i64 0, i64 %38
  %40 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %39)
          to label %41 unwind label %45

41:                                               ; preds = %36
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %12, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %12, align 4, !tbaa !5
  br label %23, !llvm.loop !9

45:                                               ; preds = %36
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %4, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %184

49:                                               ; preds = %27
  %50 = getelementptr inbounds [50000 x i32], ptr %8, i64 0, i64 0
  %51 = getelementptr inbounds [50000 x i32], ptr %8, i64 0, i64 0
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef %50, ptr noundef %54)
          to label %55 unwind label %32

55:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %76, %55
  %57 = load i32, ptr %13, align 4, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = icmp slt i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %79

61:                                               ; preds = %56
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = getelementptr inbounds [50000 x i32], ptr %8, i64 0, i64 0
  %64 = load i32, ptr %13, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [50000 x i32], ptr %8, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = add nsw i32 %67, %68
  %70 = call noundef i32 @_Z7binSrchiPii(i32 noundef %62, ptr noundef %63, i32 noundef %69)
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = sub nsw i32 %70, %71
  %73 = load i32, ptr %13, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %74
  store i32 %72, ptr %75, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %61
  %77 = load i32, ptr %13, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %13, align 4, !tbaa !5
  br label %56, !llvm.loop !11

79:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %80 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  %81 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  %82 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %82, i64 %84
  %86 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef %81, ptr noundef %85)
          to label %87 unwind label %127

87:                                               ; preds = %79
  %88 = invoke noundef i64 @_ZSt8distanceIPiENSt15iterator_traitsIT_E15difference_typeES2_S2_(ptr noundef %80, ptr noundef %86)
          to label %89 unwind label %127

89:                                               ; preds = %87
  %90 = trunc i64 %88 to i32
  store i32 %90, ptr %14, align 4, !tbaa !5
  %91 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 0
  %92 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 0
  %93 = load i32, ptr %14, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %92, i64 %94
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %91, ptr noundef %95, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %96 unwind label %127

96:                                               ; preds = %89
  br label %97

97:                                               ; preds = %125, %96
  %98 = load i32, ptr %14, align 4, !tbaa !5
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %135

101:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %102 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  %103 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  %104 = load i32, ptr %14, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %103, i64 %105
  %107 = getelementptr inbounds i32, ptr %106, i64 1
  %108 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i32, ptr %108, i64 %110
  %112 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef %107, ptr noundef %111)
          to label %113 unwind label %131

113:                                              ; preds = %101
  %114 = invoke noundef i64 @_ZSt8distanceIPiENSt15iterator_traitsIT_E15difference_typeES2_S2_(ptr noundef %102, ptr noundef %112)
          to label %115 unwind label %131

115:                                              ; preds = %113
  %116 = trunc i64 %114 to i32
  store i32 %116, ptr %15, align 4, !tbaa !5
  %117 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 0
  %118 = load i32, ptr %14, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 0
  %122 = load i32, ptr %15, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %121, i64 %123
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %120, ptr noundef %124, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %125 unwind label %131

125:                                              ; preds = %115
  %126 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %126, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %97, !llvm.loop !12

127:                                              ; preds = %179, %175, %89, %87, %79
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %4, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %5, align 4
  br label %183

131:                                              ; preds = %115, %113, %101
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %4, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %183

135:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %168, %135
  %137 = load i32, ptr %16, align 4, !tbaa !5
  %138 = load i32, ptr %6, align 4, !tbaa !5
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = sub nsw i32 %139, 1
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sub nsw i32 %138, %143
  %145 = icmp slt i32 %137, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %175

147:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %148 = load i32, ptr %16, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = load i32, ptr %16, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = load i32, ptr %16, align 4, !tbaa !5
  %157 = add nsw i32 %155, %156
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add nsw i32 %151, %163
  store i32 %164, ptr %17, align 4, !tbaa !5
  %165 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %166 unwind label %171

166:                                              ; preds = %147
  %167 = load i32, ptr %165, align 4, !tbaa !5
  store i32 %167, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %168

168:                                              ; preds = %166
  %169 = load i32, ptr %16, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %16, align 4, !tbaa !5
  br label %136, !llvm.loop !13

171:                                              ; preds = %147
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %4, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %183

175:                                              ; preds = %146
  %176 = load i32, ptr %11, align 4, !tbaa !5
  %177 = add nsw i32 %176, 2
  %178 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %177)
          to label %179 unwind label %127

179:                                              ; preds = %175
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %178, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %181 unwind label %127

181:                                              ; preds = %179
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #7
  %182 = load i32, ptr %1, align 4
  ret i32 %182

183:                                              ; preds = %171, %131, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %184

184:                                              ; preds = %183, %45, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #7
  br label %185

185:                                              ; preds = %184, %28
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #7
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr %4, align 8
  %188 = load i32, ptr %5, align 4
  %189 = insertvalue { ptr, i32 } poison, ptr %187, 0
  %190 = insertvalue { ptr, i32 } %189, i32 %188, 1
  resume { ptr, i32 } %190
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIPiENSt15iterator_traitsIT_E15difference_typeES2_S2_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) #5

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { 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 #4 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"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::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7binSrchiPii(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::basic_ifstream", align 8
  %2 = alloca %"class.std::basic_ofstream", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca [50000 x i32], align 16
  %6 = alloca [50000 x i32], align 16
  %7 = alloca [50000 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %1) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.1, i32 noundef 16)
          to label %12 unwind label %21

12:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  %13 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %14 unwind label %23

14:                                               ; preds = %12
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %.preheader30 unwind label %23

.preheader30:                                     ; preds = %14
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %.preheader30.._crit_edge_crit_edge

.preheader30.._crit_edge_crit_edge:               ; preds = %.preheader30
  %.pre = sext i32 %16 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %27, %.preheader30.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader30.._crit_edge_crit_edge ], [ %29, %27 ]
  %18 = getelementptr inbounds i32, ptr %5, i64 %.pre-phi
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull %5, ptr noundef nonnull %18)
          to label %.preheader29 unwind label %23

.preheader29:                                     ; preds = %._crit_edge
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph35, label %.preheader29.._crit_edge36_crit_edge

.preheader29.._crit_edge36_crit_edge:             ; preds = %.preheader29
  %.pre51 = sext i32 %19 to i64
  br label %._crit_edge36

21:                                               ; preds = %0
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %114

23:                                               ; preds = %._crit_edge, %14, %12
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %113

.lr.ph:                                           ; preds = %.preheader30, %27
  %indvars.iv = phi i64 [ %indvars.iv.next, %27 ], [ 0, %.preheader30 ]
  %25 = getelementptr inbounds [50000 x i32], ptr %5, i64 0, i64 %indvars.iv
  %26 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %27 unwind label %31

27:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %.lr.ph, label %._crit_edge, !llvm.loop !9

31:                                               ; preds = %.lr.ph
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %113

._crit_edge36:                                    ; preds = %.lr.ph35, %.preheader29.._crit_edge36_crit_edge
  %.pre-phi52 = phi i64 [ %.pre51, %.preheader29.._crit_edge36_crit_edge ], [ %45, %.lr.ph35 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %33 = getelementptr inbounds i32, ptr %6, i64 %.pre-phi52
  %34 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef nonnull %6, ptr noundef nonnull %33)
          to label %47 unwind label %81

.lr.ph35:                                         ; preds = %.preheader29, %.lr.ph35
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %.lr.ph35 ], [ 0, %.preheader29 ]
  %35 = phi i32 [ %44, %.lr.ph35 ], [ %19, %.preheader29 ]
  %36 = getelementptr inbounds [50000 x i32], ptr %5, i64 0, i64 %indvars.iv45
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add nsw i32 %38, %37
  %40 = call noundef i32 @_Z7binSrchiPii(i32 noundef %35, ptr noundef nonnull %5, i32 noundef %39)
  %41 = trunc nuw nsw i64 %indvars.iv45 to i32
  %42 = sub nsw i32 %40, %41
  %43 = getelementptr inbounds [50000 x i32], ptr %6, i64 0, i64 %indvars.iv45
  store i32 %42, ptr %43, align 4, !tbaa !5
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next46, %45
  br i1 %46, label %.lr.ph35, label %._crit_edge36, !llvm.loop !11

47:                                               ; preds = %._crit_edge36
  %48 = invoke noundef i64 @_ZSt8distanceIPiENSt15iterator_traitsIT_E15difference_typeES2_S2_(ptr noundef nonnull %6, ptr noundef %34)
          to label %49 unwind label %81

49:                                               ; preds = %47
  %50 = trunc i64 %48 to i32
  store i32 %50, ptr %9, align 4, !tbaa !5
  %sext = shl i64 %48, 32
  %51 = ashr exact i64 %sext, 30
  %52 = getelementptr inbounds i8, ptr %7, i64 %51
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %7, ptr noundef nonnull %52, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %.preheader28 unwind label %81

.preheader28:                                     ; preds = %49
  %invariant.gep = getelementptr inbounds i8, ptr %6, i64 4
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %.lr.ph38, label %.preheader

.preheader:                                       ; preds = %77, %.preheader28
  %56 = phi i32 [ %54, %.preheader28 ], [ %79, %77 ]
  %57 = add nsw i32 %56, -1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [50000 x i32], ptr %6, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = icmp sgt i32 %56, %60
  br i1 %61, label %.lr.ph40, label %._crit_edge41

.lr.ph38:                                         ; preds = %.preheader28, %77
  %62 = phi i32 [ %79, %77 ], [ %54, %.preheader28 ]
  %63 = phi i32 [ %78, %77 ], [ %53, %.preheader28 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %64 = sext i32 %63 to i64
  %gep = getelementptr i32, ptr %invariant.gep, i64 %64
  %65 = sext i32 %62 to i64
  %66 = getelementptr inbounds i32, ptr %6, i64 %65
  %67 = invoke noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef nonnull %gep, ptr noundef nonnull %66)
          to label %68 unwind label %83

68:                                               ; preds = %.lr.ph38
  %69 = invoke noundef i64 @_ZSt8distanceIPiENSt15iterator_traitsIT_E15difference_typeES2_S2_(ptr noundef nonnull %6, ptr noundef %67)
          to label %70 unwind label %83

70:                                               ; preds = %68
  %71 = trunc i64 %69 to i32
  store i32 %71, ptr %10, align 4, !tbaa !5
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i32, ptr %7, i64 %73
  %sext23 = shl i64 %69, 32
  %75 = ashr exact i64 %sext23, 30
  %76 = getelementptr inbounds i8, ptr %7, i64 %75
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %74, ptr noundef nonnull %76, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %77 unwind label %83

77:                                               ; preds = %70
  %78 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %78, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %.lr.ph38, label %.preheader, !llvm.loop !12

81:                                               ; preds = %109, %._crit_edge41, %49, %47, %._crit_edge36
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %112

83:                                               ; preds = %70, %68, %.lr.ph38
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  br label %112

._crit_edge41.loopexit:                           ; preds = %.lr.ph40
  %85 = add nsw i32 %100, 2
  br label %._crit_edge41

._crit_edge41:                                    ; preds = %._crit_edge41.loopexit, %.preheader
  %86 = phi i32 [ %85, %._crit_edge41.loopexit ], [ 2, %.preheader ]
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %86)
          to label %109 unwind label %81

.lr.ph40:                                         ; preds = %.preheader, %.lr.ph40
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.lr.ph40 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %88 = getelementptr inbounds [50000 x i32], ptr %6, i64 0, i64 %indvars.iv48
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = trunc nuw nsw i64 %indvars.iv48 to i32
  %91 = add nsw i32 %89, %90
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [50000 x i32], ptr %6, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = add nsw i32 %97, %89
  store i32 %98, ptr %11, align 4, !tbaa !5
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %100 = load i32, ptr %99, align 4, !tbaa !5
  store i32 %100, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = add nsw i32 %101, -1
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [50000 x i32], ptr %6, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = sub nsw i32 %101, %105
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %indvars.iv.next49, %107
  br i1 %108, label %.lr.ph40, label %._crit_edge41.loopexit, !llvm.loop !13

109:                                              ; preds = %._crit_edge41
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %111 unwind label %81

111:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #7
  ret i32 0

112:                                              ; preds = %83, %81
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  br label %113

113:                                              ; preds = %112, %31, %23
  %.pn25 = phi { ptr, i32 } [ %32, %31 ], [ %.pn, %112 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 200000, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #7
  br label %114

114:                                              ; preds = %113, %21
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %113 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn25.pn
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPiEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIPiENSt15iterator_traitsIT_E15difference_typeES2_S2_(ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11max_elementIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

; 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 #3 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 void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { 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 #4 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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