; 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::linminstate" = type { i8, i8, i64, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }

; 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 nounwind uwtable
define dso_local void @_ZN11alglib_impl22_linminstate_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) #2
  %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) #2
  %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::linminstate", ptr %14, i32 0, i32 0
  %16 = load i8, ptr %15, align 8, !tbaa !11, !range !15, !noundef !16
  %17 = trunc i8 %16 to i1
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::linminstate", 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::linminstate", ptr %21, i32 0, i32 1
  %23 = load i8, ptr %22, align 1, !tbaa !17, !range !15, !noundef !16
  %24 = trunc i8 %23 to i1
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %25, i32 0, i32 1
  %27 = zext i1 %24 to i8
  store i8 %27, ptr %26, align 1, !tbaa !17
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %28, i32 0, i32 2
  %30 = load i64, ptr %29, align 8, !tbaa !18
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %31, i32 0, i32 2
  store i64 %30, ptr %32, align 8, !tbaa !18
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %33, i32 0, i32 3
  %35 = load double, ptr %34, align 8, !tbaa !19
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %36, i32 0, i32 3
  store double %35, ptr %37, align 8, !tbaa !19
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %38, i32 0, i32 4
  %40 = load double, ptr %39, align 8, !tbaa !20
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %41, i32 0, i32 4
  store double %40, ptr %42, align 8, !tbaa !20
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %43, i32 0, i32 5
  %45 = load double, ptr %44, align 8, !tbaa !21
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %46, i32 0, i32 5
  store double %45, ptr %47, align 8, !tbaa !21
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %48, i32 0, i32 6
  %50 = load double, ptr %49, align 8, !tbaa !22
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %51, i32 0, i32 6
  store double %50, ptr %52, align 8, !tbaa !22
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %53, i32 0, i32 7
  %55 = load double, ptr %54, align 8, !tbaa !23
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %56, i32 0, i32 7
  store double %55, ptr %57, align 8, !tbaa !23
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %58, i32 0, i32 8
  %60 = load double, ptr %59, align 8, !tbaa !24
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %61, i32 0, i32 8
  store double %60, ptr %62, align 8, !tbaa !24
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %63, i32 0, i32 9
  %65 = load double, ptr %64, align 8, !tbaa !25
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %66, i32 0, i32 9
  store double %65, ptr %67, align 8, !tbaa !25
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %68, i32 0, i32 10
  %70 = load double, ptr %69, align 8, !tbaa !26
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %71, i32 0, i32 10
  store double %70, ptr %72, align 8, !tbaa !26
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %73, i32 0, i32 11
  %75 = load double, ptr %74, align 8, !tbaa !27
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %76, i32 0, i32 11
  store double %75, ptr %77, align 8, !tbaa !27
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %78, i32 0, i32 12
  %80 = load double, ptr %79, align 8, !tbaa !28
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %81, i32 0, i32 12
  store double %80, ptr %82, align 8, !tbaa !28
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %83, i32 0, i32 13
  %85 = load double, ptr %84, align 8, !tbaa !29
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %86, i32 0, i32 13
  store double %85, ptr %87, align 8, !tbaa !29
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %88, i32 0, i32 14
  %90 = load double, ptr %89, align 8, !tbaa !30
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %91, i32 0, i32 14
  store double %90, ptr %92, align 8, !tbaa !30
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %93, i32 0, i32 15
  %95 = load double, ptr %94, align 8, !tbaa !31
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %96, i32 0, i32 15
  store double %95, ptr %97, align 8, !tbaa !31
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %98, i32 0, i32 16
  %100 = load double, ptr %99, align 8, !tbaa !32
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %101, i32 0, i32 16
  store double %100, ptr %102, align 8, !tbaa !32
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %103, i32 0, i32 17
  %105 = load double, ptr %104, align 8, !tbaa !33
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %106, i32 0, i32 17
  store double %105, ptr %107, align 8, !tbaa !33
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %108, i32 0, i32 18
  %110 = load double, ptr %109, align 8, !tbaa !34
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %111, i32 0, i32 18
  store double %110, ptr %112, align 8, !tbaa !34
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %113, i32 0, i32 19
  %115 = load double, ptr %114, align 8, !tbaa !35
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %116, i32 0, i32 19
  store double %115, ptr %117, align 8, !tbaa !35
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %118, i32 0, i32 20
  %120 = load double, ptr %119, align 8, !tbaa !36
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %121, i32 0, i32 20
  store double %120, ptr %122, align 8, !tbaa !36
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %123, i32 0, i32 21
  %125 = load double, ptr %124, align 8, !tbaa !37
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %126, i32 0, i32 21
  store double %125, ptr %127, align 8, !tbaa !37
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %128, i32 0, i32 22
  %130 = load double, ptr %129, align 8, !tbaa !38
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %131, i32 0, i32 22
  store double %130, ptr %132, align 8, !tbaa !38
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %133, i32 0, i32 23
  %135 = load double, ptr %134, align 8, !tbaa !39
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %136, i32 0, i32 23
  store double %135, ptr %137, align 8, !tbaa !39
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %138, i32 0, i32 24
  %140 = load double, ptr %139, align 8, !tbaa !40
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %"struct.alglib_impl::linminstate", ptr %141, i32 0, i32 24
  store double %140, ptr %142, align 8, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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_impl11linminstateE", !10, i64 0, !10, i64 1, !13, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !14, i64 184}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!12, !10, i64 1}
!18 = !{!12, !13, i64 8}
!19 = !{!12, !14, i64 16}
!20 = !{!12, !14, i64 24}
!21 = !{!12, !14, i64 32}
!22 = !{!12, !14, i64 40}
!23 = !{!12, !14, i64 48}
!24 = !{!12, !14, i64 56}
!25 = !{!12, !14, i64 64}
!26 = !{!12, !14, i64 72}
!27 = !{!12, !14, i64 80}
!28 = !{!12, !14, i64 88}
!29 = !{!12, !14, i64 96}
!30 = !{!12, !14, i64 104}
!31 = !{!12, !14, i64 112}
!32 = !{!12, !14, i64 120}
!33 = !{!12, !14, i64 128}
!34 = !{!12, !14, i64 136}
!35 = !{!12, !14, i64 144}
!36 = !{!12, !14, i64 152}
!37 = !{!12, !14, i64 160}
!38 = !{!12, !14, i64 168}
!39 = !{!12, !14, i64 176}
!40 = !{!12, !14, i64 184}


; 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 nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @_ZN11alglib_impl22_linminstate_init_copyEPvS0_PNS_8ae_stateEb(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readnone %2, i1 noundef zeroext %3) local_unnamed_addr #0 {
  %5 = load i8, ptr %1, align 8, !tbaa !5, !range !12, !noundef !13
  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 !14, !range !12, !noundef !13
  %8 = getelementptr inbounds i8, ptr %0, i64 1
  store i8 %7, ptr %8, align 1, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %1, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %10, ptr %11, align 8, !tbaa !15
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load <2 x double>, ptr %12, align 8, !tbaa !16
  store <2 x double> %14, ptr %13, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %1, i64 32
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  %17 = load <2 x double>, ptr %15, align 8, !tbaa !16
  store <2 x double> %17, ptr %16, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %1, i64 48
  %19 = getelementptr inbounds i8, ptr %0, i64 48
  %20 = load <2 x double>, ptr %18, align 8, !tbaa !16
  store <2 x double> %20, ptr %19, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %1, i64 64
  %22 = getelementptr inbounds i8, ptr %0, i64 64
  %23 = load <2 x double>, ptr %21, align 8, !tbaa !16
  store <2 x double> %23, ptr %22, align 8, !tbaa !16
  %24 = getelementptr inbounds i8, ptr %1, i64 80
  %25 = getelementptr inbounds i8, ptr %0, i64 80
  %26 = load <2 x double>, ptr %24, align 8, !tbaa !16
  store <2 x double> %26, ptr %25, align 8, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %1, i64 96
  %28 = getelementptr inbounds i8, ptr %0, i64 96
  %29 = load <2 x double>, ptr %27, align 8, !tbaa !16
  store <2 x double> %29, ptr %28, align 8, !tbaa !16
  %30 = getelementptr inbounds i8, ptr %1, i64 112
  %31 = getelementptr inbounds i8, ptr %0, i64 112
  %32 = load <2 x double>, ptr %30, align 8, !tbaa !16
  store <2 x double> %32, ptr %31, align 8, !tbaa !16
  %33 = getelementptr inbounds i8, ptr %1, i64 128
  %34 = getelementptr inbounds i8, ptr %0, i64 128
  %35 = load <2 x double>, ptr %33, align 8, !tbaa !16
  store <2 x double> %35, ptr %34, align 8, !tbaa !16
  %36 = getelementptr inbounds i8, ptr %1, i64 144
  %37 = getelementptr inbounds i8, ptr %0, i64 144
  %38 = load <2 x double>, ptr %36, align 8, !tbaa !16
  store <2 x double> %38, ptr %37, align 8, !tbaa !16
  %39 = getelementptr inbounds i8, ptr %1, i64 160
  %40 = getelementptr inbounds i8, ptr %0, i64 160
  %41 = load <2 x double>, ptr %39, align 8, !tbaa !16
  store <2 x double> %41, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %1, i64 176
  %43 = getelementptr inbounds i8, ptr %0, i64 176
  %44 = load <2 x double>, ptr %42, align 8, !tbaa !16
  store <2 x double> %44, ptr %43, align 8, !tbaa !16
  ret void
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) 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_impl11linminstateE", !7, i64 0, !7, i64 1, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184}
!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 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !7, i64 1}
!15 = !{!6, !10, i64 8}
!16 = !{!11, !11, i64 0}


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