; LLVM IR from eyangch/competitive-programming :: USACOcontests/silver/2012.12 (crazy)

; 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::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::pair.0" = type { %"struct.std::pair", %"struct.std::pair" }
%"struct.std::pair" = type { i64, i64 }
%"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::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [16 x i64] }
%"struct.std::pair.4" = type { %"class.std::bitset", i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4isctSt4pairIS_IxxES0_ES1_(ptr noundef byval(%"struct.std::pair.0") align 8, ptr noundef byval(%"struct.std::pair.0") align 8) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, 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 i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::pair.0", align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.std::pair.0", align 8
  %26 = alloca %"struct.std::pair.0", align 8
  %27 = alloca %"class.std::unordered_map", align 8
  %28 = alloca i64, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i64, align 8
  %32 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %33 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %34 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store i32 0, ptr %1, align 4
  %35 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %36 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %37 = getelementptr i8, ptr %36, i64 -24
  %38 = load i64, ptr %37, align 8
  %39 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %38
  %40 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %39, ptr noundef null)
  %41 = load ptr, ptr @stdin, align 8, !tbaa !8
  %42 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %41)
  %43 = load ptr, ptr @stdout, align 8, !tbaa !8
  %44 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %43)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %47 = load i64, ptr %2, align 8, !tbaa !11
  %48 = call ptr @llvm.stacksave.p0()
  store ptr %48, ptr %4, align 8
  %49 = alloca %"struct.std::pair.0", i64 %47, align 16
  store i64 %47, ptr %5, align 8
  %50 = icmp eq i64 %47, 0
  br i1 %50, label %57, label %51

51:                                               ; preds = %0
  %52 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %47
  br label %53

53:                                               ; preds = %53, %51
  %54 = phi ptr [ %49, %51 ], [ %55, %53 ]
  call void @_ZNSt4pairIS_IxxES0_EC2IS0_S0_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES4_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(32) %54)
  %55 = getelementptr inbounds %"struct.std::pair.0", ptr %54, i64 1
  %56 = icmp eq ptr %55, %52
  br i1 %56, label %57, label %53

57:                                               ; preds = %53, %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  store i64 0, ptr %6, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %84, %57
  %59 = load i64, ptr %6, align 8, !tbaa !11
  %60 = load i64, ptr %2, align 8, !tbaa !11
  %61 = icmp slt i64 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  br label %87

63:                                               ; preds = %58
  %64 = load i64, ptr %6, align 8, !tbaa !11
  %65 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %64
  %66 = getelementptr inbounds %"struct.std::pair.0", ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds %"struct.std::pair", ptr %66, i32 0, i32 0
  %68 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %67)
  %69 = load i64, ptr %6, align 8, !tbaa !11
  %70 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %69
  %71 = getelementptr inbounds %"struct.std::pair.0", ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %"struct.std::pair", ptr %71, i32 0, i32 1
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 8 dereferenceable(8) %72)
  %74 = load i64, ptr %6, align 8, !tbaa !11
  %75 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %74
  %76 = getelementptr inbounds %"struct.std::pair.0", ptr %75, i32 0, i32 1
  %77 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 0
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %73, ptr noundef nonnull align 8 dereferenceable(8) %77)
  %79 = load i64, ptr %6, align 8, !tbaa !11
  %80 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %79
  %81 = getelementptr inbounds %"struct.std::pair.0", ptr %80, i32 0, i32 1
  %82 = getelementptr inbounds %"struct.std::pair", ptr %81, i32 0, i32 1
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull align 8 dereferenceable(8) %82)
  br label %84

84:                                               ; preds = %63
  %85 = load i64, ptr %6, align 8, !tbaa !11
  %86 = add nsw i64 %85, 1
  store i64 %86, ptr %6, align 8, !tbaa !11
  br label %58, !llvm.loop !13

87:                                               ; preds = %62
  %88 = load i64, ptr %2, align 8, !tbaa !11
  %89 = alloca i64, i64 %88, align 16
  store i64 %88, ptr %7, align 8
  %90 = load i64, ptr %2, align 8, !tbaa !11
  %91 = alloca i8, i64 %90, align 16
  store i64 %90, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  store i64 0, ptr %9, align 8, !tbaa !11
  %92 = load i64, ptr %2, align 8, !tbaa !11
  %93 = getelementptr inbounds i8, ptr %91, i64 %92
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  store i8 0, ptr %10, align 1, !tbaa !15
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef %91, ptr noundef %93, ptr noundef nonnull align 1 dereferenceable(1) %10)
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  store i64 0, ptr %11, align 8, !tbaa !11
  br label %94

94:                                               ; preds = %172, %87
  %95 = load i64, ptr %11, align 8, !tbaa !11
  %96 = load i64, ptr %2, align 8, !tbaa !11
  %97 = icmp slt i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %175

99:                                               ; preds = %94
  %100 = load i64, ptr %11, align 8, !tbaa !11
  %101 = getelementptr inbounds i8, ptr %91, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !15, !range !17, !noundef !18
  %103 = trunc i8 %102 to i1
  br i1 %103, label %104, label %105

104:                                              ; preds = %99
  br label %172

105:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %106 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %106, ptr %13, align 8, !tbaa !11
  br label %107

107:                                              ; preds = %168, %105
  %108 = load i64, ptr %13, align 8, !tbaa !11
  %109 = getelementptr inbounds i8, ptr %91, i64 %108
  %110 = load i8, ptr %109, align 1, !tbaa !15, !range !17, !noundef !18
  %111 = trunc i8 %110 to i1
  %112 = xor i1 %111, true
  br i1 %112, label %113, label %169

113:                                              ; preds = %107
  %114 = load i64, ptr %9, align 8, !tbaa !11
  %115 = load i64, ptr %13, align 8, !tbaa !11
  %116 = getelementptr inbounds i64, ptr %89, i64 %115
  store i64 %114, ptr %116, align 8, !tbaa !11
  %117 = load i64, ptr %13, align 8, !tbaa !11
  %118 = getelementptr inbounds i8, ptr %91, i64 %117
  store i8 1, ptr %118, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %119

119:                                              ; preds = %164, %113
  %120 = load i64, ptr %14, align 8, !tbaa !11
  %121 = load i64, ptr %2, align 8, !tbaa !11
  %122 = icmp slt i64 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 10, ptr %12, align 4
  br label %167

124:                                              ; preds = %119
  %125 = load i64, ptr %14, align 8, !tbaa !11
  %126 = getelementptr inbounds i8, ptr %91, i64 %125
  %127 = load i8, ptr %126, align 1, !tbaa !15, !range !17, !noundef !18
  %128 = trunc i8 %127 to i1
  br i1 %128, label %163, label %129

129:                                              ; preds = %124
  %130 = load i64, ptr %13, align 8, !tbaa !11
  %131 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %130
  %132 = getelementptr inbounds %"struct.std::pair.0", ptr %131, i32 0, i32 0
  %133 = load i64, ptr %14, align 8, !tbaa !11
  %134 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %133
  %135 = getelementptr inbounds %"struct.std::pair.0", ptr %134, i32 0, i32 0
  %136 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %132, ptr noundef nonnull align 8 dereferenceable(16) %135)
  br i1 %136, label %161, label %137

137:                                              ; preds = %129
  %138 = load i64, ptr %13, align 8, !tbaa !11
  %139 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %138
  %140 = getelementptr inbounds %"struct.std::pair.0", ptr %139, i32 0, i32 0
  %141 = load i64, ptr %14, align 8, !tbaa !11
  %142 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %141
  %143 = getelementptr inbounds %"struct.std::pair.0", ptr %142, i32 0, i32 1
  %144 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %140, ptr noundef nonnull align 8 dereferenceable(16) %143)
  br i1 %144, label %161, label %145

145:                                              ; preds = %137
  %146 = load i64, ptr %13, align 8, !tbaa !11
  %147 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %146
  %148 = getelementptr inbounds %"struct.std::pair.0", ptr %147, i32 0, i32 1
  %149 = load i64, ptr %14, align 8, !tbaa !11
  %150 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %149
  %151 = getelementptr inbounds %"struct.std::pair.0", ptr %150, i32 0, i32 0
  %152 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %148, ptr noundef nonnull align 8 dereferenceable(16) %151)
  br i1 %152, label %161, label %153

153:                                              ; preds = %145
  %154 = load i64, ptr %13, align 8, !tbaa !11
  %155 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %154
  %156 = getelementptr inbounds %"struct.std::pair.0", ptr %155, i32 0, i32 1
  %157 = load i64, ptr %14, align 8, !tbaa !11
  %158 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %157
  %159 = getelementptr inbounds %"struct.std::pair.0", ptr %158, i32 0, i32 1
  %160 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %156, ptr noundef nonnull align 8 dereferenceable(16) %159)
  br i1 %160, label %161, label %163

161:                                              ; preds = %153, %145, %137, %129
  %162 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %162, ptr %13, align 8, !tbaa !11
  store i32 10, ptr %12, align 4
  br label %167

163:                                              ; preds = %153, %124
  br label %164

164:                                              ; preds = %163
  %165 = load i64, ptr %14, align 8, !tbaa !11
  %166 = add nsw i64 %165, 1
  store i64 %166, ptr %14, align 8, !tbaa !11
  br label %119, !llvm.loop !19

167:                                              ; preds = %161, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %168

168:                                              ; preds = %167
  br label %107, !llvm.loop !20

169:                                              ; preds = %107
  %170 = load i64, ptr %9, align 8, !tbaa !11
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %172

172:                                              ; preds = %169, %104
  %173 = load i64, ptr %11, align 8, !tbaa !11
  %174 = add nsw i64 %173, 1
  store i64 %174, ptr %11, align 8, !tbaa !11
  br label %94, !llvm.loop !21

175:                                              ; preds = %98
  %176 = load i64, ptr %3, align 8, !tbaa !11
  %177 = alloca %"struct.std::pair", i64 %176, align 16
  store i64 %176, ptr %15, align 8
  %178 = icmp eq i64 %176, 0
  br i1 %178, label %185, label %179

179:                                              ; preds = %175
  %180 = getelementptr inbounds %"struct.std::pair", ptr %177, i64 %176
  br label %181

181:                                              ; preds = %181, %179
  %182 = phi ptr [ %177, %179 ], [ %183, %181 ]
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %182)
  %183 = getelementptr inbounds %"struct.std::pair", ptr %182, i64 1
  %184 = icmp eq ptr %183, %180
  br i1 %184, label %185, label %181

185:                                              ; preds = %181, %175
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  store i64 0, ptr %16, align 8, !tbaa !11
  br label %186

186:                                              ; preds = %200, %185
  %187 = load i64, ptr %16, align 8, !tbaa !11
  %188 = load i64, ptr %3, align 8, !tbaa !11
  %189 = icmp slt i64 %187, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %186
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  br label %203

191:                                              ; preds = %186
  %192 = load i64, ptr %16, align 8, !tbaa !11
  %193 = getelementptr inbounds %"struct.std::pair", ptr %177, i64 %192
  %194 = getelementptr inbounds %"struct.std::pair", ptr %193, i32 0, i32 0
  %195 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %194)
  %196 = load i64, ptr %16, align 8, !tbaa !11
  %197 = getelementptr inbounds %"struct.std::pair", ptr %177, i64 %196
  %198 = getelementptr inbounds %"struct.std::pair", ptr %197, i32 0, i32 1
  %199 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %195, ptr noundef nonnull align 8 dereferenceable(8) %198)
  br label %200

200:                                              ; preds = %191
  %201 = load i64, ptr %16, align 8, !tbaa !11
  %202 = add nsw i64 %201, 1
  store i64 %202, ptr %16, align 8, !tbaa !11
  br label %186, !llvm.loop !22

203:                                              ; preds = %190
  %204 = load i64, ptr %3, align 8, !tbaa !11
  %205 = alloca %"class.std::bitset", i64 %204, align 16
  store i64 %204, ptr %17, align 8
  %206 = icmp eq i64 %204, 0
  br i1 %206, label %213, label %207

207:                                              ; preds = %203
  %208 = getelementptr inbounds %"class.std::bitset", ptr %205, i64 %204
  br label %209

209:                                              ; preds = %209, %207
  %210 = phi ptr [ %205, %207 ], [ %211, %209 ]
  call void @_ZNSt6bitsetILm1000EEC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %210) #9
  %211 = getelementptr inbounds %"class.std::bitset", ptr %210, i64 1
  %212 = icmp eq ptr %211, %208
  br i1 %212, label %213, label %209

213:                                              ; preds = %209, %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  store i64 0, ptr %18, align 8, !tbaa !11
  br label %214

214:                                              ; preds = %246, %213
  %215 = load i64, ptr %18, align 8, !tbaa !11
  %216 = load i64, ptr %3, align 8, !tbaa !11
  %217 = icmp slt i64 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %214
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %249

219:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #9
  %220 = load i64, ptr %18, align 8, !tbaa !11
  %221 = getelementptr inbounds %"struct.std::pair", ptr %177, i64 %220
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 16 %221, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %222 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 0
  %223 = load i64, ptr %222, align 8, !tbaa !23
  %224 = add nsw i64 %223, 1
  store i64 %224, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 10000000, ptr %22, align 4, !tbaa !25
  call void @_ZNSt4pairIxxEC2IxiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #9
  call void @_ZSt9make_pairIRSt4pairIxxES2_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind writable sret(%"struct.std::pair.0") align 8 %23, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  store i64 0, ptr %24, align 8, !tbaa !11
  br label %225

225:                                              ; preds = %242, %219
  %226 = load i64, ptr %24, align 8, !tbaa !11
  %227 = load i64, ptr %2, align 8, !tbaa !11
  %228 = icmp slt i64 %226, %227
  br i1 %228, label %230, label %229

229:                                              ; preds = %225
  store i32 19, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  br label %245

230:                                              ; preds = %225
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %23, i64 32, i1 false)
  %231 = load i64, ptr %24, align 8, !tbaa !11
  %232 = getelementptr inbounds %"struct.std::pair.0", ptr %49, i64 %231
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 16 %232, i64 32, i1 false)
  %233 = call noundef zeroext i1 @_Z4isctSt4pairIS_IxxES0_ES1_(ptr noundef byval(%"struct.std::pair.0") align 8 %25, ptr noundef byval(%"struct.std::pair.0") align 8 %26)
  br i1 %233, label %234, label %241

234:                                              ; preds = %230
  %235 = load i64, ptr %18, align 8, !tbaa !11
  %236 = getelementptr inbounds %"class.std::bitset", ptr %205, i64 %235
  %237 = load i64, ptr %24, align 8, !tbaa !11
  %238 = getelementptr inbounds i64, ptr %89, i64 %237
  %239 = load i64, ptr %238, align 8, !tbaa !11
  %240 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6bitsetILm1000EE4flipEm(ptr noundef nonnull align 8 dereferenceable(128) %236, i64 noundef %239)
  br label %241

241:                                              ; preds = %234, %230
  br label %242

242:                                              ; preds = %241
  %243 = load i64, ptr %24, align 8, !tbaa !11
  %244 = add nsw i64 %243, 1
  store i64 %244, ptr %24, align 8, !tbaa !11
  br label %225, !llvm.loop !27

245:                                              ; preds = %229
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #9
  br label %246

246:                                              ; preds = %245
  %247 = load i64, ptr %18, align 8, !tbaa !11
  %248 = add nsw i64 %247, 1
  store i64 %248, ptr %18, align 8, !tbaa !11
  br label %214, !llvm.loop !28

249:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 56, ptr %27) #9
  call void @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  store i64 0, ptr %28, align 8, !tbaa !11
  br label %250

250:                                              ; preds = %262, %249
  %251 = load i64, ptr %28, align 8, !tbaa !11
  %252 = load i64, ptr %3, align 8, !tbaa !11
  %253 = icmp slt i64 %251, %252
  br i1 %253, label %255, label %254

254:                                              ; preds = %250
  store i32 22, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %269

255:                                              ; preds = %250
  %256 = load i64, ptr %28, align 8, !tbaa !11
  %257 = getelementptr inbounds %"class.std::bitset", ptr %205, i64 %256
  %258 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEEixERS7_(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 8 dereferenceable(128) %257)
          to label %259 unwind label %265

259:                                              ; preds = %255
  %260 = load i64, ptr %258, align 8, !tbaa !11
  %261 = add nsw i64 %260, 1
  store i64 %261, ptr %258, align 8, !tbaa !11
  br label %262

262:                                              ; preds = %259
  %263 = load i64, ptr %28, align 8, !tbaa !11
  %264 = add nsw i64 %263, 1
  store i64 %264, ptr %28, align 8, !tbaa !11
  br label %250, !llvm.loop !29

265:                                              ; preds = %255
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %29, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %306

269:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  store i64 0, ptr %31, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %270 = call ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %27) #9
  %271 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %32, i32 0, i32 0
  %272 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %271, i32 0, i32 0
  store ptr %270, ptr %272, align 8
  br label %273

273:                                              ; preds = %285, %269
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %274 = call ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %27) #9
  %275 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %33, i32 0, i32 0
  %276 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %275, i32 0, i32 0
  store ptr %274, ptr %276, align 8
  %277 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKSt6bitsetILm1000EExELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  br i1 %277, label %279, label %278

278:                                              ; preds = %273
  store i32 25, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %293

279:                                              ; preds = %273
  %280 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKSt6bitsetILm1000EExELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #9
  %281 = getelementptr inbounds %"struct.std::pair.4", ptr %280, i32 0, i32 1
  %282 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %281)
          to label %283 unwind label %289

283:                                              ; preds = %279
  %284 = load i64, ptr %282, align 8, !tbaa !11
  store i64 %284, ptr %31, align 8, !tbaa !11
  br label %285

285:                                              ; preds = %283
  %286 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKSt6bitsetILm1000EExELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef 0) #9
  %287 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %34, i32 0, i32 0
  %288 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %287, i32 0, i32 0
  store ptr %286, ptr %288, align 8
  br label %273, !llvm.loop !30

289:                                              ; preds = %279
  %290 = landingpad { ptr, i32 }
          cleanup
  %291 = extractvalue { ptr, i32 } %290, 0
  store ptr %291, ptr %29, align 8
  %292 = extractvalue { ptr, i32 } %290, 1
  store i32 %292, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %305

293:                                              ; preds = %278
  %294 = load i64, ptr %31, align 8, !tbaa !11
  %295 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %294)
          to label %296 unwind label %301

296:                                              ; preds = %293
  %297 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %295, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %298 unwind label %301

298:                                              ; preds = %296
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  %299 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %299)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  %300 = load i32, ptr %1, align 4
  ret i32 %300

301:                                              ; preds = %296, %293
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %29, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %30, align 4
  br label %305

305:                                              ; preds = %301, %289
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  br label %306

306:                                              ; preds = %305, %265
  call void @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  br label %307

307:                                              ; preds = %306
  %308 = load ptr, ptr %29, align 8
  %309 = load i32, ptr %30, align 4
  %310 = insertvalue { ptr, i32 } poison, ptr %308, 0
  %311 = insertvalue { ptr, i32 } %310, i32 %309, 1
  resume { ptr, i32 } %311
}

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

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

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #4

; 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)) #5 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #7

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRSt4pairIxxES2_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.0") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6bitsetILm1000EE4flipEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) #5 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE5beginEv(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_baseISt4pairIKSt6bitsetILm1000EExELb0EEES8_(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_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind willreturn }
attributes #7 = { 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 #8 = { 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 #9 = { 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 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !10, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = !{!24, !12, i64 0}
!24 = !{!"_ZTSSt4pairIxxE", !12, i64 0, !12, i64 8}
!25 = !{!26, !26, i64 0}
!26 = !{!"int", !10, i64 0}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !14}


; 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::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::pair.0" = type { %"struct.std::pair", %"struct.std::pair" }
%"struct.std::pair" = type { i64, i64 }
%"class.std::bitset" = type { %"struct.std::_Base_bitset" }
%"struct.std::_Base_bitset" = type { [16 x i64] }
%"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::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z4isctSt4pairIS_IxxES0_ES1_(ptr noundef byval(%"struct.std::pair.0") align 8, ptr noundef byval(%"struct.std::pair.0") align 8) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca [0 x %"class.std::bitset"], align 16
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i8, align 1
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair.0", align 8
  %10 = alloca %"class.std::unordered_map", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %14 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = load ptr, ptr @stdin, align 8, !tbaa !8
  %21 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %20)
  %22 = load ptr, ptr @stdout, align 8, !tbaa !8
  %23 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %26 = load i64, ptr %2, align 8, !tbaa !11
  %27 = call ptr @llvm.stacksave.p0()
  %28 = alloca %"struct.std::pair.0", i64 %26, align 16
  %29 = icmp eq i64 %26, 0
  br i1 %29, label %.loopexit62, label %30

30:                                               ; preds = %0
  %31 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i64 %26
  br label %32

32:                                               ; preds = %32, %30
  %33 = phi ptr [ %28, %30 ], [ %34, %32 ]
  call void @_ZNSt4pairIS_IxxES0_EC2IS0_S0_TnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES4_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(32) %33)
  %34 = getelementptr inbounds i8, ptr %33, i64 32
  %35 = icmp eq ptr %34, %31
  br i1 %35, label %.loopexit62, label %32

.loopexit62:                                      ; preds = %32, %0
  %36 = load i64, ptr %2, align 8, !tbaa !11
  %37 = icmp sgt i64 %36, 0
  br i1 %37, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.loopexit62
  %.lcssa63 = phi i64 [ %36, %.loopexit62 ], [ %52, %.lr.ph ]
  %38 = alloca i64, i64 %.lcssa63, align 16
  %39 = alloca i8, i64 %.lcssa63, align 16
  %40 = getelementptr inbounds i8, ptr %39, i64 %.lcssa63
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #9
  store i8 0, ptr %4, align 1, !tbaa !13
  call void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef nonnull %39, ptr noundef nonnull %40, ptr noundef nonnull align 1 dereferenceable(1) %4)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  %41 = load i64, ptr %2, align 8, !tbaa !11
  %42 = icmp sgt i64 %41, 0
  br i1 %42, label %.lr.ph87, label %._crit_edge88

.lr.ph:                                           ; preds = %.loopexit62, %.lr.ph
  %.04964 = phi i64 [ %51, %.lr.ph ], [ 0, %.loopexit62 ]
  %43 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i64 %.04964
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %43)
  %45 = getelementptr inbounds i8, ptr %43, i64 8
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(8) %45)
  %47 = getelementptr inbounds i8, ptr %43, i64 16
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(8) %47)
  %49 = getelementptr inbounds i8, ptr %43, i64 24
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %48, ptr noundef nonnull align 8 dereferenceable(8) %49)
  %51 = add nuw nsw i64 %.04964, 1
  %52 = load i64, ptr %2, align 8, !tbaa !11
  %53 = icmp slt i64 %51, %52
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !15

._crit_edge88:                                    ; preds = %92, %._crit_edge
  %54 = load i64, ptr %3, align 8, !tbaa !11
  %55 = alloca %"struct.std::pair", i64 %54, align 16
  %56 = icmp eq i64 %54, 0
  br i1 %56, label %._crit_edge101, label %96

.lr.ph87:                                         ; preds = %._crit_edge, %92
  %.pre113117 = phi i64 [ %.pre113118, %92 ], [ %41, %._crit_edge ]
  %57 = phi i64 [ %93, %92 ], [ %41, %._crit_edge ]
  %.05184 = phi i64 [ %.1, %92 ], [ 0, %._crit_edge ]
  %.05581 = phi i64 [ %94, %92 ], [ 0, %._crit_edge ]
  %58 = getelementptr inbounds i8, ptr %39, i64 %.05581
  %59 = load i8, ptr %58, align 1, !tbaa !13, !range !17, !noundef !18
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %92, label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph87
  %61 = icmp sgt i64 %57, 0
  br i1 %61, label %.lr.ph79.split, label %._crit_edge80.split.us

._crit_edge80.split.us:                           ; preds = %.lr.ph79
  store i8 1, ptr %58, align 1, !tbaa !13
  %62 = getelementptr inbounds i64, ptr %38, i64 %.05581
  store i64 %.05184, ptr %62, align 8, !tbaa !11
  br label %._crit_edge80

.lr.ph79.split:                                   ; preds = %.lr.ph79, %._crit_edge68
  %63 = phi ptr [ %88, %._crit_edge68 ], [ %58, %.lr.ph79 ]
  %.05378 = phi i64 [ %.154, %._crit_edge68 ], [ %.05581, %.lr.ph79 ]
  %64 = getelementptr inbounds i64, ptr %38, i64 %.05378
  store i64 %.05184, ptr %64, align 8, !tbaa !11
  store i8 1, ptr %63, align 1, !tbaa !13
  %65 = load i64, ptr %2, align 8, !tbaa !11
  %66 = icmp sgt i64 %65, 0
  br i1 %66, label %.lr.ph67, label %._crit_edge68

.lr.ph67:                                         ; preds = %.lr.ph79.split
  %67 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i64 %.05378
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  br label %69

69:                                               ; preds = %.lr.ph67, %84
  %70 = phi i64 [ %65, %.lr.ph67 ], [ %85, %84 ]
  %.05265 = phi i64 [ 0, %.lr.ph67 ], [ %86, %84 ]
  %71 = getelementptr inbounds i8, ptr %39, i64 %.05265
  %72 = load i8, ptr %71, align 1, !tbaa !13, !range !17, !noundef !18
  %73 = trunc nuw i8 %72 to i1
  br i1 %73, label %84, label %74

74:                                               ; preds = %69
  %75 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i64 %.05265
  %76 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(16) %75)
  br i1 %76, label %._crit_edge68, label %77

77:                                               ; preds = %74
  %78 = getelementptr inbounds i8, ptr %75, i64 16
  %79 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %67, ptr noundef nonnull align 8 dereferenceable(16) %78)
  br i1 %79, label %._crit_edge68, label %80

80:                                               ; preds = %77
  %81 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 8 dereferenceable(16) %75)
  br i1 %81, label %._crit_edge68, label %82

82:                                               ; preds = %80
  %83 = call noundef zeroext i1 @_ZSteqIxxEbRKSt4pairIT_T0_ES5_(ptr noundef nonnull align 8 dereferenceable(16) %68, ptr noundef nonnull align 8 dereferenceable(16) %78)
  br i1 %83, label %._crit_edge68, label %._crit_edge112

._crit_edge112:                                   ; preds = %82
  %.pre = load i64, ptr %2, align 8, !tbaa !11
  br label %84

84:                                               ; preds = %._crit_edge112, %69
  %85 = phi i64 [ %.pre, %._crit_edge112 ], [ %70, %69 ]
  %86 = add nuw nsw i64 %.05265, 1
  %87 = icmp slt i64 %86, %85
  br i1 %87, label %69, label %._crit_edge68, !llvm.loop !19

._crit_edge68:                                    ; preds = %84, %82, %80, %77, %74, %.lr.ph79.split
  %.154 = phi i64 [ %.05378, %.lr.ph79.split ], [ %.05265, %74 ], [ %.05265, %77 ], [ %.05265, %80 ], [ %.05265, %82 ], [ %.05378, %84 ]
  %88 = getelementptr inbounds i8, ptr %39, i64 %.154
  %89 = load i8, ptr %88, align 1, !tbaa !13, !range !17, !noundef !18
  %90 = trunc nuw i8 %89 to i1
  br i1 %90, label %._crit_edge80.loopexit, label %.lr.ph79.split, !llvm.loop !20

._crit_edge80.loopexit:                           ; preds = %._crit_edge68
  %.pre113.pre = load i64, ptr %2, align 8, !tbaa !11
  br label %._crit_edge80

._crit_edge80:                                    ; preds = %._crit_edge80.loopexit, %._crit_edge80.split.us
  %.pre113 = phi i64 [ %.pre113.pre, %._crit_edge80.loopexit ], [ %.pre113117, %._crit_edge80.split.us ]
  %91 = add nsw i64 %.05184, 1
  br label %92

92:                                               ; preds = %.lr.ph87, %._crit_edge80
  %.pre113118 = phi i64 [ %.pre113117, %.lr.ph87 ], [ %.pre113, %._crit_edge80 ]
  %93 = phi i64 [ %57, %.lr.ph87 ], [ %.pre113, %._crit_edge80 ]
  %.1 = phi i64 [ %.05184, %.lr.ph87 ], [ %91, %._crit_edge80 ]
  %94 = add nuw nsw i64 %.05581, 1
  %95 = icmp slt i64 %94, %93
  br i1 %95, label %.lr.ph87, label %._crit_edge88, !llvm.loop !22

96:                                               ; preds = %._crit_edge88
  %97 = getelementptr inbounds %"struct.std::pair", ptr %55, i64 %54
  br label %98

98:                                               ; preds = %98, %96
  %99 = phi ptr [ %55, %96 ], [ %100, %98 ]
  call void @_ZNSt4pairIxxEC2IxxTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %99)
  %100 = getelementptr inbounds i8, ptr %99, i64 16
  %101 = icmp eq ptr %100, %97
  br i1 %101, label %.loopexit61, label %98

.loopexit61:                                      ; preds = %98
  %.pre114 = load i64, ptr %3, align 8, !tbaa !11
  %102 = icmp sgt i64 %.pre114, 0
  br i1 %102, label %.lr.ph91, label %._crit_edge92

._crit_edge92:                                    ; preds = %.lr.ph91, %.loopexit61
  %.lcssa = phi i64 [ %.pre114, %.loopexit61 ], [ %110, %.lr.ph91 ]
  %103 = alloca %"class.std::bitset", i64 %.lcssa, align 16
  %104 = icmp eq i64 %.lcssa, 0
  br i1 %104, label %._crit_edge101, label %112

.lr.ph91:                                         ; preds = %.loopexit61, %.lr.ph91
  %.05089 = phi i64 [ %109, %.lr.ph91 ], [ 0, %.loopexit61 ]
  %105 = getelementptr inbounds %"struct.std::pair", ptr %55, i64 %.05089
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %105)
  %107 = getelementptr inbounds i8, ptr %105, i64 8
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %106, ptr noundef nonnull align 8 dereferenceable(8) %107)
  %109 = add nuw nsw i64 %.05089, 1
  %110 = load i64, ptr %3, align 8, !tbaa !11
  %111 = icmp slt i64 %109, %110
  br i1 %111, label %.lr.ph91, label %._crit_edge92, !llvm.loop !23

112:                                              ; preds = %._crit_edge92
  %113 = getelementptr inbounds %"class.std::bitset", ptr %103, i64 %.lcssa
  br label %114

114:                                              ; preds = %114, %112
  %115 = phi ptr [ %103, %112 ], [ %116, %114 ]
  call void @_ZNSt6bitsetILm1000EEC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %115) #9
  %116 = getelementptr inbounds i8, ptr %115, i64 128
  %117 = icmp eq ptr %116, %113
  br i1 %117, label %.loopexit, label %114

.loopexit:                                        ; preds = %114
  %.pre115 = load i64, ptr %3, align 8, !tbaa !11
  %118 = icmp sgt i64 %.pre115, 0
  br i1 %118, label %.lr.ph100, label %._crit_edge101

._crit_edge101:                                   ; preds = %._crit_edge97, %._crit_edge88, %._crit_edge92, %.loopexit
  %119 = phi ptr [ %103, %.loopexit ], [ %103, %._crit_edge92 ], [ %1, %._crit_edge88 ], [ %103, %._crit_edge97 ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #9
  call void @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #9
  %120 = load i64, ptr %3, align 8, !tbaa !11
  %121 = icmp sgt i64 %120, 0
  br i1 %121, label %.lr.ph104, label %._crit_edge105

.lr.ph100:                                        ; preds = %.loopexit, %._crit_edge97
  %.04898 = phi i64 [ %128, %._crit_edge97 ], [ 0, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  %122 = getelementptr inbounds %"struct.std::pair", ptr %55, i64 %.04898
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %122, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %123 = load i64, ptr %5, align 8, !tbaa !24
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  store i32 10000000, ptr %8, align 4, !tbaa !26
  call void @_ZNSt4pairIxxEC2IxiTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @_ZSt9make_pairIRSt4pairIxxES2_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.0") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %125 = load i64, ptr %2, align 8, !tbaa !11
  %126 = icmp sgt i64 %125, 0
  br i1 %126, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %.lr.ph100
  %127 = getelementptr inbounds %"class.std::bitset", ptr %103, i64 %.04898
  br label %131

._crit_edge97:                                    ; preds = %138, %.lr.ph100
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  %128 = add nuw nsw i64 %.04898, 1
  %129 = load i64, ptr %3, align 8, !tbaa !11
  %130 = icmp slt i64 %128, %129
  br i1 %130, label %.lr.ph100, label %._crit_edge101, !llvm.loop !28

131:                                              ; preds = %.lr.ph96, %138
  %.04794 = phi i64 [ 0, %.lr.ph96 ], [ %139, %138 ]
  %132 = getelementptr inbounds %"struct.std::pair.0", ptr %28, i64 %.04794
  %133 = call noundef zeroext i1 @_Z4isctSt4pairIS_IxxES0_ES1_(ptr noundef nonnull byval(%"struct.std::pair.0") align 8 %9, ptr noundef nonnull byval(%"struct.std::pair.0") align 8 %132)
  br i1 %133, label %134, label %138

134:                                              ; preds = %131
  %135 = getelementptr inbounds i64, ptr %38, i64 %.04794
  %136 = load i64, ptr %135, align 8, !tbaa !11
  %137 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6bitsetILm1000EE4flipEm(ptr noundef nonnull align 8 dereferenceable(128) %127, i64 noundef %136)
  br label %138

138:                                              ; preds = %131, %134
  %139 = add nuw nsw i64 %.04794, 1
  %140 = load i64, ptr %2, align 8, !tbaa !11
  %141 = icmp slt i64 %139, %140
  br i1 %141, label %131, label %._crit_edge97, !llvm.loop !29

._crit_edge105:                                   ; preds = %147, %._crit_edge101
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #9
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  %142 = call ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %10) #9
  store ptr %142, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %143 = call ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %10) #9
  store ptr %143, ptr %13, align 8
  %144 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKSt6bitsetILm1000EExELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br i1 %144, label %.lr.ph107, label %._crit_edge108

.lr.ph104:                                        ; preds = %._crit_edge101, %147
  %.046102 = phi i64 [ %150, %147 ], [ 0, %._crit_edge101 ]
  %145 = getelementptr inbounds %"class.std::bitset", ptr %119, i64 %.046102
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEEixERS7_(ptr noundef nonnull align 8 dereferenceable(56) %10, ptr noundef nonnull align 8 dereferenceable(128) %145)
          to label %147 unwind label %153

147:                                              ; preds = %.lr.ph104
  %148 = load i64, ptr %146, align 8, !tbaa !11
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %146, align 8, !tbaa !11
  %150 = add nuw nsw i64 %.046102, 1
  %151 = load i64, ptr %3, align 8, !tbaa !11
  %152 = icmp slt i64 %150, %151
  br i1 %152, label %.lr.ph104, label %._crit_edge105, !llvm.loop !30

153:                                              ; preds = %.lr.ph104
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %169

._crit_edge108.loopexit:                          ; preds = %.lr.ph107
  %.pre116 = load i64, ptr %11, align 8, !tbaa !11
  br label %._crit_edge108

._crit_edge108:                                   ; preds = %._crit_edge108.loopexit, %._crit_edge105
  %155 = phi i64 [ %.pre116, %._crit_edge108.loopexit ], [ 0, %._crit_edge105 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  %156 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %155)
          to label %164 unwind label %167

.lr.ph107:                                        ; preds = %._crit_edge105, %.lr.ph107
  %157 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKSt6bitsetILm1000EExELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %158 = getelementptr inbounds i8, ptr %157, i64 128
  %159 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %158)
  %160 = load i64, ptr %159, align 8, !tbaa !11
  store i64 %160, ptr %11, align 8, !tbaa !11
  %161 = call ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKSt6bitsetILm1000EExELb0ELb0EEppEi(ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef 0) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %162 = call ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %10) #9
  store ptr %162, ptr %13, align 8
  %163 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKSt6bitsetILm1000EExELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  br i1 %163, label %.lr.ph107, label %._crit_edge108.loopexit, !llvm.loop !31

164:                                              ; preds = %._crit_edge108
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %156, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %166 unwind label %167

166:                                              ; preds = %164
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  call void @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #9
  call void @llvm.stackrestore.p0(ptr %27)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  ret i32 0

167:                                              ; preds = %164, %._crit_edge108
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #9
  br label %169

169:                                              ; preds = %167, %153
  %.pn = phi { ptr, i32 } [ %154, %153 ], [ %168, %167 ]
  call void @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  resume { ptr, i32 } %.pn
}

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

; 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 ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; 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 #5 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPbbEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #7

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIRSt4pairIxxES2_ES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.0") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNSt6bitsetILm1000EE4flipEm(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef) local_unnamed_addr #5 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt13unordered_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE5beginEv(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_baseISt4pairIKSt6bitsetILm1000EExELb0EEES8_(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_mapISt6bitsetILm1000EExSt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_xEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

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

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

; 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 #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { "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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #7 = { 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 #8 = { 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 #9 = { 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 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16, !21}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = !{!25, !12, i64 0}
!25 = !{!"_ZTSSt4pairIxxE", !12, i64 0, !12, i64 8}
!26 = !{!27, !27, i64 0}
!27 = !{!"int", !10, i64 0}
!28 = distinct !{!28, !16}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}
!31 = distinct !{!31, !16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass