; LLVM IR from Shah-Shishir/Codeforces-Solutions :: 1220A. Cards (main)

; 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<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@str = external dso_local global [100005 x i8], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = 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 i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::map", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  br label %23

23:                                               ; preds = %192, %0
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef @str)
  %25 = icmp ne i32 %24, -1
  br i1 %25, label %26, label %195

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #6
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %39, %26
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %31, label %46

31:                                               ; preds = %27
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [100005 x i8], ptr @str, i64 0, i64 %33
  %35 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %36 unwind label %42

36:                                               ; preds = %31
  %37 = load i32, ptr %35, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %35, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %36
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !5
  br label %27, !llvm.loop !9

42:                                               ; preds = %31
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %8, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %9, align 4
  br label %194

46:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  store i8 111, ptr %10, align 1, !tbaa !11
  %47 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %48 unwind label %100

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 110, ptr %11, align 1, !tbaa !11
  %49 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %50 unwind label %104

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %47, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %52 unwind label %104

52:                                               ; preds = %50
  %53 = load i32, ptr %51, align 4, !tbaa !5
  store i32 %53, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  store i8 101, ptr %12, align 1, !tbaa !11
  %54 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %55 unwind label %109

55:                                               ; preds = %52
  %56 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %54)
          to label %57 unwind label %109

57:                                               ; preds = %55
  %58 = load i32, ptr %56, align 4, !tbaa !5
  store i32 %58, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  %59 = load i32, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  store i8 111, ptr %13, align 1, !tbaa !11
  %60 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %61 unwind label %113

61:                                               ; preds = %57
  %62 = load i32, ptr %60, align 4, !tbaa !5
  %63 = sub nsw i32 %62, %59
  store i32 %63, ptr %60, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  %64 = load i32, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  store i8 110, ptr %14, align 1, !tbaa !11
  %65 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %66 unwind label %117

66:                                               ; preds = %61
  %67 = load i32, ptr %65, align 4, !tbaa !5
  %68 = sub nsw i32 %67, %64
  store i32 %68, ptr %65, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  %69 = load i32, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  store i8 101, ptr %15, align 1, !tbaa !11
  %70 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %71 unwind label %121

71:                                               ; preds = %66
  %72 = load i32, ptr %70, align 4, !tbaa !5
  %73 = sub nsw i32 %72, %69
  store i32 %73, ptr %70, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  store i8 122, ptr %16, align 1, !tbaa !11
  %74 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %75 unwind label %125

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 101, ptr %17, align 1, !tbaa !11
  %76 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %77 unwind label %129

77:                                               ; preds = %75
  %78 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %74, ptr noundef nonnull align 4 dereferenceable(4) %76)
          to label %79 unwind label %129

79:                                               ; preds = %77
  %80 = load i32, ptr %78, align 4, !tbaa !5
  store i32 %80, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  store i8 114, ptr %18, align 1, !tbaa !11
  %81 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %82 unwind label %134

82:                                               ; preds = %79
  %83 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %81)
          to label %84 unwind label %134

84:                                               ; preds = %82
  %85 = load i32, ptr %83, align 4, !tbaa !5
  store i32 %85, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #6
  store i8 111, ptr %19, align 1, !tbaa !11
  %86 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %87 unwind label %138

87:                                               ; preds = %84
  %88 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %86)
          to label %89 unwind label %138

89:                                               ; preds = %87
  %90 = load i32, ptr %88, align 4, !tbaa !5
  store i32 %90, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %97, %89
  %92 = load i32, ptr %3, align 4, !tbaa !5
  %93 = load i32, ptr %4, align 4, !tbaa !5
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %95, label %146

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 1, ptr %21, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %96 unwind label %142

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

97:                                               ; preds = %96
  %98 = load i32, ptr %3, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %3, align 4, !tbaa !5
  br label %91, !llvm.loop !12

100:                                              ; preds = %46
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %8, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %9, align 4
  br label %108

104:                                              ; preds = %50, %48
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %8, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  br label %108

108:                                              ; preds = %104, %100
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  br label %194

109:                                              ; preds = %55, %52
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %8, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %194

113:                                              ; preds = %57
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %8, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  br label %194

117:                                              ; preds = %61
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %8, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %194

121:                                              ; preds = %66
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %8, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %194

125:                                              ; preds = %71
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %8, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %9, align 4
  br label %133

129:                                              ; preds = %77, %75
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %8, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  br label %133

133:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  br label %194

134:                                              ; preds = %82, %79
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %8, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %194

138:                                              ; preds = %87, %84
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %8, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #6
  br label %194

142:                                              ; preds = %95
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %8, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %193

146:                                              ; preds = %91
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %153, %146
  %148 = load i32, ptr %3, align 4, !tbaa !5
  %149 = load i32, ptr %5, align 4, !tbaa !5
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %151, label %160

151:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %152 unwind label %156

152:                                              ; preds = %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %3, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %3, align 4, !tbaa !5
  br label %147, !llvm.loop !13

156:                                              ; preds = %151
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %8, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %193

160:                                              ; preds = %147
  %161 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %162 = trunc i64 %161 to i32
  store i32 %162, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %189, %160
  %164 = load i32, ptr %3, align 4, !tbaa !5
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %167, label %192

167:                                              ; preds = %163
  %168 = load i32, ptr %3, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %169) #6
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %171)
          to label %173 unwind label %181

173:                                              ; preds = %167
  %174 = load i32, ptr %3, align 4, !tbaa !5
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 1
  %177 = icmp eq i32 %174, %176
  br i1 %177, label %178, label %185

178:                                              ; preds = %173
  %179 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.3)
          to label %180 unwind label %181

180:                                              ; preds = %178
  br label %188

181:                                              ; preds = %185, %178, %167
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %8, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %9, align 4
  br label %193

185:                                              ; preds = %173
  %186 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4)
          to label %187 unwind label %181

187:                                              ; preds = %185
  br label %188

188:                                              ; preds = %187, %180
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %3, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %3, align 4, !tbaa !5
  br label %163, !llvm.loop !14

192:                                              ; preds = %163
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  br label %23, !llvm.loop !15

193:                                              ; preds = %181, %156, %142
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  br label %194

194:                                              ; preds = %193, %138, %134, %133, %121, %117, %113, %109, %108, %42
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %7) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %196

195:                                              ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0

196:                                              ; preds = %194
  %197 = load ptr, ptr %8, align 8
  %198 = load i32, ptr %9, align 4
  %199 = insertvalue { ptr, i32 } poison, ptr %197, 0
  %200 = insertvalue { ptr, i32 } %199, i32 %198, 1
  resume { ptr, i32 } %200
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<char, std::pair<const char, int>, std::_Select1st<std::pair<const char, int>>, std::less<char>>::_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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@str = external dso_local global [100005 x i8], align 16
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = 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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::map", align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull @str)
  %.not41 = icmp eq i32 %18, -1
  br i1 %.not41, label %._crit_edge44, label %.lr.ph43

.lr.ph43:                                         ; preds = %0, %._crit_edge40
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph43, %23
  %indvars.iv = phi i64 [ %indvars.iv.next, %23 ], [ 0, %.lr.ph43 ]
  %21 = getelementptr inbounds [100005 x i8], ptr @str, i64 0, i64 %indvars.iv
  %22 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %23 unwind label %29

23:                                               ; preds = %.lr.ph
  %24 = load i32, ptr %22, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %22, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !9

29:                                               ; preds = %.lr.ph
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %120

._crit_edge:                                      ; preds = %23, %.lr.ph43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  store i8 111, ptr %5, align 1, !tbaa !11
  %31 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %32 unwind label %77

32:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  store i8 110, ptr %6, align 1, !tbaa !11
  %33 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %34 unwind label %79

34:                                               ; preds = %32
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %36 = load i32, ptr %35, align 4, !tbaa !5
  store i32 %36, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  store i8 101, ptr %7, align 1, !tbaa !11
  %37 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %38 unwind label %82

38:                                               ; preds = %34
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %37)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  store i8 111, ptr %8, align 1, !tbaa !11
  %41 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %42 unwind label %84

42:                                               ; preds = %38
  %43 = load i32, ptr %41, align 4, !tbaa !5
  %44 = sub nsw i32 %43, %40
  store i32 %44, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  %45 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  store i8 110, ptr %9, align 1, !tbaa !11
  %46 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %47 unwind label %86

47:                                               ; preds = %42
  %48 = load i32, ptr %46, align 4, !tbaa !5
  %49 = sub nsw i32 %48, %45
  store i32 %49, ptr %46, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  %50 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  store i8 101, ptr %10, align 1, !tbaa !11
  %51 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %52 unwind label %88

52:                                               ; preds = %47
  %53 = load i32, ptr %51, align 4, !tbaa !5
  %54 = sub nsw i32 %53, %50
  store i32 %54, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  store i8 122, ptr %11, align 1, !tbaa !11
  %55 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %56 unwind label %90

56:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  store i8 101, ptr %12, align 1, !tbaa !11
  %57 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %58 unwind label %92

58:                                               ; preds = %56
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %55, ptr noundef nonnull align 4 dereferenceable(4) %57)
  %60 = load i32, ptr %59, align 4, !tbaa !5
  store i32 %60, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  store i8 114, ptr %13, align 1, !tbaa !11
  %61 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %62 unwind label %95

62:                                               ; preds = %58
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %61)
  %64 = load i32, ptr %63, align 4, !tbaa !5
  store i32 %64, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  store i8 111, ptr %14, align 1, !tbaa !11
  %65 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEEixEOc(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %66 unwind label %97

66:                                               ; preds = %62
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %68 = load i32, ptr %67, align 4, !tbaa !5
  store i32 %68, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %.lr.ph33, label %.preheader

.preheader:                                       ; preds = %73, %66
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph35, label %._crit_edge36

.lr.ph33:                                         ; preds = %66, %73
  %.11931 = phi i32 [ %74, %73 ], [ 0, %66 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  store i32 1, ptr %16, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %73 unwind label %99

73:                                               ; preds = %.lr.ph33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  %74 = add nuw nsw i32 %.11931, 1
  %75 = load i32, ptr %2, align 4, !tbaa !5
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %.lr.ph33, label %.preheader, !llvm.loop !12

77:                                               ; preds = %._crit_edge
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %32
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %81

81:                                               ; preds = %79, %77
  %.pn = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  br label %120

82:                                               ; preds = %34
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  br label %120

84:                                               ; preds = %38
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %120

86:                                               ; preds = %42
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  br label %120

88:                                               ; preds = %47
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %120

90:                                               ; preds = %52
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %94

92:                                               ; preds = %56
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %94

94:                                               ; preds = %92, %90
  %.pn24 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  br label %120

95:                                               ; preds = %58
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  br label %120

97:                                               ; preds = %62
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  br label %120

99:                                               ; preds = %.lr.ph33
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  br label %119

.lr.ph35:                                         ; preds = %.preheader, %101
  %.22034 = phi i32 [ %102, %101 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %101 unwind label %105

101:                                              ; preds = %.lr.ph35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  %102 = add nuw nsw i32 %.22034, 1
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %.lr.ph35, label %._crit_edge36, !llvm.loop !13

105:                                              ; preds = %.lr.ph35
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  br label %119

._crit_edge36:                                    ; preds = %101, %.preheader
  %107 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %108 = trunc i64 %107 to i32
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %.lr.ph39, label %._crit_edge40

.lr.ph39:                                         ; preds = %._crit_edge36
  %110 = add i64 %107, 4294967295
  %111 = and i64 %110, 4294967295
  %wide.trip.count = and i64 %107, 2147483647
  br label %112

112:                                              ; preds = %.lr.ph39, %112
  %indvars.iv46 = phi i64 [ 0, %.lr.ph39 ], [ %indvars.iv.next47, %112 ]
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv46) #6
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %114)
  %116 = icmp eq i64 %indvars.iv46, %111
  %.str.3..str.4 = select i1 %116, ptr @.str.3, ptr @.str.4
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3..str.4)
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge40, label %112, !llvm.loop !14

._crit_edge40:                                    ; preds = %112, %._crit_edge36
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  %118 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull @str)
  %.not = icmp eq i32 %118, -1
  br i1 %.not, label %._crit_edge44, label %.lr.ph43, !llvm.loop !15

119:                                              ; preds = %105, %99
  %.pn26 = phi { ptr, i32 } [ %100, %99 ], [ %106, %105 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  br label %120

120:                                              ; preds = %119, %97, %95, %94, %88, %86, %84, %82, %81, %29
  %.pn28 = phi { ptr, i32 } [ %30, %29 ], [ %.pn26, %119 ], [ %98, %97 ], [ %96, %95 ], [ %.pn24, %94 ], [ %89, %88 ], [ %87, %86 ], [ %85, %84 ], [ %83, %82 ], [ %.pn, %81 ]
  call void @_ZNSt3mapIciSt4lessIcESaISt4pairIKciEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn28

._crit_edge44:                                    ; preds = %._crit_edge40, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

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

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

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

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

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

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


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass