; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (5751（FFT+线段树）)

; 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<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.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 }

@a = external dso_local global [120005 x i32], align 16
@ne = external dso_local global [120005 x i32], align 16
@no = external dso_local global [120005 x i32], align 16
@l = external dso_local global [120005 x i32], align 16
@r = external dso_local global [120005 x i32], align 16
@vis = external dso_local global [120005 x i32], align 16
@z = external dso_local global [120005 x i64], align 16
@g = external dso_local global %"class.std::vector", align 8
@x = external dso_local global [480020 x i32], align 16
@y = external dso_local global [480020 x i32], align 16
@q = external dso_local global [480020 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3FFT3mulEPiS0_Pxi(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 i64, align 8
  %16 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %18

18:                                               ; preds = %248, %0
  %19 = load i32, ptr %3, align 4, !tbaa !5
  %20 = add nsw i32 %19, -1
  store i32 %20, ptr %3, align 4, !tbaa !5
  %21 = icmp ne i32 %19, 0
  br i1 %21, label %22, label %251

22:                                               ; preds = %18
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %24

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

28:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %37

29:                                               ; preds = %24
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %31
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %32)
  br label %34

34:                                               ; preds = %29
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %4, align 4, !tbaa !5
  br label %24, !llvm.loop !9

37:                                               ; preds = %28
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 480020, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @z, i8 0, i64 960040, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @no, i8 0, i64 480020, i1 false)
  %38 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z4initi(i32 noundef %38)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %39 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %39, ptr %5, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %76, %37
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = icmp sge i32 %41, 1
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %40
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %47
  store i32 %45, ptr %48, align 4, !tbaa !5
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [120005 x i32], ptr @no, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %68

57:                                               ; preds = %44
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [120005 x i32], ptr @no, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %66
  store i32 %64, ptr %67, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %57, %44
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [120005 x i32], ptr @no, i64 0, i64 %74
  store i32 %69, ptr %75, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %68
  %77 = load i32, ptr %5, align 4, !tbaa !5
  %78 = add nsw i32 %77, -1
  store i32 %78, ptr %5, align 4, !tbaa !5
  br label %40, !llvm.loop !11

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

80:                                               ; preds = %226, %79
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = load i32, ptr %2, align 4, !tbaa !5
  %83 = icmp sle i32 %81, %82
  br i1 %83, label %85, label %84

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

85:                                               ; preds = %80
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [120005 x i32], ptr @vis, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %85
  br label %226

92:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %93 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %93, ptr %9, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @g) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [120005 x i32], ptr @l, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  store i32 %97, ptr %10, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %117, %92
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !5
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %105, label %115

105:                                              ; preds = %98
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [120005 x i32], ptr @r, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = icmp sle i32 %109, %113
  br label %115

115:                                              ; preds = %105, %98
  %116 = phi i1 [ false, %98 ], [ %114, %105 ]
  br i1 %116, label %117, label %133

117:                                              ; preds = %115
  %118 = load i32, ptr %9, align 4, !tbaa !5
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = sub nsw i32 %118, %119
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %8, align 4, !tbaa !5
  %123 = sext i32 %121 to i64
  %124 = getelementptr inbounds [480020 x i32], ptr @x, i64 0, i64 %123
  store i32 %120, ptr %124, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @g, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %125 = load i32, ptr %9, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [120005 x i32], ptr @vis, i64 0, i64 %126
  store i32 1, ptr %127, align 4, !tbaa !5
  %128 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %128, ptr %10, align 4, !tbaa !5
  %129 = load i32, ptr %9, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  store i32 %132, ptr %9, align 4, !tbaa !5
  br label %98, !llvm.loop !12

133:                                              ; preds = %115
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @g, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [120005 x i32], ptr @vis, i64 0, i64 %135
  store i32 1, ptr %136, align 4, !tbaa !5
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = sub nsw i32 %137, %138
  %140 = load i32, ptr %8, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %8, align 4, !tbaa !5
  %142 = sext i32 %140 to i64
  %143 = getelementptr inbounds [480020 x i32], ptr @x, i64 0, i64 %142
  store i32 %139, ptr %143, align 4, !tbaa !5
  %144 = load i32, ptr %9, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [120005 x i32], ptr @r, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  store i32 %147, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %148 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @g) #6
  %149 = trunc i64 %148 to i32
  store i32 %149, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = sub nsw i32 %150, 1
  store i32 %151, ptr %12, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %173, %133
  %153 = load i32, ptr %12, align 4, !tbaa !5
  %154 = icmp sge i32 %153, 0
  br i1 %154, label %156, label %155

155:                                              ; preds = %152
  store i32 15, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %176

156:                                              ; preds = %152
  %157 = load i32, ptr %10, align 4, !tbaa !5
  %158 = load i32, ptr %12, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %159) #6
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = sub nsw i32 %157, %161
  %163 = load i32, ptr %11, align 4, !tbaa !5
  %164 = sub nsw i32 %163, 1
  %165 = load i32, ptr %12, align 4, !tbaa !5
  %166 = sub nsw i32 %164, %165
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [480020 x i32], ptr @y, i64 0, i64 %167
  store i32 %162, ptr %168, align 4, !tbaa !5
  %169 = load i32, ptr %12, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %170) #6
  %172 = load i32, ptr %171, align 4, !tbaa !5
  store i32 %172, ptr %10, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %156
  %174 = load i32, ptr %12, align 4, !tbaa !5
  %175 = add nsw i32 %174, -1
  store i32 %175, ptr %12, align 4, !tbaa !5
  br label %152, !llvm.loop !13

176:                                              ; preds = %155
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %181, %176
  %178 = load i32, ptr %9, align 4, !tbaa !5
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = icmp sle i32 %178, %179
  br i1 %180, label %181, label %184

181:                                              ; preds = %177
  %182 = load i32, ptr %9, align 4, !tbaa !5
  %183 = mul nsw i32 %182, 2
  store i32 %183, ptr %9, align 4, !tbaa !5
  br label %177, !llvm.loop !14

184:                                              ; preds = %177
  %185 = load i32, ptr %9, align 4, !tbaa !5
  %186 = mul nsw i32 %185, 2
  store i32 %186, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %187 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %187, ptr %13, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %200, %184
  %189 = load i32, ptr %13, align 4, !tbaa !5
  %190 = load i32, ptr %9, align 4, !tbaa !5
  %191 = icmp sle i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 20, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %203

193:                                              ; preds = %188
  %194 = load i32, ptr %13, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [480020 x i32], ptr @y, i64 0, i64 %195
  store i32 0, ptr %196, align 4, !tbaa !5
  %197 = load i32, ptr %13, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [480020 x i32], ptr @x, i64 0, i64 %198
  store i32 0, ptr %199, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %193
  %201 = load i32, ptr %13, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %13, align 4, !tbaa !5
  br label %188, !llvm.loop !15

203:                                              ; preds = %192
  %204 = load i32, ptr %9, align 4, !tbaa !5
  call void @_ZN3FFT3mulEPiS0_Pxi(ptr noundef @x, ptr noundef @y, ptr noundef @q, i32 noundef %204)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %205

205:                                              ; preds = %222, %203
  %206 = load i32, ptr %14, align 4, !tbaa !5
  %207 = load i32, ptr %11, align 4, !tbaa !5
  %208 = icmp slt i32 %206, %207
  br i1 %208, label %210, label %209

209:                                              ; preds = %205
  store i32 23, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %225

210:                                              ; preds = %205
  %211 = load i32, ptr %14, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [480020 x i64], ptr @q, i64 0, i64 %212
  %214 = load i64, ptr %213, align 8, !tbaa !16
  %215 = load i32, ptr %11, align 4, !tbaa !5
  %216 = load i32, ptr %14, align 4, !tbaa !5
  %217 = sub nsw i32 %215, %216
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [120005 x i64], ptr @z, i64 0, i64 %218
  %220 = load i64, ptr %219, align 8, !tbaa !16
  %221 = add nsw i64 %220, %214
  store i64 %221, ptr %219, align 8, !tbaa !16
  br label %222

222:                                              ; preds = %210
  %223 = load i32, ptr %14, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %14, align 4, !tbaa !5
  br label %205, !llvm.loop !18

225:                                              ; preds = %209
  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 %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %226

226:                                              ; preds = %225, %91
  %227 = load i32, ptr %6, align 4, !tbaa !5
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %6, align 4, !tbaa !5
  br label %80, !llvm.loop !19

229:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %230

230:                                              ; preds = %245, %229
  %231 = load i32, ptr %16, align 4, !tbaa !5
  %232 = load i32, ptr %2, align 4, !tbaa !5
  %233 = icmp sle i32 %231, %232
  br i1 %233, label %235, label %234

234:                                              ; preds = %230
  store i32 26, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %248

235:                                              ; preds = %230
  %236 = load i32, ptr %16, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = load i32, ptr %16, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [120005 x i64], ptr @z, i64 0, i64 %239
  %241 = load i64, ptr %240, align 8, !tbaa !16
  %242 = xor i64 %237, %241
  %243 = load i64, ptr %15, align 8, !tbaa !16
  %244 = add nsw i64 %243, %242
  store i64 %244, ptr %15, align 8, !tbaa !16
  br label %245

245:                                              ; preds = %235
  %246 = load i32, ptr %16, align 4, !tbaa !5
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %16, align 4, !tbaa !5
  br label %230, !llvm.loop !20

248:                                              ; preds = %234
  %249 = load i64, ptr %15, align 8, !tbaa !16
  %250 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i64 noundef %249)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %18, !llvm.loop !21

251:                                              ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %252 = load i32, ptr %1, align 4
  ret i32 %252
}

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !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<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.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 }

@a = external dso_local global [120005 x i32], align 16
@ne = external dso_local local_unnamed_addr global [120005 x i32], align 16
@no = external dso_local local_unnamed_addr global [120005 x i32], align 16
@l = external dso_local local_unnamed_addr global [120005 x i32], align 16
@r = external dso_local local_unnamed_addr global [120005 x i32], align 16
@vis = external dso_local local_unnamed_addr global [120005 x i32], align 16
@z = external dso_local local_unnamed_addr global [120005 x i64], align 16
@g = external dso_local global %"class.std::vector", align 8
@x = external dso_local global [480020 x i32], align 16
@y = external dso_local global [480020 x i32], align 16
@q = external dso_local global [480020 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3FFT3mulEPiS0_Pxi(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %4 = 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)
  %5 = load i32, ptr %2, align 4, !tbaa !5
  %6 = add nsw i32 %5, -1
  store i32 %6, ptr %2, align 4, !tbaa !5
  %.not114 = icmp eq i32 %5, 0
  br i1 %.not114, label %._crit_edge117, label %.lr.ph116

.lr.ph116:                                        ; preds = %0, %._crit_edge112
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %.not6476 = icmp slt i32 %8, 1
  br i1 %.not6476, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph116
  %.lcssa = phi i32 [ %8, %.lr.ph116 ], [ %21, %.lr.ph ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(480020) @vis, i8 0, i64 480020, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(960040) @z, i8 0, i64 960040, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(480020) @no, i8 0, i64 480020, i1 false)
  call void @_Z4initi(i32 noundef %.lcssa)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph80.preheader, label %._crit_edge112

.lr.ph80.preheader:                               ; preds = %._crit_edge
  %11 = zext nneg i32 %9 to i64
  %xtraiter = and i64 %11, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph80.prol.loopexit, label %.lr.ph80.prol

.lr.ph80.prol:                                    ; preds = %.lr.ph80.preheader
  %12 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %11
  %13 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %11
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [120005 x i32], ptr @no, i64 0, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %.not72.prol = icmp eq i32 %17, 0
  %spec.store.select.prol = select i1 %.not72.prol, i32 %9, i32 %17
  store i32 %spec.store.select.prol, ptr %12, align 4
  store i32 %9, ptr %16, align 4, !tbaa !5
  %indvars.iv.next123.prol = add nsw i64 %11, -1
  br label %.lr.ph80.prol.loopexit

.lr.ph80.prol.loopexit:                           ; preds = %.lr.ph80.prol, %.lr.ph80.preheader
  %indvars.iv122.unr = phi i64 [ %11, %.lr.ph80.preheader ], [ %indvars.iv.next123.prol, %.lr.ph80.prol ]
  %18 = icmp eq i32 %9, 1
  br i1 %18, label %.lr.ph106.preheader, label %.lr.ph80

.lr.ph:                                           ; preds = %.lr.ph116, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph116 ]
  %19 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %indvars.iv
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %19)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %.not64.not = icmp slt i64 %indvars.iv, %22
  br i1 %.not64.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph80:                                         ; preds = %.lr.ph80.prol.loopexit, %.lr.ph80
  %indvars.iv122 = phi i64 [ %indvars.iv.next123.1, %.lr.ph80 ], [ %indvars.iv122.unr, %.lr.ph80.prol.loopexit ]
  %23 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %indvars.iv122
  %24 = trunc nuw nsw i64 %indvars.iv122 to i32
  %25 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %indvars.iv122
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [120005 x i32], ptr @no, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %.not72 = icmp eq i32 %29, 0
  %spec.store.select = select i1 %.not72, i32 %24, i32 %29
  store i32 %spec.store.select, ptr %23, align 4
  store i32 %24, ptr %28, align 4, !tbaa !5
  %indvars.iv.next123 = add nsw i64 %indvars.iv122, -1
  %30 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %indvars.iv.next123
  %31 = trunc nuw nsw i64 %indvars.iv.next123 to i32
  %32 = getelementptr inbounds [120005 x i32], ptr @a, i64 0, i64 %indvars.iv.next123
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [120005 x i32], ptr @no, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not72.1 = icmp eq i32 %36, 0
  %spec.store.select.1 = select i1 %.not72.1, i32 %31, i32 %36
  store i32 %spec.store.select.1, ptr %30, align 4
  store i32 %31, ptr %35, align 4, !tbaa !5
  %indvars.iv.next123.1 = add nsw i64 %indvars.iv122, -2
  %37 = icmp ugt i64 %indvars.iv.next123, 1
  br i1 %37, label %.lr.ph80, label %.lr.ph106.preheader, !llvm.loop !11

.lr.ph106.preheader:                              ; preds = %.lr.ph80, %.lr.ph80.prol.loopexit
  br label %.lr.ph106

.preheader73:                                     ; preds = %120
  %.not66108 = icmp slt i32 %121, 1
  br i1 %.not66108, label %._crit_edge112, label %.lr.ph111.preheader

.lr.ph111.preheader:                              ; preds = %.preheader73
  %38 = add nuw i32 %121, 1
  %wide.trip.count149 = zext i32 %38 to i64
  %39 = zext nneg i32 %121 to i64
  %min.iters.check = icmp ult i32 %121, 4
  br i1 %min.iters.check, label %.lr.ph111.preheader185, label %vector.ph

.lr.ph111.preheader185:                           ; preds = %middle.block, %.lr.ph111.preheader
  %indvars.iv145.ph = phi i64 [ 1, %.lr.ph111.preheader ], [ %ind.end, %middle.block ]
  %.048109.ph = phi i64 [ 0, %.lr.ph111.preheader ], [ %47, %middle.block ]
  br label %.lr.ph111

vector.ph:                                        ; preds = %.lr.ph111.preheader
  %n.vec = and i64 %39, 2147483644
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 1, i64 2>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %44, %vector.body ]
  %vec.phi164 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %45, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %offset.idx = or disjoint i64 %index, 1
  %40 = getelementptr inbounds [120005 x i64], ptr @z, i64 0, i64 %offset.idx
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %wide.load = load <2 x i64>, ptr %40, align 8, !tbaa !12
  %wide.load165 = load <2 x i64>, ptr %41, align 8, !tbaa !12
  %42 = xor <2 x i64> %wide.load, %vec.ind
  %43 = xor <2 x i64> %wide.load165, %step.add
  %44 = add <2 x i64> %42, %vec.phi
  %45 = add <2 x i64> %43, %vec.phi164
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %46 = icmp eq i64 %index.next, %n.vec
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %45, %44
  %47 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %39
  br i1 %cmp.n, label %._crit_edge112, label %.lr.ph111.preheader185

.lr.ph106:                                        ; preds = %.lr.ph106.preheader, %120
  %48 = phi i32 [ %121, %120 ], [ %9, %.lr.ph106.preheader ]
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %120 ], [ 1, %.lr.ph106.preheader ]
  %49 = getelementptr inbounds [120005 x i32], ptr @vis, i64 0, i64 %indvars.iv141
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %.not67 = icmp eq i32 %50, 0
  br i1 %.not67, label %51, label %120

51:                                               ; preds = %.lr.ph106
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %52 = trunc nuw nsw i64 %indvars.iv141 to i32
  store i32 %52, ptr %3, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) @g) #8
  %53 = getelementptr inbounds [120005 x i32], ptr @l, i64 0, i64 %indvars.iv141
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %.not6881 = icmp eq i32 %58, %55
  br i1 %.not6881, label %.critedge, label %.lr.ph85

.lr.ph85:                                         ; preds = %51, %64
  %indvars.iv125 = phi i64 [ %indvars.iv.next126, %64 ], [ 0, %51 ]
  %59 = phi i32 [ %74, %64 ], [ %58, %51 ]
  %60 = phi i64 [ %72, %64 ], [ %56, %51 ]
  %61 = phi i32 [ %71, %64 ], [ %55, %51 ]
  %.05383 = phi i32 [ %67, %64 ], [ %54, %51 ]
  %62 = getelementptr inbounds [120005 x i32], ptr @r, i64 0, i64 %60
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %.not69 = icmp sgt i32 %59, %63
  br i1 %.not69, label %.critedge, label %64

64:                                               ; preds = %.lr.ph85
  %65 = sub nsw i32 %61, %.05383
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %66 = getelementptr inbounds [480020 x i32], ptr @x, i64 0, i64 %indvars.iv125
  store i32 %65, ptr %66, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @g, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [120005 x i32], ptr @vis, i64 0, i64 %68
  store i32 1, ptr %69, align 4, !tbaa !5
  %70 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %68
  %71 = load i32, ptr %70, align 4, !tbaa !5
  store i32 %71, ptr %3, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [120005 x i32], ptr @ne, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %.not68 = icmp eq i32 %74, %71
  br i1 %.not68, label %.critedge, label %.lr.ph85, !llvm.loop !17

.critedge:                                        ; preds = %.lr.ph85, %64, %51
  %.054.lcssa = phi i64 [ 0, %51 ], [ %indvars.iv.next126, %64 ], [ %indvars.iv125, %.lr.ph85 ]
  %.053.lcssa = phi i32 [ %54, %51 ], [ %67, %64 ], [ %.05383, %.lr.ph85 ]
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) @g, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [120005 x i32], ptr @vis, i64 0, i64 %76
  store i32 1, ptr %77, align 4, !tbaa !5
  %78 = sub nsw i32 %75, %.053.lcssa
  %79 = and i64 %.054.lcssa, 4294967295
  %80 = getelementptr inbounds [480020 x i32], ptr @x, i64 0, i64 %79
  store i32 %78, ptr %80, align 4, !tbaa !5
  %81 = getelementptr inbounds [120005 x i32], ptr @r, i64 0, i64 %76
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) @g) #8
  %84 = trunc i64 %83 to i32
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %.lr.ph93.preheader, label %.preheader.preheader

.lr.ph93.preheader:                               ; preds = %.critedge
  %86 = and i64 %83, 2147483647
  %87 = shl i64 %83, 32
  %sext = add nsw i64 %87, -4294967296
  %88 = ashr exact i64 %sext, 32
  br label %.lr.ph93

.lr.ph93:                                         ; preds = %.lr.ph93.preheader, %.lr.ph93
  %indvars.iv128.in = phi i64 [ %86, %.lr.ph93.preheader ], [ %indvars.iv128, %.lr.ph93 ]
  %.191 = phi i32 [ %82, %.lr.ph93.preheader ], [ %95, %.lr.ph93 ]
  %indvars.iv128 = add nsw i64 %indvars.iv128.in, -1
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv128) #8
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = sub nsw i32 %.191, %90
  %92 = sub nuw nsw i64 %88, %indvars.iv128
  %93 = getelementptr inbounds [480020 x i32], ptr @y, i64 0, i64 %92
  store i32 %91, ptr %93, align 4, !tbaa !5
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @g, i64 noundef %indvars.iv128) #8
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = icmp ugt i64 %indvars.iv128.in, 1
  br i1 %96, label %.lr.ph93, label %.preheader.preheader, !llvm.loop !18

.preheader.preheader:                             ; preds = %.lr.ph93, %.critedge
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %storemerge = phi i32 [ %97, %.preheader ], [ 1, %.preheader.preheader ]
  %.not70 = icmp sgt i32 %storemerge, %84
  %97 = shl nsw i32 %storemerge, 1
  br i1 %.not70, label %98, label %.preheader, !llvm.loop !19

98:                                               ; preds = %.preheader
  store i32 %97, ptr %3, align 4, !tbaa !5
  %.not7195 = icmp slt i32 %97, %84
  br i1 %.not7195, label %._crit_edge99, label %.lr.ph98.preheader

.lr.ph98.preheader:                               ; preds = %98
  %sext151 = shl i64 %83, 32
  %99 = ashr exact i64 %sext151, 30
  %scevgep = getelementptr i8, ptr @y, i64 %99
  %100 = sub i32 %97, %84
  %101 = zext i32 %100 to i64
  %102 = shl nuw nsw i64 %101, 2
  %103 = add nuw nsw i64 %102, 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %103, i1 false), !tbaa !5
  %scevgep132 = getelementptr i8, ptr @x, i64 %99
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep132, i8 0, i64 %103, i1 false), !tbaa !5
  br label %._crit_edge99

._crit_edge99:                                    ; preds = %.lr.ph98.preheader, %98
  call void @_ZN3FFT3mulEPiS0_Pxi(ptr noundef nonnull @x, ptr noundef nonnull @y, ptr noundef nonnull @q, i32 noundef %97)
  br i1 %85, label %.lr.ph102.preheader, label %._crit_edge103

.lr.ph102.preheader:                              ; preds = %._crit_edge99
  %104 = and i64 %83, 2147483647
  %wide.trip.count = and i64 %83, 2147483647
  %min.iters.check168 = icmp ult i64 %wide.trip.count, 4
  br i1 %min.iters.check168, label %.lr.ph102.preheader184, label %vector.ph169

.lr.ph102.preheader184:                           ; preds = %middle.block166, %.lr.ph102.preheader
  %indvars.iv137.ph = phi i64 [ 0, %.lr.ph102.preheader ], [ %n.vec171, %middle.block166 ]
  br label %.lr.ph102

vector.ph169:                                     ; preds = %.lr.ph102.preheader
  %n.mod.vf170 = and i64 %83, 3
  %n.vec171 = sub nsw i64 %wide.trip.count, %n.mod.vf170
  br label %vector.body173

vector.body173:                                   ; preds = %vector.body173, %vector.ph169
  %index174 = phi i64 [ 0, %vector.ph169 ], [ %index.next182, %vector.body173 ]
  %105 = getelementptr inbounds [480020 x i64], ptr @q, i64 0, i64 %index174
  %106 = getelementptr inbounds i8, ptr %105, i64 16
  %wide.load175 = load <2 x i64>, ptr %105, align 16, !tbaa !12
  %wide.load176 = load <2 x i64>, ptr %106, align 16, !tbaa !12
  %107 = sub nsw i64 %104, %index174
  %108 = getelementptr inbounds [120005 x i64], ptr @z, i64 0, i64 %107
  %109 = getelementptr inbounds i8, ptr %108, i64 -8
  %110 = getelementptr inbounds i8, ptr %108, i64 -24
  %wide.load177 = load <2 x i64>, ptr %109, align 8, !tbaa !12
  %reverse = shufflevector <2 x i64> %wide.load177, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %wide.load178 = load <2 x i64>, ptr %110, align 8, !tbaa !12
  %reverse179 = shufflevector <2 x i64> %wide.load178, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  %111 = add nsw <2 x i64> %reverse, %wide.load175
  %112 = add nsw <2 x i64> %reverse179, %wide.load176
  %reverse180 = shufflevector <2 x i64> %111, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  store <2 x i64> %reverse180, ptr %109, align 8, !tbaa !12
  %reverse181 = shufflevector <2 x i64> %112, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  store <2 x i64> %reverse181, ptr %110, align 8, !tbaa !12
  %index.next182 = add nuw i64 %index174, 4
  %113 = icmp eq i64 %index.next182, %n.vec171
  br i1 %113, label %middle.block166, label %vector.body173, !llvm.loop !20

middle.block166:                                  ; preds = %vector.body173
  %cmp.n183 = icmp eq i64 %n.mod.vf170, 0
  br i1 %cmp.n183, label %._crit_edge103, label %.lr.ph102.preheader184

._crit_edge103:                                   ; preds = %.lr.ph102, %middle.block166, %._crit_edge99
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %120

.lr.ph102:                                        ; preds = %.lr.ph102.preheader184, %.lr.ph102
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %.lr.ph102 ], [ %indvars.iv137.ph, %.lr.ph102.preheader184 ]
  %114 = getelementptr inbounds [480020 x i64], ptr @q, i64 0, i64 %indvars.iv137
  %115 = load i64, ptr %114, align 8, !tbaa !12
  %116 = sub nsw i64 %104, %indvars.iv137
  %117 = getelementptr inbounds [120005 x i64], ptr @z, i64 0, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !12
  %119 = add nsw i64 %118, %115
  store i64 %119, ptr %117, align 8, !tbaa !12
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next138, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge103, label %.lr.ph102, !llvm.loop !21

120:                                              ; preds = %.lr.ph106, %._crit_edge103
  %121 = phi i32 [ %48, %.lr.ph106 ], [ %.pre, %._crit_edge103 ]
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %122 = sext i32 %121 to i64
  %.not65.not = icmp slt i64 %indvars.iv141, %122
  br i1 %.not65.not, label %.lr.ph106, label %.preheader73, !llvm.loop !22

._crit_edge112:                                   ; preds = %.lr.ph111, %middle.block, %._crit_edge, %.preheader73
  %.048.lcssa = phi i64 [ 0, %.preheader73 ], [ 0, %._crit_edge ], [ %47, %middle.block ], [ %129, %.lr.ph111 ]
  %123 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %.048.lcssa)
  %124 = load i32, ptr %2, align 4, !tbaa !5
  %125 = add nsw i32 %124, -1
  store i32 %125, ptr %2, align 4, !tbaa !5
  %.not = icmp eq i32 %124, 0
  br i1 %.not, label %._crit_edge117, label %.lr.ph116, !llvm.loop !23

.lr.ph111:                                        ; preds = %.lr.ph111.preheader185, %.lr.ph111
  %indvars.iv145 = phi i64 [ %indvars.iv.next146, %.lr.ph111 ], [ %indvars.iv145.ph, %.lr.ph111.preheader185 ]
  %.048109 = phi i64 [ %129, %.lr.ph111 ], [ %.048109.ph, %.lr.ph111.preheader185 ]
  %126 = getelementptr inbounds [120005 x i64], ptr @z, i64 0, i64 %indvars.iv145
  %127 = load i64, ptr %126, align 8, !tbaa !12
  %128 = xor i64 %127, %indvars.iv145
  %129 = add nsw i64 %128, %.048109
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next146, %wide.trip.count149
  br i1 %exitcond150.not, label %._crit_edge112, label %.lr.ph111, !llvm.loop !24

._crit_edge117:                                   ; preds = %._crit_edge112, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0
}

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 #4

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 #4 = { "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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10, !15, !16}
!21 = distinct !{!21, !10, !16, !15}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10, !16, !15}


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