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

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

; 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 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 @_ZN11alglib_impl25_optguardreport_init_copyEPvS0_PNS_8ae_stateEb(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %11 = zext i1 %3 to i8
  store i8 %11, ptr %8, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %12, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %13, ptr %10, align 8, !tbaa !5
  %14 = load ptr, ptr %10, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %14, i32 0, i32 0
  %16 = load i8, ptr %15, align 8, !tbaa !11, !range !18, !noundef !19
  %17 = trunc i8 %16 to i1
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %18, i32 0, i32 0
  %20 = zext i1 %17 to i8
  store i8 %20, ptr %19, align 8, !tbaa !11
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %21, i32 0, i32 1
  %23 = load i8, ptr %22, align 1, !tbaa !20, !range !18, !noundef !19
  %24 = trunc i8 %23 to i1
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %25, i32 0, i32 1
  %27 = zext i1 %24 to i8
  store i8 %27, ptr %26, align 1, !tbaa !20
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %28, i32 0, i32 2
  %30 = load i64, ptr %29, align 8, !tbaa !21
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %31, i32 0, i32 2
  store i64 %30, ptr %32, align 8, !tbaa !21
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %33, i32 0, i32 3
  %35 = load double, ptr %34, align 8, !tbaa !22
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %36, i32 0, i32 3
  store double %35, ptr %37, align 8, !tbaa !22
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %38, i32 0, i32 4
  %40 = load i8, ptr %39, align 8, !tbaa !23, !range !18, !noundef !19
  %41 = trunc i8 %40 to i1
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %42, i32 0, i32 4
  %44 = zext i1 %41 to i8
  store i8 %44, ptr %43, align 8, !tbaa !23
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %45, i32 0, i32 5
  %47 = load i8, ptr %46, align 1, !tbaa !24, !range !18, !noundef !19
  %48 = trunc i8 %47 to i1
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %49, i32 0, i32 5
  %51 = zext i1 %48 to i8
  store i8 %51, ptr %50, align 1, !tbaa !24
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %52, i32 0, i32 6
  %54 = load i8, ptr %53, align 2, !tbaa !25, !range !18, !noundef !19
  %55 = trunc i8 %54 to i1
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %56, i32 0, i32 6
  %58 = zext i1 %55 to i8
  store i8 %58, ptr %57, align 2, !tbaa !25
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %59, i32 0, i32 7
  %61 = load i64, ptr %60, align 8, !tbaa !26
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %62, i32 0, i32 7
  store i64 %61, ptr %63, align 8, !tbaa !26
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %64, i32 0, i32 8
  %66 = load double, ptr %65, align 8, !tbaa !27
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %67, i32 0, i32 8
  store double %66, ptr %68, align 8, !tbaa !27
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %69, i32 0, i32 9
  %71 = load i8, ptr %70, align 8, !tbaa !28, !range !18, !noundef !19
  %72 = trunc i8 %71 to i1
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %73, i32 0, i32 9
  %75 = zext i1 %72 to i8
  store i8 %75, ptr %74, align 8, !tbaa !28
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %76, i32 0, i32 10
  %78 = load i64, ptr %77, align 8, !tbaa !29
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %79, i32 0, i32 10
  store i64 %78, ptr %80, align 8, !tbaa !29
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %81, i32 0, i32 11
  %83 = load i64, ptr %82, align 8, !tbaa !30
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %84, i32 0, i32 11
  store i64 %83, ptr %85, align 8, !tbaa !30
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %86, i32 0, i32 12
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %88, i32 0, i32 12
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load i8, ptr %8, align 1, !tbaa !9, !range !18, !noundef !19
  %92 = trunc i8 %91 to i1
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %87, ptr noundef %89, ptr noundef %90, i1 noundef zeroext %92)
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %93, i32 0, i32 13
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %95, i32 0, i32 13
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = load i8, ptr %8, align 1, !tbaa !9, !range !18, !noundef !19
  %99 = trunc i8 %98 to i1
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef %94, ptr noundef %96, ptr noundef %97, i1 noundef zeroext %99)
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %100, i32 0, i32 14
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::optguardreport", ptr %102, i32 0, i32 14
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = load i8, ptr %8, align 1, !tbaa !9, !range !18, !noundef !19
  %106 = trunc i8 %105 to i1
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef %101, ptr noundef %103, ptr noundef %104, i1 noundef zeroext %106)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #2

attributes #0 = { 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 = { "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 = { 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, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl14optguardreportE", !10, i64 0, !10, i64 1, !13, i64 8, !14, i64 16, !10, i64 24, !10, i64 25, !10, i64 26, !13, i64 32, !14, i64 40, !10, i64 48, !13, i64 56, !13, i64 64, !15, i64 72, !17, i64 136, !17, i64 216}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_vectorE", !13, i64 0, !13, i64 8, !10, i64 16, !16, i64 24, !7, i64 56}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !10, i64 32, !16, i64 40, !7, i64 72}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!12, !10, i64 1}
!21 = !{!12, !13, i64 8}
!22 = !{!12, !14, i64 16}
!23 = !{!12, !10, i64 24}
!24 = !{!12, !10, i64 25}
!25 = !{!12, !10, i64 26}
!26 = !{!12, !13, i64 32}
!27 = !{!12, !14, i64 40}
!28 = !{!12, !10, i64 48}
!29 = !{!12, !13, i64 56}
!30 = !{!12, !13, i64 64}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl25_optguardreport_init_copyEPvS0_PNS_8ae_stateEb(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) local_unnamed_addr #0 {
  %5 = load i8, ptr %1, align 8, !tbaa !5, !range !16, !noundef !17
  store i8 %5, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 1
  %7 = load i8, ptr %6, align 1, !tbaa !18, !range !16, !noundef !17
  %8 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 %7, ptr %8, align 1, !tbaa !18
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !19
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %10, ptr %11, align 8, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load double, ptr %12, align 8, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  store double %13, ptr %14, align 8, !tbaa !20
  %15 = getelementptr inbounds i8, ptr %1, i64 24
  %16 = load i8, ptr %15, align 8, !tbaa !21, !range !16, !noundef !17
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 %16, ptr %17, align 8, !tbaa !21
  %18 = getelementptr inbounds i8, ptr %1, i64 25
  %19 = load i8, ptr %18, align 1, !tbaa !22, !range !16, !noundef !17
  %20 = getelementptr inbounds i8, ptr %0, i64 25
  store i8 %19, ptr %20, align 1, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %1, i64 26
  %22 = load i8, ptr %21, align 2, !tbaa !23, !range !16, !noundef !17
  %23 = getelementptr inbounds i8, ptr %0, i64 26
  store i8 %22, ptr %23, align 2, !tbaa !23
  %24 = getelementptr inbounds i8, ptr %1, i64 32
  %25 = load i64, ptr %24, align 8, !tbaa !24
  %26 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %25, ptr %26, align 8, !tbaa !24
  %27 = getelementptr inbounds i8, ptr %1, i64 40
  %28 = load double, ptr %27, align 8, !tbaa !25
  %29 = getelementptr inbounds i8, ptr %0, i64 40
  store double %28, ptr %29, align 8, !tbaa !25
  %30 = getelementptr inbounds i8, ptr %1, i64 48
  %31 = load i8, ptr %30, align 8, !tbaa !26, !range !16, !noundef !17
  %32 = getelementptr inbounds i8, ptr %0, i64 48
  store i8 %31, ptr %32, align 8, !tbaa !26
  %33 = getelementptr inbounds i8, ptr %1, i64 56
  %34 = getelementptr inbounds i8, ptr %0, i64 56
  %35 = load <2 x i64>, ptr %33, align 8, !tbaa !27
  store <2 x i64> %35, ptr %34, align 8, !tbaa !27
  %36 = getelementptr inbounds i8, ptr %0, i64 72
  %37 = getelementptr inbounds i8, ptr %1, i64 72
  tail call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %36, ptr noundef nonnull %37, ptr noundef %2, i1 noundef zeroext %3)
  %38 = getelementptr inbounds i8, ptr %0, i64 136
  %39 = getelementptr inbounds i8, ptr %1, i64 136
  tail call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef nonnull %38, ptr noundef nonnull %39, ptr noundef %2, i1 noundef zeroext %3)
  %40 = getelementptr inbounds i8, ptr %0, i64 216
  %41 = getelementptr inbounds i8, ptr %1, i64 216
  tail call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef nonnull %40, ptr noundef nonnull %41, ptr noundef %2, i1 noundef zeroext %3)
  ret void
}

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

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

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, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl14optguardreportE", !7, i64 0, !7, i64 1, !10, i64 8, !11, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !10, i64 32, !11, i64 40, !7, i64 48, !10, i64 56, !10, i64 64, !12, i64 72, !15, i64 136, !15, i64 216}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !7, i64 16, !13, i64 24, !8, i64 56}
!13 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !13, i64 40, !8, i64 72}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!6, !7, i64 1}
!19 = !{!6, !10, i64 8}
!20 = !{!6, !11, i64 16}
!21 = !{!6, !7, i64 24}
!22 = !{!6, !7, i64 25}
!23 = !{!6, !7, i64 26}
!24 = !{!6, !10, i64 32}
!25 = !{!6, !11, i64 40}
!26 = !{!6, !7, i64 48}
!27 = !{!10, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass