; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101194I.ll (Z5solveii)

; 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 { double, double }

@inv = external dso_local global [10001 x i32], align 16
@p = external dso_local global i32, align 4
@c = external dso_local global [101 x i32], align 16
@coeff = external dso_local global [2 x [10001 x i32]], align 16
@_ZZ5solveiiE1A = external hidden global [32769 x %struct.Complex], align 16
@_ZGVZ5solveiiE1A = external hidden global i64, align 8
@_ZZ5solveiiE1C = external hidden global [32769 x %struct.Complex], align 16
@_ZGVZ5solveiiE1C = external hidden global i64, align 8
@_ZZ5solveiiE1D = external hidden global [32769 x %struct.Complex], align 16
@_ZGVZ5solveiiE1D = external hidden global i64, align 8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7mod_powii(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 uwtable
declare dso_local void @_Z3FFTiP7Complexi(i32 noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; 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 uwtable
declare dso_local { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveii(i32 noundef %0, i32 noundef %1) #2 personality ptr @__gxx_personality_v0 {
  %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 ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.Complex, align 8
  %15 = alloca %struct.Complex, align 8
  %16 = alloca %struct.Complex, align 8
  %17 = alloca %struct.Complex, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.Complex, align 8
  %21 = alloca %struct.Complex, align 8
  %22 = alloca %struct.Complex, align 8
  %23 = alloca %struct.Complex, align 8
  %24 = alloca %struct.Complex, align 8
  %25 = alloca %struct.Complex, align 8
  %26 = alloca %struct.Complex, align 8
  %27 = alloca %struct.Complex, align 8
  %28 = alloca %struct.Complex, align 8
  %29 = alloca %struct.Complex, align 8
  %30 = alloca %struct.Complex, align 8
  %31 = alloca %struct.Complex, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = load i32, ptr @c, align 16, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %45, label %113

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %46 = load i32, ptr @p, align 4, !tbaa !5
  %47 = sub nsw i32 100, %46
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = call noundef i32 @_Z7mod_powii(i32 noundef %47, i32 noundef %48)
  store i32 %49, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %50 = load i32, ptr @p, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = load i32, ptr @p, align 4, !tbaa !5
  %53 = sub nsw i32 100, %52
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [10001 x i32], ptr @inv, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = mul nsw i64 %51, %57
  %59 = srem i64 %58, 1000000007
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %95, %45
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %66, label %65

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

66:                                               ; preds = %61
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = load i32, ptr %3, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %69
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [10001 x i32], ptr %70, i64 0, i64 %72
  store i32 %67, ptr %73, align 4, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = sub nsw i32 %76, %77
  %79 = sext i32 %78 to i64
  %80 = mul nsw i64 %75, %79
  %81 = srem i64 %80, 1000000007
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [10001 x i32], ptr @inv, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = mul nsw i64 %81, %87
  %89 = srem i64 %88, 1000000007
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = mul nsw i64 %89, %91
  %93 = srem i64 %92, 1000000007
  %94 = trunc i64 %93 to i32
  store i32 %94, ptr %5, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %66
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %7, align 4, !tbaa !5
  br label %61, !llvm.loop !9

98:                                               ; preds = %65
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %100
  %102 = getelementptr inbounds [10001 x i32], ptr %101, i64 0, i64 0
  %103 = load i32, ptr %4, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %102, i64 %104
  %106 = getelementptr inbounds i32, ptr %105, i64 1
  %107 = load i32, ptr @c, align 16, !tbaa !5
  %108 = load i32, ptr %4, align 4, !tbaa !5
  %109 = sub nsw i32 %107, %108
  %110 = sub nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = mul i64 %111, 4
  call void @llvm.memset.p0.i64(ptr align 4 %106, i8 0, i64 %112, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %528

113:                                              ; preds = %2
  %114 = load i32, ptr %4, align 4, !tbaa !5
  %115 = and i32 %114, 1
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %168

117:                                              ; preds = %113
  %118 = load i32, ptr %3, align 4, !tbaa !5
  %119 = xor i32 %118, 1
  %120 = load i32, ptr %4, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  call void @_Z5solveii(i32 noundef %119, i32 noundef %121)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %122 = load i32, ptr @c, align 16, !tbaa !5
  %123 = sub nsw i32 %122, 1
  store i32 %123, ptr %9, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %164, %117
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = load i32, ptr @c, align 16, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %167

129:                                              ; preds = %124
  %130 = load i32, ptr @p, align 4, !tbaa !5
  %131 = sub nsw i32 100, %130
  %132 = sext i32 %131 to i64
  %133 = load i32, ptr %3, align 4, !tbaa !5
  %134 = xor i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %135
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [10001 x i32], ptr %136, i64 0, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = mul nsw i64 %132, %141
  %143 = load i32, ptr @p, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = load i32, ptr %3, align 4, !tbaa !5
  %146 = xor i32 %145, 1
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %147
  %149 = load i32, ptr %9, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [10001 x i32], ptr %148, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = mul nsw i64 %144, %153
  %155 = add nsw i64 %142, %154
  %156 = srem i64 %155, 1000000007
  %157 = trunc i64 %156 to i32
  %158 = load i32, ptr %3, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %159
  %161 = load i32, ptr %8, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [10001 x i32], ptr %160, i64 0, i64 %162
  store i32 %157, ptr %163, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %129
  %165 = load i32, ptr %8, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %8, align 4, !tbaa !5
  store i32 %165, ptr %9, align 4, !tbaa !5
  br label %124, !llvm.loop !11

167:                                              ; preds = %128
  br label %527

168:                                              ; preds = %113
  %169 = load i32, ptr %3, align 4, !tbaa !5
  %170 = xor i32 %169, 1
  %171 = load i32, ptr %4, align 4, !tbaa !5
  %172 = ashr i32 %171, 1
  call void @_Z5solveii(i32 noundef %170, i32 noundef %172)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %173 = load atomic i8, ptr @_ZGVZ5solveiiE1A acquire, align 8
  %174 = icmp eq i8 %173, 0
  br i1 %174, label %175, label %185, !prof !12

175:                                              ; preds = %168
  %176 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ5solveiiE1A) #5
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %185

178:                                              ; preds = %175
  br label %179

179:                                              ; preds = %181, %178
  %180 = phi ptr [ @_ZZ5solveiiE1A, %178 ], [ %182, %181 ]
  invoke void @_ZN7ComplexC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %180)
          to label %181 unwind label %221

181:                                              ; preds = %179
  %182 = getelementptr inbounds %struct.Complex, ptr %180, i64 1
  %183 = icmp eq ptr %182, getelementptr inbounds (%struct.Complex, ptr @_ZZ5solveiiE1A, i64 32769)
  br i1 %183, label %184, label %179

184:                                              ; preds = %181
  call void @__cxa_guard_release(ptr @_ZGVZ5solveiiE1A) #5
  br label %185

185:                                              ; preds = %184, %175, %168
  %186 = load atomic i8, ptr @_ZGVZ5solveiiE1C acquire, align 8
  %187 = icmp eq i8 %186, 0
  br i1 %187, label %188, label %198, !prof !12

188:                                              ; preds = %185
  %189 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ5solveiiE1C) #5
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %198

191:                                              ; preds = %188
  br label %192

192:                                              ; preds = %194, %191
  %193 = phi ptr [ @_ZZ5solveiiE1C, %191 ], [ %195, %194 ]
  invoke void @_ZN7ComplexC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %193)
          to label %194 unwind label %225

194:                                              ; preds = %192
  %195 = getelementptr inbounds %struct.Complex, ptr %193, i64 1
  %196 = icmp eq ptr %195, getelementptr inbounds (%struct.Complex, ptr @_ZZ5solveiiE1C, i64 32769)
  br i1 %196, label %197, label %192

197:                                              ; preds = %194
  call void @__cxa_guard_release(ptr @_ZGVZ5solveiiE1C) #5
  br label %198

198:                                              ; preds = %197, %188, %185
  %199 = load atomic i8, ptr @_ZGVZ5solveiiE1D acquire, align 8
  %200 = icmp eq i8 %199, 0
  br i1 %200, label %201, label %211, !prof !12

201:                                              ; preds = %198
  %202 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ5solveiiE1D) #5
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %211

204:                                              ; preds = %201
  br label %205

205:                                              ; preds = %207, %204
  %206 = phi ptr [ @_ZZ5solveiiE1D, %204 ], [ %208, %207 ]
  invoke void @_ZN7ComplexC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %206)
          to label %207 unwind label %229

207:                                              ; preds = %205
  %208 = getelementptr inbounds %struct.Complex, ptr %206, i64 1
  %209 = icmp eq ptr %208, getelementptr inbounds (%struct.Complex, ptr @_ZZ5solveiiE1D, i64 32769)
  br i1 %209, label %210, label %205

210:                                              ; preds = %207
  call void @__cxa_guard_release(ptr @_ZGVZ5solveiiE1D) #5
  br label %211

211:                                              ; preds = %210, %201, %198
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %218, %211
  %213 = load i32, ptr %10, align 4, !tbaa !5
  %214 = load i32, ptr @c, align 16, !tbaa !5
  %215 = shl i32 %214, 1
  %216 = icmp slt i32 %213, %215
  br i1 %216, label %217, label %233

217:                                              ; preds = %212
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %10, align 4, !tbaa !5
  %220 = shl i32 %219, 1
  store i32 %220, ptr %10, align 4, !tbaa !5
  br label %212, !llvm.loop !13

221:                                              ; preds = %179
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %11, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %12, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ5solveiiE1A) #5
  br label %526

225:                                              ; preds = %192
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %11, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %12, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ5solveiiE1C) #5
  br label %526

229:                                              ; preds = %205
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %11, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %12, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ5solveiiE1D) #5
  br label %526

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

234:                                              ; preds = %269, %233
  %235 = load i32, ptr %13, align 4, !tbaa !5
  %236 = load i32, ptr %10, align 4, !tbaa !5
  %237 = icmp slt i32 %235, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %272

239:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %240 = load i32, ptr %13, align 4, !tbaa !5
  %241 = load i32, ptr @c, align 16, !tbaa !5
  %242 = icmp slt i32 %240, %241
  br i1 %242, label %243, label %264

243:                                              ; preds = %239
  %244 = load i32, ptr %3, align 4, !tbaa !5
  %245 = xor i32 %244, 1
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %246
  %248 = load i32, ptr %13, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [10001 x i32], ptr %247, i64 0, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = and i32 %251, 32767
  %253 = sitofp i32 %252 to double
  %254 = load i32, ptr %3, align 4, !tbaa !5
  %255 = xor i32 %254, 1
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %256
  %258 = load i32, ptr %13, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [10001 x i32], ptr %257, i64 0, i64 %259
  %261 = load i32, ptr %260, align 4, !tbaa !5
  %262 = ashr i32 %261, 15
  %263 = sitofp i32 %262 to double
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %14, double noundef %253, double noundef %263)
  br label %265

264:                                              ; preds = %239
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %14, double noundef 0.000000e+00, double noundef 0.000000e+00)
  br label %265

265:                                              ; preds = %264, %243
  %266 = load i32, ptr %13, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %267
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %268, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %269

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

272:                                              ; preds = %238
  %273 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z3FFTiP7Complexi(i32 noundef %273, ptr noundef @_ZZ5solveiiE1A, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %15, double noundef 5.000000e-01, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef 0.000000e+00, double noundef -5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef 0.000000e+00, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %274

274:                                              ; preds = %364, %272
  %275 = load i32, ptr %18, align 4, !tbaa !5
  %276 = load i32, ptr %10, align 4, !tbaa !5
  %277 = icmp slt i32 %275, %276
  br i1 %277, label %279, label %278

278:                                              ; preds = %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %367

279:                                              ; preds = %274
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %280 = load i32, ptr %10, align 4, !tbaa !5
  %281 = load i32, ptr %18, align 4, !tbaa !5
  %282 = sub nsw i32 %280, %281
  %283 = load i32, ptr %10, align 4, !tbaa !5
  %284 = sub nsw i32 %283, 1
  %285 = and i32 %282, %284
  store i32 %285, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %286 = load i32, ptr %18, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %287
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %289 = load i32, ptr %19, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %290
  %292 = call { double, double } @_ZNK7Complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %291)
  %293 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %294 = extractvalue { double, double } %292, 0
  store double %294, ptr %293, align 8
  %295 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %296 = extractvalue { double, double } %292, 1
  store double %296, ptr %295, align 8
  %297 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %288, ptr noundef nonnull align 8 dereferenceable(16) %22)
  %298 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %299 = extractvalue { double, double } %297, 0
  store double %299, ptr %298, align 8
  %300 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %301 = extractvalue { double, double } %297, 1
  store double %301, ptr %300, align 8
  %302 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %15)
  %303 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %304 = extractvalue { double, double } %302, 0
  store double %304, ptr %303, align 8
  %305 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %306 = extractvalue { double, double } %302, 1
  store double %306, ptr %305, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %307 = load i32, ptr %18, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %308
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %310 = load i32, ptr %19, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %311
  %313 = call { double, double } @_ZNK7Complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %312)
  %314 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %315 = extractvalue { double, double } %313, 0
  store double %315, ptr %314, align 8
  %316 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %317 = extractvalue { double, double } %313, 1
  store double %317, ptr %316, align 8
  %318 = call { double, double } @_ZNK7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %309, ptr noundef nonnull align 8 dereferenceable(16) %25)
  %319 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %320 = extractvalue { double, double } %318, 0
  store double %320, ptr %319, align 8
  %321 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %322 = extractvalue { double, double } %318, 1
  store double %322, ptr %321, align 8
  %323 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %324 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %325 = extractvalue { double, double } %323, 0
  store double %325, ptr %324, align 8
  %326 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %327 = extractvalue { double, double } %323, 1
  store double %327, ptr %326, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #5
  %328 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %329 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %330 = extractvalue { double, double } %328, 0
  store double %330, ptr %329, align 8
  %331 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %332 = extractvalue { double, double } %328, 1
  store double %332, ptr %331, align 8
  %333 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %28)
  %334 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %335 = extractvalue { double, double } %333, 0
  store double %335, ptr %334, align 8
  %336 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %337 = extractvalue { double, double } %333, 1
  store double %337, ptr %336, align 8
  %338 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %27)
  %339 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %340 = extractvalue { double, double } %338, 0
  store double %340, ptr %339, align 8
  %341 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %342 = extractvalue { double, double } %338, 1
  store double %342, ptr %341, align 8
  %343 = load i32, ptr %18, align 4, !tbaa !5
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %344
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %345, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  %346 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %347 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %348 = extractvalue { double, double } %346, 0
  store double %348, ptr %347, align 8
  %349 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %350 = extractvalue { double, double } %346, 1
  store double %350, ptr %349, align 8
  %351 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %31)
  %352 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %353 = extractvalue { double, double } %351, 0
  store double %353, ptr %352, align 8
  %354 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %355 = extractvalue { double, double } %351, 1
  store double %355, ptr %354, align 8
  %356 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(16) %30)
  %357 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %358 = extractvalue { double, double } %356, 0
  store double %358, ptr %357, align 8
  %359 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %360 = extractvalue { double, double } %356, 1
  store double %360, ptr %359, align 8
  %361 = load i32, ptr %18, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %362
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %363, ptr align 8 %29, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %364

364:                                              ; preds = %279
  %365 = load i32, ptr %18, align 4, !tbaa !5
  %366 = add nsw i32 %365, 1
  store i32 %366, ptr %18, align 4, !tbaa !5
  br label %274, !llvm.loop !18

367:                                              ; preds = %278
  %368 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z3FFTiP7Complexi(i32 noundef %368, ptr noundef @_ZZ5solveiiE1C, i32 noundef -1)
  %369 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z3FFTiP7Complexi(i32 noundef %369, ptr noundef @_ZZ5solveiiE1D, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %370

370:                                              ; preds = %433, %367
  %371 = load i32, ptr %32, align 4, !tbaa !5
  %372 = load i32, ptr @c, align 16, !tbaa !5
  %373 = icmp slt i32 %371, %372
  br i1 %373, label %375, label %374

374:                                              ; preds = %370
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  br label %436

375:                                              ; preds = %370
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %376 = load i32, ptr %32, align 4, !tbaa !5
  %377 = sext i32 %376 to i64
  %378 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %377
  %379 = getelementptr inbounds %struct.Complex, ptr %378, i32 0, i32 0
  %380 = load double, ptr %379, align 16, !tbaa !19
  %381 = fadd double %380, 5.000000e-01
  %382 = fptosi double %381 to i64
  %383 = srem i64 %382, 1000000007
  %384 = trunc i64 %383 to i32
  store i32 %384, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %385 = load i32, ptr %32, align 4, !tbaa !5
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %386
  %388 = getelementptr inbounds %struct.Complex, ptr %387, i32 0, i32 1
  %389 = load double, ptr %388, align 8, !tbaa !21
  %390 = fadd double %389, 5.000000e-01
  %391 = fptosi double %390 to i64
  %392 = srem i64 %391, 1000000007
  %393 = trunc i64 %392 to i32
  store i32 %393, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  %394 = load i32, ptr %32, align 4, !tbaa !5
  %395 = sext i32 %394 to i64
  %396 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %395
  %397 = getelementptr inbounds %struct.Complex, ptr %396, i32 0, i32 0
  %398 = load double, ptr %397, align 16, !tbaa !19
  %399 = fadd double %398, 5.000000e-01
  %400 = fptosi double %399 to i64
  %401 = srem i64 %400, 1000000007
  %402 = trunc i64 %401 to i32
  store i32 %402, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  %403 = load i32, ptr %32, align 4, !tbaa !5
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %404
  %406 = getelementptr inbounds %struct.Complex, ptr %405, i32 0, i32 1
  %407 = load double, ptr %406, align 8, !tbaa !21
  %408 = fadd double %407, 5.000000e-01
  %409 = fptosi double %408 to i64
  %410 = srem i64 %409, 1000000007
  %411 = trunc i64 %410 to i32
  store i32 %411, ptr %36, align 4, !tbaa !5
  %412 = load i32, ptr %36, align 4, !tbaa !5
  %413 = sext i32 %412 to i64
  %414 = shl i64 %413, 15
  %415 = load i32, ptr %34, align 4, !tbaa !5
  %416 = sext i32 %415 to i64
  %417 = add nsw i64 %414, %416
  %418 = load i32, ptr %35, align 4, !tbaa !5
  %419 = sext i32 %418 to i64
  %420 = add nsw i64 %417, %419
  %421 = shl i64 %420, 15
  %422 = load i32, ptr %33, align 4, !tbaa !5
  %423 = sext i32 %422 to i64
  %424 = add nsw i64 %421, %423
  %425 = srem i64 %424, 1000000007
  %426 = trunc i64 %425 to i32
  %427 = load i32, ptr %3, align 4, !tbaa !5
  %428 = sext i32 %427 to i64
  %429 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %428
  %430 = load i32, ptr %32, align 4, !tbaa !5
  %431 = sext i32 %430 to i64
  %432 = getelementptr inbounds [10001 x i32], ptr %429, i64 0, i64 %431
  store i32 %426, ptr %432, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  br label %433

433:                                              ; preds = %375
  %434 = load i32, ptr %32, align 4, !tbaa !5
  %435 = add nsw i32 %434, 1
  store i32 %435, ptr %32, align 4, !tbaa !5
  br label %370, !llvm.loop !22

436:                                              ; preds = %374
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  %437 = load i32, ptr @c, align 16, !tbaa !5
  store i32 %437, ptr %37, align 4, !tbaa !5
  br label %438

438:                                              ; preds = %522, %436
  %439 = load i32, ptr %37, align 4, !tbaa !5
  %440 = load i32, ptr @c, align 16, !tbaa !5
  %441 = shl i32 %440, 1
  %442 = icmp slt i32 %439, %441
  br i1 %442, label %444, label %443

443:                                              ; preds = %438
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  br label %525

444:                                              ; preds = %438
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  %445 = load i32, ptr %37, align 4, !tbaa !5
  %446 = sext i32 %445 to i64
  %447 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %446
  %448 = getelementptr inbounds %struct.Complex, ptr %447, i32 0, i32 0
  %449 = load double, ptr %448, align 16, !tbaa !19
  %450 = fadd double %449, 5.000000e-01
  %451 = fptosi double %450 to i64
  %452 = srem i64 %451, 1000000007
  %453 = trunc i64 %452 to i32
  store i32 %453, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #5
  %454 = load i32, ptr %37, align 4, !tbaa !5
  %455 = sext i32 %454 to i64
  %456 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %455
  %457 = getelementptr inbounds %struct.Complex, ptr %456, i32 0, i32 1
  %458 = load double, ptr %457, align 8, !tbaa !21
  %459 = fadd double %458, 5.000000e-01
  %460 = fptosi double %459 to i64
  %461 = srem i64 %460, 1000000007
  %462 = trunc i64 %461 to i32
  store i32 %462, ptr %39, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #5
  %463 = load i32, ptr %37, align 4, !tbaa !5
  %464 = sext i32 %463 to i64
  %465 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %464
  %466 = getelementptr inbounds %struct.Complex, ptr %465, i32 0, i32 0
  %467 = load double, ptr %466, align 16, !tbaa !19
  %468 = fadd double %467, 5.000000e-01
  %469 = fptosi double %468 to i64
  %470 = srem i64 %469, 1000000007
  %471 = trunc i64 %470 to i32
  store i32 %471, ptr %40, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #5
  %472 = load i32, ptr %37, align 4, !tbaa !5
  %473 = sext i32 %472 to i64
  %474 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %473
  %475 = getelementptr inbounds %struct.Complex, ptr %474, i32 0, i32 1
  %476 = load double, ptr %475, align 8, !tbaa !21
  %477 = fadd double %476, 5.000000e-01
  %478 = fptosi double %477 to i64
  %479 = srem i64 %478, 1000000007
  %480 = trunc i64 %479 to i32
  store i32 %480, ptr %41, align 4, !tbaa !5
  %481 = load i32, ptr %41, align 4, !tbaa !5
  %482 = sext i32 %481 to i64
  %483 = shl i64 %482, 15
  %484 = load i32, ptr %39, align 4, !tbaa !5
  %485 = sext i32 %484 to i64
  %486 = add nsw i64 %483, %485
  %487 = load i32, ptr %40, align 4, !tbaa !5
  %488 = sext i32 %487 to i64
  %489 = add nsw i64 %486, %488
  %490 = shl i64 %489, 15
  %491 = load i32, ptr %38, align 4, !tbaa !5
  %492 = sext i32 %491 to i64
  %493 = add nsw i64 %490, %492
  %494 = srem i64 %493, 1000000007
  %495 = load i32, ptr %3, align 4, !tbaa !5
  %496 = sext i32 %495 to i64
  %497 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %496
  %498 = load i32, ptr %37, align 4, !tbaa !5
  %499 = load i32, ptr @c, align 16, !tbaa !5
  %500 = sub nsw i32 %498, %499
  %501 = sext i32 %500 to i64
  %502 = getelementptr inbounds [10001 x i32], ptr %497, i64 0, i64 %501
  %503 = load i32, ptr %502, align 4, !tbaa !5
  %504 = sext i32 %503 to i64
  %505 = add nsw i64 %504, %494
  %506 = trunc i64 %505 to i32
  store i32 %506, ptr %502, align 4, !tbaa !5
  %507 = icmp sge i32 %506, 1000000007
  br i1 %507, label %508, label %520

508:                                              ; preds = %444
  %509 = load i32, ptr %3, align 4, !tbaa !5
  %510 = sext i32 %509 to i64
  %511 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %510
  %512 = load i32, ptr %37, align 4, !tbaa !5
  %513 = load i32, ptr @c, align 16, !tbaa !5
  %514 = sub nsw i32 %512, %513
  %515 = sext i32 %514 to i64
  %516 = getelementptr inbounds [10001 x i32], ptr %511, i64 0, i64 %515
  %517 = load i32, ptr %516, align 4, !tbaa !5
  %518 = sub nsw i32 %517, 1000000007
  store i32 %518, ptr %516, align 4, !tbaa !5
  %519 = icmp ne i32 %518, 0
  br label %520

520:                                              ; preds = %508, %444
  %521 = phi i1 [ false, %444 ], [ %519, %508 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %522

522:                                              ; preds = %520
  %523 = load i32, ptr %37, align 4, !tbaa !5
  %524 = add nsw i32 %523, 1
  store i32 %524, ptr %37, align 4, !tbaa !5
  br label %438, !llvm.loop !23

525:                                              ; preds = %443
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %527

526:                                              ; preds = %229, %225, %221
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %529

527:                                              ; preds = %525, %167
  br label %528

528:                                              ; preds = %527, %98
  ret void

529:                                              ; preds = %526
  %530 = load ptr, ptr %11, align 8
  %531 = load i32, ptr %12, align 4
  %532 = insertvalue { ptr, i32 } poison, ptr %530, 0
  %533 = insertvalue { ptr, i32 } %532, i32 %531, 1
  resume { ptr, i32 } %533
}

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

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #5

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7Complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!"branch_weights", i32 1, i32 1048575}
!13 = distinct !{!13, !10}
!14 = !{i64 0, i64 8, !15, i64 8, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !16, i64 0}
!20 = !{!"_ZTS7Complex", !16, i64 0, !16, i64 8}
!21 = !{!20, !16, i64 8}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !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 { double, double }

@inv = external dso_local local_unnamed_addr global [10001 x i32], align 16
@p = external dso_local local_unnamed_addr global i32, align 4
@c = external dso_local local_unnamed_addr global [101 x i32], align 16
@coeff = external dso_local local_unnamed_addr global [2 x [10001 x i32]], align 16
@_ZZ5solveiiE1A = external hidden global [32769 x %struct.Complex], align 16
@_ZGVZ5solveiiE1A = external hidden global i64, align 8
@_ZZ5solveiiE1C = external hidden global [32769 x %struct.Complex], align 16
@_ZGVZ5solveiiE1C = external hidden global i64, align 8
@_ZZ5solveiiE1D = external hidden global [32769 x %struct.Complex], align 16
@_ZGVZ5solveiiE1D = external hidden global i64, align 8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7mod_powii(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 uwtable
declare dso_local void @_Z3FFTiP7Complexi(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; 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 uwtable
declare dso_local { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solveii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.Complex, align 8
  %4 = alloca %struct.Complex, align 8
  %5 = alloca %struct.Complex, align 8
  %6 = alloca %struct.Complex, align 8
  %7 = alloca %struct.Complex, align 8
  %8 = alloca %struct.Complex, align 8
  %9 = alloca %struct.Complex, align 8
  %10 = alloca %struct.Complex, align 8
  %11 = alloca %struct.Complex, align 8
  %12 = alloca %struct.Complex, align 8
  %13 = alloca %struct.Complex, align 8
  %14 = alloca %struct.Complex, align 8
  %15 = alloca %struct.Complex, align 8
  %16 = alloca %struct.Complex, align 8
  %17 = load i32, ptr @c, align 16, !tbaa !5
  %18 = icmp sgt i32 %17, %1
  br i1 %18, label %19, label %56

19:                                               ; preds = %2
  %20 = load i32, ptr @p, align 4, !tbaa !5
  %21 = sub nsw i32 100, %20
  %22 = tail call noundef i32 @_Z7mod_powii(i32 noundef %21, i32 noundef %1)
  %23 = load i32, ptr @p, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = sub nsw i32 100, %23
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [10001 x i32], ptr @inv, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = mul nsw i64 %29, %24
  %31 = srem i64 %30, 1000000007
  %.not105124 = icmp slt i32 %1, 0
  %.pre = sext i32 %0 to i64
  br i1 %.not105124, label %.._crit_edge129_crit_edge, label %.lr.ph128

.._crit_edge129_crit_edge:                        ; preds = %19
  %.pre156 = sext i32 %1 to i64
  br label %._crit_edge129

.lr.ph128:                                        ; preds = %19
  %32 = zext nneg i32 %1 to i64
  %33 = add nuw nsw i32 %1, 1
  %wide.trip.count154 = zext nneg i32 %33 to i64
  br label %42

._crit_edge129:                                   ; preds = %42, %.._crit_edge129_crit_edge
  %.pre-phi157 = phi i64 [ %.pre156, %.._crit_edge129_crit_edge ], [ %32, %42 ]
  %34 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %.pre
  %35 = getelementptr inbounds i32, ptr %34, i64 %.pre-phi157
  %36 = getelementptr inbounds i8, ptr %35, i64 4
  %37 = load i32, ptr @c, align 16, !tbaa !5
  %38 = xor i32 %1, -1
  %39 = add i32 %37, %38
  %40 = sext i32 %39 to i64
  %41 = shl nsw i64 %40, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %36, i8 0, i64 %41, i1 false)
  br label %.loopexit

42:                                               ; preds = %.lr.ph128, %42
  %indvars.iv151 = phi i64 [ 0, %.lr.ph128 ], [ %indvars.iv.next152, %42 ]
  %.0126 = phi i32 [ %22, %.lr.ph128 ], [ %55, %42 ]
  %43 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %.pre, i64 %indvars.iv151
  store i32 %.0126, ptr %43, align 4, !tbaa !5
  %44 = sext i32 %.0126 to i64
  %45 = sub nsw i64 %32, %indvars.iv151
  %46 = mul nsw i64 %45, %44
  %47 = srem i64 %46, 1000000007
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %48 = getelementptr inbounds [10001 x i32], ptr @inv, i64 0, i64 %indvars.iv.next152
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = mul nsw i64 %47, %50
  %52 = srem i64 %51, 1000000007
  %53 = mul nsw i64 %52, %31
  %54 = srem i64 %53, 1000000007
  %55 = trunc nsw i64 %54 to i32
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count154
  br i1 %exitcond155.not, label %._crit_edge129, label %42, !llvm.loop !9

56:                                               ; preds = %2
  %57 = and i32 %1, 1
  %.not = icmp eq i32 %57, 0
  %58 = xor i32 %0, 1
  br i1 %.not, label %85, label %59

59:                                               ; preds = %56
  %60 = add nsw i32 %1, -1
  tail call void @_Z5solveii(i32 noundef %58, i32 noundef %60)
  %61 = load i32, ptr @c, align 16, !tbaa !5
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %59
  %63 = add nsw i32 %61, -1
  %64 = load i32, ptr @p, align 4, !tbaa !5
  %65 = sub nsw i32 100, %64
  %66 = sext i32 %65 to i64
  %67 = sext i32 %58 to i64
  %68 = sext i32 %64 to i64
  %69 = sext i32 %0 to i64
  %wide.trip.count = zext nneg i32 %61 to i64
  br label %70

70:                                               ; preds = %.lr.ph, %70
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %70 ]
  %.085110 = phi i32 [ %63, %.lr.ph ], [ %84, %70 ]
  %71 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %67, i64 %indvars.iv
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = mul nsw i64 %66, %73
  %75 = sext i32 %.085110 to i64
  %76 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %67, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = mul nsw i64 %78, %68
  %80 = add nsw i64 %79, %74
  %81 = srem i64 %80, 1000000007
  %82 = trunc nsw i64 %81 to i32
  %83 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %69, i64 %indvars.iv
  store i32 %82, ptr %83, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %84 = trunc nuw nsw i64 %indvars.iv to i32
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %70, !llvm.loop !11

85:                                               ; preds = %56
  %86 = ashr exact i32 %1, 1
  tail call void @_Z5solveii(i32 noundef %58, i32 noundef %86)
  %87 = load atomic i8, ptr @_ZGVZ5solveiiE1A acquire, align 8
  %88 = icmp eq i8 %87, 0
  br i1 %88, label %89, label %93, !prof !12

89:                                               ; preds = %85
  %90 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ5solveiiE1A) #6
  %.not93 = icmp eq i32 %90, 0
  br i1 %.not93, label %93, label %.preheader109

.preheader109:                                    ; preds = %89, %.preheader109
  %.idx = phi i64 [ %.add, %.preheader109 ], [ 0, %89 ]
  %.ptr = getelementptr inbounds i8, ptr @_ZZ5solveiiE1A, i64 %.idx
  tail call void @_ZN7ComplexC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr)
  %.add = add nuw nsw i64 %.idx, 16
  %91 = icmp eq i64 %.add, 524304
  br i1 %91, label %92, label %.preheader109

92:                                               ; preds = %.preheader109
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ5solveiiE1A) #6
  br label %93

93:                                               ; preds = %92, %89, %85
  %94 = load atomic i8, ptr @_ZGVZ5solveiiE1C acquire, align 8
  %95 = icmp eq i8 %94, 0
  br i1 %95, label %96, label %100, !prof !12

96:                                               ; preds = %93
  %97 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ5solveiiE1C) #6
  %.not95 = icmp eq i32 %97, 0
  br i1 %.not95, label %100, label %.preheader108

.preheader108:                                    ; preds = %96, %.preheader108
  %.idx96 = phi i64 [ %.add97, %.preheader108 ], [ 0, %96 ]
  %.ptr98 = getelementptr inbounds i8, ptr @_ZZ5solveiiE1C, i64 %.idx96
  tail call void @_ZN7ComplexC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr98)
  %.add97 = add nuw nsw i64 %.idx96, 16
  %98 = icmp eq i64 %.add97, 524304
  br i1 %98, label %99, label %.preheader108

99:                                               ; preds = %.preheader108
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ5solveiiE1C) #6
  br label %100

100:                                              ; preds = %99, %96, %93
  %101 = load atomic i8, ptr @_ZGVZ5solveiiE1D acquire, align 8
  %102 = icmp eq i8 %101, 0
  br i1 %102, label %103, label %107, !prof !12

103:                                              ; preds = %100
  %104 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ5solveiiE1D) #6
  %.not100 = icmp eq i32 %104, 0
  br i1 %.not100, label %107, label %.preheader107

.preheader107:                                    ; preds = %103, %.preheader107
  %.idx101 = phi i64 [ %.add102, %.preheader107 ], [ 0, %103 ]
  %.ptr103 = getelementptr inbounds i8, ptr @_ZZ5solveiiE1D, i64 %.idx101
  tail call void @_ZN7ComplexC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.ptr103)
  %.add102 = add nuw nsw i64 %.idx101, 16
  %105 = icmp eq i64 %.add102, 524304
  br i1 %105, label %106, label %.preheader107

106:                                              ; preds = %.preheader107
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ5solveiiE1D) #6
  br label %107

107:                                              ; preds = %106, %103, %100
  %108 = load i32, ptr @c, align 16, !tbaa !5
  %109 = shl i32 %108, 1
  br label %110

110:                                              ; preds = %110, %107
  %.087 = phi i32 [ 1, %107 ], [ %112, %110 ]
  %111 = icmp slt i32 %.087, %109
  %112 = shl i32 %.087, 1
  br i1 %111, label %110, label %.preheader106, !llvm.loop !13

.preheader106:                                    ; preds = %110
  %113 = icmp sgt i32 %.087, 0
  br i1 %113, label %.lr.ph113, label %._crit_edge117.critedge

.lr.ph113:                                        ; preds = %.preheader106
  %114 = sext i32 %58 to i64
  %wide.trip.count134 = zext nneg i32 %.087 to i64
  br label %126

._crit_edge:                                      ; preds = %138
  call void @_Z3FFTiP7Complexi(i32 noundef %.087, ptr noundef nonnull @_ZZ5solveiiE1A, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef 5.000000e-01, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef 0.000000e+00, double noundef -5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef 0.000000e+00, double noundef 1.000000e+00)
  br i1 %113, label %.lr.ph116, label %._crit_edge117

.lr.ph116:                                        ; preds = %._crit_edge
  %115 = add nsw i32 %.087, -1
  %116 = getelementptr inbounds i8, ptr %9, i64 8
  %117 = getelementptr inbounds i8, ptr %8, i64 8
  %118 = getelementptr inbounds i8, ptr %7, i64 8
  %119 = getelementptr inbounds i8, ptr %12, i64 8
  %120 = getelementptr inbounds i8, ptr %11, i64 8
  %121 = getelementptr inbounds i8, ptr %10, i64 8
  %122 = getelementptr inbounds i8, ptr %14, i64 8
  %123 = getelementptr inbounds i8, ptr %13, i64 8
  %124 = getelementptr inbounds i8, ptr %16, i64 8
  %125 = getelementptr inbounds i8, ptr %15, i64 8
  %wide.trip.count139 = zext nneg i32 %.087 to i64
  br label %143

126:                                              ; preds = %.lr.ph113, %138
  %indvars.iv131 = phi i64 [ 0, %.lr.ph113 ], [ %indvars.iv.next132, %138 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %127 = load i32, ptr @c, align 16, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = icmp slt i64 %indvars.iv131, %128
  br i1 %129, label %130, label %137

130:                                              ; preds = %126
  %131 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %114, i64 %indvars.iv131
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = and i32 %132, 32767
  %134 = uitofp nneg i32 %133 to double
  %135 = ashr i32 %132, 15
  %136 = sitofp i32 %135 to double
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %3, double noundef %134, double noundef %136)
  br label %138

137:                                              ; preds = %126
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %3, double noundef 0.000000e+00, double noundef 0.000000e+00)
  br label %138

138:                                              ; preds = %137, %130
  %139 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %indvars.iv131
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %139, ptr noundef nonnull align 8 dereferenceable(16) %3, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond135.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count134
  br i1 %exitcond135.not, label %._crit_edge, label %126, !llvm.loop !17

._crit_edge117.critedge:                          ; preds = %.preheader106
  tail call void @_Z3FFTiP7Complexi(i32 noundef %.087, ptr noundef nonnull @_ZZ5solveiiE1A, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef 5.000000e-01, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef 0.000000e+00, double noundef -5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef 0.000000e+00, double noundef 1.000000e+00)
  br label %._crit_edge117

._crit_edge117:                                   ; preds = %143, %._crit_edge117.critedge, %._crit_edge
  call void @_Z3FFTiP7Complexi(i32 noundef %.087, ptr noundef nonnull @_ZZ5solveiiE1C, i32 noundef -1)
  call void @_Z3FFTiP7Complexi(i32 noundef %.087, ptr noundef nonnull @_ZZ5solveiiE1D, i32 noundef -1)
  %140 = load i32, ptr @c, align 16, !tbaa !5
  %141 = icmp sgt i32 %140, 0
  br i1 %141, label %.lr.ph120, label %.preheader

.lr.ph120:                                        ; preds = %._crit_edge117
  %142 = sext i32 %0 to i64
  %wide.trip.count144 = zext nneg i32 %140 to i64
  br label %192

143:                                              ; preds = %.lr.ph116, %143
  %indvars.iv136 = phi i64 [ 0, %.lr.ph116 ], [ %indvars.iv.next137, %143 ]
  %144 = trunc i64 %indvars.iv136 to i32
  %145 = sub i32 %.087, %144
  %146 = and i32 %145, %115
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %147 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %indvars.iv136
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %148 = sext i32 %146 to i64
  %149 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1A, i64 0, i64 %148
  %150 = call { double, double } @_ZNK7Complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %149)
  %151 = extractvalue { double, double } %150, 0
  store double %151, ptr %9, align 8
  %152 = extractvalue { double, double } %150, 1
  store double %152, ptr %116, align 8
  %153 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %147, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %154 = extractvalue { double, double } %153, 0
  store double %154, ptr %8, align 8
  %155 = extractvalue { double, double } %153, 1
  store double %155, ptr %117, align 8
  %156 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %157 = extractvalue { double, double } %156, 0
  store double %157, ptr %7, align 8
  %158 = extractvalue { double, double } %156, 1
  store double %158, ptr %118, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  %159 = call { double, double } @_ZNK7Complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %149)
  %160 = extractvalue { double, double } %159, 0
  store double %160, ptr %12, align 8
  %161 = extractvalue { double, double } %159, 1
  store double %161, ptr %119, align 8
  %162 = call { double, double } @_ZNK7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %147, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %163 = extractvalue { double, double } %162, 0
  store double %163, ptr %11, align 8
  %164 = extractvalue { double, double } %162, 1
  store double %164, ptr %120, align 8
  %165 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %166 = extractvalue { double, double } %165, 0
  store double %166, ptr %10, align 8
  %167 = extractvalue { double, double } %165, 1
  store double %167, ptr %121, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  %168 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %169 = extractvalue { double, double } %168, 0
  store double %169, ptr %14, align 8
  %170 = extractvalue { double, double } %168, 1
  store double %170, ptr %122, align 8
  %171 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %172 = extractvalue { double, double } %171, 0
  store double %172, ptr %13, align 8
  %173 = extractvalue { double, double } %171, 1
  store double %173, ptr %123, align 8
  %174 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %175 = extractvalue { double, double } %174, 0
  %176 = extractvalue { double, double } %174, 1
  %177 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %indvars.iv136
  store double %175, ptr %177, align 16, !tbaa !15
  %.sroa.424.0..sroa_idx = getelementptr inbounds i8, ptr %177, i64 8
  store double %176, ptr %.sroa.424.0..sroa_idx, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #6
  %178 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %179 = extractvalue { double, double } %178, 0
  store double %179, ptr %16, align 8
  %180 = extractvalue { double, double } %178, 1
  store double %180, ptr %124, align 8
  %181 = call { double, double } @_ZNK7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %182 = extractvalue { double, double } %181, 0
  store double %182, ptr %15, align 8
  %183 = extractvalue { double, double } %181, 1
  store double %183, ptr %125, align 8
  %184 = call { double, double } @_ZNK7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %15)
  %185 = extractvalue { double, double } %184, 0
  %186 = extractvalue { double, double } %184, 1
  %187 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %indvars.iv136
  store double %185, ptr %187, align 16, !tbaa !15
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %187, i64 8
  store double %186, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond140.not = icmp eq i64 %indvars.iv.next137, %wide.trip.count139
  br i1 %exitcond140.not, label %._crit_edge117, label %143, !llvm.loop !18

.preheader:                                       ; preds = %192, %._crit_edge117
  %188 = shl i32 %140, 1
  %189 = icmp slt i32 %140, %188
  br i1 %189, label %.lr.ph122, label %._crit_edge123

.lr.ph122:                                        ; preds = %.preheader
  %190 = sext i32 %0 to i64
  %191 = sext i32 %140 to i64
  %wide.trip.count149 = sext i32 %188 to i64
  br label %221

192:                                              ; preds = %.lr.ph120, %192
  %indvars.iv141 = phi i64 [ 0, %.lr.ph120 ], [ %indvars.iv.next142, %192 ]
  %193 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %indvars.iv141
  %194 = load double, ptr %193, align 16, !tbaa !19
  %195 = fadd double %194, 5.000000e-01
  %196 = fptosi double %195 to i64
  %197 = srem i64 %196, 1000000007
  %198 = getelementptr inbounds i8, ptr %193, i64 8
  %199 = load double, ptr %198, align 8, !tbaa !21
  %200 = fadd double %199, 5.000000e-01
  %201 = fptosi double %200 to i64
  %202 = srem i64 %201, 1000000007
  %203 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %indvars.iv141
  %204 = load double, ptr %203, align 16, !tbaa !19
  %205 = fadd double %204, 5.000000e-01
  %206 = fptosi double %205 to i64
  %207 = srem i64 %206, 1000000007
  %208 = getelementptr inbounds i8, ptr %203, i64 8
  %209 = load double, ptr %208, align 8, !tbaa !21
  %210 = fadd double %209, 5.000000e-01
  %211 = fptosi double %210 to i64
  %212 = srem i64 %211, 1000000007
  %213 = add nsw i64 %207, %202
  %214 = shl nsw i64 %212, 30
  %215 = shl nsw i64 %213, 15
  %216 = add nsw i64 %214, %215
  %217 = add nsw i64 %216, %197
  %218 = srem i64 %217, 1000000007
  %219 = trunc nsw i64 %218 to i32
  %220 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %142, i64 %indvars.iv141
  store i32 %219, ptr %220, align 4, !tbaa !5
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next142, %wide.trip.count144
  br i1 %exitcond145.not, label %.preheader, label %192, !llvm.loop !22

._crit_edge123:                                   ; preds = %221, %.preheader
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %.loopexit

221:                                              ; preds = %.lr.ph122, %221
  %indvars.iv146 = phi i64 [ %191, %.lr.ph122 ], [ %indvars.iv.next147, %221 ]
  %222 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1C, i64 0, i64 %indvars.iv146
  %223 = load double, ptr %222, align 16, !tbaa !19
  %224 = fadd double %223, 5.000000e-01
  %225 = fptosi double %224 to i64
  %226 = srem i64 %225, 1000000007
  %227 = getelementptr inbounds i8, ptr %222, i64 8
  %228 = load double, ptr %227, align 8, !tbaa !21
  %229 = fadd double %228, 5.000000e-01
  %230 = fptosi double %229 to i64
  %231 = srem i64 %230, 1000000007
  %232 = getelementptr inbounds [32769 x %struct.Complex], ptr @_ZZ5solveiiE1D, i64 0, i64 %indvars.iv146
  %233 = load double, ptr %232, align 16, !tbaa !19
  %234 = fadd double %233, 5.000000e-01
  %235 = fptosi double %234 to i64
  %236 = srem i64 %235, 1000000007
  %237 = getelementptr inbounds i8, ptr %232, i64 8
  %238 = load double, ptr %237, align 8, !tbaa !21
  %239 = fadd double %238, 5.000000e-01
  %240 = fptosi double %239 to i64
  %241 = srem i64 %240, 1000000007
  %242 = add nsw i64 %236, %231
  %243 = shl nsw i64 %241, 30
  %244 = shl nsw i64 %242, 15
  %245 = add nsw i64 %243, %244
  %246 = add nsw i64 %245, %226
  %247 = srem i64 %246, 1000000007
  %248 = sub nsw i64 %indvars.iv146, %191
  %249 = getelementptr inbounds [2 x [10001 x i32]], ptr @coeff, i64 0, i64 %190, i64 %248
  %250 = load i32, ptr %249, align 4, !tbaa !5
  %251 = trunc nsw i64 %247 to i32
  %252 = add i32 %250, %251
  %253 = icmp sgt i32 %252, 1000000006
  %254 = add nsw i32 %252, -1000000007
  %spec.select = select i1 %253, i32 %254, i32 %252
  store i32 %spec.select, ptr %249, align 4, !tbaa !5
  %indvars.iv.next147 = add nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %wide.trip.count149
  br i1 %exitcond150.not, label %._crit_edge123, label %221, !llvm.loop !23

.loopexit:                                        ; preds = %70, %59, %._crit_edge123, %._crit_edge129
  ret void
}

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

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZNK7Complex4conjEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nofree nounwind }
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 = !{!"branch_weights", i32 1, i32 1048575}
!13 = distinct !{!13, !10}
!14 = !{i64 0, i64 8, !15, i64 8, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = !{!20, !16, i64 0}
!20 = !{!"_ZTS7Complex", !16, i64 0, !16, i64 8}
!21 = !{!20, !16, i64 8}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


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