; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (fasttransforms)

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

@.str.23 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10convc1dbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %13 = load i64, ptr %10, align 8, !tbaa !9
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %15, label %18

15:                                               ; preds = %6
  %16 = load i64, ptr %8, align 8, !tbaa !9
  %17 = icmp sgt i64 %16, 0
  br label %18

18:                                               ; preds = %15, %6
  %19 = phi i1 [ false, %6 ], [ %17, %15 ]
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef @.str.23, ptr noundef %20)
  %21 = load i64, ptr %8, align 8, !tbaa !9
  %22 = load i64, ptr %10, align 8, !tbaa !9
  %23 = icmp slt i64 %21, %22
  br i1 %23, label %24, label %31

24:                                               ; preds = %18
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = load i64, ptr %10, align 8, !tbaa !9
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load i64, ptr %8, align 8, !tbaa !9
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl10convc1dbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %25, i64 noundef %26, ptr noundef %27, i64 noundef %28, ptr noundef %29, ptr noundef %30)
  br label %38

31:                                               ; preds = %18
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load i64, ptr %8, align 8, !tbaa !9
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  %35 = load i64, ptr %10, align 8, !tbaa !9
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl8convc1dxEPKNS_9ae_vectorElS2_lbllPS0_PNS_8ae_stateE(ptr noundef %32, i64 noundef %33, ptr noundef %34, i64 noundef %35, i1 noundef zeroext false, i64 noundef -1, i64 noundef 0, ptr noundef %36, ptr noundef %37)
  br label %38

38:                                               ; preds = %31, %24
  ret void
}

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl8convc1dxEPKNS_9ae_vectorElS2_lbllPS0_PNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #0

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 = { "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" }

!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 = !{!"long", !7, i64 0}


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

@.str.23 = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl10convc1dbufEPKNS_9ae_vectorElS2_lPS0_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 {
  br label %tailrecurse

tailrecurse:                                      ; preds = %tailrecurse, %6
  %.tr = phi ptr [ %0, %6 ], [ %.tr19, %tailrecurse ]
  %.tr18 = phi i64 [ %1, %6 ], [ %.tr20, %tailrecurse ]
  %.tr19 = phi ptr [ %2, %6 ], [ %.tr, %tailrecurse ]
  %.tr20 = phi i64 [ %3, %6 ], [ %.tr18, %tailrecurse ]
  %7 = icmp sgt i64 %.tr20, 0
  %8 = icmp sgt i64 %.tr18, 0
  %9 = and i1 %8, %7
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.23, ptr noundef %5)
  %10 = icmp slt i64 %.tr18, %.tr20
  br i1 %10, label %tailrecurse, label %11

11:                                               ; preds = %tailrecurse
  tail call void @_ZN11alglib_impl8convc1dxEPKNS_9ae_vectorElS2_lbllPS0_PNS_8ae_stateE(ptr noundef %.tr, i64 noundef %.tr18, ptr noundef %.tr19, i64 noundef %.tr20, i1 noundef zeroext false, i64 noundef -1, i64 noundef 0, ptr noundef %4, ptr noundef %5)
  ret void
}

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl8convc1dxEPKNS_9ae_vectorElS2_lbllPS0_PNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i64 noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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 = { "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" }

!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)"}


; Effective O3 passes: GVNPass,GlobalOptPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass