; LLVM IR from eyangch/competitive-programming :: FacebookHackercup/2022/qual (d)

; 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::unordered_map.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i64, i64 }
%"struct.std::__detail::_Node_iterator.22" = type { %"struct.std::__detail::_Node_iterator_base.23" }
%"struct.std::__detail::_Node_iterator_base.23" = type { ptr }
%"struct.std::pair.20" = type { %"struct.std::pair", i64 }
%"struct.std::pair.24" = type { i64, i64 }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@G = external dso_local global [200000 x %"class.std::unordered_map"], align 16
@qs = external dso_local global %"class.std::unordered_map.2", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %18 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %23 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %24 = alloca %"struct.std::pair", align 8
  store i32 0, ptr %1, align 4
  %25 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %27
  %29 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %28, ptr noundef null)
  %30 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  %33 = load i64, ptr @T, align 8, !tbaa !8
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %32, i64 noundef %33)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %34, i8 noundef signext 10)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 1, ptr %2, align 8, !tbaa !8
  br label %37

37:                                               ; preds = %227, %0
  %38 = load i64, ptr %2, align 8, !tbaa !8
  %39 = load i64, ptr @T, align 8, !tbaa !8
  %40 = icmp sle i64 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  br label %230

42:                                               ; preds = %37
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %44 = load i64, ptr %2, align 8, !tbaa !8
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %43, i64 noundef %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @.str.4)
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.5)
  %51 = load i64, ptr %2, align 8, !tbaa !8
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %50, i64 noundef %51)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @.str.6)
  %54 = load i64, ptr @N, align 8, !tbaa !8
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %53, i64 noundef %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef @.str.6)
  %57 = load i64, ptr @M, align 8, !tbaa !8
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %56, i64 noundef %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @.str.6)
  %60 = load i64, ptr @Q, align 8, !tbaa !8
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %59, i64 noundef %60)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %61, i8 noundef signext 10)
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store i64 0, ptr %4, align 8, !tbaa !8
  br label %64

64:                                               ; preds = %72, %42
  %65 = load i64, ptr %4, align 8, !tbaa !8
  %66 = load i64, ptr @N, align 8, !tbaa !8
  %67 = icmp slt i64 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %75

69:                                               ; preds = %64
  %70 = load i64, ptr %4, align 8, !tbaa !8
  %71 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %70
  call void @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %71) #7
  br label %72

72:                                               ; preds = %69
  %73 = load i64, ptr %4, align 8, !tbaa !8
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %4, align 8, !tbaa !8
  br label %64, !llvm.loop !11

75:                                               ; preds = %68
  call void @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @qs) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %76

76:                                               ; preds = %97, %75
  %77 = load i64, ptr %5, align 8, !tbaa !8
  %78 = load i64, ptr @M, align 8, !tbaa !8
  %79 = icmp slt i64 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %100

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %82 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %83, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %85 = load i64, ptr %6, align 8, !tbaa !8
  %86 = add nsw i64 %85, -1
  store i64 %86, ptr %6, align 8, !tbaa !8
  %87 = load i64, ptr %7, align 8, !tbaa !8
  %88 = add nsw i64 %87, -1
  store i64 %88, ptr %7, align 8, !tbaa !8
  %89 = load i64, ptr %8, align 8, !tbaa !8
  %90 = load i64, ptr %6, align 8, !tbaa !8
  %91 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %90
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(56) %91, ptr noundef nonnull align 8 dereferenceable(8) %7)
  store i64 %89, ptr %92, align 8, !tbaa !8
  %93 = load i64, ptr %8, align 8, !tbaa !8
  %94 = load i64, ptr %7, align 8, !tbaa !8
  %95 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %94
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(56) %95, ptr noundef nonnull align 8 dereferenceable(8) %6)
  store i64 %93, ptr %96, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %97

97:                                               ; preds = %81
  %98 = load i64, ptr %5, align 8, !tbaa !8
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %5, align 8, !tbaa !8
  br label %76, !llvm.loop !13

100:                                              ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %101

101:                                              ; preds = %217, %100
  %102 = load i64, ptr %9, align 8, !tbaa !8
  %103 = load i64, ptr @Q, align 8, !tbaa !8
  %104 = icmp slt i64 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %220

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %107, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %109 = load i64, ptr %10, align 8, !tbaa !8
  %110 = add nsw i64 %109, -1
  store i64 %110, ptr %10, align 8, !tbaa !8
  %111 = load i64, ptr %11, align 8, !tbaa !8
  %112 = add nsw i64 %111, -1
  store i64 %112, ptr %11, align 8, !tbaa !8
  %113 = load i64, ptr %10, align 8, !tbaa !8
  %114 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %113
  %115 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %114) #7
  %116 = load i64, ptr %11, align 8, !tbaa !8
  %117 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %116
  %118 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %117) #7
  %119 = icmp eq i64 %115, %118
  br i1 %119, label %120, label %126

120:                                              ; preds = %106
  %121 = load i64, ptr %10, align 8, !tbaa !8
  %122 = load i64, ptr %11, align 8, !tbaa !8
  %123 = icmp sgt i64 %121, %122
  br i1 %123, label %124, label %125

124:                                              ; preds = %120
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %125

125:                                              ; preds = %124, %120
  br label %136

126:                                              ; preds = %106
  %127 = load i64, ptr %10, align 8, !tbaa !8
  %128 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %127
  %129 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %128) #7
  %130 = load i64, ptr %11, align 8, !tbaa !8
  %131 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %130
  %132 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %131) #7
  %133 = icmp ugt i64 %129, %132
  br i1 %133, label %134, label %135

134:                                              ; preds = %126
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %135

135:                                              ; preds = %134, %126
  br label %136

136:                                              ; preds = %135, %125
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %137 = call ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) @qs, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %138 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %12, i32 0, i32 0
  %139 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %138, i32 0, i32 0
  store ptr %137, ptr %139, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %140 = call ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @qs) #7
  %141 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %14, i32 0, i32 0
  %142 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %141, i32 0, i32 0
  store ptr %140, ptr %142, align 8
  %143 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKS1_IxxExELb1EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br i1 %143, label %144, label %150

144:                                              ; preds = %136
  %145 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKS1_IxxExELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %146 = getelementptr inbounds %"struct.std::pair.20", ptr %145, i32 0, i32 1
  %147 = load i64, ptr %146, align 8, !tbaa !14
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %147)
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %148, i8 noundef signext 32)
  store i32 13, ptr %3, align 4
  br label %214

150:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %151 = load i64, ptr %10, align 8, !tbaa !8
  %152 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %151
  store ptr %152, ptr %16, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %153 = load ptr, ptr %16, align 8, !tbaa !17
  %154 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %153) #7
  %155 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.22", ptr %17, i32 0, i32 0
  %156 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.23", ptr %155, i32 0, i32 0
  store ptr %154, ptr %156, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %157 = load ptr, ptr %16, align 8, !tbaa !17
  %158 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %157) #7
  %159 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.22", ptr %18, i32 0, i32 0
  %160 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.23", ptr %159, i32 0, i32 0
  store ptr %158, ptr %160, align 8
  br label %161

161:                                              ; preds = %206, %150
  %162 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxxELb1EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br i1 %162, label %164, label %163

163:                                              ; preds = %161
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %208

164:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  %165 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @_ZNSt4pairIxxEC2IKxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %165)
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %166 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 0
  %167 = load i64, ptr %166, align 8, !tbaa !19
  store i64 %167, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %168 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 1
  %169 = load i64, ptr %168, align 8, !tbaa !20
  store i64 %169, ptr %21, align 8, !tbaa !8
  %170 = load i64, ptr %20, align 8, !tbaa !8
  %171 = load i64, ptr %11, align 8, !tbaa !8
  %172 = icmp eq i64 %170, %171
  br i1 %172, label %173, label %178

173:                                              ; preds = %164
  %174 = load i64, ptr %21, align 8, !tbaa !8
  %175 = mul nsw i64 %174, 2
  %176 = load i64, ptr %15, align 8, !tbaa !8
  %177 = add nsw i64 %176, %175
  store i64 %177, ptr %15, align 8, !tbaa !8
  store i32 15, ptr %3, align 4
  br label %200

178:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %179 = load i64, ptr %20, align 8, !tbaa !8
  %180 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %179
  %181 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(56) %180, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %182 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.22", ptr %22, i32 0, i32 0
  %183 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.23", ptr %182, i32 0, i32 0
  store ptr %181, ptr %183, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %184 = load i64, ptr %20, align 8, !tbaa !8
  %185 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %184
  %186 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %185) #7
  %187 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.22", ptr %23, i32 0, i32 0
  %188 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.23", ptr %187, i32 0, i32 0
  store ptr %186, ptr %188, align 8
  %189 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKxxELb1EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br i1 %189, label %190, label %191

190:                                              ; preds = %178
  store i32 15, ptr %3, align 4
  br label %199

191:                                              ; preds = %178
  %192 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  %193 = getelementptr inbounds %"struct.std::pair.24", ptr %192, i32 0, i32 1
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %193)
  %195 = load i64, ptr %194, align 8, !tbaa !8
  store i64 %195, ptr %21, align 8, !tbaa !8
  %196 = load i64, ptr %21, align 8, !tbaa !8
  %197 = load i64, ptr %15, align 8, !tbaa !8
  %198 = add nsw i64 %197, %196
  store i64 %198, ptr %15, align 8, !tbaa !8
  store i32 0, ptr %3, align 4
  br label %199

199:                                              ; preds = %191, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %200

200:                                              ; preds = %199, %173
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  %201 = load i32, ptr %3, align 4
  switch i32 %201, label %203 [
    i32 0, label %202
  ]

202:                                              ; preds = %200
  store i32 0, ptr %3, align 4
  br label %203

203:                                              ; preds = %202, %200
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  %204 = load i32, ptr %3, align 4
  switch i32 %204, label %232 [
    i32 0, label %205
    i32 15, label %206
  ]

205:                                              ; preds = %203
  br label %206

206:                                              ; preds = %205, %203
  %207 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %161

208:                                              ; preds = %163
  %209 = load i64, ptr %15, align 8, !tbaa !8
  %210 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %209)
  %211 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %210, i8 noundef signext 32)
  %212 = load i64, ptr %15, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %213 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(56) @qs, ptr noundef nonnull align 8 dereferenceable(16) %24)
  store i64 %212, ptr %213, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  store i32 0, ptr %3, align 4
  br label %214

214:                                              ; preds = %208, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %215 = load i32, ptr %3, align 4
  switch i32 %215, label %232 [
    i32 0, label %216
    i32 13, label %217
  ]

216:                                              ; preds = %214
  br label %217

217:                                              ; preds = %216, %214
  %218 = load i64, ptr %9, align 8, !tbaa !8
  %219 = add nsw i64 %218, 1
  store i64 %219, ptr %9, align 8, !tbaa !8
  br label %101, !llvm.loop !21

220:                                              ; preds = %105
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.7)
  %223 = load i64, ptr %2, align 8, !tbaa !8
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %222, i64 noundef %223)
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %224, i8 noundef signext 10)
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr)
  br label %227

227:                                              ; preds = %220
  %228 = load i64, ptr %2, align 8, !tbaa !8
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %2, align 8, !tbaa !8
  br label %37, !llvm.loop !22

230:                                              ; preds = %41
  %231 = load i32, ptr %1, align 4
  ret i32 %231

232:                                              ; preds = %214, %203
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IKxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) #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 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 #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 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 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 willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::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::unordered_map.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i64, i64 }
%"struct.std::__detail::_Node_iterator.22" = type { %"struct.std::__detail::_Node_iterator_base.23" }
%"struct.std::__detail::_Node_iterator_base.23" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@G = external dso_local global [200000 x %"class.std::unordered_map"], align 16
@qs = external dso_local global %"class.std::unordered_map.2", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = 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 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator.22", align 8
  %15 = alloca %"struct.std::pair", align 8
  %16 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %17 = getelementptr i8, ptr %16, i64 -24
  %18 = load i64, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %18
  %20 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %19, ptr noundef null)
  %21 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  %24 = load i64, ptr @T, align 8, !tbaa !8
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %23, i64 noundef %24)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %25, i8 noundef signext 10)
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr)
  %28 = load i64, ptr @T, align 8, !tbaa !8
  %.not40 = icmp slt i64 %28, 1
  br i1 %.not40, label %._crit_edge44, label %.lr.ph43

.lr.ph43:                                         ; preds = %0
  %29 = getelementptr inbounds i8, ptr %11, i64 8
  br label %30

._crit_edge44:                                    ; preds = %._crit_edge39, %0
  ret i32 0

30:                                               ; preds = %.lr.ph43, %._crit_edge39
  %.041 = phi i64 [ 1, %.lr.ph43 ], [ %82, %._crit_edge39 ]
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %31, i64 noundef %.041)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str.4)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) @M)
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.5)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %37, i64 noundef %.041)
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.6)
  %40 = load i64, ptr @N, align 8, !tbaa !8
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %39, i64 noundef %40)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @.str.6)
  %43 = load i64, ptr @M, align 8, !tbaa !8
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %42, i64 noundef %43)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @.str.6)
  %46 = load i64, ptr @Q, align 8, !tbaa !8
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %45, i64 noundef %46)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %47, i8 noundef signext 10)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr)
  %50 = load i64, ptr @N, align 8, !tbaa !8
  %51 = icmp sgt i64 %50, 0
  br i1 %51, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %30
  call void @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) @qs) #7
  %52 = load i64, ptr @M, align 8, !tbaa !8
  %53 = icmp sgt i64 %52, 0
  br i1 %53, label %.lr.ph32, label %.preheader

.lr.ph:                                           ; preds = %30, %.lr.ph
  %.02729 = phi i64 [ %55, %.lr.ph ], [ 0, %30 ]
  %54 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %.02729
  call void @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %54) #7
  %55 = add nuw nsw i64 %.02729, 1
  %56 = load i64, ptr @N, align 8, !tbaa !8
  %57 = icmp slt i64 %55, %56
  br i1 %57, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %.lr.ph32, %._crit_edge
  %58 = load i64, ptr @Q, align 8, !tbaa !8
  %59 = icmp sgt i64 %58, 0
  br i1 %59, label %.lr.ph38, label %._crit_edge39

.lr.ph32:                                         ; preds = %._crit_edge, %.lr.ph32
  %.02630 = phi i64 [ %74, %.lr.ph32 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %60, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %63 = load i64, ptr %1, align 8, !tbaa !8
  %64 = add nsw i64 %63, -1
  store i64 %64, ptr %1, align 8, !tbaa !8
  %65 = load i64, ptr %2, align 8, !tbaa !8
  %66 = add nsw i64 %65, -1
  store i64 %66, ptr %2, align 8, !tbaa !8
  %67 = load i64, ptr %3, align 8, !tbaa !8
  %68 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %64
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(56) %68, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %67, ptr %69, align 8, !tbaa !8
  %70 = load i64, ptr %3, align 8, !tbaa !8
  %71 = load i64, ptr %2, align 8, !tbaa !8
  %72 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %71
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(56) %72, ptr noundef nonnull align 8 dereferenceable(8) %1)
  store i64 %70, ptr %73, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %74 = add nuw nsw i64 %.02630, 1
  %75 = load i64, ptr @M, align 8, !tbaa !8
  %76 = icmp slt i64 %74, %75
  br i1 %76, label %.lr.ph32, label %.preheader, !llvm.loop !13

._crit_edge39:                                    ; preds = %149, %.preheader
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.7)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %78, i64 noundef %.041)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %79, i8 noundef signext 10)
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr)
  %82 = add nuw nsw i64 %.041, 1
  %83 = load i64, ptr @T, align 8, !tbaa !8
  %.not.not = icmp slt i64 %.041, %83
  br i1 %.not.not, label %30, label %._crit_edge44, !llvm.loop !14

.lr.ph38:                                         ; preds = %.preheader, %149
  %.02537 = phi i64 [ %150, %149 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %86 = load i64, ptr %4, align 8, !tbaa !8
  %87 = add nsw i64 %86, -1
  store i64 %87, ptr %4, align 8, !tbaa !8
  %88 = load i64, ptr %5, align 8, !tbaa !8
  %89 = add nsw i64 %88, -1
  store i64 %89, ptr %5, align 8, !tbaa !8
  %90 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %87
  %91 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %90) #7
  %92 = load i64, ptr %5, align 8, !tbaa !8
  %93 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %92
  %94 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %93) #7
  %95 = icmp eq i64 %91, %94
  %96 = load i64, ptr %4, align 8, !tbaa !8
  br i1 %95, label %97, label %100

97:                                               ; preds = %.lr.ph38
  %98 = load i64, ptr %5, align 8, !tbaa !8
  %99 = icmp sgt i64 %96, %98
  br i1 %99, label %.sink.split, label %107

100:                                              ; preds = %.lr.ph38
  %101 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %96
  %102 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %101) #7
  %103 = load i64, ptr %5, align 8, !tbaa !8
  %104 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %103
  %105 = call noundef i64 @_ZNKSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %104) #7
  %106 = icmp ugt i64 %102, %105
  br i1 %106, label %.sink.split, label %107

.sink.split:                                      ; preds = %100, %97
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br label %107

107:                                              ; preds = %.sink.split, %100, %97
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %108 = call ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) @qs, ptr noundef nonnull align 8 dereferenceable(16) %7)
  store ptr %108, ptr %6, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %109 = call ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @qs) #7
  store ptr %109, ptr %8, align 8
  %110 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKS1_IxxExELb1EEES7_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %110, label %111, label %117

111:                                              ; preds = %107
  %112 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKS1_IxxExELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %113 = getelementptr inbounds i8, ptr %112, i64 16
  %114 = load i64, ptr %113, align 8, !tbaa !15
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %114)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %115, i8 noundef signext 32)
  br label %149

117:                                              ; preds = %107
  %118 = load i64, ptr %4, align 8, !tbaa !8
  %119 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %118
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %120 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %119) #7
  store ptr %120, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %121 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %119) #7
  store ptr %121, ptr %10, align 8
  %122 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxxELb1EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %122, label %.lr.ph35, label %._crit_edge36

._crit_edge36:                                    ; preds = %146, %117
  %.023.lcssa = phi i64 [ 0, %117 ], [ %.2, %146 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.023.lcssa)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %123, i8 noundef signext 32)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  call void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(56) @qs, ptr noundef nonnull align 8 dereferenceable(16) %15)
  store i64 %.023.lcssa, ptr %125, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  br label %149

.lr.ph35:                                         ; preds = %117, %146
  %.02333 = phi i64 [ %.2, %146 ], [ 0, %117 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  %126 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @_ZNSt4pairIxxEC2IKxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %126)
  %127 = load i64, ptr %11, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %128 = load i64, ptr %29, align 8, !tbaa !19
  store i64 %128, ptr %12, align 8, !tbaa !8
  %129 = load i64, ptr %5, align 8, !tbaa !8
  %130 = icmp eq i64 %127, %129
  br i1 %130, label %131, label %134

131:                                              ; preds = %.lr.ph35
  %132 = shl nsw i64 %128, 1
  %133 = add nsw i64 %132, %.02333
  br label %146

134:                                              ; preds = %.lr.ph35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %135 = getelementptr inbounds [200000 x %"class.std::unordered_map"], ptr @G, i64 0, i64 %127
  %136 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(56) %135, ptr noundef nonnull align 8 dereferenceable(8) %5)
  store ptr %136, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %137 = call ptr @_ZNSt13unordered_mapIxx11custom_hashSt8equal_toIxESaISt4pairIKxxEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %135) #7
  store ptr %137, ptr %14, align 8
  %138 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKxxELb1EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br i1 %138, label %145, label %139

139:                                              ; preds = %134
  %140 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %141 = getelementptr inbounds i8, ptr %140, i64 8
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %141)
  %143 = load i64, ptr %142, align 8, !tbaa !8
  %144 = add nsw i64 %143, %.02333
  br label %145

145:                                              ; preds = %134, %139
  %.124 = phi i64 [ %144, %139 ], [ %.02333, %134 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %146

146:                                              ; preds = %145, %131
  %.2 = phi i64 [ %133, %131 ], [ %.124, %145 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKxxELb0ELb1EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %148 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKxxELb1EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br i1 %148, label %.lr.ph35, label %._crit_edge36

149:                                              ; preds = %._crit_edge36, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %150 = add nuw nsw i64 %.02537, 1
  %151 = load i64, ptr @Q, align 8, !tbaa !8
  %152 = icmp slt i64 %150, %151
  br i1 %152, label %.lr.ph38, label %._crit_edge39, !llvm.loop !20
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5flushEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IRxS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIxxEC2IKxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairIS4_S5_EEclsr6_PCCFPIS4_S5_EE26_ImplicitlyConvertiblePairIS4_S5_EEEbE4typeELb1EEERKS_IS4_S5_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapISt4pairIxxEx12custom_hash2St8equal_toIS1_ESaIS0_IKS1_xEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) local_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 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 #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 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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nounwind }

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

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


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