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

; 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.FFT::comp" = type { double, double }

@pos = external dso_local global [524300 x i32], align 16
@_ZN3FFT1AE = external dso_local global [524300 x %"struct.FFT::comp"], align 16
@_ZN3FFT1BE = external dso_local global [524300 x %"struct.FFT::comp"], align 16

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZN3FFT4compmiERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1 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
define dso_local void @_ZN3FFT3mulEPiS0_Pxi(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.FFT::comp", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.FFT::comp", align 8
  %15 = alloca %"struct.FFT::comp", align 8
  %16 = alloca %"struct.FFT::comp", align 8
  %17 = alloca %"struct.FFT::comp", align 8
  %18 = alloca %"struct.FFT::comp", align 8
  %19 = alloca %"struct.FFT::comp", align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %41, %4
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %25, label %44

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr %26, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = sitofp i32 %30 to double
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i32, ptr %9, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %32, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = sitofp i32 %36 to double
  call void @_ZN3FFT4compC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef %31, double noundef %37)
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %39
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %40, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %41

41:                                               ; preds = %25
  %42 = load i32, ptr %9, align 4, !tbaa !9
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %9, align 4, !tbaa !9
  br label %21, !llvm.loop !14

44:                                               ; preds = %21
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = call i32 @llvm.cttz.i32(i32 %45, i1 true)
  %47 = sub nsw i32 %46, 1
  store i32 %47, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %68, %44
  %49 = load i32, ptr %12, align 4, !tbaa !9
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %71

53:                                               ; preds = %48
  %54 = load i32, ptr %12, align 4, !tbaa !9
  %55 = ashr i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = ashr i32 %58, 1
  %60 = load i32, ptr %12, align 4, !tbaa !9
  %61 = and i32 %60, 1
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = shl i32 %61, %62
  %64 = or i32 %59, %63
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %66
  store i32 %64, ptr %67, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %53
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %12, align 4, !tbaa !9
  br label %48, !llvm.loop !16

71:                                               ; preds = %52
  %72 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZN3FFT3FFTEPNS_4compEii(ptr noundef @_ZN3FFT1AE, i32 noundef %72, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %125, %71
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

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

78:                                               ; preds = %73
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = sub nsw i32 %79, %80
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = sub nsw i32 %82, 1
  %84 = and i32 %81, %83
  store i32 %84, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %86
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %89
  %91 = call { double, double } @_ZN3FFT4compmlERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 8 dereferenceable(16) %90)
  %92 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %93 = extractvalue { double, double } %91, 0
  store double %93, ptr %92, align 8
  %94 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %95 = extractvalue { double, double } %91, 1
  store double %95, ptr %94, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %96 = load i32, ptr %10, align 4, !tbaa !9
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %97
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %100
  %102 = call { double, double } @_ZN3FFT4compmlERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %98, ptr noundef nonnull align 8 dereferenceable(16) %101)
  %103 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %104 = extractvalue { double, double } %102, 0
  store double %104, ptr %103, align 8
  %105 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %106 = extractvalue { double, double } %102, 1
  store double %106, ptr %105, align 8
  %107 = call { double, double } @_ZN3FFT4comp4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %18)
  %108 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %109 = extractvalue { double, double } %107, 0
  store double %109, ptr %108, align 8
  %110 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %111 = extractvalue { double, double } %107, 1
  store double %111, ptr %110, align 8
  %112 = call { double, double } @_ZN3FFT4compmiERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %113 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %114 = extractvalue { double, double } %112, 0
  store double %114, ptr %113, align 8
  %115 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %116 = extractvalue { double, double } %112, 1
  store double %116, ptr %115, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  call void @_ZN3FFT4compC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %19, double noundef 0.000000e+00, double noundef -2.500000e-01)
  %117 = call { double, double } @_ZN3FFT4compmlERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %118 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %119 = extractvalue { double, double } %117, 0
  store double %119, ptr %118, align 8
  %120 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %121 = extractvalue { double, double } %117, 1
  store double %121, ptr %120, align 8
  %122 = load i32, ptr %13, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1BE, i64 0, i64 %123
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %124, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  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 16, ptr %14) #5
  br label %125

125:                                              ; preds = %78
  %126 = load i32, ptr %13, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %13, align 4, !tbaa !9
  br label %73, !llvm.loop !17

128:                                              ; preds = %77
  %129 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZN3FFT3FFTEPNS_4compEii(ptr noundef @_ZN3FFT1BE, i32 noundef %129, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %147, %128
  %131 = load i32, ptr %20, align 4, !tbaa !9
  %132 = load i32, ptr %8, align 4, !tbaa !9
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %150

135:                                              ; preds = %130
  %136 = load i32, ptr %20, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1BE, i64 0, i64 %137
  %139 = getelementptr inbounds %"struct.FFT::comp", ptr %138, i32 0, i32 0
  %140 = load double, ptr %139, align 16, !tbaa !18
  %141 = fadd double %140, 5.000000e-01
  %142 = fptosi double %141 to i64
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = load i32, ptr %20, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds i64, ptr %143, i64 %145
  store i64 %142, ptr %146, align 8, !tbaa !20
  br label %147

147:                                              ; preds = %135
  %148 = load i32, ptr %20, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %20, align 4, !tbaa !9
  br label %130, !llvm.loop !22

150:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.cttz.i32(i32, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZN3FFT4comp4conjEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 8, !12, i64 8, i64 8, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{!19, !13, i64 0}
!19 = !{!"_ZTSN3FFT4compE", !13, i64 0, !13, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"long long", !7, i64 0}
!22 = distinct !{!22, !15}


; 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.FFT::comp" = type { double, double }

@pos = external dso_local local_unnamed_addr global [524300 x i32], align 16
@_ZN3FFT1AE = external dso_local global [524300 x %"struct.FFT::comp"], align 16
@_ZN3FFT1BE = external dso_local global [524300 x %"struct.FFT::comp"], align 16

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZN3FFT4compmiERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 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
define dso_local void @_ZN3FFT3mulEPiS0_Pxi(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = alloca %"struct.FFT::comp", align 8
  %6 = alloca %"struct.FFT::comp", align 8
  %7 = alloca %"struct.FFT::comp", align 8
  %8 = alloca %"struct.FFT::comp", align 8
  %9 = alloca %"struct.FFT::comp", align 8
  %10 = alloca %"struct.FFT::comp", align 8
  %11 = icmp sgt i32 %3, 0
  br i1 %11, label %.lr.ph.preheader, label %._crit_edge42.thread

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %12 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = sitofp i32 %13 to double
  %15 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = sitofp i32 %16 to double
  call void @_ZN3FFT4compC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %14, double noundef %17)
  %18 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #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 !12

._crit_edge:                                      ; preds = %.lr.ph
  %19 = call range(i32 0, 33) i32 @llvm.cttz.i32(i32 %3, i1 true)
  %20 = add nsw i32 %19, -1
  br i1 %11, label %.lr.ph41.preheader, label %._crit_edge42.thread

.lr.ph41.preheader:                               ; preds = %._crit_edge
  %21 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 1
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %._crit_edge42.unr-lcssa, label %.lr.ph41.preheader.new

.lr.ph41.preheader.new:                           ; preds = %.lr.ph41.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  %23 = shl nuw nsw i32 1, %20
  br label %.lr.ph41

._crit_edge42.thread:                             ; preds = %._crit_edge, %4
  call void @_ZN3FFT3FFTEPNS_4compEii(ptr noundef nonnull @_ZN3FFT1AE, i32 noundef %3, i32 noundef 1)
  br label %._crit_edge46.thread

._crit_edge42.unr-lcssa:                          ; preds = %.lr.ph41, %.lr.ph41.preheader
  %indvars.iv52.unr = phi i64 [ 0, %.lr.ph41.preheader ], [ %indvars.iv.next53.1, %.lr.ph41 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge42, label %.lr.ph41.epil

.lr.ph41.epil:                                    ; preds = %._crit_edge42.unr-lcssa
  %24 = trunc nuw nsw i64 %indvars.iv52.unr to i32
  %25 = lshr i64 %indvars.iv52.unr, 1
  %26 = and i64 %25, 2147483647
  %27 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = ashr i32 %28, 1
  %30 = and i32 %24, 1
  %31 = shl nuw nsw i32 %30, %20
  %32 = or i32 %29, %31
  %33 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %indvars.iv52.unr
  store i32 %32, ptr %33, align 4, !tbaa !5
  br label %._crit_edge42

._crit_edge42:                                    ; preds = %._crit_edge42.unr-lcssa, %.lr.ph41.epil
  call void @_ZN3FFT3FFTEPNS_4compEii(ptr noundef nonnull @_ZN3FFT1AE, i32 noundef %3, i32 noundef 1)
  br i1 %11, label %.lr.ph45, label %._crit_edge46.thread

.lr.ph45:                                         ; preds = %._crit_edge42
  %34 = add nsw i32 %3, -1
  %35 = getelementptr inbounds i8, ptr %7, i64 8
  %36 = getelementptr inbounds i8, ptr %9, i64 8
  %37 = getelementptr inbounds i8, ptr %8, i64 8
  %38 = getelementptr inbounds i8, ptr %6, i64 8
  %wide.trip.count60 = zext nneg i32 %3 to i64
  br label %53

.lr.ph41:                                         ; preds = %.lr.ph41, %.lr.ph41.preheader.new
  %indvars.iv52 = phi i64 [ 0, %.lr.ph41.preheader.new ], [ %indvars.iv.next53.1, %.lr.ph41 ]
  %niter = phi i64 [ 0, %.lr.ph41.preheader.new ], [ %niter.next.1, %.lr.ph41 ]
  %39 = lshr exact i64 %indvars.iv52, 1
  %40 = and i64 %39, 2147483647
  %41 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = ashr i32 %42, 1
  %44 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %indvars.iv52
  store i32 %43, ptr %44, align 8, !tbaa !5
  %indvars.iv.next53 = or disjoint i64 %indvars.iv52, 1
  %45 = lshr exact i64 %indvars.iv52, 1
  %46 = and i64 %45, 2147483647
  %47 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = ashr i32 %48, 1
  %50 = or i32 %49, %23
  %51 = getelementptr inbounds [524300 x i32], ptr @pos, i64 0, i64 %indvars.iv.next53
  store i32 %50, ptr %51, align 4, !tbaa !5
  %indvars.iv.next53.1 = add nuw nsw i64 %indvars.iv52, 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 %._crit_edge42.unr-lcssa, label %.lr.ph41, !llvm.loop !14

._crit_edge46.thread:                             ; preds = %._crit_edge42.thread, %._crit_edge42
  call void @_ZN3FFT3FFTEPNS_4compEii(ptr noundef nonnull @_ZN3FFT1BE, i32 noundef %3, i32 noundef -1)
  br label %._crit_edge50

._crit_edge46:                                    ; preds = %53
  call void @_ZN3FFT3FFTEPNS_4compEii(ptr noundef nonnull @_ZN3FFT1BE, i32 noundef %3, i32 noundef -1)
  br i1 %11, label %.lr.ph49.preheader, label %._crit_edge50

.lr.ph49.preheader:                               ; preds = %._crit_edge46
  %xtraiter67 = and i64 %wide.trip.count, 1
  %52 = icmp eq i64 %21, 0
  br i1 %52, label %._crit_edge50.loopexit.unr-lcssa, label %.lr.ph49.preheader.new

.lr.ph49.preheader.new:                           ; preds = %.lr.ph49.preheader
  %unroll_iter69 = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph49

53:                                               ; preds = %.lr.ph45, %53
  %indvars.iv57 = phi i64 [ 0, %.lr.ph45 ], [ %indvars.iv.next58, %53 ]
  %54 = trunc i64 %indvars.iv57 to i32
  %55 = sub i32 %3, %54
  %56 = and i32 %55, %34
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %57 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %indvars.iv57
  %58 = call { double, double } @_ZN3FFT4compmlERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(16) %57)
  %59 = extractvalue { double, double } %58, 0
  store double %59, ptr %7, align 8
  %60 = extractvalue { double, double } %58, 1
  store double %60, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %61 = sext i32 %56 to i64
  %62 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1AE, i64 0, i64 %61
  %63 = call { double, double } @_ZN3FFT4compmlERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(16) %62)
  %64 = extractvalue { double, double } %63, 0
  store double %64, ptr %9, align 8
  %65 = extractvalue { double, double } %63, 1
  store double %65, ptr %36, align 8
  %66 = call { double, double } @_ZN3FFT4comp4conjEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %67 = extractvalue { double, double } %66, 0
  store double %67, ptr %8, align 8
  %68 = extractvalue { double, double } %66, 1
  store double %68, ptr %37, align 8
  %69 = call { double, double } @_ZN3FFT4compmiERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8)
  %70 = extractvalue { double, double } %69, 0
  store double %70, ptr %6, align 8
  %71 = extractvalue { double, double } %69, 1
  store double %71, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  call void @_ZN3FFT4compC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %10, double noundef 0.000000e+00, double noundef -2.500000e-01)
  %72 = call { double, double } @_ZN3FFT4compmlERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %73 = extractvalue { double, double } %72, 0
  %74 = extractvalue { double, double } %72, 1
  %75 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1BE, i64 0, i64 %indvars.iv57
  store double %73, ptr %75, align 16, !tbaa !10
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %75, i64 8
  store double %74, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %exitcond61.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count60
  br i1 %exitcond61.not, label %._crit_edge46, label %53, !llvm.loop !15

._crit_edge50.loopexit.unr-lcssa:                 ; preds = %.lr.ph49, %.lr.ph49.preheader
  %indvars.iv62.unr = phi i64 [ 0, %.lr.ph49.preheader ], [ %indvars.iv.next63.1, %.lr.ph49 ]
  %lcmp.mod68.not = icmp eq i64 %xtraiter67, 0
  br i1 %lcmp.mod68.not, label %._crit_edge50, label %.lr.ph49.epil

.lr.ph49.epil:                                    ; preds = %._crit_edge50.loopexit.unr-lcssa
  %76 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1BE, i64 0, i64 %indvars.iv62.unr
  %77 = load double, ptr %76, align 16, !tbaa !16
  %78 = fadd double %77, 5.000000e-01
  %79 = fptosi double %78 to i64
  %80 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv62.unr
  store i64 %79, ptr %80, align 8, !tbaa !18
  br label %._crit_edge50

._crit_edge50:                                    ; preds = %.lr.ph49.epil, %._crit_edge50.loopexit.unr-lcssa, %._crit_edge46.thread, %._crit_edge46
  ret void

.lr.ph49:                                         ; preds = %.lr.ph49, %.lr.ph49.preheader.new
  %indvars.iv62 = phi i64 [ 0, %.lr.ph49.preheader.new ], [ %indvars.iv.next63.1, %.lr.ph49 ]
  %niter70 = phi i64 [ 0, %.lr.ph49.preheader.new ], [ %niter70.next.1, %.lr.ph49 ]
  %81 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1BE, i64 0, i64 %indvars.iv62
  %82 = load double, ptr %81, align 16, !tbaa !16
  %83 = fadd double %82, 5.000000e-01
  %84 = fptosi double %83 to i64
  %85 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv62
  store i64 %84, ptr %85, align 8, !tbaa !18
  %indvars.iv.next63 = or disjoint i64 %indvars.iv62, 1
  %86 = getelementptr inbounds [524300 x %"struct.FFT::comp"], ptr @_ZN3FFT1BE, i64 0, i64 %indvars.iv.next63
  %87 = load double, ptr %86, align 16, !tbaa !16
  %88 = fadd double %87, 5.000000e-01
  %89 = fptosi double %88 to i64
  %90 = getelementptr inbounds i64, ptr %2, i64 %indvars.iv.next63
  store i64 %89, ptr %90, align 8, !tbaa !18
  %indvars.iv.next63.1 = add nuw nsw i64 %indvars.iv62, 2
  %niter70.next.1 = add i64 %niter70, 2
  %niter70.ncmp.1 = icmp eq i64 %niter70.next.1, %unroll_iter69
  br i1 %niter70.ncmp.1, label %._crit_edge50.loopexit.unr-lcssa, label %.lr.ph49, !llvm.loop !20
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.cttz.i32(i32, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local { double, double } @_ZN3FFT4comp4conjEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{i64 0, i64 8, !10, i64 8, i64 8, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = !{!17, !11, i64 0}
!17 = !{!"_ZTSN3FFT4compE", !11, i64 0, !11, i64 8}
!18 = !{!19, !19, i64 0}
!19 = !{!"long long", !7, i64 0}
!20 = distinct !{!20, !13}


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