; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ/1402(FFT模板题).ll (Z3FFTP7Complexii)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Complex = type { double, double }

@_ZL2pi = external hidden global double, align 8

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTP7Complexii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Complex, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.Complex, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.Complex, align 8
  %14 = alloca %struct.Complex, align 8
  %15 = alloca %struct.Complex, align 8
  %16 = alloca %struct.Complex, align 8
  %17 = alloca %struct.Complex, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load i32, ptr %5, align 4, !tbaa !9
  call void @_Z5raderP7Complexi(ptr noundef %19, i32 noundef %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 2, ptr %7, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %114, %3
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %117

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = sub nsw i32 0, %27
  %29 = mul nsw i32 %28, 2
  %30 = sitofp i32 %29 to double
  %31 = load double, ptr @_ZL2pi, align 8, !tbaa !11
  %32 = fmul double %30, %31
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = sitofp i32 %33 to double
  %35 = fdiv double %32, %34
  %36 = call double @cos(double noundef %35) #5
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = sub nsw i32 0, %37
  %39 = mul nsw i32 %38, 2
  %40 = sitofp i32 %39 to double
  %41 = load double, ptr @_ZL2pi, align 8, !tbaa !11
  %42 = fmul double %40, %41
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = sitofp i32 %43 to double
  %45 = fdiv double %42, %44
  %46 = call double @sin(double noundef %45) #5
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %9, double noundef %36, double noundef %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %109, %26
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = load i32, ptr %5, align 4, !tbaa !9
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %113

52:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %11, double noundef 1.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %53 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %53, ptr %12, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %105, %52
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !9
  %57 = load i32, ptr %7, align 4, !tbaa !9
  %58 = sdiv i32 %57, 2
  %59 = add nsw i32 %56, %58
  %60 = icmp slt i32 %55, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %54
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %108

62:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds %struct.Complex, ptr %63, i64 %65
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %66, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sdiv i32 %69, 2
  %71 = add nsw i32 %68, %70
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %struct.Complex, ptr %67, i64 %72
  %74 = call { double, double } @_ZN7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %73)
  %75 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %76 = extractvalue { double, double } %74, 0
  store double %76, ptr %75, align 8
  %77 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %78 = extractvalue { double, double } %74, 1
  store double %78, ptr %77, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %79 = call { double, double } @_ZN7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %80 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %81 = extractvalue { double, double } %79, 0
  store double %81, ptr %80, align 8
  %82 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %83 = extractvalue { double, double } %79, 1
  store double %83, ptr %82, align 8
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %struct.Complex, ptr %84, i64 %86
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %87, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %88 = call { double, double } @_ZN7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %89 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %90 = extractvalue { double, double } %88, 0
  store double %90, ptr %89, align 8
  %91 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %92 = extractvalue { double, double } %88, 1
  store double %92, ptr %91, align 8
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = sdiv i32 %95, 2
  %97 = add nsw i32 %94, %96
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds %struct.Complex, ptr %93, i64 %98
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %99, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %100 = call { double, double } @_ZN7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %101 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %102 = extractvalue { double, double } %100, 0
  store double %102, ptr %101, align 8
  %103 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %104 = extractvalue { double, double } %100, 1
  store double %104, ptr %103, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %105

105:                                              ; preds = %62
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %12, align 4, !tbaa !9
  br label %54, !llvm.loop !14

108:                                              ; preds = %61
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %7, align 4, !tbaa !9
  %111 = load i32, ptr %10, align 4, !tbaa !9
  %112 = add nsw i32 %111, %110
  store i32 %112, ptr %10, align 4, !tbaa !9
  br label %47, !llvm.loop !16

113:                                              ; preds = %51
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %114

114:                                              ; preds = %113
  %115 = load i32, ptr %7, align 4, !tbaa !9
  %116 = shl i32 %115, 1
  store i32 %116, ptr %7, align 4, !tbaa !9
  br label %21, !llvm.loop !17

117:                                              ; preds = %25
  %118 = load i32, ptr %6, align 4, !tbaa !9
  %119 = icmp eq i32 %118, -1
  br i1 %119, label %120, label %140

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

121:                                              ; preds = %136, %120
  %122 = load i32, ptr %18, align 4, !tbaa !9
  %123 = load i32, ptr %5, align 4, !tbaa !9
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %126, label %125

125:                                              ; preds = %121
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %139

126:                                              ; preds = %121
  %127 = load i32, ptr %5, align 4, !tbaa !9
  %128 = sitofp i32 %127 to double
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = load i32, ptr %18, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds %struct.Complex, ptr %129, i64 %131
  %133 = getelementptr inbounds %struct.Complex, ptr %132, i32 0, i32 0
  %134 = load double, ptr %133, align 8, !tbaa !18
  %135 = fdiv double %134, %128
  store double %135, ptr %133, align 8, !tbaa !18
  br label %136

136:                                              ; preds = %126
  %137 = load i32, ptr %18, align 4, !tbaa !9
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %18, align 4, !tbaa !9
  br label %121, !llvm.loop !20

139:                                              ; preds = %125
  br label %140

140:                                              ; preds = %139, %117
  ret void
}

; Function Attrs: nounwind
declare double @cos(double noundef) #3

; Function Attrs: nounwind
declare double @sin(double noundef) #3

; 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) #4

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{i64 0, i64 8, !11, i64 8, i64 8, !11}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{!19, !12, i64 0}
!19 = !{!"_ZTS7Complex", !12, i64 0, !12, i64 8}
!20 = distinct !{!20, !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.Complex = type { double, double }

@_ZL2pi = external hidden local_unnamed_addr global double, align 8

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3FFTP7Complexii(ptr noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.Complex, align 8
  %5 = alloca %struct.Complex, align 8
  %6 = alloca %struct.Complex, align 8
  %7 = alloca %struct.Complex, align 8
  tail call void @_Z5raderP7Complexi(ptr noundef %0, i32 noundef %1)
  %.not47 = icmp slt i32 %1, 2
  br i1 %.not47, label %._crit_edge51, label %.lr.ph50

.lr.ph50:                                         ; preds = %3
  %.neg = mul i32 %2, -2
  %8 = sitofp i32 %.neg to double
  %9 = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  %10 = zext nneg i32 %1 to i64
  br label %.lr.ph45.us

.lr.ph45.us:                                      ; preds = %._crit_edge46.us, %.lr.ph50
  %.03848.us = phi i32 [ 2, %.lr.ph50 ], [ %41, %._crit_edge46.us ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %11 = load double, ptr @_ZL2pi, align 8, !tbaa !5
  %12 = fmul double %11, %8
  %13 = sitofp i32 %.03848.us to double
  %14 = fdiv double %12, %13
  %15 = call double @cos(double noundef %14) #5
  %16 = load double, ptr @_ZL2pi, align 8, !tbaa !5
  %17 = fmul double %16, %8
  %18 = fdiv double %17, %13
  %19 = call double @sin(double noundef %18) #5
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef %15, double noundef %19)
  %20 = ashr exact i32 %.03848.us, 1
  %21 = sext i32 %.03848.us to i64
  %22 = sext i32 %20 to i64
  %23 = icmp sgt i32 %20, 0
  %invariant.gep = getelementptr %struct.Complex, ptr %0, i64 %22
  br label %24

24:                                               ; preds = %.lr.ph45.us, %._crit_edge.us
  %indvars.iv = phi i64 [ 0, %.lr.ph45.us ], [ %indvars.iv.next, %._crit_edge.us ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @_ZN7ComplexC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef 1.000000e+00, double noundef 0.000000e+00)
  %25 = add nsw i64 %indvars.iv, %22
  br i1 %23, label %.lr.ph.us, label %._crit_edge.us

._crit_edge.us:                                   ; preds = %.lr.ph.us, %24
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %indvars.iv.next = add nsw i64 %indvars.iv, %21
  %26 = icmp slt i64 %indvars.iv.next, %10
  br i1 %26, label %24, label %._crit_edge46.us, !llvm.loop !9

.lr.ph.us:                                        ; preds = %24, %.lr.ph.us
  %indvars.iv53 = phi i64 [ %indvars.iv.next54, %.lr.ph.us ], [ %indvars.iv, %24 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %27 = getelementptr inbounds %struct.Complex, ptr %0, i64 %indvars.iv53
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %27, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %gep = getelementptr %struct.Complex, ptr %invariant.gep, i64 %indvars.iv53
  %28 = call { double, double } @_ZN7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %gep)
  %29 = extractvalue { double, double } %28, 0
  store double %29, ptr %7, align 8
  %30 = extractvalue { double, double } %28, 1
  store double %30, ptr %9, align 8
  %31 = call { double, double } @_ZN7ComplexplERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %32 = extractvalue { double, double } %31, 0
  %33 = extractvalue { double, double } %31, 1
  store double %32, ptr %27, align 8, !tbaa !5
  %.sroa.46.0..sroa_idx.us = getelementptr inbounds i8, ptr %27, i64 8
  store double %33, ptr %.sroa.46.0..sroa_idx.us, align 8, !tbaa !5
  %34 = call { double, double } @_ZN7ComplexmiERKS_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %35 = extractvalue { double, double } %34, 0
  %36 = extractvalue { double, double } %34, 1
  store double %35, ptr %gep, align 8, !tbaa !5
  %.sroa.44.0..sroa_idx.us = getelementptr inbounds i8, ptr %gep, i64 8
  store double %36, ptr %.sroa.44.0..sroa_idx.us, align 8, !tbaa !5
  %37 = call { double, double } @_ZN7ComplexmlERKS_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %38 = extractvalue { double, double } %37, 0
  %39 = extractvalue { double, double } %37, 1
  store double %38, ptr %5, align 8, !tbaa !5
  store double %39, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !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.next54 = add nsw i64 %indvars.iv53, 1
  %40 = icmp slt i64 %indvars.iv.next54, %25
  br i1 %40, label %.lr.ph.us, label %._crit_edge.us, !llvm.loop !12

._crit_edge46.us:                                 ; preds = %._crit_edge.us
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  %41 = shl i32 %.03848.us, 1
  %.not.us = icmp sgt i32 %41, %1
  br i1 %.not.us, label %._crit_edge51, label %.lr.ph45.us, !llvm.loop !13

._crit_edge51:                                    ; preds = %._crit_edge46.us, %3
  %42 = icmp eq i32 %2, -1
  %43 = icmp sgt i32 %1, 0
  %or.cond = and i1 %42, %43
  br i1 %or.cond, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %._crit_edge51
  %44 = uitofp nneg i32 %1 to double
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp ult i32 %1, 3
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %.neg60 = or i64 %wide.trip.count, -2
  %n.vec = add nsw i64 %.neg60, %wide.trip.count
  %broadcast.splatinsert = insertelement <2 x double> poison, double %44, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %45 = or disjoint i64 %index, 1
  %46 = getelementptr inbounds %struct.Complex, ptr %0, i64 %index
  %47 = getelementptr inbounds %struct.Complex, ptr %0, i64 %45
  %48 = load double, ptr %46, align 8, !tbaa !14
  %49 = load double, ptr %47, align 8, !tbaa !14
  %50 = insertelement <2 x double> poison, double %48, i64 0
  %51 = insertelement <2 x double> %50, double %49, i64 1
  %52 = fdiv <2 x double> %51, %broadcast.splat
  %53 = extractelement <2 x double> %52, i64 0
  store double %53, ptr %46, align 8, !tbaa !14
  %54 = extractelement <2 x double> %52, i64 1
  store double %54, ptr %47, align 8, !tbaa !14
  %index.next = add nuw i64 %index, 2
  %55 = icmp eq i64 %index.next, %n.vec
  br i1 %55, label %scalar.ph.preheader, label %vector.body, !llvm.loop !16

scalar.ph.preheader:                              ; preds = %vector.body, %.lr.ph
  %indvars.iv57.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %vector.body ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %scalar.ph ], [ %indvars.iv57.ph, %scalar.ph.preheader ]
  %56 = getelementptr inbounds %struct.Complex, ptr %0, i64 %indvars.iv57
  %57 = load double, ptr %56, align 8, !tbaa !14
  %58 = fdiv double %57, %44
  store double %58, ptr %56, align 8, !tbaa !14
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %scalar.ph, !llvm.loop !19

.loopexit:                                        ; preds = %scalar.ph, %._crit_edge51
  ret void
}

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

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

; 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) #4

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"double", !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 8, !5, i64 8, i64 8, !5}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !6, i64 0}
!15 = !{!"_ZTS7Complex", !6, i64 0, !6, i64 8}
!16 = distinct !{!16, !10, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !10, !18, !17}


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