; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Ad Infinitum/Ad Infinitum 11 (A)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@num = external dso_local global [100000 x i32], align 16
@check = external dso_local global [100000 x i32], align 16
@tmp = external dso_local global i32, align 4
@flag = external dso_local global i32, align 4
@primes = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 4
  %5 = alloca %"struct.std::pair", 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 i32, align 4
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %18

18:                                               ; preds = %240, %136, %89, %0
  %19 = load i32, ptr @t, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr @t, align 4, !tbaa !5
  %21 = icmp ne i32 %19, 0
  br i1 %21, label %22, label %241

22:                                               ; preds = %18
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @n, ptr noundef @k)
  %24 = load i32, ptr @k, align 4, !tbaa !5
  store i32 %24, ptr @tmp, align 4, !tbaa !5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @primes) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %52, %22
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = mul nsw i32 %26, %27
  %29 = load i32, ptr @k, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %55

32:                                               ; preds = %25
  %33 = load i32, ptr @k, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = srem i32 %33, %34
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %51

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %43, %37
  %39 = load i32, ptr @k, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = srem i32 %39, %40
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %49

43:                                               ; preds = %38
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = load i32, ptr @k, align 4, !tbaa !5
  %46 = sdiv i32 %45, %44
  store i32 %46, ptr @k, align 4, !tbaa !5
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %3, align 4, !tbaa !5
  br label %38, !llvm.loop !9

49:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %50 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %50, ptr %4, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @primes, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %51

51:                                               ; preds = %49, %32
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !11

55:                                               ; preds = %31
  %56 = load i32, ptr @k, align 4, !tbaa !5
  %57 = icmp sgt i32 %56, 1
  br i1 %57, label %58, label %60

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !5
  %59 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @k, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i64 %59, ptr %5, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @primes, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %60

60:                                               ; preds = %58, %55
  %61 = load i32, ptr @tmp, align 4, !tbaa !5
  store i32 %61, ptr @k, align 4, !tbaa !5
  store i32 0, ptr @flag, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %83, %60
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp slt i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %86

67:                                               ; preds = %62
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %69
  %71 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %70)
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [100000 x i32], ptr @check, i64 0, i64 %73
  store i32 0, ptr %74, align 4, !tbaa !5
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = load i32, ptr @k, align 4, !tbaa !5
  %80 = icmp eq i32 %78, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %67
  store i32 1, ptr @flag, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %81, %67
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %7, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %7, align 4, !tbaa !5
  br label %62, !llvm.loop !12

86:                                               ; preds = %66
  %87 = load i32, ptr @flag, align 4, !tbaa !5
  %88 = icmp eq i32 %87, 1
  br i1 %88, label %89, label %91

89:                                               ; preds = %86
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %18, !llvm.loop !13

91:                                               ; preds = %86
  %92 = load i32, ptr @k, align 4, !tbaa !5
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %94, label %137

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %126, %94
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = load i32, ptr @n, align 4, !tbaa !5
  %98 = icmp slt i32 %96, %97
  br i1 %98, label %100, label %99

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

100:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %121, %100
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = icmp slt i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 15, ptr %9, align 4
  br label %124

106:                                              ; preds = %101
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = load i32, ptr %10, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %110, i32 noundef %114)
  %116 = icmp eq i32 %115, 1
  br i1 %116, label %117, label %120

117:                                              ; preds = %106
  store i32 1, ptr @flag, align 4, !tbaa !5
  %118 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %118, ptr %8, align 4, !tbaa !5
  %119 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %119, ptr %10, align 4, !tbaa !5
  store i32 15, ptr %9, align 4
  br label %124

120:                                              ; preds = %106
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %10, align 4, !tbaa !5
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %10, align 4, !tbaa !5
  br label %101, !llvm.loop !14

124:                                              ; preds = %117, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  %127 = load i32, ptr %8, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %8, align 4, !tbaa !5
  br label %95, !llvm.loop !15

129:                                              ; preds = %99
  %130 = load i32, ptr @flag, align 4, !tbaa !5
  %131 = icmp eq i32 %130, 1
  br i1 %131, label %132, label %134

132:                                              ; preds = %129
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %136

134:                                              ; preds = %129
  %135 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %136

136:                                              ; preds = %134, %132
  br label %18, !llvm.loop !13

137:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %197, %137
  %139 = load i32, ptr %11, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @primes) #5
  %142 = icmp ult i64 %140, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %138
  store i32 18, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %200

144:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %145 = load i32, ptr %11, align 4, !tbaa !5
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @primes, i64 noundef %146) #5
  %148 = getelementptr inbounds %"struct.std::pair", ptr %147, i32 0, i32 0
  %149 = load i32, ptr %148, align 4, !tbaa !16
  store i32 %149, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %193, %144
  %151 = load i32, ptr %14, align 4, !tbaa !5
  %152 = load i32, ptr @n, align 4, !tbaa !5
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %150
  store i32 21, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %196

155:                                              ; preds = %150
  %156 = load i32, ptr %11, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [100000 x i32], ptr @check, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %192

161:                                              ; preds = %155
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %170, %161
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = srem i32 %166, %167
  %169 = icmp eq i32 %168, 0
  br i1 %169, label %170, label %179

170:                                              ; preds = %162
  %171 = load i32, ptr %12, align 4, !tbaa !5
  %172 = load i32, ptr %14, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = sdiv i32 %175, %171
  store i32 %176, ptr %174, align 4, !tbaa !5
  %177 = load i32, ptr %13, align 4, !tbaa !5
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %13, align 4, !tbaa !5
  br label %162, !llvm.loop !18

179:                                              ; preds = %162
  %180 = load i32, ptr %13, align 4, !tbaa !5
  %181 = load i32, ptr %11, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @primes, i64 noundef %182) #5
  %184 = getelementptr inbounds %"struct.std::pair", ptr %183, i32 0, i32 1
  %185 = load i32, ptr %184, align 4, !tbaa !19
  %186 = icmp eq i32 %180, %185
  br i1 %186, label %187, label %191

187:                                              ; preds = %179
  %188 = load i32, ptr %11, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [100000 x i32], ptr @check, i64 0, i64 %189
  store i32 1, ptr %190, align 4, !tbaa !5
  br label %191

191:                                              ; preds = %187, %179
  br label %192

192:                                              ; preds = %191, %155
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %14, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %14, align 4, !tbaa !5
  br label %150, !llvm.loop !20

196:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %11, align 4, !tbaa !5
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %11, align 4, !tbaa !5
  br label %138, !llvm.loop !21

200:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %201

201:                                              ; preds = %229, %200
  %202 = load i32, ptr %16, align 4, !tbaa !5
  %203 = load i32, ptr @n, align 4, !tbaa !5
  %204 = icmp slt i32 %202, %203
  br i1 %204, label %206, label %205

205:                                              ; preds = %201
  store i32 26, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %232

206:                                              ; preds = %201
  %207 = load i32, ptr %16, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [100000 x i32], ptr @check, i64 0, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = icmp eq i32 %210, 1
  br i1 %211, label %212, label %228

212:                                              ; preds = %206
  %213 = load i32, ptr %15, align 4, !tbaa !5
  %214 = icmp eq i32 %213, 0
  br i1 %214, label %215, label %220

215:                                              ; preds = %212
  %216 = load i32, ptr %16, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  store i32 %219, ptr %15, align 4, !tbaa !5
  br label %227

220:                                              ; preds = %212
  %221 = load i32, ptr %15, align 4, !tbaa !5
  %222 = load i32, ptr %16, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %221, i32 noundef %225)
  store i32 %226, ptr %15, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %220, %215
  br label %228

228:                                              ; preds = %227, %206
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %16, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %16, align 4, !tbaa !5
  br label %201, !llvm.loop !22

232:                                              ; preds = %205
  %233 = load i32, ptr %15, align 4, !tbaa !5
  %234 = load i32, ptr @k, align 4, !tbaa !5
  %235 = icmp eq i32 %233, %234
  br i1 %235, label %236, label %238

236:                                              ; preds = %232
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %240

238:                                              ; preds = %232
  %239 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %240

240:                                              ; preds = %238, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %18, !llvm.loop !13

241:                                              ; preds = %18
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

; 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 dso_local i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

declare i32 @printf(ptr noundef, ...) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!18 = distinct !{!18, !10}
!19 = !{!17, !6, i64 4}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@num = external dso_local global [100000 x i32], align 16
@check = external dso_local local_unnamed_addr global [100000 x i32], align 16
@tmp = external dso_local local_unnamed_addr global i32, align 4
@flag = external dso_local local_unnamed_addr global i32, align 4
@primes = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %7 = load i32, ptr @t, align 4, !tbaa !5
  %8 = add nsw i32 %7, -1
  store i32 %8, ptr @t, align 4, !tbaa !5
  %.not82 = icmp eq i32 %7, 0
  br i1 %.not82, label %._crit_edge85, label %.lr.ph84

.lr.ph84:                                         ; preds = %0, %.backedge
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @n, ptr noundef nonnull @k)
  %10 = load i32, ptr @k, align 4, !tbaa !5
  store i32 %10, ptr @tmp, align 4, !tbaa !5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @primes) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 2, ptr %1, align 4, !tbaa !5
  %11 = load i32, ptr @k, align 4, !tbaa !5
  %.not4452 = icmp slt i32 %11, 4
  br i1 %.not4452, label %._crit_edge56, label %.lr.ph55

._crit_edge56:                                    ; preds = %23, %.lr.ph84
  %.lcssa = phi i32 [ %11, %.lr.ph84 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %12 = icmp sgt i32 %.lcssa, 1
  br i1 %12, label %28, label %30

.lr.ph55:                                         ; preds = %.lr.ph84, %23
  %13 = phi i32 [ %24, %23 ], [ %11, %.lr.ph84 ]
  %storemerge53 = phi i32 [ %26, %23 ], [ 2, %.lr.ph84 ]
  %14 = srem i32 %13, %storemerge53
  %15 = icmp eq i32 %14, 0
  br i1 %15, label %.lr.ph.preheader, label %23

.lr.ph.preheader:                                 ; preds = %.lr.ph55
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %storemerge4550 = phi i32 [ %18, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %16 = phi i32 [ %17, %.lr.ph ], [ %13, %.lr.ph.preheader ]
  %17 = sdiv i32 %16, %storemerge53
  %18 = add nuw nsw i32 %storemerge4550, 1
  %19 = srem i32 %17, %storemerge53
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %.lr.ph, label %21, !llvm.loop !9

21:                                               ; preds = %.lr.ph
  store i32 %17, ptr @k, align 4, !tbaa !5
  store i32 %18, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %22 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %22, ptr %3, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @primes, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %.pre107 = load i32, ptr @k, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %.lr.ph55, %21
  %24 = phi i32 [ %13, %.lr.ph55 ], [ %.pre107, %21 ]
  %25 = phi i32 [ %storemerge53, %.lr.ph55 ], [ %.pre, %21 ]
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %1, align 4, !tbaa !5
  %27 = mul nsw i32 %26, %26
  %.not44 = icmp sgt i32 %27, %24
  br i1 %.not44, label %._crit_edge56, label %.lr.ph55, !llvm.loop !11

28:                                               ; preds = %._crit_edge56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  %29 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @k, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %29, ptr %4, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @primes, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %30

30:                                               ; preds = %28, %._crit_edge56
  %31 = load i32, ptr @tmp, align 4, !tbaa !5
  store i32 %31, ptr @k, align 4, !tbaa !5
  store i32 0, ptr @flag, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph60, label %._crit_edge61.thread

._crit_edge61:                                    ; preds = %42
  %.pre108 = load i32, ptr @flag, align 4, !tbaa !5
  %34 = icmp eq i32 %.pre108, 1
  br i1 %34, label %.backedge, label %._crit_edge61.thread

.lr.ph60:                                         ; preds = %30, %42
  %indvars.iv = phi i64 [ %indvars.iv.next, %42 ], [ 0, %30 ]
  %35 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %indvars.iv
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %35)
  %37 = getelementptr inbounds [100000 x i32], ptr @check, i64 0, i64 %indvars.iv
  store i32 0, ptr %37, align 4, !tbaa !5
  %38 = load i32, ptr %35, align 4, !tbaa !5
  %39 = load i32, ptr @k, align 4, !tbaa !5
  %40 = icmp eq i32 %38, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %.lr.ph60
  store i32 1, ptr @flag, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %.lr.ph60, %41
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next, %44
  br i1 %45, label %.lr.ph60, label %._crit_edge61, !llvm.loop !12

.backedge:                                        ; preds = %._crit_edge61, %._crit_edge76, %._crit_edge81, %._crit_edge81.thread
  %.str.3.sink = phi ptr [ @.str.4, %._crit_edge81.thread ], [ @.str.3, %._crit_edge81 ], [ %.str.3..str.4, %._crit_edge76 ], [ @.str.3, %._crit_edge61 ]
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink)
  %47 = load i32, ptr @t, align 4, !tbaa !5
  %48 = add nsw i32 %47, -1
  store i32 %48, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %47, 0
  br i1 %.not, label %._crit_edge85, label %.lr.ph84, !llvm.loop !13

._crit_edge61.thread:                             ; preds = %30, %._crit_edge61
  %49 = phi i32 [ %39, %._crit_edge61 ], [ %31, %30 ]
  %50 = phi i32 [ %43, %._crit_edge61 ], [ %32, %30 ]
  %51 = icmp eq i32 %49, 1
  br i1 %51, label %.preheader47, label %.preheader49

.preheader49:                                     ; preds = %._crit_edge61.thread
  %52 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @primes) #5
  %.not86 = icmp eq i64 %52, 0
  br i1 %.not86, label %.preheader48, label %.lr.ph72

.preheader47:                                     ; preds = %._crit_edge61.thread
  %53 = icmp sgt i32 %50, 1
  br i1 %53, label %.preheader46, label %._crit_edge81.thread

.preheader46:                                     ; preds = %.preheader47, %.loopexit
  %54 = phi i32 [ %68, %.loopexit ], [ %50, %.preheader47 ]
  %.04080 = phi i32 [ %69, %.loopexit ], [ 1, %.preheader47 ]
  %55 = icmp sgt i32 %.04080, 0
  br i1 %55, label %.lr.ph79, label %.loopexit

.lr.ph79:                                         ; preds = %.preheader46
  %56 = zext nneg i32 %.04080 to i64
  %57 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %56
  br label %60

._crit_edge81:                                    ; preds = %.loopexit
  %.pre111 = load i32, ptr @flag, align 4, !tbaa !5
  %58 = icmp eq i32 %.pre111, 1
  br i1 %58, label %.backedge, label %._crit_edge81.thread

59:                                               ; preds = %60
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next104, %56
  br i1 %exitcond.not, label %.loopexit.loopexit, label %60, !llvm.loop !14

60:                                               ; preds = %.lr.ph79, %59
  %indvars.iv103 = phi i64 [ 0, %.lr.ph79 ], [ %indvars.iv.next104, %59 ]
  %61 = load i32, ptr %57, align 4, !tbaa !5
  %62 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %indvars.iv103
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %61, i32 noundef %63)
  %65 = icmp eq i32 %64, 1
  br i1 %65, label %66, label %59

66:                                               ; preds = %60
  store i32 1, ptr @flag, align 4, !tbaa !5
  %67 = load i32, ptr @n, align 4, !tbaa !5
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %59
  %.pre110 = load i32, ptr @n, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.preheader46, %66
  %68 = phi i32 [ %67, %66 ], [ %54, %.preheader46 ], [ %.pre110, %.loopexit.loopexit ]
  %.141 = phi i32 [ %67, %66 ], [ %.04080, %.preheader46 ], [ %.04080, %.loopexit.loopexit ]
  %69 = add nsw i32 %.141, 1
  %70 = icmp slt i32 %69, %68
  br i1 %70, label %.preheader46, label %._crit_edge81, !llvm.loop !15

._crit_edge81.thread:                             ; preds = %.preheader47, %._crit_edge81
  br label %.backedge

.preheader48:                                     ; preds = %._crit_edge70, %.preheader49
  %71 = load i32, ptr @n, align 4, !tbaa !5
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph75, label %._crit_edge76

.lr.ph72:                                         ; preds = %.preheader49, %._crit_edge70
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %._crit_edge70 ], [ 0, %.preheader49 ]
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @primes, i64 noundef %indvars.iv97) #5
  %74 = load i32, ptr %73, align 4, !tbaa !16
  %75 = load i32, ptr @n, align 4, !tbaa !5
  %76 = icmp sgt i32 %75, 0
  br i1 %76, label %.lr.ph69, label %._crit_edge70

.lr.ph69:                                         ; preds = %.lr.ph72
  %77 = getelementptr inbounds [100000 x i32], ptr @check, i64 0, i64 %indvars.iv97
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %.lr.ph69.split, label %._crit_edge70

._crit_edge70:                                    ; preds = %98, %.lr.ph69, %.lr.ph72
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %80 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @primes) #5
  %81 = icmp ugt i64 %80, %indvars.iv.next98
  br i1 %81, label %.lr.ph72, label %.preheader48, !llvm.loop !18

.lr.ph69.splitthread-pre-split:                   ; preds = %98
  %.pr = load i32, ptr %77, align 4, !tbaa !5
  br label %.lr.ph69.split

.lr.ph69.split:                                   ; preds = %.lr.ph69, %.lr.ph69.splitthread-pre-split
  %82 = phi i32 [ %.pr, %.lr.ph69.splitthread-pre-split ], [ 0, %.lr.ph69 ]
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %.lr.ph69.splitthread-pre-split ], [ 0, %.lr.ph69 ]
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %.preheader, label %98

.preheader:                                       ; preds = %.lr.ph69.split
  %84 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %indvars.iv94
  %.promoted = load i32, ptr %84, align 4, !tbaa !5
  %85 = srem i32 %.promoted, %74
  %86 = icmp eq i32 %85, 0
  br i1 %86, label %.lr.ph63, label %92

.lr.ph63:                                         ; preds = %.preheader, %.lr.ph63
  %.03662 = phi i32 [ %89, %.lr.ph63 ], [ 0, %.preheader ]
  %87 = phi i32 [ %88, %.lr.ph63 ], [ %.promoted, %.preheader ]
  %88 = sdiv i32 %87, %74
  %89 = add nuw nsw i32 %.03662, 1
  %90 = srem i32 %88, %74
  %91 = icmp eq i32 %90, 0
  br i1 %91, label %.lr.ph63, label %._crit_edge64, !llvm.loop !19

._crit_edge64:                                    ; preds = %.lr.ph63
  store i32 %88, ptr %84, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %._crit_edge64, %.preheader
  %.036.lcssa = phi i32 [ %89, %._crit_edge64 ], [ 0, %.preheader ]
  %93 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) @primes, i64 noundef %indvars.iv97) #5
  %94 = getelementptr inbounds i8, ptr %93, i64 4
  %95 = load i32, ptr %94, align 4, !tbaa !20
  %96 = icmp eq i32 %.036.lcssa, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %92
  store i32 1, ptr %77, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %.lr.ph69.split, %97, %92
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %99 = load i32, ptr @n, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = icmp slt i64 %indvars.iv.next95, %100
  br i1 %101, label %.lr.ph69.splitthread-pre-split, label %._crit_edge70, !llvm.loop !21

._crit_edge76:                                    ; preds = %114, %.preheader48
  %.034.lcssa = phi i32 [ 0, %.preheader48 ], [ %.1, %114 ]
  %102 = load i32, ptr @k, align 4, !tbaa !5
  %103 = icmp eq i32 %.034.lcssa, %102
  %.str.3..str.4 = select i1 %103, ptr @.str.3, ptr @.str.4
  br label %.backedge

.lr.ph75:                                         ; preds = %.preheader48, %114
  %104 = phi i32 [ %115, %114 ], [ %71, %.preheader48 ]
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %114 ], [ 0, %.preheader48 ]
  %.03473 = phi i32 [ %.1, %114 ], [ 0, %.preheader48 ]
  %105 = getelementptr inbounds [100000 x i32], ptr @check, i64 0, i64 %indvars.iv100
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = icmp eq i32 %106, 1
  br i1 %107, label %108, label %114

108:                                              ; preds = %.lr.ph75
  %109 = icmp eq i32 %.03473, 0
  %110 = getelementptr inbounds [100000 x i32], ptr @num, i64 0, i64 %indvars.iv100
  %111 = load i32, ptr %110, align 4, !tbaa !5
  br i1 %109, label %114, label %112

112:                                              ; preds = %108
  %113 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %.03473, i32 noundef %111)
  %.pre109 = load i32, ptr @n, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %108, %.lr.ph75, %112
  %115 = phi i32 [ %.pre109, %112 ], [ %104, %.lr.ph75 ], [ %104, %108 ]
  %.1 = phi i32 [ %113, %112 ], [ %.03473, %.lr.ph75 ], [ %111, %108 ]
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %116 = sext i32 %115 to i64
  %117 = icmp slt i64 %indvars.iv.next101, %116
  br i1 %117, label %.lr.ph75, label %._crit_edge76, !llvm.loop !23

._crit_edge85:                                    ; preds = %.backedge, %0
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress 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 = { 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 = !{!17, !6, i64 0}
!17 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = !{!17, !6, i64 4}
!21 = distinct !{!21, !10, !22}
!22 = !{!"llvm.loop.unswitch.partial.disable"}
!23 = distinct !{!23, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass