; LLVM IR from ERGO-Code/HiGHS :: src/presolve/HPresolveAnalysis.ll (ZN17HPresolveAnalysis19stopPresolveRuleLogEi)

; 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] }
%class.HPresolveAnalysis = type { ptr, ptr, ptr, ptr, ptr, i32, i32, %"class.std::vector", i8, i8, i32, i32, i32, %struct.HighsPresolveLog }
%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%struct.HighsPresolveLog = type { %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HighsPresolveRuleLog, std::allocator<HighsPresolveRuleLog>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsPresolveRuleLog, std::allocator<HighsPresolveRuleLog>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsPresolveRuleLog, std::allocator<HighsPresolveRuleLog>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsPresolveRuleLog, std::allocator<HighsPresolveRuleLog>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.HighsPresolveRuleLog = type { i32, i32, i32 }

@.str.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi = external hidden unnamed_addr constant [60 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [21 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 @_Z28utilPresolveRuleTypeToStringB5cxx11i(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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI20HighsPresolveRuleLogSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17HPresolveAnalysis19stopPresolveRuleLogEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %15 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  store i8 0, ptr %5, align 1, !tbaa !11
  %16 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 9
  %17 = load i8, ptr %16, align 1, !tbaa !13, !range !26, !noundef !27
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  br label %22

20:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.54, ptr noundef @.str.55, i32 noundef 124, ptr noundef @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 10
  %25 = load i32, ptr %24, align 4, !tbaa !28
  %26 = icmp eq i32 %23, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %22
  br label %30

28:                                               ; preds = %22
  call void @__assert_fail(ptr noundef @.str.64, ptr noundef @.str.55, i32 noundef 125, ptr noundef @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 -1, ptr %6, align 4, !tbaa !9
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = icmp eq i32 %31, -1
  br i1 %32, label %33, label %47

33:                                               ; preds = %30
  %34 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 3
  %35 = load ptr, ptr %34, align 8, !tbaa !29
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !30
  %39 = load i32, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  call void @_Z28utilPresolveRuleTypeToStringB5cxx11i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, i32 noundef -1)
  %40 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  %41 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.65, i32 noundef -1, i32 noundef %36, i32 noundef %39, ptr noundef %40)
          to label %42 unwind label %43

42:                                               ; preds = %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %47

43:                                               ; preds = %33
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %8, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %113

47:                                               ; preds = %42, %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %48 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 3
  %49 = load ptr, ptr %48, align 8, !tbaa !29
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 11
  %52 = load i32, ptr %51, align 8, !tbaa !31
  %53 = sub nsw i32 %50, %52
  store i32 %53, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %54 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !30
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 12
  %58 = load i32, ptr %57, align 4, !tbaa !32
  %59 = sub nsw i32 %56, %58
  store i32 %59, ptr %11, align 4, !tbaa !9
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = icmp sge i32 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %47
  br label %65

63:                                               ; preds = %47
  call void @__assert_fail(ptr noundef @.str.66, ptr noundef @.str.55, i32 noundef 138, ptr noundef @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

64:                                               ; No predecessors!
  br label %65

65:                                               ; preds = %64, %62
  %66 = load i32, ptr %11, align 4, !tbaa !9
  %67 = icmp sge i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %65
  br label %71

69:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str.67, ptr noundef @.str.55, i32 noundef 139, ptr noundef @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

70:                                               ; No predecessors!
  br label %71

71:                                               ; preds = %70, %68
  %72 = load i32, ptr %11, align 4, !tbaa !9
  %73 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 13
  %74 = getelementptr inbounds %struct.HighsPresolveLog, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %4, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI20HighsPresolveRuleLogSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #5
  %78 = getelementptr inbounds %struct.HighsPresolveRuleLog, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !33
  %80 = add nsw i32 %79, %72
  store i32 %80, ptr %78, align 4, !tbaa !33
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 13
  %83 = getelementptr inbounds %struct.HighsPresolveLog, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %4, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI20HighsPresolveRuleLogSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #5
  %87 = getelementptr inbounds %struct.HighsPresolveRuleLog, ptr %86, i32 0, i32 2
  %88 = load i32, ptr %87, align 4, !tbaa !35
  %89 = add nsw i32 %88, %81
  store i32 %89, ptr %87, align 4, !tbaa !35
  %90 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 10
  store i32 -1, ptr %90, align 4, !tbaa !28
  %91 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 3
  %92 = load ptr, ptr %91, align 8, !tbaa !29
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 11
  store i32 %93, ptr %94, align 8, !tbaa !31
  %95 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !30
  %97 = load i32, ptr %96, align 4, !tbaa !9
  %98 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 12
  store i32 %97, ptr %98, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 0, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 -212, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 -637, ptr %14, align 4, !tbaa !9
  %99 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 11
  %100 = load i32, ptr %99, align 8, !tbaa !31
  %101 = icmp eq i32 %100, -212
  br i1 %101, label %102, label %112

102:                                              ; preds = %71
  %103 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 12
  %104 = load i32, ptr %103, align 4, !tbaa !32
  %105 = icmp eq i32 %104, -637
  br i1 %105, label %106, label %112

106:                                              ; preds = %102
  %107 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 11
  %108 = load i32, ptr %107, align 8, !tbaa !31
  %109 = getelementptr inbounds %class.HPresolveAnalysis, ptr %15, i32 0, i32 12
  %110 = load i32, ptr %109, align 4, !tbaa !32
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.63, i32 noundef %108, i32 noundef %110)
  br label %112

112:                                              ; preds = %106, %102, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret void

113:                                              ; preds = %43
  %114 = load ptr, ptr %8, align 8
  %115 = load i32, ptr %9, align 4
  %116 = insertvalue { ptr, i32 } poison, ptr %114, 0
  %117 = insertvalue { ptr, i32 } %116, i32 %115, 1
  resume { ptr, i32 } %117
}

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 = { noreturn 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !12, i64 89}
!14 = !{!"_ZTS17HPresolveAnalysis", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !15, i64 48, !12, i64 88, !12, i64 89, !10, i64 92, !10, i64 96, !10, i64 100, !21, i64 104}
!15 = !{!"_ZTSSt6vectorIbSaIbEE", !16, i64 0}
!16 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !17, i64 0}
!17 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !19, i64 0, !19, i64 16, !6, i64 32}
!19 = !{!"_ZTSSt13_Bit_iterator", !20, i64 0}
!20 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !10, i64 8}
!21 = !{!"_ZTS16HighsPresolveLog", !22, i64 0}
!22 = !{!"_ZTSSt6vectorI20HighsPresolveRuleLogSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI20HighsPresolveRuleLogSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI20HighsPresolveRuleLogSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI20HighsPresolveRuleLogSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!14, !10, i64 92}
!29 = !{!14, !6, i64 24}
!30 = !{!14, !6, i64 32}
!31 = !{!14, !10, i64 96}
!32 = !{!14, !10, i64 100}
!33 = !{!34, !10, i64 4}
!34 = !{!"_ZTS20HighsPresolveRuleLog", !10, i64 0, !10, i64 4, !10, i64 8}
!35 = !{!34, !10, 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"

%"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.54 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [22 x i8], align 1
@__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi = external hidden unnamed_addr constant [60 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [21 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 @_Z28utilPresolveRuleTypeToStringB5cxx11i(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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI20HighsPresolveRuleLogSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17HPresolveAnalysis19stopPresolveRuleLogEi(ptr noundef nonnull align 8 dereferenceable(128) %0, i32 noundef %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 89
  %5 = load i8, ptr %4, align 1, !tbaa !5, !range !23, !noundef !24
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %8, label %7

7:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.54, ptr noundef nonnull @.str.55, i32 noundef 124, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %0, i64 92
  %10 = load i32, ptr %9, align 4, !tbaa !25
  %11 = icmp eq i32 %10, %1
  br i1 %11, label %13, label %12

12:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.64, ptr noundef nonnull @.str.55, i32 noundef 125, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

13:                                               ; preds = %8
  %14 = icmp eq i32 %1, -1
  br i1 %14, label %15, label %24

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !26
  %18 = load i32, ptr %17, align 4, !tbaa !27
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = load ptr, ptr %19, align 8, !tbaa !28
  %21 = load i32, ptr %20, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_Z28utilPresolveRuleTypeToStringB5cxx11i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, i32 noundef -1)
  %22 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.65, i32 noundef -1, i32 noundef %18, i32 noundef %21, ptr noundef %22)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %24

24:                                               ; preds = %15, %13
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = load ptr, ptr %25, align 8, !tbaa !26
  %27 = load i32, ptr %26, align 4, !tbaa !27
  %28 = getelementptr inbounds i8, ptr %0, i64 96
  %29 = load i32, ptr %28, align 8, !tbaa !29
  %30 = sub nsw i32 %27, %29
  %31 = getelementptr inbounds i8, ptr %0, i64 32
  %32 = load ptr, ptr %31, align 8, !tbaa !28
  %33 = load i32, ptr %32, align 4, !tbaa !27
  %34 = getelementptr inbounds i8, ptr %0, i64 100
  %35 = load i32, ptr %34, align 4, !tbaa !30
  %36 = sub nsw i32 %33, %35
  %37 = icmp sgt i32 %30, -1
  br i1 %37, label %39, label %38

38:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str.66, ptr noundef nonnull @.str.55, i32 noundef 138, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

39:                                               ; preds = %24
  %40 = icmp sgt i32 %36, -1
  br i1 %40, label %42, label %41

41:                                               ; preds = %39
  call void @__assert_fail(ptr noundef nonnull @.str.67, ptr noundef nonnull @.str.55, i32 noundef 139, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17HPresolveAnalysis19stopPresolveRuleLogEi) #6
  unreachable

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %0, i64 104
  %44 = sext i32 %1 to i64
  %45 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI20HighsPresolveRuleLogSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44) #7
  %46 = getelementptr inbounds i8, ptr %45, i64 4
  %47 = load i32, ptr %46, align 4, !tbaa !31
  %48 = add nsw i32 %47, %36
  store i32 %48, ptr %46, align 4, !tbaa !31
  %49 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorI20HighsPresolveRuleLogSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %44) #7
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = load i32, ptr %50, align 4, !tbaa !33
  %52 = add nsw i32 %51, %30
  store i32 %52, ptr %50, align 4, !tbaa !33
  store i32 -1, ptr %9, align 4, !tbaa !25
  %53 = load ptr, ptr %25, align 8, !tbaa !26
  %54 = load i32, ptr %53, align 4, !tbaa !27
  store i32 %54, ptr %28, align 8, !tbaa !29
  %55 = load ptr, ptr %31, align 8, !tbaa !28
  %56 = load i32, ptr %55, align 4, !tbaa !27
  store i32 %56, ptr %34, align 4, !tbaa !30
  %57 = icmp eq i32 %54, -212
  %58 = icmp eq i32 %56, -637
  %or.cond = select i1 %57, i1 %58, i1 false
  br i1 %or.cond, label %59, label %61

59:                                               ; preds = %42
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.63, i32 noundef -212, i32 noundef -637)
  br label %61

61:                                               ; preds = %59, %42
  ret void
}

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 = { noreturn 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 #4 = { 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 #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !17, i64 89}
!6 = !{!"_ZTS17HPresolveAnalysis", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !11, i64 48, !17, i64 88, !17, i64 89, !10, i64 92, !10, i64 96, !10, i64 100, !18, i64 104}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIbSaIbEE", !12, i64 0}
!12 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !13, i64 0}
!13 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !15, i64 0, !15, i64 16, !7, i64 32}
!15 = !{!"_ZTSSt13_Bit_iterator", !16, i64 0}
!16 = !{!"_ZTSSt18_Bit_iterator_base", !7, i64 0, !10, i64 8}
!17 = !{!"bool", !8, i64 0}
!18 = !{!"_ZTS16HighsPresolveLog", !19, i64 0}
!19 = !{!"_ZTSSt6vectorI20HighsPresolveRuleLogSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseI20HighsPresolveRuleLogSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI20HighsPresolveRuleLogSaIS0_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI20HighsPresolveRuleLogSaIS0_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!6, !10, i64 92}
!26 = !{!6, !7, i64 24}
!27 = !{!10, !10, i64 0}
!28 = !{!6, !7, i64 32}
!29 = !{!6, !10, i64 96}
!30 = !{!6, !10, i64 100}
!31 = !{!32, !10, i64 4}
!32 = !{!"_ZTS20HighsPresolveRuleLog", !10, i64 0, !10, i64 4, !10, i64 8}
!33 = !{!32, !10, i64 8}


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