; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2018.02 (snowboots)

; 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::array" = type { [250 x i32] }
%"struct.std::array.0" = type { [250 x %"struct.std::pair"] }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::array.1" = type { [250 x %"struct.std::array"] }

@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 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 %"struct.std::array", align 4
  %9 = alloca %"struct.std::array.0", align 4
  %10 = alloca %"struct.std::array.1", align 4
  %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 i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i8, align 1
  %24 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #6
  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) #6
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.1, i32 noundef 16)
          to label %25 unwind label %36

25:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 1000, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 2000, ptr %9) #6
  invoke void @_ZNSt5arrayISt4pairIiiELm250EEC2Ev(ptr noundef nonnull align 4 dereferenceable(2000) %9)
          to label %26 unwind label %40

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 250000, ptr %10) #6
  %27 = 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 %28 unwind label %44

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %30 unwind label %44

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %54, %30
  %32 = load i32, ptr %11, align 4, !tbaa !5
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %48, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %61

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

40:                                               ; preds = %25
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %4, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %5, align 4
  br label %235

44:                                               ; preds = %28, %26
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %4, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %5, align 4
  br label %234

48:                                               ; preds = %31
  %49 = load i32, ptr %11, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %8, i64 noundef %50) #6
  %52 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %51)
          to label %53 unwind label %57

53:                                               ; preds = %48
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %11, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %11, align 4, !tbaa !5
  br label %31, !llvm.loop !9

57:                                               ; preds = %48
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %4, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %234

61:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %80, %61
  %63 = load i32, ptr %12, align 4, !tbaa !5
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %87

67:                                               ; preds = %62
  %68 = load i32, ptr %12, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %9, i64 noundef %69) #6
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %70) #6
  %72 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %71)
          to label %73 unwind label %83

73:                                               ; preds = %67
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %9, i64 noundef %75) #6
  %77 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %76) #6
  %78 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %72, ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %79 unwind label %83

79:                                               ; preds = %73
  br label %80

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

83:                                               ; preds = %73, %67
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %4, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %234

87:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %153, %87
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %94 = load i32, ptr %13, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %9, i64 noundef %95) #6
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %96) #6
  %98 = load i32, ptr %97, align 4, !tbaa !5
  store i32 %98, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %9, i64 noundef %100) #6
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %101) #6
  %103 = load i32, ptr %102, align 4, !tbaa !5
  store i32 %103, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sub nsw i32 %104, 1
  store i32 %105, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %106 = load i32, ptr %6, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  store i32 %107, ptr %18, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %149, %93
  %109 = load i32, ptr %18, align 4, !tbaa !5
  %110 = icmp sge i32 %109, 0
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %152

112:                                              ; preds = %108
  %113 = load i32, ptr %18, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %8, i64 noundef %114) #6
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = icmp sgt i32 %116, %117
  br i1 %118, label %119, label %126

119:                                              ; preds = %112
  %120 = load i32, ptr %13, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %10, i64 noundef %121) #6
  %123 = load i32, ptr %18, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %122, i64 noundef %124) #6
  store i32 -1, ptr %125, align 4, !tbaa !5
  br label %149

126:                                              ; preds = %112
  %127 = load i32, ptr %17, align 4, !tbaa !5
  %128 = load i32, ptr %18, align 4, !tbaa !5
  %129 = sub nsw i32 %127, %128
  %130 = load i32, ptr %16, align 4, !tbaa !5
  %131 = icmp sle i32 %129, %130
  br i1 %131, label %132, label %140

132:                                              ; preds = %126
  %133 = load i32, ptr %18, align 4, !tbaa !5
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %10, i64 noundef %135) #6
  %137 = load i32, ptr %17, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %136, i64 noundef %138) #6
  store i32 %133, ptr %139, align 4, !tbaa !5
  br label %147

140:                                              ; preds = %126
  %141 = load i32, ptr %13, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %10, i64 noundef %142) #6
  %144 = load i32, ptr %17, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %143, i64 noundef %145) #6
  store i32 -1, ptr %146, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %140, %132
  %148 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %148, ptr %17, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %147, %119
  %150 = load i32, ptr %18, align 4, !tbaa !5
  %151 = add nsw i32 %150, -1
  store i32 %151, ptr %18, align 4, !tbaa !5
  br label %108, !llvm.loop !12

152:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %13, align 4, !tbaa !5
  br label %88, !llvm.loop !13

156:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %216, %156
  %158 = load i32, ptr %19, align 4, !tbaa !5
  %159 = load i32, ptr %6, align 4, !tbaa !5
  %160 = sub nsw i32 %159, 1
  %161 = icmp slt i32 %158, %160
  br i1 %161, label %162, label %222

162:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = sub nsw i32 %163, 1
  store i32 %164, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  store i8 0, ptr %23, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = sub nsw i32 %165, 1
  store i32 %166, ptr %24, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %214, %194, %162
  %168 = load i32, ptr %24, align 4, !tbaa !5
  %169 = load i32, ptr %19, align 4, !tbaa !5
  %170 = icmp sge i32 %168, %169
  br i1 %170, label %182, label %171

171:                                              ; preds = %167
  %172 = load i32, ptr %24, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %8, i64 noundef %173) #6
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = load i32, ptr %20, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %9, i64 noundef %177) #6
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %178) #6
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = icmp sgt i32 %175, %180
  br label %182

182:                                              ; preds = %171, %167
  %183 = phi i1 [ true, %167 ], [ %181, %171 ]
  br i1 %183, label %185, label %184

184:                                              ; preds = %182
  store i32 16, ptr %14, align 4
  br label %215

185:                                              ; preds = %182
  %186 = load i32, ptr %20, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %10, i64 noundef %187) #6
  %189 = load i32, ptr %24, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %188, i64 noundef %190) #6
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = icmp eq i32 %192, -1
  br i1 %193, label %194, label %198

194:                                              ; preds = %185
  %195 = load i32, ptr %24, align 4, !tbaa !5
  %196 = add nsw i32 %195, -1
  store i32 %196, ptr %24, align 4, !tbaa !5
  store i8 1, ptr %23, align 1, !tbaa !14
  %197 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %197, ptr %22, align 4, !tbaa !5
  br label %167, !llvm.loop !16

198:                                              ; preds = %185
  %199 = load i8, ptr %23, align 1, !tbaa !14, !range !17, !noundef !18
  %200 = trunc i8 %199 to i1
  br i1 %200, label %201, label %203

201:                                              ; preds = %198
  store i8 0, ptr %23, align 1, !tbaa !14
  %202 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %202, ptr %22, align 4, !tbaa !5
  br label %203

203:                                              ; preds = %201, %198
  %204 = load i32, ptr %20, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %10, i64 noundef %205) #6
  %207 = load i32, ptr %24, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %206, i64 noundef %208) #6
  %210 = load i32, ptr %209, align 4, !tbaa !5
  store i32 %210, ptr %24, align 4, !tbaa !5
  %211 = load i32, ptr %24, align 4, !tbaa !5
  %212 = icmp eq i32 %211, 0
  br i1 %212, label %213, label %214

213:                                              ; preds = %203
  store i32 16, ptr %14, align 4
  br label %215

214:                                              ; preds = %203
  br label %167, !llvm.loop !16

215:                                              ; preds = %213, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %217, ptr %19, align 4, !tbaa !5
  %218 = load i32, ptr %20, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %20, align 4, !tbaa !5
  %220 = load i32, ptr %21, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %157, !llvm.loop !19

222:                                              ; preds = %157
  %223 = load i32, ptr %21, align 4, !tbaa !5
  %224 = sub nsw i32 %223, 1
  %225 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %224)
          to label %226 unwind label %230

226:                                              ; preds = %222
  %227 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %225, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %228 unwind label %230

228:                                              ; preds = %226
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 250000, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 2000, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1000, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #6
  %229 = load i32, ptr %1, align 4
  ret i32 %229

230:                                              ; preds = %226, %222
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %4, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %234

234:                                              ; preds = %230, %83, %57, %44
  call void @llvm.lifetime.end.p0(i64 250000, ptr %10) #6
  br label %235

235:                                              ; preds = %234, %40
  call void @llvm.lifetime.end.p0(i64 2000, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1000, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  br label %236

236:                                              ; preds = %235, %36
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %2) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr %2) #6
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %4, align 8
  %239 = load i32, ptr %5, align 4
  %240 = insertvalue { ptr, i32 } poison, ptr %238, 0
  %241 = insertvalue { ptr, i32 } %240, i32 %239, 1
  resume { ptr, i32 } %241
}

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

; 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(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayISt4pairIiiELm250EEC2Ev(ptr noundef nonnull align 4 dereferenceable(2000)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000), i64 noundef) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000), i64 noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000), i64 noundef) #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !10}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !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 }
%"struct.std::array" = type { [250 x i32] }
%"struct.std::array.0" = type { [250 x %"struct.std::pair"] }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::array.1" = type { [250 x %"struct.std::array"] }

@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 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 %"struct.std::array", align 4
  %6 = alloca %"struct.std::array.0", align 4
  %7 = alloca %"struct.std::array.1", align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %1) #6
  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) #6
  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 %8 unwind label %17

8:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 2000, ptr nonnull %6) #6
  invoke void @_ZNSt5arrayISt4pairIiiELm250EEC2Ev(ptr noundef nonnull align 4 dereferenceable(2000) %6)
          to label %9 unwind label %19

9:                                                ; preds = %8
  call void @llvm.lifetime.start.p0(i64 250000, ptr nonnull %7) #6
  %10 = 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 %11 unwind label %21

11:                                               ; preds = %9
  %12 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %.preheader74 unwind label %21

.preheader74:                                     ; preds = %11
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %.preheader73

.preheader73:                                     ; preds = %25, %.preheader74
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph77, label %.preheader71

17:                                               ; preds = %0
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %124

19:                                               ; preds = %8
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %123

21:                                               ; preds = %11, %9
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %122

.lr.ph:                                           ; preds = %.preheader74, %25
  %indvars.iv = phi i64 [ %indvars.iv.next, %25 ], [ 0, %.preheader74 ]
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %5, i64 noundef %indvars.iv) #6
  %24 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %23)
          to label %25 unwind label %29

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

29:                                               ; preds = %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %122

.preheader72:                                     ; preds = %39
  %31 = icmp sgt i32 %40, 0
  br i1 %31, label %.lr.ph82, label %.preheader71

.lr.ph77:                                         ; preds = %.preheader73, %39
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %39 ], [ 0, %.preheader73 ]
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %6, i64 noundef %indvars.iv88) #6
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %32) #6
  %34 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %35 unwind label %43

35:                                               ; preds = %.lr.ph77
  %36 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %6, i64 noundef %indvars.iv88) #6
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %36) #6
  %38 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 4 dereferenceable(4) %37)
          to label %39 unwind label %43

39:                                               ; preds = %35
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = icmp slt i64 %indvars.iv.next89, %41
  br i1 %42, label %.lr.ph77, label %.preheader72, !llvm.loop !11

43:                                               ; preds = %35, %.lr.ph77
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %122

.preheader71:                                     ; preds = %._crit_edge, %.preheader73, %.preheader72
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = icmp sgt i32 %45, 1
  br i1 %46, label %.preheader.preheader, label %._crit_edge86

.preheader.preheader:                             ; preds = %.preheader71
  %47 = add nsw i32 %45, -1
  br label %.preheader

.lr.ph82:                                         ; preds = %.preheader72, %._crit_edge
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %._crit_edge ], [ 0, %.preheader72 ]
  %48 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %6, i64 noundef %indvars.iv94) #6
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %48) #6
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %6, i64 noundef %indvars.iv94) #6
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %51) #6
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph80.preheader, label %._crit_edge

.lr.ph80.preheader:                               ; preds = %.lr.ph82
  %56 = add nsw i32 %54, -1
  %57 = zext nneg i32 %56 to i64
  br label %.lr.ph80

._crit_edge:                                      ; preds = %75, %.lr.ph82
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next95, %59
  br i1 %60, label %.lr.ph82, label %.preheader71, !llvm.loop !12

.lr.ph80:                                         ; preds = %.lr.ph80.preheader, %75
  %indvars.iv91 = phi i64 [ %57, %.lr.ph80.preheader ], [ %indvars.iv.next92, %75 ]
  %.05378 = phi i32 [ %56, %.lr.ph80.preheader ], [ %.154, %75 ]
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %5, i64 noundef %indvars.iv91) #6
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp sgt i32 %62, %50
  br i1 %63, label %64, label %67

64:                                               ; preds = %.lr.ph80
  %65 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %7, i64 noundef %indvars.iv94) #6
  %66 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %65, i64 noundef %indvars.iv91) #6
  store i32 -1, ptr %66, align 4, !tbaa !5
  br label %75

67:                                               ; preds = %.lr.ph80
  %68 = trunc nuw nsw i64 %indvars.iv91 to i32
  %69 = sub nsw i32 %.05378, %68
  %.not66 = icmp sgt i32 %69, %53
  %70 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %7, i64 noundef %indvars.iv94) #6
  %71 = sext i32 %.05378 to i64
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %70, i64 noundef %71) #6
  br i1 %.not66, label %74, label %73

73:                                               ; preds = %67
  store i32 %68, ptr %72, align 4, !tbaa !5
  br label %75

74:                                               ; preds = %67
  store i32 -1, ptr %72, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %73, %74, %64
  %.154 = phi i32 [ %.05378, %64 ], [ %68, %74 ], [ %68, %73 ]
  %indvars.iv.next92 = add nsw i64 %indvars.iv91, -1
  %76 = icmp sgt i64 %indvars.iv91, 0
  br i1 %76, label %.lr.ph80, label %._crit_edge, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.preheader, %.loopexit
  %indvars.iv97 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next98, %.loopexit ]
  %77 = phi i32 [ %47, %.preheader.preheader ], [ %114, %.loopexit ]
  %.05183 = phi i32 [ 0, %.preheader.preheader ], [ %.2, %.loopexit ]
  br label %.backedge.outer

.backedge.outer:                                  ; preds = %.loopexit104, %.preheader
  %.047.ph = phi i32 [ %.05183, %.loopexit104 ], [ %77, %.preheader ]
  %.0.ph = phi i32 [ %107, %.loopexit104 ], [ %77, %.preheader ]
  %.not.peel = icmp slt i32 %.0.ph, %.05183
  %78 = sext i32 %.0.ph to i64
  br i1 %.not.peel, label %79, label %.critedge.peel

79:                                               ; preds = %.backedge.outer
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %5, i64 noundef %78) #6
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %6, i64 noundef %indvars.iv97) #6
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %82) #6
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp sgt i32 %81, %84
  br i1 %85, label %.critedge.peel, label %.loopexit

.critedge.peel:                                   ; preds = %79, %.backedge.outer
  %86 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %7, i64 noundef %indvars.iv97) #6
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %86, i64 noundef %78) #6
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = icmp eq i32 %88, -1
  br i1 %89, label %.loopexit104, label %90

90:                                               ; preds = %.critedge.peel
  %91 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %7, i64 noundef %indvars.iv97) #6
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %91, i64 noundef %78) #6
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %.loopexit, label %.backedge

.backedge:                                        ; preds = %90, %108
  %.0 = phi i32 [ %111, %108 ], [ %93, %90 ]
  %.not = icmp slt i32 %.0, %.05183
  %95 = sext i32 %.0 to i64
  br i1 %.not, label %96, label %.critedge

96:                                               ; preds = %.backedge
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %5, i64 noundef %95) #6
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000) %6, i64 noundef %indvars.iv97) #6
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8) %99) #6
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = icmp sgt i32 %98, %101
  br i1 %102, label %.critedge, label %.loopexit

.critedge:                                        ; preds = %.backedge, %96
  %103 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %7, i64 noundef %indvars.iv97) #6
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %103, i64 noundef %95) #6
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp eq i32 %105, -1
  br i1 %106, label %.loopexit104, label %108

.loopexit104:                                     ; preds = %.critedge, %.critedge.peel
  %.0.lcssa102 = phi i32 [ %.0.ph, %.critedge.peel ], [ %.0, %.critedge ]
  %107 = add nsw i32 %.0.lcssa102, -1
  br label %.backedge.outer, !llvm.loop !14

108:                                              ; preds = %.critedge
  %109 = call noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000) %7, i64 noundef %indvars.iv97) #6
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000) %109, i64 noundef %95) #6
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %.loopexit, label %.backedge, !llvm.loop !15

.loopexit:                                        ; preds = %90, %79, %108, %96
  %.2 = phi i32 [ %.0.ph, %96 ], [ %.0.ph, %108 ], [ %.0.ph, %90 ], [ %.047.ph, %79 ]
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %113 = load i32, ptr %3, align 4, !tbaa !5
  %114 = add nsw i32 %113, -1
  %115 = icmp slt i32 %.2, %114
  br i1 %115, label %.preheader, label %._crit_edge86.loopexit, !llvm.loop !17

._crit_edge86.loopexit:                           ; preds = %.loopexit
  %indvars99.le = trunc i64 %indvars.iv97 to i32
  br label %._crit_edge86

._crit_edge86:                                    ; preds = %._crit_edge86.loopexit, %.preheader71
  %.049.lcssa = phi i32 [ -1, %.preheader71 ], [ %indvars99.le, %._crit_edge86.loopexit ]
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %.049.lcssa)
          to label %117 unwind label %120

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

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

120:                                              ; preds = %117, %._crit_edge86
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %122

122:                                              ; preds = %120, %43, %29, %21
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %44, %43 ], [ %121, %120 ], [ %22, %21 ]
  call void @llvm.lifetime.end.p0(i64 250000, ptr nonnull %7) #6
  br label %123

123:                                              ; preds = %122, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %122 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 2000, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  br label %124

124:                                              ; preds = %123, %17
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %123 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #6
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #6
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.pn
}

; 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 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(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt5arrayISt4pairIiiELm250EEC2Ev(ptr noundef nonnull align 4 dereferenceable(2000)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm250EEixEm(ptr noundef nonnull align 4 dereferenceable(1000), i64 noundef) local_unnamed_addr #5 align 2

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5arrayISt4pairIiiELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(2000), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EiiERNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(1000) ptr @_ZNSt5arrayIS_IiLm250EELm250EEixEm(ptr noundef nonnull align 4 dereferenceable(250000), i64 noundef) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !16}
!16 = !{!"llvm.loop.peeled.count", i32 1}
!17 = distinct !{!17, !10}


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