; LLVM IR from eyangch/competitive-programming :: USACOtraining/2.2 (preface)

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

%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.main.r = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 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 [7 x i32], align 16
  %8 = alloca [7 x i8], align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 520, ptr %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %2, ptr noundef @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %3, ptr noundef @.str.1, i32 noundef 16)
          to label %14 unwind label %27

14:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 28, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 7, ptr %8) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %8, ptr align 1 @__const.main.r, i64 7, i1 false)
  %15 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 0
  %16 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 0
  %17 = getelementptr inbounds i32, ptr %16, i64 7
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef %15, ptr noundef %17, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %18 unwind label %31

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %20 unwind label %35

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %187, %20
  %22 = load i32, ptr %10, align 4, !tbaa !5
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  %25 = icmp slt i32 %22, %24
  br i1 %25, label %39, label %26

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

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

31:                                               ; preds = %14
  %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
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %234

35:                                               ; preds = %18
  %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 %234

39:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %40 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %40, ptr %11, align 4, !tbaa !5
  %41 = load i32, ptr %11, align 4, !tbaa !5
  %42 = icmp sge i32 %41, 1000
  br i1 %42, label %43, label %51

43:                                               ; preds = %39
  %44 = load i32, ptr %11, align 4, !tbaa !5
  %45 = sdiv i32 %44, 1000
  %46 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 6
  %47 = load i32, ptr %46, align 8, !tbaa !5
  %48 = add nsw i32 %47, %45
  store i32 %48, ptr %46, align 8, !tbaa !5
  %49 = load i32, ptr %11, align 4, !tbaa !5
  %50 = srem i32 %49, 1000
  store i32 %50, ptr %11, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %43, %39
  %52 = load i32, ptr %11, align 4, !tbaa !5
  %53 = icmp sge i32 %52, 900
  br i1 %53, label %54, label %63

54:                                               ; preds = %51
  %55 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 6
  %56 = load i32, ptr %55, align 8, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 8, !tbaa !5
  %58 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 4
  %59 = load i32, ptr %58, align 16, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %58, align 16, !tbaa !5
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = srem i32 %61, 900
  store i32 %62, ptr %11, align 4, !tbaa !5
  br label %63

63:                                               ; preds = %54, %51
  %64 = load i32, ptr %11, align 4, !tbaa !5
  %65 = icmp sge i32 %64, 500
  br i1 %65, label %66, label %74

66:                                               ; preds = %63
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = sdiv i32 %67, 500
  %69 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 5
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %70, %68
  store i32 %71, ptr %69, align 4, !tbaa !5
  %72 = load i32, ptr %11, align 4, !tbaa !5
  %73 = srem i32 %72, 500
  store i32 %73, ptr %11, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %66, %63
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = icmp sge i32 %75, 400
  br i1 %76, label %77, label %86

77:                                               ; preds = %74
  %78 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 5
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %78, align 4, !tbaa !5
  %81 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 4
  %82 = load i32, ptr %81, align 16, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %81, align 16, !tbaa !5
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = srem i32 %84, 400
  store i32 %85, ptr %11, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %77, %74
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = icmp sge i32 %87, 100
  br i1 %88, label %89, label %97

89:                                               ; preds = %86
  %90 = load i32, ptr %11, align 4, !tbaa !5
  %91 = sdiv i32 %90, 100
  %92 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 4
  %93 = load i32, ptr %92, align 16, !tbaa !5
  %94 = add nsw i32 %93, %91
  store i32 %94, ptr %92, align 16, !tbaa !5
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = srem i32 %95, 100
  store i32 %96, ptr %11, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %89, %86
  %98 = load i32, ptr %11, align 4, !tbaa !5
  %99 = icmp sge i32 %98, 90
  br i1 %99, label %100, label %109

100:                                              ; preds = %97
  %101 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 4
  %102 = load i32, ptr %101, align 16, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %101, align 16, !tbaa !5
  %104 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 2
  %105 = load i32, ptr %104, align 8, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %104, align 8, !tbaa !5
  %107 = load i32, ptr %11, align 4, !tbaa !5
  %108 = srem i32 %107, 90
  store i32 %108, ptr %11, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %100, %97
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = icmp sge i32 %110, 50
  br i1 %111, label %112, label %120

112:                                              ; preds = %109
  %113 = load i32, ptr %11, align 4, !tbaa !5
  %114 = sdiv i32 %113, 50
  %115 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 3
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = add nsw i32 %116, %114
  store i32 %117, ptr %115, align 4, !tbaa !5
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = srem i32 %118, 50
  store i32 %119, ptr %11, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %112, %109
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = icmp sge i32 %121, 40
  br i1 %122, label %123, label %132

123:                                              ; preds = %120
  %124 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 3
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %124, align 4, !tbaa !5
  %127 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 2
  %128 = load i32, ptr %127, align 8, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %127, align 8, !tbaa !5
  %130 = load i32, ptr %11, align 4, !tbaa !5
  %131 = srem i32 %130, 40
  store i32 %131, ptr %11, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %123, %120
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = icmp sge i32 %133, 10
  br i1 %134, label %135, label %143

135:                                              ; preds = %132
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = sdiv i32 %136, 10
  %138 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 2
  %139 = load i32, ptr %138, align 8, !tbaa !5
  %140 = add nsw i32 %139, %137
  store i32 %140, ptr %138, align 8, !tbaa !5
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = srem i32 %141, 10
  store i32 %142, ptr %11, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %135, %132
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = icmp sge i32 %144, 9
  br i1 %145, label %146, label %155

146:                                              ; preds = %143
  %147 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 2
  %148 = load i32, ptr %147, align 8, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %147, align 8, !tbaa !5
  %150 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 0
  %151 = load i32, ptr %150, align 16, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %150, align 16, !tbaa !5
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = srem i32 %153, 9
  store i32 %154, ptr %11, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %146, %143
  %156 = load i32, ptr %11, align 4, !tbaa !5
  %157 = icmp sge i32 %156, 5
  br i1 %157, label %158, label %166

158:                                              ; preds = %155
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = sdiv i32 %159, 5
  %161 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 1
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = add nsw i32 %162, %160
  store i32 %163, ptr %161, align 4, !tbaa !5
  %164 = load i32, ptr %11, align 4, !tbaa !5
  %165 = srem i32 %164, 5
  store i32 %165, ptr %11, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %158, %155
  %167 = load i32, ptr %11, align 4, !tbaa !5
  %168 = icmp sge i32 %167, 4
  br i1 %168, label %169, label %178

169:                                              ; preds = %166
  %170 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 1
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %170, align 4, !tbaa !5
  %173 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 0
  %174 = load i32, ptr %173, align 16, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %173, align 16, !tbaa !5
  %176 = load i32, ptr %11, align 4, !tbaa !5
  %177 = srem i32 %176, 4
  store i32 %177, ptr %11, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %169, %166
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = icmp sge i32 %179, 1
  br i1 %180, label %181, label %186

181:                                              ; preds = %178
  %182 = load i32, ptr %11, align 4, !tbaa !5
  %183 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 0
  %184 = load i32, ptr %183, align 16, !tbaa !5
  %185 = add nsw i32 %184, %182
  store i32 %185, ptr %183, align 16, !tbaa !5
  br label %186

186:                                              ; preds = %181, %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %187

187:                                              ; preds = %186
  %188 = load i32, ptr %10, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %10, align 4, !tbaa !5
  br label %21, !llvm.loop !9

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

191:                                              ; preds = %199, %190
  %192 = load i32, ptr %12, align 4, !tbaa !5
  %193 = sub nsw i32 %192, 1
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !5
  %197 = icmp eq i32 %196, 0
  br i1 %197, label %198, label %202

198:                                              ; preds = %191
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %12, align 4, !tbaa !5
  %201 = add nsw i32 %200, -1
  store i32 %201, ptr %12, align 4, !tbaa !5
  br label %191, !llvm.loop !11

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

203:                                              ; preds = %225, %202
  %204 = load i32, ptr %13, align 4, !tbaa !5
  %205 = load i32, ptr %12, align 4, !tbaa !5
  %206 = icmp slt i32 %204, %205
  br i1 %206, label %208, label %207

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

208:                                              ; preds = %203
  %209 = load i32, ptr %13, align 4, !tbaa !5
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [7 x i8], ptr %8, i64 0, i64 %210
  %212 = load i8, ptr %211, align 1, !tbaa !12
  %213 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %3, i8 noundef signext %212)
          to label %214 unwind label %228

214:                                              ; preds = %208
  %215 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %213, ptr noundef @.str.2)
          to label %216 unwind label %228

216:                                              ; preds = %214
  %217 = load i32, ptr %13, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [7 x i32], ptr %7, i64 0, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %215, i32 noundef %220)
          to label %222 unwind label %228

222:                                              ; preds = %216
  %223 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %221, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %224 unwind label %228

224:                                              ; preds = %222
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %13, align 4, !tbaa !5
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %13, align 4, !tbaa !5
  br label %203, !llvm.loop !13

228:                                              ; preds = %222, %216, %214, %208
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %4, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %234

232:                                              ; preds = %207
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 7, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 28, 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
  %233 = load i32, ptr %1, align 4
  ret i32 %233

234:                                              ; preds = %228, %35, %31
  call void @llvm.lifetime.end.p0(i64 7, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 28, 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 %235

235:                                              ; preds = %234, %27
  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 %236

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

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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 noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

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


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

%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1
@__const.main.r = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 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 [7 x i32], align 16
  %5 = alloca i32, 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 %6 unwind label %17

6:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %4) #6
  %7 = getelementptr inbounds i8, ptr %4, i64 28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  invoke void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull %4, ptr noundef nonnull %7, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %8 unwind label %19

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

.preheader67:                                     ; preds = %8
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %.not68 = icmp slt i32 %10, 1
  br i1 %.not68, label %.preheader66.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader67
  %.promoted = load i32, ptr %4, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %4, i64 24
  %12 = getelementptr inbounds i8, ptr %4, i64 16
  %13 = getelementptr inbounds i8, ptr %4, i64 20
  %14 = getelementptr inbounds i8, ptr %4, i64 8
  %15 = getelementptr inbounds i8, ptr %4, i64 12
  %16 = getelementptr inbounds i8, ptr %4, i64 4
  %.promoted70 = load i32, ptr %11, align 8, !tbaa !5
  %.promoted71 = load i32, ptr %12, align 16, !tbaa !5
  %.promoted72 = load i32, ptr %13, align 4, !tbaa !5
  %.promoted73 = load i32, ptr %14, align 8, !tbaa !5
  %.promoted74 = load i32, ptr %15, align 4, !tbaa !5
  %.promoted75 = load i32, ptr %16, align 4, !tbaa !5
  br label %23

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

19:                                               ; preds = %6
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %124

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

23:                                               ; preds = %.lr.ph, %.thread57
  %24 = phi i32 [ %.promoted75, %.lr.ph ], [ %102, %.thread57 ]
  %25 = phi i32 [ %.promoted74, %.lr.ph ], [ %83, %.thread57 ]
  %26 = phi i32 [ %.promoted73, %.lr.ph ], [ %103, %.thread57 ]
  %27 = phi i32 [ %.promoted72, %.lr.ph ], [ %59, %.thread57 ]
  %28 = phi i32 [ %.promoted71, %.lr.ph ], [ %84, %.thread57 ]
  %29 = phi i32 [ %.promoted70, %.lr.ph ], [ %60, %.thread57 ]
  %.04669 = phi i32 [ 1, %.lr.ph ], [ %105, %.thread57 ]
  %30 = phi i32 [ %.promoted, %.lr.ph ], [ %104, %.thread57 ]
  %31 = icmp ugt i32 %.04669, 999
  br i1 %31, label %32, label %36

32:                                               ; preds = %23
  %33 = udiv i32 %.04669, 1000
  %34 = add nsw i32 %29, %33
  store i32 %34, ptr %11, align 8, !tbaa !5
  %35 = urem i32 %.04669, 1000
  br label %36

36:                                               ; preds = %32, %23
  %37 = phi i32 [ %34, %32 ], [ %29, %23 ]
  %.045 = phi i32 [ %35, %32 ], [ %.04669, %23 ]
  %38 = icmp ugt i32 %.045, 899
  br i1 %38, label %.thread88.thread, label %42

.thread88.thread:                                 ; preds = %36
  %39 = add nsw i32 %37, 1
  store i32 %39, ptr %11, align 8, !tbaa !5
  %40 = add nsw i32 %28, 1
  store i32 %40, ptr %12, align 16, !tbaa !5
  %41 = add nsw i32 %.045, -900
  br label %58

42:                                               ; preds = %36
  %43 = icmp ugt i32 %.045, 499
  br i1 %43, label %44, label %47

44:                                               ; preds = %42
  %45 = add nsw i32 %27, 1
  store i32 %45, ptr %13, align 4, !tbaa !5
  %46 = add nsw i32 %.045, -500
  br label %.thread88

47:                                               ; preds = %42
  %48 = icmp ugt i32 %.045, 399
  br i1 %48, label %.thread90, label %.thread88

.thread90:                                        ; preds = %47
  %49 = add nsw i32 %27, 1
  store i32 %49, ptr %13, align 4, !tbaa !5
  %50 = add nsw i32 %28, 1
  store i32 %50, ptr %12, align 16, !tbaa !5
  %51 = add nsw i32 %.045, -400
  br label %58

.thread88:                                        ; preds = %44, %47
  %52 = phi i32 [ %27, %47 ], [ %45, %44 ]
  %.3 = phi i32 [ %.045, %47 ], [ %46, %44 ]
  %53 = icmp ugt i32 %.3, 99
  br i1 %53, label %54, label %58

54:                                               ; preds = %.thread88
  %.lhs.trunc = trunc i32 %.3 to i16
  %55 = udiv i16 %.lhs.trunc, 100
  %.zext = zext nneg i16 %55 to i32
  %56 = add nsw i32 %28, %.zext
  store i32 %56, ptr %12, align 16, !tbaa !5
  %57 = urem i16 %.lhs.trunc, 100
  %.zext61 = zext nneg i16 %57 to i32
  br label %58

58:                                               ; preds = %.thread88.thread, %.thread90, %54, %.thread88
  %59 = phi i32 [ %52, %54 ], [ %52, %.thread88 ], [ %49, %.thread90 ], [ %27, %.thread88.thread ]
  %60 = phi i32 [ %37, %54 ], [ %37, %.thread88 ], [ %37, %.thread90 ], [ %39, %.thread88.thread ]
  %61 = phi i32 [ %56, %54 ], [ %28, %.thread88 ], [ %50, %.thread90 ], [ %40, %.thread88.thread ]
  %.4 = phi i32 [ %.zext61, %54 ], [ %.3, %.thread88 ], [ %51, %.thread90 ], [ %41, %.thread88.thread ]
  %62 = icmp ugt i32 %.4, 89
  br i1 %62, label %.thread98.thread, label %66

.thread98.thread:                                 ; preds = %58
  %63 = add nsw i32 %61, 1
  store i32 %63, ptr %12, align 16, !tbaa !5
  %64 = add nsw i32 %26, 1
  store i32 %64, ptr %14, align 8, !tbaa !5
  %65 = add nsw i32 %.4, -90
  br label %82

66:                                               ; preds = %58
  %67 = icmp ugt i32 %.4, 49
  br i1 %67, label %68, label %71

68:                                               ; preds = %66
  %69 = add nsw i32 %25, 1
  store i32 %69, ptr %15, align 4, !tbaa !5
  %70 = add nsw i32 %.4, -50
  br label %.thread98

71:                                               ; preds = %66
  %72 = icmp ugt i32 %.4, 39
  br i1 %72, label %.thread100, label %.thread98

.thread100:                                       ; preds = %71
  %73 = add nsw i32 %25, 1
  store i32 %73, ptr %15, align 4, !tbaa !5
  %74 = add nsw i32 %26, 1
  store i32 %74, ptr %14, align 8, !tbaa !5
  %75 = add nsw i32 %.4, -40
  br label %82

.thread98:                                        ; preds = %68, %71
  %76 = phi i32 [ %25, %71 ], [ %69, %68 ]
  %.7 = phi i32 [ %.4, %71 ], [ %70, %68 ]
  %77 = icmp ugt i32 %.7, 9
  br i1 %77, label %78, label %82

78:                                               ; preds = %.thread98
  %.lhs.trunc62 = trunc i32 %.7 to i8
  %79 = udiv i8 %.lhs.trunc62, 10
  %.zext63 = zext nneg i8 %79 to i32
  %80 = add nsw i32 %26, %.zext63
  store i32 %80, ptr %14, align 8, !tbaa !5
  %81 = urem i8 %.lhs.trunc62, 10
  %.zext65 = zext nneg i8 %81 to i32
  br label %82

82:                                               ; preds = %.thread98.thread, %.thread100, %78, %.thread98
  %83 = phi i32 [ %76, %78 ], [ %76, %.thread98 ], [ %73, %.thread100 ], [ %25, %.thread98.thread ]
  %84 = phi i32 [ %61, %78 ], [ %61, %.thread98 ], [ %61, %.thread100 ], [ %63, %.thread98.thread ]
  %85 = phi i32 [ %80, %78 ], [ %26, %.thread98 ], [ %74, %.thread100 ], [ %64, %.thread98.thread ]
  %.8 = phi i32 [ %.zext65, %78 ], [ %.7, %.thread98 ], [ %75, %.thread100 ], [ %65, %.thread98.thread ]
  %86 = icmp ugt i32 %.8, 8
  br i1 %86, label %.thread55, label %89

.thread55:                                        ; preds = %82
  %87 = add nsw i32 %85, 1
  store i32 %87, ptr %14, align 8, !tbaa !5
  %88 = add nsw i32 %30, 1
  store i32 %88, ptr %4, align 16, !tbaa !5
  br label %.thread57

89:                                               ; preds = %82
  %90 = icmp ugt i32 %.8, 4
  br i1 %90, label %.thread102, label %93

.thread102:                                       ; preds = %89
  %91 = add nsw i32 %24, 1
  store i32 %91, ptr %16, align 4, !tbaa !5
  %92 = add nsw i32 %.8, -5
  br label %98

93:                                               ; preds = %89
  %94 = icmp eq i32 %.8, 4
  br i1 %94, label %95, label %98

95:                                               ; preds = %93
  %96 = add nsw i32 %24, 1
  store i32 %96, ptr %16, align 4, !tbaa !5
  %97 = add nsw i32 %30, 1
  store i32 %97, ptr %4, align 16, !tbaa !5
  br label %.thread57

98:                                               ; preds = %.thread102, %93
  %.10104 = phi i32 [ %92, %.thread102 ], [ %.8, %93 ]
  %99 = phi i32 [ %91, %.thread102 ], [ %24, %93 ]
  %.not53 = icmp eq i32 %.10104, 0
  br i1 %.not53, label %.thread57, label %100

100:                                              ; preds = %98
  %101 = add nsw i32 %30, %.10104
  store i32 %101, ptr %4, align 16, !tbaa !5
  br label %.thread57

.thread57:                                        ; preds = %.thread55, %95, %100, %98
  %102 = phi i32 [ %24, %.thread55 ], [ %96, %95 ], [ %99, %100 ], [ %99, %98 ]
  %103 = phi i32 [ %87, %.thread55 ], [ %85, %95 ], [ %85, %100 ], [ %85, %98 ]
  %104 = phi i32 [ %88, %.thread55 ], [ %97, %95 ], [ %101, %100 ], [ %30, %98 ]
  %105 = add nuw i32 %.04669, 1
  %exitcond.not = icmp eq i32 %.04669, %10
  br i1 %exitcond.not, label %.preheader66.preheader, label %23, !llvm.loop !9

.preheader66.preheader:                           ; preds = %.thread57, %.preheader67
  br label %.preheader66

.preheader66:                                     ; preds = %.preheader66.preheader, %.preheader66
  %indvars.iv82 = phi i32 [ %indvars.iv.next83, %.preheader66 ], [ 7, %.preheader66.preheader ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader66 ], [ 7, %.preheader66.preheader ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %106 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %indvars.iv.next
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = icmp eq i32 %107, 0
  %indvars.iv.next83 = add nsw i32 %indvars.iv82, -1
  br i1 %108, label %.preheader66, label %.preheader, !llvm.loop !11

.preheader:                                       ; preds = %.preheader66
  %109 = icmp sgt i64 %indvars.iv, 0
  br i1 %109, label %.lr.ph77.preheader, label %._crit_edge

.lr.ph77.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext i32 %indvars.iv82 to i64
  br label %.lr.ph77

._crit_edge:                                      ; preds = %121, %.preheader
  call void @llvm.lifetime.end.p0(i64 28, 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

.lr.ph77:                                         ; preds = %.lr.ph77.preheader, %121
  %indvars.iv79 = phi i64 [ 0, %.lr.ph77.preheader ], [ %indvars.iv.next80, %121 ]
  %110 = getelementptr inbounds [7 x i8], ptr @__const.main.r, i64 0, i64 %indvars.iv79
  %111 = load i8, ptr %110, align 1, !tbaa !12
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %2, i8 noundef signext %111)
          to label %113 unwind label %122

113:                                              ; preds = %.lr.ph77
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @.str.2)
          to label %115 unwind label %122

115:                                              ; preds = %113
  %116 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %indvars.iv79
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %114, i32 noundef %117)
          to label %119 unwind label %122

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

121:                                              ; preds = %119
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond84.not = icmp eq i64 %indvars.iv.next80, %wide.trip.count
  br i1 %exitcond84.not, label %._crit_edge, label %.lr.ph77, !llvm.loop !13

122:                                              ; preds = %119, %115, %113, %.lr.ph77
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %124

124:                                              ; preds = %122, %21, %19
  %.pn = phi { ptr, i32 } [ %123, %122 ], [ %22, %21 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 28, 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 %125

125:                                              ; preds = %124, %17
  %.pn.pn = phi { ptr, i32 } [ %.pn, %124 ], [ %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
}

; 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 @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #3

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 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}


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