; LLVM IR from ERGO-Code/HiGHS :: src/lp_data/HighsSolution.ll (ZN10HighsBasis10invalidateEv)

; 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.HighsBasis = type { i8, i8, i8, i8, i32, i32, %"class.std::__cxx11::basic_string", %"class.std::vector.28", %"class.std::vector.28" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsBasisStatus, std::allocator<HighsBasisStatus>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.129 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10HighsBasis10invalidateEv(ptr noundef nonnull align 8 dereferenceable(96) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = getelementptr inbounds %struct.HighsBasis, ptr %3, i32 0, i32 0
  store i8 0, ptr %4, align 8, !tbaa !9
  %5 = getelementptr inbounds %struct.HighsBasis, ptr %3, i32 0, i32 1
  store i8 1, ptr %5, align 1, !tbaa !20
  %6 = getelementptr inbounds %struct.HighsBasis, ptr %3, i32 0, i32 2
  store i8 0, ptr %6, align 2, !tbaa !21
  %7 = getelementptr inbounds %struct.HighsBasis, ptr %3, i32 0, i32 3
  store i8 1, ptr %7, align 1, !tbaa !22
  %8 = getelementptr inbounds %struct.HighsBasis, ptr %3, i32 0, i32 4
  store i32 -1, ptr %8, align 4, !tbaa !23
  %9 = getelementptr inbounds %struct.HighsBasis, ptr %3, i32 0, i32 5
  store i32 -1, ptr %9, align 8, !tbaa !24
  %10 = getelementptr inbounds %struct.HighsBasis, ptr %3, i32 0, i32 6
  %11 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.129)
  ret void
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0 align 2

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

!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, !11, i64 0}
!10 = !{!"_ZTS10HighsBasis", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !12, i64 4, !12, i64 8, !13, i64 16, !16, i64 48, !16, i64 72}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6vectorI16HighsBasisStatusSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI16HighsBasisStatusSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!10, !11, i64 1}
!21 = !{!10, !11, i64 2}
!22 = !{!10, !11, i64 3}
!23 = !{!10, !12, i64 4}
!24 = !{!10, !12, i64 8}


; 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.129 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10HighsBasis10invalidateEv(ptr noundef nonnull align 8 dereferenceable(96) %0) local_unnamed_addr #0 align 2 {
  store <4 x i8> <i8 0, i8 1, i8 0, i8 1>, ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 -1, ptr %2, align 4, !tbaa !9
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 -1, ptr %3, align 8, !tbaa !20
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.129)
  ret void
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0 align 2

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

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTS10HighsBasis", !6, i64 0, !6, i64 1, !6, i64 2, !6, i64 3, !11, i64 4, !11, i64 8, !12, i64 16, !16, i64 48, !16, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !7, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6vectorI16HighsBasisStatusSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI16HighsBasisStatusSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI16HighsBasisStatusSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!20 = !{!10, !11, i64 8}


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