; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces/cf1602_C.ll (Z5solvev)

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

@a = external dso_local global [300010 x [32 x i32]], align 16
@cnt = external dso_local global [32 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8divisorsx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) #0

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %24

24:                                               ; preds = %45, %0
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = icmp sle i32 %25, %26
  br i1 %27, label %29, label %28

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

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %41, %29
  %31 = load i32, ptr %4, align 4, !tbaa !5
  %32 = icmp slt i32 %31, 32
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %30
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %36
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [32 x i32], ptr %37, i64 0, i64 %39
  store i32 0, ptr %40, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %34
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %4, align 4, !tbaa !5
  br label %30, !llvm.loop !9

44:                                               ; preds = %33
  br label %45

45:                                               ; preds = %44
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %2, align 4, !tbaa !5
  br label %24, !llvm.loop !11

48:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %57, %48
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = icmp slt i32 %50, 32
  br i1 %51, label %53, label %52

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

53:                                               ; preds = %49
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [32 x i32], ptr @cnt, i64 0, i64 %55
  store i32 0, ptr %56, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %53
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %5, align 4, !tbaa !5
  br label %49, !llvm.loop !12

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

61:                                               ; preds = %94, %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = load i32, ptr %1, align 4, !tbaa !5
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %97

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %67 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 30, ptr %8, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %90, %66
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = icmp sge i32 %69, 0
  br i1 %70, label %72, label %71

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

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %73 = load i32, ptr %7, align 4, !tbaa !5
  %74 = load i32, ptr %8, align 4, !tbaa !5
  %75 = ashr i32 %73, %74
  %76 = and i32 %75, 1
  store i32 %76, ptr %9, align 4, !tbaa !5
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %79
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [32 x i32], ptr %80, i64 0, i64 %82
  store i32 %77, ptr %83, align 4, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [32 x i32], ptr @cnt, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %88, %84
  store i32 %89, ptr %87, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %90

90:                                               ; preds = %72
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = add nsw i32 %91, -1
  store i32 %92, ptr %8, align 4, !tbaa !5
  br label %68, !llvm.loop !13

93:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %6, align 4, !tbaa !5
  br label %61, !llvm.loop !14

97:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 30, ptr %13, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %125, %97
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = icmp sge i32 %99, 0
  br i1 %100, label %102, label %101

101:                                              ; preds = %98
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %128

102:                                              ; preds = %98
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [32 x i32], ptr @cnt, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %109, label %108

108:                                              ; preds = %102
  br label %125

109:                                              ; preds = %102
  store i32 1, ptr %10, align 4, !tbaa !5
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %117, label %112

112:                                              ; preds = %109
  %113 = load i32, ptr %13, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [32 x i32], ptr @cnt, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  store i32 %116, ptr %12, align 4, !tbaa !5
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %124

117:                                              ; preds = %109
  %118 = load i32, ptr %12, align 4, !tbaa !5
  %119 = load i32, ptr %13, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [32 x i32], ptr @cnt, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %118, i32 noundef %122)
  store i32 %123, ptr %12, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %117, %112
  br label %125

125:                                              ; preds = %124, %108
  %126 = load i32, ptr %13, align 4, !tbaa !5
  %127 = add nsw i32 %126, -1
  store i32 %127, ptr %13, align 4, !tbaa !5
  br label %98, !llvm.loop !15

128:                                              ; preds = %101
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %146, label %131

131:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %141, %131
  %133 = load i32, ptr %14, align 4, !tbaa !5
  %134 = load i32, ptr %1, align 4, !tbaa !5
  %135 = icmp sle i32 %133, %134
  br i1 %135, label %137, label %136

136:                                              ; preds = %132
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %144

137:                                              ; preds = %132
  %138 = load i32, ptr %14, align 4, !tbaa !5
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %138)
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %139, i8 noundef signext 32)
  br label %141

141:                                              ; preds = %137
  %142 = load i32, ptr %14, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %14, align 4, !tbaa !5
  br label %132, !llvm.loop !16

144:                                              ; preds = %136
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  store i32 1, ptr %3, align 4
  br label %181

146:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %147 = load i32, ptr %12, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  invoke void @_Z8divisorsx(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %16, i64 noundef %148)
          to label %149 unwind label %160

149:                                              ; preds = %146
  %150 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store ptr %15, ptr %19, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %151 = load ptr, ptr %19, align 8, !tbaa !17
  %152 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %151) #6
  %153 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %152, ptr %153, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %154 = load ptr, ptr %19, align 8, !tbaa !17
  %155 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %154) #6
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  br label %157

157:                                              ; preds = %172, %149
  %158 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  br i1 %158, label %164, label %159

159:                                              ; preds = %157
  store i32 23, ptr %3, align 4
  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 %178

160:                                              ; preds = %146
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %17, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  br label %188

164:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  %166 = load i32, ptr %165, align 4, !tbaa !5
  store i32 %166, ptr %22, align 4, !tbaa !5
  %167 = load i32, ptr %22, align 4, !tbaa !5
  %168 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %167)
          to label %169 unwind label %174

169:                                              ; preds = %164
  %170 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %168, i8 noundef signext 32)
          to label %171 unwind label %174

171:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %172

172:                                              ; preds = %171
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br label %157

174:                                              ; preds = %169, %164
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %17, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %188

178:                                              ; preds = %159
  %179 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %180 unwind label %184

180:                                              ; preds = %178
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  store i32 0, ptr %3, align 4
  br label %181

181:                                              ; preds = %180, %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  %182 = load i32, ptr %3, align 4
  switch i32 %182, label %194 [
    i32 0, label %183
    i32 1, label %183
  ]

183:                                              ; preds = %181, %181
  ret void

184:                                              ; preds = %178
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %17, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %18, align 4
  br label %188

188:                                              ; preds = %184, %174, %160
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %189

189:                                              ; preds = %188
  %190 = load ptr, ptr %17, align 8
  %191 = load i32, ptr %18, align 4
  %192 = insertvalue { ptr, i32 } poison, ptr %190, 0
  %193 = insertvalue { ptr, i32 } %192, i32 %191, 1
  resume { ptr, i32 } %193

194:                                              ; preds = %181
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef, i32 noundef) #1

; 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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_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 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(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_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

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


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@a = external dso_local local_unnamed_addr global [300010 x [32 x i32]], align 16
@cnt = external dso_local local_unnamed_addr global [32 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z8divisorsx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) local_unnamed_addr #0

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %.not60 = icmp slt i32 %8, 0
  br i1 %.not60, label %.preheader57.thread, label %.preheader57

.preheader57.thread:                              ; preds = %0
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) @cnt, i8 0, i64 128, i1 false), !tbaa !5
  br label %.preheader55.preheader

.preheader57:                                     ; preds = %0
  %9 = add nuw i32 %8, 1
  %10 = zext i32 %9 to i64
  %11 = shl nuw nsw i64 %10, 7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @a, i8 0, i64 %11, i1 false), !tbaa !5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) @cnt, i8 0, i64 128, i1 false), !tbaa !5
  %.not4964 = icmp eq i32 %8, 0
  br i1 %.not4964, label %.preheader55.preheader, label %.lr.ph

.preheader55.preheader:                           ; preds = %.lr.ph, %.preheader57.thread, %.preheader57
  br label %.preheader55

.lr.ph:                                           ; preds = %.preheader57, %.lr.ph
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %.lr.ph ], [ 1, %.preheader57 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %13, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %14 = lshr <4 x i32> %broadcast.splat, <i32 30, i32 29, i32 28, i32 27>
  %15 = and <4 x i32> %14, <i32 1, i32 1, i32 1, i32 1>
  %16 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 27
  %reverse = shufflevector <4 x i32> %15, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse, ptr %16, align 4, !tbaa !5
  %wide.load = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 108), align 4, !tbaa !5
  %reverse87 = shufflevector <4 x i32> %wide.load, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %17 = add nsw <4 x i32> %reverse87, %15
  %reverse88 = shufflevector <4 x i32> %17, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse88, ptr getelementptr inbounds (i8, ptr @cnt, i64 108), align 4, !tbaa !5
  %18 = lshr <4 x i32> %broadcast.splat, <i32 26, i32 25, i32 24, i32 23>
  %19 = and <4 x i32> %18, <i32 1, i32 1, i32 1, i32 1>
  %20 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 23
  %reverse.1 = shufflevector <4 x i32> %19, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse.1, ptr %20, align 4, !tbaa !5
  %wide.load.1 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 92), align 4, !tbaa !5
  %reverse87.1 = shufflevector <4 x i32> %wide.load.1, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %21 = add nsw <4 x i32> %reverse87.1, %19
  %reverse88.1 = shufflevector <4 x i32> %21, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse88.1, ptr getelementptr inbounds (i8, ptr @cnt, i64 92), align 4, !tbaa !5
  %22 = lshr <4 x i32> %broadcast.splat, <i32 22, i32 21, i32 20, i32 19>
  %23 = and <4 x i32> %22, <i32 1, i32 1, i32 1, i32 1>
  %24 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 19
  %reverse.2 = shufflevector <4 x i32> %23, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse.2, ptr %24, align 4, !tbaa !5
  %wide.load.2 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 76), align 4, !tbaa !5
  %reverse87.2 = shufflevector <4 x i32> %wide.load.2, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %25 = add nsw <4 x i32> %reverse87.2, %23
  %reverse88.2 = shufflevector <4 x i32> %25, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse88.2, ptr getelementptr inbounds (i8, ptr @cnt, i64 76), align 4, !tbaa !5
  %26 = lshr <4 x i32> %broadcast.splat, <i32 18, i32 17, i32 16, i32 15>
  %27 = and <4 x i32> %26, <i32 1, i32 1, i32 1, i32 1>
  %28 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 15
  %reverse.3 = shufflevector <4 x i32> %27, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse.3, ptr %28, align 4, !tbaa !5
  %wide.load.3 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 60), align 4, !tbaa !5
  %reverse87.3 = shufflevector <4 x i32> %wide.load.3, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %29 = add nsw <4 x i32> %reverse87.3, %27
  %reverse88.3 = shufflevector <4 x i32> %29, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse88.3, ptr getelementptr inbounds (i8, ptr @cnt, i64 60), align 4, !tbaa !5
  %30 = lshr <4 x i32> %broadcast.splat, <i32 14, i32 13, i32 12, i32 11>
  %31 = and <4 x i32> %30, <i32 1, i32 1, i32 1, i32 1>
  %32 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 11
  %reverse.4 = shufflevector <4 x i32> %31, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse.4, ptr %32, align 4, !tbaa !5
  %wide.load.4 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 44), align 4, !tbaa !5
  %reverse87.4 = shufflevector <4 x i32> %wide.load.4, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %33 = add nsw <4 x i32> %reverse87.4, %31
  %reverse88.4 = shufflevector <4 x i32> %33, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse88.4, ptr getelementptr inbounds (i8, ptr @cnt, i64 44), align 4, !tbaa !5
  %34 = lshr <4 x i32> %broadcast.splat, <i32 10, i32 9, i32 8, i32 7>
  %35 = and <4 x i32> %34, <i32 1, i32 1, i32 1, i32 1>
  %36 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 7
  %reverse.5 = shufflevector <4 x i32> %35, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse.5, ptr %36, align 4, !tbaa !5
  %wide.load.5 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 28), align 4, !tbaa !5
  %reverse87.5 = shufflevector <4 x i32> %wide.load.5, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %37 = add nsw <4 x i32> %reverse87.5, %35
  %reverse88.5 = shufflevector <4 x i32> %37, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse88.5, ptr getelementptr inbounds (i8, ptr @cnt, i64 28), align 4, !tbaa !5
  %38 = lshr <4 x i32> %broadcast.splat, <i32 6, i32 5, i32 4, i32 3>
  %39 = and <4 x i32> %38, <i32 1, i32 1, i32 1, i32 1>
  %40 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 3
  %reverse.6 = shufflevector <4 x i32> %39, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse.6, ptr %40, align 4, !tbaa !5
  %wide.load.6 = load <4 x i32>, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %reverse87.6 = shufflevector <4 x i32> %wide.load.6, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %41 = add nsw <4 x i32> %reverse87.6, %39
  %reverse88.6 = shufflevector <4 x i32> %41, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  store <4 x i32> %reverse88.6, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %42 = lshr i32 %13, 2
  %43 = and i32 %42, 1
  %44 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 2
  store i32 %43, ptr %44, align 8, !tbaa !5
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %46 = add nsw i32 %45, %43
  store i32 %46, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %47 = lshr i32 %13, 1
  %48 = and i32 %47, 1
  %49 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 1
  store i32 %48, ptr %49, align 4, !tbaa !5
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4, !tbaa !5
  %51 = add nsw i32 %50, %48
  store i32 %51, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4, !tbaa !5
  %52 = and i32 %13, 1
  %53 = getelementptr inbounds [300010 x [32 x i32]], ptr @a, i64 0, i64 %indvars.iv79, i64 0
  store i32 %52, ptr %53, align 16, !tbaa !5
  %54 = load i32, ptr @cnt, align 16, !tbaa !5
  %55 = add nsw i32 %54, %52
  store i32 %55, ptr @cnt, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %.not49.not = icmp slt i64 %indvars.iv79, %57
  br i1 %.not49.not, label %.lr.ph, label %.preheader55.preheader, !llvm.loop !9

58:                                               ; preds = %65
  %.not50 = icmp eq i32 %.143, 0
  br i1 %.not50, label %.preheader, label %71

.preheader:                                       ; preds = %58
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %.not5171 = icmp slt i32 %59, 1
  br i1 %.not5171, label %._crit_edge74, label %.lr.ph73

.preheader55:                                     ; preds = %.preheader55.preheader, %65
  %indvars.iv82 = phi i64 [ %indvars.iv.next83, %65 ], [ 30, %.preheader55.preheader ]
  %.03968 = phi i32 [ %.1, %65 ], [ undef, %.preheader55.preheader ]
  %.04067 = phi i32 [ %.141, %65 ], [ 0, %.preheader55.preheader ]
  %.04266 = phi i32 [ %.143, %65 ], [ 0, %.preheader55.preheader ]
  %60 = getelementptr inbounds [32 x i32], ptr @cnt, i64 0, i64 %indvars.iv82
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %.not53 = icmp eq i32 %61, 0
  br i1 %.not53, label %65, label %62

62:                                               ; preds = %.preheader55
  %.not54 = icmp eq i32 %.04067, 0
  br i1 %.not54, label %65, label %63

63:                                               ; preds = %62
  %64 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %.03968, i32 noundef %61)
  br label %65

65:                                               ; preds = %62, %63, %.preheader55
  %.143 = phi i32 [ 1, %63 ], [ %.04266, %.preheader55 ], [ 1, %62 ]
  %.141 = phi i32 [ 1, %63 ], [ %.04067, %.preheader55 ], [ 1, %62 ]
  %.1 = phi i32 [ %64, %63 ], [ %.03968, %.preheader55 ], [ %61, %62 ]
  %indvars.iv.next83 = add nsw i64 %indvars.iv82, -1
  %.not85 = icmp eq i64 %indvars.iv82, 0
  br i1 %.not85, label %58, label %.preheader55, !llvm.loop !11

._crit_edge74:                                    ; preds = %.lr.ph73, %.preheader
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
  br label %92

.lr.ph73:                                         ; preds = %.preheader, %.lr.ph73
  %.03772 = phi i32 [ %69, %.lr.ph73 ], [ 1, %.preheader ]
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.03772)
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %67, i8 noundef signext 32)
  %69 = add nuw nsw i32 %.03772, 1
  %70 = load i32, ptr %1, align 4, !tbaa !5
  %.not51.not = icmp slt i32 %.03772, %70
  br i1 %.not51.not, label %.lr.ph73, label %._crit_edge74, !llvm.loop !12

71:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %72 = sext i32 %.1 to i64
  invoke void @_Z8divisorsx(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %4, i64 noundef %72)
          to label %73 unwind label %79

73:                                               ; preds = %71
  %74 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %75 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  store ptr %75, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %76 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  store ptr %76, ptr %6, align 8
  %77 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %77, label %.lr.ph70, label %._crit_edge

._crit_edge:                                      ; preds = %86, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i8 noundef signext 10)
          to label %91 unwind label %93

79:                                               ; preds = %71
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %95

.lr.ph70:                                         ; preds = %73, %86
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %82)
          to label %84 unwind label %89

84:                                               ; preds = %.lr.ph70
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %83, i8 noundef signext 32)
          to label %86 unwind label %89

86:                                               ; preds = %84
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  %88 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br i1 %88, label %.lr.ph70, label %._crit_edge

89:                                               ; preds = %84, %.lr.ph70
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %95

91:                                               ; preds = %._crit_edge
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  br label %92

92:                                               ; preds = %91, %._crit_edge74
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void

93:                                               ; preds = %._crit_edge
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %95

95:                                               ; preds = %93, %89, %79
  %.pn = phi { ptr, i32 } [ %90, %89 ], [ %94, %93 ], [ %80, %79 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef, i32 noundef) local_unnamed_addr #1

; 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIiSaIiEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24), 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_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_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 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(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_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass