; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/数学算法/快速傅里叶变换.ll (Z3fftRSt6vectorISt7complexIdESaIS1_EEb)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@w = external dso_local global [4194304 x %"class.std::complex"], align 16

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3fftRSt6vectorISt7complexIdESaIS1_EEb(ptr noundef nonnull align 8 dereferenceable(24) %0, i1 noundef zeroext %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.std::complex", align 8
  %17 = alloca %"class.std::complex", align 8
  %18 = alloca %"class.std::complex", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %26 = zext i1 %1 to i8
  store i8 %26, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %27

27:                                               ; preds = %64, %2
  %28 = load i32, ptr %5, align 4, !tbaa !11
  %29 = sext i32 %28 to i64
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #6
  %32 = icmp ult i64 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %27
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %67

34:                                               ; preds = %27
  %35 = load i32, ptr %5, align 4, !tbaa !11
  %36 = load i32, ptr %6, align 4, !tbaa !11
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %38, label %47

38:                                               ; preds = %34
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = load i32, ptr %5, align 4, !tbaa !11
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %41) #6
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = load i32, ptr %6, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #6
  call void @_ZSt4swapISt7complexIdEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %46) #6
  br label %47

47:                                               ; preds = %38, %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #6
  %50 = lshr i64 %49, 1
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr %8, align 4, !tbaa !11
  br label %52

52:                                               ; preds = %60, %47
  %53 = load i32, ptr %8, align 4, !tbaa !11
  %54 = load i32, ptr %6, align 4, !tbaa !11
  %55 = xor i32 %54, %53
  store i32 %55, ptr %6, align 4, !tbaa !11
  %56 = load i32, ptr %8, align 4, !tbaa !11
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %52
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %63

59:                                               ; preds = %52
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %8, align 4, !tbaa !11
  %62 = ashr i32 %61, 1
  store i32 %62, ptr %8, align 4, !tbaa !11
  br label %52, !llvm.loop !13

63:                                               ; preds = %58
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %5, align 4, !tbaa !11
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %5, align 4, !tbaa !11
  br label %27, !llvm.loop !15

67:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 2, ptr %9, align 4, !tbaa !11
  br label %68

68:                                               ; preds = %145, %67
  %69 = load i32, ptr %9, align 4, !tbaa !11
  %70 = sext i32 %69 to i64
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #6
  %73 = icmp ule i64 %70, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %68
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %148

75:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %76 = load i32, ptr %9, align 4, !tbaa !11
  %77 = sdiv i32 %76, 2
  store i32 %77, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %78 = load i32, ptr %9, align 4, !tbaa !11
  %79 = sdiv i32 4194304, %78
  store i32 %79, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %140, %75
  %81 = load i32, ptr %12, align 4, !tbaa !11
  %82 = sext i32 %81 to i64
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %83) #6
  %85 = icmp ult i64 %82, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %80
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %144

87:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !11
  br label %88

88:                                               ; preds = %136, %87
  %89 = load i32, ptr %13, align 4, !tbaa !11
  %90 = load i32, ptr %10, align 4, !tbaa !11
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 14, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %139

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = load i32, ptr %12, align 4, !tbaa !11
  %96 = load i32, ptr %13, align 4, !tbaa !11
  %97 = add nsw i32 %95, %96
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %98) #6
  store ptr %99, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = load i32, ptr %12, align 4, !tbaa !11
  %102 = load i32, ptr %13, align 4, !tbaa !11
  %103 = add nsw i32 %101, %102
  %104 = load i32, ptr %10, align 4, !tbaa !11
  %105 = add nsw i32 %103, %104
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %106) #6
  store ptr %107, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %108 = load i32, ptr %11, align 4, !tbaa !11
  %109 = load i32, ptr %13, align 4, !tbaa !11
  %110 = mul nsw i32 %108, %109
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [4194304 x %"class.std::complex"], ptr @w, i64 0, i64 %111
  %113 = load ptr, ptr %15, align 8, !tbaa !5
  %114 = call { double, double } @_ZStmlIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %112, ptr noundef nonnull align 8 dereferenceable(16) %113)
  %115 = getelementptr inbounds %"class.std::complex", ptr %16, i32 0, i32 0
  %116 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 0
  %117 = extractvalue { double, double } %114, 0
  store double %117, ptr %116, align 8
  %118 = getelementptr inbounds { double, double }, ptr %115, i32 0, i32 1
  %119 = extractvalue { double, double } %114, 1
  store double %119, ptr %118, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = call { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %122 = getelementptr inbounds %"class.std::complex", ptr %17, i32 0, i32 0
  %123 = getelementptr inbounds { double, double }, ptr %122, i32 0, i32 0
  %124 = extractvalue { double, double } %121, 0
  store double %124, ptr %123, align 8
  %125 = getelementptr inbounds { double, double }, ptr %122, i32 0, i32 1
  %126 = extractvalue { double, double } %121, 1
  store double %126, ptr %125, align 8
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %127, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = call { double, double } @_ZStplIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %128, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %130 = getelementptr inbounds %"class.std::complex", ptr %18, i32 0, i32 0
  %131 = getelementptr inbounds { double, double }, ptr %130, i32 0, i32 0
  %132 = extractvalue { double, double } %129, 0
  store double %132, ptr %131, align 8
  %133 = getelementptr inbounds { double, double }, ptr %130, i32 0, i32 1
  %134 = extractvalue { double, double } %129, 1
  store double %134, ptr %133, align 8
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %135, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %136

136:                                              ; preds = %93
  %137 = load i32, ptr %13, align 4, !tbaa !11
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %13, align 4, !tbaa !11
  br label %88, !llvm.loop !18

139:                                              ; preds = %92
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %9, align 4, !tbaa !11
  %142 = load i32, ptr %12, align 4, !tbaa !11
  %143 = add nsw i32 %142, %141
  store i32 %143, ptr %12, align 4, !tbaa !11
  br label %80, !llvm.loop !19

144:                                              ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %9, align 4, !tbaa !11
  %147 = mul nsw i32 %146, 2
  store i32 %147, ptr %9, align 4, !tbaa !11
  br label %68, !llvm.loop !20

148:                                              ; preds = %74
  %149 = load i8, ptr %4, align 1, !tbaa !9, !range !21, !noundef !22
  %150 = trunc i8 %149 to i1
  br i1 %150, label %151, label %184

151:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %152) #6
  %154 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %153, ptr %154, align 8
  %155 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %20, i64 noundef 1) #6
  %156 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  store ptr %155, ptr %156, align 8
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %157) #6
  %159 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %158, ptr %159, align 8
  %160 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %19, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8
  %162 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %161, ptr %163)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %164, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %165 = load ptr, ptr %22, align 8, !tbaa !5
  %166 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %165) #6
  %167 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %166, ptr %167, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %168 = load ptr, ptr %22, align 8, !tbaa !5
  %169 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %168) #6
  %170 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %169, ptr %170, align 8
  br label %171

171:                                              ; preds = %181, %151
  %172 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt7complexIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  br i1 %172, label %174, label %173

173:                                              ; preds = %171
  store i32 17, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %183

174:                                              ; preds = %171
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %175 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  store ptr %175, ptr %25, align 8, !tbaa !5
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %176) #6
  %178 = uitofp i64 %177 to double
  %179 = load ptr, ptr %25, align 8, !tbaa !5
  %180 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEdVEd(ptr noundef nonnull align 8 dereferenceable(16) %179, double noundef %178)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %181

181:                                              ; preds = %174
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  br label %171

183:                                              ; preds = %173
  br label %184

184:                                              ; preds = %183, %148
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapISt7complexIdEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

; 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) #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) #5

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt7complexIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 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 #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 = { 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 #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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{i64 0, i64 16, !17}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = !{i8 0, i8 2}
!22 = !{}


; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@w = external dso_local global [4194304 x %"class.std::complex"], align 16

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3fftRSt6vectorISt7complexIdESaIS1_EEb(ptr noundef nonnull align 8 dereferenceable(24) %0, i1 noundef zeroext %1) local_unnamed_addr #1 {
  %3 = alloca %"class.std::complex", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = tail call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %.not72 = icmp eq i64 %7, 0
  br i1 %.not72, label %.preheader60, label %.lr.ph

.preheader60:                                     ; preds = %23, %2
  %8 = tail call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %.not65 = icmp ult i64 %8, 2
  br i1 %.not65, label %._crit_edge68, label %.lr.ph67

.lr.ph67:                                         ; preds = %.preheader60
  %9 = getelementptr inbounds i8, ptr %3, i64 8
  br label %26

.lr.ph:                                           ; preds = %2, %23
  %indvars.iv = phi i64 [ %indvars.iv.next, %23 ], [ 0, %2 ]
  %.05161 = phi i32 [ %20, %23 ], [ 0, %2 ]
  %10 = sext i32 %.05161 to i64
  %11 = icmp slt i64 %indvars.iv, %10
  br i1 %11, label %12, label %15

12:                                               ; preds = %.lr.ph
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #6
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %10) #6
  tail call void @_ZSt4swapISt7complexIdEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  br label %15

15:                                               ; preds = %12, %.lr.ph
  %16 = tail call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %17 = lshr i64 %16, 1
  %18 = trunc i64 %17 to i32
  br label %19

19:                                               ; preds = %19, %15
  %.052 = phi i32 [ %18, %15 ], [ %22, %19 ]
  %.1 = phi i32 [ %.05161, %15 ], [ %20, %19 ]
  %20 = xor i32 %.1, %.052
  %21 = icmp slt i32 %20, %.052
  %22 = ashr i32 %.052, 1
  br i1 %21, label %19, label %23, !llvm.loop !5

23:                                               ; preds = %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = tail call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %25 = icmp ugt i64 %24, %indvars.iv.next
  br i1 %25, label %.lr.ph, label %.preheader60, !llvm.loop !7

._crit_edge68:                                    ; preds = %._crit_edge, %.preheader60
  br i1 %1, label %55, label %68

26:                                               ; preds = %.lr.ph67, %._crit_edge
  %.05366 = phi i32 [ 2, %.lr.ph67 ], [ %33, %._crit_edge ]
  %27 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %.not73 = icmp eq i64 %27, 0
  br i1 %.not73, label %._crit_edge, label %.preheader.preheader

.preheader.preheader:                             ; preds = %26
  %28 = udiv i32 4194304, %.05366
  %29 = lshr exact i32 %.05366, 1
  %30 = zext nneg i32 %29 to i64
  %31 = zext nneg i32 %28 to i64
  %umax = call i32 @llvm.umax.i32(i32 %29, i32 1)
  %32 = sext i32 %.05366 to i64
  %wide.trip.count = zext nneg i32 %umax to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %36
  %indvars.iv78 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next79, %36 ]
  br label %39

._crit_edge:                                      ; preds = %36, %26
  %33 = shl nsw i32 %.05366, 1
  %34 = zext nneg i32 %33 to i64
  %35 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %.not = icmp ult i64 %35, %34
  br i1 %.not, label %._crit_edge68, label %26, !llvm.loop !8

36:                                               ; preds = %39
  %indvars.iv.next79 = add nsw i64 %indvars.iv78, %32
  %37 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %38 = icmp ugt i64 %37, %indvars.iv.next79
  br i1 %38, label %.preheader, label %._crit_edge, !llvm.loop !9

39:                                               ; preds = %.preheader, %39
  %indvars.iv75 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next76, %39 ]
  %40 = add nsw i64 %indvars.iv75, %indvars.iv78
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %40) #6
  %42 = add nsw i64 %40, %30
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt7complexIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %42) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %44 = mul nuw nsw i64 %indvars.iv75, %31
  %45 = getelementptr inbounds [4194304 x %"class.std::complex"], ptr @w, i64 0, i64 %44
  %46 = call { double, double } @_ZStmlIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(16) %43)
  %47 = extractvalue { double, double } %46, 0
  store double %47, ptr %3, align 8
  %48 = extractvalue { double, double } %46, 1
  store double %48, ptr %9, align 8
  %49 = call { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %3)
  %50 = extractvalue { double, double } %49, 0
  %51 = extractvalue { double, double } %49, 1
  store double %50, ptr %43, align 8
  %.sroa.46.0..sroa_idx = getelementptr inbounds i8, ptr %43, i64 8
  store double %51, ptr %.sroa.46.0..sroa_idx, align 8, !tbaa !10
  %52 = call { double, double } @_ZStplIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %3)
  %53 = extractvalue { double, double } %52, 0
  %54 = extractvalue { double, double } %52, 1
  store double %53, ptr %41, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %41, i64 8
  store double %54, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count
  br i1 %exitcond.not, label %36, label %39, !llvm.loop !13

55:                                               ; preds = %._crit_edge68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %56 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  store ptr %56, ptr %4, align 8
  %57 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef 1) #6
  %58 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  call void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr %57, ptr %58)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %59 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  store ptr %59, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %60 = call ptr @_ZNSt6vectorISt7complexIdESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  store ptr %60, ptr %6, align 8
  %61 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt7complexIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %61, label %.lr.ph70, label %._crit_edge71

._crit_edge71:                                    ; preds = %.lr.ph70, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %68

.lr.ph70:                                         ; preds = %55, %.lr.ph70
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %63 = call noundef i64 @_ZNKSt6vectorISt7complexIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %64 = uitofp i64 %63 to double
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEdVEd(ptr noundef nonnull align 8 dereferenceable(16) %62, double noundef %64)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %67 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt7complexIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %67, label %.lr.ph70, label %._crit_edge71

68:                                               ; preds = %._crit_edge71, %._crit_edge68
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapISt7complexIdEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS5_ESt18is_move_assignableIS5_EEE5valueEvE4typeERS5_SE_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; 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: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZStmlIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt7complexIdESt6vectorIS3_SaIS3_EEEEEvT_S9_(ptr, ptr) local_unnamed_addr #4

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt7complexIdESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = !{!11, !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = distinct !{!13, !6}


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