; LLVM IR from eyangch/competitive-programming :: Codeforces/1718 (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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@A = external dso_local global [200000 x i64], align 16
@offset = external dso_local global [10 x [200000 x i64]], align 16
@sieve = external dso_local global [200001 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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 i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"class.std::multiset", align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"class.std::reverse_iterator", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %27 = alloca %"class.std::reverse_iterator", align 8
  store i32 0, ptr %1, align 4
  %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)
  %33 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %35

35:                                               ; preds = %302, %0
  %36 = load i64, ptr @T, align 8, !tbaa !8
  %37 = add nsw i64 %36, -1
  store i64 %37, ptr @T, align 8, !tbaa !8
  %38 = icmp ne i64 %36, 0
  br i1 %38, label %39, label %305

39:                                               ; preds = %35
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %42 = load i64, ptr @N, align 8, !tbaa !8
  %43 = getelementptr inbounds i8, ptr @sieve, i64 %42
  %44 = getelementptr inbounds i8, ptr %43, i64 1
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !11
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef @sieve, ptr noundef %44, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !8
  br label %45

45:                                               ; preds = %54, %39
  %46 = load i64, ptr %3, align 8, !tbaa !8
  %47 = load i64, ptr @N, align 8, !tbaa !8
  %48 = icmp slt i64 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %57

50:                                               ; preds = %45
  %51 = load i64, ptr %3, align 8, !tbaa !8
  %52 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %51
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %52)
  br label %54

54:                                               ; preds = %50
  %55 = load i64, ptr %3, align 8, !tbaa !8
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %3, align 8, !tbaa !8
  br label %45, !llvm.loop !13

57:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #6
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 2, ptr %5, align 8, !tbaa !8
  br label %58

58:                                               ; preds = %94, %57
  %59 = load i64, ptr %5, align 8, !tbaa !8
  %60 = load i64, ptr @N, align 8, !tbaa !8
  %61 = icmp sle i64 %59, %60
  br i1 %61, label %63, label %62

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

63:                                               ; preds = %58
  %64 = load i64, ptr %5, align 8, !tbaa !8
  %65 = getelementptr inbounds [200001 x i8], ptr @sieve, i64 0, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !15, !range !17, !noundef !18
  %67 = trunc i8 %66 to i1
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  br label %94

69:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %70 = load i64, ptr %5, align 8, !tbaa !8
  store i64 %70, ptr %7, align 8, !tbaa !8
  br label %71

71:                                               ; preds = %89, %69
  %72 = load i64, ptr %7, align 8, !tbaa !8
  %73 = load i64, ptr @N, align 8, !tbaa !8
  %74 = icmp sle i64 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 10, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %93

76:                                               ; preds = %71
  %77 = load i64, ptr %7, align 8, !tbaa !8
  %78 = getelementptr inbounds [200001 x i8], ptr @sieve, i64 0, i64 %77
  store i8 1, ptr %78, align 1, !tbaa !15
  %79 = load i64, ptr %7, align 8, !tbaa !8
  %80 = load i64, ptr @N, align 8, !tbaa !8
  %81 = icmp eq i64 %79, %80
  br i1 %81, label %82, label %88

82:                                               ; preds = %76
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %83 unwind label %84

83:                                               ; preds = %82
  br label %88

84:                                               ; preds = %82
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %8, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %304

88:                                               ; preds = %83, %76
  br label %89

89:                                               ; preds = %88
  %90 = load i64, ptr %5, align 8, !tbaa !8
  %91 = load i64, ptr %7, align 8, !tbaa !8
  %92 = add nsw i64 %91, %90
  store i64 %92, ptr %7, align 8, !tbaa !8
  br label %71, !llvm.loop !19

93:                                               ; preds = %75
  br label %94

94:                                               ; preds = %93, %68
  %95 = load i64, ptr %5, align 8, !tbaa !8
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %5, align 8, !tbaa !8
  br label %58, !llvm.loop !20

97:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !8
  br label %98

98:                                               ; preds = %118, %97
  %99 = load i64, ptr %10, align 8, !tbaa !8
  %100 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %101 = icmp slt i64 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %121

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

104:                                              ; preds = %114, %103
  %105 = load i64, ptr %11, align 8, !tbaa !8
  %106 = load i64, ptr @N, align 8, !tbaa !8
  %107 = icmp slt i64 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 16, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %117

109:                                              ; preds = %104
  %110 = load i64, ptr %10, align 8, !tbaa !8
  %111 = getelementptr inbounds [10 x [200000 x i64]], ptr @offset, i64 0, i64 %110
  %112 = load i64, ptr %11, align 8, !tbaa !8
  %113 = getelementptr inbounds [200000 x i64], ptr %111, i64 0, i64 %112
  store i64 0, ptr %113, align 8, !tbaa !8
  br label %114

114:                                              ; preds = %109
  %115 = load i64, ptr %11, align 8, !tbaa !8
  %116 = add nsw i64 %115, 1
  store i64 %116, ptr %11, align 8, !tbaa !8
  br label %104, !llvm.loop !21

117:                                              ; preds = %108
  br label %118

118:                                              ; preds = %117
  %119 = load i64, ptr %10, align 8, !tbaa !8
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr %10, align 8, !tbaa !8
  br label %98, !llvm.loop !22

121:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !8
  br label %122

122:                                              ; preds = %159, %121
  %123 = load i64, ptr %12, align 8, !tbaa !8
  %124 = load i64, ptr @N, align 8, !tbaa !8
  %125 = icmp slt i64 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 19, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %162

127:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !8
  br label %128

128:                                              ; preds = %155, %127
  %129 = load i64, ptr %13, align 8, !tbaa !8
  %130 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %131 = icmp slt i64 %129, %130
  br i1 %131, label %133, label %132

132:                                              ; preds = %128
  store i32 22, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %158

133:                                              ; preds = %128
  %134 = load i64, ptr %12, align 8, !tbaa !8
  %135 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %134
  %136 = load i64, ptr %135, align 8, !tbaa !8
  %137 = load i64, ptr @N, align 8, !tbaa !8
  %138 = load i64, ptr %13, align 8, !tbaa !8
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %138) #6
  %140 = load i64, ptr %139, align 8, !tbaa !8
  %141 = sdiv i64 %137, %140
  %142 = mul nsw i64 %136, %141
  %143 = load i64, ptr %13, align 8, !tbaa !8
  %144 = getelementptr inbounds [10 x [200000 x i64]], ptr @offset, i64 0, i64 %143
  %145 = load i64, ptr %12, align 8, !tbaa !8
  %146 = load i64, ptr @N, align 8, !tbaa !8
  %147 = load i64, ptr %13, align 8, !tbaa !8
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %147) #6
  %149 = load i64, ptr %148, align 8, !tbaa !8
  %150 = sdiv i64 %146, %149
  %151 = srem i64 %145, %150
  %152 = getelementptr inbounds [200000 x i64], ptr %144, i64 0, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !8
  %154 = add nsw i64 %153, %142
  store i64 %154, ptr %152, align 8, !tbaa !8
  br label %155

155:                                              ; preds = %133
  %156 = load i64, ptr %13, align 8, !tbaa !8
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %13, align 8, !tbaa !8
  br label %128, !llvm.loop !23

158:                                              ; preds = %132
  br label %159

159:                                              ; preds = %158
  %160 = load i64, ptr %12, align 8, !tbaa !8
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %12, align 8, !tbaa !8
  br label %122, !llvm.loop !24

162:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #6
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !8
  br label %163

163:                                              ; preds = %194, %162
  %164 = load i64, ptr %15, align 8, !tbaa !8
  %165 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %166 = icmp slt i64 %164, %165
  br i1 %166, label %168, label %167

167:                                              ; preds = %163
  store i32 25, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %197

168:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !8
  br label %169

169:                                              ; preds = %186, %168
  %170 = load i64, ptr %16, align 8, !tbaa !8
  %171 = load i64, ptr @N, align 8, !tbaa !8
  %172 = load i64, ptr %15, align 8, !tbaa !8
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %172) #6
  %174 = load i64, ptr %173, align 8, !tbaa !8
  %175 = sdiv i64 %171, %174
  %176 = icmp slt i64 %170, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %169
  store i32 28, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %193

178:                                              ; preds = %169
  %179 = load i64, ptr %15, align 8, !tbaa !8
  %180 = getelementptr inbounds [10 x [200000 x i64]], ptr @offset, i64 0, i64 %179
  %181 = load i64, ptr %16, align 8, !tbaa !8
  %182 = getelementptr inbounds [200000 x i64], ptr %180, i64 0, i64 %181
  %183 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(8) %182)
          to label %184 unwind label %189

184:                                              ; preds = %178
  %185 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %183, ptr %185, align 8
  br label %186

186:                                              ; preds = %184
  %187 = load i64, ptr %16, align 8, !tbaa !8
  %188 = add nsw i64 %187, 1
  store i64 %188, ptr %16, align 8, !tbaa !8
  br label %169, !llvm.loop !25

189:                                              ; preds = %178
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %8, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %303

193:                                              ; preds = %177
  br label %194

194:                                              ; preds = %193
  %195 = load i64, ptr %15, align 8, !tbaa !8
  %196 = add nsw i64 %195, 1
  store i64 %196, ptr %15, align 8, !tbaa !8
  br label %163, !llvm.loop !26

197:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @_ZNKSt8multisetIxSt4lessIxESaIxEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %18, ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %199 unwind label %210

199:                                              ; preds = %197
  %200 = load i64, ptr %198, align 8, !tbaa !8
  %201 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %200)
          to label %202 unwind label %210

202:                                              ; preds = %199
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %201, i8 noundef signext 10)
          to label %204 unwind label %210

204:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store i64 0, ptr %19, align 8, !tbaa !8
  br label %205

205:                                              ; preds = %294, %204
  %206 = load i64, ptr %19, align 8, !tbaa !8
  %207 = load i64, ptr @Q, align 8, !tbaa !8
  %208 = icmp slt i64 %206, %207
  br i1 %208, label %214, label %209

209:                                              ; preds = %205
  store i32 31, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %302

210:                                              ; preds = %202, %199, %197
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %8, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %303

214:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %215 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %216 unwind label %226

216:                                              ; preds = %214
  %217 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %215, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %218 unwind label %226

218:                                              ; preds = %216
  %219 = load i64, ptr %20, align 8, !tbaa !8
  %220 = add nsw i64 %219, -1
  store i64 %220, ptr %20, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  store i64 0, ptr %22, align 8, !tbaa !8
  br label %221

221:                                              ; preds = %276, %218
  %222 = load i64, ptr %22, align 8, !tbaa !8
  %223 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %224 = icmp slt i64 %222, %223
  br i1 %224, label %230, label %225

225:                                              ; preds = %221
  store i32 34, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %283

226:                                              ; preds = %216, %214
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %8, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %9, align 4
  br label %301

230:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %231 = load i64, ptr %22, align 8, !tbaa !8
  %232 = getelementptr inbounds [10 x [200000 x i64]], ptr @offset, i64 0, i64 %231
  %233 = load i64, ptr %20, align 8, !tbaa !8
  %234 = load i64, ptr @N, align 8, !tbaa !8
  %235 = load i64, ptr %22, align 8, !tbaa !8
  %236 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %235) #6
  %237 = load i64, ptr %236, align 8, !tbaa !8
  %238 = sdiv i64 %234, %237
  %239 = srem i64 %233, %238
  %240 = getelementptr inbounds [200000 x i64], ptr %232, i64 0, i64 %239
  store ptr %240, ptr %23, align 8, !tbaa !27
  %241 = load ptr, ptr %23, align 8, !tbaa !27
  %242 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE4findERKx(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(8) %241)
          to label %243 unwind label %279

243:                                              ; preds = %230
  %244 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %24, i32 0, i32 0
  store ptr %242, ptr %244, align 8
  %245 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %24, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8
  %247 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr %246)
          to label %248 unwind label %279

248:                                              ; preds = %243
  %249 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %25, i32 0, i32 0
  store ptr %247, ptr %249, align 8
  %250 = load i64, ptr %20, align 8, !tbaa !8
  %251 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %250
  %252 = load i64, ptr %251, align 8, !tbaa !8
  %253 = load i64, ptr @N, align 8, !tbaa !8
  %254 = load i64, ptr %22, align 8, !tbaa !8
  %255 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %254) #6
  %256 = load i64, ptr %255, align 8, !tbaa !8
  %257 = sdiv i64 %253, %256
  %258 = mul nsw i64 %252, %257
  %259 = load ptr, ptr %23, align 8, !tbaa !27
  %260 = load i64, ptr %259, align 8, !tbaa !8
  %261 = sub nsw i64 %260, %258
  store i64 %261, ptr %259, align 8, !tbaa !8
  %262 = load i64, ptr %21, align 8, !tbaa !8
  %263 = load i64, ptr @N, align 8, !tbaa !8
  %264 = load i64, ptr %22, align 8, !tbaa !8
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %264) #6
  %266 = load i64, ptr %265, align 8, !tbaa !8
  %267 = sdiv i64 %263, %266
  %268 = mul nsw i64 %262, %267
  %269 = load ptr, ptr %23, align 8, !tbaa !27
  %270 = load i64, ptr %269, align 8, !tbaa !8
  %271 = add nsw i64 %270, %268
  store i64 %271, ptr %269, align 8, !tbaa !8
  %272 = load ptr, ptr %23, align 8, !tbaa !27
  %273 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 8 dereferenceable(8) %272)
          to label %274 unwind label %279

274:                                              ; preds = %248
  %275 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %26, i32 0, i32 0
  store ptr %273, ptr %275, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %276

276:                                              ; preds = %274
  %277 = load i64, ptr %22, align 8, !tbaa !8
  %278 = add nsw i64 %277, 1
  store i64 %278, ptr %22, align 8, !tbaa !8
  br label %221, !llvm.loop !29

279:                                              ; preds = %248, %243, %230
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %8, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %301

283:                                              ; preds = %225
  %284 = load i64, ptr %21, align 8, !tbaa !8
  %285 = load i64, ptr %20, align 8, !tbaa !8
  %286 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %285
  store i64 %284, ptr %286, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  call void @_ZNKSt8multisetIxSt4lessIxESaIxEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %27, ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  %287 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %288 unwind label %297

288:                                              ; preds = %283
  %289 = load i64, ptr %287, align 8, !tbaa !8
  %290 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %289)
          to label %291 unwind label %297

291:                                              ; preds = %288
  %292 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %290, i8 noundef signext 10)
          to label %293 unwind label %297

293:                                              ; preds = %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %294

294:                                              ; preds = %293
  %295 = load i64, ptr %19, align 8, !tbaa !8
  %296 = add nsw i64 %295, 1
  store i64 %296, ptr %19, align 8, !tbaa !8
  br label %205, !llvm.loop !30

297:                                              ; preds = %291, %288, %283
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %8, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %301

301:                                              ; preds = %297, %279, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %303

302:                                              ; preds = %209
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  br label %35, !llvm.loop !31

303:                                              ; preds = %301, %210, %189
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #6
  br label %304

304:                                              ; preds = %303, %84
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #6
  br label %307

305:                                              ; preds = %35
  %306 = load i32, ptr %1, align 4
  ret i32 %306

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

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIxSt4lessIxESaIxEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

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

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

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

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

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

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<long long, long long, std::_Identity<long long>, std::less<long long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@Q = external dso_local global i64, align 8
@A = external dso_local global [200000 x i64], align 16
@offset = external dso_local global [10 x [200000 x i64]], align 16
@sieve = external dso_local global [200001 x i8], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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::vector", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::multiset", align 8
  %5 = alloca %"class.std::reverse_iterator", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::reverse_iterator", align 8
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  %16 = load i64, ptr @T, align 8, !tbaa !8
  %17 = add nsw i64 %16, -1
  store i64 %17, ptr @T, align 8, !tbaa !8
  %.not102 = icmp eq i64 %16, 0
  br i1 %.not102, label %._crit_edge105, label %.lr.ph104

.lr.ph104:                                        ; preds = %0, %._crit_edge101
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) @Q)
  %20 = load i64, ptr @N, align 8, !tbaa !8
  %gep = getelementptr i8, ptr getelementptr inbounds (i8, ptr @sieve, i64 1), i64 %20
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !11
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef nonnull @sieve, ptr noundef nonnull %gep, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %21 = load i64, ptr @N, align 8, !tbaa !8
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph104
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #7
  call void @_ZNSt6vectorIxSaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store i64 2, ptr %3, align 8, !tbaa !8
  %23 = load i64, ptr @N, align 8
  %.not6075 = icmp slt i64 %23, 2
  br i1 %.not6075, label %._crit_edge79, label %.lr.ph78

.lr.ph:                                           ; preds = %.lr.ph104, %.lr.ph
  %.071 = phi i64 [ %26, %.lr.ph ], [ 0, %.lr.ph104 ]
  %24 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %.071
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %26 = add nuw nsw i64 %.071, 1
  %27 = load i64, ptr @N, align 8, !tbaa !8
  %28 = icmp slt i64 %26, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge79:                                    ; preds = %.loopexit, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %29 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %30 = icmp sgt i64 %29, 0
  br i1 %30, label %.preheader68, label %.preheader70

.lr.ph78:                                         ; preds = %._crit_edge, %.loopexit
  %31 = phi i64 [ %48, %.loopexit ], [ %23, %._crit_edge ]
  %storemerge76 = phi i64 [ %50, %.loopexit ], [ 2, %._crit_edge ]
  %32 = getelementptr inbounds [200001 x i8], ptr @sieve, i64 0, i64 %storemerge76
  %33 = load i8, ptr %32, align 1, !tbaa !15, !range !17, !noundef !18
  %34 = trunc nuw i8 %33 to i1
  %.not6472 = icmp sgt i64 %storemerge76, %31
  %or.cond = or i1 %.not6472, %34
  br i1 %or.cond, label %.loopexit, label %.lr.ph74

.lr.ph74:                                         ; preds = %.lr.ph78, %43
  %35 = phi i64 [ %44, %43 ], [ %31, %.lr.ph78 ]
  %36 = phi i64 [ %45, %43 ], [ %31, %.lr.ph78 ]
  %37 = phi i64 [ %46, %43 ], [ %storemerge76, %.lr.ph78 ]
  %.04673 = phi i64 [ %47, %43 ], [ %storemerge76, %.lr.ph78 ]
  %38 = getelementptr inbounds [200001 x i8], ptr @sieve, i64 0, i64 %.04673
  store i8 1, ptr %38, align 1, !tbaa !15
  %39 = icmp eq i64 %.04673, %36
  br i1 %39, label %40, label %43

40:                                               ; preds = %.lr.ph74
  invoke void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %._crit_edge106 unwind label %41

._crit_edge106:                                   ; preds = %40
  %.pre = load i64, ptr %3, align 8, !tbaa !8
  %.pre107 = load i64, ptr @N, align 8
  br label %43

41:                                               ; preds = %40
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %179

43:                                               ; preds = %._crit_edge106, %.lr.ph74
  %44 = phi i64 [ %.pre107, %._crit_edge106 ], [ %35, %.lr.ph74 ]
  %45 = phi i64 [ %.pre107, %._crit_edge106 ], [ %36, %.lr.ph74 ]
  %46 = phi i64 [ %.pre, %._crit_edge106 ], [ %37, %.lr.ph74 ]
  %47 = add nsw i64 %46, %.04673
  %.not64 = icmp sgt i64 %47, %45
  br i1 %.not64, label %.loopexit, label %.lr.ph74, !llvm.loop !19

.loopexit:                                        ; preds = %43, %.lr.ph78
  %48 = phi i64 [ %31, %.lr.ph78 ], [ %44, %43 ]
  %49 = phi i64 [ %storemerge76, %.lr.ph78 ], [ %46, %43 ]
  %50 = add nsw i64 %49, 1
  store i64 %50, ptr %3, align 8, !tbaa !8
  %.not60.not = icmp slt i64 %49, %48
  br i1 %.not60.not, label %.lr.ph78, label %._crit_edge79, !llvm.loop !20

.preheader70:                                     ; preds = %._crit_edge82, %._crit_edge79
  %51 = load i64, ptr @N, align 8, !tbaa !8
  %52 = icmp sgt i64 %51, 0
  br i1 %52, label %.preheader67, label %._crit_edge88

.preheader68:                                     ; preds = %._crit_edge79, %._crit_edge82
  %.05883 = phi i64 [ %57, %._crit_edge82 ], [ 0, %._crit_edge79 ]
  %53 = load i64, ptr @N, align 8, !tbaa !8
  %54 = icmp sgt i64 %53, 0
  br i1 %54, label %.lr.ph81.preheader, label %._crit_edge82

.lr.ph81.preheader:                               ; preds = %.preheader68
  %55 = mul nuw nsw i64 %.05883, 1600000
  %scevgep = getelementptr i8, ptr @offset, i64 %55
  %56 = shl nuw i64 %53, 3
  call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %56, i1 false), !tbaa !8
  br label %._crit_edge82

._crit_edge82:                                    ; preds = %.lr.ph81.preheader, %.preheader68
  %57 = add nuw nsw i64 %.05883, 1
  %58 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %.preheader68, label %.preheader70, !llvm.loop !21

.preheader67:                                     ; preds = %.preheader70, %._crit_edge86
  %.05687 = phi i64 [ %65, %._crit_edge86 ], [ 0, %.preheader70 ]
  %60 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %61 = icmp sgt i64 %60, 0
  br i1 %61, label %.lr.ph85, label %._crit_edge86

.lr.ph85:                                         ; preds = %.preheader67
  %62 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %.05687
  br label %68

._crit_edge88:                                    ; preds = %._crit_edge86, %.preheader70
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt8multisetIxSt4lessIxESaIxEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  %63 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %64 = icmp sgt i64 %63, 0
  br i1 %64, label %.preheader, label %._crit_edge93

._crit_edge86:                                    ; preds = %68, %.preheader67
  %65 = add nuw nsw i64 %.05687, 1
  %66 = load i64, ptr @N, align 8, !tbaa !8
  %67 = icmp slt i64 %65, %66
  br i1 %67, label %.preheader67, label %._crit_edge88, !llvm.loop !22

68:                                               ; preds = %.lr.ph85, %68
  %.05584 = phi i64 [ 0, %.lr.ph85 ], [ %83, %68 ]
  %69 = load i64, ptr %62, align 8, !tbaa !8
  %70 = load i64, ptr @N, align 8, !tbaa !8
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05584) #7
  %72 = load i64, ptr %71, align 8, !tbaa !8
  %73 = sdiv i64 %70, %72
  %74 = mul nsw i64 %73, %69
  %75 = load i64, ptr @N, align 8, !tbaa !8
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05584) #7
  %77 = load i64, ptr %76, align 8, !tbaa !8
  %78 = sdiv i64 %75, %77
  %79 = srem i64 %.05687, %78
  %80 = getelementptr inbounds [10 x [200000 x i64]], ptr @offset, i64 0, i64 %.05584, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !8
  %82 = add nsw i64 %81, %74
  store i64 %82, ptr %80, align 8, !tbaa !8
  %83 = add nuw nsw i64 %.05584, 1
  %84 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %85 = icmp slt i64 %83, %84
  br i1 %85, label %68, label %._crit_edge86, !llvm.loop !23

.preheader:                                       ; preds = %._crit_edge88, %._crit_edge91
  %.05492 = phi i64 [ %94, %._crit_edge91 ], [ 0, %._crit_edge88 ]
  %86 = load i64, ptr @N, align 8, !tbaa !8
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05492) #7
  %88 = load i64, ptr %87, align 8, !tbaa !8
  %89 = sdiv i64 %86, %88
  %90 = icmp sgt i64 %89, 0
  br i1 %90, label %.lr.ph90, label %._crit_edge91

._crit_edge93:                                    ; preds = %._crit_edge91, %._crit_edge88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNKSt8multisetIxSt4lessIxESaIxEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %92)
          to label %108 unwind label %115

._crit_edge91:                                    ; preds = %99, %.preheader
  %94 = add nuw nsw i64 %.05492, 1
  %95 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %96 = icmp slt i64 %94, %95
  br i1 %96, label %.preheader, label %._crit_edge93, !llvm.loop !24

.lr.ph90:                                         ; preds = %.preheader, %99
  %.05389 = phi i64 [ %100, %99 ], [ 0, %.preheader ]
  %97 = getelementptr inbounds [10 x [200000 x i64]], ptr @offset, i64 0, i64 %.05492, i64 %.05389
  %98 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %97)
          to label %99 unwind label %106

99:                                               ; preds = %.lr.ph90
  %100 = add nuw nsw i64 %.05389, 1
  %101 = load i64, ptr @N, align 8, !tbaa !8
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.05492) #7
  %103 = load i64, ptr %102, align 8, !tbaa !8
  %104 = sdiv i64 %101, %103
  %105 = icmp slt i64 %100, %104
  br i1 %105, label %.lr.ph90, label %._crit_edge91, !llvm.loop !25

106:                                              ; preds = %.lr.ph90
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %178

108:                                              ; preds = %._crit_edge93
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %93, i8 noundef signext 10)
          to label %110 unwind label %115

110:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %111 = load i64, ptr @Q, align 8, !tbaa !8
  %112 = icmp sgt i64 %111, 0
  br i1 %112, label %.lr.ph100, label %._crit_edge101

._crit_edge101:                                   ; preds = %171, %110
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  %113 = load i64, ptr @T, align 8, !tbaa !8
  %114 = add nsw i64 %113, -1
  store i64 %114, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %113, 0
  br i1 %.not, label %._crit_edge105, label %.lr.ph104, !llvm.loop !26

115:                                              ; preds = %108, %._crit_edge93
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %178

.lr.ph100:                                        ; preds = %110, %171
  %.04998 = phi i64 [ %172, %171 ], [ 0, %110 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %117 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %118 unwind label %131

118:                                              ; preds = %.lr.ph100
  %119 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %117, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %120 unwind label %131

120:                                              ; preds = %118
  %121 = load i64, ptr %6, align 8, !tbaa !8
  %122 = add nsw i64 %121, -1
  store i64 %122, ptr %6, align 8, !tbaa !8
  %123 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %124 = icmp sgt i64 %123, 0
  br i1 %124, label %.lr.ph96, label %._crit_edge97

._crit_edge97:                                    ; preds = %163, %120
  %125 = load i64, ptr %7, align 8, !tbaa !8
  %126 = load i64, ptr %6, align 8, !tbaa !8
  %127 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %126
  store i64 %125, ptr %127, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @_ZNKSt8multisetIxSt4lessIxESaIxEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %8, ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIxEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %129 = load i64, ptr %128, align 8, !tbaa !8
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %129)
          to label %169 unwind label %175

131:                                              ; preds = %118, %.lr.ph100
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %177

.lr.ph96:                                         ; preds = %120, %163
  %.04894 = phi i64 [ %164, %163 ], [ 0, %120 ]
  %133 = load i64, ptr %6, align 8, !tbaa !8
  %134 = load i64, ptr @N, align 8, !tbaa !8
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.04894) #7
  %136 = load i64, ptr %135, align 8, !tbaa !8
  %137 = sdiv i64 %134, %136
  %138 = srem i64 %133, %137
  %139 = getelementptr inbounds [10 x [200000 x i64]], ptr @offset, i64 0, i64 %.04894, i64 %138
  %140 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE4findERKx(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %139)
          to label %141 unwind label %167

141:                                              ; preds = %.lr.ph96
  %142 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIxE(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr %140)
          to label %143 unwind label %167

143:                                              ; preds = %141
  %144 = load i64, ptr %6, align 8, !tbaa !8
  %145 = getelementptr inbounds [200000 x i64], ptr @A, i64 0, i64 %144
  %146 = load i64, ptr %145, align 8, !tbaa !8
  %147 = load i64, ptr @N, align 8, !tbaa !8
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.04894) #7
  %149 = load i64, ptr %148, align 8, !tbaa !8
  %150 = sdiv i64 %147, %149
  %151 = mul nsw i64 %150, %146
  %152 = load i64, ptr %139, align 8, !tbaa !8
  %153 = sub nsw i64 %152, %151
  store i64 %153, ptr %139, align 8, !tbaa !8
  %154 = load i64, ptr %7, align 8, !tbaa !8
  %155 = load i64, ptr @N, align 8, !tbaa !8
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.04894) #7
  %157 = load i64, ptr %156, align 8, !tbaa !8
  %158 = sdiv i64 %155, %157
  %159 = mul nsw i64 %158, %154
  %160 = load i64, ptr %139, align 8, !tbaa !8
  %161 = add nsw i64 %160, %159
  store i64 %161, ptr %139, align 8, !tbaa !8
  %162 = invoke ptr @_ZNSt8multisetIxSt4lessIxESaIxEE6insertERKx(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %139)
          to label %163 unwind label %167

163:                                              ; preds = %143
  %164 = add nuw nsw i64 %.04894, 1
  %165 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %166 = icmp slt i64 %164, %165
  br i1 %166, label %.lr.ph96, label %._crit_edge97, !llvm.loop !27

167:                                              ; preds = %143, %141, %.lr.ph96
  %168 = landingpad { ptr, i32 }
          cleanup
  br label %177

169:                                              ; preds = %._crit_edge97
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %130, i8 noundef signext 10)
          to label %171 unwind label %175

171:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %172 = add nuw nsw i64 %.04998, 1
  %173 = load i64, ptr @Q, align 8, !tbaa !8
  %174 = icmp slt i64 %172, %173
  br i1 %174, label %.lr.ph100, label %._crit_edge101, !llvm.loop !28

175:                                              ; preds = %169, %._crit_edge97
  %176 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %177

177:                                              ; preds = %175, %167, %131
  %.pn = phi { ptr, i32 } [ %168, %167 ], [ %176, %175 ], [ %132, %131 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %178

178:                                              ; preds = %177, %115, %106
  %.pn62 = phi { ptr, i32 } [ %107, %106 ], [ %.pn, %177 ], [ %116, %115 ]
  call void @_ZNSt8multisetIxSt4lessIxESaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  br label %179

179:                                              ; preds = %178, %41
  %.pn65 = phi { ptr, i32 } [ %42, %41 ], [ %.pn62, %178 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn65

._crit_edge105:                                   ; preds = %._crit_edge101, %0
  ret i32 0
}

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

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

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIxSt4lessIxESaIxEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

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


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