; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (ap)

; 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.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon = type { ptr }
%"struct.alglib_impl::ae_complex" = type { double, double }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl20_ialglib_cmatrixherkElldPNS_10ae_complexElldS1_lb(i64 noundef, i64 noundef, double noundef, ptr noundef, i64 noundef, i64 noundef, double noundef, ptr noundef, i64 noundef, i1 noundef zeroext) #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl23_ialglib_i_cmatrixherkfElldPNS_9ae_matrixEllldS1_llb(i64 noundef %0, i64 noundef %1, double noundef %2, ptr noundef %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, double noundef %7, ptr noundef %8, i64 noundef %9, i64 noundef %10, i1 noundef zeroext %11) #0 {
  %13 = alloca i1, align 1
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i8, align 1
  store i64 %0, ptr %14, align 8, !tbaa !5
  store i64 %1, ptr %15, align 8, !tbaa !5
  store double %2, ptr %16, align 8, !tbaa !9
  store ptr %3, ptr %17, align 8, !tbaa !11
  store i64 %4, ptr %18, align 8, !tbaa !5
  store i64 %5, ptr %19, align 8, !tbaa !5
  store i64 %6, ptr %20, align 8, !tbaa !5
  store double %7, ptr %21, align 8, !tbaa !9
  store ptr %8, ptr %22, align 8, !tbaa !11
  store i64 %9, ptr %23, align 8, !tbaa !5
  store i64 %10, ptr %24, align 8, !tbaa !5
  %26 = zext i1 %11 to i8
  store i8 %26, ptr %25, align 1, !tbaa !13
  %27 = load double, ptr %16, align 8, !tbaa !9
  %28 = fcmp oeq double %27, 0.000000e+00
  br i1 %28, label %35, label %29

29:                                               ; preds = %12
  %30 = load i64, ptr %15, align 8, !tbaa !5
  %31 = icmp eq i64 %30, 0
  br i1 %31, label %35, label %32

32:                                               ; preds = %29
  %33 = load i64, ptr %14, align 8, !tbaa !5
  %34 = icmp eq i64 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %32, %29, %12
  store i1 false, ptr %13, align 1
  br label %67

36:                                               ; preds = %32
  %37 = load i64, ptr %14, align 8, !tbaa !5
  %38 = load i64, ptr %15, align 8, !tbaa !5
  %39 = load double, ptr %16, align 8, !tbaa !9
  %40 = load ptr, ptr %17, align 8, !tbaa !11
  %41 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %40, i32 0, i32 6
  %42 = load ptr, ptr %41, align 8, !tbaa !15
  %43 = load i64, ptr %18, align 8, !tbaa !5
  %44 = getelementptr inbounds ptr, ptr %42, i64 %43
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = load i64, ptr %19, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %45, i64 %46
  %48 = load ptr, ptr %17, align 8, !tbaa !11
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %48, i32 0, i32 2
  %50 = load i64, ptr %49, align 8, !tbaa !16
  %51 = load i64, ptr %20, align 8, !tbaa !5
  %52 = load double, ptr %21, align 8, !tbaa !9
  %53 = load ptr, ptr %22, align 8, !tbaa !11
  %54 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %53, i32 0, i32 6
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = load i64, ptr %23, align 8, !tbaa !5
  %57 = getelementptr inbounds ptr, ptr %55, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load i64, ptr %24, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %58, i64 %59
  %61 = load ptr, ptr %22, align 8, !tbaa !11
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %61, i32 0, i32 2
  %63 = load i64, ptr %62, align 8, !tbaa !16
  %64 = load i8, ptr %25, align 1, !tbaa !13, !range !19, !noundef !20
  %65 = trunc i8 %64 to i1
  %66 = call noundef zeroext i1 @_ZN11alglib_impl20_ialglib_cmatrixherkElldPNS_10ae_complexElldS1_lb(i64 noundef %37, i64 noundef %38, double noundef %39, ptr noundef %47, i64 noundef %50, i64 noundef %51, double noundef %52, ptr noundef %60, i64 noundef %63, i1 noundef zeroext %65)
  store i1 %66, ptr %13, align 1
  br label %67

67:                                               ; preds = %36, %35
  %68 = load i1, ptr %13, align 1
  ret i1 %68
}

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

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !6, i64 16}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !18, i64 40, !7, i64 72}
!18 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!19 = !{i8 0, i8 2}
!20 = !{}


; 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.alglib_impl::ae_complex" = type { double, double }

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl23_ialglib_i_cmatrixherkfElldPNS_9ae_matrixEllldS1_llb(i64 noundef %0, i64 noundef %1, double noundef %2, ptr nocapture noundef readonly %3, i64 noundef %4, i64 noundef %5, i64 noundef %6, double noundef %7, ptr nocapture noundef readonly %8, i64 noundef %9, i64 noundef %10, i1 noundef zeroext %11) local_unnamed_addr #0 {
  %13 = fcmp oeq double %2, 0.000000e+00
  %14 = icmp eq i64 %1, 0
  %or.cond = or i1 %14, %13
  %15 = icmp eq i64 %0, 0
  %or.cond3 = or i1 %15, %or.cond
  br i1 %or.cond3, label %32, label %16

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %3, i64 72
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = getelementptr inbounds ptr, ptr %18, i64 %4
  %20 = load ptr, ptr %19, align 8, !tbaa !8
  %21 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %20, i64 %5
  %22 = getelementptr inbounds i8, ptr %3, i64 16
  %23 = load i64, ptr %22, align 8, !tbaa !10
  %24 = getelementptr inbounds i8, ptr %8, i64 72
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  %26 = getelementptr inbounds ptr, ptr %25, i64 %9
  %27 = load ptr, ptr %26, align 8, !tbaa !8
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %27, i64 %10
  %29 = getelementptr inbounds i8, ptr %8, i64 16
  %30 = load i64, ptr %29, align 8, !tbaa !10
  %31 = tail call noundef zeroext i1 @_ZN11alglib_impl20_ialglib_cmatrixherkElldPNS_10ae_complexElldS1_lb(i64 noundef %0, i64 noundef %1, double noundef %2, ptr noundef %21, i64 noundef %23, i64 noundef %6, double noundef %7, ptr noundef %28, i64 noundef %30, i1 noundef zeroext %11)
  br label %32

32:                                               ; preds = %12, %16
  %.0 = phi i1 [ %31, %16 ], [ false, %12 ]
  ret i1 %.0
}

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

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !12, i64 16}
!11 = !{!"_ZTSN11alglib_impl9ae_matrixE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !14, i64 40, !6, i64 72}
!12 = !{!"long", !6, i64 0}
!13 = !{!"bool", !6, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass