; LLVM IR from eyangch/competitive-programming :: USACOtraining/1.2 (friday)

; 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 [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@__const.main.months = external hidden unnamed_addr constant [12 x i32], align 16
@.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 [12 x i32], align 16
  %8 = alloca i32, align 4
  %9 = alloca [7 x i32], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = 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 %15 unwind label %37

15:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %16 = 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 %17 unwind label %41

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

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %22 = load i32, ptr %8, align 4, !tbaa !5
  %23 = add nsw i32 %22, 12
  store i32 %23, ptr %8, align 4, !tbaa !5
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = srem i32 %24, 7
  store i32 %25, ptr %8, align 4, !tbaa !5
  %26 = load i32, ptr %8, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [7 x i32], ptr %9, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %28, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1900, ptr %11, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %98, %21
  %32 = load i32, ptr %11, align 4, !tbaa !5
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = add nsw i32 1900, %33
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %49, label %36

36:                                               ; preds = %31
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %101

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

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

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

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

50:                                               ; preds = %94, %49
  %51 = load i32, ptr %13, align 4, !tbaa !5
  %52 = icmp slt i32 %51, 12
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %97

54:                                               ; preds = %50
  %55 = load i32, ptr %13, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [12 x i32], ptr %7, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = icmp eq i32 %58, -1
  br i1 %59, label %60, label %79

60:                                               ; preds = %54
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = srem i32 %61, 4
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %75

64:                                               ; preds = %60
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = srem i32 %65, 100
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %72, label %68

68:                                               ; preds = %64
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = srem i32 %69, 400
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %75

72:                                               ; preds = %68, %64
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = add nsw i32 %73, 29
  store i32 %74, ptr %8, align 4, !tbaa !5
  br label %78

75:                                               ; preds = %68, %60
  %76 = load i32, ptr %8, align 4, !tbaa !5
  %77 = add nsw i32 %76, 28
  store i32 %77, ptr %8, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %75, %72
  br label %86

79:                                               ; preds = %54
  %80 = load i32, ptr %13, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [12 x i32], ptr %7, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = add nsw i32 %84, %83
  store i32 %85, ptr %8, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %79, %78
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = srem i32 %87, 7
  store i32 %88, ptr %8, align 4, !tbaa !5
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [7 x i32], ptr %9, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %91, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %86
  %95 = load i32, ptr %13, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %13, align 4, !tbaa !5
  br label %50, !llvm.loop !9

97:                                               ; preds = %53
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %11, align 4, !tbaa !5
  br label %31, !llvm.loop !11

101:                                              ; preds = %36
  %102 = load i32, ptr %8, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [7 x i32], ptr %9, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %104, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %120, %101
  %108 = load i32, ptr %14, align 4, !tbaa !5
  %109 = icmp slt i32 %108, 6
  br i1 %109, label %111, label %110

110:                                              ; preds = %107
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %127

111:                                              ; preds = %107
  %112 = load i32, ptr %14, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [7 x i32], ptr %9, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %115)
          to label %117 unwind label %123

117:                                              ; preds = %111
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef @.str.2)
          to label %119 unwind label %123

119:                                              ; preds = %117
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %14, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %14, align 4, !tbaa !5
  br label %107, !llvm.loop !12

123:                                              ; preds = %117, %111
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %4, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %139

127:                                              ; preds = %110
  %128 = getelementptr inbounds [7 x i32], ptr %9, i64 0, i64 6
  %129 = load i32, ptr %128, align 8, !tbaa !5
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %3, i32 noundef %129)
          to label %131 unwind label %135

131:                                              ; preds = %127
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %133 unwind label %135

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

135:                                              ; preds = %131, %127
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %4, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %5, align 4
  br label %139

139:                                              ; preds = %135, %123, %45
  call void @llvm.lifetime.end.p0(i64 28, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #7
  br label %140

140:                                              ; preds = %139, %41
  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 %141

141:                                              ; preds = %140, %37
  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 %142

142:                                              ; preds = %141
  %143 = load ptr, ptr %4, align 8
  %144 = load i32, ptr %5, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146
}

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

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

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

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

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

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

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

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

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


; 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 [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@__const.main.months = external hidden unnamed_addr constant [12 x i32], align 16
@.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) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull @.str, i32 noundef 8)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #7
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %2, ptr noundef nonnull @.str.1, i32 noundef 16)
          to label %6 unwind label %60

6:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %7 = 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 %8 unwind label %62

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

10:                                               ; preds = %8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %11 = load i32, ptr %4, align 16, !tbaa !5
  %12 = add nsw i32 %11, 1
  store i32 %12, ptr %4, align 16, !tbaa !5
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %10
  %15 = add nuw i32 %13, 1900
  %smax = call i32 @llvm.smax.i32(i32 %15, i32 1901)
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 32), align 16
  %17 = icmp eq i32 %16, -1
  %.2.v.8 = select i1 %17, i32 28, i32 %16
  %18 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 36), align 4
  %19 = icmp eq i32 %18, -1
  %.2.v.9 = select i1 %19, i32 28, i32 %18
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 40), align 8
  %21 = icmp eq i32 %20, -1
  %.2.v.10 = select i1 %21, i32 28, i32 %20
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 44), align 4
  %23 = icmp eq i32 %22, -1
  %.2.v.11 = select i1 %23, i32 28, i32 %22
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 32), align 16
  %25 = icmp eq i32 %24, -1
  %.2.us.v.8 = select i1 %25, i32 28, i32 %24
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 36), align 4
  %27 = icmp eq i32 %26, -1
  %.2.us.v.9 = select i1 %27, i32 28, i32 %26
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 40), align 8
  %29 = icmp eq i32 %28, -1
  %.2.us.v.10 = select i1 %29, i32 28, i32 %28
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 44), align 4
  %31 = icmp eq i32 %30, -1
  %.2.us.v.11 = select i1 %31, i32 28, i32 %30
  %32 = load <8 x i32>, ptr @__const.main.months, align 16
  %33 = icmp eq <8 x i32> %32, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
  %34 = select <8 x i1> %33, <8 x i32> <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>, <8 x i32> %32
  %35 = icmp eq <8 x i32> %32, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
  %36 = select <8 x i1> %35, <8 x i32> <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>, <8 x i32> %32
  %37 = icmp eq <8 x i32> %32, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
  %38 = select <8 x i1> %37, <8 x i32> <i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29>, <8 x i32> %32
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 32), align 16
  %40 = icmp eq i32 %39, -1
  %.2.us.us.v.8 = select i1 %40, i32 29, i32 %39
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 36), align 4
  %42 = icmp eq i32 %41, -1
  %.2.us.us.v.9 = select i1 %42, i32 29, i32 %41
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 40), align 8
  %44 = icmp eq i32 %43, -1
  %.2.us.us.v.10 = select i1 %44, i32 29, i32 %43
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @__const.main.months, i64 44), align 4
  %46 = icmp eq i32 %45, -1
  %.2.us.us.v.11 = select i1 %46, i32 29, i32 %45
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.split.us
  %.02441 = phi i32 [ %135, %.split.us ], [ 1900, %.preheader.preheader ]
  %.02540 = phi i32 [ %130, %.split.us ], [ 0, %.preheader.preheader ]
  %47 = and i32 %.02441, 3
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %.preheader.split.us, label %.split.us

.preheader.split.us:                              ; preds = %.preheader
  %49 = urem i32 %.02441, 100
  %.not = icmp ne i32 %49, 0
  %50 = urem i32 %.02441, 400
  %51 = icmp eq i32 %50, 0
  %or.cond = or i1 %.not, %51
  %or.cond.fr = freeze i1 %or.cond
  %52 = insertelement <8 x i1> poison, i1 %or.cond.fr, i64 0
  %53 = shufflevector <8 x i1> %52, <8 x i1> poison, <8 x i32> zeroinitializer
  %54 = select <8 x i1> %53, <8 x i32> %38, <8 x i32> %36
  %.2.us.us.v.8..2.us.v.8 = select i1 %or.cond.fr, i32 %.2.us.us.v.8, i32 %.2.us.v.8
  %.2.us.us.v.9..2.us.v.9 = select i1 %or.cond.fr, i32 %.2.us.us.v.9, i32 %.2.us.v.9
  %.2.us.us.v.10..2.us.v.10 = select i1 %or.cond.fr, i32 %.2.us.us.v.10, i32 %.2.us.v.10
  %.2.us.us.v.11..2.us.v.11 = select i1 %or.cond.fr, i32 %.2.us.us.v.11, i32 %.2.us.v.11
  br label %.split.us

._crit_edge.loopexit:                             ; preds = %.split.us
  %55 = sext i32 %130 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %10, %._crit_edge.loopexit
  %56 = phi i32 [ %133, %._crit_edge.loopexit ], [ %11, %10 ]
  %.025.lcssa = phi i64 [ %55, %._crit_edge.loopexit ], [ 0, %10 ]
  %57 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %.025.lcssa
  store i32 %56, ptr %57, align 4, !tbaa !5
  %58 = load i32, ptr %4, align 16, !tbaa !5
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %58)
          to label %136 unwind label %172

60:                                               ; preds = %0
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %181

62:                                               ; preds = %6
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %180

64:                                               ; preds = %8
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  br label %179

.split.us:                                        ; preds = %.preheader.split.us, %.preheader
  %.2.v.8.sink = phi i32 [ %.2.v.8, %.preheader ], [ %.2.us.us.v.8..2.us.v.8, %.preheader.split.us ]
  %.2.v.9.sink = phi i32 [ %.2.v.9, %.preheader ], [ %.2.us.us.v.9..2.us.v.9, %.preheader.split.us ]
  %.2.v.10.sink = phi i32 [ %.2.v.10, %.preheader ], [ %.2.us.us.v.10..2.us.v.10, %.preheader.split.us ]
  %.2.v.11.sink = phi i32 [ %.2.v.11, %.preheader ], [ %.2.us.us.v.11..2.us.v.11, %.preheader.split.us ]
  %66 = phi <8 x i32> [ %34, %.preheader ], [ %54, %.preheader.split.us ]
  %67 = extractelement <8 x i32> %66, i64 0
  %.2 = add nsw i32 %.02540, %67
  %68 = srem i32 %.2, 7
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %70, align 4, !tbaa !5
  %73 = extractelement <8 x i32> %66, i64 1
  %.2.1 = add nsw i32 %68, %73
  %74 = srem i32 %.2.1, 7
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %76, align 4, !tbaa !5
  %79 = extractelement <8 x i32> %66, i64 2
  %.2.2 = add nsw i32 %74, %79
  %80 = srem i32 %.2.2, 7
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !5
  %85 = extractelement <8 x i32> %66, i64 3
  %.2.3 = add nsw i32 %80, %85
  %86 = srem i32 %.2.3, 7
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %88, align 4, !tbaa !5
  %91 = extractelement <8 x i32> %66, i64 4
  %.2.4 = add nsw i32 %86, %91
  %92 = srem i32 %.2.4, 7
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %94, align 4, !tbaa !5
  %97 = extractelement <8 x i32> %66, i64 5
  %.2.5 = add nsw i32 %92, %97
  %98 = srem i32 %.2.5, 7
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %100, align 4, !tbaa !5
  %103 = extractelement <8 x i32> %66, i64 6
  %.2.6 = add nsw i32 %98, %103
  %104 = srem i32 %.2.6, 7
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %106, align 4, !tbaa !5
  %109 = extractelement <8 x i32> %66, i64 7
  %.2.7 = add nsw i32 %104, %109
  %110 = srem i32 %.2.7, 7
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %112, align 4, !tbaa !5
  %.2.8 = add nsw i32 %110, %.2.v.8.sink
  %115 = srem i32 %.2.8, 7
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %116
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %117, align 4, !tbaa !5
  %.2.9 = add nsw i32 %115, %.2.v.9.sink
  %120 = srem i32 %.2.9, 7
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %122, align 4, !tbaa !5
  %.2.10 = add nsw i32 %120, %.2.v.10.sink
  %125 = srem i32 %.2.10, 7
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %127, align 4, !tbaa !5
  %.2.11 = add nsw i32 %125, %.2.v.11.sink
  %130 = srem i32 %.2.11, 7
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [7 x i32], ptr %4, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %132, align 4, !tbaa !5
  %135 = add nuw nsw i32 %.02441, 1
  %exitcond.not = icmp eq i32 %135, %smax
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.preheader, !llvm.loop !9

136:                                              ; preds = %._crit_edge
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.2)
          to label %138 unwind label %172

138:                                              ; preds = %136
  %139 = getelementptr inbounds i8, ptr %4, i64 4
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %140)
          to label %142 unwind label %172

142:                                              ; preds = %138
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull @.str.2)
          to label %144 unwind label %172

144:                                              ; preds = %142
  %145 = getelementptr inbounds i8, ptr %4, i64 8
  %146 = load i32, ptr %145, align 8, !tbaa !5
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %146)
          to label %148 unwind label %172

148:                                              ; preds = %144
  %149 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %147, ptr noundef nonnull @.str.2)
          to label %150 unwind label %172

150:                                              ; preds = %148
  %151 = getelementptr inbounds i8, ptr %4, i64 12
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %152)
          to label %154 unwind label %172

154:                                              ; preds = %150
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef nonnull @.str.2)
          to label %156 unwind label %172

156:                                              ; preds = %154
  %157 = getelementptr inbounds i8, ptr %4, i64 16
  %158 = load i32, ptr %157, align 16, !tbaa !5
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %158)
          to label %160 unwind label %172

160:                                              ; preds = %156
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef nonnull @.str.2)
          to label %162 unwind label %172

162:                                              ; preds = %160
  %163 = getelementptr inbounds i8, ptr %4, i64 20
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %164)
          to label %166 unwind label %172

166:                                              ; preds = %162
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %165, ptr noundef nonnull @.str.2)
          to label %168 unwind label %172

168:                                              ; preds = %166
  %169 = getelementptr inbounds i8, ptr %4, i64 24
  %170 = load i32, ptr %169, align 8, !tbaa !5
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %170)
          to label %174 unwind label %177

172:                                              ; preds = %166, %162, %160, %156, %154, %150, %148, %144, %142, %138, %136, %._crit_edge
  %173 = landingpad { ptr, i32 }
          cleanup
  br label %179

174:                                              ; preds = %168
  %175 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %171, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %176 unwind label %177

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

177:                                              ; preds = %174, %168
  %178 = landingpad { ptr, i32 }
          cleanup
  br label %179

179:                                              ; preds = %177, %172, %64
  %.pn = phi { ptr, i32 } [ %173, %172 ], [ %178, %177 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %4) #7
  br label %180

180:                                              ; preds = %179, %62
  %.pn.pn = phi { ptr, i32 } [ %.pn, %179 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %2) #7
  br label %181

181:                                              ; preds = %180, %60
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %180 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %1) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %1) #7
  resume { ptr, i32 } %.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(...)

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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"}


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