; LLVM IR from DionysiosB/CodeForces :: 0300-0399 (339D-XeniaAndBidOperations)

; 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<long, std::pair<const long, std::vector<long>>, std::_Select1st<std::pair<const long, std::vector<long>>>, std::less<long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long, std::pair<const long, std::vector<long>>, std::_Select1st<std::pair<const long, std::vector<long>>>, std::less<long>>::_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<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.0" = type { i8 }
%"struct.std::pair.3" = type { i64, %"class.std::vector" }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }

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

34:                                               ; preds = %53, %0
  %35 = load i64, ptr %5, align 8, !tbaa !5
  %36 = load i64, ptr %2, align 8, !tbaa !5
  %37 = icmp sle i64 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %70

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %40 = load i64, ptr %5, align 8, !tbaa !5
  %41 = shl i64 1, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %41, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %42 unwind label %56

42:                                               ; preds = %39
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %43 = load i64, ptr %2, align 8, !tbaa !5
  %44 = load i64, ptr %5, align 8, !tbaa !5
  %45 = sub nsw i64 %43, %44
  store i64 %45, ptr %12, align 8, !tbaa !5
  invoke void @_ZNSt4pairIlSt6vectorIlSaIlEEEC2IlRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %46 unwind label %60

46:                                               ; preds = %42
  %47 = invoke { ptr, i8 } @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEE6insertIS5_IlS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %48 unwind label %64

48:                                               ; preds = %46
  %49 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 0
  %50 = extractvalue { ptr, i8 } %47, 0
  store ptr %50, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i8 }, ptr %13, i32 0, i32 1
  %52 = extractvalue { ptr, i8 } %47, 1
  store i8 %52, ptr %51, align 8
  call void @_ZNSt4pairIlSt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  br label %53

53:                                               ; preds = %48
  %54 = load i64, ptr %5, align 8, !tbaa !5
  %55 = add nsw i64 %54, 1
  store i64 %55, ptr %5, align 8, !tbaa !5
  br label %34, !llvm.loop !9

56:                                               ; preds = %39
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %69

60:                                               ; preds = %42
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %9, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %10, align 4
  br label %68

64:                                               ; preds = %46
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %9, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %10, align 4
  call void @_ZNSt4pairIlSt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %68

68:                                               ; preds = %64, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %69

69:                                               ; preds = %68, %56
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %311

70:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store i64 0, ptr %14, align 8, !tbaa !5
  br label %71

71:                                               ; preds = %89, %70
  %72 = load i64, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !5
  %73 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %74 unwind label %78

74:                                               ; preds = %71
  %75 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #6
  %76 = icmp ult i64 %72, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br i1 %76, label %82, label %77

77:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %97

78:                                               ; preds = %71
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %9, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %96

82:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !5
  %83 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %84 unwind label %92

84:                                               ; preds = %82
  %85 = load i64, ptr %14, align 8, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #6
  %87 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %86)
          to label %88 unwind label %92

88:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %89

89:                                               ; preds = %88
  %90 = load i64, ptr %14, align 8, !tbaa !5
  %91 = add nsw i64 %90, 1
  store i64 %91, ptr %14, align 8, !tbaa !5
  br label %71, !llvm.loop !11

92:                                               ; preds = %84, %82
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %9, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %96

96:                                               ; preds = %92, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %311

97:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store i64 1, ptr %17, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %189, %97
  %99 = load i64, ptr %17, align 8, !tbaa !5
  %100 = load i64, ptr %2, align 8, !tbaa !5
  %101 = icmp sle i64 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %192

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store i64 0, ptr %19, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %184, %103
  %105 = load i64, ptr %19, align 8, !tbaa !5
  %106 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %107 unwind label %111

107:                                              ; preds = %104
  %108 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #6
  %109 = icmp ult i64 %105, %108
  br i1 %109, label %115, label %110

110:                                              ; preds = %107
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %188

111:                                              ; preds = %104
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %9, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %10, align 4
  br label %187

115:                                              ; preds = %107
  %116 = load i64, ptr %17, align 8, !tbaa !5
  %117 = srem i64 %116, 2
  %118 = icmp ne i64 %117, 0
  br i1 %118, label %119, label %151

119:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %120 = load i64, ptr %17, align 8, !tbaa !5
  %121 = sub nsw i64 %120, 1
  store i64 %121, ptr %20, align 8, !tbaa !5
  %122 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %123 unwind label %142

123:                                              ; preds = %119
  %124 = load i64, ptr %19, align 8, !tbaa !5
  %125 = mul nsw i64 2, %124
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %125) #6
  %127 = load i64, ptr %126, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %128 = load i64, ptr %17, align 8, !tbaa !5
  %129 = sub nsw i64 %128, 1
  store i64 %129, ptr %21, align 8, !tbaa !5
  %130 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %131 unwind label %146

131:                                              ; preds = %123
  %132 = load i64, ptr %19, align 8, !tbaa !5
  %133 = mul nsw i64 2, %132
  %134 = add nsw i64 %133, 1
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %134) #6
  %136 = load i64, ptr %135, align 8, !tbaa !5
  %137 = or i64 %127, %136
  %138 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %139 unwind label %146

139:                                              ; preds = %131
  %140 = load i64, ptr %19, align 8, !tbaa !5
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %140) #6
  store i64 %137, ptr %141, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %183

142:                                              ; preds = %119
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %9, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %10, align 4
  br label %150

146:                                              ; preds = %131, %123
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %9, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  br label %150

150:                                              ; preds = %146, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %187

151:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %152 = load i64, ptr %17, align 8, !tbaa !5
  %153 = sub nsw i64 %152, 1
  store i64 %153, ptr %22, align 8, !tbaa !5
  %154 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %155 unwind label %174

155:                                              ; preds = %151
  %156 = load i64, ptr %19, align 8, !tbaa !5
  %157 = mul nsw i64 2, %156
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %157) #6
  %159 = load i64, ptr %158, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %160 = load i64, ptr %17, align 8, !tbaa !5
  %161 = sub nsw i64 %160, 1
  store i64 %161, ptr %23, align 8, !tbaa !5
  %162 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %163 unwind label %178

163:                                              ; preds = %155
  %164 = load i64, ptr %19, align 8, !tbaa !5
  %165 = mul nsw i64 2, %164
  %166 = add nsw i64 %165, 1
  %167 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %162, i64 noundef %166) #6
  %168 = load i64, ptr %167, align 8, !tbaa !5
  %169 = xor i64 %159, %168
  %170 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %171 unwind label %178

171:                                              ; preds = %163
  %172 = load i64, ptr %19, align 8, !tbaa !5
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %170, i64 noundef %172) #6
  store i64 %169, ptr %173, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %183

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

178:                                              ; preds = %163, %155
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %9, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %182

182:                                              ; preds = %178, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %187

183:                                              ; preds = %171, %139
  br label %184

184:                                              ; preds = %183
  %185 = load i64, ptr %19, align 8, !tbaa !5
  %186 = add nsw i64 %185, 1
  store i64 %186, ptr %19, align 8, !tbaa !5
  br label %104, !llvm.loop !12

187:                                              ; preds = %182, %150, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %311

188:                                              ; preds = %110
  br label %189

189:                                              ; preds = %188
  %190 = load i64, ptr %17, align 8, !tbaa !5
  %191 = add nsw i64 %190, 1
  store i64 %191, ptr %17, align 8, !tbaa !5
  br label %98, !llvm.loop !13

192:                                              ; preds = %102
  br label %193

193:                                              ; preds = %302, %192
  %194 = load i64, ptr %3, align 8, !tbaa !5
  %195 = add nsw i64 %194, -1
  store i64 %195, ptr %3, align 8, !tbaa !5
  %196 = icmp ne i64 %194, 0
  br i1 %196, label %197, label %309

197:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %198 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %24, ptr noundef %25)
          to label %199 unwind label %213

199:                                              ; preds = %197
  %200 = load i64, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  store i64 0, ptr %26, align 8, !tbaa !5
  %201 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %202 unwind label %217

202:                                              ; preds = %199
  %203 = load i64, ptr %24, align 8, !tbaa !5
  %204 = sub nsw i64 %203, 1
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %204) #6
  store i64 %200, ptr %205, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %206 = load i64, ptr %24, align 8, !tbaa !5
  %207 = sub nsw i64 %206, 1
  store i64 %207, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  store i64 1, ptr %28, align 8, !tbaa !5
  br label %208

208:                                              ; preds = %292, %202
  %209 = load i64, ptr %28, align 8, !tbaa !5
  %210 = load i64, ptr %2, align 8, !tbaa !5
  %211 = icmp sle i64 %209, %210
  br i1 %211, label %221, label %212

212:                                              ; preds = %208
  store i32 16, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %296

213:                                              ; preds = %197
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %9, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %10, align 4
  br label %308

217:                                              ; preds = %199
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %9, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  br label %308

221:                                              ; preds = %208
  %222 = load i64, ptr %27, align 8, !tbaa !5
  %223 = sdiv i64 %222, 2
  store i64 %223, ptr %27, align 8, !tbaa !5
  %224 = load i64, ptr %28, align 8, !tbaa !5
  %225 = srem i64 %224, 2
  %226 = icmp ne i64 %225, 0
  br i1 %226, label %227, label %259

227:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %228 = load i64, ptr %28, align 8, !tbaa !5
  %229 = sub nsw i64 %228, 1
  store i64 %229, ptr %29, align 8, !tbaa !5
  %230 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %231 unwind label %250

231:                                              ; preds = %227
  %232 = load i64, ptr %27, align 8, !tbaa !5
  %233 = mul nsw i64 2, %232
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %230, i64 noundef %233) #6
  %235 = load i64, ptr %234, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %236 = load i64, ptr %28, align 8, !tbaa !5
  %237 = sub nsw i64 %236, 1
  store i64 %237, ptr %30, align 8, !tbaa !5
  %238 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %239 unwind label %254

239:                                              ; preds = %231
  %240 = load i64, ptr %27, align 8, !tbaa !5
  %241 = mul nsw i64 2, %240
  %242 = add nsw i64 %241, 1
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %238, i64 noundef %242) #6
  %244 = load i64, ptr %243, align 8, !tbaa !5
  %245 = or i64 %235, %244
  %246 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %247 unwind label %254

247:                                              ; preds = %239
  %248 = load i64, ptr %27, align 8, !tbaa !5
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %246, i64 noundef %248) #6
  store i64 %245, ptr %249, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %291

250:                                              ; preds = %227
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %9, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %10, align 4
  br label %258

254:                                              ; preds = %239, %231
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %9, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %258

258:                                              ; preds = %254, %250
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %295

259:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %260 = load i64, ptr %28, align 8, !tbaa !5
  %261 = sub nsw i64 %260, 1
  store i64 %261, ptr %31, align 8, !tbaa !5
  %262 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %31)
          to label %263 unwind label %282

263:                                              ; preds = %259
  %264 = load i64, ptr %27, align 8, !tbaa !5
  %265 = mul nsw i64 2, %264
  %266 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %262, i64 noundef %265) #6
  %267 = load i64, ptr %266, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %268 = load i64, ptr %28, align 8, !tbaa !5
  %269 = sub nsw i64 %268, 1
  store i64 %269, ptr %32, align 8, !tbaa !5
  %270 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %271 unwind label %286

271:                                              ; preds = %263
  %272 = load i64, ptr %27, align 8, !tbaa !5
  %273 = mul nsw i64 2, %272
  %274 = add nsw i64 %273, 1
  %275 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %270, i64 noundef %274) #6
  %276 = load i64, ptr %275, align 8, !tbaa !5
  %277 = xor i64 %267, %276
  %278 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %279 unwind label %286

279:                                              ; preds = %271
  %280 = load i64, ptr %27, align 8, !tbaa !5
  %281 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %278, i64 noundef %280) #6
  store i64 %277, ptr %281, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %291

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

286:                                              ; preds = %271, %263
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %9, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br label %290

290:                                              ; preds = %286, %282
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  br label %295

291:                                              ; preds = %279, %247
  br label %292

292:                                              ; preds = %291
  %293 = load i64, ptr %28, align 8, !tbaa !5
  %294 = add nsw i64 %293, 1
  store i64 %294, ptr %28, align 8, !tbaa !5
  br label %208, !llvm.loop !14

295:                                              ; preds = %290, %258
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %307

296:                                              ; preds = %212
  %297 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %298 unwind label %303

298:                                              ; preds = %296
  %299 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %297, i64 noundef 0) #6
  %300 = load i64, ptr %299, align 8, !tbaa !5
  %301 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %300)
          to label %302 unwind label %303

302:                                              ; preds = %298
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %193, !llvm.loop !15

303:                                              ; preds = %298, %296
  %304 = landingpad { ptr, i32 }
          cleanup
  %305 = extractvalue { ptr, i32 } %304, 0
  store ptr %305, ptr %9, align 8
  %306 = extractvalue { ptr, i32 } %304, 1
  store i32 %306, ptr %10, align 4
  br label %307

307:                                              ; preds = %303, %295
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %308

308:                                              ; preds = %307, %217, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %311

309:                                              ; preds = %193
  store i32 0, ptr %1, align 4
  store i32 1, ptr %18, align 4
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %310 = load i32, ptr %1, align 4
  ret i32 %310

311:                                              ; preds = %308, %187, %96, %69
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %312

312:                                              ; preds = %311
  %313 = load ptr, ptr %9, align 8
  %314 = load i32, ptr %10, align 4
  %315 = insertvalue { ptr, i32 } poison, ptr %313, 0
  %316 = insertvalue { ptr, i32 } %315, i32 %314, 1
  resume { ptr, i32 } %316
}

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEE6insertIS5_IlS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIlSt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(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 = !{!"long", !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}


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

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

.preheader64.preheader:                           ; preds = %32, %0
  br label %.preheader64

.lr.ph:                                           ; preds = %0, %32
  %.02666 = phi i64 [ %33, %32 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %26 = shl nuw i64 1, %.02666
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIlSaIlEEC2EmRKlRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %26, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %27 unwind label %35

27:                                               ; preds = %.lr.ph
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %28 = load i64, ptr %1, align 8, !tbaa !5
  %29 = sub nsw i64 %28, %.02666
  store i64 %29, ptr %8, align 8, !tbaa !5
  invoke void @_ZNSt4pairIlSt6vectorIlSaIlEEEC2IlRS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS7_S8_EEEbE4typeELb1EEEOS7_OS8_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %30 unwind label %37

30:                                               ; preds = %27
  %31 = invoke { ptr, i8 } @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEE6insertIS5_IlS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %32 unwind label %39

32:                                               ; preds = %30
  call void @_ZNSt4pairIlSt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %33 = add nuw nsw i64 %.02666, 1
  %34 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.02666, %34
  br i1 %.not.not, label %.lr.ph, label %.preheader64.preheader, !llvm.loop !9

35:                                               ; preds = %.lr.ph
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %42

37:                                               ; preds = %27
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %30
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIlSt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %41

41:                                               ; preds = %39, %37
  %.pn60 = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  br label %42

42:                                               ; preds = %41, %35
  %.pn60.pn = phi { ptr, i32 } [ %.pn60, %41 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %195

.preheader64:                                     ; preds = %.preheader64.preheader, %53
  %.025 = phi i64 [ %56, %53 ], [ 0, %.preheader64.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store i64 0, ptr %9, align 8, !tbaa !5
  %43 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %44 unwind label %49

44:                                               ; preds = %.preheader64
  %45 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #6
  %46 = icmp ult i64 %.025, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br i1 %46, label %51, label %47

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  store i64 1, ptr %11, align 8, !tbaa !5
  %48 = load i64, ptr %1, align 8, !tbaa !5
  %.not4167 = icmp slt i64 %48, 1
  br i1 %.not4167, label %._crit_edge, label %.preheader

49:                                               ; preds = %.preheader64
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %195

51:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  store i64 0, ptr %10, align 8, !tbaa !5
  %52 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %53 unwind label %57

53:                                               ; preds = %51
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %.025) #6
  %55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %54)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  %56 = add nuw nsw i64 %.025, 1
  br label %.preheader64, !llvm.loop !11

57:                                               ; preds = %51
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %195

._crit_edge:                                      ; preds = %66, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  %59 = load i64, ptr %2, align 8, !tbaa !5
  %60 = add nsw i64 %59, -1
  store i64 %60, ptr %2, align 8, !tbaa !5
  %.not4274 = icmp eq i64 %59, 0
  br i1 %.not4274, label %._crit_edge77, label %.lr.ph76

.preheader:                                       ; preds = %47, %.preheader.backedge
  %.024 = phi i64 [ %.024.be, %.preheader.backedge ], [ 0, %47 ]
  %61 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %62 unwind label %69

62:                                               ; preds = %.preheader
  %63 = call noundef i64 @_ZNKSt6vectorIlSaIlEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #6
  %64 = icmp ult i64 %.024, %63
  %65 = load i64, ptr %11, align 8, !tbaa !5
  br i1 %64, label %71, label %66

66:                                               ; preds = %62
  %67 = add nsw i64 %65, 1
  store i64 %67, ptr %11, align 8, !tbaa !5
  %68 = load i64, ptr %1, align 8, !tbaa !5
  %.not41.not = icmp slt i64 %65, %68
  br i1 %.not41.not, label %.preheader.backedge, label %._crit_edge

69:                                               ; preds = %.preheader
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %120

71:                                               ; preds = %62
  %72 = and i64 %65, 1
  %.not52 = icmp eq i64 %72, 0
  %73 = add nsw i64 %65, -1
  br i1 %.not52, label %96, label %74

74:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  store i64 %73, ptr %12, align 8, !tbaa !5
  %75 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %76 unwind label %91

76:                                               ; preds = %74
  %77 = shl nuw nsw i64 %.024, 1
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %77) #6
  %79 = load i64, ptr %78, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %80 = load i64, ptr %11, align 8, !tbaa !5
  %81 = add nsw i64 %80, -1
  store i64 %81, ptr %13, align 8, !tbaa !5
  %82 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %83 unwind label %93

83:                                               ; preds = %76
  %84 = or disjoint i64 %77, 1
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #6
  %86 = load i64, ptr %85, align 8, !tbaa !5
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %88 unwind label %93

88:                                               ; preds = %83
  %89 = or i64 %86, %79
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %.024) #6
  store i64 %89, ptr %90, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %118

91:                                               ; preds = %74
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %95

93:                                               ; preds = %83, %76
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  br label %95

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

96:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  store i64 %73, ptr %14, align 8, !tbaa !5
  %97 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %98 unwind label %113

98:                                               ; preds = %96
  %99 = shl nuw nsw i64 %.024, 1
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %99) #6
  %101 = load i64, ptr %100, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %102 = load i64, ptr %11, align 8, !tbaa !5
  %103 = add nsw i64 %102, -1
  store i64 %103, ptr %15, align 8, !tbaa !5
  %104 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %105 unwind label %115

105:                                              ; preds = %98
  %106 = or disjoint i64 %99, 1
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #6
  %108 = load i64, ptr %107, align 8, !tbaa !5
  %109 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %110 unwind label %115

110:                                              ; preds = %105
  %111 = xor i64 %108, %101
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef %.024) #6
  store i64 %111, ptr %112, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %118

113:                                              ; preds = %96
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %117

115:                                              ; preds = %105, %98
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %117

117:                                              ; preds = %115, %113
  %.pn53 = phi { ptr, i32 } [ %116, %115 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %120

118:                                              ; preds = %88, %110
  %119 = add nuw nsw i64 %.024, 1
  br label %.preheader.backedge

.preheader.backedge:                              ; preds = %118, %66
  %.024.be = phi i64 [ %119, %118 ], [ 0, %66 ]
  br label %.preheader, !llvm.loop !12

120:                                              ; preds = %117, %95, %69
  %.pn55.pn = phi { ptr, i32 } [ %.pn55, %95 ], [ %.pn53, %117 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %195

.lr.ph76:                                         ; preds = %._crit_edge, %186
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %121 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %16, ptr noundef nonnull %17)
  %122 = load i64, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  store i64 0, ptr %18, align 8, !tbaa !5
  %123 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %124 unwind label %132

124:                                              ; preds = %.lr.ph76
  %125 = load i64, ptr %16, align 8, !tbaa !5
  %126 = add nsw i64 %125, -1
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %123, i64 noundef %126) #6
  store i64 %122, ptr %127, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %128 = load i64, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  store i64 1, ptr %19, align 8, !tbaa !5
  %129 = load i64, ptr %1, align 8, !tbaa !5
  %.not4468 = icmp slt i64 %129, 1
  br i1 %.not4468, label %._crit_edge73, label %.lr.ph72.preheader

.lr.ph72.preheader:                               ; preds = %124
  %130 = add nsw i64 %128, -1
  br label %.lr.ph72

._crit_edge73:                                    ; preds = %181, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  %131 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %186 unwind label %192

132:                                              ; preds = %.lr.ph76
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %194

.lr.ph72:                                         ; preds = %.lr.ph72.preheader, %181
  %.070 = phi i64 [ %134, %181 ], [ %130, %.lr.ph72.preheader ]
  %storemerge4369 = phi i64 [ %183, %181 ], [ 1, %.lr.ph72.preheader ]
  %134 = sdiv i64 %.070, 2
  %135 = and i64 %storemerge4369, 1
  %.not45 = icmp eq i64 %135, 0
  %136 = add nsw i64 %storemerge4369, -1
  br i1 %.not45, label %159, label %137

137:                                              ; preds = %.lr.ph72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  store i64 %136, ptr %20, align 8, !tbaa !5
  %138 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %139 unwind label %154

139:                                              ; preds = %137
  %140 = shl nsw i64 %134, 1
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %140) #6
  %142 = load i64, ptr %141, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #6
  %143 = load i64, ptr %19, align 8, !tbaa !5
  %144 = add nsw i64 %143, -1
  store i64 %144, ptr %21, align 8, !tbaa !5
  %145 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %146 unwind label %156

146:                                              ; preds = %139
  %147 = or disjoint i64 %140, 1
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %147) #6
  %149 = load i64, ptr %148, align 8, !tbaa !5
  %150 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %151 unwind label %156

151:                                              ; preds = %146
  %152 = or i64 %149, %142
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %150, i64 noundef %134) #6
  store i64 %152, ptr %153, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br label %181

154:                                              ; preds = %137
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %158

156:                                              ; preds = %146, %139
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  br label %158

158:                                              ; preds = %156, %154
  %.pn47 = phi { ptr, i32 } [ %157, %156 ], [ %155, %154 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  br label %185

159:                                              ; preds = %.lr.ph72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  store i64 %136, ptr %22, align 8, !tbaa !5
  %160 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %161 unwind label %176

161:                                              ; preds = %159
  %162 = shl nsw i64 %134, 1
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %160, i64 noundef %162) #6
  %164 = load i64, ptr %163, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  %165 = load i64, ptr %19, align 8, !tbaa !5
  %166 = add nsw i64 %165, -1
  store i64 %166, ptr %23, align 8, !tbaa !5
  %167 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixEOl(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %168 unwind label %178

168:                                              ; preds = %161
  %169 = or disjoint i64 %162, 1
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %169) #6
  %171 = load i64, ptr %170, align 8, !tbaa !5
  %172 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %3, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %173 unwind label %178

173:                                              ; preds = %168
  %174 = xor i64 %171, %164
  %175 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %134) #6
  store i64 %174, ptr %175, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %181

176:                                              ; preds = %159
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %180

178:                                              ; preds = %168, %161
  %179 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  br label %180

180:                                              ; preds = %178, %176
  %.pn = phi { ptr, i32 } [ %179, %178 ], [ %177, %176 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %185

181:                                              ; preds = %151, %173
  %182 = load i64, ptr %19, align 8, !tbaa !5
  %183 = add nsw i64 %182, 1
  store i64 %183, ptr %19, align 8, !tbaa !5
  %184 = load i64, ptr %1, align 8, !tbaa !5
  %.not44.not = icmp slt i64 %182, %184
  br i1 %.not44.not, label %.lr.ph72, label %._crit_edge73, !llvm.loop !13

185:                                              ; preds = %180, %158
  %.pn47.pn = phi { ptr, i32 } [ %.pn47, %158 ], [ %.pn, %180 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br label %194

186:                                              ; preds = %._crit_edge73
  %187 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef 0) #6
  %188 = load i64, ptr %187, align 8, !tbaa !5
  %189 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %188)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  %190 = load i64, ptr %2, align 8, !tbaa !5
  %191 = add nsw i64 %190, -1
  store i64 %191, ptr %2, align 8, !tbaa !5
  %.not42 = icmp eq i64 %190, 0
  br i1 %.not42, label %._crit_edge77, label %.lr.ph76, !llvm.loop !14

192:                                              ; preds = %._crit_edge73
  %193 = landingpad { ptr, i32 }
          cleanup
  br label %194

194:                                              ; preds = %185, %192, %132
  %.pn47.pn.pn.pn = phi { ptr, i32 } [ %133, %132 ], [ %.pn47.pn, %185 ], [ %193, %192 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %195

._crit_edge77:                                    ; preds = %186, %._crit_edge
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

195:                                              ; preds = %49, %57, %194, %120, %42
  %.pn60.pn.pn = phi { ptr, i32 } [ %.pn60.pn, %42 ], [ %.pn55.pn, %120 ], [ %.pn47.pn.pn.pn, %194 ], [ %58, %57 ], [ %50, %49 ]
  call void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn60.pn.pn
}

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIlED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEE6insertIS5_IlS2_EEENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueES5_ISt17_Rb_tree_iteratorIS7_EbEE4typeEOSD_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIlSt6vectorIlSaIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 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 void @_ZNSt3mapIlSt6vectorIlSaIlEESt4lessIlESaISt4pairIKlS2_EEED2Ev(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 = !{!"long", !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}


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