; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/35 Beta Division 2/Problem C (C)

; 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 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@v = external dso_local global [2000 x [2000 x i32]], align 16
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@mx = external dso_local global i32, align 4
@INF = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsii(i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::basic_ifstream", align 8
  %3 = alloca %"class.std::basic_ofstream", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %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) #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 %14 unwind label %26

14:                                               ; preds = %0
  %15 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @n)
          to label %16 unwind label %30

16:                                               ; preds = %14
  %17 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) @m)
          to label %18 unwind label %30

18:                                               ; preds = %16
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) @k)
          to label %20 unwind label %30

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

21:                                               ; preds = %52, %20
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %34, label %25

25:                                               ; preds = %21
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %55

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

30:                                               ; preds = %170, %166, %164, %160, %18, %16, %14
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  br label %174

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

35:                                               ; preds = %48, %34
  %36 = load i32, ptr %8, align 4, !tbaa !5
  %37 = load i32, ptr @m, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

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

40:                                               ; preds = %35
  %41 = load i32, ptr @INF, align 4, !tbaa !5
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %43
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [2000 x i32], ptr %44, i64 0, i64 %46
  store i32 %41, ptr %47, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %40
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %8, align 4, !tbaa !5
  br label %35, !llvm.loop !9

51:                                               ; preds = %39
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %6, align 4, !tbaa !5
  br label %21, !llvm.loop !11

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

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

60:                                               ; preds = %56
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %83

61:                                               ; preds = %56
  %62 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(4) @x)
          to label %63 unwind label %79

63:                                               ; preds = %61
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 4 dereferenceable(4) @y)
          to label %65 unwind label %79

65:                                               ; preds = %63
  %66 = load i32, ptr @x, align 4, !tbaa !5
  %67 = add nsw i32 %66, -1
  store i32 %67, ptr @x, align 4, !tbaa !5
  %68 = load i32, ptr @y, align 4, !tbaa !5
  %69 = add nsw i32 %68, -1
  store i32 %69, ptr @y, align 4, !tbaa !5
  %70 = load i32, ptr @x, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %71
  %73 = load i32, ptr @y, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [2000 x i32], ptr %72, i64 0, i64 %74
  store i32 0, ptr %75, align 4, !tbaa !5
  br label %76

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

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

83:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %117, %83
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = load i32, ptr @n, align 4, !tbaa !5
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %120

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

90:                                               ; preds = %113, %89
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = load i32, ptr @m, align 4, !tbaa !5
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %116

95:                                               ; preds = %90
  %96 = load i32, ptr %10, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %97
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [2000 x i32], ptr %98, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %112

104:                                              ; preds = %95
  %105 = load i32, ptr %10, align 4, !tbaa !5
  %106 = load i32, ptr %11, align 4, !tbaa !5
  invoke void @_Z3bfsii(i32 noundef %105, i32 noundef %106)
          to label %107 unwind label %108

107:                                              ; preds = %104
  br label %112

108:                                              ; preds = %104
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %4, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %174

112:                                              ; preds = %107, %95
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %11, align 4, !tbaa !5
  br label %90, !llvm.loop !13

116:                                              ; preds = %94
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %10, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %10, align 4, !tbaa !5
  br label %84, !llvm.loop !14

120:                                              ; preds = %88
  store i32 -1, ptr @mx, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %157, %120
  %122 = load i32, ptr %12, align 4, !tbaa !5
  %123 = load i32, ptr @n, align 4, !tbaa !5
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %160

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

127:                                              ; preds = %153, %126
  %128 = load i32, ptr %13, align 4, !tbaa !5
  %129 = load i32, ptr @m, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %156

132:                                              ; preds = %127
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %134
  %136 = load i32, ptr %13, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [2000 x i32], ptr %135, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = load i32, ptr @mx, align 4, !tbaa !5
  %141 = icmp sgt i32 %139, %140
  br i1 %141, label %142, label %152

142:                                              ; preds = %132
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %144
  %146 = load i32, ptr %13, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [2000 x i32], ptr %145, i64 0, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !5
  store i32 %149, ptr @mx, align 4, !tbaa !5
  %150 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %150, ptr @x, align 4, !tbaa !5
  %151 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %151, ptr @y, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %142, %132
  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 %127, !llvm.loop !15

156:                                              ; preds = %131
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %12, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %12, align 4, !tbaa !5
  br label %121, !llvm.loop !16

160:                                              ; preds = %125
  %161 = load i32, ptr @x, align 4, !tbaa !5
  %162 = add nsw i32 %161, 1
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %162)
          to label %164 unwind label %30

164:                                              ; preds = %160
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef @.str.2)
          to label %166 unwind label %30

166:                                              ; preds = %164
  %167 = load i32, ptr @y, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %165, i32 noundef %168)
          to label %170 unwind label %30

170:                                              ; preds = %166
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %169, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %172 unwind label %30

172:                                              ; preds = %170
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  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
  %173 = load i32, ptr %1, align 4
  ret i32 %173

174:                                              ; preds = %108, %79, %30
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %3) #6
  br label %175

175:                                              ; preds = %174, %26
  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 %176

176:                                              ; preds = %175
  %177 = load ptr, ptr %4, align 8
  %178 = load i32, ptr %5, align 4
  %179 = insertvalue { ptr, i32 } poison, ptr %177, 0
  %180 = insertvalue { ptr, i32 } %179, i32 %178, 1
  resume { ptr, i32 } %180
}

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

declare i32 @__gxx_personality_v0(...)

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

; 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

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

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

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

; 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 = distinct !{!16, !10}


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

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@v = external dso_local local_unnamed_addr global [2000 x [2000 x i32]], align 16
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@mx = external dso_local local_unnamed_addr global i32, align 4
@INF = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3bfsii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::basic_ifstream", align 8
  %2 = alloca %"class.std::basic_ofstream", align 8
  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 %3 unwind label %20

3:                                                ; preds = %0
  %4 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) @n)
          to label %5 unwind label %22

5:                                                ; preds = %3
  %6 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) @m)
          to label %7 unwind label %22

7:                                                ; preds = %5
  %8 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) @k)
          to label %.preheader44 unwind label %22

.preheader44:                                     ; preds = %7
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.preheader43.lr.ph, label %.preheader42

.preheader43.lr.ph:                               ; preds = %.preheader44
  %11 = load i32, ptr @m, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  %13 = load i32, ptr @INF, align 4
  br i1 %12, label %.preheader43.us.preheader, label %.preheader42

.preheader43.us.preheader:                        ; preds = %.preheader43.lr.ph
  %wide.trip.count72 = zext nneg i32 %9 to i64
  %wide.trip.count = zext nneg i32 %11 to i64
  %min.iters.check = icmp ult i32 %11, 8
  %n.vec = and i64 %wide.trip.count, 2147483640
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %13, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader43.us

.preheader43.us:                                  ; preds = %.preheader43.us.preheader, %._crit_edge.us
  %indvars.iv69 = phi i64 [ 0, %.preheader43.us.preheader ], [ %indvars.iv.next70, %._crit_edge.us ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader43.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader43.us ]
  %14 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %indvars.iv69, i64 %index
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  store <4 x i32> %broadcast.splat, ptr %14, align 16, !tbaa !5
  store <4 x i32> %broadcast.splat, ptr %15, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %16 = icmp eq i64 %index.next, %n.vec
  br i1 %16, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader43.us
  %indvars.iv.ph = phi i64 [ 0, %.preheader43.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %17 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %indvars.iv69, i64 %indvars.iv
  store i32 %13, ptr %17, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us, label %scalar.ph, !llvm.loop !13

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count72
  br i1 %exitcond73.not, label %.preheader42, label %.preheader43.us, !llvm.loop !14

.preheader42:                                     ; preds = %._crit_edge.us, %.preheader43.lr.ph, %.preheader44
  %18 = load i32, ptr @k, align 4, !tbaa !5
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph, label %.preheader41

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

22:                                               ; preds = %100, %96, %94, %._crit_edge63, %7, %5, %3
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %103

.preheader41.loopexit:                            ; preds = %31
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %.preheader41

.preheader41:                                     ; preds = %.preheader41.loopexit, %.preheader42
  %24 = phi i32 [ %.pre, %.preheader41.loopexit ], [ %9, %.preheader42 ]
  %25 = icmp sgt i32 %24, 0
  %26 = load i32, ptr @m, align 4
  %27 = icmp sgt i32 %26, 0
  %or.cond = select i1 %25, i1 %27, i1 false
  br i1 %or.cond, label %.preheader40, label %._crit_edge63.sink.split

.lr.ph:                                           ; preds = %.preheader42, %31
  %.03148 = phi i32 [ %39, %31 ], [ 0, %.preheader42 ]
  %28 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 4 dereferenceable(4) @x)
          to label %29 unwind label %42

29:                                               ; preds = %.lr.ph
  %30 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) @y)
          to label %31 unwind label %42

31:                                               ; preds = %29
  %32 = load i32, ptr @x, align 4, !tbaa !5
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr @x, align 4, !tbaa !5
  %34 = load i32, ptr @y, align 4, !tbaa !5
  %35 = add nsw i32 %34, -1
  store i32 %35, ptr @y, align 4, !tbaa !5
  %36 = sext i32 %33 to i64
  %37 = sext i32 %35 to i64
  %38 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %36, i64 %37
  store i32 0, ptr %38, align 4, !tbaa !5
  %39 = add nuw nsw i32 %.03148, 1
  %40 = load i32, ptr @k, align 4, !tbaa !5
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %.lr.ph, label %.preheader41.loopexit, !llvm.loop !15

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

.preheader40:                                     ; preds = %.preheader41, %._crit_edge
  %44 = phi i32 [ %73, %._crit_edge ], [ %24, %.preheader41 ]
  %45 = phi i32 [ %74, %._crit_edge ], [ %26, %.preheader41 ]
  %46 = phi i32 [ %75, %._crit_edge ], [ %26, %.preheader41 ]
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %._crit_edge ], [ 0, %.preheader41 ]
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %.lr.ph50, label %._crit_edge

.lr.ph50:                                         ; preds = %.preheader40
  %48 = trunc nuw nsw i64 %indvars.iv77 to i32
  br label %78

._crit_edge52:                                    ; preds = %._crit_edge
  store i32 -1, ptr @mx, align 4, !tbaa !5
  %49 = icmp sgt i32 %73, 0
  br i1 %49, label %.preheader.lr.ph, label %._crit_edge63

.preheader.lr.ph:                                 ; preds = %._crit_edge52
  %.pr = load i32, ptr @m, align 4, !tbaa !5
  %50 = icmp sgt i32 %.pr, 0
  br i1 %50, label %.preheader.us.preheader, label %._crit_edge63

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count88 = zext nneg i32 %73 to i64
  %wide.trip.count83 = zext nneg i32 %.pr to i64
  %xtraiter = and i64 %wide.trip.count83, 1
  %51 = icmp eq i32 %.pr, 1
  %unroll_iter = and i64 %wide.trip.count83, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge55.us
  %indvars.iv85 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next86, %._crit_edge55.us ]
  %mx.promoted6061.us = phi i32 [ -1, %.preheader.us.preheader ], [ %mx.promoted58.us.lcssa, %._crit_edge55.us ]
  %52 = trunc nuw nsw i64 %indvars.iv85 to i32
  br i1 %51, label %._crit_edge55.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %66
  %indvars.iv80 = phi i64 [ %indvars.iv.next81.1, %66 ], [ 0, %.preheader.us ]
  %mx.promoted59.us = phi i32 [ %mx.promoted58.us.1, %66 ], [ %mx.promoted6061.us, %.preheader.us ]
  %53 = phi i32 [ %67, %66 ], [ %mx.promoted6061.us, %.preheader.us ]
  %niter = phi i64 [ %niter.next.1, %66 ], [ 0, %.preheader.us ]
  %54 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %indvars.iv85, i64 %indvars.iv80
  %55 = load i32, ptr %54, align 8, !tbaa !5
  %56 = icmp sgt i32 %55, %53
  br i1 %56, label %57, label %59

57:                                               ; preds = %.preheader.us.new
  store i32 %55, ptr @mx, align 4, !tbaa !5
  store i32 %52, ptr @x, align 4, !tbaa !5
  %58 = trunc nuw nsw i64 %indvars.iv80 to i32
  store i32 %58, ptr @y, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %57, %.preheader.us.new
  %mx.promoted58.us = phi i32 [ %mx.promoted59.us, %.preheader.us.new ], [ %55, %57 ]
  %60 = phi i32 [ %53, %.preheader.us.new ], [ %55, %57 ]
  %indvars.iv.next81 = or disjoint i64 %indvars.iv80, 1
  %61 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %indvars.iv85, i64 %indvars.iv.next81
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp sgt i32 %62, %60
  br i1 %63, label %64, label %66

64:                                               ; preds = %59
  store i32 %62, ptr @mx, align 4, !tbaa !5
  store i32 %52, ptr @x, align 4, !tbaa !5
  %65 = trunc nuw nsw i64 %indvars.iv.next81 to i32
  store i32 %65, ptr @y, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %64, %59
  %mx.promoted58.us.1 = phi i32 [ %mx.promoted58.us, %59 ], [ %62, %64 ]
  %67 = phi i32 [ %60, %59 ], [ %62, %64 ]
  %indvars.iv.next81.1 = add nuw nsw i64 %indvars.iv80, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge55.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !16

._crit_edge55.us.unr-lcssa:                       ; preds = %66, %.preheader.us
  %mx.promoted58.us.lcssa.ph = phi i32 [ poison, %.preheader.us ], [ %mx.promoted58.us.1, %66 ]
  %indvars.iv80.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next81.1, %66 ]
  %mx.promoted59.us.unr = phi i32 [ %mx.promoted6061.us, %.preheader.us ], [ %mx.promoted58.us.1, %66 ]
  %.unr = phi i32 [ %mx.promoted6061.us, %.preheader.us ], [ %67, %66 ]
  br i1 %lcmp.mod.not, label %._crit_edge55.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge55.us.unr-lcssa
  %68 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %indvars.iv85, i64 %indvars.iv80.unr
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = icmp sgt i32 %69, %.unr
  br i1 %70, label %71, label %._crit_edge55.us

71:                                               ; preds = %.epil.preheader
  store i32 %69, ptr @mx, align 4, !tbaa !5
  store i32 %52, ptr @x, align 4, !tbaa !5
  %72 = trunc nuw nsw i64 %indvars.iv80.unr to i32
  store i32 %72, ptr @y, align 4, !tbaa !5
  br label %._crit_edge55.us

._crit_edge55.us:                                 ; preds = %.epil.preheader, %71, %._crit_edge55.us.unr-lcssa
  %mx.promoted58.us.lcssa = phi i32 [ %mx.promoted58.us.lcssa.ph, %._crit_edge55.us.unr-lcssa ], [ %mx.promoted59.us.unr, %.epil.preheader ], [ %69, %71 ]
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88
  br i1 %exitcond89.not, label %._crit_edge63, label %.preheader.us, !llvm.loop !17

._crit_edge.loopexit:                             ; preds = %87
  %.pre92 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader40
  %73 = phi i32 [ %.pre92, %._crit_edge.loopexit ], [ %44, %.preheader40 ]
  %74 = phi i32 [ %88, %._crit_edge.loopexit ], [ %45, %.preheader40 ]
  %75 = phi i32 [ %88, %._crit_edge.loopexit ], [ %46, %.preheader40 ]
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %76 = sext i32 %73 to i64
  %77 = icmp slt i64 %indvars.iv.next78, %76
  br i1 %77, label %.preheader40, label %._crit_edge52, !llvm.loop !18

78:                                               ; preds = %.lr.ph50, %87
  %79 = phi i32 [ %45, %.lr.ph50 ], [ %88, %87 ]
  %indvars.iv74 = phi i64 [ 0, %.lr.ph50 ], [ %indvars.iv.next75, %87 ]
  %80 = getelementptr inbounds [2000 x [2000 x i32]], ptr @v, i64 0, i64 %indvars.iv77, i64 %indvars.iv74
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = icmp eq i32 %81, 0
  br i1 %82, label %83, label %87

83:                                               ; preds = %78
  %84 = trunc nuw nsw i64 %indvars.iv74 to i32
  invoke void @_Z3bfsii(i32 noundef %48, i32 noundef %84)
          to label %._crit_edge90 unwind label %85

._crit_edge90:                                    ; preds = %83
  %.pre91 = load i32, ptr @m, align 4, !tbaa !5
  br label %87

85:                                               ; preds = %83
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %103

87:                                               ; preds = %._crit_edge90, %78
  %88 = phi i32 [ %.pre91, %._crit_edge90 ], [ %79, %78 ]
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next75, %89
  br i1 %90, label %78, label %._crit_edge.loopexit, !llvm.loop !20

._crit_edge63.sink.split:                         ; preds = %.preheader41
  store i32 -1, ptr @mx, align 4, !tbaa !5
  br label %._crit_edge63

._crit_edge63:                                    ; preds = %._crit_edge55.us, %._crit_edge63.sink.split, %.preheader.lr.ph, %._crit_edge52
  %91 = load i32, ptr @x, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %92)
          to label %94 unwind label %22

94:                                               ; preds = %._crit_edge63
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef nonnull @.str.2)
          to label %96 unwind label %22

96:                                               ; preds = %94
  %97 = load i32, ptr @y, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %95, i32 noundef %98)
          to label %100 unwind label %22

100:                                              ; preds = %96
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %102 unwind label %22

102:                                              ; preds = %100
  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

103:                                              ; preds = %85, %42, %22
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %86, %85 ], [ %23, %22 ]
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #6
  br label %104

104:                                              ; preds = %103, %20
  %.pn.pn = phi { ptr, i32 } [ %.pn, %103 ], [ %21, %20 ]
  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 uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef, i32 noundef) unnamed_addr #0 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 #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !12, !11}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !19}
!19 = !{!"llvm.loop.unswitch.partial.disable"}
!20 = distinct !{!20, !10}


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