; LLVM IR from NaokiHori/VerySimpleNSSolver :: src/dft/rdft (main)

; 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.rdft_plan_t = type { i64, i64, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [29 x i8], align 1

declare i32 @puts(ptr 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: nounwind uwtable
declare hidden i32 @dft(i64 noundef, double noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare { double, double } @__muldc3(double, double, double, double)

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rdft_exec_b(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca { double, double }, align 8
  %21 = alloca { double, double }, align 8
  %22 = alloca { double, double }, align 8
  %23 = alloca { double, double }, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca { double, double }, align 8
  %27 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = icmp eq ptr null, %28
  br i1 %29, label %30, label %32

30:                                               ; preds = %2
  %31 = call i32 @puts(ptr noundef @.str)
  store i32 1, ptr %3, align 4
  br label %253

32:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.rdft_plan_t, ptr %33, i32 0, i32 0
  %35 = load i64, ptr %34, align 8, !tbaa !9
  store i64 %35, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.rdft_plan_t, ptr %36, i32 0, i32 1
  %38 = load i64, ptr %37, align 8, !tbaa !13
  store i64 %38, ptr %7, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.rdft_plan_t, ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  store ptr %41, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.rdft_plan_t, ptr %42, i32 0, i32 3
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  store ptr %44, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.rdft_plan_t, ptr %45, i32 0, i32 4
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  store ptr %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !12
  br label %48

48:                                               ; preds = %249, %32
  %49 = load i64, ptr %11, align 8, !tbaa !12
  %50 = load i64, ptr %7, align 8, !tbaa !12
  %51 = icmp ult i64 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %252

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load i64, ptr %11, align 8, !tbaa !12
  %56 = load i64, ptr %6, align 8, !tbaa !12
  %57 = mul i64 %55, %56
  %58 = getelementptr inbounds double, ptr %54, i64 %57
  store ptr %58, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = load i64, ptr %11, align 8, !tbaa !12
  %61 = load i64, ptr %6, align 8, !tbaa !12
  %62 = udiv i64 %61, 2
  %63 = add i64 %62, 1
  %64 = mul i64 %60, %63
  %65 = getelementptr inbounds { double, double }, ptr %59, i64 %64
  store ptr %65, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !12
  br label %66

66:                                               ; preds = %223, %53
  %67 = load i64, ptr %15, align 8, !tbaa !12
  %68 = load i64, ptr %6, align 8, !tbaa !12
  %69 = udiv i64 %68, 2
  %70 = icmp ult i64 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %66
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %226

72:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = load i64, ptr %15, align 8, !tbaa !12
  %75 = getelementptr inbounds double, ptr %73, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !17
  store double %76, ptr %16, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %77 = load i64, ptr %15, align 8, !tbaa !12
  %78 = icmp eq i64 0, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %72
  br label %87

80:                                               ; preds = %72
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = load i64, ptr %6, align 8, !tbaa !12
  %83 = load i64, ptr %15, align 8, !tbaa !12
  %84 = sub i64 %82, %83
  %85 = getelementptr inbounds double, ptr %81, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !17
  br label %87

87:                                               ; preds = %80, %79
  %88 = phi double [ 0.000000e+00, %79 ], [ %86, %80 ]
  store double %88, ptr %17, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load i64, ptr %6, align 8, !tbaa !12
  %91 = udiv i64 %90, 2
  %92 = load i64, ptr %15, align 8, !tbaa !12
  %93 = sub i64 %91, %92
  %94 = getelementptr inbounds double, ptr %89, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !17
  store double %95, ptr %18, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %96 = load i64, ptr %15, align 8, !tbaa !12
  %97 = icmp eq i64 0, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %87
  br label %107

99:                                               ; preds = %87
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = load i64, ptr %6, align 8, !tbaa !12
  %102 = udiv i64 %101, 2
  %103 = load i64, ptr %15, align 8, !tbaa !12
  %104 = add i64 %102, %103
  %105 = getelementptr inbounds double, ptr %100, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !17
  br label %107

107:                                              ; preds = %99, %98
  %108 = phi double [ 0.000000e+00, %98 ], [ %106, %99 ]
  store double %108, ptr %19, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #3
  %109 = load double, ptr %16, align 8, !tbaa !17
  %110 = load double, ptr %17, align 8, !tbaa !17
  %111 = fmul double 0.000000e+00, %110
  %112 = fmul double 1.000000e+00, %110
  %113 = fadd double %109, %111
  %114 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %115 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  store double %113, ptr %114, align 8
  store double %112, ptr %115, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #3
  %116 = load double, ptr %18, align 8, !tbaa !17
  %117 = load double, ptr %19, align 8, !tbaa !17
  %118 = fmul double 0.000000e+00, %117
  %119 = fmul double 1.000000e+00, %117
  %120 = fadd double %116, %118
  %121 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %122 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  store double %120, ptr %121, align 8
  store double %119, ptr %122, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #3
  %123 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %124 = load double, ptr %123, align 8
  %125 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %126 = load double, ptr %125, align 8
  %127 = fmul double 5.000000e-01, %124
  %128 = fmul double 5.000000e-01, %126
  %129 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %130 = load double, ptr %129, align 8
  %131 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %132 = load double, ptr %131, align 8
  %133 = fneg double %132
  %134 = fmul double 5.000000e-01, %130
  %135 = fmul double 5.000000e-01, %133
  %136 = fadd double %127, %134
  %137 = fadd double %128, %135
  %138 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %139 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  store double %136, ptr %138, align 8
  store double %137, ptr %139, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #3
  %140 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %141 = load double, ptr %140, align 8
  %142 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %143 = load double, ptr %142, align 8
  %144 = fmul double 5.000000e-01, %141
  %145 = fmul double 5.000000e-01, %143
  %146 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %147 = load double, ptr %146, align 8
  %148 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %149 = load double, ptr %148, align 8
  %150 = fneg double %149
  %151 = fmul double 5.000000e-01, %147
  %152 = fmul double 5.000000e-01, %150
  %153 = fsub double %144, %151
  %154 = fsub double %145, %152
  %155 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %156 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  store double %153, ptr %155, align 8
  store double %154, ptr %156, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = load i64, ptr %15, align 8, !tbaa !12
  %159 = getelementptr inbounds double, ptr %157, i64 %158
  %160 = load double, ptr %159, align 8, !tbaa !17
  store double %160, ptr %24, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = load i64, ptr %15, align 8, !tbaa !12
  %163 = getelementptr inbounds double, ptr %161, i64 %162
  %164 = load double, ptr %163, align 8, !tbaa !17
  store double %164, ptr %25, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #3
  %165 = load double, ptr %24, align 8, !tbaa !17
  %166 = load double, ptr %25, align 8, !tbaa !17
  %167 = fmul double 0.000000e+00, %166
  %168 = fmul double 1.000000e+00, %166
  %169 = fadd double %165, %167
  %170 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %171 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  store double %169, ptr %170, align 8
  store double %168, ptr %171, align 8
  %172 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %173 = load double, ptr %172, align 8
  %174 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %175 = load double, ptr %174, align 8
  %176 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %177 = load double, ptr %176, align 8
  %178 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %179 = load double, ptr %178, align 8
  %180 = fmul double %177, 0.000000e+00
  %181 = fmul double %179, 1.000000e+00
  %182 = fmul double %177, 1.000000e+00
  %183 = fmul double %179, 0.000000e+00
  %184 = fsub double %180, %181
  %185 = fadd double %182, %183
  %186 = fcmp uno double %184, %184
  br i1 %186, label %187, label %193, !prof !19

187:                                              ; preds = %107
  %188 = fcmp uno double %185, %185
  br i1 %188, label %189, label %193, !prof !19

189:                                              ; preds = %187
  %190 = call { double, double } @__muldc3(double noundef %177, double noundef %179, double noundef 0.000000e+00, double noundef 1.000000e+00) #3
  %191 = extractvalue { double, double } %190, 0
  %192 = extractvalue { double, double } %190, 1
  br label %193

193:                                              ; preds = %189, %187, %107
  %194 = phi double [ %184, %107 ], [ %184, %187 ], [ %191, %189 ]
  %195 = phi double [ %185, %107 ], [ %185, %187 ], [ %192, %189 ]
  %196 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %197 = load double, ptr %196, align 8
  %198 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %199 = load double, ptr %198, align 8
  %200 = fmul double %194, %197
  %201 = fmul double %195, %199
  %202 = fmul double %194, %199
  %203 = fmul double %195, %197
  %204 = fsub double %200, %201
  %205 = fadd double %202, %203
  %206 = fcmp uno double %204, %204
  br i1 %206, label %207, label %213, !prof !19

207:                                              ; preds = %193
  %208 = fcmp uno double %205, %205
  br i1 %208, label %209, label %213, !prof !19

209:                                              ; preds = %207
  %210 = call { double, double } @__muldc3(double noundef %194, double noundef %195, double noundef %197, double noundef %199) #3
  %211 = extractvalue { double, double } %210, 0
  %212 = extractvalue { double, double } %210, 1
  br label %213

213:                                              ; preds = %209, %207, %193
  %214 = phi double [ %204, %193 ], [ %204, %207 ], [ %211, %209 ]
  %215 = phi double [ %205, %193 ], [ %205, %207 ], [ %212, %209 ]
  %216 = fadd double %173, %214
  %217 = fadd double %175, %215
  %218 = load ptr, ptr %14, align 8, !tbaa !5
  %219 = load i64, ptr %15, align 8, !tbaa !12
  %220 = getelementptr inbounds { double, double }, ptr %218, i64 %219
  %221 = getelementptr inbounds { double, double }, ptr %220, i32 0, i32 0
  %222 = getelementptr inbounds { double, double }, ptr %220, i32 0, i32 1
  store double %216, ptr %221, align 8
  store double %217, ptr %222, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %223

223:                                              ; preds = %213
  %224 = load i64, ptr %15, align 8, !tbaa !12
  %225 = add i64 %224, 1
  store i64 %225, ptr %15, align 8, !tbaa !12
  br label %66, !llvm.loop !20

226:                                              ; preds = %71
  %227 = load i64, ptr %6, align 8, !tbaa !12
  %228 = udiv i64 %227, 2
  %229 = load ptr, ptr %8, align 8, !tbaa !5
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = load ptr, ptr %14, align 8, !tbaa !5
  %232 = load ptr, ptr %13, align 8, !tbaa !5
  %233 = call i32 @dft(i64 noundef %228, double noundef 1.000000e+00, i64 noundef 1, ptr noundef %229, ptr noundef %230, ptr noundef %231, ptr noundef %232)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  store i64 0, ptr %27, align 8, !tbaa !12
  br label %234

234:                                              ; preds = %245, %226
  %235 = load i64, ptr %27, align 8, !tbaa !12
  %236 = load i64, ptr %6, align 8, !tbaa !12
  %237 = icmp ult i64 %235, %236
  br i1 %237, label %239, label %238

238:                                              ; preds = %234
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  br label %248

239:                                              ; preds = %234
  %240 = load ptr, ptr %13, align 8, !tbaa !5
  %241 = load i64, ptr %27, align 8, !tbaa !12
  %242 = getelementptr inbounds double, ptr %240, i64 %241
  %243 = load double, ptr %242, align 8, !tbaa !17
  %244 = fmul double %243, 2.000000e+00
  store double %244, ptr %242, align 8, !tbaa !17
  br label %245

245:                                              ; preds = %239
  %246 = load i64, ptr %27, align 8, !tbaa !12
  %247 = add i64 %246, 1
  store i64 %247, ptr %27, align 8, !tbaa !12
  br label %234, !llvm.loop !22

248:                                              ; preds = %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %249

249:                                              ; preds = %248
  %250 = load i64, ptr %11, align 8, !tbaa !12
  %251 = add i64 %250, 1
  store i64 %251, ptr %11, align 8, !tbaa !12
  br label %48, !llvm.loop !23

252:                                              ; preds = %52
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %253

253:                                              ; preds = %252, %30
  %254 = load i32, ptr %3, align 4
  ret i32 %254
}

attributes #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 = { 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"rdft_plan_t", !11, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!"long", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!10, !11, i64 8}
!14 = !{!10, !6, i64 16}
!15 = !{!10, !6, i64 24}
!16 = !{!10, !6, i64 32}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!"branch_weights", i32 1, i32 1048575}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}


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

@.str = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @dft(i64 noundef, double noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare { double, double } @__muldc3(double, double, double, double) local_unnamed_addr

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @rdft_exec_b(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %6

4:                                                ; preds = %2
  %5 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str)
  br label %.loopexit

6:                                                ; preds = %2
  %7 = load i64, ptr %0, align 8, !tbaa !5
  %.fr82 = freeze i64 %7
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %0, i64 32
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %.loopexit, label %.lr.ph76

.lr.ph76:                                         ; preds = %6
  %16 = lshr i64 %.fr82, 1
  %17 = add nuw i64 %16, 1
  %.not81 = icmp ult i64 %.fr82, 2
  %.not83 = icmp eq i64 %.fr82, 0
  br i1 %.not81, label %.lr.ph76.split, label %.lr.ph.us.preheader

.lr.ph.us.preheader:                              ; preds = %.lr.ph76
  %exitcond.peel.not = icmp eq i64 %16, 1
  %min.iters.check = icmp ult i64 %.fr82, 4
  %n.vec = and i64 %.fr82, -4
  %cmp.n = icmp eq i64 %.fr82, %n.vec
  br label %.thread.us.peel

.thread.us.peel:                                  ; preds = %._crit_edge73.us, %.lr.ph.us.preheader
  %.06574.us = phi i64 [ %67, %._crit_edge73.us ], [ 0, %.lr.ph.us.preheader ]
  %18 = mul i64 %.06574.us, %.fr82
  %19 = getelementptr inbounds double, ptr %1, i64 %18
  %20 = mul i64 %.06574.us, %17
  %21 = getelementptr inbounds { double, double }, ptr %15, i64 %20
  %22 = getelementptr double, ptr %19, i64 %16
  %.pre = load double, ptr %22, align 8, !tbaa !15
  %23 = load double, ptr %19, align 8, !tbaa !15
  %24 = insertelement <2 x double> poison, double %23, i64 0
  %25 = insertelement <2 x double> %24, double %.pre, i64 1
  %26 = fadd <2 x double> %25, zeroinitializer
  %27 = fmul <2 x double> %26, <double 5.000000e-01, double 5.000000e-01>
  %28 = extractelement <2 x double> %27, i64 0
  %29 = extractelement <2 x double> %27, i64 1
  %30 = fadd double %28, %29
  %31 = fsub double %28, %29
  %32 = load double, ptr %11, align 8, !tbaa !15
  %33 = load double, ptr %13, align 8, !tbaa !15
  %34 = fmul double %33, 0.000000e+00
  %35 = fadd double %32, %34
  %36 = fmul double %31, 0.000000e+00
  %37 = fadd double %31, 0.000000e+00
  %38 = fcmp uno double %36, 0.000000e+00
  br i1 %38, label %39, label %45, !prof !17

39:                                               ; preds = %.thread.us.peel
  %40 = fcmp uno double %31, 0.000000e+00
  br i1 %40, label %41, label %45, !prof !17

41:                                               ; preds = %39
  %42 = tail call { double, double } @__muldc3(double noundef %31, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 1.000000e+00) #2
  %43 = extractvalue { double, double } %42, 0
  %44 = extractvalue { double, double } %42, 1
  br label %45

45:                                               ; preds = %41, %39, %.thread.us.peel
  %46 = phi double [ %36, %.thread.us.peel ], [ %36, %39 ], [ %43, %41 ]
  %47 = phi double [ %37, %.thread.us.peel ], [ %37, %39 ], [ %44, %41 ]
  %48 = fmul double %35, %46
  %49 = fmul double %33, %47
  %50 = fmul double %33, %46
  %51 = fmul double %35, %47
  %52 = fsub double %48, %49
  %53 = fadd double %50, %51
  %54 = fcmp uno double %52, 0.000000e+00
  br i1 %54, label %55, label %61, !prof !17

55:                                               ; preds = %45
  %56 = fcmp uno double %53, 0.000000e+00
  br i1 %56, label %57, label %61, !prof !17

57:                                               ; preds = %55
  %58 = tail call { double, double } @__muldc3(double noundef %46, double noundef %47, double noundef %35, double noundef %33) #2
  %59 = extractvalue { double, double } %58, 0
  %60 = extractvalue { double, double } %58, 1
  br label %61

61:                                               ; preds = %57, %55, %45
  %62 = phi double [ %52, %45 ], [ %52, %55 ], [ %59, %57 ]
  %63 = phi double [ %53, %45 ], [ %53, %55 ], [ %60, %57 ]
  %64 = fadd double %30, %62
  %65 = fadd double %63, 0.000000e+00
  %66 = getelementptr inbounds i8, ptr %21, i64 8
  store double %64, ptr %21, align 8
  store double %65, ptr %66, align 8
  br i1 %exitcond.peel.not, label %._crit_edge.us, label %.thread.us

._crit_edge73.us:                                 ; preds = %.lr.ph72.us, %middle.block, %._crit_edge.us
  %67 = add nuw i64 %.06574.us, 1
  %exitcond88.not = icmp eq i64 %67, %9
  br i1 %exitcond88.not, label %.loopexit, label %.thread.us.peel, !llvm.loop !18

.lr.ph72.us:                                      ; preds = %.lr.ph72.us.preheader98, %.lr.ph72.us
  %.070.us = phi i64 [ %71, %.lr.ph72.us ], [ %.070.us.ph, %.lr.ph72.us.preheader98 ]
  %68 = getelementptr inbounds double, ptr %19, i64 %.070.us
  %69 = load double, ptr %68, align 8, !tbaa !15
  %70 = fmul double %69, 2.000000e+00
  store double %70, ptr %68, align 8, !tbaa !15
  %71 = add nuw i64 %.070.us, 1
  %exitcond87.not = icmp eq i64 %71, %.fr82
  br i1 %exitcond87.not, label %._crit_edge73.us, label %.lr.ph72.us, !llvm.loop !20

.thread.us:                                       ; preds = %61, %141
  %.06669.us = phi i64 [ %145, %141 ], [ 1, %61 ]
  %72 = getelementptr inbounds double, ptr %19, i64 %.06669.us
  %73 = load double, ptr %72, align 8, !tbaa !15
  %74 = getelementptr double, ptr %22, i64 %.06669.us
  %75 = load double, ptr %74, align 8, !tbaa !15
  %76 = sub i64 %.fr82, %.06669.us
  %77 = getelementptr inbounds double, ptr %19, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !15
  %.pn.us = sub nsw i64 %16, %.06669.us
  %.in.us = getelementptr inbounds double, ptr %19, i64 %.pn.us
  %79 = load double, ptr %.in.us, align 8, !tbaa !15
  %80 = fmul double %78, 0.000000e+00
  %81 = fadd double %73, %80
  %82 = fmul double %75, 0.000000e+00
  %83 = fadd double %79, %82
  %84 = getelementptr inbounds double, ptr %11, i64 %.06669.us
  %85 = load double, ptr %84, align 8, !tbaa !15
  %86 = getelementptr inbounds double, ptr %13, i64 %.06669.us
  %87 = load double, ptr %86, align 8, !tbaa !15
  %88 = fmul double %87, 0.000000e+00
  %89 = fadd double %85, %88
  %90 = insertelement <2 x double> poison, double %81, i64 0
  %91 = insertelement <2 x double> %90, double %78, i64 1
  %92 = fmul <2 x double> %91, <double 5.000000e-01, double 5.000000e-01>
  %93 = insertelement <2 x double> poison, double %83, i64 0
  %94 = insertelement <2 x double> %93, double %75, i64 1
  %95 = fmul <2 x double> %94, <double 5.000000e-01, double -5.000000e-01>
  %96 = fadd <2 x double> %92, %95
  %97 = fsub <2 x double> %92, %95
  %98 = fmul <2 x double> %97, zeroinitializer
  %99 = shufflevector <2 x double> %97, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %100 = fsub <2 x double> %98, %99
  %101 = fadd <2 x double> %98, %99
  %102 = shufflevector <2 x double> %100, <2 x double> %101, <2 x i32> <i32 0, i32 3>
  %103 = extractelement <2 x double> %100, i64 0
  %104 = fcmp uno double %103, 0.000000e+00
  br i1 %104, label %105, label %116, !prof !17

105:                                              ; preds = %.thread.us
  %106 = extractelement <2 x double> %101, i64 1
  %107 = fcmp uno double %106, 0.000000e+00
  br i1 %107, label %108, label %116, !prof !17

108:                                              ; preds = %105
  %109 = extractelement <2 x double> %97, i64 0
  %110 = extractelement <2 x double> %97, i64 1
  %111 = tail call { double, double } @__muldc3(double noundef %109, double noundef %110, double noundef 0.000000e+00, double noundef 1.000000e+00) #2
  %112 = extractvalue { double, double } %111, 0
  %113 = extractvalue { double, double } %111, 1
  %114 = insertelement <2 x double> poison, double %112, i64 0
  %115 = insertelement <2 x double> %114, double %113, i64 1
  br label %116

116:                                              ; preds = %108, %105, %.thread.us
  %117 = phi <2 x double> [ %102, %.thread.us ], [ %102, %105 ], [ %115, %108 ]
  %118 = insertelement <2 x double> poison, double %89, i64 0
  %119 = shufflevector <2 x double> %118, <2 x double> poison, <2 x i32> zeroinitializer
  %120 = fmul <2 x double> %119, %117
  %121 = insertelement <2 x double> poison, double %87, i64 0
  %122 = shufflevector <2 x double> %121, <2 x double> poison, <2 x i32> zeroinitializer
  %123 = fmul <2 x double> %122, %117
  %124 = shufflevector <2 x double> %123, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %125 = fsub <2 x double> %120, %124
  %126 = fadd <2 x double> %120, %124
  %127 = shufflevector <2 x double> %125, <2 x double> %126, <2 x i32> <i32 0, i32 3>
  %128 = extractelement <2 x double> %125, i64 0
  %129 = fcmp uno double %128, 0.000000e+00
  br i1 %129, label %130, label %141, !prof !17

130:                                              ; preds = %116
  %131 = extractelement <2 x double> %126, i64 1
  %132 = fcmp uno double %131, 0.000000e+00
  br i1 %132, label %133, label %141, !prof !17

133:                                              ; preds = %130
  %134 = extractelement <2 x double> %117, i64 0
  %135 = extractelement <2 x double> %117, i64 1
  %136 = tail call { double, double } @__muldc3(double noundef %134, double noundef %135, double noundef %89, double noundef %87) #2
  %137 = extractvalue { double, double } %136, 0
  %138 = extractvalue { double, double } %136, 1
  %139 = insertelement <2 x double> poison, double %137, i64 0
  %140 = insertelement <2 x double> %139, double %138, i64 1
  br label %141

141:                                              ; preds = %133, %130, %116
  %142 = phi <2 x double> [ %127, %116 ], [ %127, %130 ], [ %140, %133 ]
  %143 = fadd <2 x double> %96, %142
  %144 = getelementptr inbounds { double, double }, ptr %21, i64 %.06669.us
  store <2 x double> %143, ptr %144, align 8
  %145 = add nuw nsw i64 %.06669.us, 1
  %exitcond.not = icmp eq i64 %145, %16
  br i1 %exitcond.not, label %._crit_edge.us, label %.thread.us, !llvm.loop !23

._crit_edge.us:                                   ; preds = %141, %61
  %146 = tail call i32 @dft(i64 noundef %16, double noundef 1.000000e+00, i64 noundef 1, ptr noundef nonnull %11, ptr noundef nonnull %13, ptr noundef nonnull %21, ptr noundef nonnull %19)
  br i1 %.not83, label %._crit_edge73.us, label %.lr.ph72.us.preheader

.lr.ph72.us.preheader:                            ; preds = %._crit_edge.us
  br i1 %min.iters.check, label %.lr.ph72.us.preheader98, label %vector.body

.lr.ph72.us.preheader98:                          ; preds = %middle.block, %.lr.ph72.us.preheader
  %.070.us.ph = phi i64 [ 0, %.lr.ph72.us.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph72.us

vector.body:                                      ; preds = %.lr.ph72.us.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph72.us.preheader ]
  %147 = getelementptr inbounds double, ptr %19, i64 %index
  %148 = getelementptr inbounds i8, ptr %147, i64 16
  %wide.load = load <2 x double>, ptr %147, align 8, !tbaa !15
  %wide.load96 = load <2 x double>, ptr %148, align 8, !tbaa !15
  %149 = fmul <2 x double> %wide.load, <double 2.000000e+00, double 2.000000e+00>
  %150 = fmul <2 x double> %wide.load96, <double 2.000000e+00, double 2.000000e+00>
  store <2 x double> %149, ptr %147, align 8, !tbaa !15
  store <2 x double> %150, ptr %148, align 8, !tbaa !15
  %index.next = add nuw i64 %index, 4
  %151 = icmp eq i64 %index.next, %n.vec
  br i1 %151, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge73.us, label %.lr.ph72.us.preheader98

.lr.ph76.split:                                   ; preds = %.lr.ph76
  br i1 %.not83, label %.lr.ph76.split.split, label %.lr.ph72.us79

.lr.ph72.us79:                                    ; preds = %.lr.ph76.split, %.lr.ph72.us79
  %.06574.us77 = phi i64 [ %159, %.lr.ph72.us79 ], [ 0, %.lr.ph76.split ]
  %152 = mul nuw i64 %.06574.us77, %.fr82
  %153 = getelementptr inbounds double, ptr %1, i64 %152
  %154 = mul nuw i64 %.06574.us77, %17
  %155 = getelementptr inbounds { double, double }, ptr %15, i64 %154
  %156 = tail call i32 @dft(i64 noundef %16, double noundef 1.000000e+00, i64 noundef 1, ptr noundef %11, ptr noundef %13, ptr noundef %155, ptr noundef %153)
  %157 = load double, ptr %153, align 8, !tbaa !15
  %158 = fmul double %157, 2.000000e+00
  store double %158, ptr %153, align 8, !tbaa !15
  %159 = add nuw i64 %.06574.us77, 1
  %exitcond90.not = icmp eq i64 %159, %9
  br i1 %exitcond90.not, label %.loopexit, label %.lr.ph72.us79, !llvm.loop !18

.lr.ph76.split.split:                             ; preds = %.lr.ph76.split, %.lr.ph76.split.split
  %.06574 = phi i64 [ %163, %.lr.ph76.split.split ], [ 0, %.lr.ph76.split ]
  %160 = mul nuw i64 %.06574, %17
  %161 = getelementptr inbounds { double, double }, ptr %15, i64 %160
  %162 = tail call i32 @dft(i64 noundef %16, double noundef 1.000000e+00, i64 noundef 1, ptr noundef %11, ptr noundef %13, ptr noundef %161, ptr noundef %1)
  %163 = add nuw i64 %.06574, 1
  %exitcond91.not = icmp eq i64 %163, %9
  br i1 %exitcond91.not, label %.loopexit, label %.lr.ph76.split.split, !llvm.loop !18

.loopexit:                                        ; preds = %._crit_edge73.us, %.lr.ph72.us79, %.lr.ph76.split.split, %6, %4
  %.064 = phi i32 [ 1, %4 ], [ 0, %6 ], [ 0, %.lr.ph76.split.split ], [ 0, %.lr.ph72.us79 ], [ 0, %._crit_edge73.us ]
  ret i32 %.064
}

attributes #0 = { 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 #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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, !7, i64 0}
!6 = !{!"rdft_plan_t", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !10, i64 32}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = !{!"branch_weights", i32 1, i32 1048575}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19, !21, !22}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = distinct !{!23, !19, !24}
!24 = !{!"llvm.loop.peeled.count", i32 1}
!25 = distinct !{!25, !19, !22, !21}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass