; LLVM IR from ahr9n/psolving-paradigms :: 2.greedy (CodeForces 978G - Petya's Exams)

; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::tuple<int, int, int>>, std::_Select1st<std::pair<const int, std::tuple<int, int, int>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::tuple<int, int, int>>, std::_Select1st<std::pair<const int, std::tuple<int, int, int>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { i32, %"class.std::tuple" }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@s = external dso_local global [105 x i32], align 16
@d = external dso_local global [105 x i32], align 16
@c = external dso_local global [105 x i32], align 16
@ans = external dso_local global [105 x i32], align 16
@theDay = external dso_local global %"class.std::map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::tuple", align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %15 = getelementptr i8, ptr %14, i64 -24
  %16 = load i64, ptr %15, align 8
  %17 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %16
  %18 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %17, ptr noundef null)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %21

21:                                               ; preds = %60, %0
  %22 = load i32, ptr %2, align 4, !tbaa !8
  %23 = load i32, ptr @m, align 4, !tbaa !8
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  %27 = load i32, ptr %2, align 4, !tbaa !8
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [105 x i32], ptr @s, i64 0, i64 %28
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [105 x i32], ptr @c, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %39 = load i32, ptr @m, align 4, !tbaa !8
  %40 = add nsw i32 %39, 1
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [105 x i32], ptr @ans, i64 0, i64 %45
  store i32 %40, ptr %46, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #6
  %47 = load i32, ptr %2, align 4, !tbaa !8
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [105 x i32], ptr @s, i64 0, i64 %48
  %50 = load i32, ptr %2, align 4, !tbaa !8
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [105 x i32], ptr @c, i64 0, i64 %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %53 = load i32, ptr %2, align 4, !tbaa !8
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %4, align 4, !tbaa !8
  call void @_ZNSt5tupleIJiiiEEC2IJRiS2_iELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(4) %49, ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(4) %4) #6
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %56
  %58 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) @theDay, ptr noundef nonnull align 4 dereferenceable(4) %57)
  %59 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5tupleIJiiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(12) %58, ptr noundef nonnull align 4 dereferenceable(12) %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #6
  br label %60

60:                                               ; preds = %26
  %61 = load i32, ptr %2, align 4, !tbaa !8
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %2, align 4, !tbaa !8
  br label %21, !llvm.loop !11

63:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store ptr @theDay, ptr %5, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %64 = call ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @theDay) #6
  %65 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %6, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %66 = call ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @theDay) #6
  %67 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %7, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  br label %68

68:                                               ; preds = %129, %63
  %69 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEES7_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br i1 %69, label %71, label %70

70:                                               ; preds = %68
  store i32 5, ptr %8, align 4
  br label %131

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %72 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  store ptr %72, ptr %9, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %73 = load ptr, ptr %9, align 8, !tbaa !13
  %74 = getelementptr inbounds %"struct.std::pair", ptr %73, i32 0, i32 1
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %74) #6
  %76 = load i32, ptr %75, align 4, !tbaa !8
  store i32 %76, ptr %11, align 4, !tbaa !8
  br label %77

77:                                               ; preds = %110, %71
  %78 = load i32, ptr %11, align 4, !tbaa !8
  %79 = load ptr, ptr %9, align 8, !tbaa !13
  %80 = getelementptr inbounds %"struct.std::pair", ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !15
  %82 = icmp slt i32 %78, %81
  br i1 %82, label %83, label %90

83:                                               ; preds = %77
  %84 = load i32, ptr %10, align 4, !tbaa !8
  %85 = load ptr, ptr %9, align 8, !tbaa !13
  %86 = getelementptr inbounds %"struct.std::pair", ptr %85, i32 0, i32 1
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %86) #6
  %88 = load i32, ptr %87, align 4, !tbaa !8
  %89 = icmp slt i32 %84, %88
  br label %90

90:                                               ; preds = %83, %77
  %91 = phi i1 [ false, %77 ], [ %89, %83 ]
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %90
  %94 = load i32, ptr %11, align 4, !tbaa !8
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [105 x i32], ptr @ans, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !8
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %109, label %99

99:                                               ; preds = %93
  %100 = load ptr, ptr %9, align 8, !tbaa !13
  %101 = getelementptr inbounds %"struct.std::pair", ptr %100, i32 0, i32 1
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %101) #6
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %104 = load i32, ptr %11, align 4, !tbaa !8
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [105 x i32], ptr @ans, i64 0, i64 %105
  store i32 %103, ptr %106, align 4, !tbaa !8
  %107 = load i32, ptr %10, align 4, !tbaa !8
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %10, align 4, !tbaa !8
  br label %109

109:                                              ; preds = %99, %93
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %11, align 4, !tbaa !8
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %11, align 4, !tbaa !8
  br label %77, !llvm.loop !24

113:                                              ; preds = %92
  %114 = load i32, ptr %10, align 4, !tbaa !8
  %115 = load ptr, ptr %9, align 8, !tbaa !13
  %116 = getelementptr inbounds %"struct.std::pair", ptr %115, i32 0, i32 1
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %116) #6
  %118 = load i32, ptr %117, align 4, !tbaa !8
  %119 = icmp ne i32 %114, %118
  br i1 %119, label %120, label %122

120:                                              ; preds = %113
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  br label %123

122:                                              ; preds = %113
  store i32 0, ptr %8, align 4
  br label %123

123:                                              ; preds = %122, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %124 = load i32, ptr %8, align 4
  switch i32 %124, label %126 [
    i32 0, label %125
  ]

125:                                              ; preds = %123
  store i32 0, ptr %8, align 4
  br label %126

126:                                              ; preds = %125, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %127 = load i32, ptr %8, align 4
  switch i32 %127, label %131 [
    i32 0, label %128
  ]

128:                                              ; preds = %126
  br label %129

129:                                              ; preds = %128
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %68

131:                                              ; preds = %126, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %132 = load i32, ptr %8, align 4
  switch i32 %132, label %158 [
    i32 5, label %133
    i32 1, label %156
  ]

133:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !8
  br label %134

134:                                              ; preds = %152, %133
  %135 = load i32, ptr %12, align 4, !tbaa !8
  %136 = load i32, ptr @n, align 4, !tbaa !8
  %137 = icmp sle i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %155

139:                                              ; preds = %134
  %140 = load i32, ptr %12, align 4, !tbaa !8
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [105 x i32], ptr @ans, i64 0, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !8
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %143)
  %145 = load i32, ptr %12, align 4, !tbaa !8
  %146 = load i32, ptr @n, align 4, !tbaa !8
  %147 = icmp eq i32 %145, %146
  %148 = zext i1 %147 to i64
  %149 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %148
  %150 = load i8, ptr %149, align 1, !tbaa !25
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %144, i8 noundef signext %150)
  br label %152

152:                                              ; preds = %139
  %153 = load i32, ptr %12, align 4, !tbaa !8
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %12, align 4, !tbaa !8
  br label %134, !llvm.loop !26

155:                                              ; preds = %138
  store i32 0, ptr %1, align 4
  br label %156

156:                                              ; preds = %155, %131
  %157 = load i32, ptr %1, align 4
  ret i32 %157

158:                                              ; preds = %131
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEES7_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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 = { "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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !10, i64 0}
!15 = !{!16, !9, i64 0}
!16 = !{!"_ZTSSt4pairIKiSt5tupleIJiiiEEE", !9, i64 0, !17, i64 4}
!17 = !{!"_ZTSSt5tupleIJiiiEE", !18, i64 0}
!18 = !{!"_ZTSSt11_Tuple_implILm0EJiiiEE", !19, i64 0, !23, i64 8}
!19 = !{!"_ZTSSt11_Tuple_implILm1EJiiEE", !20, i64 0, !22, i64 4}
!20 = !{!"_ZTSSt11_Tuple_implILm2EJiEE", !21, i64 0}
!21 = !{!"_ZTSSt10_Head_baseILm2EiLb0EE", !9, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm1EiLb0EE", !9, i64 0}
!23 = !{!"_ZTSSt10_Head_baseILm0EiLb0EE", !9, i64 0}
!24 = distinct !{!24, !12}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !12}


; 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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::tuple<int, int, int>>, std::_Select1st<std::pair<const int, std::tuple<int, int, int>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::tuple<int, int, int>>, std::_Select1st<std::pair<const int, std::tuple<int, int, int>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"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_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32 }
%"struct.std::_Head_base.2" = type { i32 }
%"struct.std::_Head_base.3" = type { i32 }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@s = external dso_local global [105 x i32], align 16
@d = external dso_local global [105 x i32], align 16
@c = external dso_local global [105 x i32], align 16
@ans = external dso_local local_unnamed_addr global [105 x i32], align 16
@theDay = external dso_local global %"class.std::map", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %"class.std::tuple", align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = 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) @n)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %13 = load i32, ptr @m, align 4, !tbaa !8
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %15 = call ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) @theDay) #6
  store ptr %15, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %16 = call ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) @theDay) #6
  store ptr %16, ptr %4, align 8
  %17 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEES7_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %17, label %.lr.ph52, label %._crit_edge53

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %18 = getelementptr inbounds [105 x i32], ptr @s, i64 0, i64 %indvars.iv
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %20 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %22 = getelementptr inbounds [105 x i32], ptr @c, i64 0, i64 %indvars.iv
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %24 = load i32, ptr @m, align 4, !tbaa !8
  %25 = add nsw i32 %24, 1
  %26 = load i32, ptr %20, align 4, !tbaa !8
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [105 x i32], ptr @ans, i64 0, i64 %27
  store i32 %25, ptr %28, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %29, ptr %2, align 4, !tbaa !8
  call void @_ZNSt5tupleIJiiiEEC2IJRiS2_iELb1ETnNSt9enable_ifIXclsr4_TCCIXT0_EEE29__is_implicitly_constructibleIDpT_EEEbE4typeELb1EEEDpOS4_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %2) #6
  %30 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48) @theDay, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %31 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt5tupleIJiiiEEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %1) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %1) #6
  %32 = load i32, ptr @m, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next, %33
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.lr.ph52:                                         ; preds = %._crit_edge, %.critedge40
  %35 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %36) #6
  %38 = load i32, ptr %37, align 4, !tbaa !8
  %39 = load i32, ptr %35, align 4, !tbaa !13
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %.lr.ph48.preheader, label %.critedge

.lr.ph48.preheader:                               ; preds = %.lr.ph52
  %41 = sext i32 %38 to i64
  br label %.lr.ph48

.lr.ph48:                                         ; preds = %.lr.ph48.preheader, %54
  %indvars.iv59 = phi i64 [ %41, %.lr.ph48.preheader ], [ %indvars.iv.next60, %54 ]
  %.03145 = phi i32 [ 0, %.lr.ph48.preheader ], [ %.1, %54 ]
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %36) #6
  %43 = load i32, ptr %42, align 4, !tbaa !8
  %44 = icmp slt i32 %.03145, %43
  br i1 %44, label %47, label %.critedge

.critedge:                                        ; preds = %.lr.ph48, %54, %.lr.ph52
  %.031.lcssa = phi i32 [ 0, %.lr.ph52 ], [ %.1, %54 ], [ %.03145, %.lr.ph48 ]
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %36) #6
  %46 = load i32, ptr %45, align 4, !tbaa !8
  %.not = icmp eq i32 %.031.lcssa, %46
  br i1 %.not, label %.critedge40, label %.thread

47:                                               ; preds = %.lr.ph48
  %48 = getelementptr inbounds [105 x i32], ptr @ans, i64 0, i64 %indvars.iv59
  %49 = load i32, ptr %48, align 4, !tbaa !8
  %.not38 = icmp eq i32 %49, 0
  br i1 %.not38, label %50, label %54

50:                                               ; preds = %47
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12) %36) #6
  %52 = load i32, ptr %51, align 4, !tbaa !8
  store i32 %52, ptr %48, align 4, !tbaa !8
  %53 = add nsw i32 %.03145, 1
  br label %54

54:                                               ; preds = %47, %50
  %.1 = phi i32 [ %.03145, %47 ], [ %53, %50 ]
  %indvars.iv.next60 = add nsw i64 %indvars.iv59, 1
  %55 = load i32, ptr %35, align 4, !tbaa !13
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next60, %56
  br i1 %57, label %.lr.ph48, label %.critedge, !llvm.loop !22

.thread:                                          ; preds = %.critedge
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %.loopexit

.critedge40:                                      ; preds = %.critedge
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %60 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEES7_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %60, label %.lr.ph52, label %._crit_edge53

._crit_edge53:                                    ; preds = %.critedge40, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %61 = load i32, ptr @n, align 4, !tbaa !8
  %.not3754 = icmp slt i32 %61, 1
  br i1 %.not3754, label %.loopexit, label %.lr.ph57

.lr.ph57:                                         ; preds = %._crit_edge53, %.lr.ph57
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %.lr.ph57 ], [ 1, %._crit_edge53 ]
  %62 = getelementptr inbounds [105 x i32], ptr @ans, i64 0, i64 %indvars.iv62
  %63 = load i32, ptr %62, align 4, !tbaa !8
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %63)
  %65 = load i32, ptr @n, align 4, !tbaa !8
  %66 = zext i32 %65 to i64
  %67 = icmp eq i64 %indvars.iv62, %66
  %68 = zext i1 %67 to i64
  %69 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !23
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %64, i8 noundef signext %70)
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %72 = load i32, ptr @n, align 4, !tbaa !8
  %73 = sext i32 %72 to i64
  %.not37.not = icmp slt i64 %indvars.iv62, %73
  br i1 %.not37.not, label %.lr.ph57, label %.loopexit, !llvm.loop !24

.loopexit:                                        ; preds = %.lr.ph57, %._crit_edge53, %.thread
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEEixERS5_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIiSt5tupleIJiiiEESt4lessIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt5tupleIJiiiEEEES7_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm0EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm1EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3getILm2EJiiiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

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

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

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

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 = { "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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !9, i64 0}
!14 = !{!"_ZTSSt4pairIKiSt5tupleIJiiiEEE", !9, i64 0, !15, i64 4}
!15 = !{!"_ZTSSt5tupleIJiiiEE", !16, i64 0}
!16 = !{!"_ZTSSt11_Tuple_implILm0EJiiiEE", !17, i64 0, !21, i64 8}
!17 = !{!"_ZTSSt11_Tuple_implILm1EJiiEE", !18, i64 0, !20, i64 4}
!18 = !{!"_ZTSSt11_Tuple_implILm2EJiEE", !19, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm2EiLb0EE", !9, i64 0}
!20 = !{!"_ZTSSt10_Head_baseILm1EiLb0EE", !9, i64 0}
!21 = !{!"_ZTSSt10_Head_baseILm0EiLb0EE", !9, i64 0}
!22 = distinct !{!22, !12}
!23 = !{!10, !10, i64 0}
!24 = distinct !{!24, !12}


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