; LLVM IR from zsiciarz/aquila :: aquila/transform/Dft.ll (ZN6Aquila3Dft3fftEPKd)

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

%"class.std::complex" = type { { double, double } }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.Aquila::Fft" = type { ptr, i64 }

@_ZN6Aquila3Dft1jE = external dso_local constant %"class.std::complex", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Aquila3Dft3fftEPKd(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::complex", align 8
  %12 = alloca %"class.std::complex", align 8
  %13 = alloca %"class.std::complex", align 8
  %14 = alloca %"class.std::complex", align 8
  %15 = alloca %"class.std::complex", align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::complex", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::complex", align 8
  %24 = alloca %"class.std::complex", align 8
  %25 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8
  store i1 false, ptr %7, align 1
  %27 = getelementptr inbounds %"class.Aquila::Fft", ptr %26, i32 0, i32 1
  %28 = load i64, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @_ZNSaISt7complexIdEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorISt7complexIdESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %29 unwind label %75

29:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorISt7complexIdEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %30 = invoke { double, double } @_ZStngIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) @_ZN6Aquila3Dft1jE)
          to label %31 unwind label %79

31:                                               ; preds = %29
  %32 = getelementptr inbounds %"class.std::complex", ptr %15, i32 0, i32 0
  %33 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %34 = extractvalue { double, double } %30, 0
  store double %34, ptr %33, align 8
  %35 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %36 = extractvalue { double, double } %30, 1
  store double %36, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store double 2.000000e+00, ptr %16, align 8, !tbaa !12
  %37 = invoke { double, double } @_ZStmlIdESt7complexIT_ERKS2_RKS1_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %38 unwind label %83

38:                                               ; preds = %31
  %39 = getelementptr inbounds %"class.std::complex", ptr %14, i32 0, i32 0
  %40 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %41 = extractvalue { double, double } %37, 0
  store double %41, ptr %40, align 8
  %42 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %43 = extractvalue { double, double } %37, 1
  store double %43, ptr %42, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  store double 0x400921FB54442D18, ptr %17, align 8, !tbaa !12
  %44 = invoke { double, double } @_ZStmlIdESt7complexIT_ERKS2_RKS1_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %45 unwind label %87

45:                                               ; preds = %38
  %46 = getelementptr inbounds %"class.std::complex", ptr %13, i32 0, i32 0
  %47 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %48 = extractvalue { double, double } %44, 0
  store double %48, ptr %47, align 8
  %49 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %50 = extractvalue { double, double } %44, 1
  store double %50, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %51 = getelementptr inbounds %"class.Aquila::Fft", ptr %26, i32 0, i32 1
  %52 = load i64, ptr %51, align 8, !tbaa !9
  %53 = uitofp i64 %52 to double
  store double %53, ptr %18, align 8, !tbaa !12
  %54 = invoke { double, double } @_ZStdvIdESt7complexIT_ERKS2_RKS1_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %55 unwind label %91

55:                                               ; preds = %45
  %56 = getelementptr inbounds %"class.std::complex", ptr %12, i32 0, i32 0
  %57 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 0
  %58 = extractvalue { double, double } %54, 0
  store double %58, ptr %57, align 8
  %59 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 1
  %60 = extractvalue { double, double } %54, 1
  store double %60, ptr %59, align 8
  %61 = invoke { double, double } @_ZSt3expIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %62 unwind label %91

62:                                               ; preds = %55
  %63 = getelementptr inbounds %"class.std::complex", ptr %11, i32 0, i32 0
  %64 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 0
  %65 = extractvalue { double, double } %61, 0
  store double %65, ptr %64, align 8
  %66 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 1
  %67 = extractvalue { double, double } %61, 1
  store double %67, ptr %66, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !14
  br label %68

68:                                               ; preds = %146, %62
  %69 = load i32, ptr %19, align 4, !tbaa !14
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds %"class.Aquila::Fft", ptr %26, i32 0, i32 1
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = icmp ult i64 %70, %72
  br i1 %73, label %98, label %74

74:                                               ; preds = %68
  store i32 2, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %150

75:                                               ; preds = %3
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  call void @_ZNSt15__new_allocatorISt7complexIdEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %155

79:                                               ; preds = %29
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  br label %97

83:                                               ; preds = %31
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  br label %96

87:                                               ; preds = %38
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  br label %95

91:                                               ; preds = %55, %45
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %9, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %95

95:                                               ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %96

96:                                               ; preds = %95, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %97

97:                                               ; preds = %96, %79
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  br label %152

98:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  invoke void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %21, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %99 unwind label %107

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !14
  br label %100

100:                                              ; preds = %135, %99
  %101 = load i32, ptr %22, align 4, !tbaa !14
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds %"class.Aquila::Fft", ptr %26, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = icmp ult i64 %102, %104
  br i1 %105, label %111, label %106

106:                                              ; preds = %100
  store i32 5, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %142

107:                                              ; preds = %98
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %9, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %10, align 4
  br label %149

111:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = load i32, ptr %22, align 4, !tbaa !14
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds double, ptr %112, i64 %114
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %116 = load i32, ptr %22, align 4, !tbaa !14
  %117 = load i32, ptr %19, align 4, !tbaa !14
  %118 = mul i32 %116, %117
  store i32 %118, ptr %25, align 4, !tbaa !14
  %119 = invoke { double, double } @_ZSt3powIdjESt7complexIN9__gnu_cxx9__promoteIDTplcvNS2_IT_Xsr3std12__is_integerIS3_EE7__valueEE6__typeELi0EcvNS2_IT0_Xsr3std12__is_integerIS6_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS9_EE7__valueEE6__typeEERKS0_IS3_ERKS6_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %120 unwind label %138

120:                                              ; preds = %111
  %121 = getelementptr inbounds %"class.std::complex", ptr %24, i32 0, i32 0
  %122 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 0
  %123 = extractvalue { double, double } %119, 0
  store double %123, ptr %122, align 8
  %124 = getelementptr inbounds { double, double }, ptr %121, i32 0, i32 1
  %125 = extractvalue { double, double } %119, 1
  store double %125, ptr %124, align 8
  %126 = invoke { double, double } @_ZStmlIdESt7complexIT_ERKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %127 unwind label %138

127:                                              ; preds = %120
  %128 = getelementptr inbounds %"class.std::complex", ptr %23, i32 0, i32 0
  %129 = getelementptr inbounds { double, double }, ptr %128, i32 0, i32 0
  %130 = extractvalue { double, double } %126, 0
  store double %130, ptr %129, align 8
  %131 = getelementptr inbounds { double, double }, ptr %128, i32 0, i32 1
  %132 = extractvalue { double, double } %126, 1
  store double %132, ptr %131, align 8
  %133 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %134 unwind label %138

134:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %22, align 4, !tbaa !14
  %137 = add i32 %136, 1
  store i32 %137, ptr %22, align 4, !tbaa !14
  br label %100, !llvm.loop !16

138:                                              ; preds = %127, %120, %111
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %9, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %149

142:                                              ; preds = %106
  %143 = load i32, ptr %19, align 4, !tbaa !14
  %144 = zext i32 %143 to i64
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %144) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %145, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  br label %146

146:                                              ; preds = %142
  %147 = load i32, ptr %19, align 4, !tbaa !14
  %148 = add i32 %147, 1
  store i32 %148, ptr %19, align 4, !tbaa !14
  br label %68, !llvm.loop !20

149:                                              ; preds = %138, %107
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %152

150:                                              ; preds = %74
  store i1 true, ptr %7, align 1
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  %151 = load i1, ptr %7, align 1
  br i1 %151, label %154, label %153

152:                                              ; preds = %149, %97
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @_ZNSt6vectorISt7complexIdESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %155

153:                                              ; preds = %150
  call void @_ZNSt6vectorISt7complexIdESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %154

154:                                              ; preds = %153, %150
  ret void

155:                                              ; preds = %152, %75
  %156 = load ptr, ptr %9, align 8
  %157 = load i32, ptr %10, align 4
  %158 = insertvalue { ptr, i32 } poison, ptr %156, 0
  %159 = insertvalue { ptr, i32 } %158, i32 %157, 1
  resume { ptr, i32 } %159
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaISt7complexIdEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt7complexIdESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { double, double } @_ZStmlIdESt7complexIT_ERKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZSt3powIdjESt7complexIN9__gnu_cxx9__promoteIDTplcvNS2_IT_Xsr3std12__is_integerIS3_EE7__valueEE6__typeELi0EcvNS2_IT0_Xsr3std12__is_integerIS6_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS9_EE7__valueEE6__typeEERKS0_IS3_ERKS6_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt7complexIdEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 #4 = { inlinehint 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN6Aquila3FftE", !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i64 0, i64 16, !19}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !17}


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

%"class.std::complex" = type { { double, double } }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::complex<double>, std::allocator<std::complex<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@_ZN6Aquila3Dft1jE = external dso_local constant %"class.std::complex", align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Aquila3Dft3fftEPKd(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %1, ptr noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::complex", align 8
  %6 = alloca %"class.std::complex", align 8
  %7 = alloca %"class.std::complex", align 8
  %8 = alloca %"class.std::complex", align 8
  %9 = alloca %"class.std::complex", align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca %"class.std::complex", align 8
  %14 = alloca %"class.std::complex", align 8
  %15 = alloca %"class.std::complex", align 8
  %16 = alloca i32, align 4
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaISt7complexIdEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorISt7complexIdESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %18, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %19 unwind label %50

19:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorISt7complexIdEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %20 = invoke { double, double } @_ZStngIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) @_ZN6Aquila3Dft1jE)
          to label %21 unwind label %52

21:                                               ; preds = %19
  %22 = extractvalue { double, double } %20, 0
  store double %22, ptr %9, align 8
  %23 = getelementptr inbounds i8, ptr %9, i64 8
  %24 = extractvalue { double, double } %20, 1
  store double %24, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  store double 2.000000e+00, ptr %10, align 8, !tbaa !10
  %25 = invoke { double, double } @_ZStmlIdESt7complexIT_ERKS2_RKS1_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %26 unwind label %54

26:                                               ; preds = %21
  %27 = extractvalue { double, double } %25, 0
  store double %27, ptr %8, align 8
  %28 = getelementptr inbounds i8, ptr %8, i64 8
  %29 = extractvalue { double, double } %25, 1
  store double %29, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  store double 0x400921FB54442D18, ptr %11, align 8, !tbaa !10
  %30 = invoke { double, double } @_ZStmlIdESt7complexIT_ERKS2_RKS1_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %31 unwind label %56

31:                                               ; preds = %26
  %32 = extractvalue { double, double } %30, 0
  store double %32, ptr %7, align 8
  %33 = getelementptr inbounds i8, ptr %7, i64 8
  %34 = extractvalue { double, double } %30, 1
  store double %34, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %35 = load i64, ptr %17, align 8, !tbaa !5
  %36 = uitofp i64 %35 to double
  store double %36, ptr %12, align 8, !tbaa !10
  %37 = invoke { double, double } @_ZStdvIdESt7complexIT_ERKS2_RKS1_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %38 unwind label %58

38:                                               ; preds = %31
  %39 = extractvalue { double, double } %37, 0
  store double %39, ptr %6, align 8
  %40 = getelementptr inbounds i8, ptr %6, i64 8
  %41 = extractvalue { double, double } %37, 1
  store double %41, ptr %40, align 8
  %42 = invoke { double, double } @_ZSt3expIdESt7complexIT_ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %43 unwind label %58

43:                                               ; preds = %38
  %44 = extractvalue { double, double } %42, 0
  store double %44, ptr %5, align 8
  %45 = getelementptr inbounds i8, ptr %5, i64 8
  %46 = extractvalue { double, double } %42, 1
  store double %46, ptr %45, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  %47 = load i64, ptr %17, align 8, !tbaa !5
  %.not = icmp eq i64 %47, 0
  br i1 %.not, label %._crit_edge31, label %.lr.ph30

.lr.ph30:                                         ; preds = %43
  %48 = getelementptr inbounds i8, ptr %15, i64 8
  %49 = getelementptr inbounds i8, ptr %14, i64 8
  br label %63

._crit_edge31:                                    ; preds = %._crit_edge, %43
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  ret void

50:                                               ; preds = %3
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt7complexIdEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  br label %89

52:                                               ; preds = %19
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %62

54:                                               ; preds = %21
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %61

56:                                               ; preds = %26
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

58:                                               ; preds = %38, %31
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %60

60:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %61

61:                                               ; preds = %60, %54
  %.pn.pn = phi { ptr, i32 } [ %.pn, %60 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %62

62:                                               ; preds = %61, %52
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %61 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %88

63:                                               ; preds = %.lr.ph30, %._crit_edge
  %64 = phi i64 [ 0, %.lr.ph30 ], [ %68, %._crit_edge ]
  %.01228 = phi i32 [ 0, %.lr.ph30 ], [ %67, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %13, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %65 = load i64, ptr %17, align 8, !tbaa !5
  %.not32 = icmp eq i64 %65, 0
  br i1 %.not32, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %74, %63
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %64) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  %67 = add i32 %.01228, 1
  %68 = zext i32 %67 to i64
  %69 = load i64, ptr %17, align 8, !tbaa !5
  %70 = icmp ugt i64 %69, %68
  br i1 %70, label %63, label %._crit_edge31, !llvm.loop !14

.lr.ph:                                           ; preds = %63, %74
  %71 = phi i64 [ %83, %74 ], [ 0, %63 ]
  %.027 = phi i32 [ %82, %74 ], [ 0, %63 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %72 = mul i32 %.027, %.01228
  store i32 %72, ptr %16, align 4, !tbaa !16
  %73 = invoke { double, double } @_ZSt3powIdjESt7complexIN9__gnu_cxx9__promoteIDTplcvNS2_IT_Xsr3std12__is_integerIS3_EE7__valueEE6__typeELi0EcvNS2_IT0_Xsr3std12__is_integerIS6_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS9_EE7__valueEE6__typeEERKS0_IS3_ERKS6_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %74 unwind label %86

74:                                               ; preds = %.lr.ph
  %75 = getelementptr inbounds double, ptr %2, i64 %71
  %76 = extractvalue { double, double } %73, 0
  store double %76, ptr %15, align 8
  %77 = extractvalue { double, double } %73, 1
  store double %77, ptr %48, align 8
  %78 = call { double, double } @_ZStmlIdESt7complexIT_ERKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull align 8 dereferenceable(16) %15)
  %79 = extractvalue { double, double } %78, 0
  store double %79, ptr %14, align 8
  %80 = extractvalue { double, double } %78, 1
  store double %80, ptr %49, align 8
  %81 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  %82 = add i32 %.027, 1
  %83 = zext i32 %82 to i64
  %84 = load i64, ptr %17, align 8, !tbaa !5
  %85 = icmp ugt i64 %84, %83
  br i1 %85, label %.lr.ph, label %._crit_edge, !llvm.loop !18

86:                                               ; preds = %.lr.ph
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br label %88

88:                                               ; preds = %86, %62
  %.pn24 = phi { ptr, i32 } [ %87, %86 ], [ %.pn.pn.pn, %62 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @_ZNSt6vectorISt7complexIdESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %89

89:                                               ; preds = %88, %50
  %.pn24.pn = phi { ptr, i32 } [ %.pn24, %88 ], [ %51, %50 ]
  resume { ptr, i32 } %.pn24.pn
}

; 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 nounwind uwtable
declare dso_local void @_ZNSaISt7complexIdEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt7complexIdESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt7complexIdEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint 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 #4 = { inlinehint 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN6Aquila3FftE", !7, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{i64 0, i64 16, !13}
!13 = !{!8, !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = distinct !{!18, !15}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass