; LLVM IR from nragland37/cpp-projects :: programming-II/11-classes-headerFiles/date.ll (ZN4Date9inputDateEv)

; 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_ostream" = type { ptr, %"class.std::basic_ios" }
%"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::locale" = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%class.Date = type { i32, i32, i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 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) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Date9inputDateEv(ptr noundef nonnull align 4 dereferenceable(12) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %5 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 2
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br label %7

7:                                                ; preds = %17, %1
  %8 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 2
  %9 = load i32, ptr %8, align 4, !tbaa !9
  %10 = icmp slt i32 %9, 2022
  br i1 %10, label %15, label %11

11:                                               ; preds = %7
  %12 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 2
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = icmp sgt i32 %13, 2100
  br label %15

15:                                               ; preds = %11, %7
  %16 = phi i1 [ true, %7 ], [ %14, %11 ]
  br i1 %16, label %17, label %22

17:                                               ; preds = %15
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %20 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 2
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %20)
  br label %7, !llvm.loop !12

22:                                               ; preds = %15
  %23 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 2
  call void @_ZN4Date7setYearERKi(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %25 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  br label %27

27:                                               ; preds = %37, %22
  %28 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !14
  %30 = icmp slt i32 %29, 1
  br i1 %30, label %35, label %31

31:                                               ; preds = %27
  %32 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %33 = load i32, ptr %32, align 4, !tbaa !14
  %34 = icmp sgt i32 %33, 12
  br label %35

35:                                               ; preds = %31, %27
  %36 = phi i1 [ true, %27 ], [ %34, %31 ]
  br i1 %36, label %37, label %42

37:                                               ; preds = %35
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  %40 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %40)
  br label %27, !llvm.loop !15

42:                                               ; preds = %35
  %43 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  call void @_ZN4Date8setMonthERKi(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
  %45 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %45)
  %47 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !14
  %49 = icmp eq i32 %48, 1
  br i1 %49, label %74, label %50

50:                                               ; preds = %42
  %51 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !14
  %53 = icmp eq i32 %52, 3
  br i1 %53, label %74, label %54

54:                                               ; preds = %50
  %55 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !14
  %57 = icmp eq i32 %56, 5
  br i1 %57, label %74, label %58

58:                                               ; preds = %54
  %59 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !14
  %61 = icmp eq i32 %60, 7
  br i1 %61, label %74, label %62

62:                                               ; preds = %58
  %63 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !14
  %65 = icmp eq i32 %64, 8
  br i1 %65, label %74, label %66

66:                                               ; preds = %62
  %67 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !14
  %69 = icmp eq i32 %68, 10
  br i1 %69, label %74, label %70

70:                                               ; preds = %66
  %71 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !14
  %73 = icmp eq i32 %72, 12
  br i1 %73, label %74, label %91

74:                                               ; preds = %70, %66, %62, %58, %54, %50, %42
  br label %75

75:                                               ; preds = %85, %74
  %76 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %77 = load i32, ptr %76, align 4, !tbaa !16
  %78 = icmp slt i32 %77, 1
  br i1 %78, label %83, label %79

79:                                               ; preds = %75
  %80 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !16
  %82 = icmp sgt i32 %81, 31
  br label %83

83:                                               ; preds = %79, %75
  %84 = phi i1 [ true, %75 ], [ %82, %79 ]
  br i1 %84, label %85, label %90

85:                                               ; preds = %83
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
  %88 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %88)
  br label %75, !llvm.loop !17

90:                                               ; preds = %83
  br label %165

91:                                               ; preds = %70
  %92 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !14
  %94 = icmp eq i32 %93, 4
  br i1 %94, label %107, label %95

95:                                               ; preds = %91
  %96 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !14
  %98 = icmp eq i32 %97, 6
  br i1 %98, label %107, label %99

99:                                               ; preds = %95
  %100 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %101 = load i32, ptr %100, align 4, !tbaa !14
  %102 = icmp eq i32 %101, 9
  br i1 %102, label %107, label %103

103:                                              ; preds = %99
  %104 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !14
  %106 = icmp eq i32 %105, 11
  br i1 %106, label %107, label %124

107:                                              ; preds = %103, %99, %95, %91
  br label %108

108:                                              ; preds = %118, %107
  %109 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %110 = load i32, ptr %109, align 4, !tbaa !16
  %111 = icmp slt i32 %110, 1
  br i1 %111, label %116, label %112

112:                                              ; preds = %108
  %113 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %114 = load i32, ptr %113, align 4, !tbaa !16
  %115 = icmp sgt i32 %114, 30
  br label %116

116:                                              ; preds = %112, %108
  %117 = phi i1 [ true, %108 ], [ %115, %112 ]
  br i1 %117, label %118, label %123

118:                                              ; preds = %116
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %121 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %121)
  br label %108, !llvm.loop !18

123:                                              ; preds = %116
  br label %164

124:                                              ; preds = %103
  %125 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 2
  %126 = load i32, ptr %125, align 4, !tbaa !9
  %127 = srem i32 %126, 4
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %146

129:                                              ; preds = %124
  br label %130

130:                                              ; preds = %140, %129
  %131 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !16
  %133 = icmp slt i32 %132, 1
  br i1 %133, label %138, label %134

134:                                              ; preds = %130
  %135 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %136 = load i32, ptr %135, align 4, !tbaa !16
  %137 = icmp sgt i32 %136, 29
  br label %138

138:                                              ; preds = %134, %130
  %139 = phi i1 [ true, %130 ], [ %137, %134 ]
  br i1 %139, label %140, label %145

140:                                              ; preds = %138
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
  %143 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %144 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %143)
  br label %130, !llvm.loop !19

145:                                              ; preds = %138
  br label %163

146:                                              ; preds = %124
  br label %147

147:                                              ; preds = %157, %146
  %148 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %149 = load i32, ptr %148, align 4, !tbaa !16
  %150 = icmp slt i32 %149, 1
  br i1 %150, label %155, label %151

151:                                              ; preds = %147
  %152 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %153 = load i32, ptr %152, align 4, !tbaa !16
  %154 = icmp sgt i32 %153, 28
  br label %155

155:                                              ; preds = %151, %147
  %156 = phi i1 [ true, %147 ], [ %154, %151 ]
  br i1 %156, label %157, label %162

157:                                              ; preds = %155
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %160 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  %161 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %160)
  br label %147, !llvm.loop !20

162:                                              ; preds = %155
  br label %163

163:                                              ; preds = %162, %145
  br label %164

164:                                              ; preds = %163, %123
  br label %165

165:                                              ; preds = %164, %90
  %166 = getelementptr inbounds %class.Date, ptr %3, i32 0, i32 0
  call void @_ZN4Date6setDayERKi(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(4) %166)
  ret void
}

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

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

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

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

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

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTS4Date", !11, i64 0, !11, i64 4, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!10, !11, i64 4}
!15 = distinct !{!15, !13}
!16 = !{!10, !11, i64 0}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !13}


; 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_ostream" = type { ptr, %"class.std::basic_ios" }
%"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::locale" = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [18 x i8], align 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 #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Date9inputDateEv(ptr noundef nonnull align 4 dereferenceable(12) %0) local_unnamed_addr #1 align 2 {
  %2 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %5 = load i32, ptr %3, align 4, !tbaa !5
  %6 = add i32 %5, -2101
  %or.cond26 = icmp ult i32 %6, -79
  br i1 %or.cond26, label %.critedge, label %._crit_edge

.critedge:                                        ; preds = %1, %.critedge
  %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = add i32 %10, -2101
  %or.cond = icmp ult i32 %11, -79
  br i1 %or.cond, label %.critedge, label %._crit_edge, !llvm.loop !10

._crit_edge:                                      ; preds = %.critedge, %1
  tail call void @_ZN4Date7setYearERKi(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %15 = load i32, ptr %13, align 4, !tbaa !12
  %16 = add i32 %15, -13
  %or.cond1727 = icmp ult i32 %16, -12
  br i1 %or.cond1727, label %.critedge2, label %._crit_edge28

.critedge2:                                       ; preds = %._crit_edge, %.critedge2
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %20 = load i32, ptr %13, align 4, !tbaa !12
  %21 = add i32 %20, -13
  %or.cond17 = icmp ult i32 %21, -12
  br i1 %or.cond17, label %.critedge2, label %._crit_edge28, !llvm.loop !13

._crit_edge28:                                    ; preds = %.critedge2, %._crit_edge
  tail call void @_ZN4Date8setMonthERKi(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %24 = load i32, ptr %13, align 4, !tbaa !12
  switch i32 %24, label %41 [
    i32 1, label %25
    i32 3, label %25
    i32 5, label %25
    i32 7, label %25
    i32 8, label %25
    i32 10, label %25
    i32 12, label %25
    i32 4, label %33
    i32 6, label %33
    i32 9, label %33
    i32 11, label %33
  ]

25:                                               ; preds = %._crit_edge28, %._crit_edge28, %._crit_edge28, %._crit_edge28, %._crit_edge28, %._crit_edge28, %._crit_edge28
  %26 = load i32, ptr %0, align 4, !tbaa !14
  %27 = add i32 %26, -32
  %or.cond1830 = icmp ult i32 %27, -31
  br i1 %or.cond1830, label %.critedge4, label %.loopexit

.critedge4:                                       ; preds = %25, %.critedge4
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %31 = load i32, ptr %0, align 4, !tbaa !14
  %32 = add i32 %31, -32
  %or.cond18 = icmp ult i32 %32, -31
  br i1 %or.cond18, label %.critedge4, label %.loopexit, !llvm.loop !15

33:                                               ; preds = %._crit_edge28, %._crit_edge28, %._crit_edge28, %._crit_edge28
  %34 = load i32, ptr %0, align 4, !tbaa !14
  %35 = add i32 %34, -31
  %or.cond1929 = icmp ult i32 %35, -30
  br i1 %or.cond1929, label %.critedge6, label %.loopexit

.critedge6:                                       ; preds = %33, %.critedge6
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
  %38 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %39 = load i32, ptr %0, align 4, !tbaa !14
  %40 = add i32 %39, -31
  %or.cond19 = icmp ult i32 %40, -30
  br i1 %or.cond19, label %.critedge6, label %.loopexit, !llvm.loop !16

41:                                               ; preds = %._crit_edge28
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = and i32 %42, 3
  %44 = icmp eq i32 %43, 0
  %45 = load i32, ptr %0, align 4, !tbaa !14
  br i1 %44, label %.preheader, label %.preheader22

.preheader22:                                     ; preds = %41
  %46 = add i32 %45, -29
  %or.cond2131 = icmp ult i32 %46, -28
  br i1 %or.cond2131, label %.critedge10, label %.loopexit

.preheader:                                       ; preds = %41
  %47 = add i32 %45, -30
  %or.cond2032 = icmp ult i32 %47, -29
  br i1 %or.cond2032, label %.critedge8, label %.loopexit

.critedge8:                                       ; preds = %.preheader, %.critedge8
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %49 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.9)
  %50 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %51 = load i32, ptr %0, align 4, !tbaa !14
  %52 = add i32 %51, -30
  %or.cond20 = icmp ult i32 %52, -29
  br i1 %or.cond20, label %.critedge8, label %.loopexit, !llvm.loop !17

.critedge10:                                      ; preds = %.preheader22, %.critedge10
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
  %55 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %56 = load i32, ptr %0, align 4, !tbaa !14
  %57 = add i32 %56, -29
  %or.cond21 = icmp ult i32 %57, -28
  br i1 %or.cond21, label %.critedge10, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %.critedge6, %.critedge4, %.critedge10, %.critedge8, %33, %25, %.preheader22, %.preheader
  tail call void @_ZN4Date6setDayERKi(ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(4) %0)
  ret void
}

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

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

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

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

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

!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, !7, i64 8}
!6 = !{!"_ZTS4Date", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!6, !7, i64 4}
!13 = distinct !{!13, !11}
!14 = !{!6, !7, i64 0}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass