; LLVM IR from eyangch/competitive-programming :: Codeforces/1364 (c)

; 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" }
%"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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

37:                                               ; preds = %57, %0
  %38 = load i32, ptr %6, align 4, !tbaa !8
  %39 = load i32, ptr %2, align 4, !tbaa !8
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %64

42:                                               ; preds = %37
  %43 = load i32, ptr %6, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds i32, ptr %36, i64 %44
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %45)
          to label %47 unwind label %60

47:                                               ; preds = %42
  %48 = load i32, ptr %6, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %36, i64 %49
  %51 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 4 dereferenceable(4) %50)
          to label %52 unwind label %60

52:                                               ; preds = %47
  %53 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %54 = extractvalue { ptr, i8 } %51, 0
  store ptr %54, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %56 = extractvalue { ptr, i8 } %51, 1
  store i8 %56, ptr %55, align 8
  br label %57

57:                                               ; preds = %52
  %58 = load i32, ptr %6, align 4, !tbaa !8
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %6, align 4, !tbaa !8
  br label %37, !llvm.loop !11

60:                                               ; preds = %47, %42
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %278

64:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %65 = getelementptr inbounds i32, ptr %36, i64 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %65)
          to label %66 unwind label %74

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %67 unwind label %78

67:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %68

68:                                               ; preds = %111, %67
  %69 = load i32, ptr %13, align 4, !tbaa !8
  %70 = load i32, ptr %2, align 4, !tbaa !8
  %71 = sub nsw i32 %70, 1
  %72 = icmp slt i32 %69, %71
  br i1 %72, label %82, label %73

73:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %115

74:                                               ; preds = %64
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %7, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %8, align 4
  br label %277

78:                                               ; preds = %66
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %7, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %276

82:                                               ; preds = %68
  %83 = load i32, ptr %13, align 4, !tbaa !8
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %36, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !8
  %87 = load i32, ptr %13, align 4, !tbaa !8
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %36, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !8
  %92 = icmp ne i32 %86, %91
  br i1 %92, label %93, label %110

93:                                               ; preds = %82
  %94 = load i32, ptr %13, align 4, !tbaa !8
  %95 = add nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %36, i64 %96
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 4 dereferenceable(4) %97)
          to label %98 unwind label %102

98:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %99 = load i32, ptr %13, align 4, !tbaa !8
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %14, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %101 unwind label %106

101:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %110

102:                                              ; preds = %93
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  br label %114

106:                                              ; preds = %98
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %7, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %114

110:                                              ; preds = %101, %82
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %13, align 4, !tbaa !8
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %13, align 4, !tbaa !8
  br label %68, !llvm.loop !13

114:                                              ; preds = %106, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %276

115:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 1, ptr %15, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !8
  %116 = load i32, ptr %2, align 4, !tbaa !8
  %117 = zext i32 %116 to i64
  %118 = alloca i32, i64 %117, align 16
  store i64 %117, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !8
  br label %119

119:                                              ; preds = %233, %115
  %120 = load i32, ptr %18, align 4, !tbaa !8
  %121 = load i32, ptr %2, align 4, !tbaa !8
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 8, ptr %19, align 4
  br label %236

124:                                              ; preds = %119
  %125 = load i32, ptr %18, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %36, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !8
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %144, label %130

130:                                              ; preds = %124
  %131 = load i32, ptr %18, align 4, !tbaa !8
  %132 = icmp ne i32 %131, 0
  br i1 %132, label %133, label %175

133:                                              ; preds = %130
  %134 = load i32, ptr %18, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds i32, ptr %36, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !8
  %138 = load i32, ptr %18, align 4, !tbaa !8
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %36, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !8
  %143 = icmp eq i32 %137, %142
  br i1 %143, label %144, label %175

144:                                              ; preds = %133, %124
  br label %145

145:                                              ; preds = %154, %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %146 = invoke ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %147 unwind label %157

147:                                              ; preds = %145
  %148 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %20, i32 0, i32 0
  %149 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %148, i32 0, i32 0
  store ptr %146, ptr %149, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %150 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %5) #8
  %151 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %21, i32 0, i32 0
  %152 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %151, i32 0, i32 0
  store ptr %150, ptr %152, align 8
  %153 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br i1 %153, label %154, label %161

154:                                              ; preds = %147
  %155 = load i32, ptr %15, align 4, !tbaa !8
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %15, align 4, !tbaa !8
  br label %145, !llvm.loop !14

157:                                              ; preds = %145
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %7, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %238

161:                                              ; preds = %147
  %162 = load i32, ptr %15, align 4, !tbaa !8
  %163 = load i32, ptr %18, align 4, !tbaa !8
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i32, ptr %118, i64 %164
  store i32 %162, ptr %165, align 4, !tbaa !8
  %166 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %167 unwind label %171

167:                                              ; preds = %161
  %168 = load i32, ptr %166, align 4, !tbaa !8
  store i32 %168, ptr %16, align 4, !tbaa !8
  %169 = load i32, ptr %15, align 4, !tbaa !8
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %15, align 4, !tbaa !8
  br label %232

171:                                              ; preds = %215, %205, %203, %161
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %7, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %8, align 4
  br label %238

175:                                              ; preds = %133, %130
  %176 = load i32, ptr %16, align 4, !tbaa !8
  %177 = load i32, ptr %18, align 4, !tbaa !8
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds i32, ptr %36, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !8
  %181 = sub nsw i32 %180, 1
  %182 = icmp slt i32 %176, %181
  br i1 %182, label %183, label %195

183:                                              ; preds = %175
  %184 = load i32, ptr %18, align 4, !tbaa !8
  %185 = sub nsw i32 %184, 1
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i32, ptr %36, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !8
  %189 = load i32, ptr %18, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds i32, ptr %36, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !8
  %193 = sub nsw i32 %192, 1
  %194 = icmp ne i32 %188, %193
  br i1 %194, label %203, label %195

195:                                              ; preds = %183, %175
  %196 = load i32, ptr %16, align 4, !tbaa !8
  %197 = load i32, ptr %18, align 4, !tbaa !8
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i32, ptr %36, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !8
  %201 = sub nsw i32 %200, 2
  %202 = icmp slt i32 %196, %201
  br i1 %202, label %203, label %208

203:                                              ; preds = %195, %183
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %205 unwind label %171

205:                                              ; preds = %203
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %207 unwind label %171

207:                                              ; preds = %205
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  br label %236

208:                                              ; preds = %195
  %209 = load i32, ptr %18, align 4, !tbaa !8
  %210 = icmp eq i32 %209, 0
  br i1 %210, label %211, label %215

211:                                              ; preds = %208
  %212 = load i32, ptr %18, align 4, !tbaa !8
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i32, ptr %118, i64 %213
  store i32 0, ptr %214, align 4, !tbaa !8
  br label %231

215:                                              ; preds = %208
  %216 = load i32, ptr %18, align 4, !tbaa !8
  %217 = sub nsw i32 %216, 1
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds i32, ptr %36, i64 %218
  %220 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %219)
          to label %221 unwind label %171

221:                                              ; preds = %215
  %222 = load i32, ptr %220, align 4, !tbaa !8
  store i32 %222, ptr %16, align 4, !tbaa !8
  %223 = load i32, ptr %18, align 4, !tbaa !8
  %224 = sub nsw i32 %223, 1
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds i32, ptr %36, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !8
  %228 = load i32, ptr %18, align 4, !tbaa !8
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds i32, ptr %118, i64 %229
  store i32 %227, ptr %230, align 4, !tbaa !8
  br label %231

231:                                              ; preds = %221, %211
  br label %232

232:                                              ; preds = %231, %167
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %18, align 4, !tbaa !8
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %18, align 4, !tbaa !8
  br label %119, !llvm.loop !15

236:                                              ; preds = %207, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  %237 = load i32, ptr %19, align 4
  switch i32 %237, label %272 [
    i32 8, label %239
  ]

238:                                              ; preds = %171, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %275

239:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store ptr %118, ptr %22, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %240 = load ptr, ptr %22, align 8, !tbaa !16
  store ptr %240, ptr %23, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %241 = load ptr, ptr %22, align 8, !tbaa !16
  %242 = mul nuw i64 4, %117
  %243 = udiv i64 %242, 4
  %244 = getelementptr inbounds i32, ptr %241, i64 %243
  store ptr %244, ptr %24, align 8, !tbaa !16
  br label %245

245:                                              ; preds = %258, %239
  %246 = load ptr, ptr %23, align 8, !tbaa !16
  %247 = load ptr, ptr %24, align 8, !tbaa !16
  %248 = icmp ne ptr %246, %247
  br i1 %248, label %250, label %249

249:                                              ; preds = %245
  store i32 13, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %265

250:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %251 = load ptr, ptr %23, align 8, !tbaa !16
  %252 = load i32, ptr %251, align 4, !tbaa !8
  store i32 %252, ptr %25, align 4, !tbaa !8
  %253 = load i32, ptr %25, align 4, !tbaa !8
  %254 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %253)
          to label %255 unwind label %261

255:                                              ; preds = %250
  %256 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %254, ptr noundef @.str)
          to label %257 unwind label %261

257:                                              ; preds = %255
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %258

258:                                              ; preds = %257
  %259 = load ptr, ptr %23, align 8, !tbaa !16
  %260 = getelementptr inbounds i32, ptr %259, i32 1
  store ptr %260, ptr %23, align 8, !tbaa !16
  br label %245

261:                                              ; preds = %255, %250
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %7, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %275

265:                                              ; preds = %249
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %267 unwind label %268

267:                                              ; preds = %265
  store i32 0, ptr %1, align 4
  store i32 1, ptr %19, align 4
  br label %272

268:                                              ; preds = %265
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %7, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %8, align 4
  br label %275

272:                                              ; preds = %267, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #8
  %273 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %273)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %274 = load i32, ptr %1, align 4
  ret i32 %274

275:                                              ; preds = %268, %261, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %276

276:                                              ; preds = %275, %114, %78
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  br label %277

277:                                              ; preds = %276, %74
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  br label %278

278:                                              ; preds = %277, %60
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr %7, align 8
  %281 = load i32, ptr %8, align 4
  %282 = insertvalue { ptr, i32 } poison, ptr %280, 0
  %283 = insertvalue { ptr, i32 } %282, i32 %281, 1
  resume { ptr, i32 } %283
}

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

declare i32 @__gxx_personality_v0(...)

; 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)) #5 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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #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)) #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)) #5 align 2

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind willreturn }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !10, i64 0}


; 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" }
%"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 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::unordered_set", align 8
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %12 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %13 = getelementptr i8, ptr %12, i64 -24
  %14 = load i64, ptr %13, align 8
  %15 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %14
  %16 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %15, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %18 = load i32, ptr %1, align 4, !tbaa !8
  %19 = zext i32 %18 to i64
  %20 = call ptr @llvm.stacksave.p0()
  %21 = alloca i32, i64 %19, align 16
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  %22 = load i32, ptr %1, align 4, !tbaa !8
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %28, %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %34 unwind label %41

.lr.ph:                                           ; preds = %0, %28
  %indvars.iv = phi i64 [ %indvars.iv.next, %28 ], [ 0, %0 ]
  %24 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv
  %25 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %26 unwind label %32

26:                                               ; preds = %.lr.ph
  %27 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %24)
          to label %28 unwind label %32

28:                                               ; preds = %26
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr %1, align 4, !tbaa !8
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next, %30
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !11

32:                                               ; preds = %26, %.lr.ph
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %130

34:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  store i32 0, ptr %5, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %35 unwind label %43

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  %36 = load i32, ptr %1, align 4, !tbaa !8
  %37 = icmp sgt i32 %36, 1
  br i1 %37, label %.lr.ph69, label %._crit_edge70

._crit_edge70:                                    ; preds = %58, %35
  %38 = phi i32 [ %36, %35 ], [ %59, %58 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  store i32 1, ptr %7, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !8
  %39 = zext i32 %38 to i64
  %40 = alloca i32, i64 %39, align 16
  %.not5271 = icmp sgt i32 %38, 0
  br i1 %.not5271, label %.lr.ph74, label %.critedge

41:                                               ; preds = %._crit_edge
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %129

43:                                               ; preds = %34
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %128

.lr.ph69:                                         ; preds = %35, %58
  %45 = phi i32 [ %59, %58 ], [ %36, %35 ]
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %58 ], [ 0, %35 ]
  %46 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv81
  %47 = load i32, ptr %46, align 4, !tbaa !8
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %48 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv.next82
  %49 = load i32, ptr %48, align 4, !tbaa !8
  %.not56 = icmp eq i32 %47, %49
  br i1 %.not56, label %58, label %50

50:                                               ; preds = %.lr.ph69
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %48)
          to label %51 unwind label %54

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %52 = trunc nuw nsw i64 %indvars.iv.next82 to i32
  store i32 %52, ptr %6, align 4, !tbaa !8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %53 unwind label %56

53:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %.pre = load i32, ptr %1, align 4, !tbaa !8
  br label %58

54:                                               ; preds = %50
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %128

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

58:                                               ; preds = %.lr.ph69, %53
  %59 = phi i32 [ %45, %.lr.ph69 ], [ %.pre, %53 ]
  %60 = add nsw i32 %59, -1
  %61 = sext i32 %60 to i64
  %62 = icmp slt i64 %indvars.iv.next82, %61
  br i1 %62, label %.lr.ph69, label %._crit_edge70, !llvm.loop !13

.lr.ph74:                                         ; preds = %._crit_edge70, %110
  %63 = phi i32 [ %111, %110 ], [ 0, %._crit_edge70 ]
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %110 ], [ 0, %._crit_edge70 ]
  %64 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv84
  %65 = load i32, ptr %64, align 4, !tbaa !8
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %.preheader, label %67

67:                                               ; preds = %.lr.ph74
  %.not = icmp eq i64 %indvars.iv84, 0
  br i1 %.not, label %90, label %68

68:                                               ; preds = %67
  %69 = getelementptr i8, ptr %64, i64 -4
  %70 = load i32, ptr %69, align 4, !tbaa !8
  %71 = icmp eq i32 %65, %70
  br i1 %71, label %.preheader, label %90

.preheader:                                       ; preds = %68, %.lr.ph74
  br label %72

72:                                               ; preds = %.preheader, %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %73 = invoke ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4findERKi(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %74 unwind label %80

74:                                               ; preds = %72
  store ptr %73, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %75 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  store ptr %75, ptr %10, align 8
  %76 = 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) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %77 = load i32, ptr %7, align 4, !tbaa !8
  br i1 %76, label %78, label %82

78:                                               ; preds = %74
  %79 = add nsw i32 %77, 1
  store i32 %79, ptr %7, align 4, !tbaa !8
  br label %72, !llvm.loop !14

80:                                               ; preds = %72
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %127

82:                                               ; preds = %74
  %83 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv84
  store i32 %77, ptr %83, align 4, !tbaa !8
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %85 = load i32, ptr %84, align 4, !tbaa !8
  store i32 %85, ptr %8, align 4, !tbaa !8
  %86 = load i32, ptr %7, align 4, !tbaa !8
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %7, align 4, !tbaa !8
  br label %110

88:                                               ; preds = %100, %98
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %127

90:                                               ; preds = %68, %67
  %91 = add nsw i32 %65, -1
  %92 = icmp slt i32 %63, %91
  br i1 %92, label %93, label %102

93:                                               ; preds = %90
  %94 = getelementptr i8, ptr %64, i64 -4
  %95 = load i32, ptr %94, align 4, !tbaa !8
  %.not51 = icmp ne i32 %95, %91
  %96 = add nsw i32 %65, -2
  %97 = icmp slt i32 %63, %96
  %or.cond = select i1 %.not51, i1 true, i1 %97
  br i1 %or.cond, label %98, label %102

98:                                               ; preds = %93
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
          to label %100 unwind label %88

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %126 unwind label %88

102:                                              ; preds = %90, %93
  br i1 %.not, label %103, label %104

103:                                              ; preds = %102
  store i32 0, ptr %40, align 16, !tbaa !8
  br label %110

104:                                              ; preds = %102
  %105 = getelementptr i8, ptr %64, i64 -4
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %105)
  %107 = load i32, ptr %106, align 4, !tbaa !8
  store i32 %107, ptr %8, align 4, !tbaa !8
  %108 = load i32, ptr %105, align 4, !tbaa !8
  %109 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv84
  store i32 %108, ptr %109, align 4, !tbaa !8
  br label %110

110:                                              ; preds = %82, %104, %103
  %111 = phi i32 [ %85, %82 ], [ %107, %104 ], [ %63, %103 ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %112 = load i32, ptr %1, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %.not52 = icmp slt i64 %indvars.iv.next85, %113
  br i1 %.not52, label %.lr.ph74, label %.critedge, !llvm.loop !15

.critedge:                                        ; preds = %110, %._crit_edge70
  %114 = getelementptr inbounds i32, ptr %40, i64 %39
  %.not5375 = icmp eq i32 %38, 0
  br i1 %.not5375, label %._crit_edge78, label %.lr.ph77

._crit_edge78:                                    ; preds = %120, %.critedge
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %126 unwind label %124

.lr.ph77:                                         ; preds = %.critedge, %120
  %.03876 = phi ptr [ %121, %120 ], [ %40, %.critedge ]
  %116 = load i32, ptr %.03876, align 4, !tbaa !8
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %116)
          to label %118 unwind label %122

118:                                              ; preds = %.lr.ph77
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @.str)
          to label %120 unwind label %122

120:                                              ; preds = %118
  %121 = getelementptr inbounds i8, ptr %.03876, i64 4
  %.not53 = icmp eq ptr %121, %114
  br i1 %.not53, label %._crit_edge78, label %.lr.ph77

122:                                              ; preds = %118, %.lr.ph77
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %127

124:                                              ; preds = %._crit_edge78
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %127

126:                                              ; preds = %100, %._crit_edge78
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  call void @llvm.stackrestore.p0(ptr %20)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0

127:                                              ; preds = %80, %88, %124, %122
  %.pn.pn = phi { ptr, i32 } [ %123, %122 ], [ %125, %124 ], [ %81, %80 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  br label %128

128:                                              ; preds = %54, %56, %127, %43
  %.pn57.pn = phi { ptr, i32 } [ %.pn.pn, %127 ], [ %44, %43 ], [ %57, %56 ], [ %55, %54 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %129

129:                                              ; preds = %128, %41
  %.pn57.pn.pn = phi { ptr, i32 } [ %.pn57.pn, %128 ], [ %42, %41 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  br label %130

130:                                              ; preds = %129, %32
  %.pn61 = phi { ptr, i32 } [ %33, %32 ], [ %.pn57.pn.pn, %129 ]
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn61
}

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

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

; 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 #5 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 void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #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 #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 #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 #2 align 2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 #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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #7

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

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

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 = { 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 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Effective O3 passes: ConstraintEliminationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass