; LLVM IR from DionysiosB/CodeForces :: 0300-0399 (300B-Coach)

; 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, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const 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 }
%"struct.std::pair.0" = type { i32, i32 }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { 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 }
%"class.std::allocator.2" = type { i8 }

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

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

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %46

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 -1, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %32 unwind label %42

32:                                               ; preds = %31
  %33 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE6insertIS2_IiiEEENSt9enable_ifIXsr16is_constructibleIS4_T_EE5valueES2_ISt17_Rb_tree_iteratorIS4_EbEE4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %34 unwind label %42

34:                                               ; preds = %32
  %35 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %36 = extractvalue { ptr, i8 } %33, 0
  store ptr %36, ptr %35, align 8
  %37 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %38 = extractvalue { ptr, i8 } %33, 1
  store i8 %38, ptr %37, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %39

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

42:                                               ; preds = %32, %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
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %290

46:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = sdiv i32 %47, 3
  %49 = sext i32 %48 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %49, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %50 unwind label %56

50:                                               ; preds = %46
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  store i8 1, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %158, %50
  %52 = load i32, ptr %16, align 4, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %60, label %55

55:                                               ; preds = %51
  store i32 5, ptr %17, align 4
  br label %161

56:                                               ; preds = %46
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %289

60:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %61 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %18, ptr noundef %19)
          to label %62 unwind label %85

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %64 unwind label %85

64:                                               ; preds = %62
  %65 = load i32, ptr %63, align 4, !tbaa !5
  %66 = icmp sge i32 %65, 0
  br i1 %66, label %67, label %89

67:                                               ; preds = %64
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %69 unwind label %85

69:                                               ; preds = %67
  %70 = load i32, ptr %68, align 4, !tbaa !5
  %71 = icmp slt i32 %70, 0
  br i1 %71, label %72, label %89

72:                                               ; preds = %69
  %73 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %74 unwind label %85

74:                                               ; preds = %72
  %75 = load i32, ptr %73, align 4, !tbaa !5
  %76 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %77 unwind label %85

77:                                               ; preds = %74
  store i32 %75, ptr %76, align 4, !tbaa !5
  %78 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %79 unwind label %85

79:                                               ; preds = %77
  %80 = load i32, ptr %78, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %81) #5
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 4, !tbaa !5
  br label %154

85:                                               ; preds = %144, %142, %137, %132, %125, %122, %117, %112, %104, %101, %99, %94, %89, %77, %74, %72, %67, %62, %60
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %288

89:                                               ; preds = %69, %64
  %90 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %91 unwind label %85

91:                                               ; preds = %89
  %92 = load i32, ptr %90, align 4, !tbaa !5
  %93 = icmp sge i32 %92, 0
  br i1 %93, label %94, label %112

94:                                               ; preds = %91
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %96 unwind label %85

96:                                               ; preds = %94
  %97 = load i32, ptr %95, align 4, !tbaa !5
  %98 = icmp slt i32 %97, 0
  br i1 %98, label %99, label %112

99:                                               ; preds = %96
  %100 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %101 unwind label %85

101:                                              ; preds = %99
  %102 = load i32, ptr %100, align 4, !tbaa !5
  %103 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %104 unwind label %85

104:                                              ; preds = %101
  store i32 %102, ptr %103, align 4, !tbaa !5
  %105 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %106 unwind label %85

106:                                              ; preds = %104
  %107 = load i32, ptr %105, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %108) #5
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %109, align 4, !tbaa !5
  br label %153

112:                                              ; preds = %96, %91
  %113 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %114 unwind label %85

114:                                              ; preds = %112
  %115 = load i32, ptr %113, align 4, !tbaa !5
  %116 = icmp slt i32 %115, 0
  br i1 %116, label %117, label %132

117:                                              ; preds = %114
  %118 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %119 unwind label %85

119:                                              ; preds = %117
  %120 = load i32, ptr %118, align 4, !tbaa !5
  %121 = icmp slt i32 %120, 0
  br i1 %121, label %122, label %132

122:                                              ; preds = %119
  %123 = load i32, ptr %15, align 4, !tbaa !5
  %124 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %125 unwind label %85

125:                                              ; preds = %122
  store i32 %123, ptr %124, align 4, !tbaa !5
  %126 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %127 unwind label %85

127:                                              ; preds = %125
  store i32 %123, ptr %126, align 4, !tbaa !5
  %128 = load i32, ptr %15, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %15, align 4, !tbaa !5
  %130 = sext i32 %128 to i64
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %130) #5
  store i32 2, ptr %131, align 4, !tbaa !5
  br label %152

132:                                              ; preds = %119, %114
  %133 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %134 unwind label %85

134:                                              ; preds = %132
  %135 = load i32, ptr %133, align 4, !tbaa !5
  %136 = icmp sge i32 %135, 0
  br i1 %136, label %137, label %151

137:                                              ; preds = %134
  %138 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %139 unwind label %85

139:                                              ; preds = %137
  %140 = load i32, ptr %138, align 4, !tbaa !5
  %141 = icmp sge i32 %140, 0
  br i1 %141, label %142, label %151

142:                                              ; preds = %139
  %143 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %144 unwind label %85

144:                                              ; preds = %142
  %145 = load i32, ptr %143, align 4, !tbaa !5
  %146 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %147 unwind label %85

147:                                              ; preds = %144
  %148 = load i32, ptr %146, align 4, !tbaa !5
  %149 = icmp ne i32 %145, %148
  br i1 %149, label %150, label %151

150:                                              ; preds = %147
  store i8 0, ptr %14, align 1, !tbaa !11
  store i32 5, ptr %17, align 4
  br label %155

151:                                              ; preds = %147, %139, %134
  br label %152

152:                                              ; preds = %151, %127
  br label %153

153:                                              ; preds = %152, %106
  br label %154

154:                                              ; preds = %153, %79
  store i32 0, ptr %17, align 4
  br label %155

155:                                              ; preds = %154, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %156 = load i32, ptr %17, align 4
  switch i32 %156, label %161 [
    i32 0, label %157
  ]

157:                                              ; preds = %155
  br label %158

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

161:                                              ; preds = %155, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %162

162:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 1, ptr %20, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %210, %162
  %164 = load i32, ptr %20, align 4, !tbaa !5
  %165 = load i32, ptr %2, align 4, !tbaa !5
  %166 = icmp sle i32 %164, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %163
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %214

168:                                              ; preds = %163
  %169 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %170 unwind label %174

170:                                              ; preds = %168
  %171 = load i32, ptr %169, align 4, !tbaa !5
  %172 = icmp sge i32 %171, 0
  br i1 %172, label %173, label %178

173:                                              ; preds = %170
  br label %210

174:                                              ; preds = %168
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %8, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %9, align 4
  br label %213

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

179:                                              ; preds = %205, %178
  %180 = load i32, ptr %21, align 4, !tbaa !5
  %181 = load i32, ptr %2, align 4, !tbaa !5
  %182 = sdiv i32 %181, 3
  %183 = icmp slt i32 %180, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %179
  store i32 11, ptr %17, align 4
  br label %208

185:                                              ; preds = %179
  %186 = load i32, ptr %21, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %187) #5
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = icmp slt i32 %189, 3
  br i1 %190, label %191, label %204

191:                                              ; preds = %185
  %192 = load i32, ptr %21, align 4, !tbaa !5
  %193 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %194 unwind label %200

194:                                              ; preds = %191
  store i32 %192, ptr %193, align 4, !tbaa !5
  %195 = load i32, ptr %21, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %196) #5
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %197, align 4, !tbaa !5
  store i32 11, ptr %17, align 4
  br label %208

200:                                              ; preds = %191
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %8, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %213

204:                                              ; preds = %185
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %21, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %21, align 4, !tbaa !5
  br label %179, !llvm.loop !14

208:                                              ; preds = %194, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %209

209:                                              ; preds = %208
  br label %210

210:                                              ; preds = %209, %173
  %211 = load i32, ptr %20, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %20, align 4, !tbaa !5
  br label %163, !llvm.loop !15

213:                                              ; preds = %200, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %288

214:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %229, %214
  %216 = load i32, ptr %22, align 4, !tbaa !5
  %217 = load i32, ptr %2, align 4, !tbaa !5
  %218 = sdiv i32 %217, 3
  %219 = icmp slt i32 %216, %218
  br i1 %219, label %221, label %220

220:                                              ; preds = %215
  store i32 14, ptr %17, align 4
  br label %232

221:                                              ; preds = %215
  %222 = load i32, ptr %22, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %223) #5
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = icmp ne i32 %225, 3
  br i1 %226, label %227, label %228

227:                                              ; preds = %221
  store i8 0, ptr %14, align 1, !tbaa !11
  store i32 14, ptr %17, align 4
  br label %232

228:                                              ; preds = %221
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %22, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %22, align 4, !tbaa !5
  br label %215, !llvm.loop !16

232:                                              ; preds = %227, %220
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %233

233:                                              ; preds = %232
  %234 = load i8, ptr %14, align 1, !tbaa !11, !range !17, !noundef !18
  %235 = trunc i8 %234 to i1
  br i1 %235, label %236, label %279

236:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %270, %236
  %238 = load i32, ptr %23, align 4, !tbaa !5
  %239 = load i32, ptr %2, align 4, !tbaa !5
  %240 = sdiv i32 %239, 3
  %241 = icmp slt i32 %238, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %237
  store i32 17, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %278

243:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 1, ptr %24, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %264, %243
  %245 = load i32, ptr %24, align 4, !tbaa !5
  %246 = load i32, ptr %2, align 4, !tbaa !5
  %247 = icmp sle i32 %245, %246
  br i1 %247, label %249, label %248

248:                                              ; preds = %244
  store i32 20, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %267

249:                                              ; preds = %244
  %250 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %251 unwind label %259

251:                                              ; preds = %249
  %252 = load i32, ptr %250, align 4, !tbaa !5
  %253 = load i32, ptr %23, align 4, !tbaa !5
  %254 = icmp eq i32 %252, %253
  br i1 %254, label %255, label %263

255:                                              ; preds = %251
  %256 = load i32, ptr %24, align 4, !tbaa !5
  %257 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %256)
          to label %258 unwind label %259

258:                                              ; preds = %255
  br label %263

259:                                              ; preds = %255, %249
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %8, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %277

263:                                              ; preds = %258, %251
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr %24, align 4, !tbaa !5
  %266 = add nsw i32 %265, 1
  store i32 %266, ptr %24, align 4, !tbaa !5
  br label %244, !llvm.loop !19

267:                                              ; preds = %248
  %268 = invoke i32 @puts(ptr noundef @.str.2)
          to label %269 unwind label %273

269:                                              ; preds = %267
  br label %270

270:                                              ; preds = %269
  %271 = load i32, ptr %23, align 4, !tbaa !5
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %23, align 4, !tbaa !5
  br label %237, !llvm.loop !20

273:                                              ; preds = %267
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %8, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %9, align 4
  br label %277

277:                                              ; preds = %273, %259
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %288

278:                                              ; preds = %242
  br label %286

279:                                              ; preds = %233
  %280 = invoke i32 @puts(ptr noundef @.str.3)
          to label %281 unwind label %282

281:                                              ; preds = %279
  br label %286

282:                                              ; preds = %279
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %8, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %9, align 4
  br label %288

286:                                              ; preds = %281, %278
  store i32 0, ptr %1, align 4
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %287 = load i32, ptr %1, align 4
  ret i32 %287

288:                                              ; preds = %282, %277, %213, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  br label %289

289:                                              ; preds = %288, %56
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  br label %290

290:                                              ; preds = %289, %42
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %291

291:                                              ; preds = %290
  %292 = load ptr, ptr %8, align 8
  %293 = load i32, ptr %9, align 4
  %294 = insertvalue { ptr, i32 } poison, ptr %292, 0
  %295 = insertvalue { ptr, i32 } %294, i32 %293, 1
  resume { ptr, i32 } %295
}

; 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 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE6insertIS2_IiiEEENSt9enable_ifIXsr16is_constructibleIS4_T_EE5valueES2_ISt17_Rb_tree_iteratorIS4_EbEE4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #4 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(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(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

declare i32 @puts(ptr noundef) #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 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !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<int, std::pair<const int, int>, std::_Select1st<std::pair<const int, int>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, int>, std::_Select1st<std::pair<const 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 }
%"struct.std::pair.0" = type { i32, i32 }
%"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 }
%"class.std::allocator.2" = type { i8 }

@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.3 = 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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::map", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::pair.0", align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::allocator.2", align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %3) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %.not59 = icmp slt i32 %15, 1
  br i1 %.not59, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %19, %0
  %.lcssa57 = phi i32 [ %15, %0 ], [ %22, %19 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  %16 = sdiv i32 %.lcssa57, 3
  %17 = sext i32 %16 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %17, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %25 unwind label %27

.lr.ph:                                           ; preds = %0, %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 -1, ptr %6, align 4, !tbaa !5
  call void @_ZNSt4pairIiiEC2IRiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %18 = invoke { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE6insertIS2_IiiEEENSt9enable_ifIXsr16is_constructibleIS4_T_EE5valueES2_ISt17_Rb_tree_iteratorIS4_EbEE4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %19 unwind label %23

19:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr %4, align 4, !tbaa !5
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %20, %22
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

23:                                               ; preds = %.lr.ph
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %176

25:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %.not5260 = icmp sgt i32 %26, 0
  br i1 %.not5260, label %.lr.ph65, label %._crit_edge66

27:                                               ; preds = %._crit_edge
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %175

.lr.ph65:                                         ; preds = %25, %112
  %.02262 = phi i32 [ %113, %112 ], [ 0, %25 ]
  %.02361 = phi i32 [ %.251, %112 ], [ 0, %25 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %30 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %31 unwind label %52

31:                                               ; preds = %.lr.ph65
  %32 = load i32, ptr %30, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, -1
  br i1 %33, label %34, label %54

34:                                               ; preds = %31
  %35 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %36 unwind label %52

36:                                               ; preds = %34
  %37 = load i32, ptr %35, align 4, !tbaa !5
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %54

39:                                               ; preds = %36
  %40 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %41 unwind label %52

41:                                               ; preds = %39
  %42 = load i32, ptr %40, align 4, !tbaa !5
  %43 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %44 unwind label %52

44:                                               ; preds = %41
  store i32 %42, ptr %43, align 4, !tbaa !5
  %45 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %46 unwind label %52

46:                                               ; preds = %44
  %47 = load i32, ptr %45, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %48) #5
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %49, align 4, !tbaa !5
  br label %.thread

52:                                               ; preds = %107, %105, %100, %95, %89, %87, %82, %77, %69, %66, %64, %59, %54, %44, %41, %39, %34, %.lr.ph65
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %174

54:                                               ; preds = %36, %31
  %55 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %56 unwind label %52

56:                                               ; preds = %54
  %57 = load i32, ptr %55, align 4, !tbaa !5
  %58 = icmp sgt i32 %57, -1
  br i1 %58, label %59, label %77

59:                                               ; preds = %56
  %60 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %61 unwind label %52

61:                                               ; preds = %59
  %62 = load i32, ptr %60, align 4, !tbaa !5
  %63 = icmp slt i32 %62, 0
  br i1 %63, label %64, label %77

64:                                               ; preds = %61
  %65 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %66 unwind label %52

66:                                               ; preds = %64
  %67 = load i32, ptr %65, align 4, !tbaa !5
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %69 unwind label %52

69:                                               ; preds = %66
  store i32 %67, ptr %68, align 4, !tbaa !5
  %70 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %71 unwind label %52

71:                                               ; preds = %69
  %72 = load i32, ptr %70, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %73) #5
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %74, align 4, !tbaa !5
  br label %.thread

77:                                               ; preds = %61, %56
  %78 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %79 unwind label %52

79:                                               ; preds = %77
  %80 = load i32, ptr %78, align 4, !tbaa !5
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %82, label %95

82:                                               ; preds = %79
  %83 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %84 unwind label %52

84:                                               ; preds = %82
  %85 = load i32, ptr %83, align 4, !tbaa !5
  %86 = icmp slt i32 %85, 0
  br i1 %86, label %87, label %95

87:                                               ; preds = %84
  %88 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %89 unwind label %52

89:                                               ; preds = %87
  store i32 %.02361, ptr %88, align 4, !tbaa !5
  %90 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %91 unwind label %52

91:                                               ; preds = %89
  store i32 %.02361, ptr %90, align 4, !tbaa !5
  %92 = add nsw i32 %.02361, 1
  %93 = sext i32 %.02361 to i64
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %93) #5
  store i32 2, ptr %94, align 4, !tbaa !5
  br label %.thread

95:                                               ; preds = %84, %79
  %96 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %97 unwind label %52

97:                                               ; preds = %95
  %98 = load i32, ptr %96, align 4, !tbaa !5
  %99 = icmp sgt i32 %98, -1
  br i1 %99, label %100, label %.thread

100:                                              ; preds = %97
  %101 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %102 unwind label %52

102:                                              ; preds = %100
  %103 = load i32, ptr %101, align 4, !tbaa !5
  %104 = icmp sgt i32 %103, -1
  br i1 %104, label %105, label %.thread

105:                                              ; preds = %102
  %106 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %107 unwind label %52

107:                                              ; preds = %105
  %108 = load i32, ptr %106, align 4, !tbaa !5
  %109 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %110 unwind label %52

.thread:                                          ; preds = %71, %97, %102, %91, %46
  %.2.ph = phi i32 [ %.02361, %97 ], [ %.02361, %102 ], [ %92, %91 ], [ %.02361, %71 ], [ %.02361, %46 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br label %112

110:                                              ; preds = %107
  %111 = load i32, ptr %109, align 4, !tbaa !5
  %.not35 = icmp eq i32 %108, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  br i1 %.not35, label %112, label %._crit_edge66

112:                                              ; preds = %.thread, %110
  %.251 = phi i32 [ %.2.ph, %.thread ], [ %.02361, %110 ]
  %113 = add nuw nsw i32 %.02262, 1
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %.not52 = icmp slt i32 %113, %114
  br i1 %.not52, label %.lr.ph65, label %._crit_edge66, !llvm.loop !11

._crit_edge66:                                    ; preds = %110, %112, %25
  %.not52.lcssa = phi i1 [ false, %25 ], [ false, %112 ], [ true, %110 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  %115 = load i32, ptr %1, align 4, !tbaa !5
  %.not3772 = icmp slt i32 %115, 1
  br i1 %.not3772, label %._crit_edge75.thread, label %.lr.ph74

._crit_edge75.thread:                             ; preds = %._crit_edge66
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %._crit_edge79

._crit_edge75:                                    ; preds = %.loopexit54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  %116 = icmp sgt i32 %141, 2
  br i1 %116, label %.lr.ph78, label %._crit_edge79

.lr.ph74:                                         ; preds = %._crit_edge66, %.loopexit54
  %117 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %118 unwind label %122

118:                                              ; preds = %.lr.ph74
  %119 = load i32, ptr %117, align 4, !tbaa !5
  %120 = icmp slt i32 %119, 0
  %.pre93 = load i32, ptr %1, align 4, !tbaa !5
  %121 = icmp sgt i32 %.pre93, 2
  %or.cond = select i1 %120, i1 %121, i1 false
  br i1 %or.cond, label %.lr.ph71, label %.loopexit54

122:                                              ; preds = %.lr.ph74
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %144

.lr.ph71:                                         ; preds = %118, %136
  %indvars.iv = phi i64 [ %indvars.iv.next, %136 ], [ 0, %118 ]
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #5
  %125 = load i32, ptr %124, align 4, !tbaa !5
  %126 = icmp slt i32 %125, 3
  br i1 %126, label %127, label %136

127:                                              ; preds = %.lr.ph71
  %128 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %129 unwind label %134

129:                                              ; preds = %127
  %130 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %130, ptr %128, align 4, !tbaa !5
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv) #5
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %131, align 4, !tbaa !5
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %.loopexit54

134:                                              ; preds = %127
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %144

136:                                              ; preds = %.lr.ph71
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %137 = load i32, ptr %1, align 4, !tbaa !5
  %138 = sdiv i32 %137, 3
  %139 = sext i32 %138 to i64
  %140 = icmp slt i64 %indvars.iv.next, %139
  br i1 %140, label %.lr.ph71, label %.loopexit54, !llvm.loop !12

.loopexit54:                                      ; preds = %136, %129, %118
  %141 = phi i32 [ %.pre, %129 ], [ %.pre93, %118 ], [ %137, %136 ]
  %142 = load i32, ptr %12, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %12, align 4, !tbaa !5
  %.not37.not = icmp slt i32 %142, %141
  br i1 %.not37.not, label %.lr.ph74, label %._crit_edge75, !llvm.loop !13

144:                                              ; preds = %134, %122
  %.pn = phi { ptr, i32 } [ %135, %134 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  br label %174

145:                                              ; preds = %.lr.ph78
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %146 = load i32, ptr %1, align 4, !tbaa !5
  %147 = sdiv i32 %146, 3
  %148 = sext i32 %147 to i64
  %149 = icmp slt i64 %indvars.iv.next91, %148
  br i1 %149, label %.lr.ph78, label %._crit_edge79, !llvm.loop !14

._crit_edge79:                                    ; preds = %145, %._crit_edge75.thread, %._crit_edge75
  %150 = phi i32 [ %141, %._crit_edge75 ], [ %115, %._crit_edge75.thread ], [ %146, %145 ]
  br i1 %.not52.lcssa, label %.critedge, label %.preheader

.preheader:                                       ; preds = %._crit_edge79
  %151 = icmp sgt i32 %150, 2
  br i1 %151, label %.lr.ph85, label %.loopexit

.lr.ph78:                                         ; preds = %._crit_edge75, %145
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %145 ], [ 0, %._crit_edge75 ]
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %indvars.iv90) #5
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %.not38 = icmp eq i32 %153, 3
  br i1 %.not38, label %145, label %.critedge

.lr.ph85:                                         ; preds = %.preheader, %._crit_edge83
  %154 = phi i32 [ %157, %._crit_edge83 ], [ %150, %.preheader ]
  %.084 = phi i32 [ %156, %._crit_edge83 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  store i32 1, ptr %13, align 4, !tbaa !5
  %.not4080 = icmp slt i32 %154, 1
  br i1 %.not4080, label %._crit_edge83, label %.lr.ph82

._crit_edge83:                                    ; preds = %169, %.lr.ph85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  %155 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  %156 = add nuw nsw i32 %.084, 1
  %157 = load i32, ptr %1, align 4, !tbaa !5
  %158 = sdiv i32 %157, 3
  %159 = icmp slt i32 %156, %158
  br i1 %159, label %.lr.ph85, label %.loopexit, !llvm.loop !15

.lr.ph82:                                         ; preds = %.lr.ph85, %169
  %160 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %161 unwind label %167

161:                                              ; preds = %.lr.ph82
  %162 = load i32, ptr %160, align 4, !tbaa !5
  %163 = icmp eq i32 %162, %.084
  br i1 %163, label %164, label %169

164:                                              ; preds = %161
  %165 = load i32, ptr %13, align 4, !tbaa !5
  %166 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %165)
  br label %169

167:                                              ; preds = %.lr.ph82
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %174

169:                                              ; preds = %161, %164
  %170 = load i32, ptr %13, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %13, align 4, !tbaa !5
  %172 = load i32, ptr %1, align 4, !tbaa !5
  %.not40.not = icmp slt i32 %170, %172
  br i1 %.not40.not, label %.lr.ph82, label %._crit_edge83, !llvm.loop !16

.critedge:                                        ; preds = %.lr.ph78, %._crit_edge79
  %173 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge83, %.preheader, %.critedge
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

174:                                              ; preds = %167, %144, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn, %144 ], [ %168, %167 ], [ %53, %52 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %175

175:                                              ; preds = %174, %27
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %174 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %176

176:                                              ; preds = %175, %23
  %.pn44 = phi { ptr, i32 } [ %24, %23 ], [ %.pn.pn.pn, %175 ]
  call void @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn44
}

; 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 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEE6insertIS2_IiiEEENSt9enable_ifIXsr16is_constructibleIS4_T_EE5valueES2_ISt17_Rb_tree_iteratorIS4_EbEE4typeEOSA_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #4 align 2

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

declare i32 @__gxx_personality_v0(...)

; 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 @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEEixERS3_(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(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #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 @_ZNSt3mapIiiSt4lessIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { nounwind }

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

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


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