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

; 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::armijostate" = type { i8, %"struct.alglib_impl::ae_vector", double, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double, double, double, i64, i64, i64, %"struct.alglib_impl::rcommstate" }
%"struct.alglib_impl::ae_vector" = type { 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::rcommstate" = type { i32, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector" }

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22_armijostate_init_copyEPvS0_PNS_8ae_stateEb(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) #2 {
  %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::armijostate", ptr %14, i32 0, i32 0
  %16 = load i8, ptr %15, align 8, !tbaa !11, !range !19, !noundef !20
  %17 = trunc i8 %16 to i1
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::armijostate", 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 %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %21, i32 0, i32 1
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load i8, ptr %8, align 1, !tbaa !9, !range !19, !noundef !20
  %27 = trunc i8 %26 to i1
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %22, ptr noundef %24, ptr noundef %25, i1 noundef zeroext %27)
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %28, i32 0, i32 2
  %30 = load double, ptr %29, align 8, !tbaa !21
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %31, i32 0, i32 2
  store double %30, ptr %32, align 8, !tbaa !21
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %33, i32 0, i32 3
  %35 = load i64, ptr %34, align 8, !tbaa !22
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %36, i32 0, i32 3
  store i64 %35, ptr %37, align 8, !tbaa !22
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %40, i32 0, i32 4
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load i8, ptr %8, align 1, !tbaa !9, !range !19, !noundef !20
  %44 = trunc i8 %43 to i1
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %39, ptr noundef %41, ptr noundef %42, i1 noundef zeroext %44)
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %45, i32 0, i32 5
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %47, i32 0, i32 5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = load i8, ptr %8, align 1, !tbaa !9, !range !19, !noundef !20
  %51 = trunc i8 %50 to i1
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef %46, ptr noundef %48, ptr noundef %49, i1 noundef zeroext %51)
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %52, i32 0, i32 6
  %54 = load double, ptr %53, align 8, !tbaa !23
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %55, i32 0, i32 6
  store double %54, ptr %56, align 8, !tbaa !23
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %57, i32 0, i32 7
  %59 = load double, ptr %58, align 8, !tbaa !24
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %60, i32 0, i32 7
  store double %59, ptr %61, align 8, !tbaa !24
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %62, i32 0, i32 8
  %64 = load double, ptr %63, align 8, !tbaa !25
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %65, i32 0, i32 8
  store double %64, ptr %66, align 8, !tbaa !25
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %67, i32 0, i32 9
  %69 = load i64, ptr %68, align 8, !tbaa !26
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %70, i32 0, i32 9
  store i64 %69, ptr %71, align 8, !tbaa !26
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %72, i32 0, i32 10
  %74 = load i64, ptr %73, align 8, !tbaa !27
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %75, i32 0, i32 10
  store i64 %74, ptr %76, align 8, !tbaa !27
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %77, i32 0, i32 11
  %79 = load i64, ptr %78, align 8, !tbaa !28
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %80, i32 0, i32 11
  store i64 %79, ptr %81, align 8, !tbaa !28
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %82, i32 0, i32 12
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.alglib_impl::armijostate", ptr %84, i32 0, i32 12
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load i8, ptr %8, align 1, !tbaa !9, !range !19, !noundef !20
  %88 = trunc i8 %87 to i1
  call void @_ZN11alglib_impl21_rcommstate_init_copyEPNS_10rcommstateES1_PNS_8ae_stateEb(ptr noundef %83, ptr noundef %85, ptr noundef %86, i1 noundef zeroext %88)
  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_impl21_rcommstate_init_copyEPNS_10rcommstateES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { 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 #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_impl11armijostateE", !10, i64 0, !13, i64 8, !16, i64 72, !14, i64 80, !13, i64 88, !13, i64 152, !16, i64 216, !16, i64 224, !16, i64 232, !14, i64 240, !14, i64 248, !14, i64 256, !17, i64 264}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !14, i64 0, !14, i64 8, !10, i64 16, !15, i64 24, !7, i64 56}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl10rcommstateE", !18, i64 0, !13, i64 8, !13, i64 72, !13, i64 136, !13, i64 200}
!18 = !{!"int", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!12, !16, i64 72}
!22 = !{!12, !14, i64 80}
!23 = !{!12, !16, i64 216}
!24 = !{!12, !16, i64 224}
!25 = !{!12, !16, i64 232}
!26 = !{!12, !14, i64 240}
!27 = !{!12, !14, i64 248}
!28 = !{!12, !14, i64 256}


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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22_armijostate_init_copyEPvS0_PNS_8ae_stateEb(ptr noundef %0, ptr noundef %1, ptr noundef %2, i1 noundef zeroext %3) local_unnamed_addr #1 {
  %5 = load i8, ptr %1, align 8, !tbaa !5, !range !17, !noundef !18
  store i8 %5, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  tail call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %2, i1 noundef zeroext %3)
  %8 = getelementptr inbounds i8, ptr %1, i64 72
  %9 = load double, ptr %8, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 72
  store double %9, ptr %10, align 8, !tbaa !19
  %11 = getelementptr inbounds i8, ptr %1, i64 80
  %12 = load i64, ptr %11, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  store i64 %12, ptr %13, align 8, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = getelementptr inbounds i8, ptr %1, i64 88
  tail call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef %2, i1 noundef zeroext %3)
  %16 = getelementptr inbounds i8, ptr %0, i64 152
  %17 = getelementptr inbounds i8, ptr %1, i64 152
  tail call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %2, i1 noundef zeroext %3)
  %18 = getelementptr inbounds i8, ptr %1, i64 216
  %19 = getelementptr inbounds i8, ptr %0, i64 216
  %20 = load <2 x double>, ptr %18, align 8, !tbaa !21
  store <2 x double> %20, ptr %19, align 8, !tbaa !21
  %21 = getelementptr inbounds i8, ptr %1, i64 232
  %22 = load double, ptr %21, align 8, !tbaa !22
  %23 = getelementptr inbounds i8, ptr %0, i64 232
  store double %22, ptr %23, align 8, !tbaa !22
  %24 = getelementptr inbounds i8, ptr %1, i64 240
  %25 = getelementptr inbounds i8, ptr %0, i64 240
  %26 = load <2 x i64>, ptr %24, align 8, !tbaa !23
  store <2 x i64> %26, ptr %25, align 8, !tbaa !23
  %27 = getelementptr inbounds i8, ptr %1, i64 256
  %28 = load i64, ptr %27, align 8, !tbaa !24
  %29 = getelementptr inbounds i8, ptr %0, i64 256
  store i64 %28, ptr %29, align 8, !tbaa !24
  %30 = getelementptr inbounds i8, ptr %0, i64 264
  %31 = getelementptr inbounds i8, ptr %1, i64 264
  tail call void @_ZN11alglib_impl21_rcommstate_init_copyEPNS_10rcommstateES1_PNS_8ae_stateEb(ptr noundef nonnull %30, ptr noundef nonnull %31, ptr noundef %2, i1 noundef zeroext %3)
  ret void
}

declare void @_ZN11alglib_impl21_rcommstate_init_copyEPNS_10rcommstateES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #0

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

!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_impl11armijostateE", !7, i64 0, !10, i64 8, !14, i64 72, !11, i64 80, !10, i64 88, !10, i64 152, !14, i64 216, !14, i64 224, !14, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !15, i64 264}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !7, i64 16, !12, i64 24, !8, i64 56}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!"_ZTSN11alglib_impl10rcommstateE", !16, i64 0, !10, i64 8, !10, i64 72, !10, i64 136, !10, i64 200}
!16 = !{!"int", !8, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!6, !14, i64 72}
!20 = !{!6, !11, i64 80}
!21 = !{!14, !14, i64 0}
!22 = !{!6, !14, i64 232}
!23 = !{!11, !11, i64 0}
!24 = !{!6, !11, i64 256}


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