; LLVM IR from kacperks/Fractal_Engine :: Engine/Thirdparty/cmake/Engine/Thirdparty/cmake/openal-soft/common/alcomplex._038a672d (fftN2al4spanISt7complexIdELm18446744073709551615EEEd)

; 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.al::span" = type { ptr, ptr }
%"class.std::complex" = type { { double, double } }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11complex_fftN2al4spanISt7complexIdELm18446744073709551615EEEd(ptr %0, ptr %1, double noundef %2) #0 {
  %4 = alloca %"class.al::span", align 8
  %5 = alloca double, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca double, align 8
  %16 = alloca %"class.std::complex", align 8
  %17 = alloca %"class.std::complex", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca %"class.std::complex", align 8
  %22 = alloca %"class.std::complex", align 8
  %23 = getelementptr inbounds { ptr, ptr }, ptr %4, i32 0, i32 0
  store ptr %0, ptr %23, align 8
  %24 = getelementptr inbounds { ptr, ptr }, ptr %4, i32 0, i32 1
  store ptr %1, ptr %24, align 8
  store double %2, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %25 = call noundef i64 @_ZNK2al4spanISt7complexIdELm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #7
  store i64 %25, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %26 = load i64, ptr %6, align 8, !tbaa !9
  %27 = call noundef i32 @_ZN2al11countr_zeroImEENSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_unsignedIS2_EE5valueEiE4typeES2_(i64 noundef %26) #7
  %28 = sext i32 %27 to i64
  store i64 %28, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 1, ptr %8, align 8, !tbaa !9
  br label %29

29:                                               ; preds = %63, %3
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = load i64, ptr %6, align 8, !tbaa !9
  %32 = sub i64 %31, 1
  %33 = icmp ult i64 %30, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %29
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %66

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %36 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %36, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %37

37:                                               ; preds = %50, %35
  %38 = load i64, ptr %12, align 8, !tbaa !9
  %39 = load i64, ptr %7, align 8, !tbaa !9
  %40 = icmp ult i64 %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %53

42:                                               ; preds = %37
  %43 = load i64, ptr %10, align 8, !tbaa !9
  %44 = shl i64 %43, 1
  %45 = load i64, ptr %11, align 8, !tbaa !9
  %46 = and i64 %45, 1
  %47 = or i64 %44, %46
  store i64 %47, ptr %10, align 8, !tbaa !9
  %48 = load i64, ptr %11, align 8, !tbaa !9
  %49 = lshr i64 %48, 1
  store i64 %49, ptr %11, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %42
  %51 = load i64, ptr %12, align 8, !tbaa !9
  %52 = add i64 %51, 1
  store i64 %52, ptr %12, align 8, !tbaa !9
  br label %37, !llvm.loop !11

53:                                               ; preds = %41
  %54 = load i64, ptr %8, align 8, !tbaa !9
  %55 = load i64, ptr %10, align 8, !tbaa !9
  %56 = icmp ult i64 %54, %55
  br i1 %56, label %57, label %62

57:                                               ; preds = %53
  %58 = load i64, ptr %8, align 8, !tbaa !9
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %58)
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %60)
  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) %59, ptr noundef nonnull align 8 dereferenceable(16) %61) #7
  br label %62

62:                                               ; preds = %57, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %63

63:                                               ; preds = %62
  %64 = load i64, ptr %8, align 8, !tbaa !9
  %65 = add i64 %64, 1
  store i64 %65, ptr %8, align 8, !tbaa !9
  br label %29, !llvm.loop !13

66:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 1, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %67

67:                                               ; preds = %135, %66
  %68 = load i64, ptr %14, align 8, !tbaa !9
  %69 = load i64, ptr %7, align 8, !tbaa !9
  %70 = icmp ult i64 %68, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %138

72:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %73 = call noundef double @_ZN2al8MathDefsIdE2PiEv() #7
  %74 = load i64, ptr %13, align 8, !tbaa !9
  %75 = uitofp i64 %74 to double
  %76 = fdiv double %73, %75
  store double %76, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  %77 = load double, ptr %15, align 8, !tbaa !5
  %78 = call double @cos(double noundef %77) #7
  %79 = load double, ptr %15, align 8, !tbaa !5
  %80 = call double @sin(double noundef %79) #7
  %81 = load double, ptr %5, align 8, !tbaa !5
  %82 = fmul double %80, %81
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %78, double noundef %82)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %17, double noundef 1.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %83 = load i64, ptr %13, align 8, !tbaa !9
  %84 = shl i64 %83, 1
  store i64 %84, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %129, %72
  %86 = load i64, ptr %19, align 8, !tbaa !9
  %87 = load i64, ptr %13, align 8, !tbaa !9
  %88 = icmp ult i64 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %132

90:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %91 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %91, ptr %20, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %123, %90
  %93 = load i64, ptr %20, align 8, !tbaa !9
  %94 = load i64, ptr %6, align 8, !tbaa !9
  %95 = icmp ult i64 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 14, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %127

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #7
  %98 = load i64, ptr %20, align 8, !tbaa !9
  %99 = load i64, ptr %13, align 8, !tbaa !9
  %100 = add i64 %98, %99
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %100)
  %102 = call { double, double } @_ZStmlIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %103 = getelementptr inbounds %"class.std::complex", ptr %21, i32 0, i32 0
  %104 = getelementptr inbounds { double, double }, ptr %103, i32 0, i32 0
  %105 = extractvalue { double, double } %102, 0
  store double %105, ptr %104, align 8
  %106 = getelementptr inbounds { double, double }, ptr %103, i32 0, i32 1
  %107 = extractvalue { double, double } %102, 1
  store double %107, ptr %106, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %108 = load i64, ptr %20, align 8, !tbaa !9
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %108)
  %110 = call { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %109, ptr noundef nonnull align 8 dereferenceable(16) %21)
  %111 = getelementptr inbounds %"class.std::complex", ptr %22, i32 0, i32 0
  %112 = getelementptr inbounds { double, double }, ptr %111, i32 0, i32 0
  %113 = extractvalue { double, double } %110, 0
  store double %113, ptr %112, align 8
  %114 = getelementptr inbounds { double, double }, ptr %111, i32 0, i32 1
  %115 = extractvalue { double, double } %110, 1
  store double %115, ptr %114, align 8
  %116 = load i64, ptr %20, align 8, !tbaa !9
  %117 = load i64, ptr %13, align 8, !tbaa !9
  %118 = add i64 %116, %117
  %119 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %118)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %119, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  %120 = load i64, ptr %20, align 8, !tbaa !9
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %120)
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %121, ptr noundef nonnull align 8 dereferenceable(16) %21)
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #7
  br label %123

123:                                              ; preds = %97
  %124 = load i64, ptr %18, align 8, !tbaa !9
  %125 = load i64, ptr %20, align 8, !tbaa !9
  %126 = add i64 %125, %124
  store i64 %126, ptr %20, align 8, !tbaa !9
  br label %92, !llvm.loop !16

127:                                              ; preds = %96
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %16)
  br label %129

129:                                              ; preds = %127
  %130 = load i64, ptr %19, align 8, !tbaa !9
  %131 = add i64 %130, 1
  store i64 %131, ptr %19, align 8, !tbaa !9
  br label %85, !llvm.loop !17

132:                                              ; preds = %89
  %133 = load i64, ptr %13, align 8, !tbaa !9
  %134 = shl i64 %133, 1
  store i64 %134, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %135

135:                                              ; preds = %132
  %136 = load i64, ptr %14, align 8, !tbaa !9
  %137 = add i64 %136, 1
  store i64 %137, ptr %14, align 8, !tbaa !9
  br label %67, !llvm.loop !18

138:                                              ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  ret void
}

; 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 noundef i64 @_ZNK2al4spanISt7complexIdELm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN2al11countr_zeroImEENSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_unsignedIS2_EE5valueEiE4typeES2_(i64 noundef) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN2al8MathDefsIdE2PiEv() #2 align 2

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

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

; 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 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: 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) #6

; 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 @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #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 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }

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

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


; 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.al::span" = type { ptr, ptr }
%"class.std::complex" = type { { double, double } }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11complex_fftN2al4spanISt7complexIdELm18446744073709551615EEEd(ptr %0, ptr %1, double noundef %2) local_unnamed_addr #0 {
  %4 = alloca %"class.al::span", align 8
  %5 = alloca %"class.std::complex", align 8
  %6 = alloca %"class.std::complex", align 8
  %7 = alloca %"class.std::complex", align 8
  store ptr %0, ptr %4, align 8
  %8 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %1, ptr %8, align 8
  %9 = call noundef i64 @_ZNK2al4spanISt7complexIdELm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  %10 = call noundef i32 @_ZN2al11countr_zeroImEENSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_unsignedIS2_EE5valueEiE4typeES2_(i64 noundef %9) #6
  %11 = sext i32 %10 to i64
  %12 = add i64 %9, -1
  %13 = icmp ugt i64 %12, 1
  br i1 %13, label %.preheader45.lr.ph, label %.preheader44

.preheader45.lr.ph:                               ; preds = %3
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %._crit_edge56, label %.preheader45.us.preheader

.preheader45.us.preheader:                        ; preds = %.preheader45.lr.ph
  %xtraiter = and i64 %11, 3
  %14 = icmp ult i32 %10, 4
  %unroll_iter = and i64 %11, -4
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader45.us

.preheader45.us:                                  ; preds = %.preheader45.us.preheader, %18
  %.049.us = phi i64 [ %19, %18 ], [ 1, %.preheader45.us.preheader ]
  br i1 %14, label %._crit_edge.us.unr-lcssa, label %.preheader45.us.new

15:                                               ; preds = %._crit_edge.us
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %.049.us)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %.lcssa)
  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) %16, ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  br label %18

18:                                               ; preds = %15, %._crit_edge.us
  %19 = add nuw i64 %.049.us, 1
  %exitcond60.not = icmp eq i64 %19, %12
  br i1 %exitcond60.not, label %.preheader44, label %.preheader45.us, !llvm.loop !5

.preheader45.us.new:                              ; preds = %.preheader45.us, %.preheader45.us.new
  %.03948.us = phi i64 [ %32, %.preheader45.us.new ], [ 0, %.preheader45.us ]
  %.04047.us = phi i64 [ %33, %.preheader45.us.new ], [ %.049.us, %.preheader45.us ]
  %niter = phi i64 [ %niter.next.3, %.preheader45.us.new ], [ 0, %.preheader45.us ]
  %20 = shl i64 %.03948.us, 3
  %21 = shl i64 %.04047.us, 2
  %22 = and i64 %21, 4
  %23 = or disjoint i64 %20, %22
  %24 = and i64 %.04047.us, 2
  %25 = or disjoint i64 %23, %24
  %26 = lshr i64 %.04047.us, 2
  %27 = and i64 %26, 1
  %28 = or disjoint i64 %25, %27
  %29 = lshr i64 %.04047.us, 3
  %30 = shl i64 %28, 1
  %31 = and i64 %29, 1
  %32 = or disjoint i64 %30, %31
  %33 = lshr i64 %.04047.us, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.us.unr-lcssa, label %.preheader45.us.new, !llvm.loop !7

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader45.us.new, %.preheader45.us
  %.lcssa.ph = phi i64 [ poison, %.preheader45.us ], [ %32, %.preheader45.us.new ]
  %.03948.us.unr = phi i64 [ 0, %.preheader45.us ], [ %32, %.preheader45.us.new ]
  %.04047.us.unr = phi i64 [ %.049.us, %.preheader45.us ], [ %33, %.preheader45.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.us.unr-lcssa, %.epil.preheader
  %.03948.us.epil = phi i64 [ %36, %.epil.preheader ], [ %.03948.us.unr, %._crit_edge.us.unr-lcssa ]
  %.04047.us.epil = phi i64 [ %37, %.epil.preheader ], [ %.04047.us.unr, %._crit_edge.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.us.unr-lcssa ]
  %34 = shl i64 %.03948.us.epil, 1
  %35 = and i64 %.04047.us.epil, 1
  %36 = or disjoint i64 %34, %35
  %37 = lshr i64 %.04047.us.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge.us, label %.epil.preheader, !llvm.loop !8

._crit_edge.us:                                   ; preds = %.epil.preheader, %._crit_edge.us.unr-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge.us.unr-lcssa ], [ %36, %.epil.preheader ]
  %38 = icmp ult i64 %.049.us, %.lcssa
  br i1 %38, label %15, label %18

.preheader44:                                     ; preds = %18, %3
  %.not57 = icmp eq i32 %10, 0
  br i1 %.not57, label %._crit_edge56, label %.lr.ph55

.lr.ph55:                                         ; preds = %.preheader44
  %39 = getelementptr inbounds i8, ptr %7, i64 8
  br label %40

._crit_edge56:                                    ; preds = %._crit_edge52, %.preheader45.lr.ph, %.preheader44
  ret void

40:                                               ; preds = %.lr.ph55, %._crit_edge52
  %.04154 = phi i64 [ 0, %.lr.ph55 ], [ %49, %._crit_edge52 ]
  %.04253 = phi i64 [ 1, %.lr.ph55 ], [ %47, %._crit_edge52 ]
  %41 = call noundef double @_ZN2al8MathDefsIdE2PiEv() #6
  %42 = uitofp i64 %.04253 to double
  %43 = fdiv double %41, %42
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %44 = call double @cos(double noundef %43) #6
  %45 = call double @sin(double noundef %43) #6
  %46 = fmul double %45, %2
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %5, double noundef %44, double noundef %46)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %6, double noundef 1.000000e+00, double noundef 0.000000e+00)
  %47 = shl i64 %.04253, 1
  %.not58 = icmp eq i64 %.04253, 0
  br i1 %.not58, label %._crit_edge52, label %.preheader

.preheader:                                       ; preds = %40, %._crit_edge
  %.03851 = phi i64 [ %51, %._crit_edge ], [ 0, %40 ]
  %48 = icmp ult i64 %.03851, %9
  br i1 %48, label %.lr.ph, label %._crit_edge

._crit_edge52:                                    ; preds = %._crit_edge, %40
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %49 = add nuw i64 %.04154, 1
  %exitcond62.not = icmp eq i64 %49, %11
  br i1 %exitcond62.not, label %._crit_edge56, label %40, !llvm.loop !10

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %51 = add nuw i64 %.03851, 1
  %exitcond61.not = icmp eq i64 %51, %.04253
  br i1 %exitcond61.not, label %._crit_edge52, label %.preheader, !llvm.loop !11

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.03750 = phi i64 [ %64, %.lr.ph ], [ %.03851, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  %52 = add i64 %.03750, %.04253
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %52)
  %54 = call { double, double } @_ZStmlIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %55 = extractvalue { double, double } %54, 0
  store double %55, ptr %7, align 8
  %56 = extractvalue { double, double } %54, 1
  store double %56, ptr %39, align 8
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %.03750)
  %58 = call { double, double } @_ZStmiIdESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %59 = extractvalue { double, double } %58, 0
  %60 = extractvalue { double, double } %58, 1
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %52)
  store double %59, ptr %61, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %61, i64 8
  store double %60, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !12
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %.03750)
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt7complexIdEpLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  %64 = add i64 %.03750, %47
  %65 = icmp ult i64 %64, %9
  br i1 %65, label %.lr.ph, label %._crit_edge, !llvm.loop !15
}

; 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 noundef i64 @_ZNK2al4spanISt7complexIdELm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN2al11countr_zeroImEENSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_unsignedIS2_EE5valueEiE4typeES2_(i64 noundef) local_unnamed_addr #3

; 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 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 @_ZNK2al4spanISt7complexIdELm18446744073709551615EEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN2al8MathDefsIdE2PiEv() local_unnamed_addr #2 align 2

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

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

; 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 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 #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)) local_unnamed_addr #5

; 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 @_ZNSt7complexIdEmLIdEERS0_RKS_IT_E(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_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 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 nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.unroll.disable"}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}
!12 = !{!13, !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = distinct !{!15, !6}


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