; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2016.01 (angry)

; 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 }
%"struct.std::_Setprecision" = type { i32 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 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 uwtable
declare dso_local noundef double @_Z8binSrch2iiPiS_S_(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 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 [50000 x i32], align 16
  %8 = alloca [49999 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
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca %"struct.std::_Setprecision", 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 %23 unwind label %31

23:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 199996, 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
  %24 = 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 %25 unwind label %35

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

26:                                               ; preds = %45, %25
  %27 = load i32, ptr %11, align 4, !tbaa !5
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %39, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %52

31:                                               ; preds = %0
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %4, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %5, align 4
  br label %266

35:                                               ; preds = %52, %23
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %4, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %5, align 4
  br label %265

39:                                               ; preds = %26
  %40 = load i32, ptr %11, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %41
  %43 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %42)
          to label %44 unwind label %48

44:                                               ; preds = %39
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %11, align 4, !tbaa !5
  br label %26, !llvm.loop !9

48:                                               ; preds = %39
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %4, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %265

52:                                               ; preds = %30
  %53 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 0
  %54 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 0
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds i32, ptr %54, i64 %56
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef %53, ptr noundef %57)
          to label %58 unwind label %35

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

59:                                               ; preds = %79, %58
  %60 = load i32, ptr %12, align 4, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sub nsw i32 %61, 1
  %63 = icmp slt i32 %60, %62
  br i1 %63, label %65, label %64

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

65:                                               ; preds = %59
  %66 = load i32, ptr %12, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sub nsw i32 %70, %74
  %76 = load i32, ptr %12, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [49999 x i32], ptr %8, i64 0, i64 %77
  store i32 %75, ptr %78, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %65
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %12, align 4, !tbaa !5
  br label %59, !llvm.loop !11

82:                                               ; preds = %64
  %83 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  store i32 0, ptr %83, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %137, %82
  %85 = load i32, ptr %13, align 4, !tbaa !5
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %89, label %88

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

89:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %90 = load i32, ptr %13, align 4, !tbaa !5
  %91 = sub nsw i32 %90, 1
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %14, align 4, !tbaa !5
  %96 = load i32, ptr %13, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [49999 x i32], ptr %8, i64 0, i64 %98
  %100 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %99)
          to label %101 unwind label %140

101:                                              ; preds = %89
  %102 = load i32, ptr %100, align 4, !tbaa !5
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %104
  store i32 %102, ptr %105, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  %106 = load i32, ptr %13, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 0
  %111 = load i32, ptr %13, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = load i32, ptr %13, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sub nsw i32 %114, %118
  %120 = call noundef i32 @_Z7binSrchiPii(i32 noundef %109, ptr noundef %110, i32 noundef %119)
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %15, align 4, !tbaa !5
  %125 = load i32, ptr %13, align 4, !tbaa !5
  %126 = sub nsw i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [49999 x i32], ptr %8, i64 0, i64 %127
  %129 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %128)
          to label %130 unwind label %144

130:                                              ; preds = %101
  %131 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %108, ptr noundef nonnull align 4 dereferenceable(4) %129)
          to label %132 unwind label %144

132:                                              ; preds = %130
  %133 = load i32, ptr %131, align 4, !tbaa !5
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 %135
  store i32 %133, ptr %136, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %137

137:                                              ; preds = %132
  %138 = load i32, ptr %13, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %13, align 4, !tbaa !5
  br label %84, !llvm.loop !12

140:                                              ; preds = %89
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %4, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %148

144:                                              ; preds = %130, %101
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %4, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %148

148:                                              ; preds = %144, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %265

149:                                              ; preds = %88
  %150 = load i32, ptr %6, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %152
  store i32 0, ptr %153, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %154 = load i32, ptr %6, align 4, !tbaa !5
  %155 = sub nsw i32 %154, 2
  store i32 %155, ptr %16, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %207, %149
  %157 = load i32, ptr %16, align 4, !tbaa !5
  %158 = icmp sge i32 %157, 0
  br i1 %158, label %160, label %159

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

160:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %161 = load i32, ptr %16, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %17, align 4, !tbaa !5
  %167 = load i32, ptr %16, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [49999 x i32], ptr %8, i64 0, i64 %168
  %170 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %169)
          to label %171 unwind label %210

171:                                              ; preds = %160
  %172 = load i32, ptr %170, align 4, !tbaa !5
  %173 = load i32, ptr %16, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %174
  store i32 %172, ptr %175, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  %176 = load i32, ptr %16, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %179 = load i32, ptr %6, align 4, !tbaa !5
  %180 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 0
  %181 = load i32, ptr %16, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %182
  %184 = load i32, ptr %183, align 4, !tbaa !5
  %185 = load i32, ptr %16, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = add nsw i32 %184, %188
  %190 = call noundef i32 @_Z7binSrchiPii(i32 noundef %179, ptr noundef %180, i32 noundef %189)
  %191 = sub nsw i32 %190, 1
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %18, align 4, !tbaa !5
  %196 = load i32, ptr %16, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [49999 x i32], ptr %8, i64 0, i64 %197
  %199 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %198)
          to label %200 unwind label %214

200:                                              ; preds = %171
  %201 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %178, ptr noundef nonnull align 4 dereferenceable(4) %199)
          to label %202 unwind label %214

202:                                              ; preds = %200
  %203 = load i32, ptr %201, align 4, !tbaa !5
  %204 = load i32, ptr %16, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 %205
  store i32 %203, ptr %206, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %207

207:                                              ; preds = %202
  %208 = load i32, ptr %16, align 4, !tbaa !5
  %209 = add nsw i32 %208, -1
  store i32 %209, ptr %16, align 4, !tbaa !5
  br label %156, !llvm.loop !13

210:                                              ; preds = %160
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %4, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %218

214:                                              ; preds = %200, %171
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %4, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %218

218:                                              ; preds = %214, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %265

219:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store double 0x7FEFFFFFFFFFFFFF, ptr %19, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %237, %219
  %221 = load i32, ptr %20, align 4, !tbaa !5
  %222 = load i32, ptr %6, align 4, !tbaa !5
  %223 = sub nsw i32 %222, 1
  %224 = icmp slt i32 %221, %223
  br i1 %224, label %226, label %225

225:                                              ; preds = %220
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %244

226:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %227 = load i32, ptr %6, align 4, !tbaa !5
  %228 = load i32, ptr %20, align 4, !tbaa !5
  %229 = getelementptr inbounds [50000 x i32], ptr %9, i64 0, i64 0
  %230 = getelementptr inbounds [50000 x i32], ptr %10, i64 0, i64 0
  %231 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 0
  %232 = invoke noundef double @_Z8binSrch2iiPiS_S_(i32 noundef %227, i32 noundef %228, ptr noundef %229, ptr noundef %230, ptr noundef %231)
          to label %233 unwind label %240

233:                                              ; preds = %226
  store double %232, ptr %21, align 8, !tbaa !14
  %234 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %235 unwind label %240

235:                                              ; preds = %233
  %236 = load double, ptr %234, align 8, !tbaa !14
  store double %236, ptr %19, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %237

237:                                              ; preds = %235
  %238 = load i32, ptr %20, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %20, align 4, !tbaa !5
  br label %220, !llvm.loop !16

240:                                              ; preds = %233, %226
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %4, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %264

244:                                              ; preds = %225
  %245 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef @_ZSt5fixedRSt8ios_base)
          to label %246 unwind label %260

246:                                              ; preds = %244
  %247 = invoke i32 @_ZSt12setprecisioni(i32 noundef 1)
          to label %248 unwind label %260

248:                                              ; preds = %246
  %249 = getelementptr inbounds %"struct.std::_Setprecision", ptr %22, i32 0, i32 0
  store i32 %247, ptr %249, align 4
  %250 = getelementptr inbounds %"struct.std::_Setprecision", ptr %22, i32 0, i32 0
  %251 = load i32, ptr %250, align 4
  %252 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %245, i32 %251)
          to label %253 unwind label %260

253:                                              ; preds = %248
  %254 = load double, ptr %19, align 8, !tbaa !14
  %255 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %252, double noundef %254)
          to label %256 unwind label %260

256:                                              ; preds = %253
  %257 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %255, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %258 unwind label %260

258:                                              ; preds = %256
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #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 199996, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 200000, 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
  %259 = load i32, ptr %1, align 4
  ret i32 %259

260:                                              ; preds = %256, %253, %248, %246, %244
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %4, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %5, align 4
  br label %264

264:                                              ; preds = %260, %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %265

265:                                              ; preds = %264, %218, %148, %48, %35
  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 199996, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 200000, 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 %266

266:                                              ; preds = %265, %31
  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 %267

267:                                              ; preds = %266
  %268 = load ptr, ptr %4, align 8
  %269 = load i32, ptr %5, align 4
  %270 = insertvalue { ptr, i32 } poison, ptr %268, 0
  %271 = insertvalue { ptr, i32 } %270, i32 %269, 1
  resume { ptr, i32 } %271
}

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #3

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

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

; 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 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 = { 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 #4 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !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 [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [10 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 uwtable
declare dso_local noundef double @_Z8binSrch2iiPiS_S_(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 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 [50000 x i32], align 16
  %5 = alloca [49999 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
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  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 %14 unwind label %32

14:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 200000, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 199996, 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
  %15 = 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 %.preheader47 unwind label %34

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

.preheader47.._crit_edge_crit_edge:               ; preds = %.preheader47
  %.pre81 = sext i32 %16 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %38, %.preheader47.._crit_edge_crit_edge
  %.pre-phi82 = phi i64 [ %.pre81, %.preheader47.._crit_edge_crit_edge ], [ %40, %38 ]
  %18 = getelementptr inbounds i32, ptr %4, i64 %.pre-phi82
  invoke void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull %4, ptr noundef nonnull %18)
          to label %.preheader unwind label %34

.preheader:                                       ; preds = %._crit_edge
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = add i32 %19, -1
  %21 = icmp sgt i32 %19, 1
  br i1 %21, label %.lr.ph52.preheader, label %._crit_edge53.thread

._crit_edge53.thread:                             ; preds = %.preheader
  store i32 0, ptr %6, align 16, !tbaa !5
  br label %._crit_edge57.thread

.lr.ph52.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %20 to i64
  %.pre = load i32, ptr %4, align 16, !tbaa !5
  %min.iters.check = icmp ult i32 %19, 9
  br i1 %min.iters.check, label %.lr.ph52.preheader88, label %vector.ph

.lr.ph52.preheader88:                             ; preds = %middle.block, %.lr.ph52.preheader
  %.ph = phi i32 [ %.pre, %.lr.ph52.preheader ], [ %vector.recur.extract, %middle.block ]
  %indvars.iv70.ph = phi i64 [ 0, %.lr.ph52.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph52

vector.ph:                                        ; preds = %.lr.ph52.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load87, %vector.body ]
  %22 = or disjoint i64 %index, 1
  %23 = getelementptr inbounds [50000 x i32], ptr %4, i64 0, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %wide.load = load <4 x i32>, ptr %23, align 4, !tbaa !5
  %wide.load87 = load <4 x i32>, ptr %24, align 4, !tbaa !5
  %25 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
  %26 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load87, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
  %27 = sub nsw <4 x i32> %wide.load, %25
  %28 = sub nsw <4 x i32> %wide.load87, %26
  %29 = getelementptr inbounds [49999 x i32], ptr %5, i64 0, i64 %index
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  store <4 x i32> %27, ptr %29, align 16, !tbaa !5
  store <4 x i32> %28, ptr %30, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %31 = icmp eq i64 %index.next, %n.vec
  br i1 %31, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %vector.recur.extract = extractelement <4 x i32> %wide.load87, i64 3
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge53, label %.lr.ph52.preheader88

32:                                               ; preds = %0
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %125

34:                                               ; preds = %._crit_edge, %14
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %124

.lr.ph:                                           ; preds = %.preheader47, %38
  %indvars.iv = phi i64 [ %indvars.iv.next, %38 ], [ 0, %.preheader47 ]
  %36 = getelementptr inbounds [50000 x i32], ptr %4, i64 0, i64 %indvars.iv
  %37 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %36)
          to label %38 unwind label %42

38:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = icmp slt i64 %indvars.iv.next, %40
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !13

42:                                               ; preds = %.lr.ph
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %124

._crit_edge53:                                    ; preds = %.lr.ph52, %middle.block
  store i32 0, ptr %6, align 16, !tbaa !5
  br i1 %21, label %.lr.ph56, label %._crit_edge57.thread

.lr.ph52:                                         ; preds = %.lr.ph52.preheader88, %.lr.ph52
  %44 = phi i32 [ %46, %.lr.ph52 ], [ %.ph, %.lr.ph52.preheader88 ]
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %.lr.ph52 ], [ %indvars.iv70.ph, %.lr.ph52.preheader88 ]
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %45 = getelementptr inbounds [50000 x i32], ptr %4, i64 0, i64 %indvars.iv.next71
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sub nsw i32 %46, %44
  %48 = getelementptr inbounds [49999 x i32], ptr %5, i64 0, i64 %indvars.iv70
  store i32 %47, ptr %48, align 4, !tbaa !5
  %exitcond.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge53, label %.lr.ph52, !llvm.loop !14

._crit_edge57.thread:                             ; preds = %._crit_edge53, %._crit_edge53.thread
  %49 = sext i32 %20 to i64
  %50 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %49
  store i32 0, ptr %50, align 4, !tbaa !5
  br label %._crit_edge62.thread

._crit_edge57:                                    ; preds = %.lr.ph56
  %.pre80 = add nsw i32 %75, -1
  %51 = sext i32 %.pre80 to i64
  %52 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %51
  store i32 0, ptr %52, align 4, !tbaa !5
  %53 = icmp sgt i32 %75, 1
  br i1 %53, label %.lr.ph61.preheader, label %._crit_edge62.thread

.lr.ph61.preheader:                               ; preds = %._crit_edge57
  %54 = add nsw i32 %75, -2
  %55 = zext nneg i32 %54 to i64
  br label %.lr.ph61

.lr.ph56:                                         ; preds = %._crit_edge53, %.lr.ph56
  %56 = phi i32 [ %74, %.lr.ph56 ], [ 0, %._crit_edge53 ]
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph56 ], [ 1, %._crit_edge53 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  %57 = add nsw i64 %indvars.iv73, -1
  %58 = add nsw i32 %56, 1
  store i32 %58, ptr %8, align 4, !tbaa !5
  %59 = getelementptr inbounds [49999 x i32], ptr %5, i64 0, i64 %57
  %60 = 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) %59)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = getelementptr inbounds [50000 x i32], ptr %6, i64 0, i64 %indvars.iv73
  store i32 %61, ptr %62, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #7
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = getelementptr inbounds [50000 x i32], ptr %4, i64 0, i64 %indvars.iv73
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = sub nsw i32 %65, %61
  %67 = call noundef i32 @_Z7binSrchiPii(i32 noundef %63, ptr noundef nonnull %4, i32 noundef %66)
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [50000 x i32], ptr %6, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %9, align 4, !tbaa !5
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %59)
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %62, ptr noundef nonnull align 4 dereferenceable(4) %72)
  %74 = load i32, ptr %73, align 4, !tbaa !5
  store i32 %74, ptr %62, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #7
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = icmp slt i64 %indvars.iv.next74, %76
  br i1 %77, label %.lr.ph56, label %._crit_edge57, !llvm.loop !15

._crit_edge62.thread:                             ; preds = %._crit_edge57, %._crit_edge57.thread
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  store double 0x7FEFFFFFFFFFFFFF, ptr %12, align 8, !tbaa !16
  br label %._crit_edge66

._crit_edge62:                                    ; preds = %.lr.ph61
  %.pre79 = load i32, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  store double 0x7FEFFFFFFFFFFFFF, ptr %12, align 8, !tbaa !16
  %78 = icmp sgt i32 %.pre79, 1
  br i1 %78, label %.lr.ph65, label %._crit_edge66

.lr.ph61:                                         ; preds = %.lr.ph61.preheader, %.lr.ph61
  %indvars.iv76 = phi i64 [ %55, %.lr.ph61.preheader ], [ %indvars.iv.next77, %.lr.ph61 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %79 = add nuw nsw i64 %indvars.iv76, 1
  %80 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %10, align 4, !tbaa !5
  %83 = getelementptr inbounds [49999 x i32], ptr %5, i64 0, i64 %indvars.iv76
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %83)
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %indvars.iv76
  store i32 %85, ptr %86, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = getelementptr inbounds [50000 x i32], ptr %4, i64 0, i64 %indvars.iv76
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = add nsw i32 %89, %85
  %91 = call noundef i32 @_Z7binSrchiPii(i32 noundef %87, ptr noundef nonnull %4, i32 noundef %90)
  %92 = add nsw i32 %91, -1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [50000 x i32], ptr %7, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %11, align 4, !tbaa !5
  %97 = call 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) %83)
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 4 dereferenceable(4) %97)
  %99 = load i32, ptr %98, align 4, !tbaa !5
  store i32 %99, ptr %86, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  %indvars.iv.next77 = add nsw i64 %indvars.iv76, -1
  %.not = icmp eq i64 %indvars.iv76, 0
  br i1 %.not, label %._crit_edge62, label %.lr.ph61, !llvm.loop !18

._crit_edge66:                                    ; preds = %103, %._crit_edge62.thread, %._crit_edge62
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
          to label %112 unwind label %121

.lr.ph65:                                         ; preds = %._crit_edge62, %103
  %101 = phi i32 [ %107, %103 ], [ %.pre79, %._crit_edge62 ]
  %.063 = phi i32 [ %106, %103 ], [ 0, %._crit_edge62 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %102 = invoke noundef double @_Z8binSrch2iiPiS_S_(i32 noundef %101, i32 noundef %.063, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %4)
          to label %103 unwind label %110

103:                                              ; preds = %.lr.ph65
  store double %102, ptr %13, align 8, !tbaa !16
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %105 = load double, ptr %104, align 8, !tbaa !16
  store double %105, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  %106 = add nuw nsw i32 %.063, 1
  %107 = load i32, ptr %3, align 4, !tbaa !5
  %108 = add nsw i32 %107, -1
  %109 = icmp slt i32 %106, %108
  br i1 %109, label %.lr.ph65, label %._crit_edge66, !llvm.loop !19

110:                                              ; preds = %.lr.ph65
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %123

112:                                              ; preds = %._crit_edge66
  %113 = call i32 @_ZSt12setprecisioni(i32 noundef 1)
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %100, i32 %113)
          to label %115 unwind label %121

115:                                              ; preds = %112
  %116 = load double, ptr %12, align 8, !tbaa !16
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %114, double noundef %116)
          to label %118 unwind label %121

118:                                              ; preds = %115
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %120 unwind label %121

120:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #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 199996, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 200000, 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

121:                                              ; preds = %118, %115, %112, %._crit_edge66
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %123

123:                                              ; preds = %121, %110
  %.pn = phi { ptr, i32 } [ %111, %110 ], [ %122, %121 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br label %124

124:                                              ; preds = %123, %42, %34
  %.pn44 = phi { ptr, i32 } [ %43, %42 ], [ %.pn, %123 ], [ %35, %34 ]
  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 199996, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 200000, 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 %125

125:                                              ; preds = %124, %32
  %.pn44.pn = phi { ptr, i32 } [ %.pn44, %124 ], [ %33, %32 ]
  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 } %.pn44.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 #2 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 #2 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 #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #3

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

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

; 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 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 = { 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 #4 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass