; LLVM IR from sgtlaugh/algovault :: code_library/fft.ll (ZN3fft6squareESt6vectorIxSaIxEE)

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

%"struct.fft::(anonymous namespace)::ComplexNum" = type { x86_fp80, x86_fp80 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@_ZN3fft12_GLOBAL__N_11uE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16
@_ZN3fft12_GLOBAL__N_11fE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16
@_ZN3fft12_GLOBAL__N_12dpE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16
@_ZN3fft12_GLOBAL__N_13invE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3fft12_GLOBAL__N_110ComplexNumC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3fft6squareESt6vectorIxSaIxEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"struct.fft::(anonymous namespace)::ComplexNum", align 16
  %9 = alloca %"struct.fft::(anonymous namespace)::ComplexNum", align 16
  %10 = alloca %"struct.fft::(anonymous namespace)::ComplexNum", align 16
  %11 = alloca i1, align 1
  %12 = alloca i64, align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca x86_fp80, align 16
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %17 = call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %18 = mul i64 2, %17
  %19 = sub i64 %18, 1
  %20 = trunc i64 %19 to i32
  store i32 %20, ptr %7, align 4, !tbaa !9
  %21 = call noundef i32 @_ZN3fft12_GLOBAL__N_15buildERSt6vectorIxSaIxEES4_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %1)
  store i32 %21, ptr %6, align 4, !tbaa !9
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %35, %2
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %38

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %28) #6
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = sitofp i64 %30 to x86_fp80
  call void @_ZN3fft12_GLOBAL__N_110ComplexNumC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %8, x86_fp80 noundef %31, x86_fp80 noundef 0xK00000000000000000000)
  %32 = load i32, ptr %5, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11uE, i64 0, i64 %33
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %34, ptr align 16 %8, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %35

35:                                               ; preds = %26
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %5, align 4, !tbaa !9
  br label %22, !llvm.loop !16

38:                                               ; preds = %22
  %39 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN3fft12_GLOBAL__N_19transformEPNS0_10ComplexNumES2_S2_i(ptr noundef @_ZN3fft12_GLOBAL__N_11uE, ptr noundef @_ZN3fft12_GLOBAL__N_11fE, ptr noundef @_ZN3fft12_GLOBAL__N_12dpE, i32 noundef %39)
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %54, %38
  %41 = load i32, ptr %5, align 4, !tbaa !9
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %44, label %57

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #6
  %45 = load i32, ptr %5, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11fE, i64 0, i64 %46
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11fE, i64 0, i64 %49
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %50, i64 32, i1 false), !tbaa.struct !13
  call void @_ZN3fft12_GLOBAL__N_110ComplexNummlES1_(ptr dead_on_unwind writable sret(%"struct.fft::(anonymous namespace)::ComplexNum") align 16 %9, ptr noundef nonnull align 16 dereferenceable(32) %47, ptr noundef byval(%"struct.fft::(anonymous namespace)::ComplexNum") align 16 %10)
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11uE, i64 0, i64 %52
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %53, ptr align 16 %9, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #6
  br label %54

54:                                               ; preds = %44
  %55 = load i32, ptr %5, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %5, align 4, !tbaa !9
  br label %40, !llvm.loop !18

57:                                               ; preds = %40
  %58 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN3fft12_GLOBAL__N_19transformEPNS0_10ComplexNumES2_S2_i(ptr noundef @_ZN3fft12_GLOBAL__N_11uE, ptr noundef @_ZN3fft12_GLOBAL__N_11fE, ptr noundef @_ZN3fft12_GLOBAL__N_13invE, i32 noundef %58)
  store i1 false, ptr %11, align 1
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #6
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %60, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %61 unwind label %85

61:                                               ; preds = %57
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %82, %61
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %65 unwind label %89

65:                                               ; preds = %62
  %66 = load i32, ptr %64, align 4, !tbaa !9
  %67 = icmp slt i32 %63, %66
  br i1 %67, label %68, label %97

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %69 = load i32, ptr %5, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11fE, i64 0, i64 %70
  %72 = getelementptr inbounds %"struct.fft::(anonymous namespace)::ComplexNum", ptr %71, i32 0, i32 0
  %73 = load x86_fp80, ptr %72, align 16, !tbaa !19
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = sitofp i32 %74 to x86_fp80
  %76 = fdiv x86_fp80 %73, %75
  store x86_fp80 %76, ptr %16, align 16, !tbaa !14
  %77 = invoke noundef i64 @_ZN3fft12_GLOBAL__N_116round_to_nearestERKe(ptr noundef nonnull align 16 dereferenceable(16) %16)
          to label %78 unwind label %93

78:                                               ; preds = %68
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %80) #6
  store i64 %77, ptr %81, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %82

82:                                               ; preds = %78
  %83 = load i32, ptr %5, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %5, align 4, !tbaa !9
  br label %62, !llvm.loop !21

85:                                               ; preds = %57
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %14, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %15, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %102

89:                                               ; preds = %62
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %14, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %15, align 4
  br label %101

93:                                               ; preds = %68
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %14, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %101

97:                                               ; preds = %65
  store i1 true, ptr %11, align 1
  %98 = load i1, ptr %11, align 1
  br i1 %98, label %100, label %99

99:                                               ; preds = %97
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %100

100:                                              ; preds = %99, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

101:                                              ; preds = %93, %89
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %102

102:                                              ; preds = %101, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %14, align 8
  %105 = load i32, ptr %15, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN3fft12_GLOBAL__N_15buildERSt6vectorIxSaIxEES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 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) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3fft12_GLOBAL__N_110ComplexNummlES1_(ptr dead_on_unwind noalias writable sret(%"struct.fft::(anonymous namespace)::ComplexNum") align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef byval(%"struct.fft::(anonymous namespace)::ComplexNum") align 16) #5 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN3fft12_GLOBAL__N_116round_to_nearestERKe(ptr noundef nonnull align 16 dereferenceable(16)) #1

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

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

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

%"struct.fft::(anonymous namespace)::ComplexNum" = type { x86_fp80, x86_fp80 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@_ZN3fft12_GLOBAL__N_11uE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16
@_ZN3fft12_GLOBAL__N_11fE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16
@_ZN3fft12_GLOBAL__N_12dpE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16
@_ZN3fft12_GLOBAL__N_13invE = external hidden global [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], align 16

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZN3fft12_GLOBAL__N_110ComplexNumC2Eee(ptr noundef nonnull align 16 dereferenceable(32), x86_fp80 noundef, x86_fp80 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3fft6squareESt6vectorIxSaIxEE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"struct.fft::(anonymous namespace)::ComplexNum", align 16
  %6 = alloca %"struct.fft::(anonymous namespace)::ComplexNum", align 16
  %7 = alloca i64, align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca x86_fp80, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %10 = tail call noundef i64 @_ZNKSt6vectorIxSaIxEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %.tr = trunc i64 %10 to i32
  %11 = shl i32 %.tr, 1
  %12 = add i32 %11, -1
  store i32 %12, ptr %4, align 4, !tbaa !5
  %13 = tail call noundef i32 @_ZN3fft12_GLOBAL__N_15buildERSt6vectorIxSaIxEES4_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %1)
  store i32 %13, ptr %3, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph.preheader, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %2
  tail call void @_ZN3fft12_GLOBAL__N_19transformEPNS0_10ComplexNumES2_S2_i(ptr noundef nonnull @_ZN3fft12_GLOBAL__N_11uE, ptr noundef nonnull @_ZN3fft12_GLOBAL__N_11fE, ptr noundef nonnull @_ZN3fft12_GLOBAL__N_12dpE, i32 noundef %13)
  br label %._crit_edge25

.lr.ph.preheader:                                 ; preds = %2
  %15 = zext nneg i32 %13 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #6
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = sitofp i64 %17 to x86_fp80
  call void @_ZN3fft12_GLOBAL__N_110ComplexNumC2Eee(ptr noundef nonnull align 16 dereferenceable(32) %5, x86_fp80 noundef %18, x86_fp80 noundef 0xK00000000000000000000)
  %19 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11uE, i64 0, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %19, ptr noundef nonnull align 16 dereferenceable(32) %5, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = icmp ult i64 %indvars.iv.next, %15
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph
  call void @_ZN3fft12_GLOBAL__N_19transformEPNS0_10ComplexNumES2_S2_i(ptr noundef nonnull @_ZN3fft12_GLOBAL__N_11uE, ptr noundef nonnull @_ZN3fft12_GLOBAL__N_11fE, ptr noundef nonnull @_ZN3fft12_GLOBAL__N_12dpE, i32 noundef %13)
  br i1 %14, label %.lr.ph24.preheader, label %._crit_edge25

.lr.ph24.preheader:                               ; preds = %._crit_edge
  %21 = zext nneg i32 %13 to i64
  br label %.lr.ph24

.lr.ph24:                                         ; preds = %.lr.ph24.preheader, %.lr.ph24
  %indvars.iv34 = phi i64 [ 0, %.lr.ph24.preheader ], [ %indvars.iv.next35, %.lr.ph24 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  %22 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11fE, i64 0, i64 %indvars.iv34
  call void @_ZN3fft12_GLOBAL__N_110ComplexNummlES1_(ptr dead_on_unwind nonnull writable sret(%"struct.fft::(anonymous namespace)::ComplexNum") align 16 %6, ptr noundef nonnull align 16 dereferenceable(32) %22, ptr noundef nonnull byval(%"struct.fft::(anonymous namespace)::ComplexNum") align 16 %22)
  %23 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11uE, i64 0, i64 %indvars.iv34
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %23, ptr noundef nonnull align 16 dereferenceable(32) %6, i64 32, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  %indvars.iv.next35 = add nuw nsw i64 %indvars.iv34, 1
  %24 = icmp ult i64 %indvars.iv.next35, %21
  br i1 %24, label %.lr.ph24, label %._crit_edge25, !llvm.loop !16

._crit_edge25:                                    ; preds = %.lr.ph24, %._crit_edge.thread, %._crit_edge
  call void @_ZN3fft12_GLOBAL__N_19transformEPNS0_10ComplexNumES2_S2_i(ptr noundef nonnull @_ZN3fft12_GLOBAL__N_11uE, ptr noundef nonnull @_ZN3fft12_GLOBAL__N_11fE, ptr noundef nonnull @_ZN3fft12_GLOBAL__N_13invE, i32 noundef %13)
  %25 = sext i32 %12 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  store i64 0, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIxSaIxEEC2EmRKxRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %25, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %26 unwind label %42

26:                                               ; preds = %._crit_edge25
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph29, label %._crit_edge30

.lr.ph29:                                         ; preds = %26, %36
  %indvars.iv37 = phi i64 [ %indvars.iv.next38, %36 ], [ 0, %26 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %30 = getelementptr inbounds [2097152 x %"struct.fft::(anonymous namespace)::ComplexNum"], ptr @_ZN3fft12_GLOBAL__N_11fE, i64 0, i64 %indvars.iv37
  %31 = load x86_fp80, ptr %30, align 16, !tbaa !17
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = sitofp i32 %32 to x86_fp80
  %34 = fdiv x86_fp80 %31, %33
  store x86_fp80 %34, ptr %9, align 16, !tbaa !12
  %35 = invoke noundef i64 @_ZN3fft12_GLOBAL__N_116round_to_nearestERKe(ptr noundef nonnull align 16 dereferenceable(16) %9)
          to label %36 unwind label %44

36:                                               ; preds = %.lr.ph29
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv37) #6
  store i64 %35, ptr %37, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = icmp slt i64 %indvars.iv.next38, %40
  br i1 %41, label %.lr.ph29, label %._crit_edge30, !llvm.loop !19

42:                                               ; preds = %._crit_edge25
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %46

44:                                               ; preds = %.lr.ph29
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %46

._crit_edge30:                                    ; preds = %36, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret void

46:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN3fft12_GLOBAL__N_15buildERSt6vectorIxSaIxEES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 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) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN3fft12_GLOBAL__N_110ComplexNummlES1_(ptr dead_on_unwind noalias writable sret(%"struct.fft::(anonymous namespace)::ComplexNum") align 16, ptr noundef nonnull align 16 dereferenceable(32), ptr noundef byval(%"struct.fft::(anonymous namespace)::ComplexNum") align 16) local_unnamed_addr #5 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN3fft12_GLOBAL__N_116round_to_nearestERKe(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #1

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

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass