; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101064B.ll (Z5solvev)

; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::initializer_list" = type { ptr, i64 }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::hash" = type { i8 }
%"struct.std::equal_to" = type { i8 }
%"class.std::allocator.2" = type { i8 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = 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 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::unordered_map", align 8
  %3 = alloca %"class.std::initializer_list", align 8
  %4 = alloca [1 x %"struct.std::pair"], align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::hash", align 1
  %8 = alloca %"struct.std::equal_to", align 1
  %9 = alloca %"class.std::allocator.2", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::unordered_map", align 8
  %18 = alloca %"struct.std::hash", align 1
  %19 = alloca %"struct.std::equal_to", align 1
  %20 = alloca %"class.std::allocator.2", align 1
  %21 = alloca ptr, align 8
  %22 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %23 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::vector", align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca ptr, align 8
  %41 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %42 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %43 = alloca ptr, align 8
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  call void @llvm.lifetime.start.p0(i64 56, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @_ZNSt4pairIKiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %47 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 0
  store ptr %4, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 1
  store i64 1, ptr %48, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  call void @_ZNSaISt4pairIKiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  %49 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8
  %51 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 1
  %52 = load i64, ptr %51, align 8
  invoke void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEC2ESt16initializer_listIS6_EmRKS1_RKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr %50, i64 %52, i64 noundef 0, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %53 unwind label %59

53:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %252, %53
  %55 = load i32, ptr %12, align 4, !tbaa !5
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = icmp sle i32 %55, %56
  br i1 %57, label %63, label %58

58:                                               ; preds = %54
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %256

59:                                               ; preds = %0
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %10, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %11, align 4
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %326

63:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 1, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %86, %63
  %65 = load i32, ptr %16, align 4, !tbaa !5
  %66 = icmp sle i32 %65, 4
  br i1 %66, label %67, label %71

67:                                               ; preds = %64
  %68 = load i32, ptr %16, align 4, !tbaa !5
  %69 = load i32, ptr %12, align 4, !tbaa !5
  %70 = icmp sle i32 %68, %69
  br label %71

71:                                               ; preds = %67, %64
  %72 = phi i1 [ false, %64 ], [ %70, %67 ]
  br i1 %72, label %74, label %73

73:                                               ; preds = %71
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %89

74:                                               ; preds = %71
  %75 = load i32, ptr %15, align 4, !tbaa !5
  %76 = load i32, ptr %12, align 4, !tbaa !5
  %77 = load i32, ptr %16, align 4, !tbaa !5
  %78 = sub nsw i32 %76, %77
  %79 = add nsw i32 %78, 1
  %80 = mul nsw i32 %75, %79
  %81 = load i32, ptr %16, align 4, !tbaa !5
  %82 = sdiv i32 %80, %81
  store i32 %82, ptr %15, align 4, !tbaa !5
  %83 = load i32, ptr %15, align 4, !tbaa !5
  %84 = load i32, ptr %14, align 4, !tbaa !5
  %85 = add nsw i32 %84, %83
  store i32 %85, ptr %14, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %74
  %87 = load i32, ptr %16, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %16, align 4, !tbaa !5
  br label %64, !llvm.loop !14

89:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 56, ptr %17) #5
  %90 = load i32, ptr %14, align 4, !tbaa !5
  %91 = load i32, ptr %14, align 4, !tbaa !5
  %92 = sdiv i32 %91, 2
  %93 = add nsw i32 %90, %92
  %94 = sext i32 %93 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaISt4pairIKiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS1_RKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(56) %17, i64 noundef %94, ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef nonnull align 1 dereferenceable(1) %19, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %95 unwind label %107

95:                                               ; preds = %89
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store ptr %2, ptr %21, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %96 = load ptr, ptr %21, align 8, !tbaa !16
  %97 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %96) #5
  %98 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %22, i32 0, i32 0
  %99 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %98, i32 0, i32 0
  store ptr %97, ptr %99, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %100 = load ptr, ptr %21, align 8, !tbaa !16
  %101 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %100) #5
  %102 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %23, i32 0, i32 0
  %103 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %102, i32 0, i32 0
  store ptr %101, ptr %103, align 8
  br label %104

104:                                              ; preds = %246, %95
  %105 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  br i1 %105, label %111, label %106

106:                                              ; preds = %104
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %250

107:                                              ; preds = %89
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %10, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %11, align 4
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %255

111:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %112 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  store ptr %112, ptr %24, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %113 = load ptr, ptr %24, align 8, !tbaa !16
  %114 = getelementptr inbounds %"struct.std::pair", ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 4, !tbaa !17
  store i32 %115, ptr %27, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %127, %111
  %117 = load i32, ptr %27, align 4, !tbaa !5
  %118 = icmp sgt i32 %117, 0
  br i1 %118, label %120, label %119

119:                                              ; preds = %116
  store i32 10, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %134

120:                                              ; preds = %116
  %121 = load i32, ptr %25, align 4, !tbaa !5
  %122 = shl i32 %121, 6
  %123 = or i32 %122, 1
  store i32 %123, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %124 = load i32, ptr %27, align 4, !tbaa !5
  %125 = and i32 %124, 63
  store i32 %125, ptr %28, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %126 unwind label %130

126:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %127

127:                                              ; preds = %126
  %128 = load i32, ptr %27, align 4, !tbaa !5
  %129 = ashr i32 %128, 6
  store i32 %129, ptr %27, align 4, !tbaa !5
  br label %116, !llvm.loop !19

130:                                              ; preds = %120
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %10, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %249

134:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %135 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %136 = trunc i64 %135 to i32
  store i32 %136, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  store i32 1, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %191, %134
  %138 = load i32, ptr %31, align 4, !tbaa !5
  %139 = load i32, ptr %29, align 4, !tbaa !5
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 13, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %196

142:                                              ; preds = %137
  %143 = load i32, ptr %30, align 4, !tbaa !5
  %144 = load i32, ptr %25, align 4, !tbaa !5
  %145 = sub nsw i32 %144, %143
  store i32 %145, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %146 = load i32, ptr %31, align 4, !tbaa !5
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %155

148:                                              ; preds = %142
  %149 = load i32, ptr %31, align 4, !tbaa !5
  %150 = sub nsw i32 %149, 1
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %151) #5
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  br label %156

155:                                              ; preds = %142
  br label %156

156:                                              ; preds = %155, %148
  %157 = phi i32 [ %154, %148 ], [ 1, %155 ]
  store i32 %157, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %158 = load i32, ptr %31, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %159) #5
  %161 = load i32, ptr %160, align 4, !tbaa !5
  store i32 %161, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %162 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %162, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  %163 = load ptr, ptr %24, align 8, !tbaa !16
  %164 = getelementptr inbounds %"struct.std::pair", ptr %163, i32 0, i32 0
  %165 = load i32, ptr %164, align 4, !tbaa !17
  %166 = load i32, ptr %25, align 4, !tbaa !5
  %167 = add nsw i32 %165, %166
  store i32 %167, ptr %35, align 4, !tbaa !5
  br label %168

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

172:                                              ; preds = %168
  store i32 16, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %190

173:                                              ; preds = %168
  %174 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %175 unwind label %186

175:                                              ; preds = %173
  %176 = load ptr, ptr %24, align 8, !tbaa !16
  %177 = getelementptr inbounds %"struct.std::pair", ptr %176, i32 0, i32 1
  %178 = load i32, ptr %177, align 4, !tbaa !20
  invoke void @_Z6modIncRii(ptr noundef nonnull align 4 dereferenceable(4) %174, i32 noundef %178)
          to label %179 unwind label %186

179:                                              ; preds = %175
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %34, align 4, !tbaa !5
  %182 = add nsw i32 %181, -1
  store i32 %182, ptr %34, align 4, !tbaa !5
  %183 = load i32, ptr %30, align 4, !tbaa !5
  %184 = load i32, ptr %35, align 4, !tbaa !5
  %185 = sub nsw i32 %184, %183
  store i32 %185, ptr %35, align 4, !tbaa !5
  br label %168, !llvm.loop !21

186:                                              ; preds = %175, %173
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %10, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %248

190:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %191

191:                                              ; preds = %190
  %192 = load i32, ptr %31, align 4, !tbaa !5
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %31, align 4, !tbaa !5
  %194 = load i32, ptr %30, align 4, !tbaa !5
  %195 = shl i32 %194, 6
  store i32 %195, ptr %30, align 4, !tbaa !5
  br label %137, !llvm.loop !22

196:                                              ; preds = %141
  %197 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %198 = icmp eq i64 %197, 4
  br i1 %198, label %199, label %200

199:                                              ; preds = %196
  store i32 9, ptr %13, align 4
  br label %240

200:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  %201 = load i32, ptr %29, align 4, !tbaa !5
  %202 = icmp ne i32 %201, 0
  br i1 %202, label %203, label %207

203:                                              ; preds = %200
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = add nsw i32 %205, 1
  br label %208

207:                                              ; preds = %200
  br label %208

208:                                              ; preds = %207, %203
  %209 = phi i32 [ %206, %203 ], [ 1, %207 ]
  store i32 %209, ptr %36, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  %210 = load ptr, ptr %24, align 8, !tbaa !16
  %211 = getelementptr inbounds %"struct.std::pair", ptr %210, i32 0, i32 0
  %212 = load i32, ptr %211, align 4, !tbaa !17
  %213 = load i32, ptr %30, align 4, !tbaa !5
  %214 = load i32, ptr %36, align 4, !tbaa !5
  %215 = mul nsw i32 %213, %214
  %216 = add nsw i32 %212, %215
  store i32 %216, ptr %37, align 4, !tbaa !5
  br label %217

217:                                              ; preds = %229, %208
  %218 = load i32, ptr %36, align 4, !tbaa !5
  %219 = load i32, ptr %12, align 4, !tbaa !5
  %220 = icmp sle i32 %218, %219
  br i1 %220, label %222, label %221

221:                                              ; preds = %217
  store i32 19, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br label %239

222:                                              ; preds = %217
  %223 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 4 dereferenceable(4) %37)
          to label %224 unwind label %235

224:                                              ; preds = %222
  %225 = load ptr, ptr %24, align 8, !tbaa !16
  %226 = getelementptr inbounds %"struct.std::pair", ptr %225, i32 0, i32 1
  %227 = load i32, ptr %226, align 4, !tbaa !20
  invoke void @_Z6modIncRii(ptr noundef nonnull align 4 dereferenceable(4) %223, i32 noundef %227)
          to label %228 unwind label %235

228:                                              ; preds = %224
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %36, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %36, align 4, !tbaa !5
  %232 = load i32, ptr %30, align 4, !tbaa !5
  %233 = load i32, ptr %37, align 4, !tbaa !5
  %234 = add nsw i32 %233, %232
  store i32 %234, ptr %37, align 4, !tbaa !5
  br label %217, !llvm.loop !23

235:                                              ; preds = %224, %222
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %10, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  br label %248

239:                                              ; preds = %221
  store i32 0, ptr %13, align 4
  br label %240

240:                                              ; preds = %239, %199
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  %241 = load i32, ptr %13, align 4
  switch i32 %241, label %243 [
    i32 0, label %242
  ]

242:                                              ; preds = %240
  store i32 0, ptr %13, align 4
  br label %243

243:                                              ; preds = %242, %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %244 = load i32, ptr %13, align 4
  switch i32 %244, label %332 [
    i32 0, label %245
    i32 9, label %246
  ]

245:                                              ; preds = %243
  br label %246

246:                                              ; preds = %245, %243
  %247 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  br label %104

248:                                              ; preds = %235, %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %249

249:                                              ; preds = %248, %130
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #5
  br label %255

250:                                              ; preds = %106
  %251 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEaSEOS8_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %17) #5
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %252

252:                                              ; preds = %250
  %253 = load i32, ptr %12, align 4, !tbaa !5
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %12, align 4, !tbaa !5
  br label %54, !llvm.loop !24

255:                                              ; preds = %249, %107
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %325

256:                                              ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  store i32 1, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  store i32 1, ptr %39, align 4, !tbaa !5
  br label %257

257:                                              ; preds = %270, %256
  %258 = load i32, ptr %39, align 4, !tbaa !5
  %259 = load i32, ptr %1, align 4, !tbaa !5
  %260 = icmp sle i32 %258, %259
  br i1 %260, label %262, label %261

261:                                              ; preds = %257
  store i32 22, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  br label %273

262:                                              ; preds = %257
  %263 = load i32, ptr %38, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = load i32, ptr %39, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = mul nsw i64 %264, %266
  %268 = srem i64 %267, 1000000007
  %269 = trunc i64 %268 to i32
  store i32 %269, ptr %38, align 4, !tbaa !5
  br label %270

270:                                              ; preds = %262
  %271 = load i32, ptr %39, align 4, !tbaa !5
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %39, align 4, !tbaa !5
  br label %257, !llvm.loop !25

273:                                              ; preds = %261
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #5
  store ptr %2, ptr %40, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #5
  %274 = load ptr, ptr %40, align 8, !tbaa !16
  %275 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %274) #5
  %276 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %41, i32 0, i32 0
  %277 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %276, i32 0, i32 0
  store ptr %275, ptr %277, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #5
  %278 = load ptr, ptr %40, align 8, !tbaa !16
  %279 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %278) #5
  %280 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %42, i32 0, i32 0
  %281 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %280, i32 0, i32 0
  store ptr %279, ptr %281, align 8
  br label %282

282:                                              ; preds = %314, %273
  %283 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %42) #5
  br i1 %283, label %285, label %284

284:                                              ; preds = %282
  store i32 25, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  br label %316

285:                                              ; preds = %282
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #5
  %286 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #5
  store ptr %286, ptr %43, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #5
  store i32 0, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #5
  %287 = load ptr, ptr %43, align 8, !tbaa !16
  %288 = getelementptr inbounds %"struct.std::pair", ptr %287, i32 0, i32 0
  %289 = load i32, ptr %288, align 4, !tbaa !17
  store i32 %289, ptr %45, align 4, !tbaa !5
  br label %290

290:                                              ; preds = %295, %285
  %291 = load i32, ptr %45, align 4, !tbaa !5
  %292 = icmp sgt i32 %291, 0
  br i1 %292, label %294, label %293

293:                                              ; preds = %290
  store i32 27, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #5
  br label %300

294:                                              ; preds = %290
  br label %295

295:                                              ; preds = %294
  %296 = load i32, ptr %44, align 4, !tbaa !5
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %44, align 4, !tbaa !5
  %298 = load i32, ptr %45, align 4, !tbaa !5
  %299 = ashr i32 %298, 6
  store i32 %299, ptr %45, align 4, !tbaa !5
  br label %290, !llvm.loop !26

300:                                              ; preds = %293
  %301 = load i32, ptr %44, align 4, !tbaa !5
  %302 = icmp sge i32 %301, 3
  br i1 %302, label %303, label %313

303:                                              ; preds = %300
  %304 = load ptr, ptr %43, align 8, !tbaa !16
  %305 = getelementptr inbounds %"struct.std::pair", ptr %304, i32 0, i32 1
  %306 = load i32, ptr %305, align 4, !tbaa !20
  %307 = sub nsw i32 1000000007, %306
  invoke void @_Z6modIncRii(ptr noundef nonnull align 4 dereferenceable(4) %38, i32 noundef %307)
          to label %308 unwind label %309

308:                                              ; preds = %303
  br label %313

309:                                              ; preds = %303
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %10, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #5
  br label %324

313:                                              ; preds = %308, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #5
  br label %314

314:                                              ; preds = %313
  %315 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %41) #5
  br label %282

316:                                              ; preds = %284
  %317 = load i32, ptr %38, align 4, !tbaa !5
  %318 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %317)
          to label %319 unwind label %320

319:                                              ; preds = %316
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  ret void

320:                                              ; preds = %316
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %10, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %11, align 4
  br label %324

324:                                              ; preds = %320, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %325

325:                                              ; preds = %324, %255
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  br label %326

326:                                              ; preds = %325, %59
  call void @llvm.lifetime.end.p0(i64 56, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  br label %327

327:                                              ; preds = %326
  %328 = load ptr, ptr %10, align 8
  %329 = load i32, ptr %11, align 4
  %330 = insertvalue { ptr, i32 } poison, ptr %328, 0
  %331 = insertvalue { ptr, i32 } %330, i32 %329, 1
  resume { ptr, i32 } %331

332:                                              ; preds = %243
  unreachable
}

; 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 @_ZNSt4pairIKiiEC2IiiTnNSt9enable_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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(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 void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS1_RKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #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 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listISt4pairIKiiEE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !6, i64 0}
!18 = !{!"_ZTSSt4pairIKiiE", !6, i64 0, !6, i64 4}
!19 = distinct !{!19, !15}
!20 = !{!18, !6, i64 4}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}
!25 = distinct !{!25, !15}
!26 = distinct !{!26, !15}


; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::pair" = type { i32, i32 }
%"struct.std::hash" = type { i8 }
%"struct.std::equal_to" = type { i8 }
%"class.std::allocator.2" = type { i8 }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = 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 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::unordered_map", align 8
  %3 = alloca [1 x %"struct.std::pair"], align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::hash", align 1
  %7 = alloca %"struct.std::equal_to", align 1
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca %"class.std::unordered_map", align 8
  %10 = alloca %"struct.std::hash", align 1
  %11 = alloca %"struct.std::equal_to", align 1
  %12 = alloca %"class.std::allocator.2", align 1
  %13 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %21 = alloca %"struct.std::__detail::_Node_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @_ZNSt4pairIKiiEC2IiiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaISt4pairIKiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEC2ESt16initializer_listIS6_EmRKS1_RKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr nonnull %3, i64 1, i64 noundef 0, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %23 unwind label %29

23:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %.not122 = icmp slt i32 %24, 1
  br i1 %.not122, label %._crit_edge124.thread, label %.preheader

._crit_edge124.thread:                            ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  br label %._crit_edge131

.preheader:                                       ; preds = %23, %._crit_edge121
  %indvars.iv153 = phi i32 [ %indvars.iv.next154, %._crit_edge121 ], [ 2, %23 ]
  %indvars.iv = phi i32 [ %indvars.iv.next, %._crit_edge121 ], [ 0, %23 ]
  %.069123 = phi i32 [ %25, %._crit_edge121 ], [ 1, %23 ]
  %umin = call i32 @llvm.umin.i32(i32 %indvars.iv, i32 3)
  %25 = add nuw i32 %.069123, 1
  %26 = add nuw nsw i32 %umin, 1
  %exitcond.not = icmp eq i32 %indvars.iv, 0
  br i1 %exitcond.not, label %31, label %35, !llvm.loop !9

._crit_edge124:                                   ; preds = %._crit_edge121
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  %.not80127 = icmp slt i32 %55, 1
  br i1 %.not80127, label %._crit_edge131, label %.lr.ph130.preheader

.lr.ph130.preheader:                              ; preds = %._crit_edge124
  %27 = zext nneg i32 %55 to i64
  %xtraiter = and i64 %27, 3
  %28 = icmp ult i32 %55, 4
  br i1 %28, label %._crit_edge131.loopexit.unr-lcssa, label %.lr.ph130.preheader.new

.lr.ph130.preheader.new:                          ; preds = %.lr.ph130.preheader
  %unroll_iter = and i64 %27, 2147483644
  br label %.lr.ph130

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %151

31:                                               ; preds = %45, %40, %35, %.preheader
  %.lcssa173 = phi i32 [ %.069123, %.preheader ], [ %39, %35 ], [ %44, %40 ], [ %49, %45 ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #6
  %32 = sdiv i32 %.lcssa173, 2
  %33 = add nsw i32 %32, %.lcssa173
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaISt4pairIKiiEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS1_RKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(56) %9, i64 noundef %34, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %50 unwind label %56

35:                                               ; preds = %.preheader
  %36 = add i32 %.069123, -1
  %37 = mul nsw i32 %.069123, %36
  %38 = sdiv i32 %37, 2
  %39 = add nsw i32 %38, %.069123
  %exitcond.not.1 = icmp eq i32 %26, 2
  br i1 %exitcond.not.1, label %31, label %40, !llvm.loop !9

40:                                               ; preds = %35
  %41 = add i32 %.069123, -2
  %42 = mul nsw i32 %38, %41
  %43 = sdiv i32 %42, 3
  %44 = add nsw i32 %43, %39
  %exitcond.not.2 = icmp eq i32 %26, 3
  br i1 %exitcond.not.2, label %31, label %45, !llvm.loop !9

45:                                               ; preds = %40
  %46 = add i32 %.069123, -3
  %47 = mul nsw i32 %43, %46
  %48 = sdiv i32 %47, 4
  %49 = add nsw i32 %48, %44
  br label %31

50:                                               ; preds = %31
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %51 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  store ptr %51, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %52 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  store ptr %52, ptr %14, align 8
  %53 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %53, label %.lr.ph120, label %._crit_edge121

._crit_edge121:                                   ; preds = %116, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %54 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEaSEOS8_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %9) #6
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #6
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.069123, %55
  %indvars.iv.next = add nuw nsw i32 %indvars.iv, 1
  %indvars.iv.next154 = add nuw i32 %indvars.iv153, 1
  br i1 %.not.not, label %.preheader, label %._crit_edge124, !llvm.loop !11

56:                                               ; preds = %31
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %120

.lr.ph120:                                        ; preds = %50, %116
  %58 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %59 = load i32, ptr %58, align 4, !tbaa !12
  %60 = icmp sgt i32 %59, 0
  br i1 %60, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %66, %.lr.ph120
  %.075.lcssa = phi i32 [ 0, %.lr.ph120 ], [ %68, %66 ]
  %61 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %62 = trunc i64 %61 to i32
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %.lr.ph111, label %._crit_edge112

.lr.ph111:                                        ; preds = %._crit_edge
  %64 = getelementptr inbounds i8, ptr %58, i64 4
  %wide.trip.count = and i64 %61, 2147483647
  br label %74

.lr.ph:                                           ; preds = %.lr.ph120, %66
  %.074101 = phi i32 [ %69, %66 ], [ %59, %.lr.ph120 ]
  %.075100 = phi i32 [ %68, %66 ], [ 0, %.lr.ph120 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %65 = and i32 %.074101, 63
  store i32 %65, ptr %16, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %66 unwind label %70

66:                                               ; preds = %.lr.ph
  %67 = shl i32 %.075100, 6
  %68 = or disjoint i32 %67, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  %69 = lshr i32 %.074101, 6
  %.not142 = icmp ult i32 %.074101, 64
  br i1 %.not142, label %._crit_edge, label %.lr.ph, !llvm.loop !14

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

._crit_edge112:                                   ; preds = %._crit_edge106, %._crit_edge
  %.072.lcssa = phi i32 [ 1, %._crit_edge ], [ %87, %._crit_edge106 ]
  %72 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %73 = icmp eq i64 %72, 4
  br i1 %73, label %116, label %96

74:                                               ; preds = %.lr.ph111, %._crit_edge106
  %indvars.iv149 = phi i64 [ 0, %.lr.ph111 ], [ %indvars.iv.next150, %._crit_edge106 ]
  %.072108 = phi i32 [ 1, %.lr.ph111 ], [ %87, %._crit_edge106 ]
  %.176107 = phi i32 [ %.075.lcssa, %.lr.ph111 ], [ %75, %._crit_edge106 ]
  %75 = sub nsw i32 %.176107, %.072108
  %.not83 = icmp eq i64 %indvars.iv149, 0
  br i1 %.not83, label %81, label %76

76:                                               ; preds = %74
  %77 = add nsw i64 %indvars.iv149, -1
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %77) #6
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  br label %81

81:                                               ; preds = %74, %76
  %82 = phi i32 [ %80, %76 ], [ 1, %74 ]
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv149) #6
  %84 = load i32, ptr %83, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  %85 = load i32, ptr %58, align 4, !tbaa !12
  %86 = add nsw i32 %85, %75
  store i32 %86, ptr %17, align 4, !tbaa !5
  %.not85102 = icmp slt i32 %84, %82
  br i1 %.not85102, label %._crit_edge106, label %.lr.ph105

._crit_edge106:                                   ; preds = %89, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %87 = shl i32 %.072108, 6
  %exitcond152.not = icmp eq i64 %indvars.iv.next150, %wide.trip.count
  br i1 %exitcond152.not, label %._crit_edge112, label %74, !llvm.loop !15

.lr.ph105:                                        ; preds = %81, %89
  %.068103 = phi i32 [ %91, %89 ], [ %84, %81 ]
  %88 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %89 unwind label %94

89:                                               ; preds = %.lr.ph105
  %90 = load i32, ptr %64, align 4, !tbaa !16
  call void @_Z6modIncRii(ptr noundef nonnull align 4 dereferenceable(4) %88, i32 noundef %90)
  %91 = add nsw i32 %.068103, -1
  %92 = load i32, ptr %17, align 4, !tbaa !5
  %93 = sub nsw i32 %92, %.072108
  store i32 %93, ptr %17, align 4, !tbaa !5
  %.not85.not = icmp sgt i32 %.068103, %82
  br i1 %.not85.not, label %.lr.ph105, label %._crit_edge106, !llvm.loop !17

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

96:                                               ; preds = %._crit_edge112
  %.not81 = icmp eq i32 %62, 0
  br i1 %.not81, label %101, label %97

97:                                               ; preds = %96
  %98 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  br label %101

101:                                              ; preds = %96, %97
  %102 = phi i32 [ %100, %97 ], [ 1, %96 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  %103 = load i32, ptr %58, align 4, !tbaa !12
  %104 = mul nsw i32 %102, %.072.lcssa
  %105 = add nsw i32 %103, %104
  store i32 %105, ptr %18, align 4, !tbaa !5
  %.not82114 = icmp sgt i32 %102, %.069123
  br i1 %.not82114, label %._crit_edge118, label %.lr.ph117

.lr.ph117:                                        ; preds = %101
  %106 = getelementptr inbounds i8, ptr %58, i64 4
  br label %107

._crit_edge118:                                   ; preds = %109, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  br label %116

107:                                              ; preds = %.lr.ph117, %109
  %.067115 = phi i32 [ %102, %.lr.ph117 ], [ %111, %109 ]
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %109 unwind label %114

109:                                              ; preds = %107
  %110 = load i32, ptr %106, align 4, !tbaa !16
  call void @_Z6modIncRii(ptr noundef nonnull align 4 dereferenceable(4) %108, i32 noundef %110)
  %111 = add i32 %.067115, 1
  %112 = load i32, ptr %18, align 4, !tbaa !5
  %113 = add nsw i32 %112, %.072.lcssa
  store i32 %113, ptr %18, align 4, !tbaa !5
  %exitcond155.not = icmp eq i32 %111, %indvars.iv153
  br i1 %exitcond155.not, label %._crit_edge118, label %107, !llvm.loop !18

114:                                              ; preds = %107
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  br label %119

116:                                              ; preds = %._crit_edge112, %._crit_edge118
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %118 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %118, label %.lr.ph120, label %._crit_edge121

119:                                              ; preds = %94, %114, %70
  %.pn87 = phi { ptr, i32 } [ %71, %70 ], [ %95, %94 ], [ %115, %114 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #6
  br label %120

120:                                              ; preds = %119, %56
  %.pn87.pn = phi { ptr, i32 } [ %.pn87, %119 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #6
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  br label %151

._crit_edge131.loopexit.unr-lcssa:                ; preds = %.lr.ph130, %.lr.ph130.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph130.preheader ], [ %136, %.lr.ph130 ]
  %indvars.iv156.unr = phi i64 [ 1, %.lr.ph130.preheader ], [ %indvars.iv.next157.3, %.lr.ph130 ]
  %.unr = phi i64 [ 1, %.lr.ph130.preheader ], [ %136, %.lr.ph130 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge131.loopexit, label %.lr.ph130.epil

.lr.ph130.epil:                                   ; preds = %._crit_edge131.loopexit.unr-lcssa, %.lr.ph130.epil
  %indvars.iv156.epil = phi i64 [ %indvars.iv.next157.epil, %.lr.ph130.epil ], [ %indvars.iv156.unr, %._crit_edge131.loopexit.unr-lcssa ]
  %121 = phi i64 [ %123, %.lr.ph130.epil ], [ %.unr, %._crit_edge131.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph130.epil ], [ 0, %._crit_edge131.loopexit.unr-lcssa ]
  %122 = mul nsw i64 %121, %indvars.iv156.epil
  %123 = srem i64 %122, 1000000007
  %indvars.iv.next157.epil = add nuw nsw i64 %indvars.iv156.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge131.loopexit, label %.lr.ph130.epil, !llvm.loop !19

._crit_edge131.loopexit:                          ; preds = %.lr.ph130.epil, %._crit_edge131.loopexit.unr-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge131.loopexit.unr-lcssa ], [ %123, %.lr.ph130.epil ]
  %124 = trunc nsw i64 %.lcssa to i32
  br label %._crit_edge131

._crit_edge131:                                   ; preds = %._crit_edge124.thread, %._crit_edge131.loopexit, %._crit_edge124
  %.lcssa126 = phi i32 [ 1, %._crit_edge124 ], [ %124, %._crit_edge131.loopexit ], [ 1, %._crit_edge124.thread ]
  store i32 %.lcssa126, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %125 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  store ptr %125, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #6
  %126 = call ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  store ptr %126, ptr %21, align 8
  %127 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br i1 %127, label %.lr.ph140, label %._crit_edge141

.lr.ph130:                                        ; preds = %.lr.ph130, %.lr.ph130.preheader.new
  %indvars.iv156 = phi i64 [ 1, %.lr.ph130.preheader.new ], [ %indvars.iv.next157.3, %.lr.ph130 ]
  %128 = phi i64 [ 1, %.lr.ph130.preheader.new ], [ %136, %.lr.ph130 ]
  %niter = phi i64 [ 0, %.lr.ph130.preheader.new ], [ %niter.next.3, %.lr.ph130 ]
  %129 = mul nsw i64 %128, %indvars.iv156
  %130 = srem i64 %129, 1000000007
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %131 = mul nsw i64 %130, %indvars.iv.next157
  %132 = srem i64 %131, 1000000007
  %indvars.iv.next157.1 = add nuw nsw i64 %indvars.iv156, 2
  %133 = mul nsw i64 %132, %indvars.iv.next157.1
  %134 = srem i64 %133, 1000000007
  %indvars.iv.next157.2 = add nuw nsw i64 %indvars.iv156, 3
  %135 = mul nsw i64 %134, %indvars.iv.next157.2
  %136 = srem i64 %135, 1000000007
  %indvars.iv.next157.3 = add nuw nsw i64 %indvars.iv156, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge131.loopexit.unr-lcssa, label %.lr.ph130, !llvm.loop !21

._crit_edge141.loopexit:                          ; preds = %._crit_edge137.thread
  %.pre = load i32, ptr %19, align 4, !tbaa !5
  br label %._crit_edge141

._crit_edge141:                                   ; preds = %._crit_edge141.loopexit, %._crit_edge131
  %137 = phi i32 [ %.pre, %._crit_edge141.loopexit ], [ %.lcssa126, %._crit_edge131 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  %138 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %137)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  call void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret void

.lr.ph140:                                        ; preds = %._crit_edge131, %._crit_edge137.thread
  %139 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %140 = load i32, ptr %139, align 4, !tbaa !12
  %141 = icmp sgt i32 %140, 0
  br i1 %141, label %.lr.ph136, label %._crit_edge137.thread

._crit_edge137:                                   ; preds = %.lr.ph136
  %142 = icmp ugt i32 %.060133, 1
  br i1 %142, label %145, label %._crit_edge137.thread

.lr.ph136:                                        ; preds = %.lr.ph140, %.lr.ph136
  %.0134 = phi i32 [ %144, %.lr.ph136 ], [ %140, %.lr.ph140 ]
  %.060133 = phi i32 [ %143, %.lr.ph136 ], [ 0, %.lr.ph140 ]
  %143 = add nuw nsw i32 %.060133, 1
  %144 = lshr i32 %.0134, 6
  %.not = icmp ult i32 %.0134, 64
  br i1 %.not, label %._crit_edge137, label %.lr.ph136, !llvm.loop !22

145:                                              ; preds = %._crit_edge137
  %146 = getelementptr inbounds i8, ptr %139, i64 4
  %147 = load i32, ptr %146, align 4, !tbaa !16
  %148 = sub nsw i32 1000000007, %147
  call void @_Z6modIncRii(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef %148)
  br label %._crit_edge137.thread

._crit_edge137.thread:                            ; preds = %.lr.ph140, %145, %._crit_edge137
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiiELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %150 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiiELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br i1 %150, label %.lr.ph140, label %._crit_edge141.loopexit

151:                                              ; preds = %120, %29
  %.pn87.pn.pn = phi { ptr, i32 } [ %.pn87.pn, %120 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn87.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 @_ZNSt4pairIKiiEC2IiiTnNSt9enable_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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt4pairIKiiEED2Ev(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 void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEC2EmRKS1_RKS3_RKS7_(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

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

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

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

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

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

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

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

; Function Attrs: 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z6modIncRii(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #5

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

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

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


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