; LLVM IR from tangjz/acm-icpc :: uvalive (7343)

; 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"

@fact = external dso_local global [100001 x i32], align 16
@iact = external dso_local global [100001 x i32], align 16
@w = external dso_local global [131072 x i32], align 16
@inv2 = external dso_local global [18 x i32], align 16
@cnt = external dso_local global [2 x [2 x i32]], align 16
@sz = external dso_local global [2 x i32], align 4
@f = external dso_local global [2 x [131072 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca 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 i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  store i32 1, ptr @w, align 16, !tbaa !5
  %19 = call noundef i32 @_Z7mod_powii(i32 noundef 3, i32 noundef 56)
  store i32 %19, ptr getelementptr inbounds ([131072 x i32], ptr @w, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %20

20:                                               ; preds = %39, %0
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 131072
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %42

24:                                               ; preds = %20
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sub nsw i32 %25, 1
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [131072 x i32], ptr @w, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = load i32, ptr getelementptr inbounds ([131072 x i32], ptr @w, i64 0, i64 1), align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = mul nsw i64 %30, %32
  %34 = srem i64 %33, 7340033
  %35 = trunc i64 %34 to i32
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [131072 x i32], ptr @w, i64 0, i64 %37
  store i32 %35, ptr %38, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %24
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %2, align 4, !tbaa !5
  br label %20, !llvm.loop !9

42:                                               ; preds = %23
  store i32 1, ptr @inv2, align 16, !tbaa !5
  store i32 3670017, ptr getelementptr inbounds ([18 x i32], ptr @inv2, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 2, ptr %3, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %62, %42
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = icmp sle i32 %44, 17
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %65

47:                                               ; preds = %43
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = sub nsw i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [18 x i32], ptr @inv2, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = load i32, ptr getelementptr inbounds ([18 x i32], ptr @inv2, i64 0, i64 1), align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = mul nsw i64 %53, %55
  %57 = srem i64 %56, 7340033
  %58 = trunc i64 %57 to i32
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [18 x i32], ptr @inv2, i64 0, i64 %60
  store i32 %58, ptr %61, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %47
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %3, align 4, !tbaa !5
  br label %43, !llvm.loop !11

65:                                               ; preds = %46
  store i32 1, ptr getelementptr inbounds ([100001 x i32], ptr @iact, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 2, ptr %4, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %87, %65
  %67 = load i32, ptr %4, align 4, !tbaa !5
  %68 = icmp slt i32 %67, 100001
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %90

70:                                               ; preds = %66
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = sdiv i32 7340033, %71
  %73 = sext i32 %72 to i64
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = srem i32 7340033, %74
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = mul nsw i64 %73, %79
  %81 = srem i64 %80, 7340033
  %82 = trunc i64 %81 to i32
  %83 = sub nsw i32 7340033, %82
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %85
  store i32 %83, ptr %86, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %70
  %88 = load i32, ptr %4, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %4, align 4, !tbaa !5
  br label %66, !llvm.loop !12

90:                                               ; preds = %69
  store i32 1, ptr @iact, align 16, !tbaa !5
  store i32 1, ptr @fact, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %127, %90
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = icmp slt i32 %92, 100001
  br i1 %93, label %95, label %94

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

95:                                               ; preds = %91
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [100001 x i32], ptr @fact, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = mul nsw i64 %101, %103
  %105 = srem i64 %104, 7340033
  %106 = trunc i64 %105 to i32
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100001 x i32], ptr @fact, i64 0, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = sub nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = mul nsw i64 %115, %120
  %122 = srem i64 %121, 7340033
  %123 = trunc i64 %122 to i32
  %124 = load i32, ptr %5, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %125
  store i32 %123, ptr %126, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %95
  %128 = load i32, ptr %5, align 4, !tbaa !5
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %5, align 4, !tbaa !5
  br label %91, !llvm.loop !13

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

132:                                              ; preds = %311, %130
  %133 = load i32, ptr %7, align 4, !tbaa !5
  %134 = load i32, ptr %6, align 4, !tbaa !5
  %135 = icmp sle i32 %133, %134
  br i1 %135, label %137, label %136

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

137:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %138 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 16 @cnt, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %156, %137
  %140 = load i32, ptr %10, align 4, !tbaa !5
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = icmp slt i32 %140, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %139
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %159

144:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %145 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %11, ptr noundef %12)
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = icmp slt i32 %146, 0
  %148 = zext i1 %147 to i64
  %149 = getelementptr inbounds [2 x [2 x i32]], ptr @cnt, i64 0, i64 %148
  %150 = load i32, ptr %12, align 4, !tbaa !5
  %151 = icmp slt i32 %150, 0
  %152 = zext i1 %151 to i64
  %153 = getelementptr inbounds [2 x i32], ptr %149, i64 0, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !5
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %153, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %156

156:                                              ; preds = %144
  %157 = load i32, ptr %10, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %10, align 4, !tbaa !5
  br label %139, !llvm.loop !14

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

160:                                              ; preds = %177, %159
  %161 = load i32, ptr %13, align 4, !tbaa !5
  %162 = icmp slt i32 %161, 2
  br i1 %162, label %164, label %163

163:                                              ; preds = %160
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %180

164:                                              ; preds = %160
  %165 = load i32, ptr %13, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [2 x i32], ptr @cnt, i64 0, i64 %166
  %168 = load i32, ptr %13, align 4, !tbaa !5
  %169 = xor i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [2 x i32], ptr getelementptr inbounds ([2 x [2 x i32]], ptr @cnt, i64 0, i64 1), i64 0, i64 %170
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %167, ptr noundef nonnull align 4 dereferenceable(4) %171)
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = load i32, ptr %13, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [2 x i32], ptr @sz, i64 0, i64 %175
  store i32 %173, ptr %176, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %164
  %178 = load i32, ptr %13, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %13, align 4, !tbaa !5
  br label %160, !llvm.loop !15

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

181:                                              ; preds = %188, %180
  %182 = load i32, ptr %14, align 4, !tbaa !5
  %183 = load i32, ptr @sz, align 4, !tbaa !5
  %184 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @sz, i64 0, i64 1), align 4, !tbaa !5
  %185 = add nsw i32 %183, %184
  %186 = icmp sle i32 %182, %185
  br i1 %186, label %187, label %191

187:                                              ; preds = %181
  br label %188

188:                                              ; preds = %187
  %189 = load i32, ptr %14, align 4, !tbaa !5
  %190 = shl i32 %189, 1
  store i32 %190, ptr %14, align 4, !tbaa !5
  br label %181, !llvm.loop !16

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

192:                                              ; preds = %241, %191
  %193 = load i32, ptr %15, align 4, !tbaa !5
  %194 = icmp slt i32 %193, 2
  br i1 %194, label %196, label %195

195:                                              ; preds = %192
  store i32 26, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %244

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

197:                                              ; preds = %237, %196
  %198 = load i32, ptr %16, align 4, !tbaa !5
  %199 = load i32, ptr %14, align 4, !tbaa !5
  %200 = icmp slt i32 %198, %199
  br i1 %200, label %202, label %201

201:                                              ; preds = %197
  store i32 29, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %240

202:                                              ; preds = %197
  %203 = load i32, ptr %16, align 4, !tbaa !5
  %204 = load i32, ptr %15, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [2 x i32], ptr @sz, i64 0, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = icmp sle i32 %203, %207
  br i1 %208, label %209, label %227

209:                                              ; preds = %202
  %210 = load i32, ptr %15, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [2 x i32], ptr @cnt, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = load i32, ptr %16, align 4, !tbaa !5
  %215 = call noundef i32 @_Z1Cii(i32 noundef %213, i32 noundef %214)
  %216 = sext i32 %215 to i64
  %217 = load i32, ptr %15, align 4, !tbaa !5
  %218 = xor i32 %217, 1
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [2 x i32], ptr getelementptr inbounds ([2 x [2 x i32]], ptr @cnt, i64 0, i64 1), i64 0, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !5
  %222 = load i32, ptr %16, align 4, !tbaa !5
  %223 = call noundef i32 @_Z1Cii(i32 noundef %221, i32 noundef %222)
  %224 = sext i32 %223 to i64
  %225 = mul nsw i64 %216, %224
  %226 = srem i64 %225, 7340033
  br label %228

227:                                              ; preds = %202
  br label %228

228:                                              ; preds = %227, %209
  %229 = phi i64 [ %226, %209 ], [ 0, %227 ]
  %230 = trunc i64 %229 to i32
  %231 = load i32, ptr %15, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [2 x [131072 x i32]], ptr @f, i64 0, i64 %232
  %234 = load i32, ptr %16, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [131072 x i32], ptr %233, i64 0, i64 %235
  store i32 %230, ptr %236, align 4, !tbaa !5
  br label %237

237:                                              ; preds = %228
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %16, align 4, !tbaa !5
  br label %197, !llvm.loop !17

240:                                              ; preds = %201
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %15, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %15, align 4, !tbaa !5
  br label %192, !llvm.loop !18

244:                                              ; preds = %195
  %245 = load i32, ptr %14, align 4, !tbaa !5
  call void @_Z3NTTiPii(i32 noundef %245, ptr noundef @f, i32 noundef 1)
  %246 = load i32, ptr %14, align 4, !tbaa !5
  call void @_Z3NTTiPii(i32 noundef %246, ptr noundef getelementptr inbounds ([2 x [131072 x i32]], ptr @f, i64 0, i64 1), i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %247

247:                                              ; preds = %269, %244
  %248 = load i32, ptr %17, align 4, !tbaa !5
  %249 = load i32, ptr %14, align 4, !tbaa !5
  %250 = icmp slt i32 %248, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %247
  store i32 32, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %272

252:                                              ; preds = %247
  %253 = load i32, ptr %17, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [131072 x i32], ptr @f, i64 0, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = load i32, ptr %17, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [131072 x i32], ptr getelementptr inbounds ([2 x [131072 x i32]], ptr @f, i64 0, i64 1), i64 0, i64 %259
  %261 = load i32, ptr %260, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = mul nsw i64 %257, %262
  %264 = srem i64 %263, 7340033
  %265 = trunc i64 %264 to i32
  %266 = load i32, ptr %17, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [131072 x i32], ptr @f, i64 0, i64 %267
  store i32 %265, ptr %268, align 4, !tbaa !5
  br label %269

269:                                              ; preds = %252
  %270 = load i32, ptr %17, align 4, !tbaa !5
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %17, align 4, !tbaa !5
  br label %247, !llvm.loop !19

272:                                              ; preds = %251
  %273 = load i32, ptr %14, align 4, !tbaa !5
  call void @_Z3NTTiPii(i32 noundef %273, ptr noundef @f, i32 noundef -1)
  %274 = load i32, ptr %7, align 4, !tbaa !5
  %275 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %274)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %276

276:                                              ; preds = %307, %272
  %277 = load i32, ptr %18, align 4, !tbaa !5
  %278 = load i32, ptr %9, align 4, !tbaa !5
  %279 = icmp sle i32 %277, %278
  br i1 %279, label %281, label %280

280:                                              ; preds = %276
  store i32 35, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %310

281:                                              ; preds = %276
  %282 = load i32, ptr %18, align 4, !tbaa !5
  %283 = and i32 %282, 1
  %284 = icmp ne i32 %283, 0
  br i1 %284, label %290, label %285

285:                                              ; preds = %281
  %286 = load i32, ptr %18, align 4, !tbaa !5
  %287 = ashr i32 %286, 1
  %288 = load i32, ptr %14, align 4, !tbaa !5
  %289 = icmp sge i32 %287, %288
  br i1 %289, label %290, label %291

290:                                              ; preds = %285, %281
  br label %297

291:                                              ; preds = %285
  %292 = load i32, ptr %18, align 4, !tbaa !5
  %293 = ashr i32 %292, 1
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [131072 x i32], ptr @f, i64 0, i64 %294
  %296 = load i32, ptr %295, align 4, !tbaa !5
  br label %297

297:                                              ; preds = %291, %290
  %298 = phi i32 [ 0, %290 ], [ %296, %291 ]
  %299 = load i32, ptr %18, align 4, !tbaa !5
  %300 = load i32, ptr %9, align 4, !tbaa !5
  %301 = icmp eq i32 %299, %300
  %302 = zext i1 %301 to i64
  %303 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %302
  %304 = load i8, ptr %303, align 1, !tbaa !20
  %305 = sext i8 %304 to i32
  %306 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %298, i32 noundef %305)
  br label %307

307:                                              ; preds = %297
  %308 = load i32, ptr %18, align 4, !tbaa !5
  %309 = add nsw i32 %308, 1
  store i32 %309, ptr %18, align 4, !tbaa !5
  br label %276, !llvm.loop !21

310:                                              ; preds = %280
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %311

311:                                              ; preds = %310
  %312 = load i32, ptr %7, align 4, !tbaa !5
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %7, align 4, !tbaa !5
  br label %132, !llvm.loop !22

314:                                              ; preds = %136
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %315 = load i32, ptr %1, align 4
  ret i32 %315
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z3NTTiPii(i32 noundef, ptr noundef, i32 noundef) #5

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

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 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #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 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = !{!7, !7, i64 0}
!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"

@fact = external dso_local local_unnamed_addr global [100001 x i32], align 16
@iact = external dso_local local_unnamed_addr global [100001 x i32], align 16
@w = external dso_local local_unnamed_addr global [131072 x i32], align 16
@inv2 = external dso_local local_unnamed_addr global [18 x i32], align 16
@cnt = external dso_local global [2 x [2 x i32]], align 16
@sz = external dso_local local_unnamed_addr global [2 x i32], align 4
@f = external dso_local global [2 x [131072 x i32]], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  store i32 1, ptr @w, align 16, !tbaa !5
  %5 = tail call noundef i32 @_Z7mod_powii(i32 noundef 3, i32 noundef 56)
  store i32 %5, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !5
  br label %7

6:                                                ; preds = %7
  store <4 x i32> <i32 1, i32 3670017, i32 5505025, i32 6422529>, ptr @inv2, align 16, !tbaa !5
  store <4 x i32> <i32 6881281, i32 7110657, i32 7225345, i32 7282689>, ptr getelementptr inbounds (i8, ptr @inv2, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 7311361, i32 7325697, i32 7332865, i32 7336449>, ptr getelementptr inbounds (i8, ptr @inv2, i64 32), align 16, !tbaa !5
  store <4 x i32> <i32 7338241, i32 7339137, i32 7339585, i32 7339809>, ptr getelementptr inbounds (i8, ptr @inv2, i64 48), align 16, !tbaa !5
  store i32 7339921, ptr getelementptr inbounds (i8, ptr @inv2, i64 64), align 16, !tbaa !5
  store i32 7339977, ptr getelementptr inbounds (i8, ptr @inv2, i64 68), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @iact, i64 4), align 4, !tbaa !5
  br label %23

7:                                                ; preds = %7, %0
  %8 = phi i32 [ %5, %0 ], [ %20, %7 ]
  %indvars.iv = phi i64 [ 2, %0 ], [ %indvars.iv.next.1, %7 ]
  %9 = sext i32 %8 to i64
  %10 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %12 = mul nsw i64 %11, %9
  %13 = srem i64 %12, 7340033
  %14 = trunc nsw i64 %13 to i32
  %15 = getelementptr inbounds [131072 x i32], ptr @w, i64 0, i64 %indvars.iv
  store i32 %14, ptr %15, align 8, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @w, i64 4), align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = mul nsw i64 %13, %17
  %19 = srem i64 %18, 7340033
  %20 = trunc nsw i64 %19 to i32
  %21 = getelementptr inbounds [131072 x i32], ptr @w, i64 0, i64 %indvars.iv.next
  store i32 %20, ptr %21, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 131072
  br i1 %exitcond.not.1, label %6, label %7, !llvm.loop !9

22:                                               ; preds = %23
  store i32 1, ptr @iact, align 16, !tbaa !5
  store i32 1, ptr @fact, align 16, !tbaa !5
  br label %40

23:                                               ; preds = %6, %23
  %indvars.iv111 = phi i64 [ 2, %6 ], [ %indvars.iv.next112, %23 ]
  %24 = trunc nuw nsw i64 %indvars.iv111 to i32
  %25 = udiv i32 7340033, %24
  %26 = zext nneg i32 %25 to i64
  %27 = urem i32 7340033, %24
  %28 = zext nneg i32 %27 to i64
  %29 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = mul nsw i64 %31, %26
  %33 = srem i64 %32, 7340033
  %34 = trunc nsw i64 %33 to i32
  %35 = sub nsw i32 7340033, %34
  %36 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %indvars.iv111
  store i32 %35, ptr %36, align 4, !tbaa !5
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond114.not = icmp eq i64 %indvars.iv.next112, 100001
  br i1 %exitcond114.not, label %22, label %23, !llvm.loop !11

37:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %39 = load i32, ptr %1, align 4, !tbaa !5
  %.not100 = icmp slt i32 %39, 1
  br i1 %.not100, label %._crit_edge104, label %.lr.ph103

40:                                               ; preds = %22, %40
  %41 = phi i64 [ 1, %22 ], [ %51, %40 ]
  %42 = phi i64 [ 1, %22 ], [ %44, %40 ]
  %indvars.iv115 = phi i64 [ 1, %22 ], [ %indvars.iv.next116, %40 ]
  %43 = mul nsw i64 %42, %indvars.iv115
  %44 = srem i64 %43, 7340033
  %45 = trunc nsw i64 %44 to i32
  %46 = getelementptr inbounds [100001 x i32], ptr @fact, i64 0, i64 %indvars.iv115
  store i32 %45, ptr %46, align 4, !tbaa !5
  %47 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %indvars.iv115
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = mul nsw i64 %41, %49
  %51 = srem i64 %50, 7340033
  %52 = trunc nsw i64 %51 to i32
  store i32 %52, ptr %47, align 4, !tbaa !5
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %exitcond118.not = icmp eq i64 %indvars.iv.next116, 100001
  br i1 %exitcond118.not, label %37, label %40, !llvm.loop !12

._crit_edge104:                                   ; preds = %._crit_edge99, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph103:                                        ; preds = %37, %._crit_edge99
  %.069101 = phi i32 [ %142, %._crit_edge99 ], [ 1, %37 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %53 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %2)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) @cnt, i8 0, i64 16, i1 false)
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph, label %.preheader83

.preheader83:                                     ; preds = %.lr.ph, %.lr.ph103
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @cnt, ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 12))
  %57 = load i32, ptr %56, align 4, !tbaa !5
  store i32 %57, ptr @sz, align 4, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 4), ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @cnt, i64 8))
  %59 = load i32, ptr %58, align 4, !tbaa !5
  store i32 %59, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  %60 = load i32, ptr @sz, align 4, !tbaa !5
  %61 = add nsw i32 %59, %60
  br label %73

.lr.ph:                                           ; preds = %.lr.ph103, %.lr.ph
  %.06888 = phi i32 [ %70, %.lr.ph ], [ 0, %.lr.ph103 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %.lobit = lshr i32 %63, 31
  %64 = zext nneg i32 %.lobit to i64
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %.lobit80 = lshr i32 %65, 31
  %66 = zext nneg i32 %.lobit80 to i64
  %67 = getelementptr inbounds [2 x [2 x i32]], ptr @cnt, i64 0, i64 %64, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %67, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %70 = add nuw nsw i32 %.06888, 1
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %.lr.ph, label %.preheader83, !llvm.loop !13

73:                                               ; preds = %73, %.preheader83
  %.066 = phi i32 [ %74, %73 ], [ 1, %.preheader83 ]
  %.not75 = icmp sgt i32 %.066, %61
  %74 = shl i32 %.066, 1
  br i1 %.not75, label %.preheader81, label %73, !llvm.loop !14

.preheader81:                                     ; preds = %73
  %75 = icmp sgt i32 %.066, 0
  br i1 %75, label %.preheader.us.preheader, label %._crit_edge.critedge

.preheader.us.preheader:                          ; preds = %.preheader81
  %wide.trip.count = zext nneg i32 %.066 to i64
  br label %76

76:                                               ; preds = %.preheader.us.preheader, %89
  %77 = phi i32 [ %60, %.preheader.us.preheader ], [ %90, %89 ]
  %indvars.iv122 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next123, %89 ]
  %78 = sext i32 %77 to i64
  %.not79.us = icmp sgt i64 %indvars.iv122, %78
  br i1 %.not79.us, label %89, label %79

79:                                               ; preds = %76
  %80 = load i32, ptr @cnt, align 16, !tbaa !5
  %81 = trunc nuw nsw i64 %indvars.iv122 to i32
  %82 = call noundef i32 @_Z1Cii(i32 noundef %80, i32 noundef %81)
  %83 = sext i32 %82 to i64
  %84 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %85 = call noundef i32 @_Z1Cii(i32 noundef %84, i32 noundef %81)
  %86 = sext i32 %85 to i64
  %87 = mul nsw i64 %86, %83
  %88 = srem i64 %87, 7340033
  %.pre = load i32, ptr @sz, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %79, %76
  %90 = phi i32 [ %.pre, %79 ], [ %77, %76 ]
  %91 = phi i64 [ %88, %79 ], [ 0, %76 ]
  %92 = trunc nsw i64 %91 to i32
  %93 = getelementptr inbounds [2 x [131072 x i32]], ptr @f, i64 0, i64 0, i64 %indvars.iv122
  store i32 %92, ptr %93, align 4, !tbaa !5
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next123, %wide.trip.count
  br i1 %exitcond125.not, label %._crit_edge.us, label %76, !llvm.loop !15

._crit_edge.us:                                   ; preds = %89
  %.pre136 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  br label %94

94:                                               ; preds = %107, %._crit_edge.us
  %95 = phi i32 [ %.pre136, %._crit_edge.us ], [ %108, %107 ]
  %indvars.iv122.1 = phi i64 [ 0, %._crit_edge.us ], [ %indvars.iv.next123.1, %107 ]
  %96 = sext i32 %95 to i64
  %.not79.us.1 = icmp sgt i64 %indvars.iv122.1, %96
  br i1 %.not79.us.1, label %107, label %97

97:                                               ; preds = %94
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 4), align 4, !tbaa !5
  %99 = trunc nuw nsw i64 %indvars.iv122.1 to i32
  %100 = call noundef i32 @_Z1Cii(i32 noundef %98, i32 noundef %99)
  %101 = sext i32 %100 to i64
  %102 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %103 = call noundef i32 @_Z1Cii(i32 noundef %102, i32 noundef %99)
  %104 = sext i32 %103 to i64
  %105 = mul nsw i64 %104, %101
  %106 = srem i64 %105, 7340033
  %.pre135 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  br label %107

107:                                              ; preds = %97, %94
  %108 = phi i32 [ %.pre135, %97 ], [ %95, %94 ]
  %109 = phi i64 [ %106, %97 ], [ 0, %94 ]
  %110 = trunc nsw i64 %109 to i32
  %111 = getelementptr inbounds [2 x [131072 x i32]], ptr @f, i64 0, i64 1, i64 %indvars.iv122.1
  store i32 %110, ptr %111, align 4, !tbaa !5
  %indvars.iv.next123.1 = add nuw nsw i64 %indvars.iv122.1, 1
  %exitcond125.1.not = icmp eq i64 %indvars.iv.next123.1, %wide.trip.count
  br i1 %exitcond125.1.not, label %.split.us, label %94, !llvm.loop !15

.split.us:                                        ; preds = %107
  call void @_Z3NTTiPii(i32 noundef %.066, ptr noundef nonnull @f, i32 noundef 1)
  call void @_Z3NTTiPii(i32 noundef %.066, ptr noundef nonnull getelementptr inbounds (i8, ptr @f, i64 524288), i32 noundef 1)
  br i1 %75, label %.lr.ph94.preheader, label %._crit_edge

.lr.ph94.preheader:                               ; preds = %.split.us
  %xtraiter = and i64 %wide.trip.count, 1
  %112 = icmp eq i32 %.066, 1
  br i1 %112, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph94.preheader.new

.lr.ph94.preheader.new:                           ; preds = %.lr.ph94.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph94

._crit_edge.critedge:                             ; preds = %.preheader81
  call void @_Z3NTTiPii(i32 noundef %.066, ptr noundef nonnull @f, i32 noundef 1)
  call void @_Z3NTTiPii(i32 noundef %.066, ptr noundef nonnull getelementptr inbounds (i8, ptr @f, i64 524288), i32 noundef 1)
  br label %._crit_edge

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph94, %.lr.ph94.preheader
  %indvars.iv129.unr = phi i64 [ 0, %.lr.ph94.preheader ], [ %indvars.iv.next130.1, %.lr.ph94 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph94.epil

.lr.ph94.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %113 = getelementptr inbounds [131072 x i32], ptr @f, i64 0, i64 %indvars.iv129.unr
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [131072 x i32], ptr getelementptr inbounds (i8, ptr @f, i64 524288), i64 0, i64 %indvars.iv129.unr
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = mul nsw i64 %118, %115
  %120 = srem i64 %119, 7340033
  %121 = trunc nsw i64 %120 to i32
  store i32 %121, ptr %113, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph94.epil, %._crit_edge.loopexit.unr-lcssa, %._crit_edge.critedge, %.split.us
  call void @_Z3NTTiPii(i32 noundef %.066, ptr noundef nonnull @f, i32 noundef -1)
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.069101)
  %123 = load i32, ptr %2, align 4, !tbaa !5
  %.not7695 = icmp slt i32 %123, 1
  br i1 %.not7695, label %._crit_edge99, label %.lr.ph98

.lr.ph94:                                         ; preds = %.lr.ph94, %.lr.ph94.preheader.new
  %indvars.iv129 = phi i64 [ 0, %.lr.ph94.preheader.new ], [ %indvars.iv.next130.1, %.lr.ph94 ]
  %niter = phi i64 [ 0, %.lr.ph94.preheader.new ], [ %niter.next.1, %.lr.ph94 ]
  %124 = getelementptr inbounds [131072 x i32], ptr @f, i64 0, i64 %indvars.iv129
  %125 = load i32, ptr %124, align 8, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [131072 x i32], ptr getelementptr inbounds (i8, ptr @f, i64 524288), i64 0, i64 %indvars.iv129
  %128 = load i32, ptr %127, align 8, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = mul nsw i64 %129, %126
  %131 = srem i64 %130, 7340033
  %132 = trunc nsw i64 %131 to i32
  store i32 %132, ptr %124, align 8, !tbaa !5
  %indvars.iv.next130 = or disjoint i64 %indvars.iv129, 1
  %133 = getelementptr inbounds [131072 x i32], ptr @f, i64 0, i64 %indvars.iv.next130
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [131072 x i32], ptr getelementptr inbounds (i8, ptr @f, i64 524288), i64 0, i64 %indvars.iv.next130
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = mul nsw i64 %138, %135
  %140 = srem i64 %139, 7340033
  %141 = trunc nsw i64 %140 to i32
  store i32 %141, ptr %133, align 4, !tbaa !5
  %indvars.iv.next130.1 = add nuw nsw i64 %indvars.iv129, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph94, !llvm.loop !16

._crit_edge99:                                    ; preds = %152, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %142 = add nuw nsw i32 %.069101, 1
  %143 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.069101, %143
  br i1 %.not.not, label %.lr.ph103, label %._crit_edge104, !llvm.loop !17

.lr.ph98:                                         ; preds = %._crit_edge, %152
  %144 = phi i32 [ %161, %152 ], [ %123, %._crit_edge ]
  %.096 = phi i32 [ %160, %152 ], [ 1, %._crit_edge ]
  %145 = and i32 %.096, 1
  %.not77 = icmp eq i32 %145, 0
  br i1 %.not77, label %146, label %152

146:                                              ; preds = %.lr.ph98
  %147 = lshr exact i32 %.096, 1
  %.not78 = icmp slt i32 %147, %.066
  br i1 %.not78, label %148, label %152

148:                                              ; preds = %146
  %149 = zext nneg i32 %147 to i64
  %150 = getelementptr inbounds [131072 x i32], ptr @f, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %.lr.ph98, %146, %148
  %153 = phi i32 [ %151, %148 ], [ 0, %146 ], [ 0, %.lr.ph98 ]
  %154 = icmp eq i32 %.096, %144
  %155 = zext i1 %154 to i64
  %156 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %155
  %157 = load i8, ptr %156, align 1, !tbaa !18
  %158 = sext i8 %157 to i32
  %159 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %153, i32 noundef %158)
  %160 = add nuw nsw i32 %.096, 1
  %161 = load i32, ptr %2, align 4, !tbaa !5
  %.not76.not = icmp slt i32 %.096, %161
  br i1 %.not76.not, label %.lr.ph98, label %._crit_edge99, !llvm.loop !19
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z3NTTiPii(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #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 = distinct !{!17, !10}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !10}


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