; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/101 Hacks/101 Hack 2016/101 Hack May/Problem D (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::basic_ostream" = type { ptr, %"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::unordered_set" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@s = external dso_local global [3 x [100100 x %"class.std::unordered_set"]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 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)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %18 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %22 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %25 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %28 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %29 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %30 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %33 = alloca %"struct.std::__detail::_Node_iterator", align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %35

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

38:                                               ; preds = %35
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %77

39:                                               ; preds = %35
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %70, %39
  %42 = load i32, ptr %8, align 4, !tbaa !5
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %73

46:                                               ; preds = %41
  %47 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %4, ptr noundef %5)
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 %49
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr %50, i64 0, i64 %52
  %54 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %53, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %55 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %56 = extractvalue { ptr, i8 } %54, 0
  store ptr %56, ptr %55, align 8
  %57 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %58 = extractvalue { ptr, i8 } %54, 1
  store i8 %58, ptr %57, align 8
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 %60
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr %61, i64 0, i64 %63
  %65 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %64, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %66 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %67 = extractvalue { ptr, i8 } %65, 0
  store ptr %67, ptr %66, align 8
  %68 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %69 = extractvalue { ptr, i8 } %65, 1
  store i8 %69, ptr %68, align 8
  br label %70

70:                                               ; preds = %46
  %71 = load i32, ptr %8, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %8, align 4, !tbaa !5
  br label %41, !llvm.loop !9

73:                                               ; preds = %45
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %6, align 4, !tbaa !5
  br label %35, !llvm.loop !11

77:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 300, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %223, %77
  %79 = load i32, ptr %13, align 4, !tbaa !5
  %80 = load i32, ptr %2, align 4, !tbaa !5
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %226

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %84 = load i32, ptr %13, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 1), i64 0, i64 %85
  %87 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %86) #6
  %88 = trunc i64 %87 to i32
  store i32 %88, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %89 = load i32, ptr %13, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 2), i64 0, i64 %90
  %92 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %91) #6
  %93 = trunc i64 %92 to i32
  store i32 %93, ptr %15, align 4, !tbaa !5
  %94 = load i32, ptr %14, align 4, !tbaa !5
  %95 = load i32, ptr %15, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %99, label %158

99:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %100 = load i32, ptr %13, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 1), i64 0, i64 %101
  store ptr %102, ptr %16, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %103 = load ptr, ptr %16, align 8, !tbaa !14
  %104 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %103) #6
  %105 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %17, i32 0, i32 0
  %106 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %105, i32 0, i32 0
  store ptr %104, ptr %106, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %107 = load ptr, ptr %16, align 8, !tbaa !14
  %108 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %107) #6
  %109 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %18, i32 0, i32 0
  %110 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %109, i32 0, i32 0
  store ptr %108, ptr %110, align 8
  br label %111

111:                                              ; preds = %155, %99
  %112 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br i1 %112, label %114, label %113

113:                                              ; preds = %111
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %157

114:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %115 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  store ptr %115, ptr %19, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 2), i64 0, i64 %117
  store ptr %118, ptr %20, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %119 = load ptr, ptr %20, align 8, !tbaa !14
  %120 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %119) #6
  %121 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %21, i32 0, i32 0
  %122 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %121, i32 0, i32 0
  store ptr %120, ptr %122, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %123 = load ptr, ptr %20, align 8, !tbaa !14
  %124 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %123) #6
  %125 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %22, i32 0, i32 0
  %126 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %125, i32 0, i32 0
  store ptr %124, ptr %126, align 8
  br label %127

127:                                              ; preds = %152, %114
  %128 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br i1 %128, label %130, label %129

129:                                              ; preds = %127
  store i32 13, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %154

130:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  store ptr %131, ptr %23, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %132 = load ptr, ptr %19, align 8, !tbaa !14
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %134
  %136 = load ptr, ptr %23, align 8, !tbaa !14
  %137 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %135, ptr noundef nonnull align 4 dereferenceable(4) %136)
  %138 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %24, 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.start.p0(i64 8, ptr %25) #6
  %140 = load ptr, ptr %19, align 8, !tbaa !14
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %142
  %144 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %143) #6
  %145 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %25, i32 0, i32 0
  %146 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %145, i32 0, i32 0
  store ptr %144, ptr %146, align 8
  %147 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br i1 %147, label %148, label %151

148:                                              ; preds = %130
  %149 = load i64, ptr %12, align 8, !tbaa !12
  %150 = add nsw i64 %149, 1
  store i64 %150, ptr %12, align 8, !tbaa !12
  br label %151

151:                                              ; preds = %148, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %152

152:                                              ; preds = %151
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br label %127

154:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %155

155:                                              ; preds = %154
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br label %111

157:                                              ; preds = %113
  br label %222

158:                                              ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %159

159:                                              ; preds = %218, %158
  %160 = load i32, ptr %26, align 4, !tbaa !5
  %161 = load i32, ptr %2, align 4, !tbaa !5
  %162 = icmp sle i32 %160, %161
  br i1 %162, label %164, label %163

163:                                              ; preds = %159
  store i32 15, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %221

164:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %165 = load i32, ptr %13, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 1), i64 0, i64 %166
  %168 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %167, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %169 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %27, i32 0, i32 0
  %170 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %169, i32 0, i32 0
  store ptr %168, ptr %170, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %171 = load i32, ptr %13, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 1), i64 0, i64 %172
  %174 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %173) #6
  %175 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %28, i32 0, i32 0
  %176 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %175, i32 0, i32 0
  store ptr %174, ptr %176, align 8
  %177 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br i1 %177, label %178, label %179

178:                                              ; preds = %164
  br label %218

179:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %180 = load i32, ptr %26, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %181
  %183 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %182) #6
  %184 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %29, i32 0, i32 0
  %185 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %184, i32 0, i32 0
  store ptr %183, ptr %185, align 8
  br label %186

186:                                              ; preds = %215, %179
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %187 = load i32, ptr %26, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %188
  %190 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %189) #6
  %191 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %30, i32 0, i32 0
  %192 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %191, i32 0, i32 0
  store ptr %190, ptr %192, align 8
  %193 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br i1 %193, label %195, label %194

194:                                              ; preds = %186
  store i32 18, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %217

195:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #6
  %197 = load i32, ptr %196, align 4, !tbaa !5
  store i32 %197, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %198 = load i32, ptr %13, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 2), i64 0, i64 %199
  %201 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %200, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %202 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %32, i32 0, i32 0
  %203 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %202, i32 0, i32 0
  store ptr %201, ptr %203, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #6
  %204 = load i32, ptr %13, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds ([3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 2), i64 0, i64 %205
  %207 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %206) #6
  %208 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %33, i32 0, i32 0
  %209 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %208, i32 0, i32 0
  store ptr %207, ptr %209, align 8
  %210 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  br i1 %210, label %211, label %214

211:                                              ; preds = %195
  %212 = load i64, ptr %12, align 8, !tbaa !12
  %213 = add nsw i64 %212, 1
  store i64 %213, ptr %12, align 8, !tbaa !12
  br label %214

214:                                              ; preds = %211, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %215

215:                                              ; preds = %214
  %216 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #6
  br label %186, !llvm.loop !16

217:                                              ; preds = %194
  br label %218

218:                                              ; preds = %217, %178
  %219 = load i32, ptr %26, align 4, !tbaa !5
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %26, align 4, !tbaa !5
  br label %159, !llvm.loop !17

221:                                              ; preds = %163
  br label %222

222:                                              ; preds = %221, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %223

223:                                              ; preds = %222
  %224 = load i32, ptr %13, align 4, !tbaa !5
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %13, align 4, !tbaa !5
  br label %78, !llvm.loop !18

226:                                              ; preds = %82
  %227 = load i64, ptr %12, align 8, !tbaa !12
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %227)
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %230 = load i32, ptr %1, align 4
  ret i32 %230
}

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

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

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

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

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

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

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

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

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

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

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

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

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

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

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


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

%"class.std::basic_ostream" = type { ptr, %"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::unordered_set" = 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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@s = external dso_local global [3 x [100100 x %"class.std::unordered_set"]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1

; 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 #0 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)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %18 = alloca %"struct.std::__detail::_Node_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %.not3537 = icmp slt i32 %21, 1
  br i1 %.not3537, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %.not3537.1 = icmp slt i32 %23, 1
  br i1 %.not3537.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %._crit_edge, %.lr.ph.1
  %.03138.1 = phi i32 [ %33, %.lr.ph.1 ], [ 1, %._crit_edge ]
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 1, i64 %26
  %28 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 1, i64 %30
  %32 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %31, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %33 = add nuw nsw i32 %.03138.1, 1
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %.not35.not.1 = icmp slt i32 %.03138.1, %34
  br i1 %.not35.not.1, label %.lr.ph.1, label %._crit_edge.1, !llvm.loop !9

._crit_edge.1:                                    ; preds = %.lr.ph.1, %._crit_edge
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %.not3537.2 = icmp slt i32 %36, 1
  br i1 %.not3537.2, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %._crit_edge.1, %.lr.ph.2
  %.03138.2 = phi i32 [ %46, %.lr.ph.2 ], [ 1, %._crit_edge.1 ]
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 2, i64 %39
  %41 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %40, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 2, i64 %43
  %45 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %44, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %46 = add nuw nsw i32 %.03138.2, 1
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %.not35.not.2 = icmp slt i32 %.03138.2, %47
  br i1 %.not35.not.2, label %.lr.ph.2, label %._crit_edge.2, !llvm.loop !9

._crit_edge.2:                                    ; preds = %.lr.ph.2, %._crit_edge.1
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %.not60 = icmp slt i32 %48, 1
  br i1 %.not60, label %._crit_edge64, label %.lr.ph63

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.03138 = phi i32 [ %58, %.lr.ph ], [ 1, %0 ]
  %49 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 0, i64 %51
  %53 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %52, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %54 = load i32, ptr %4, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [3 x [100100 x %"class.std::unordered_set"]], ptr @s, i64 0, i64 0, i64 %55
  %57 = call { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %58 = add nuw nsw i32 %.03138, 1
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %.not35.not = icmp slt i32 %.03138, %59
  br i1 %.not35.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge64:                                    ; preds = %125, %._crit_edge.2
  %.032.lcssa = phi i64 [ 0, %._crit_edge.2 ], [ %.8, %125 ]
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.032.lcssa)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph63:                                         ; preds = %._crit_edge.2, %125
  %indvars.iv = phi i64 [ %indvars.iv.next, %125 ], [ 1, %._crit_edge.2 ]
  %.03262 = phi i64 [ %.8, %125 ], [ 0, %._crit_edge.2 ]
  %62 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds (i8, ptr @s, i64 5605600), i64 0, i64 %indvars.iv
  %63 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %62) #6
  %64 = trunc i64 %63 to i32
  %65 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr getelementptr inbounds (i8, ptr @s, i64 11211200), i64 0, i64 %indvars.iv
  %66 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #6
  %67 = trunc i64 %66 to i32
  %68 = add nsw i32 %67, %64
  %69 = icmp slt i32 %68, 300
  br i1 %69, label %70, label %93

70:                                               ; preds = %.lr.ph63
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %71 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %62) #6
  store ptr %71, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %72 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %62) #6
  store ptr %72, ptr %6, align 8
  %73 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %73, label %.lr.ph57, label %._crit_edge58

._crit_edge58:                                    ; preds = %._crit_edge53, %70
  %.1.lcssa = phi i64 [ %.03262, %70 ], [ %.2.lcssa, %._crit_edge53 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %125

.lr.ph57:                                         ; preds = %70, %._crit_edge53
  %.155 = phi i64 [ %.2.lcssa, %._crit_edge53 ], [ %.03262, %70 ]
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %75 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #6
  store ptr %75, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %76 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #6
  store ptr %76, ptr %8, align 8
  %77 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %77, label %.lr.ph52, label %._crit_edge53

._crit_edge53:                                    ; preds = %.lr.ph52, %.lr.ph57
  %.2.lcssa = phi i64 [ %.155, %.lr.ph57 ], [ %spec.select, %.lr.ph52 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %79 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %79, label %.lr.ph57, label %._crit_edge58

.lr.ph52:                                         ; preds = %.lr.ph57, %.lr.ph52
  %.250 = phi i64 [ %spec.select, %.lr.ph52 ], [ %.155, %.lr.ph57 ]
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %81 = load i32, ptr %74, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %82
  %84 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %83, ptr noundef nonnull align 4 dereferenceable(4) %80)
  store ptr %84, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %85 = load i32, ptr %74, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %86
  %88 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %87) #6
  store ptr %88, ptr %10, align 8
  %89 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %90 = zext i1 %89 to i64
  %spec.select = add nsw i64 %.250, %90
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %92 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %92, label %.lr.ph52, label %._crit_edge53

93:                                               ; preds = %.lr.ph63
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  %94 = load i32, ptr %1, align 4, !tbaa !5
  %.not3444 = icmp slt i32 %94, 1
  br i1 %.not3444, label %._crit_edge48, label %.lr.ph47

._crit_edge48:                                    ; preds = %121, %93
  %95 = phi i32 [ %94, %93 ], [ %124, %121 ]
  %.4.lcssa = phi i64 [ %.03262, %93 ], [ %.7, %121 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  br label %125

.lr.ph47:                                         ; preds = %93, %121
  %.445 = phi i64 [ %.7, %121 ], [ %.03262, %93 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %96 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %62, ptr noundef nonnull align 4 dereferenceable(4) %11)
  store ptr %96, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %97 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %62) #6
  store ptr %97, ptr %13, align 8
  %98 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br i1 %98, label %121, label %99

99:                                               ; preds = %.lr.ph47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %100 = load i32, ptr %11, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %101
  %103 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %102) #6
  store ptr %103, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %105
  %107 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %106) #6
  store ptr %107, ptr %15, align 8
  %108 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br i1 %108, label %.lr.ph42, label %._crit_edge43

._crit_edge43:                                    ; preds = %.lr.ph42, %99
  %.5.lcssa = phi i64 [ %.445, %99 ], [ %spec.select36, %.lr.ph42 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %121

.lr.ph42:                                         ; preds = %99, %.lr.ph42
  %.540 = phi i64 [ %spec.select36, %.lr.ph42 ], [ %.445, %99 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %111 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %65, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store ptr %111, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %112 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #6
  store ptr %112, ptr %18, align 8
  %113 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  %114 = zext i1 %113 to i64
  %spec.select36 = add nsw i64 %.540, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100100 x %"class.std::unordered_set"], ptr @s, i64 0, i64 %117
  %119 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %118) #6
  store ptr %119, ptr %15, align 8
  %120 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br i1 %120, label %.lr.ph42, label %._crit_edge43, !llvm.loop !11

121:                                              ; preds = %.lr.ph47, %._crit_edge43
  %.7 = phi i64 [ %.445, %.lr.ph47 ], [ %.5.lcssa, %._crit_edge43 ]
  %122 = load i32, ptr %11, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %11, align 4, !tbaa !5
  %124 = load i32, ptr %1, align 4, !tbaa !5
  %.not34.not = icmp slt i32 %122, %124
  br i1 %.not34.not, label %.lr.ph47, label %._crit_edge48, !llvm.loop !12

125:                                              ; preds = %._crit_edge48, %._crit_edge58
  %126 = phi i32 [ %.pre, %._crit_edge58 ], [ %95, %._crit_edge48 ]
  %.8 = phi i64 [ %.1.lcssa, %._crit_edge58 ], [ %.4.lcssa, %._crit_edge48 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %127 = sext i32 %126 to i64
  %.not.not = icmp slt i64 %indvars.iv, %127
  br i1 %.not.not, label %.lr.ph63, label %._crit_edge64, !llvm.loop !13
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 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 #0 align 2

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

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

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


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