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

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

%"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] }
%struct.HighsInfoStruct = type { i8, i64, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, i32, double, double, i32, double, double, double, double, double }

@.str.55 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; 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
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89), i32 noundef, ptr noundef, ...) #2

declare void @_Z23utilModelStatusToStringB5cxx1116HighsModelStatus(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #2

; 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 @_Z24debugReportHighsSolutionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK15HighsLogOptionsRK9HighsInfo16HighsModelStatus(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(89) %1, ptr noundef nonnull align 8 dereferenceable(184) %2, i32 noundef %3) #3 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  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
  store i32 %3, ptr %8, align 4, !tbaa !9
  %12 = load ptr, ptr %6, align 8, !tbaa !5
  %13 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %12, i32 noundef 1, ptr noundef @.str.55, ptr noundef %13)
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  %16 = getelementptr inbounds %struct.HighsInfoStruct, ptr %15, i32 0, i32 14
  %17 = load i32, ptr %16, align 8, !tbaa !11
  %18 = icmp sge i32 %17, 0
  br i1 %18, label %25, label %19

19:                                               ; preds = %4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = getelementptr inbounds %struct.HighsInfoStruct, ptr %21, i32 0, i32 17
  %23 = load i32, ptr %22, align 8, !tbaa !17
  %24 = icmp sge i32 %23, 0
  br i1 %24, label %25, label %27

25:                                               ; preds = %19, %4
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %26, i32 noundef 1, ptr noundef @.str.56)
  br label %27

27:                                               ; preds = %25, %19
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %30 = getelementptr inbounds %struct.HighsInfoStruct, ptr %29, i32 0, i32 14
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = icmp sge i32 %31, 0
  br i1 %32, label %33, label %47

33:                                               ; preds = %27
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = getelementptr inbounds %struct.HighsInfoStruct, ptr %36, i32 0, i32 14
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = getelementptr inbounds %struct.HighsInfoStruct, ptr %40, i32 0, i32 15
  %42 = load double, ptr %41, align 8, !tbaa !18
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = getelementptr inbounds %struct.HighsInfoStruct, ptr %44, i32 0, i32 16
  %46 = load double, ptr %45, align 8, !tbaa !19
  call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %34, i32 noundef 1, ptr noundef @.str.57, i32 noundef %38, double noundef %42, double noundef %46)
  br label %47

47:                                               ; preds = %33, %27
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = getelementptr inbounds %struct.HighsInfoStruct, ptr %49, i32 0, i32 17
  %51 = load i32, ptr %50, align 8, !tbaa !17
  %52 = icmp sge i32 %51, 0
  br i1 %52, label %53, label %67

53:                                               ; preds = %47
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 8
  %57 = getelementptr inbounds %struct.HighsInfoStruct, ptr %56, i32 0, i32 17
  %58 = load i32, ptr %57, align 8, !tbaa !17
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = getelementptr inbounds %struct.HighsInfoStruct, ptr %60, i32 0, i32 18
  %62 = load double, ptr %61, align 8, !tbaa !20
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  %65 = getelementptr inbounds %struct.HighsInfoStruct, ptr %64, i32 0, i32 19
  %66 = load double, ptr %65, align 8, !tbaa !21
  call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %54, i32 noundef 1, ptr noundef @.str.58, i32 noundef %58, double noundef %62, double noundef %66)
  br label %67

67:                                               ; preds = %53, %47
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  %69 = load i32, ptr %8, align 4, !tbaa !9
  call void @_Z23utilModelStatusToStringB5cxx1116HighsModelStatus(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, i32 noundef %69)
  %70 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  invoke void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %68, i32 noundef 1, ptr noundef @.str.59, ptr noundef %70)
          to label %71 unwind label %72

71:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  ret void

72:                                               ; preds = %67
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  br label %76

76:                                               ; preds = %72
  %77 = load ptr, ptr %10, align 8
  %78 = load i32, ptr %11, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80
}

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 = { "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 = { 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 #4 = { 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 = !{!"_ZTS16HighsModelStatus", !7, i64 0}
!11 = !{!12, !15, i64 80}
!12 = !{!"_ZTS15HighsInfoStruct", !13, i64 0, !14, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !15, i64 80, !16, i64 88, !16, i64 96, !15, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!12, !15, i64 104}
!18 = !{!12, !16, i64 88}
!19 = !{!12, !16, i64 96}
!20 = !{!12, !16, i64 112}
!21 = !{!12, !16, i64 120}


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

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

@.str.55 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

declare void @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89), i32 noundef, ptr noundef, ...) local_unnamed_addr #2

declare void @_Z23utilModelStatusToStringB5cxx1116HighsModelStatus(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #2

; 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 uwtable
define dso_local void @_Z24debugReportHighsSolutionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK15HighsLogOptionsRK9HighsInfo16HighsModelStatus(ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(89) %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(184) %2, i32 noundef %3) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  tail call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %1, i32 noundef 1, ptr noundef nonnull @.str.55, ptr noundef %6)
  %7 = getelementptr inbounds i8, ptr %2, i64 88
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = icmp sgt i32 %8, -1
  %10 = getelementptr inbounds i8, ptr %2, i64 112
  %11 = load i32, ptr %10, align 8
  %12 = icmp sgt i32 %11, -1
  %or.cond = select i1 %9, i1 true, i1 %12
  br i1 %or.cond, label %13, label %.thread20

13:                                               ; preds = %4
  tail call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %1, i32 noundef 1, ptr noundef nonnull @.str.56)
  %.pre = load i32, ptr %7, align 8, !tbaa !5
  %14 = icmp sgt i32 %.pre, -1
  br i1 %14, label %15, label %20

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %2, i64 96
  %17 = load double, ptr %16, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %2, i64 104
  %19 = load double, ptr %18, align 8, !tbaa !14
  tail call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %1, i32 noundef 1, ptr noundef nonnull @.str.57, i32 noundef %.pre, double noundef %17, double noundef %19)
  br label %20

20:                                               ; preds = %15, %13
  %.pr = load i32, ptr %10, align 8, !tbaa !15
  %21 = icmp sgt i32 %.pr, -1
  br i1 %21, label %22, label %.thread20

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %2, i64 120
  %24 = load double, ptr %23, align 8, !tbaa !16
  %25 = getelementptr inbounds i8, ptr %2, i64 128
  %26 = load double, ptr %25, align 8, !tbaa !17
  tail call void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %1, i32 noundef 1, ptr noundef nonnull @.str.58, i32 noundef %.pr, double noundef %24, double noundef %26)
  br label %.thread20

.thread20:                                        ; preds = %4, %22, %20
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @_Z23utilModelStatusToStringB5cxx1116HighsModelStatus(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, i32 noundef %3)
  %27 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  invoke void (ptr, i32, ptr, ...) @_Z11highsLogDevRK15HighsLogOptions12HighsLogTypePKcz(ptr noundef nonnull align 8 dereferenceable(89) %1, i32 noundef 1, ptr noundef nonnull @.str.59, ptr noundef %27)
          to label %28 unwind label %29

28:                                               ; preds = %.thread20
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret void

29:                                               ; preds = %.thread20
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  resume { ptr, i32 } %30
}

attributes #0 = { mustprogress 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 = { "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 = { 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 #4 = { 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, !11, i64 80}
!6 = !{!"_ZTS15HighsInfoStruct", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !11, i64 80, !12, i64 88, !12, i64 96, !11, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!6, !12, i64 88}
!14 = !{!6, !12, i64 96}
!15 = !{!6, !11, i64 104}
!16 = !{!6, !12, i64 112}
!17 = !{!6, !12, i64 120}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass