; LLVM IR from eyangch/competitive-programming :: Codeforces/1538 (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::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::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.__gnu_cxx::__normal_iterator" = type { ptr }

@sieve = external dso_local global [100000 x i64], align 16
@T = external dso_local global i64, align 8
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@p = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  store i64 2, ptr %2, align 8, !tbaa !8
  br label %21

21:                                               ; preds = %46, %0
  %22 = load i64, ptr %2, align 8, !tbaa !8
  %23 = icmp slt i64 %22, 100000
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %21
  %26 = load i64, ptr %2, align 8, !tbaa !8
  %27 = getelementptr inbounds [100000 x i64], ptr @sieve, i64 0, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !8
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %45, label %30

30:                                               ; preds = %25
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %31 = load i64, ptr %2, align 8, !tbaa !8
  store i64 %31, ptr %4, align 8, !tbaa !8
  br label %32

32:                                               ; preds = %40, %30
  %33 = load i64, ptr %4, align 8, !tbaa !8
  %34 = icmp slt i64 %33, 100000
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %44

36:                                               ; preds = %32
  %37 = load i64, ptr %2, align 8, !tbaa !8
  %38 = load i64, ptr %4, align 8, !tbaa !8
  %39 = getelementptr inbounds [100000 x i64], ptr @sieve, i64 0, i64 %38
  store i64 %37, ptr %39, align 8, !tbaa !8
  br label %40

40:                                               ; preds = %36
  %41 = load i64, ptr %2, align 8, !tbaa !8
  %42 = load i64, ptr %4, align 8, !tbaa !8
  %43 = add nsw i64 %42, %41
  store i64 %43, ptr %4, align 8, !tbaa !8
  br label %32, !llvm.loop !11

44:                                               ; preds = %35
  br label %45

45:                                               ; preds = %44, %25
  br label %46

46:                                               ; preds = %45
  %47 = load i64, ptr %2, align 8, !tbaa !8
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %2, align 8, !tbaa !8
  br label %21, !llvm.loop !13

49:                                               ; preds = %24
  %50 = 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 %51

51:                                               ; preds = %178, %81, %49
  %52 = load i64, ptr @T, align 8, !tbaa !8
  %53 = add nsw i64 %52, -1
  store i64 %53, ptr @T, align 8, !tbaa !8
  %54 = icmp ne i64 %52, 0
  br i1 %54, label %55, label %179

55:                                               ; preds = %51
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @a)
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull align 8 dereferenceable(8) @b)
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(8) @k)
  %59 = load i64, ptr @a, align 8, !tbaa !8
  %60 = load i64, ptr @b, align 8, !tbaa !8
  %61 = icmp slt i64 %59, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %55
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) @a, ptr noundef nonnull align 8 dereferenceable(8) @b) #7
  br label %63

63:                                               ; preds = %62, %55
  %64 = load i64, ptr @k, align 8, !tbaa !8
  %65 = icmp eq i64 %64, 1
  br i1 %65, label %66, label %82

66:                                               ; preds = %63
  %67 = load i64, ptr @a, align 8, !tbaa !8
  %68 = load i64, ptr @b, align 8, !tbaa !8
  %69 = srem i64 %67, %68
  %70 = icmp eq i64 %69, 0
  br i1 %70, label %71, label %78

71:                                               ; preds = %66
  %72 = load i64, ptr @a, align 8, !tbaa !8
  %73 = load i64, ptr @b, align 8, !tbaa !8
  %74 = icmp ne i64 %72, %73
  br i1 %74, label %75, label %78

75:                                               ; preds = %71
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %76, i8 noundef signext 10)
  br label %81

78:                                               ; preds = %71, %66
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %79, i8 noundef signext 10)
  br label %81

81:                                               ; preds = %78, %75
  br label %51, !llvm.loop !14

82:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr @p, ptr %7, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %83 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %85 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %86 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %85, ptr %86, align 8
  br label %87

87:                                               ; preds = %115, %82
  %88 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %88, label %90, label %89

89:                                               ; preds = %87
  store i32 10, ptr %3, align 4
  br label %117

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  %92 = load i64, ptr %91, align 8, !tbaa !8
  store i64 %92, ptr %10, align 8, !tbaa !8
  %93 = load i64, ptr %10, align 8, !tbaa !8
  %94 = load i64, ptr %10, align 8, !tbaa !8
  %95 = mul nsw i64 %93, %94
  %96 = load i64, ptr @a, align 8, !tbaa !8
  %97 = icmp sgt i64 %95, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %90
  store i32 10, ptr %3, align 4
  br label %112

99:                                               ; preds = %90
  br label %100

100:                                              ; preds = %105, %99
  %101 = load i64, ptr @a, align 8, !tbaa !8
  %102 = load i64, ptr %10, align 8, !tbaa !8
  %103 = srem i64 %101, %102
  %104 = icmp eq i64 %103, 0
  br i1 %104, label %105, label %111

105:                                              ; preds = %100
  %106 = load i64, ptr %5, align 8, !tbaa !8
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %5, align 8, !tbaa !8
  %108 = load i64, ptr %10, align 8, !tbaa !8
  %109 = load i64, ptr @a, align 8, !tbaa !8
  %110 = sdiv i64 %109, %108
  store i64 %110, ptr @a, align 8, !tbaa !8
  br label %100, !llvm.loop !17

111:                                              ; preds = %100
  store i32 0, ptr %3, align 4
  br label %112

112:                                              ; preds = %111, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %113 = load i32, ptr %3, align 4
  switch i32 %113, label %117 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %87

117:                                              ; preds = %112, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %118

118:                                              ; preds = %117
  %119 = load i64, ptr @a, align 8, !tbaa !8
  %120 = icmp sgt i64 %119, 1
  br i1 %120, label %121, label %124

121:                                              ; preds = %118
  %122 = load i64, ptr %5, align 8, !tbaa !8
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %5, align 8, !tbaa !8
  br label %124

124:                                              ; preds = %121, %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr @p, ptr %11, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %125 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %126 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %125, ptr %126, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %127 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #7
  %128 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %127, ptr %128, align 8
  br label %129

129:                                              ; preds = %157, %124
  %130 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %130, label %132, label %131

131:                                              ; preds = %129
  store i32 14, ptr %3, align 4
  br label %159

132:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  %134 = load i64, ptr %133, align 8, !tbaa !8
  store i64 %134, ptr %14, align 8, !tbaa !8
  %135 = load i64, ptr %14, align 8, !tbaa !8
  %136 = load i64, ptr %14, align 8, !tbaa !8
  %137 = mul nsw i64 %135, %136
  %138 = load i64, ptr @b, align 8, !tbaa !8
  %139 = icmp sgt i64 %137, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %132
  store i32 14, ptr %3, align 4
  br label %154

141:                                              ; preds = %132
  br label %142

142:                                              ; preds = %147, %141
  %143 = load i64, ptr @b, align 8, !tbaa !8
  %144 = load i64, ptr %14, align 8, !tbaa !8
  %145 = srem i64 %143, %144
  %146 = icmp eq i64 %145, 0
  br i1 %146, label %147, label %153

147:                                              ; preds = %142
  %148 = load i64, ptr %6, align 8, !tbaa !8
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %6, align 8, !tbaa !8
  %150 = load i64, ptr %14, align 8, !tbaa !8
  %151 = load i64, ptr @b, align 8, !tbaa !8
  %152 = sdiv i64 %151, %150
  store i64 %152, ptr @b, align 8, !tbaa !8
  br label %142, !llvm.loop !18

153:                                              ; preds = %142
  store i32 0, ptr %3, align 4
  br label %154

154:                                              ; preds = %153, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %155 = load i32, ptr %3, align 4
  switch i32 %155, label %159 [
    i32 0, label %156
  ]

156:                                              ; preds = %154
  br label %157

157:                                              ; preds = %156
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %129

159:                                              ; preds = %154, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %160

160:                                              ; preds = %159
  %161 = load i64, ptr @b, align 8, !tbaa !8
  %162 = icmp sgt i64 %161, 1
  br i1 %162, label %163, label %166

163:                                              ; preds = %160
  %164 = load i64, ptr %6, align 8, !tbaa !8
  %165 = add nsw i64 %164, 1
  store i64 %165, ptr %6, align 8, !tbaa !8
  br label %166

166:                                              ; preds = %163, %160
  %167 = load i64, ptr %5, align 8, !tbaa !8
  %168 = load i64, ptr %6, align 8, !tbaa !8
  %169 = add nsw i64 %167, %168
  %170 = load i64, ptr @k, align 8, !tbaa !8
  %171 = icmp sge i64 %169, %170
  br i1 %171, label %172, label %175

172:                                              ; preds = %166
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %174 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %173, i8 noundef signext 10)
  br label %178

175:                                              ; preds = %166
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %176, i8 noundef signext 10)
  br label %178

178:                                              ; preds = %175, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %51, !llvm.loop !14

179:                                              ; preds = %51
  %180 = load i32, ptr %1, align 4
  ret i32 %180
}

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 #6 = { 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 #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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !10, i64 0}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !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::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::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.__gnu_cxx::__normal_iterator" = type { ptr }

@sieve = external dso_local local_unnamed_addr global [100000 x i64], align 16
@T = external dso_local global i64, align 8
@a = external dso_local global i64, align 8
@b = external dso_local global i64, align 8
@k = external dso_local global i64, align 8
@p = external dso_local global %"class.std::vector", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store i64 2, ptr %1, align 8, !tbaa !8
  br label %15

.loopexit67:                                      ; preds = %18, %.loopexit
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  %12 = 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)
  %13 = load i64, ptr @T, align 8, !tbaa !8
  %14 = add nsw i64 %13, -1
  store i64 %14, ptr @T, align 8, !tbaa !8
  %.not60 = icmp eq i64 %13, 0
  br i1 %.not60, label %._crit_edge63, label %.lr.ph62

15:                                               ; preds = %0, %.loopexit
  %storemerge41 = phi i64 [ 2, %0 ], [ %36, %.loopexit ]
  %16 = getelementptr inbounds [100000 x i64], ptr @sieve, i64 0, i64 %storemerge41
  %17 = load i64, ptr %16, align 8, !tbaa !8
  %.not34 = icmp eq i64 %17, 0
  br i1 %.not34, label %18, label %.loopexit

18:                                               ; preds = %15
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) @p, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %19 = load i64, ptr %1, align 8, !tbaa !8
  %20 = icmp slt i64 %19, 100000
  br i1 %20, label %.lr.ph.preheader, label %.loopexit67

.lr.ph.preheader:                                 ; preds = %18
  %21 = shl i64 %19, 1
  %smax = call i64 @llvm.smax.i64(i64 %21, i64 100000)
  %22 = icmp slt i64 %21, 100000
  %umin.neg = sext i1 %22 to i64
  %23 = select i1 %22, i64 2, i64 1
  %24 = add i64 %smax, %umin.neg
  %25 = sub i64 %24, %21
  %26 = udiv i64 %25, %19
  %27 = add i64 %23, %26
  %min.iters.check = icmp ugt i64 %27, 3
  %ident.check.not = icmp eq i64 %19, 1
  %or.cond74 = and i1 %min.iters.check, %ident.check.not
  br i1 %or.cond74, label %vector.ph, label %.lr.ph.preheader78

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %27, -4
  %28 = or disjoint i64 %n.vec, 1
  %ind.end = mul nuw i64 %19, %28
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %29 = getelementptr inbounds [100000 x i64], ptr @sieve, i64 0, i64 %offset.idx
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  store <2 x i64> <i64 1, i64 1>, ptr %29, align 8, !tbaa !8
  store <2 x i64> <i64 1, i64 1>, ptr %30, align 8, !tbaa !8
  %index.next = add nuw i64 %index, 4
  %31 = icmp eq i64 %index.next, %n.vec
  br i1 %31, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %27, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.preheader78

.lr.ph.preheader78:                               ; preds = %middle.block, %.lr.ph.preheader
  %.02140.ph = phi i64 [ %19, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader78, %.lr.ph
  %.02140 = phi i64 [ %33, %.lr.ph ], [ %.02140.ph, %.lr.ph.preheader78 ]
  %32 = getelementptr inbounds [100000 x i64], ptr @sieve, i64 0, i64 %.02140
  store i64 %19, ptr %32, align 8, !tbaa !8
  %33 = add nsw i64 %.02140, %19
  %34 = icmp slt i64 %33, 100000
  br i1 %34, label %.lr.ph, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %.lr.ph, %middle.block, %15
  %35 = phi i64 [ %storemerge41, %15 ], [ %19, %middle.block ], [ %19, %.lr.ph ]
  %36 = add nsw i64 %35, 1
  store i64 %36, ptr %1, align 8, !tbaa !8
  %37 = icmp slt i64 %35, 99999
  br i1 %37, label %15, label %.loopexit67, !llvm.loop !16

.lr.ph62:                                         ; preds = %.loopexit67, %.backedge
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @a)
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(8) @b)
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(8) @k)
  %41 = load i64, ptr @a, align 8, !tbaa !8
  %42 = load i64, ptr @b, align 8, !tbaa !8
  %43 = icmp slt i64 %41, %42
  br i1 %43, label %44, label %45

44:                                               ; preds = %.lr.ph62
  call void @_ZSt4swapIxENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) @a, ptr noundef nonnull align 8 dereferenceable(8) @b) #8
  br label %45

45:                                               ; preds = %44, %.lr.ph62
  %46 = load i64, ptr @k, align 8, !tbaa !8
  %47 = icmp eq i64 %46, 1
  br i1 %47, label %48, label %57

48:                                               ; preds = %45
  %49 = load i64, ptr @a, align 8, !tbaa !8
  %50 = load i64, ptr @b, align 8, !tbaa !8
  %51 = srem i64 %49, %50
  %52 = icmp ne i64 %51, 0
  %.not33 = icmp eq i64 %49, %50
  %or.cond = or i1 %.not33, %52
  %.str.2..str = select i1 %or.cond, ptr @.str.2, ptr @.str
  br label %.backedge

.backedge:                                        ; preds = %48, %.thread37
  %.str.3.sink = phi ptr [ %.str.4..str.3, %.thread37 ], [ %.str.2..str, %48 ]
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.3.sink)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %53, i8 noundef signext 10)
  %55 = load i64, ptr @T, align 8, !tbaa !8
  %56 = add nsw i64 %55, -1
  store i64 %56, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %55, 0
  br i1 %.not, label %._crit_edge63, label %.lr.ph62, !llvm.loop !17

57:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %58 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #8
  store ptr %58, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %59 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #8
  store ptr %59, ptr %3, align 8
  %60 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %60, label %.lr.ph46, label %.thread

.lr.ph46:                                         ; preds = %57, %72
  %.02244 = phi i64 [ %.123.lcssa, %72 ], [ 0, %57 ]
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = mul nsw i64 %62, %62
  %64 = load i64, ptr @a, align 8, !tbaa !8
  %.not30 = icmp sgt i64 %63, %64
  br i1 %.not30, label %.thread, label %.preheader39

.preheader39:                                     ; preds = %.lr.ph46
  %65 = srem i64 %64, %62
  %66 = icmp eq i64 %65, 0
  br i1 %66, label %.lr.ph43, label %72

.lr.ph43:                                         ; preds = %.preheader39, %.lr.ph43
  %.12342 = phi i64 [ %68, %.lr.ph43 ], [ %.02244, %.preheader39 ]
  %67 = phi i64 [ %69, %.lr.ph43 ], [ %64, %.preheader39 ]
  %68 = add nsw i64 %.12342, 1
  %69 = sdiv i64 %67, %62
  %70 = srem i64 %69, %62
  %71 = icmp eq i64 %70, 0
  br i1 %71, label %.lr.ph43, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph43
  store i64 %69, ptr @a, align 8, !tbaa !8
  br label %72

72:                                               ; preds = %._crit_edge, %.preheader39
  %.123.lcssa = phi i64 [ %68, %._crit_edge ], [ %.02244, %.preheader39 ]
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %74, label %.lr.ph46, label %.thread

.thread:                                          ; preds = %72, %.lr.ph46, %57
  %.3 = phi i64 [ 0, %57 ], [ %.02244, %.lr.ph46 ], [ %.123.lcssa, %72 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %75 = load i64, ptr @a, align 8, !tbaa !8
  %76 = icmp sgt i64 %75, 1
  %77 = zext i1 %76 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %78 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #8
  store ptr %78, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %79 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @p) #8
  store ptr %79, ptr %5, align 8
  %80 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %80, label %.lr.ph56, label %.thread37

.lr.ph56:                                         ; preds = %.thread, %92
  %.02455 = phi i64 [ %.125.lcssa, %92 ], [ 0, %.thread ]
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = mul nsw i64 %82, %82
  %84 = load i64, ptr @b, align 8, !tbaa !8
  %.not31 = icmp sgt i64 %83, %84
  br i1 %.not31, label %.thread37, label %.preheader

.preheader:                                       ; preds = %.lr.ph56
  %85 = srem i64 %84, %82
  %86 = icmp eq i64 %85, 0
  br i1 %86, label %.lr.ph51, label %92

.lr.ph51:                                         ; preds = %.preheader, %.lr.ph51
  %.12550 = phi i64 [ %88, %.lr.ph51 ], [ %.02455, %.preheader ]
  %87 = phi i64 [ %89, %.lr.ph51 ], [ %84, %.preheader ]
  %88 = add nsw i64 %.12550, 1
  %89 = sdiv i64 %87, %82
  %90 = srem i64 %89, %82
  %91 = icmp eq i64 %90, 0
  br i1 %91, label %.lr.ph51, label %._crit_edge52, !llvm.loop !19

._crit_edge52:                                    ; preds = %.lr.ph51
  store i64 %89, ptr @b, align 8, !tbaa !8
  br label %92

92:                                               ; preds = %._crit_edge52, %.preheader
  %.125.lcssa = phi i64 [ %88, %._crit_edge52 ], [ %.02455, %.preheader ]
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %94 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %94, label %.lr.ph56, label %.thread37

.thread37:                                        ; preds = %92, %.lr.ph56, %.thread
  %.327 = phi i64 [ 0, %.thread ], [ %.02455, %.lr.ph56 ], [ %.125.lcssa, %92 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %95 = load i64, ptr @b, align 8, !tbaa !8
  %96 = icmp sgt i64 %95, 1
  %97 = zext i1 %96 to i64
  %spec.select35 = add i64 %.3, %77
  %spec.select = add i64 %spec.select35, %.327
  %98 = add i64 %spec.select, %97
  %99 = load i64, ptr @k, align 8, !tbaa !8
  %.not32 = icmp slt i64 %98, %99
  %.str.4..str.3 = select i1 %.not32, ptr @.str.4, ptr @.str.3
  br label %.backedge

._crit_edge63:                                    ; preds = %.backedge, %.loopexit67
  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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3

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

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

; Function Attrs: mustprogress 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 #4 align 2

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

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #7

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !13}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass