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

; 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.121 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [25 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK10HighsBasis12printScalarsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #3
  %7 = call i32 (ptr, ...) @printf(ptr noundef @.str.121, ptr noundef %6)
  %8 = getelementptr inbounds %struct.HighsBasis, ptr %5, i32 0, i32 0
  %9 = load i8, ptr %8, align 8, !tbaa !9, !range !20, !noundef !21
  %10 = trunc i8 %9 to i1
  %11 = zext i1 %10 to i32
  %12 = call i32 (ptr, ...) @printf(ptr noundef @.str.122, i32 noundef %11)
  %13 = getelementptr inbounds %struct.HighsBasis, ptr %5, i32 0, i32 1
  %14 = load i8, ptr %13, align 1, !tbaa !22, !range !20, !noundef !21
  %15 = trunc i8 %14 to i1
  %16 = zext i1 %15 to i32
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.123, i32 noundef %16)
  %18 = getelementptr inbounds %struct.HighsBasis, ptr %5, i32 0, i32 2
  %19 = load i8, ptr %18, align 2, !tbaa !23, !range !20, !noundef !21
  %20 = trunc i8 %19 to i1
  %21 = zext i1 %20 to i32
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.124, i32 noundef %21)
  %23 = getelementptr inbounds %struct.HighsBasis, ptr %5, i32 0, i32 3
  %24 = load i8, ptr %23, align 1, !tbaa !24, !range !20, !noundef !21
  %25 = trunc i8 %24 to i1
  %26 = zext i1 %25 to i32
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.125, i32 noundef %26)
  %28 = getelementptr inbounds %struct.HighsBasis, ptr %5, i32 0, i32 4
  %29 = load i32, ptr %28, align 4, !tbaa !25
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.126, i32 noundef %29)
  %31 = getelementptr inbounds %struct.HighsBasis, ptr %5, i32 0, i32 5
  %32 = load i32, ptr %31, align 8, !tbaa !26
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.127, i32 noundef %32)
  %34 = getelementptr inbounds %struct.HighsBasis, ptr %5, i32 0, i32 6
  %35 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %34) #3
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.128, ptr noundef %35)
  ret void
}

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 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 = { 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, !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 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!10, !11, i64 1}
!23 = !{!10, !11, i64 2}
!24 = !{!10, !11, i64 3}
!25 = !{!10, !12, i64 4}
!26 = !{!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.121 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.127 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK10HighsBasis12printScalarsENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(96) %0, ptr noundef nonnull %1) local_unnamed_addr #1 align 2 {
  %3 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #2
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.121, ptr noundef %3)
  %5 = load i8, ptr %0, align 8, !tbaa !5, !range !19, !noundef !20
  %6 = zext nneg i8 %5 to i32
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.122, i32 noundef %6)
  %8 = getelementptr inbounds i8, ptr %0, i64 1
  %9 = load i8, ptr %8, align 1, !tbaa !21, !range !19, !noundef !20
  %10 = zext nneg i8 %9 to i32
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.123, i32 noundef %10)
  %12 = getelementptr inbounds i8, ptr %0, i64 2
  %13 = load i8, ptr %12, align 2, !tbaa !22, !range !19, !noundef !20
  %14 = zext nneg i8 %13 to i32
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.124, i32 noundef %14)
  %16 = getelementptr inbounds i8, ptr %0, i64 3
  %17 = load i8, ptr %16, align 1, !tbaa !23, !range !19, !noundef !20
  %18 = zext nneg i8 %17 to i32
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.125, i32 noundef %18)
  %20 = getelementptr inbounds i8, ptr %0, i64 4
  %21 = load i32, ptr %20, align 4, !tbaa !24
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.126, i32 noundef %21)
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !25
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.127, i32 noundef %24)
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #2
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.128, ptr noundef %27)
  ret void
}

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


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