; LLVM IR from tangjz/acm-icpc :: hdu (5530)

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

%struct.complex = type { x86_fp80, x86_fp80 }
%"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 }

@X = external dso_local global [65536 x %struct.complex], align 16
@len = external dso_local global i32, align 4
@bitlen = external dso_local global i32, align 4
@bitrev = external dso_local global [65536 x i32], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [30001 x i32], align 16
@s = external dso_local global i32, align 4
@bsize = external dso_local global i32, align 4
@f = external dso_local global [30001 x i32], align 16
@g = external dso_local global [30001 x i32], align 16
@rk = external dso_local global [30001 x i32], align 16
@ansl = external dso_local global [30001 x i32], align 16
@ansr = external dso_local global [30001 x i32], align 16
@pos = external dso_local global [30001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK7complexS1_(ptr dead_on_unwind noalias writable sret(%struct.complex) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %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 %struct.complex, align 16
  %7 = alloca i32, align 4
  %8 = alloca %struct.complex, align 16
  %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 %struct.complex, align 16
  %17 = alloca i32, align 4
  %18 = alloca %struct.complex, align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %"class.std::vector", align 8
  store i32 0, ptr %1, align 4
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %30

30:                                               ; preds = %568, %0
  %31 = load i32, ptr @t, align 4, !tbaa !5
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr @t, align 4, !tbaa !5
  %33 = icmp ne i32 %31, 0
  br i1 %33, label %34, label %569

34:                                               ; preds = %30
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %36

36:                                               ; preds = %62, %34
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = icmp sle i32 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %65

41:                                               ; preds = %36
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i32, ptr @a, i64 %43
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %44)
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, %50
  store i32 %55, ptr %53, align 4, !tbaa !5
  %56 = load i32, ptr %2, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %60
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br label %62

62:                                               ; preds = %41
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %2, align 4, !tbaa !5
  br label %36, !llvm.loop !9

65:                                               ; preds = %40
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  store i32 %69, ptr @s, align 4, !tbaa !5
  store i32 0, ptr @bitlen, align 4, !tbaa !5
  store i32 1, ptr @len, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %76, %65
  %71 = load i32, ptr @len, align 4, !tbaa !5
  %72 = load i32, ptr @s, align 4, !tbaa !5
  %73 = shl i32 %72, 1
  %74 = icmp sle i32 %71, %73
  br i1 %74, label %75, label %81

75:                                               ; preds = %70
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr @bitlen, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr @bitlen, align 4, !tbaa !5
  %79 = load i32, ptr @len, align 4, !tbaa !5
  %80 = shl i32 %79, 1
  store i32 %80, ptr @len, align 4, !tbaa !5
  br label %70, !llvm.loop !11

81:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %103, %81
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = load i32, ptr @len, align 4, !tbaa !5
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %106

87:                                               ; preds = %82
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = ashr i32 %88, 1
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = ashr i32 %92, 1
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = and i32 %94, 1
  %96 = load i32, ptr @bitlen, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 1
  %98 = shl i32 %95, %97
  %99 = or i32 %93, %98
  %100 = load i32, ptr %3, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %101
  store i32 %99, ptr %102, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %87
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %3, align 4, !tbaa !5
  br label %82, !llvm.loop !12

106:                                              ; preds = %86
  %107 = load i32, ptr @n, align 4, !tbaa !5
  %108 = load i32, ptr @bitlen, align 4, !tbaa !5
  %109 = mul nsw i32 %107, %108
  %110 = mul nsw i32 %109, 100
  %111 = sitofp i32 %110 to double
  %112 = call double @sqrt(double noundef %111) #9
  %113 = call double @llvm.ceil.f64(double %112)
  %114 = fptosi double %113 to i32
  store i32 %114, ptr @bsize, align 4, !tbaa !5
  %115 = load i32, ptr @s, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = mul i64 %117, 4
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 0, i64 %118, i1 false)
  %119 = load i32, ptr @s, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = mul i64 %121, 4
  call void @llvm.memset.p0.i64(ptr align 16 @g, i8 0, i64 %122, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %148, %106
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = load i32, ptr @n, align 4, !tbaa !5
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  br label %151

128:                                              ; preds = %123
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %134, align 4, !tbaa !5
  %137 = load i32, ptr @s, align 4, !tbaa !5
  %138 = load i32, ptr %4, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = sub nsw i32 %137, %142
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %145, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %128
  %149 = load i32, ptr %4, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %4, align 4, !tbaa !5
  br label %123, !llvm.loop !13

151:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %187, %151
  %153 = load i32, ptr %5, align 4, !tbaa !5
  %154 = load i32, ptr @len, align 4, !tbaa !5
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %190

157:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #9
  %158 = load i32, ptr %5, align 4, !tbaa !5
  %159 = load i32, ptr @s, align 4, !tbaa !5
  %160 = icmp sle i32 %158, %159
  br i1 %160, label %161, label %182

161:                                              ; preds = %157
  %162 = load i32, ptr %5, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = load i32, ptr %5, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %167
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = add nsw i32 %165, %169
  %171 = sitofp i32 %170 to x86_fp80
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = load i32, ptr %5, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = sub nsw i32 %175, %179
  %181 = sitofp i32 %180 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %6, x86_fp80 noundef %171, x86_fp80 noundef %181)
  br label %183

182:                                              ; preds = %157
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %6, x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef 0xK00000000000000000000)
  br label %183

183:                                              ; preds = %182, %161
  %184 = load i32, ptr %5, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %185
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %186, ptr align 16 %6, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #9
  br label %187

187:                                              ; preds = %183
  %188 = load i32, ptr %5, align 4, !tbaa !5
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %5, align 4, !tbaa !5
  br label %152, !llvm.loop !17

190:                                              ; preds = %156
  %191 = load i32, ptr @len, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @X, i32 noundef %191, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %207, %190
  %193 = load i32, ptr %7, align 4, !tbaa !5
  %194 = load i32, ptr @len, align 4, !tbaa !5
  %195 = icmp slt i32 %193, %194
  br i1 %195, label %197, label %196

196:                                              ; preds = %192
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %210

197:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #9
  %198 = load i32, ptr %7, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %199
  %201 = load i32, ptr %7, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %202
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %8, ptr noundef nonnull align 16 dereferenceable(32) %200, ptr noundef nonnull align 16 dereferenceable(32) %203)
  %204 = load i32, ptr %7, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %205
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %206, ptr align 16 %8, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #9
  br label %207

207:                                              ; preds = %197
  %208 = load i32, ptr %7, align 4, !tbaa !5
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %7, align 4, !tbaa !5
  br label %192, !llvm.loop !18

210:                                              ; preds = %196
  %211 = load i32, ptr @len, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @X, i32 noundef %211, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %247, %210
  %213 = load i32, ptr %9, align 4, !tbaa !5
  %214 = load i32, ptr @s, align 4, !tbaa !5
  %215 = icmp sle i32 %213, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %250

217:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %218 = load i32, ptr @s, align 4, !tbaa !5
  %219 = load i32, ptr %9, align 4, !tbaa !5
  %220 = add nsw i32 %218, %219
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %221
  %223 = getelementptr inbounds %struct.complex, ptr %222, i32 0, i32 0
  %224 = load x86_fp80, ptr %223, align 16, !tbaa !19
  %225 = fadd x86_fp80 %224, 0xK3FFE8000000000000000
  %226 = fptosi x86_fp80 %225 to i32
  %227 = ashr i32 %226, 2
  store i32 %227, ptr %10, align 4, !tbaa !5
  %228 = load i32, ptr %10, align 4, !tbaa !5
  %229 = add nsw i32 %228, 1
  %230 = ashr i32 %229, 1
  %231 = load i32, ptr %9, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %232
  store i32 %230, ptr %233, align 4, !tbaa !5
  %234 = load i32, ptr %9, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %235
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %238 = icmp ne i32 %237, 0
  br i1 %238, label %246, label %239

239:                                              ; preds = %217
  %240 = load i32, ptr %9, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [30001 x i32], ptr @ansr, i64 0, i64 %241
  store i32 0, ptr %242, align 4, !tbaa !5
  %243 = load i32, ptr %9, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [30001 x i32], ptr @ansl, i64 0, i64 %244
  store i32 0, ptr %245, align 4, !tbaa !5
  br label %246

246:                                              ; preds = %239, %217
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %247

247:                                              ; preds = %246
  %248 = load i32, ptr %9, align 4, !tbaa !5
  %249 = add nsw i32 %248, 1
  store i32 %249, ptr %9, align 4, !tbaa !5
  br label %212, !llvm.loop !21

250:                                              ; preds = %216
  %251 = load i32, ptr @s, align 4, !tbaa !5
  %252 = add nsw i32 %251, 1
  %253 = sext i32 %252 to i64
  %254 = mul i64 %253, 4
  call void @llvm.memset.p0.i64(ptr align 16 @g, i8 0, i64 %254, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %255

255:                                              ; preds = %494, %250
  %256 = load i32, ptr %11, align 4, !tbaa !5
  %257 = load i32, ptr @n, align 4, !tbaa !5
  %258 = icmp sle i32 %256, %257
  br i1 %258, label %260, label %259

259:                                              ; preds = %255
  store i32 25, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %498

260:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %261 = load i32, ptr %11, align 4, !tbaa !5
  %262 = load i32, ptr @bsize, align 4, !tbaa !5
  %263 = add nsw i32 %261, %262
  %264 = sub nsw i32 %263, 1
  %265 = load i32, ptr @n, align 4, !tbaa !5
  %266 = icmp slt i32 %264, %265
  br i1 %266, label %267, label %272

267:                                              ; preds = %260
  %268 = load i32, ptr %11, align 4, !tbaa !5
  %269 = load i32, ptr @bsize, align 4, !tbaa !5
  %270 = add nsw i32 %268, %269
  %271 = sub nsw i32 %270, 1
  br label %274

272:                                              ; preds = %260
  %273 = load i32, ptr @n, align 4, !tbaa !5
  br label %274

274:                                              ; preds = %272, %267
  %275 = phi i32 [ %271, %267 ], [ %273, %272 ]
  store i32 %275, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %276 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %276, ptr %14, align 4, !tbaa !5
  br label %277

277:                                              ; preds = %294, %274
  %278 = load i32, ptr %14, align 4, !tbaa !5
  %279 = load i32, ptr %13, align 4, !tbaa !5
  %280 = icmp sle i32 %278, %279
  br i1 %280, label %282, label %281

281:                                              ; preds = %277
  store i32 28, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %297

282:                                              ; preds = %277
  %283 = load i32, ptr @s, align 4, !tbaa !5
  %284 = load i32, ptr %14, align 4, !tbaa !5
  %285 = sub nsw i32 %284, 1
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = sub nsw i32 %283, %288
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %290
  %292 = load i32, ptr %291, align 4, !tbaa !5
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %291, align 4, !tbaa !5
  br label %294

294:                                              ; preds = %282
  %295 = load i32, ptr %14, align 4, !tbaa !5
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %14, align 4, !tbaa !5
  br label %277, !llvm.loop !22

297:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %298

298:                                              ; preds = %333, %297
  %299 = load i32, ptr %15, align 4, !tbaa !5
  %300 = load i32, ptr @len, align 4, !tbaa !5
  %301 = icmp slt i32 %299, %300
  br i1 %301, label %303, label %302

302:                                              ; preds = %298
  store i32 31, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %336

303:                                              ; preds = %298
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #9
  %304 = load i32, ptr %15, align 4, !tbaa !5
  %305 = load i32, ptr @s, align 4, !tbaa !5
  %306 = icmp sle i32 %304, %305
  br i1 %306, label %307, label %328

307:                                              ; preds = %303
  %308 = load i32, ptr %15, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !5
  %312 = load i32, ptr %15, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %313
  %315 = load i32, ptr %314, align 4, !tbaa !5
  %316 = add nsw i32 %311, %315
  %317 = sitofp i32 %316 to x86_fp80
  %318 = load i32, ptr %15, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %319
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = load i32, ptr %15, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %323
  %325 = load i32, ptr %324, align 4, !tbaa !5
  %326 = sub nsw i32 %321, %325
  %327 = sitofp i32 %326 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %16, x86_fp80 noundef %317, x86_fp80 noundef %327)
  br label %329

328:                                              ; preds = %303
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %16, x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef 0xK00000000000000000000)
  br label %329

329:                                              ; preds = %328, %307
  %330 = load i32, ptr %15, align 4, !tbaa !5
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %331
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %332, ptr align 16 %16, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #9
  br label %333

333:                                              ; preds = %329
  %334 = load i32, ptr %15, align 4, !tbaa !5
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %15, align 4, !tbaa !5
  br label %298, !llvm.loop !23

336:                                              ; preds = %302
  %337 = load i32, ptr @len, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @X, i32 noundef %337, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %338

338:                                              ; preds = %353, %336
  %339 = load i32, ptr %17, align 4, !tbaa !5
  %340 = load i32, ptr @len, align 4, !tbaa !5
  %341 = icmp slt i32 %339, %340
  br i1 %341, label %343, label %342

342:                                              ; preds = %338
  store i32 34, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %356

343:                                              ; preds = %338
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #9
  %344 = load i32, ptr %17, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %345
  %347 = load i32, ptr %17, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %348
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %18, ptr noundef nonnull align 16 dereferenceable(32) %346, ptr noundef nonnull align 16 dereferenceable(32) %349)
  %350 = load i32, ptr %17, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %351
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %352, ptr align 16 %18, i64 32, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #9
  br label %353

353:                                              ; preds = %343
  %354 = load i32, ptr %17, align 4, !tbaa !5
  %355 = add nsw i32 %354, 1
  store i32 %355, ptr %17, align 4, !tbaa !5
  br label %338, !llvm.loop !24

356:                                              ; preds = %342
  %357 = load i32, ptr @len, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @X, i32 noundef %357, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %358

358:                                              ; preds = %468, %356
  %359 = load i32, ptr %19, align 4, !tbaa !5
  %360 = load i32, ptr @s, align 4, !tbaa !5
  %361 = icmp sle i32 %359, %360
  br i1 %361, label %363, label %362

362:                                              ; preds = %358
  store i32 37, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  br label %471

363:                                              ; preds = %358
  %364 = load i32, ptr %19, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %365
  %367 = load i32, ptr %366, align 4, !tbaa !5
  %368 = icmp ne i32 %367, 0
  br i1 %368, label %370, label %369

369:                                              ; preds = %363
  br label %468

370:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %371 = load i32, ptr @s, align 4, !tbaa !5
  %372 = load i32, ptr %19, align 4, !tbaa !5
  %373 = add nsw i32 %371, %372
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %374
  %376 = getelementptr inbounds %struct.complex, ptr %375, i32 0, i32 0
  %377 = load x86_fp80, ptr %376, align 16, !tbaa !19
  %378 = fadd x86_fp80 %377, 0xK3FFE8000000000000000
  %379 = fptosi x86_fp80 %378 to i32
  %380 = ashr i32 %379, 2
  store i32 %380, ptr %20, align 4, !tbaa !5
  %381 = load i32, ptr %19, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %382
  %384 = load i32, ptr %383, align 4, !tbaa !5
  %385 = load i32, ptr %20, align 4, !tbaa !5
  %386 = icmp sgt i32 %384, %385
  br i1 %386, label %387, label %394

387:                                              ; preds = %370
  %388 = load i32, ptr %20, align 4, !tbaa !5
  %389 = load i32, ptr %19, align 4, !tbaa !5
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %390
  %392 = load i32, ptr %391, align 4, !tbaa !5
  %393 = sub nsw i32 %392, %388
  store i32 %393, ptr %391, align 4, !tbaa !5
  br label %467

394:                                              ; preds = %370
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %395 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %395, ptr %21, align 4, !tbaa !5
  br label %396

396:                                              ; preds = %462, %394
  %397 = load i32, ptr %21, align 4, !tbaa !5
  %398 = load i32, ptr %13, align 4, !tbaa !5
  %399 = icmp sle i32 %397, %398
  br i1 %399, label %401, label %400

400:                                              ; preds = %396
  store i32 40, ptr %12, align 4
  br label %465

401:                                              ; preds = %396
  %402 = load i32, ptr %19, align 4, !tbaa !5
  %403 = sext i32 %402 to i64
  %404 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %403
  %405 = load i32, ptr %404, align 4, !tbaa !5
  %406 = load i32, ptr %21, align 4, !tbaa !5
  %407 = sub nsw i32 %406, 1
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %408
  %410 = load i32, ptr %409, align 4, !tbaa !5
  %411 = load i32, ptr %19, align 4, !tbaa !5
  %412 = add nsw i32 %410, %411
  %413 = sext i32 %412 to i64
  %414 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %413
  %415 = load i32, ptr %414, align 4, !tbaa !5
  %416 = icmp sgt i32 %405, %415
  br i1 %416, label %417, label %433

417:                                              ; preds = %401
  %418 = load i32, ptr %21, align 4, !tbaa !5
  %419 = sub nsw i32 %418, 1
  %420 = sext i32 %419 to i64
  %421 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %420
  %422 = load i32, ptr %421, align 4, !tbaa !5
  %423 = load i32, ptr %19, align 4, !tbaa !5
  %424 = add nsw i32 %422, %423
  %425 = sext i32 %424 to i64
  %426 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %425
  %427 = load i32, ptr %426, align 4, !tbaa !5
  %428 = load i32, ptr %19, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %429
  %431 = load i32, ptr %430, align 4, !tbaa !5
  %432 = sub nsw i32 %431, %427
  store i32 %432, ptr %430, align 4, !tbaa !5
  br label %461

433:                                              ; preds = %401
  %434 = load i32, ptr %21, align 4, !tbaa !5
  %435 = load i32, ptr %19, align 4, !tbaa !5
  %436 = sext i32 %435 to i64
  %437 = getelementptr inbounds [30001 x i32], ptr @ansl, i64 0, i64 %436
  store i32 %434, ptr %437, align 4, !tbaa !5
  %438 = load i32, ptr %21, align 4, !tbaa !5
  %439 = sub nsw i32 %438, 1
  %440 = sext i32 %439 to i64
  %441 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %440
  %442 = load i32, ptr %441, align 4, !tbaa !5
  %443 = load i32, ptr %19, align 4, !tbaa !5
  %444 = add nsw i32 %442, %443
  %445 = sext i32 %444 to i64
  %446 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %445
  %447 = load i32, ptr %19, align 4, !tbaa !5
  %448 = sext i32 %447 to i64
  %449 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %448
  %450 = load i32, ptr %449, align 4, !tbaa !5
  %451 = sub nsw i32 %450, 1
  %452 = sext i32 %451 to i64
  %453 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %446, i64 noundef %452) #9
  %454 = load i32, ptr %453, align 4, !tbaa !5
  %455 = load i32, ptr %19, align 4, !tbaa !5
  %456 = sext i32 %455 to i64
  %457 = getelementptr inbounds [30001 x i32], ptr @ansr, i64 0, i64 %456
  store i32 %454, ptr %457, align 4, !tbaa !5
  %458 = load i32, ptr %19, align 4, !tbaa !5
  %459 = sext i32 %458 to i64
  %460 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %459
  store i32 0, ptr %460, align 4, !tbaa !5
  store i32 40, ptr %12, align 4
  br label %465

461:                                              ; preds = %417
  br label %462

462:                                              ; preds = %461
  %463 = load i32, ptr %21, align 4, !tbaa !5
  %464 = add nsw i32 %463, 1
  store i32 %464, ptr %21, align 4, !tbaa !5
  br label %396, !llvm.loop !25

465:                                              ; preds = %433, %400
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %466

466:                                              ; preds = %465
  br label %467

467:                                              ; preds = %466, %387
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %468

468:                                              ; preds = %467, %369
  %469 = load i32, ptr %19, align 4, !tbaa !5
  %470 = add nsw i32 %469, 1
  store i32 %470, ptr %19, align 4, !tbaa !5
  br label %358, !llvm.loop !26

471:                                              ; preds = %362
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %472 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %472, ptr %22, align 4, !tbaa !5
  br label %473

473:                                              ; preds = %490, %471
  %474 = load i32, ptr %22, align 4, !tbaa !5
  %475 = load i32, ptr %13, align 4, !tbaa !5
  %476 = icmp sle i32 %474, %475
  br i1 %476, label %478, label %477

477:                                              ; preds = %473
  store i32 43, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %493

478:                                              ; preds = %473
  %479 = load i32, ptr @s, align 4, !tbaa !5
  %480 = load i32, ptr %22, align 4, !tbaa !5
  %481 = sub nsw i32 %480, 1
  %482 = sext i32 %481 to i64
  %483 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %482
  %484 = load i32, ptr %483, align 4, !tbaa !5
  %485 = sub nsw i32 %479, %484
  %486 = sext i32 %485 to i64
  %487 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %486
  %488 = load i32, ptr %487, align 4, !tbaa !5
  %489 = add nsw i32 %488, -1
  store i32 %489, ptr %487, align 4, !tbaa !5
  br label %490

490:                                              ; preds = %478
  %491 = load i32, ptr %22, align 4, !tbaa !5
  %492 = add nsw i32 %491, 1
  store i32 %492, ptr %22, align 4, !tbaa !5
  br label %473, !llvm.loop !27

493:                                              ; preds = %477
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %494

494:                                              ; preds = %493
  %495 = load i32, ptr @bsize, align 4, !tbaa !5
  %496 = load i32, ptr %11, align 4, !tbaa !5
  %497 = add nsw i32 %496, %495
  store i32 %497, ptr %11, align 4, !tbaa !5
  br label %255, !llvm.loop !28

498:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 1, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  store i32 1, ptr %26, align 4, !tbaa !5
  br label %499

499:                                              ; preds = %536, %498
  %500 = load i32, ptr %25, align 4, !tbaa !5
  %501 = load i32, ptr @s, align 4, !tbaa !5
  %502 = icmp sle i32 %500, %501
  br i1 %502, label %504, label %503

503:                                              ; preds = %499
  store i32 46, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %539

504:                                              ; preds = %499
  %505 = load i32, ptr %26, align 4, !tbaa !5
  %506 = sext i32 %505 to i64
  %507 = mul nsw i64 %506, 233
  %508 = srem i64 %507, 1000000007
  %509 = trunc i64 %508 to i32
  store i32 %509, ptr %26, align 4, !tbaa !5
  %510 = load i32, ptr %23, align 4, !tbaa !5
  %511 = sext i32 %510 to i64
  %512 = load i32, ptr %26, align 4, !tbaa !5
  %513 = sext i32 %512 to i64
  %514 = load i32, ptr %25, align 4, !tbaa !5
  %515 = sext i32 %514 to i64
  %516 = getelementptr inbounds [30001 x i32], ptr @ansl, i64 0, i64 %515
  %517 = load i32, ptr %516, align 4, !tbaa !5
  %518 = sext i32 %517 to i64
  %519 = mul nsw i64 %513, %518
  %520 = add nsw i64 %511, %519
  %521 = srem i64 %520, 1000000007
  %522 = trunc i64 %521 to i32
  store i32 %522, ptr %23, align 4, !tbaa !5
  %523 = load i32, ptr %24, align 4, !tbaa !5
  %524 = sext i32 %523 to i64
  %525 = load i32, ptr %26, align 4, !tbaa !5
  %526 = sext i32 %525 to i64
  %527 = load i32, ptr %25, align 4, !tbaa !5
  %528 = sext i32 %527 to i64
  %529 = getelementptr inbounds [30001 x i32], ptr @ansr, i64 0, i64 %528
  %530 = load i32, ptr %529, align 4, !tbaa !5
  %531 = sext i32 %530 to i64
  %532 = mul nsw i64 %526, %531
  %533 = add nsw i64 %524, %532
  %534 = srem i64 %533, 1000000007
  %535 = trunc i64 %534 to i32
  store i32 %535, ptr %24, align 4, !tbaa !5
  br label %536

536:                                              ; preds = %504
  %537 = load i32, ptr %25, align 4, !tbaa !5
  %538 = add nsw i32 %537, 1
  store i32 %538, ptr %25, align 4, !tbaa !5
  br label %499, !llvm.loop !29

539:                                              ; preds = %503
  %540 = load i32, ptr %23, align 4, !tbaa !5
  %541 = load i32, ptr %24, align 4, !tbaa !5
  %542 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %540, i32 noundef %541)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  store i32 1, ptr %27, align 4, !tbaa !5
  br label %543

543:                                              ; preds = %565, %539
  %544 = load i32, ptr %27, align 4, !tbaa !5
  %545 = load i32, ptr @n, align 4, !tbaa !5
  %546 = icmp sle i32 %544, %545
  br i1 %546, label %548, label %547

547:                                              ; preds = %543
  store i32 49, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %568

548:                                              ; preds = %543
  %549 = load i32, ptr %27, align 4, !tbaa !5
  %550 = sext i32 %549 to i64
  %551 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %550
  %552 = load i32, ptr %551, align 4, !tbaa !5
  %553 = sext i32 %552 to i64
  %554 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %553
  %555 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %554) #9
  %556 = icmp ugt i64 %555, 0
  br i1 %556, label %557, label %564

557:                                              ; preds = %548
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #9
  call void @llvm.memset.p0.i64(ptr align 8 %28, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #9
  %558 = load i32, ptr %27, align 4, !tbaa !5
  %559 = sext i32 %558 to i64
  %560 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %559
  %561 = load i32, ptr %560, align 4, !tbaa !5
  %562 = sext i32 %561 to i64
  %563 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %562
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %563) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #9
  br label %564

564:                                              ; preds = %557, %548
  br label %565

565:                                              ; preds = %564
  %566 = load i32, ptr %27, align 4, !tbaa !5
  %567 = add nsw i32 %566, 1
  store i32 %567, ptr %27, align 4, !tbaa !5
  br label %543, !llvm.loop !30

568:                                              ; preds = %547
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %30, !llvm.loop !31

569:                                              ; preds = %30
  ret i32 0
}

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #7

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

; 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, ...) #5

; 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 void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { 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 = !{i64 0, i64 16, !15, i64 16, i64 16, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"long double", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !16, i64 0}
!20 = !{!"_ZTS7complex", !16, i64 0, !16, i64 16}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !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"

%struct.complex = type { x86_fp80, x86_fp80 }
%"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 }

@X = external dso_local global [65536 x %struct.complex], align 16
@len = external dso_local local_unnamed_addr global i32, align 4
@bitlen = external dso_local local_unnamed_addr global i32, align 4
@bitrev = external dso_local local_unnamed_addr global [65536 x i32], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@a = external dso_local global [30001 x i32], align 16
@s = external dso_local local_unnamed_addr global i32, align 4
@bsize = external dso_local local_unnamed_addr global i32, align 4
@f = external dso_local local_unnamed_addr global [30001 x i32], align 16
@g = external dso_local local_unnamed_addr global [30001 x i32], align 16
@rk = external dso_local local_unnamed_addr global [30001 x i32], align 16
@ansl = external dso_local local_unnamed_addr global [30001 x i32], align 16
@ansr = external dso_local local_unnamed_addr global [30001 x i32], align 16
@pos = external dso_local global [30001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK7complexS1_(ptr dead_on_unwind noalias writable sret(%struct.complex) align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(32)) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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

.loopexit147:                                     ; preds = %317, %._crit_edge228
  %10 = load i32, ptr @t, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  store i32 %11, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %._crit_edge238, label %.lr.ph237, !llvm.loop !9

.lr.ph237:                                        ; preds = %0, %.loopexit147
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  store i32 1, ptr %1, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %.not127160 = icmp slt i32 %13, 1
  br i1 %.not127160, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph237
  %.lcssa = phi i32 [ %13, %.lr.ph237 ], [ %34, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  %14 = sext i32 %.lcssa to i64
  %15 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !5
  store i32 %16, ptr @s, align 4, !tbaa !5
  store i32 0, ptr @bitlen, align 4, !tbaa !5
  %17 = shl i32 %16, 1
  %.not129163 = icmp slt i32 %17, 1
  br i1 %.not129163, label %.preheader150.thread, label %.lr.ph166

.preheader150.thread:                             ; preds = %._crit_edge
  store i32 1, ptr @len, align 4, !tbaa !5
  br label %._crit_edge172

.lr.ph:                                           ; preds = %.lr.ph237, %.lr.ph
  %storemerge161 = phi i32 [ %33, %.lr.ph ], [ 1, %.lr.ph237 ]
  %18 = sext i32 %storemerge161 to i64
  %19 = getelementptr inbounds i32, ptr @a, i64 %18
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %19)
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = add nsw i32 %21, -1
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = sext i32 %21 to i64
  %27 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = add nsw i32 %28, %25
  store i32 %29, ptr %27, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %30
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %32 = load i32, ptr %1, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %1, align 4, !tbaa !5
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %.not127.not = icmp slt i32 %32, %34
  br i1 %.not127.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader150:                                    ; preds = %.lr.ph166
  store i32 %40, ptr @bitlen, align 4, !tbaa !5
  store i32 %41, ptr @len, align 4, !tbaa !5
  %35 = icmp sgt i32 %41, 1
  br i1 %35, label %.lr.ph171, label %._crit_edge172

.lr.ph171:                                        ; preds = %.preheader150
  %36 = icmp eq i32 %41, 2
  br i1 %36, label %._crit_edge172.loopexit.epilog-lcssa, label %.lr.ph171.new

.lr.ph171.new:                                    ; preds = %.lr.ph171
  %wide.trip.count = zext nneg i32 %41 to i64
  %37 = shl nuw i32 1, %39
  %38 = add nsw i64 %wide.trip.count, -4
  br label %66

.lr.ph166:                                        ; preds = %._crit_edge, %.lr.ph166
  %storemerge128164 = phi i32 [ %41, %.lr.ph166 ], [ 1, %._crit_edge ]
  %39 = phi i32 [ %40, %.lr.ph166 ], [ 0, %._crit_edge ]
  %40 = add nuw nsw i32 %39, 1
  %41 = shl i32 %storemerge128164, 1
  %.not129 = icmp sgt i32 %41, %17
  br i1 %.not129, label %.preheader150, label %.lr.ph166, !llvm.loop !12

._crit_edge172.loopexit.epilog-lcssa:             ; preds = %66, %.lr.ph171
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph171 ], [ %indvars.iv.next.1, %66 ]
  %42 = trunc nuw nsw i64 %indvars.iv.unr to i32
  %43 = lshr i64 %indvars.iv.unr, 1
  %44 = and i64 %43, 2147483647
  %45 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = ashr i32 %46, 1
  %48 = and i32 %42, 1
  %49 = shl nuw i32 %48, %39
  %50 = or i32 %49, %47
  %51 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %indvars.iv.unr
  store i32 %50, ptr %51, align 4, !tbaa !5
  br label %._crit_edge172

._crit_edge172:                                   ; preds = %._crit_edge172.loopexit.epilog-lcssa, %.preheader150.thread, %.preheader150
  %52 = phi i32 [ 0, %.preheader150.thread ], [ %40, %.preheader150 ], [ %40, %._crit_edge172.loopexit.epilog-lcssa ]
  %53 = mul i32 %.lcssa, 100
  %54 = mul i32 %53, %52
  %55 = sitofp i32 %54 to double
  %56 = call double @sqrt(double noundef %55) #9
  %57 = call double @llvm.ceil.f64(double %56)
  %58 = fptosi double %57 to i32
  store i32 %58, ptr @bsize, align 4, !tbaa !5
  %59 = load i32, ptr @s, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = shl nsw i64 %61, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @f, i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @g, i8 0, i64 %62, i1 false)
  %63 = load i32, ptr @n, align 4, !tbaa !5
  %.not130173 = icmp slt i32 %63, 1
  br i1 %.not130173, label %.preheader149, label %.lr.ph176.preheader

.lr.ph176.preheader:                              ; preds = %._crit_edge172
  %.pre = load i32, ptr @a, align 16, !tbaa !5
  %64 = zext nneg i32 %63 to i64
  %xtraiter356 = and i64 %64, 1
  %65 = icmp eq i32 %63, 1
  br i1 %65, label %.preheader149.loopexit.unr-lcssa, label %.lr.ph176.preheader.new

.lr.ph176.preheader.new:                          ; preds = %.lr.ph176.preheader
  %unroll_iter358 = and i64 %64, 2147483646
  br label %.lr.ph176

66:                                               ; preds = %66, %.lr.ph171.new
  %indvars.iv = phi i64 [ 1, %.lr.ph171.new ], [ %indvars.iv.next.1, %66 ]
  %niter = phi i64 [ 0, %.lr.ph171.new ], [ %niter.next.1, %66 ]
  %67 = lshr i64 %indvars.iv, 1
  %68 = and i64 %67, 2147483647
  %69 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = ashr i32 %70, 1
  %72 = or i32 %37, %71
  %73 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %indvars.iv
  store i32 %72, ptr %73, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %74 = lshr i64 %indvars.iv.next, 1
  %75 = and i64 %74, 2147483647
  %76 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = ashr i32 %77, 1
  %79 = getelementptr inbounds [65536 x i32], ptr @bitrev, i64 0, i64 %indvars.iv.next
  store i32 %78, ptr %79, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter, %38
  br i1 %niter.ncmp.1, label %._crit_edge172.loopexit.epilog-lcssa, label %66, !llvm.loop !13

.preheader149.loopexit.unr-lcssa:                 ; preds = %.lr.ph176, %.lr.ph176.preheader
  %.unr = phi i32 [ %.pre, %.lr.ph176.preheader ], [ %106, %.lr.ph176 ]
  %indvars.iv255.unr = phi i64 [ 1, %.lr.ph176.preheader ], [ %indvars.iv.next256.1, %.lr.ph176 ]
  %lcmp.mod357.not = icmp eq i64 %xtraiter356, 0
  br i1 %lcmp.mod357.not, label %.preheader149, label %.lr.ph176.epil

.lr.ph176.epil:                                   ; preds = %.preheader149.loopexit.unr-lcssa
  %80 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %indvars.iv255.unr
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %83, align 4, !tbaa !5
  %86 = sub nsw i32 %59, %.unr
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %88, align 4, !tbaa !5
  br label %.preheader149

.preheader149:                                    ; preds = %.lr.ph176.epil, %.preheader149.loopexit.unr-lcssa, %._crit_edge172
  %91 = load i32, ptr @len, align 4, !tbaa !5
  %92 = icmp sgt i32 %91, 0
  br i1 %92, label %.lr.ph178, label %._crit_edge179

.lr.ph176:                                        ; preds = %.lr.ph176, %.lr.ph176.preheader.new
  %93 = phi i32 [ %.pre, %.lr.ph176.preheader.new ], [ %106, %.lr.ph176 ]
  %indvars.iv255 = phi i64 [ 1, %.lr.ph176.preheader.new ], [ %indvars.iv.next256.1, %.lr.ph176 ]
  %niter359 = phi i64 [ 0, %.lr.ph176.preheader.new ], [ %niter359.next.1, %.lr.ph176 ]
  %94 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %indvars.iv255
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %97, align 4, !tbaa !5
  %100 = sub nsw i32 %59, %93
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %102, align 4, !tbaa !5
  %indvars.iv.next256 = add nuw nsw i64 %indvars.iv255, 1
  %105 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %indvars.iv.next256
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !5
  %111 = sub nsw i32 %59, %95
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %113, align 4, !tbaa !5
  %indvars.iv.next256.1 = add nuw nsw i64 %indvars.iv255, 2
  %niter359.next.1 = add i64 %niter359, 2
  %niter359.ncmp.1 = icmp eq i64 %niter359.next.1, %unroll_iter358
  br i1 %niter359.ncmp.1, label %.preheader149.loopexit.unr-lcssa, label %.lr.ph176, !llvm.loop !14

._crit_edge179:                                   ; preds = %130, %.preheader149
  %.lcssa151 = phi i32 [ %91, %.preheader149 ], [ %132, %130 ]
  call void @_Z3FFTP7complexii(ptr noundef nonnull @X, i32 noundef %.lcssa151, i32 noundef 1)
  %116 = load i32, ptr @len, align 4, !tbaa !5
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %.lr.ph183, label %._crit_edge184

.lr.ph178:                                        ; preds = %.preheader149, %130
  %indvars.iv260 = phi i64 [ %indvars.iv.next261, %130 ], [ 0, %.preheader149 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #9
  %118 = load i32, ptr @s, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %.not144 = icmp sgt i64 %indvars.iv260, %119
  br i1 %.not144, label %129, label %120

120:                                              ; preds = %.lr.ph178
  %121 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %indvars.iv260
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %indvars.iv260
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = add nsw i32 %124, %122
  %126 = sitofp i32 %125 to x86_fp80
  %127 = sub nsw i32 %122, %124
  %128 = sitofp i32 %127 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %2, x86_fp80 noundef %126, x86_fp80 noundef %128)
  br label %130

129:                                              ; preds = %.lr.ph178
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %2, x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef 0xK00000000000000000000)
  br label %130

130:                                              ; preds = %129, %120
  %131 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %indvars.iv260
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %131, ptr noundef nonnull align 16 dereferenceable(32) %2, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  %indvars.iv.next261 = add nuw nsw i64 %indvars.iv260, 1
  %132 = load i32, ptr @len, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = icmp slt i64 %indvars.iv.next261, %133
  br i1 %134, label %.lr.ph178, label %._crit_edge179, !llvm.loop !18

._crit_edge184:                                   ; preds = %.lr.ph183, %._crit_edge179
  %.lcssa152 = phi i32 [ %116, %._crit_edge179 ], [ %139, %.lr.ph183 ]
  call void @_Z3FFTP7complexii(ptr noundef nonnull @X, i32 noundef %.lcssa152, i32 noundef -1)
  %135 = load i32, ptr @s, align 4, !tbaa !5
  %.not131186 = icmp slt i32 %135, 1
  br i1 %.not131186, label %._crit_edge184.._crit_edge190_crit_edge, label %.lr.ph189.preheader

._crit_edge184.._crit_edge190_crit_edge:          ; preds = %._crit_edge184
  %.pre304 = add nsw i32 %135, 1
  br label %._crit_edge190

.lr.ph189.preheader:                              ; preds = %._crit_edge184
  %136 = zext nneg i32 %135 to i64
  %137 = add nuw i32 %135, 1
  %wide.trip.count269 = zext i32 %137 to i64
  br label %.lr.ph189

.lr.ph183:                                        ; preds = %._crit_edge179, %.lr.ph183
  %indvars.iv263 = phi i64 [ %indvars.iv.next264, %.lr.ph183 ], [ 0, %._crit_edge179 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  %138 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %indvars.iv263
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %3, ptr noundef nonnull align 16 dereferenceable(32) %138, ptr noundef nonnull align 16 dereferenceable(32) %138)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %138, ptr noundef nonnull align 16 dereferenceable(32) %3, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  %indvars.iv.next264 = add nuw nsw i64 %indvars.iv263, 1
  %139 = load i32, ptr @len, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = icmp slt i64 %indvars.iv.next264, %140
  br i1 %141, label %.lr.ph183, label %._crit_edge184, !llvm.loop !19

._crit_edge190:                                   ; preds = %157, %._crit_edge184.._crit_edge190_crit_edge
  %.pre-phi = phi i32 [ %.pre304, %._crit_edge184.._crit_edge190_crit_edge ], [ %137, %157 ]
  %142 = sext i32 %.pre-phi to i64
  %143 = shl nsw i64 %142, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @g, i8 0, i64 %143, i1 false)
  %144 = load i32, ptr @n, align 4, !tbaa !5
  %.not132218 = icmp slt i32 %144, 1
  br i1 %.not132218, label %.preheader148, label %.lr.ph221.preheader

.lr.ph221.preheader:                              ; preds = %._crit_edge190
  %.pre302 = load i32, ptr @bsize, align 4, !tbaa !5
  br label %.lr.ph221

.lr.ph189:                                        ; preds = %.lr.ph189.preheader, %157
  %indvars.iv266 = phi i64 [ 1, %.lr.ph189.preheader ], [ %indvars.iv.next267, %157 ]
  %145 = add nuw nsw i64 %indvars.iv266, %136
  %146 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %145
  %147 = load x86_fp80, ptr %146, align 16, !tbaa !20
  %148 = fadd x86_fp80 %147, 0xK3FFE8000000000000000
  %149 = fptosi x86_fp80 %148 to i32
  %150 = ashr i32 %149, 2
  %151 = add nsw i32 %150, 1
  %152 = ashr i32 %151, 1
  %153 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %indvars.iv266
  store i32 %152, ptr %153, align 4, !tbaa !5
  %.not143 = icmp ult i32 %151, 2
  br i1 %.not143, label %154, label %157

154:                                              ; preds = %.lr.ph189
  %155 = getelementptr inbounds [30001 x i32], ptr @ansr, i64 0, i64 %indvars.iv266
  store i32 0, ptr %155, align 4, !tbaa !5
  %156 = getelementptr inbounds [30001 x i32], ptr @ansl, i64 0, i64 %indvars.iv266
  store i32 0, ptr %156, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %154, %.lr.ph189
  %indvars.iv.next267 = add nuw nsw i64 %indvars.iv266, 1
  %exitcond270.not = icmp eq i64 %indvars.iv.next267, %wide.trip.count269
  br i1 %exitcond270.not, label %._crit_edge190, label %.lr.ph189, !llvm.loop !22

.preheader148:                                    ; preds = %._crit_edge217, %._crit_edge190
  %158 = phi i32 [ %135, %._crit_edge190 ], [ %221, %._crit_edge217 ]
  %.not133222 = icmp slt i32 %158, 1
  br i1 %.not133222, label %._crit_edge228, label %.lr.ph227.preheader

.lr.ph227.preheader:                              ; preds = %.preheader148
  %159 = add nuw i32 %158, 1
  %wide.trip.count297 = zext i32 %159 to i64
  br label %.lr.ph227

.lr.ph221:                                        ; preds = %.lr.ph221.preheader, %._crit_edge217
  %160 = phi i32 [ %221, %._crit_edge217 ], [ %135, %.lr.ph221.preheader ]
  %161 = phi i32 [ %272, %._crit_edge217 ], [ %.pre302, %.lr.ph221.preheader ]
  %162 = phi i32 [ %274, %._crit_edge217 ], [ %144, %.lr.ph221.preheader ]
  %.0109219 = phi i32 [ %273, %._crit_edge217 ], [ 1, %.lr.ph221.preheader ]
  %163 = add nsw i32 %161, %.0109219
  %.not136 = icmp sgt i32 %163, %162
  %164 = add nsw i32 %163, -1
  %165 = select i1 %.not136, i32 %162, i32 %164
  %.not137192 = icmp sgt i32 %.0109219, %165
  br i1 %.not137192, label %.preheader146, label %.lr.ph195

.lr.ph195:                                        ; preds = %.lr.ph221
  %166 = sext i32 %.0109219 to i64
  %167 = add i32 %165, 1
  %168 = sub i32 %167, %.0109219
  %xtraiter360 = and i32 %168, 1
  %lcmp.mod361.not = icmp eq i32 %xtraiter360, 0
  br i1 %lcmp.mod361.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph195
  %169 = add nsw i64 %166, -1
  %170 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = sub nsw i32 %160, %171
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %174, align 4, !tbaa !5
  %indvars.iv.next272.prol = add nsw i64 %166, 1
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph195
  %indvars.iv271.unr = phi i64 [ %166, %.lr.ph195 ], [ %indvars.iv.next272.prol, %.prol.loopexit.unr-lcssa ]
  %177 = icmp eq i32 %165, %.0109219
  br i1 %177, label %.preheader146, label %.lr.ph195.new

.preheader146:                                    ; preds = %.prol.loopexit, %.lr.ph195.new, %.lr.ph221
  %178 = load i32, ptr @len, align 4, !tbaa !5
  %179 = icmp sgt i32 %178, 0
  br i1 %179, label %.lr.ph197, label %._crit_edge198

.lr.ph195.new:                                    ; preds = %.prol.loopexit, %.lr.ph195.new
  %indvars.iv271 = phi i64 [ %indvars.iv.next272.1, %.lr.ph195.new ], [ %indvars.iv271.unr, %.prol.loopexit ]
  %180 = add nsw i64 %indvars.iv271, -1
  %181 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = sub nsw i32 %160, %182
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %185, align 4, !tbaa !5
  %188 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %indvars.iv271
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = sub nsw i32 %160, %189
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %191
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %192, align 4, !tbaa !5
  %indvars.iv.next272.1 = add nsw i64 %indvars.iv271, 2
  %lftr.wideiv.1 = trunc i64 %indvars.iv.next272.1 to i32
  %exitcond274.not.1 = icmp eq i32 %167, %lftr.wideiv.1
  br i1 %exitcond274.not.1, label %.preheader146, label %.lr.ph195.new, !llvm.loop !23

._crit_edge198:                                   ; preds = %209, %.preheader146
  %.lcssa154 = phi i32 [ %178, %.preheader146 ], [ %211, %209 ]
  call void @_Z3FFTP7complexii(ptr noundef nonnull @X, i32 noundef %.lcssa154, i32 noundef 1)
  %195 = load i32, ptr @len, align 4, !tbaa !5
  %196 = icmp sgt i32 %195, 0
  br i1 %196, label %.lr.ph202, label %._crit_edge203

.lr.ph197:                                        ; preds = %.preheader146, %209
  %indvars.iv275 = phi i64 [ %indvars.iv.next276, %209 ], [ 0, %.preheader146 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #9
  %197 = load i32, ptr @s, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %.not142 = icmp sgt i64 %indvars.iv275, %198
  br i1 %.not142, label %208, label %199

199:                                              ; preds = %.lr.ph197
  %200 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %indvars.iv275
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %indvars.iv275
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = add nsw i32 %203, %201
  %205 = sitofp i32 %204 to x86_fp80
  %206 = sub nsw i32 %201, %203
  %207 = sitofp i32 %206 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %4, x86_fp80 noundef %205, x86_fp80 noundef %207)
  br label %209

208:                                              ; preds = %.lr.ph197
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %4, x86_fp80 noundef 0xK00000000000000000000, x86_fp80 noundef 0xK00000000000000000000)
  br label %209

209:                                              ; preds = %208, %199
  %210 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %indvars.iv275
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %210, ptr noundef nonnull align 16 dereferenceable(32) %4, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #9
  %indvars.iv.next276 = add nuw nsw i64 %indvars.iv275, 1
  %211 = load i32, ptr @len, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = icmp slt i64 %indvars.iv.next276, %212
  br i1 %213, label %.lr.ph197, label %._crit_edge198, !llvm.loop !24

._crit_edge203:                                   ; preds = %.lr.ph202, %._crit_edge198
  %.lcssa155 = phi i32 [ %195, %._crit_edge198 ], [ %218, %.lr.ph202 ]
  call void @_Z3FFTP7complexii(ptr noundef nonnull @X, i32 noundef %.lcssa155, i32 noundef -1)
  %214 = load i32, ptr @s, align 4, !tbaa !5
  %.not138208 = icmp slt i32 %214, 1
  br i1 %.not138208, label %.preheader145, label %.lr.ph212

.lr.ph212:                                        ; preds = %._crit_edge203
  %215 = sext i32 %.0109219 to i64
  %216 = add i32 %165, 1
  br label %234

.lr.ph202:                                        ; preds = %._crit_edge198, %.lr.ph202
  %indvars.iv278 = phi i64 [ %indvars.iv.next279, %.lr.ph202 ], [ 0, %._crit_edge198 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  %217 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %indvars.iv278
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %5, ptr noundef nonnull align 16 dereferenceable(32) %217, ptr noundef nonnull align 16 dereferenceable(32) %217)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %217, ptr noundef nonnull align 16 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  %indvars.iv.next279 = add nuw nsw i64 %indvars.iv278, 1
  %218 = load i32, ptr @len, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = icmp slt i64 %indvars.iv.next279, %219
  br i1 %220, label %.lr.ph202, label %._crit_edge203, !llvm.loop !25

.preheader145:                                    ; preds = %.loopexit, %._crit_edge203
  %221 = phi i32 [ %214, %._crit_edge203 ], [ %270, %.loopexit ]
  br i1 %.not137192, label %._crit_edge217, label %.lr.ph216.preheader

.lr.ph216.preheader:                              ; preds = %.preheader145
  %222 = sext i32 %.0109219 to i64
  %223 = add i32 %165, 1
  %224 = sub i32 %223, %.0109219
  %xtraiter362 = and i32 %224, 1
  %lcmp.mod363.not = icmp eq i32 %xtraiter362, 0
  br i1 %lcmp.mod363.not, label %.lr.ph216.prol.loopexit, label %.lr.ph216.prol

.lr.ph216.prol:                                   ; preds = %.lr.ph216.preheader
  %225 = add nsw i64 %222, -1
  %226 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = sub nsw i32 %221, %227
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %229
  %231 = load i32, ptr %230, align 4, !tbaa !5
  %232 = add nsw i32 %231, -1
  store i32 %232, ptr %230, align 4, !tbaa !5
  %indvars.iv.next290.prol = add nsw i64 %222, 1
  br label %.lr.ph216.prol.loopexit

.lr.ph216.prol.loopexit:                          ; preds = %.lr.ph216.prol, %.lr.ph216.preheader
  %indvars.iv289.unr = phi i64 [ %222, %.lr.ph216.preheader ], [ %indvars.iv.next290.prol, %.lr.ph216.prol ]
  %233 = icmp eq i32 %165, %.0109219
  br i1 %233, label %._crit_edge217, label %.lr.ph216

234:                                              ; preds = %.lr.ph212, %.loopexit
  %235 = phi i32 [ %214, %.lr.ph212 ], [ %270, %.loopexit ]
  %indvars.iv286 = phi i64 [ 1, %.lr.ph212 ], [ %indvars.iv.next287, %.loopexit ]
  %236 = getelementptr inbounds [30001 x i32], ptr @rk, i64 0, i64 %indvars.iv286
  %237 = load i32, ptr %236, align 4, !tbaa !5
  %.not140 = icmp eq i32 %237, 0
  br i1 %.not140, label %.loopexit, label %238

238:                                              ; preds = %234
  %239 = trunc nuw nsw i64 %indvars.iv286 to i32
  %240 = add nsw i32 %235, %239
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds [65536 x %struct.complex], ptr @X, i64 0, i64 %241
  %243 = load x86_fp80, ptr %242, align 16, !tbaa !20
  %244 = fadd x86_fp80 %243, 0xK3FFE8000000000000000
  %245 = fptosi x86_fp80 %244 to i32
  %246 = ashr i32 %245, 2
  %247 = icmp sgt i32 %237, %246
  br i1 %247, label %248, label %.preheader

.preheader:                                       ; preds = %238
  br i1 %.not137192, label %.loopexit, label %.lr.ph207

248:                                              ; preds = %238
  %249 = sub nsw i32 %237, %246
  store i32 %249, ptr %236, align 4, !tbaa !5
  br label %.loopexit

.lr.ph207:                                        ; preds = %.preheader, %259
  %indvars.iv281 = phi i64 [ %indvars.iv.next282, %259 ], [ %215, %.preheader ]
  %250 = phi i32 [ %260, %259 ], [ %237, %.preheader ]
  %251 = add nsw i64 %indvars.iv281, -1
  %252 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = add nsw i32 %253, %239
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [30001 x i32], ptr @f, i64 0, i64 %255
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = icmp sgt i32 %250, %257
  br i1 %258, label %259, label %261

259:                                              ; preds = %.lr.ph207
  %260 = sub nsw i32 %250, %257
  store i32 %260, ptr %236, align 4, !tbaa !5
  %indvars.iv.next282 = add nsw i64 %indvars.iv281, 1
  %lftr.wideiv284 = trunc i64 %indvars.iv.next282 to i32
  %exitcond285.not = icmp eq i32 %216, %lftr.wideiv284
  br i1 %exitcond285.not, label %.loopexit, label %.lr.ph207, !llvm.loop !26

261:                                              ; preds = %.lr.ph207
  %262 = trunc nsw i64 %indvars.iv281 to i32
  %263 = getelementptr inbounds [30001 x i32], ptr @ansl, i64 0, i64 %indvars.iv286
  store i32 %262, ptr %263, align 4, !tbaa !5
  %264 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %255
  %265 = add nsw i32 %250, -1
  %266 = sext i32 %265 to i64
  %267 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %264, i64 noundef %266) #9
  %268 = load i32, ptr %267, align 4, !tbaa !5
  %269 = getelementptr inbounds [30001 x i32], ptr @ansr, i64 0, i64 %indvars.iv286
  store i32 %268, ptr %269, align 4, !tbaa !5
  store i32 0, ptr %236, align 4, !tbaa !5
  %.pre303 = load i32, ptr @s, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %259, %.preheader, %248, %261, %234
  %270 = phi i32 [ %235, %.preheader ], [ %235, %248 ], [ %.pre303, %261 ], [ %235, %234 ], [ %235, %259 ]
  %indvars.iv.next287 = add nuw nsw i64 %indvars.iv286, 1
  %271 = sext i32 %270 to i64
  %.not138.not = icmp slt i64 %indvars.iv286, %271
  br i1 %.not138.not, label %234, label %.preheader145, !llvm.loop !27

._crit_edge217:                                   ; preds = %.lr.ph216.prol.loopexit, %.lr.ph216, %.preheader145
  %272 = load i32, ptr @bsize, align 4, !tbaa !5
  %273 = add nsw i32 %272, %.0109219
  %274 = load i32, ptr @n, align 4, !tbaa !5
  %.not132 = icmp sgt i32 %273, %274
  br i1 %.not132, label %.preheader148, label %.lr.ph221, !llvm.loop !28

.lr.ph216:                                        ; preds = %.lr.ph216.prol.loopexit, %.lr.ph216
  %indvars.iv289 = phi i64 [ %indvars.iv.next290.1, %.lr.ph216 ], [ %indvars.iv289.unr, %.lr.ph216.prol.loopexit ]
  %275 = add nsw i64 %indvars.iv289, -1
  %276 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %275
  %277 = load i32, ptr %276, align 4, !tbaa !5
  %278 = sub nsw i32 %221, %277
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = add nsw i32 %281, -1
  store i32 %282, ptr %280, align 4, !tbaa !5
  %283 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %indvars.iv289
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = sub nsw i32 %221, %284
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [30001 x i32], ptr @g, i64 0, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = add nsw i32 %288, -1
  store i32 %289, ptr %287, align 4, !tbaa !5
  %indvars.iv.next290.1 = add nsw i64 %indvars.iv289, 2
  %lftr.wideiv292.1 = trunc i64 %indvars.iv.next290.1 to i32
  %exitcond293.not.1 = icmp eq i32 %223, %lftr.wideiv292.1
  br i1 %exitcond293.not.1, label %._crit_edge217, label %.lr.ph216, !llvm.loop !29

._crit_edge228.loopexit:                          ; preds = %.lr.ph227
  %290 = trunc nsw i64 %307 to i32
  %291 = trunc nsw i64 %301 to i32
  br label %._crit_edge228

._crit_edge228:                                   ; preds = %._crit_edge228.loopexit, %.preheader148
  %.0100.lcssa = phi i32 [ 0, %.preheader148 ], [ %291, %._crit_edge228.loopexit ]
  %.099.lcssa = phi i32 [ 0, %.preheader148 ], [ %290, %._crit_edge228.loopexit ]
  %292 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.0100.lcssa, i32 noundef %.099.lcssa)
  %293 = load i32, ptr @n, align 4, !tbaa !5
  %.not134231 = icmp slt i32 %293, 1
  br i1 %.not134231, label %.loopexit147, label %.lr.ph234

.lr.ph227:                                        ; preds = %.lr.ph227.preheader, %.lr.ph227
  %indvars.iv294 = phi i64 [ 1, %.lr.ph227.preheader ], [ %indvars.iv.next295, %.lr.ph227 ]
  %.097226 = phi i64 [ 1, %.lr.ph227.preheader ], [ %295, %.lr.ph227 ]
  %.099224 = phi i64 [ 0, %.lr.ph227.preheader ], [ %307, %.lr.ph227 ]
  %.0100223 = phi i64 [ 0, %.lr.ph227.preheader ], [ %301, %.lr.ph227 ]
  %294 = mul nsw i64 %.097226, 233
  %295 = srem i64 %294, 1000000007
  %296 = getelementptr inbounds [30001 x i32], ptr @ansl, i64 0, i64 %indvars.iv294
  %297 = load i32, ptr %296, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = mul nsw i64 %295, %298
  %300 = add nsw i64 %299, %.0100223
  %301 = srem i64 %300, 1000000007
  %302 = getelementptr inbounds [30001 x i32], ptr @ansr, i64 0, i64 %indvars.iv294
  %303 = load i32, ptr %302, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = mul nsw i64 %295, %304
  %306 = add nsw i64 %305, %.099224
  %307 = srem i64 %306, 1000000007
  %indvars.iv.next295 = add nuw nsw i64 %indvars.iv294, 1
  %exitcond298.not = icmp eq i64 %indvars.iv.next295, %wide.trip.count297
  br i1 %exitcond298.not, label %._crit_edge228.loopexit, label %.lr.ph227, !llvm.loop !30

.lr.ph234:                                        ; preds = %._crit_edge228, %317
  %indvars.iv299 = phi i64 [ %indvars.iv.next300, %317 ], [ 1, %._crit_edge228 ]
  %308 = getelementptr inbounds [30001 x i32], ptr @a, i64 0, i64 %indvars.iv299
  %309 = load i32, ptr %308, align 4, !tbaa !5
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %310
  %312 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %311) #9
  %.not135 = icmp eq i64 %312, 0
  br i1 %.not135, label %317, label %313

313:                                              ; preds = %.lr.ph234
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  %314 = load i32, ptr %308, align 4, !tbaa !5
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [30001 x %"class.std::vector"], ptr @pos, i64 0, i64 %315
  call void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %316) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #9
  br label %317

317:                                              ; preds = %.lr.ph234, %313
  %indvars.iv.next300 = add nuw nsw i64 %indvars.iv299, 1
  %318 = load i32, ptr @n, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %.not134.not = icmp slt i64 %indvars.iv299, %319
  br i1 %.not134.not, label %.lr.ph234, label %.loopexit147, !llvm.loop !31

._crit_edge238:                                   ; preds = %.loopexit147, %0
  ret i32 0
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #7

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

; 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: 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 void @_ZNSt6vectorIiSaIiEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { 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 = !{i64 0, i64 16, !16, i64 16, i64 16, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"long double", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = !{!21, !17, i64 0}
!21 = !{!"_ZTS7complex", !17, i64 0, !17, i64 16}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}


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