; LLVM IR from eyangch/competitive-programming :: Codeforces/1366 (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_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 }

@sieve = external dso_local global [10000001 x i32], align 16
@_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 i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::unordered_set", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %19 = alloca i32, align 4
  %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 i32, align 4
  %24 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %27 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %28 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %30
  %32 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %31, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef @sieve, ptr noundef getelementptr inbounds (i32, ptr @sieve, i64 10000001), ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 2, ptr %3, align 4, !tbaa !8
  br label %33

33:                                               ; preds = %68, %0
  %34 = load i32, ptr %3, align 4, !tbaa !8
  %35 = icmp slt i32 %34, 10000001
  br i1 %35, label %37, label %36

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

37:                                               ; preds = %33
  %38 = load i32, ptr %3, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !8
  %42 = icmp eq i32 %41, 1
  br i1 %42, label %43, label %67

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %44 = load i32, ptr %3, align 4, !tbaa !8
  %45 = mul nsw i32 2, %44
  store i32 %45, ptr %5, align 4, !tbaa !8
  br label %46

46:                                               ; preds = %62, %43
  %47 = load i32, ptr %5, align 4, !tbaa !8
  %48 = icmp slt i32 %47, 10000001
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %66

50:                                               ; preds = %46
  %51 = load i32, ptr %5, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !8
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %61

56:                                               ; preds = %50
  %57 = load i32, ptr %3, align 4, !tbaa !8
  %58 = load i32, ptr %5, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %59
  store i32 %57, ptr %60, align 4, !tbaa !8
  br label %61

61:                                               ; preds = %56, %50
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %3, align 4, !tbaa !8
  %64 = load i32, ptr %5, align 4, !tbaa !8
  %65 = add nsw i32 %64, %63
  store i32 %65, ptr %5, align 4, !tbaa !8
  br label %46, !llvm.loop !11

66:                                               ; preds = %49
  br label %67

67:                                               ; preds = %66, %37
  br label %68

68:                                               ; preds = %67
  %69 = load i32, ptr %3, align 4, !tbaa !8
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %3, align 4, !tbaa !8
  br label %33, !llvm.loop !13

71:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %73 = load i32, ptr %6, align 4, !tbaa !8
  %74 = zext i32 %73 to i64
  %75 = call ptr @llvm.stacksave.p0()
  store ptr %75, ptr %7, align 8
  %76 = alloca i32, i64 %74, align 16
  store i64 %74, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %77

77:                                               ; preds = %87, %71
  %78 = load i32, ptr %9, align 4, !tbaa !8
  %79 = load i32, ptr %6, align 4, !tbaa !8
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %90

82:                                               ; preds = %77
  %83 = load i32, ptr %9, align 4, !tbaa !8
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i32, ptr %76, i64 %84
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %85)
  br label %87

87:                                               ; preds = %82
  %88 = load i32, ptr %9, align 4, !tbaa !8
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %9, align 4, !tbaa !8
  br label %77, !llvm.loop !14

90:                                               ; preds = %81
  %91 = load i32, ptr %6, align 4, !tbaa !8
  %92 = zext i32 %91 to i64
  %93 = mul nuw i64 2, %92
  %94 = alloca i32, i64 %93, align 16
  store i64 %92, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !8
  br label %95

95:                                               ; preds = %200, %90
  %96 = load i32, ptr %11, align 4, !tbaa !8
  %97 = load i32, ptr %6, align 4, !tbaa !8
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %203

100:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %101 = load i32, ptr %11, align 4, !tbaa !8
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i32, ptr %76, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !8
  store i32 %104, ptr %13, align 4, !tbaa !8
  br label %105

105:                                              ; preds = %130, %100
  %106 = load i32, ptr %13, align 4, !tbaa !8
  %107 = icmp sgt i32 %106, 1
  br i1 %107, label %108, label %141

108:                                              ; preds = %105
  %109 = load i32, ptr %13, align 4, !tbaa !8
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !8
  %113 = icmp eq i32 %112, 1
  br i1 %113, label %114, label %125

114:                                              ; preds = %108
  %115 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %116 unwind label %121

116:                                              ; preds = %114
  %117 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %118 = extractvalue { ptr, i8 } %115, 0
  store ptr %118, ptr %117, align 8
  %119 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %120 = extractvalue { ptr, i8 } %115, 1
  store i8 %120, ptr %119, align 8
  br label %141

121:                                              ; preds = %125, %114
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %14, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %236

125:                                              ; preds = %108
  %126 = load i32, ptr %13, align 4, !tbaa !8
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %127
  %129 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 4 dereferenceable(4) %128)
          to label %130 unwind label %121

130:                                              ; preds = %125
  %131 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 0
  %132 = extractvalue { ptr, i8 } %129, 0
  store ptr %132, ptr %131, align 8
  %133 = getelementptr inbounds { ptr, i8 }, ptr %17, i32 0, i32 1
  %134 = extractvalue { ptr, i8 } %129, 1
  store i8 %134, ptr %133, align 8
  %135 = load i32, ptr %13, align 4, !tbaa !8
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !8
  %139 = load i32, ptr %13, align 4, !tbaa !8
  %140 = sdiv i32 %139, %138
  store i32 %140, ptr %13, align 4, !tbaa !8
  br label %105, !llvm.loop !15

141:                                              ; preds = %116, %105
  %142 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  %143 = icmp ule i64 %142, 1
  br i1 %143, label %144, label %155

144:                                              ; preds = %141
  %145 = mul nsw i64 0, %92
  %146 = getelementptr inbounds i32, ptr %94, i64 %145
  %147 = load i32, ptr %11, align 4, !tbaa !8
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr %146, i64 %148
  store i32 -1, ptr %149, align 4, !tbaa !8
  %150 = mul nsw i64 1, %92
  %151 = getelementptr inbounds i32, ptr %94, i64 %150
  %152 = load i32, ptr %11, align 4, !tbaa !8
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i32, ptr %151, i64 %153
  store i32 -1, ptr %154, align 4, !tbaa !8
  br label %199

155:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %156 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  %157 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %18, i32 0, i32 0
  %158 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %157, i32 0, i32 0
  store ptr %156, ptr %158, align 8
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  %160 = load i32, ptr %159, align 4, !tbaa !8
  %161 = mul nsw i64 0, %92
  %162 = getelementptr inbounds i32, ptr %94, i64 %161
  %163 = load i32, ptr %11, align 4, !tbaa !8
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i32, ptr %162, i64 %164
  store i32 %160, ptr %165, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 1, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store ptr %12, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %166 = load ptr, ptr %20, align 8, !tbaa !16
  %167 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %166) #8
  %168 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %21, i32 0, i32 0
  %169 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %168, i32 0, i32 0
  store ptr %167, ptr %169, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %170 = load ptr, ptr %20, align 8, !tbaa !16
  %171 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %170) #8
  %172 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %22, i32 0, i32 0
  %173 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %172, i32 0, i32 0
  store ptr %171, ptr %173, align 8
  br label %174

174:                                              ; preds = %183, %155
  %175 = 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) #8
  br i1 %175, label %177, label %176

176:                                              ; preds = %174
  store i32 16, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %185

177:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %178 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  %179 = load i32, ptr %178, align 4, !tbaa !8
  store i32 %179, ptr %23, align 4, !tbaa !8
  %180 = load i32, ptr %23, align 4, !tbaa !8
  %181 = load i32, ptr %19, align 4, !tbaa !8
  %182 = mul nsw i32 %181, %180
  store i32 %182, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %183

183:                                              ; preds = %177
  %184 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #8
  br label %174

185:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %186 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  %187 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %24, i32 0, i32 0
  %188 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %187, i32 0, i32 0
  store ptr %186, ptr %188, align 8
  %189 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #8
  %190 = load i32, ptr %189, align 4, !tbaa !8
  %191 = load i32, ptr %19, align 4, !tbaa !8
  %192 = sdiv i32 %191, %190
  store i32 %192, ptr %19, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  %193 = load i32, ptr %19, align 4, !tbaa !8
  %194 = mul nsw i64 1, %92
  %195 = getelementptr inbounds i32, ptr %94, i64 %194
  %196 = load i32, ptr %11, align 4, !tbaa !8
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds i32, ptr %195, i64 %197
  store i32 %193, ptr %198, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %199

199:                                              ; preds = %185, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #8
  br label %200

200:                                              ; preds = %199
  %201 = load i32, ptr %11, align 4, !tbaa !8
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %11, align 4, !tbaa !8
  br label %95, !llvm.loop !18

203:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !8
  br label %204

204:                                              ; preds = %230, %203
  %205 = load i32, ptr %25, align 4, !tbaa !8
  %206 = icmp slt i32 %205, 2
  br i1 %206, label %208, label %207

207:                                              ; preds = %204
  store i32 18, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %233

208:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !8
  br label %209

209:                                              ; preds = %225, %208
  %210 = load i32, ptr %26, align 4, !tbaa !8
  %211 = load i32, ptr %6, align 4, !tbaa !8
  %212 = icmp slt i32 %210, %211
  br i1 %212, label %214, label %213

213:                                              ; preds = %209
  store i32 21, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %228

214:                                              ; preds = %209
  %215 = load i32, ptr %25, align 4, !tbaa !8
  %216 = sext i32 %215 to i64
  %217 = mul nsw i64 %216, %92
  %218 = getelementptr inbounds i32, ptr %94, i64 %217
  %219 = load i32, ptr %26, align 4, !tbaa !8
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds i32, ptr %218, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !8
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %222)
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %223, ptr noundef @.str)
  br label %225

225:                                              ; preds = %214
  %226 = load i32, ptr %26, align 4, !tbaa !8
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %26, align 4, !tbaa !8
  br label %209, !llvm.loop !19

228:                                              ; preds = %213
  %229 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %230

230:                                              ; preds = %228
  %231 = load i32, ptr %25, align 4, !tbaa !8
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %25, align 4, !tbaa !8
  br label %204, !llvm.loop !20

233:                                              ; preds = %207
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  %234 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %234)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %235 = load i32, ptr %1, align 4
  ret i32 %235

236:                                              ; preds = %121
  %237 = load ptr, ptr %14, align 8
  %238 = load i32, ptr %15, align 4
  %239 = insertvalue { ptr, i32 } poison, ptr %237, 0
  %240 = insertvalue { ptr, i32 } %239, i32 %238, 1
  resume { ptr, i32 } %240
}

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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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() #5

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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) #3

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) #6 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)) #3

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

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 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 #7 = { 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 #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}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


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

%"class.std::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::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@sieve = external dso_local global [10000001 x i32], align 16
@_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 i32, align 4
  %3 = alloca %"class.std::unordered_set", align 8
  %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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 1, ptr %1, align 4, !tbaa !8
  call void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef nonnull @sieve, ptr noundef nonnull getelementptr inbounds (i8, ptr @sieve, i64 40000004), ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  br label %26

15:                                               ; preds = %.loopexit47
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %16 = 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)
  %17 = load i32, ptr %2, align 4, !tbaa !8
  %18 = zext i32 %17 to i64
  %19 = call ptr @llvm.stacksave.p0()
  %20 = alloca i32, i64 %18, align 16
  %21 = load i32, ptr %2, align 4, !tbaa !8
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph52, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %15
  %23 = zext i32 %21 to i64
  %24 = shl nuw nsw i64 %23, 1
  %25 = alloca i32, i64 %24, align 16
  br label %._crit_edge66

26:                                               ; preds = %0, %.loopexit47
  %indvars.iv71 = phi i64 [ 2, %0 ], [ %indvars.iv.next72, %.loopexit47 ]
  %indvars.iv = phi i64 [ 4, %0 ], [ %indvars.iv.next, %.loopexit47 ]
  %27 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %indvars.iv71
  %28 = load i32, ptr %27, align 4, !tbaa !8
  %29 = icmp eq i32 %28, 1
  %30 = icmp ult i64 %indvars.iv71, 5000001
  %or.cond = and i1 %29, %30
  br i1 %or.cond, label %.lr.ph.preheader, label %.loopexit47

.lr.ph.preheader:                                 ; preds = %26
  %31 = trunc nuw nsw i64 %indvars.iv71 to i32
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %36
  %indvars.iv73 = phi i64 [ %indvars.iv, %.lr.ph.preheader ], [ %indvars.iv.next74, %36 ]
  %32 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %indvars.iv73
  %33 = load i32, ptr %32, align 4, !tbaa !8
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %36

35:                                               ; preds = %.lr.ph
  store i32 %31, ptr %32, align 4, !tbaa !8
  br label %36

36:                                               ; preds = %.lr.ph, %35
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, %indvars.iv71
  %37 = icmp ult i64 %indvars.iv.next74, 10000001
  br i1 %37, label %.lr.ph, label %.loopexit47, !llvm.loop !11

.loopexit47:                                      ; preds = %36, %26
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not = icmp eq i64 %indvars.iv.next72, 10000001
  br i1 %exitcond.not, label %15, label %26, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph52
  %38 = zext i32 %45 to i64
  %39 = shl nuw nsw i64 %38, 1
  %40 = alloca i32, i64 %39, align 16
  %41 = icmp sgt i32 %45, 0
  br i1 %41, label %.lr.ph63, label %._crit_edge66

.lr.ph63:                                         ; preds = %._crit_edge
  %42 = getelementptr inbounds i32, ptr %40, i64 %38
  br label %49

.lr.ph52:                                         ; preds = %15, %.lr.ph52
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %.lr.ph52 ], [ 0, %15 ]
  %43 = getelementptr inbounds i32, ptr %20, i64 %indvars.iv77
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %45 = load i32, ptr %2, align 4, !tbaa !8
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next78, %46
  br i1 %47, label %.lr.ph52, label %._crit_edge, !llvm.loop !14

.preheader45:                                     ; preds = %90
  %48 = icmp sgt i32 %92, 0
  br i1 %48, label %.lr.ph65, label %._crit_edge66

49:                                               ; preds = %.lr.ph63, %90
  %indvars.iv80 = phi i64 [ 0, %.lr.ph63 ], [ %indvars.iv.next81, %90 ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %50 = getelementptr inbounds i32, ptr %20, i64 %indvars.iv80
  %51 = load i32, ptr %50, align 4, !tbaa !8
  store i32 %51, ptr %4, align 4, !tbaa !8
  %52 = icmp sgt i32 %51, 1
  br i1 %52, label %.lr.ph55, label %.loopexit

.lr.ph55:                                         ; preds = %49, %62
  %storemerge53 = phi i32 [ %67, %62 ], [ %51, %49 ]
  %53 = zext nneg i32 %storemerge53 to i64
  %54 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !8
  %56 = icmp eq i32 %55, 1
  br i1 %56, label %57, label %60

57:                                               ; preds = %.lr.ph55
  %58 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %.loopexit unwind label %.loopexit.split-lp

.loopexit46:                                      ; preds = %60
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %59

.loopexit.split-lp:                               ; preds = %57
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %59

59:                                               ; preds = %.loopexit.split-lp, %.loopexit46
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit46 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  resume { ptr, i32 } %lpad.phi

60:                                               ; preds = %.lr.ph55
  %61 = invoke { ptr, i8 } @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(4) %54)
          to label %62 unwind label %.loopexit46

62:                                               ; preds = %60
  %63 = load i32, ptr %4, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [10000001 x i32], ptr @sieve, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !8
  %67 = sdiv i32 %63, %66
  store i32 %67, ptr %4, align 4, !tbaa !8
  %68 = icmp sgt i32 %67, 1
  br i1 %68, label %.lr.ph55, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %62, %49, %57
  %69 = call noundef i64 @_ZNKSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  %70 = icmp ult i64 %69, 2
  br i1 %70, label %71, label %73

71:                                               ; preds = %.loopexit
  %72 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv80
  store i32 -1, ptr %72, align 4, !tbaa !8
  br label %90

73:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %74 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  store ptr %74, ptr %5, align 8
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  %76 = load i32, ptr %75, align 4, !tbaa !8
  %77 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv80
  store i32 %76, ptr %77, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %78 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  store ptr %78, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %79 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  store ptr %79, ptr %7, align 8
  %80 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %80, label %.lr.ph58, label %._crit_edge59

._crit_edge59:                                    ; preds = %.lr.ph58, %73
  %.039.lcssa = phi i32 [ 1, %73 ], [ %87, %.lr.ph58 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %81 = call ptr @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  store ptr %81, ptr %8, align 8
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %83 = load i32, ptr %82, align 4, !tbaa !8
  %84 = sdiv i32 %.039.lcssa, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %90

.lr.ph58:                                         ; preds = %73, %.lr.ph58
  %.03956 = phi i32 [ %87, %.lr.ph58 ], [ 1, %73 ]
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt8__detail14_Node_iteratorIiLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %86 = load i32, ptr %85, align 4, !tbaa !8
  %87 = mul nsw i32 %86, %.03956
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIiLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %89 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIiLb0EEES3_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %89, label %.lr.ph58, label %._crit_edge59

90:                                               ; preds = %._crit_edge59, %71
  %.sink = phi i32 [ %84, %._crit_edge59 ], [ -1, %71 ]
  %91 = getelementptr inbounds i32, ptr %42, i64 %indvars.iv80
  store i32 %.sink, ptr %91, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @_ZNSt13unordered_setIiSt4hashIiESt8equal_toIiESaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #8
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %92 = load i32, ptr %2, align 4, !tbaa !8
  %93 = sext i32 %92 to i64
  %94 = icmp slt i64 %indvars.iv.next81, %93
  br i1 %94, label %49, label %.preheader45, !llvm.loop !16

._crit_edge66:                                    ; preds = %.lr.ph65, %._crit_edge.thread, %._crit_edge, %.preheader45
  %95 = phi i64 [ %38, %.preheader45 ], [ %23, %._crit_edge.thread ], [ %38, %._crit_edge ], [ %38, %.lr.ph65 ]
  %96 = phi ptr [ %40, %.preheader45 ], [ %25, %._crit_edge.thread ], [ %40, %._crit_edge ], [ %40, %.lr.ph65 ]
  %97 = call 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_)
  %98 = load i32, ptr %2, align 4, !tbaa !8
  %99 = icmp sgt i32 %98, 0
  br i1 %99, label %.lr.ph65.1, label %._crit_edge66.1

.lr.ph65.1:                                       ; preds = %._crit_edge66
  %100 = getelementptr inbounds i32, ptr %96, i64 %95
  br label %101

101:                                              ; preds = %101, %.lr.ph65.1
  %indvars.iv83.1 = phi i64 [ 0, %.lr.ph65.1 ], [ %indvars.iv.next84.1, %101 ]
  %102 = getelementptr inbounds i32, ptr %100, i64 %indvars.iv83.1
  %103 = load i32, ptr %102, align 4, !tbaa !8
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %103)
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull @.str)
  %indvars.iv.next84.1 = add nuw nsw i64 %indvars.iv83.1, 1
  %106 = load i32, ptr %2, align 4, !tbaa !8
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %indvars.iv.next84.1, %107
  br i1 %108, label %101, label %._crit_edge66.1, !llvm.loop !17

._crit_edge66.1:                                  ; preds = %101, %._crit_edge66
  %109 = call 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_)
  call void @llvm.stackrestore.p0(ptr %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  ret i32 0

.lr.ph65:                                         ; preds = %.preheader45, %.lr.ph65
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph65 ], [ 0, %.preheader45 ]
  %110 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv83
  %111 = load i32, ptr %110, align 4, !tbaa !8
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %111)
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef nonnull @.str)
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %114 = load i32, ptr %2, align 4, !tbaa !8
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next84, %115
  br i1 %116, label %.lr.ph65, label %._crit_edge66, !llvm.loop !17
}

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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPiiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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() #5

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; 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 #3

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 #6 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)) #3

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

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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #6 = { 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 #7 = { 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 #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 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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