; LLVM IR from tangjz/acm-icpc :: 51nod (1172)

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

@X1 = external dso_local global [65536 x %struct.complex], align 16
@X2 = external dso_local global [65536 x %struct.complex], align 16
@Y1 = external dso_local global [65536 x %struct.complex], align 16
@Y2 = external dso_local global [65536 x %struct.complex], align 16
@t = external dso_local global [65536 x %struct.complex], align 16
@inv = external dso_local global [50001 x i32], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ans = external dso_local global [50001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 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 uwtable
declare dso_local void @_ZplRK7complexS1_(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: 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 %struct.complex, align 16
  %6 = alloca %struct.complex, align 16
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.complex, align 16
  %10 = alloca %struct.complex, align 16
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.complex, align 16
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.complex, align 16
  %17 = alloca %struct.complex, align 16
  %18 = alloca %struct.complex, align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.complex, align 16
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  store i32 1, ptr getelementptr inbounds ([50001 x i32], ptr @inv, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %47, %0
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sdiv i32 1000000007, %31
  %33 = sext i32 %32 to i64
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = srem i32 1000000007, %34
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [50001 x i32], ptr @inv, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = mul nsw i64 %33, %39
  %41 = srem i64 %40, 1000000007
  %42 = sub nsw i64 1000000007, %41
  %43 = trunc i64 %42 to i32
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [50001 x i32], ptr @inv, i64 0, i64 %45
  store i32 %43, ptr %46, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %30
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !9

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

51:                                               ; preds = %70, %50
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %56, label %55

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

56:                                               ; preds = %51
  %57 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.6, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #6
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = srem i32 %58, 31623
  %60 = sitofp i32 %59 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %5, x86_fp80 noundef %60, x86_fp80 noundef 0xK00000000000000000000)
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [65536 x %struct.complex], ptr @X1, i64 0, i64 %62
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %63, ptr align 16 %5, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #6
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = sdiv i32 %64, 31623
  %66 = sitofp i32 %65 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %6, x86_fp80 noundef %66, x86_fp80 noundef 0xK00000000000000000000)
  %67 = load i32, ptr %3, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [65536 x %struct.complex], ptr @X2, i64 0, i64 %68
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %69, ptr align 16 %6, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #6
  br label %70

70:                                               ; preds = %56
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %3, align 4, !tbaa !5
  br label %51, !llvm.loop !14

73:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %109, %73
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %112

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = srem i32 %80, 31623
  %82 = sitofp i32 %81 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %9, x86_fp80 noundef %82, x86_fp80 noundef 0xK00000000000000000000)
  %83 = load i32, ptr %7, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [65536 x %struct.complex], ptr @Y1, i64 0, i64 %84
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %85, ptr align 16 %9, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #6
  %86 = load i32, ptr %8, align 4, !tbaa !5
  %87 = sdiv i32 %86, 31623
  %88 = sitofp i32 %87 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %10, x86_fp80 noundef %88, x86_fp80 noundef 0xK00000000000000000000)
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [65536 x %struct.complex], ptr @Y2, i64 0, i64 %90
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %91, ptr align 16 %10, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #6
  %92 = load i32, ptr %8, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = load i32, ptr @m, align 4, !tbaa !5
  %95 = load i32, ptr %7, align 4, !tbaa !5
  %96 = add nsw i32 %94, %95
  %97 = sext i32 %96 to i64
  %98 = mul nsw i64 %93, %97
  %99 = srem i64 %98, 1000000007
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [50001 x i32], ptr @inv, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = mul nsw i64 %99, %105
  %107 = srem i64 %106, 1000000007
  %108 = trunc i64 %107 to i32
  store i32 %108, ptr %8, align 4, !tbaa !5
  br label %109

109:                                              ; preds = %79
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !5
  br label %74, !llvm.loop !15

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

113:                                              ; preds = %119, %112
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = load i32, ptr @n, align 4, !tbaa !5
  %116 = shl i32 %115, 1
  %117 = icmp slt i32 %114, %116
  br i1 %117, label %118, label %122

118:                                              ; preds = %113
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %11, align 4, !tbaa !5
  %121 = shl i32 %120, 1
  store i32 %121, ptr %11, align 4, !tbaa !5
  br label %113, !llvm.loop !16

122:                                              ; preds = %113
  %123 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @X1, i32 noundef %123, i32 noundef 1)
  %124 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @X2, i32 noundef %124, i32 noundef 1)
  %125 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @Y1, i32 noundef %125, i32 noundef 1)
  %126 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @Y2, i32 noundef %126, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %127

127:                                              ; preds = %142, %122
  %128 = load i32, ptr %12, align 4, !tbaa !5
  %129 = load i32, ptr %11, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %145

132:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  %133 = load i32, ptr %12, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [65536 x %struct.complex], ptr @X1, i64 0, i64 %134
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [65536 x %struct.complex], ptr @Y1, i64 0, i64 %137
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %13, ptr noundef nonnull align 16 dereferenceable(32) %135, ptr noundef nonnull align 16 dereferenceable(32) %138)
  %139 = load i32, ptr %12, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %140
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %141, ptr align 16 %13, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  br label %142

142:                                              ; preds = %132
  %143 = load i32, ptr %12, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %12, align 4, !tbaa !5
  br label %127, !llvm.loop !17

145:                                              ; preds = %131
  %146 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @t, i32 noundef %146, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %147

147:                                              ; preds = %165, %145
  %148 = load i32, ptr %14, align 4, !tbaa !5
  %149 = load i32, ptr @n, align 4, !tbaa !5
  %150 = icmp slt i32 %148, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %168

152:                                              ; preds = %147
  %153 = load i32, ptr %14, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %154
  %156 = getelementptr inbounds %struct.complex, ptr %155, i32 0, i32 0
  %157 = load x86_fp80, ptr %156, align 16, !tbaa !18
  %158 = fadd x86_fp80 %157, 0xK3FFE8000000000000000
  %159 = fptosi x86_fp80 %158 to i64
  %160 = srem i64 %159, 1000000007
  %161 = trunc i64 %160 to i32
  %162 = load i32, ptr %14, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %163
  store i32 %161, ptr %164, align 4, !tbaa !5
  br label %165

165:                                              ; preds = %152
  %166 = load i32, ptr %14, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %14, align 4, !tbaa !5
  br label %147, !llvm.loop !20

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

169:                                              ; preds = %190, %168
  %170 = load i32, ptr %15, align 4, !tbaa !5
  %171 = load i32, ptr %11, align 4, !tbaa !5
  %172 = icmp slt i32 %170, %171
  br i1 %172, label %174, label %173

173:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %193

174:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  %175 = load i32, ptr %15, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [65536 x %struct.complex], ptr @X1, i64 0, i64 %176
  %178 = load i32, ptr %15, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [65536 x %struct.complex], ptr @Y2, i64 0, i64 %179
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %17, ptr noundef nonnull align 16 dereferenceable(32) %177, ptr noundef nonnull align 16 dereferenceable(32) %180)
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %181 = load i32, ptr %15, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [65536 x %struct.complex], ptr @X2, i64 0, i64 %182
  %184 = load i32, ptr %15, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [65536 x %struct.complex], ptr @Y1, i64 0, i64 %185
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %18, ptr noundef nonnull align 16 dereferenceable(32) %183, ptr noundef nonnull align 16 dereferenceable(32) %186)
  call void @_ZplRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %16, ptr noundef nonnull align 16 dereferenceable(32) %17, ptr noundef nonnull align 16 dereferenceable(32) %18)
  %187 = load i32, ptr %15, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %188
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %189, ptr align 16 %16, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  br label %190

190:                                              ; preds = %174
  %191 = load i32, ptr %15, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %15, align 4, !tbaa !5
  br label %169, !llvm.loop !21

193:                                              ; preds = %173
  %194 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @t, i32 noundef %194, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %195

195:                                              ; preds = %221, %193
  %196 = load i32, ptr %19, align 4, !tbaa !5
  %197 = load i32, ptr @n, align 4, !tbaa !5
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %200, label %199

199:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %224

200:                                              ; preds = %195
  %201 = load i32, ptr %19, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = load i32, ptr %19, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %207
  %209 = getelementptr inbounds %struct.complex, ptr %208, i32 0, i32 0
  %210 = load x86_fp80, ptr %209, align 16, !tbaa !18
  %211 = fadd x86_fp80 %210, 0xK3FFE8000000000000000
  %212 = fptosi x86_fp80 %211 to i64
  %213 = srem i64 %212, 1000000007
  %214 = mul nsw i64 %213, 31623
  %215 = add nsw i64 %205, %214
  %216 = srem i64 %215, 1000000007
  %217 = trunc i64 %216 to i32
  %218 = load i32, ptr %19, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %219
  store i32 %217, ptr %220, align 4, !tbaa !5
  br label %221

221:                                              ; preds = %200
  %222 = load i32, ptr %19, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %19, align 4, !tbaa !5
  br label %195, !llvm.loop !22

224:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %225

225:                                              ; preds = %240, %224
  %226 = load i32, ptr %20, align 4, !tbaa !5
  %227 = load i32, ptr %11, align 4, !tbaa !5
  %228 = icmp slt i32 %226, %227
  br i1 %228, label %230, label %229

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

230:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  %231 = load i32, ptr %20, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [65536 x %struct.complex], ptr @X2, i64 0, i64 %232
  %234 = load i32, ptr %20, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [65536 x %struct.complex], ptr @Y2, i64 0, i64 %235
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind writable sret(%struct.complex) align 16 %21, ptr noundef nonnull align 16 dereferenceable(32) %233, ptr noundef nonnull align 16 dereferenceable(32) %236)
  %237 = load i32, ptr %20, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %238
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %239, ptr align 16 %21, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  br label %240

240:                                              ; preds = %230
  %241 = load i32, ptr %20, align 4, !tbaa !5
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %20, align 4, !tbaa !5
  br label %225, !llvm.loop !23

243:                                              ; preds = %229
  %244 = load i32, ptr %11, align 4, !tbaa !5
  call void @_Z3FFTP7complexii(ptr noundef @t, i32 noundef %244, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %271, %243
  %246 = load i32, ptr %22, align 4, !tbaa !5
  %247 = load i32, ptr @n, align 4, !tbaa !5
  %248 = icmp slt i32 %246, %247
  br i1 %248, label %250, label %249

249:                                              ; preds = %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %274

250:                                              ; preds = %245
  %251 = load i32, ptr %22, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %252
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = load i32, ptr %22, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %257
  %259 = getelementptr inbounds %struct.complex, ptr %258, i32 0, i32 0
  %260 = load x86_fp80, ptr %259, align 16, !tbaa !18
  %261 = fadd x86_fp80 %260, 0xK3FFE8000000000000000
  %262 = fptosi x86_fp80 %261 to i64
  %263 = srem i64 %262, 1000000007
  %264 = mul nsw i64 %263, 14122
  %265 = add nsw i64 %255, %264
  %266 = srem i64 %265, 1000000007
  %267 = trunc i64 %266 to i32
  %268 = load i32, ptr %22, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %269
  store i32 %267, ptr %270, align 4, !tbaa !5
  br label %271

271:                                              ; preds = %250
  %272 = load i32, ptr %22, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %22, align 4, !tbaa !5
  br label %245, !llvm.loop !24

274:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %275

275:                                              ; preds = %286, %274
  %276 = load i32, ptr %23, align 4, !tbaa !5
  %277 = load i32, ptr @n, align 4, !tbaa !5
  %278 = icmp slt i32 %276, %277
  br i1 %278, label %280, label %279

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

280:                                              ; preds = %275
  %281 = load i32, ptr %23, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %284)
  br label %286

286:                                              ; preds = %280
  %287 = load i32, ptr %23, align 4, !tbaa !5
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %23, align 4, !tbaa !5
  br label %275, !llvm.loop !25

289:                                              ; preds = %279
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret i32 0
}

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

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

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 }

!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 = !{i64 0, i64 16, !12, i64 16, i64 16, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"long double", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !13, i64 0}
!19 = !{!"_ZTS7complex", !13, i64 0, !13, i64 16}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !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 }

@X1 = external dso_local global [65536 x %struct.complex], align 16
@X2 = external dso_local global [65536 x %struct.complex], align 16
@Y1 = external dso_local global [65536 x %struct.complex], align 16
@Y2 = external dso_local global [65536 x %struct.complex], align 16
@t = external dso_local global [65536 x %struct.complex], align 16
@inv = external dso_local local_unnamed_addr global [50001 x i32], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@ans = external dso_local local_unnamed_addr global [50001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 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 uwtable
declare dso_local void @_ZplRK7complexS1_(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 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 %struct.complex, align 16
  %7 = alloca %struct.complex, align 16
  %8 = alloca %struct.complex, align 16
  %9 = alloca %struct.complex, align 16
  %10 = alloca %struct.complex, align 16
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  store i32 1, ptr getelementptr inbounds (i8, ptr @inv, i64 4), align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %.not78 = icmp slt i32 %12, 2
  br i1 %.not78, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %13 = add nuw i32 %12, 1
  %wide.trip.count = zext i32 %13 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %14 = icmp sgt i32 %12, 0
  br i1 %14, label %.lr.ph82, label %._crit_edge83.thread

._crit_edge83.thread:                             ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  br label %.preheader77

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %15 = trunc nuw nsw i64 %indvars.iv to i32
  %16 = udiv i32 1000000007, %15
  %17 = zext nneg i32 %16 to i64
  %18 = urem i32 1000000007, %15
  %19 = zext nneg i32 %18 to i64
  %20 = getelementptr inbounds [50001 x i32], ptr @inv, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = mul nsw i64 %22, %17
  %24 = srem i64 %23, 1000000007
  %25 = trunc nsw i64 %24 to i32
  %26 = sub nsw i32 1000000007, %25
  %27 = getelementptr inbounds [50001 x i32], ptr @inv, i64 0, i64 %indvars.iv
  store i32 %26, ptr %27, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge83:                                    ; preds = %.lr.ph82
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %28 = icmp sgt i32 %38, 0
  br i1 %28, label %.lr.ph87, label %.preheader77

.lr.ph82:                                         ; preds = %._crit_edge, %.lr.ph82
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %.lr.ph82 ], [ 0, %._crit_edge ]
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.6, ptr noundef nonnull %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #6
  %30 = load i32, ptr %1, align 4, !tbaa !5
  %31 = srem i32 %30, 31623
  %32 = sitofp i32 %31 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %2, x86_fp80 noundef %32, x86_fp80 noundef 0xK00000000000000000000)
  %33 = getelementptr inbounds [65536 x %struct.complex], ptr @X1, i64 0, i64 %indvars.iv112
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %33, ptr noundef nonnull align 16 dereferenceable(32) %2, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = sdiv i32 %34, 31623
  %36 = sitofp i32 %35 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %3, x86_fp80 noundef %36, x86_fp80 noundef 0xK00000000000000000000)
  %37 = getelementptr inbounds [65536 x %struct.complex], ptr @X2, i64 0, i64 %indvars.iv112
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %37, ptr noundef nonnull align 16 dereferenceable(32) %3, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next113, %39
  br i1 %40, label %.lr.ph82, label %._crit_edge83, !llvm.loop !14

.preheader77:                                     ; preds = %.lr.ph87, %._crit_edge83.thread, %._crit_edge83
  %.lcssa = phi i32 [ %38, %._crit_edge83 ], [ %12, %._crit_edge83.thread ], [ %61, %.lr.ph87 ]
  %41 = shl i32 %.lcssa, 1
  br label %64

.lr.ph87:                                         ; preds = %._crit_edge83, %.lr.ph87
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %.lr.ph87 ], [ 0, %._crit_edge83 ]
  %.07185 = phi i32 [ %60, %.lr.ph87 ], [ 1, %._crit_edge83 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  %42 = srem i32 %.07185, 31623
  %43 = sitofp i32 %42 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %4, x86_fp80 noundef %43, x86_fp80 noundef 0xK00000000000000000000)
  %44 = getelementptr inbounds [65536 x %struct.complex], ptr @Y1, i64 0, i64 %indvars.iv115
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %44, ptr noundef nonnull align 16 dereferenceable(32) %4, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  %45 = sdiv i32 %.07185, 31623
  %46 = sitofp i32 %45 to x86_fp80
  call void @_ZN7complexC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %5, x86_fp80 noundef %46, x86_fp80 noundef 0xK00000000000000000000)
  %47 = getelementptr inbounds [65536 x %struct.complex], ptr @Y2, i64 0, i64 %indvars.iv115
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %47, ptr noundef nonnull align 16 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  %48 = sext i32 %.07185 to i64
  %49 = load i32, ptr @m, align 4, !tbaa !5
  %50 = trunc nuw nsw i64 %indvars.iv115 to i32
  %51 = add nsw i32 %49, %50
  %52 = sext i32 %51 to i64
  %53 = mul nsw i64 %52, %48
  %54 = srem i64 %53, 1000000007
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %55 = getelementptr inbounds [50001 x i32], ptr @inv, i64 0, i64 %indvars.iv.next116
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = mul nsw i64 %54, %57
  %59 = srem i64 %58, 1000000007
  %60 = trunc nsw i64 %59 to i32
  %61 = load i32, ptr @n, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next116, %62
  br i1 %63, label %.lr.ph87, label %.preheader77, !llvm.loop !15

64:                                               ; preds = %64, %.preheader77
  %.070 = phi i32 [ %66, %64 ], [ 1, %.preheader77 ]
  %65 = icmp slt i32 %.070, %41
  %66 = shl i32 %.070, 1
  br i1 %65, label %64, label %67, !llvm.loop !16

67:                                               ; preds = %64
  call void @_Z3FFTP7complexii(ptr noundef nonnull @X1, i32 noundef %.070, i32 noundef 1)
  call void @_Z3FFTP7complexii(ptr noundef nonnull @X2, i32 noundef %.070, i32 noundef 1)
  call void @_Z3FFTP7complexii(ptr noundef nonnull @Y1, i32 noundef %.070, i32 noundef 1)
  call void @_Z3FFTP7complexii(ptr noundef nonnull @Y2, i32 noundef %.070, i32 noundef 1)
  %68 = icmp sgt i32 %.070, 0
  br i1 %68, label %.lr.ph90.preheader, label %._crit_edge91

.lr.ph90.preheader:                               ; preds = %67
  %wide.trip.count121 = zext nneg i32 %.070 to i64
  br label %.lr.ph90

._crit_edge91:                                    ; preds = %.lr.ph90, %67
  call void @_Z3FFTP7complexii(ptr noundef nonnull @t, i32 noundef %.070, i32 noundef -1)
  %69 = load i32, ptr @n, align 4, !tbaa !5
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %.lr.ph94.preheader, label %.preheader76

.lr.ph94.preheader:                               ; preds = %._crit_edge91
  %wide.trip.count126 = zext nneg i32 %69 to i64
  %xtraiter = and i64 %wide.trip.count126, 1
  %71 = icmp eq i32 %69, 1
  br i1 %71, label %.preheader76.loopexit.unr-lcssa, label %.lr.ph94.preheader.new

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

.lr.ph90:                                         ; preds = %.lr.ph90.preheader, %.lr.ph90
  %indvars.iv118 = phi i64 [ 0, %.lr.ph90.preheader ], [ %indvars.iv.next119, %.lr.ph90 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %72 = getelementptr inbounds [65536 x %struct.complex], ptr @X1, i64 0, i64 %indvars.iv118
  %73 = getelementptr inbounds [65536 x %struct.complex], ptr @Y1, i64 0, i64 %indvars.iv118
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %6, ptr noundef nonnull align 16 dereferenceable(32) %72, ptr noundef nonnull align 16 dereferenceable(32) %73)
  %74 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv118
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %74, ptr noundef nonnull align 16 dereferenceable(32) %6, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %exitcond122.not = icmp eq i64 %indvars.iv.next119, %wide.trip.count121
  br i1 %exitcond122.not, label %._crit_edge91, label %.lr.ph90, !llvm.loop !17

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

.lr.ph94.epil:                                    ; preds = %.preheader76.loopexit.unr-lcssa
  %75 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv123.unr
  %76 = load x86_fp80, ptr %75, align 16, !tbaa !18
  %77 = fadd x86_fp80 %76, 0xK3FFE8000000000000000
  %78 = fptosi x86_fp80 %77 to i64
  %79 = srem i64 %78, 1000000007
  %80 = trunc nsw i64 %79 to i32
  %81 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %indvars.iv123.unr
  store i32 %80, ptr %81, align 4, !tbaa !5
  br label %.preheader76

.preheader76:                                     ; preds = %.lr.ph94.epil, %.preheader76.loopexit.unr-lcssa, %._crit_edge91
  br i1 %68, label %.lr.ph96.preheader, label %._crit_edge97

.lr.ph96.preheader:                               ; preds = %.preheader76
  %wide.trip.count131 = zext nneg i32 %.070 to i64
  br label %.lr.ph96

.lr.ph94:                                         ; preds = %.lr.ph94, %.lr.ph94.preheader.new
  %indvars.iv123 = phi i64 [ 0, %.lr.ph94.preheader.new ], [ %indvars.iv.next124.1, %.lr.ph94 ]
  %niter = phi i64 [ 0, %.lr.ph94.preheader.new ], [ %niter.next.1, %.lr.ph94 ]
  %82 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv123
  %83 = load x86_fp80, ptr %82, align 16, !tbaa !18
  %84 = fadd x86_fp80 %83, 0xK3FFE8000000000000000
  %85 = fptosi x86_fp80 %84 to i64
  %86 = srem i64 %85, 1000000007
  %87 = trunc nsw i64 %86 to i32
  %88 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %indvars.iv123
  store i32 %87, ptr %88, align 8, !tbaa !5
  %indvars.iv.next124 = or disjoint i64 %indvars.iv123, 1
  %89 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv.next124
  %90 = load x86_fp80, ptr %89, align 16, !tbaa !18
  %91 = fadd x86_fp80 %90, 0xK3FFE8000000000000000
  %92 = fptosi x86_fp80 %91 to i64
  %93 = srem i64 %92, 1000000007
  %94 = trunc nsw i64 %93 to i32
  %95 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %indvars.iv.next124
  store i32 %94, ptr %95, align 4, !tbaa !5
  %indvars.iv.next124.1 = add nuw nsw i64 %indvars.iv123, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader76.loopexit.unr-lcssa, label %.lr.ph94, !llvm.loop !20

._crit_edge97:                                    ; preds = %.lr.ph96, %.preheader76
  call void @_Z3FFTP7complexii(ptr noundef nonnull @t, i32 noundef %.070, i32 noundef -1)
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph100.preheader, label %.preheader75

.lr.ph100.preheader:                              ; preds = %._crit_edge97
  %wide.trip.count136 = zext nneg i32 %96 to i64
  br label %.lr.ph100

.lr.ph96:                                         ; preds = %.lr.ph96.preheader, %.lr.ph96
  %indvars.iv128 = phi i64 [ 0, %.lr.ph96.preheader ], [ %indvars.iv.next129, %.lr.ph96 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %98 = getelementptr inbounds [65536 x %struct.complex], ptr @X1, i64 0, i64 %indvars.iv128
  %99 = getelementptr inbounds [65536 x %struct.complex], ptr @Y2, i64 0, i64 %indvars.iv128
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %8, ptr noundef nonnull align 16 dereferenceable(32) %98, ptr noundef nonnull align 16 dereferenceable(32) %99)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  %100 = getelementptr inbounds [65536 x %struct.complex], ptr @X2, i64 0, i64 %indvars.iv128
  %101 = getelementptr inbounds [65536 x %struct.complex], ptr @Y1, i64 0, i64 %indvars.iv128
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %9, ptr noundef nonnull align 16 dereferenceable(32) %100, ptr noundef nonnull align 16 dereferenceable(32) %101)
  call void @_ZplRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %7, ptr noundef nonnull align 16 dereferenceable(32) %8, ptr noundef nonnull align 16 dereferenceable(32) %9)
  %102 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv128
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %102, ptr noundef nonnull align 16 dereferenceable(32) %7, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond132.not = icmp eq i64 %indvars.iv.next129, %wide.trip.count131
  br i1 %exitcond132.not, label %._crit_edge97, label %.lr.ph96, !llvm.loop !21

.preheader75:                                     ; preds = %.lr.ph100, %._crit_edge97
  br i1 %68, label %.lr.ph102.preheader, label %._crit_edge103

.lr.ph102.preheader:                              ; preds = %.preheader75
  %wide.trip.count141 = zext nneg i32 %.070 to i64
  br label %.lr.ph102

.lr.ph100:                                        ; preds = %.lr.ph100.preheader, %.lr.ph100
  %indvars.iv133 = phi i64 [ 0, %.lr.ph100.preheader ], [ %indvars.iv.next134, %.lr.ph100 ]
  %103 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %indvars.iv133
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv133
  %107 = load x86_fp80, ptr %106, align 16, !tbaa !18
  %108 = fadd x86_fp80 %107, 0xK3FFE8000000000000000
  %109 = fptosi x86_fp80 %108 to i64
  %110 = srem i64 %109, 1000000007
  %111 = mul nsw i64 %110, 31623
  %112 = add nsw i64 %111, %105
  %113 = srem i64 %112, 1000000007
  %114 = trunc nsw i64 %113 to i32
  store i32 %114, ptr %103, align 4, !tbaa !5
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %exitcond137.not = icmp eq i64 %indvars.iv.next134, %wide.trip.count136
  br i1 %exitcond137.not, label %.preheader75, label %.lr.ph100, !llvm.loop !22

._crit_edge103:                                   ; preds = %.lr.ph102, %.preheader75
  call void @_Z3FFTP7complexii(ptr noundef nonnull @t, i32 noundef %.070, i32 noundef -1)
  %115 = load i32, ptr @n, align 4, !tbaa !5
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %.lr.ph106.preheader, label %._crit_edge109

.lr.ph106.preheader:                              ; preds = %._crit_edge103
  %wide.trip.count146 = zext nneg i32 %115 to i64
  br label %.lr.ph106

.lr.ph102:                                        ; preds = %.lr.ph102.preheader, %.lr.ph102
  %indvars.iv138 = phi i64 [ 0, %.lr.ph102.preheader ], [ %indvars.iv.next139, %.lr.ph102 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  %117 = getelementptr inbounds [65536 x %struct.complex], ptr @X2, i64 0, i64 %indvars.iv138
  %118 = getelementptr inbounds [65536 x %struct.complex], ptr @Y2, i64 0, i64 %indvars.iv138
  call void @_ZmlRK7complexS1_(ptr dead_on_unwind nonnull writable sret(%struct.complex) align 16 %10, ptr noundef nonnull align 16 dereferenceable(32) %117, ptr noundef nonnull align 16 dereferenceable(32) %118)
  %119 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv138
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %119, ptr noundef nonnull align 16 dereferenceable(32) %10, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond142.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count141
  br i1 %exitcond142.not, label %._crit_edge103, label %.lr.ph102, !llvm.loop !23

.preheader:                                       ; preds = %.lr.ph106
  br i1 %116, label %.lr.ph108, label %._crit_edge109

.lr.ph106:                                        ; preds = %.lr.ph106.preheader, %.lr.ph106
  %indvars.iv143 = phi i64 [ 0, %.lr.ph106.preheader ], [ %indvars.iv.next144, %.lr.ph106 ]
  %120 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %indvars.iv143
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [65536 x %struct.complex], ptr @t, i64 0, i64 %indvars.iv143
  %124 = load x86_fp80, ptr %123, align 16, !tbaa !18
  %125 = fadd x86_fp80 %124, 0xK3FFE8000000000000000
  %126 = fptosi x86_fp80 %125 to i64
  %127 = srem i64 %126, 1000000007
  %128 = mul nsw i64 %127, 14122
  %129 = add nsw i64 %128, %122
  %130 = srem i64 %129, 1000000007
  %131 = trunc nsw i64 %130 to i32
  store i32 %131, ptr %120, align 4, !tbaa !5
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %exitcond147.not = icmp eq i64 %indvars.iv.next144, %wide.trip.count146
  br i1 %exitcond147.not, label %.preheader, label %.lr.ph106, !llvm.loop !24

._crit_edge109:                                   ; preds = %.lr.ph108, %._crit_edge103, %.preheader
  ret i32 0

.lr.ph108:                                        ; preds = %.preheader, %.lr.ph108
  %indvars.iv148 = phi i64 [ %indvars.iv.next149, %.lr.ph108 ], [ 0, %.preheader ]
  %132 = getelementptr inbounds [50001 x i32], ptr @ans, i64 0, i64 %indvars.iv148
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %133)
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %135 = load i32, ptr @n, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = icmp slt i64 %indvars.iv.next149, %136
  br i1 %137, label %.lr.ph108, label %._crit_edge109, !llvm.loop !25
}

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

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

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 = { 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 = !{i64 0, i64 16, !12, i64 16, i64 16, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"long double", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !13, i64 0}
!19 = !{!"_ZTS7complex", !13, i64 0, !13, i64 16}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


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