; LLVM IR from ERGO-Code/HiGHS :: src/mip/HighsCliqueTable.ll (ZN16HighsCliqueTable4linkEii)

; 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.HighsCliqueTable = type { %"class.std::vector", %"class.std::vector.3", %"class.std::vector.8", %class.HighsHashTable, %"class.std::set", %"class.std::vector.26", %"class.std::vector.31", %"class.std::vector.26", %"class.std::vector", %"class.std::vector.26", %"class.std::vector.36", %"class.std::vector.26", %"class.std::vector.41", %"class.std::vector.46", %"class.std::vector.46", %"class.std::vector.51", %"class.std::vector.26", %class.HighsRandom, i32, i32, i32, i32, i8, i64 }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<HighsHashTree<int, int>, std::allocator<HighsHashTree<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsHashTree<int, int>, std::allocator<HighsHashTree<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsHashTree<int, int>, std::allocator<HighsHashTree<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsHashTree<int, int>, std::allocator<HighsHashTree<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<HighsHashTree<int>, std::allocator<HighsHashTree<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsHashTree<int>, std::allocator<HighsHashTree<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsHashTree<int>, std::allocator<HighsHashTree<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsHashTree<int>, std::allocator<HighsHashTree<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.HighsHashTable = type { %"class.std::unique_ptr", %"class.std::unique_ptr.15", i64, i64, i64 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.14" }
%"struct.std::_Head_base.14" = type { ptr }
%"class.std::unique_ptr.15" = type { %"struct.std::__uniq_ptr_data.16" }
%"struct.std::__uniq_ptr_data.16" = type { %"class.std::__uniq_ptr_impl.17" }
%"class.std::__uniq_ptr_impl.17" = type { %"class.std::tuple.18" }
%"class.std::tuple.18" = type { %"struct.std::_Tuple_impl.19" }
%"struct.std::_Tuple_impl.19" = type { %"struct.std::_Head_base.22" }
%"struct.std::_Head_base.22" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<HighsCliqueTable::Clique, std::allocator<HighsCliqueTable::Clique>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsCliqueTable::Clique, std::allocator<HighsCliqueTable::Clique>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsCliqueTable::Clique, std::allocator<HighsCliqueTable::Clique>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsCliqueTable::Clique, std::allocator<HighsCliqueTable::Clique>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HighsCliqueTable::CliqueVar, std::allocator<HighsCliqueTable::CliqueVar>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsCliqueTable::CliqueVar, std::allocator<HighsCliqueTable::CliqueVar>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsCliqueTable::CliqueVar, std::allocator<HighsCliqueTable::CliqueVar>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsCliqueTable::CliqueVar, std::allocator<HighsCliqueTable::CliqueVar>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.36" = type { %"struct.std::_Vector_base.37" }
%"struct.std::_Vector_base.37" = type { %"struct.std::_Vector_base<HighsCliqueTable::Substitution, std::allocator<HighsCliqueTable::Substitution>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsCliqueTable::Substitution, std::allocator<HighsCliqueTable::Substitution>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsCliqueTable::Substitution, std::allocator<HighsCliqueTable::Substitution>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsCliqueTable::Substitution, std::allocator<HighsCliqueTable::Substitution>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.41" = type { %"struct.std::_Vector_base.42" }
%"struct.std::_Vector_base.42" = type { %"struct.std::_Vector_base<std::pair<int, HighsCliqueTable::CliqueVar>, std::allocator<std::pair<int, HighsCliqueTable::CliqueVar>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, HighsCliqueTable::CliqueVar>, std::allocator<std::pair<int, HighsCliqueTable::CliqueVar>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, HighsCliqueTable::CliqueVar>, std::allocator<std::pair<int, HighsCliqueTable::CliqueVar>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, HighsCliqueTable::CliqueVar>, std::allocator<std::pair<int, HighsCliqueTable::CliqueVar>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.46" = type { %"struct.std::_Vector_base.47" }
%"struct.std::_Vector_base.47" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.51" = type { %"struct.std::_Vector_base.52" }
%"struct.std::_Vector_base.52" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.26" = type { %"struct.std::_Vector_base.27" }
%"struct.std::_Vector_base.27" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.HighsRandom = type { i64 }
%"struct.HighsCliqueTable::Clique" = type { i32, i32, i32, i32, i8 }

@.str.51 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN16HighsCliqueTable4linkEii = external hidden unnamed_addr constant [48 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [36 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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16HighsCliqueTable9CliqueVar5indexEv(ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN16HighsCliqueTable6CliqueESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIivESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16HighsCliqueTable4linkEii(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, i32 noundef %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %8 = load ptr, ptr %4, align 8
  %9 = load i32, ptr %5, align 4, !tbaa !9
  %10 = icmp sge i32 %9, 0
  br i1 %10, label %11, label %12

11:                                               ; preds = %3
  br label %14

12:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.51, ptr noundef @.str.52, i32 noundef 46, ptr noundef @__PRETTY_FUNCTION__._ZN16HighsCliqueTable4linkEii) #4
  unreachable

13:                                               ; No predecessors!
  br label %14

14:                                               ; preds = %13, %11
  %15 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 14
  %16 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 0
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %18) #5
  %20 = load i32, ptr %19, align 4
  %21 = and i32 %20, 2147483647
  %22 = zext i32 %21 to i64
  %23 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %22) #5
  %24 = load i8, ptr %23, align 1, !tbaa !11
  %25 = icmp ne i8 %24, 0
  %26 = xor i1 %25, true
  br i1 %26, label %27, label %28

27:                                               ; preds = %14
  br label %30

28:                                               ; preds = %14
  call void @__assert_fail(ptr noundef @.str.53, ptr noundef @.str.52, i32 noundef 47, ptr noundef @__PRETTY_FUNCTION__._ZN16HighsCliqueTable4linkEii) #4
  unreachable

29:                                               ; No predecessors!
  br label %30

30:                                               ; preds = %29, %27
  %31 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 7
  %32 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 0
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %34) #5
  %36 = call noundef i32 @_ZNK16HighsCliqueTable9CliqueVar5indexEv(ptr noundef nonnull align 4 dereferenceable(4) %35)
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %37) #5
  %39 = load i32, ptr %38, align 4, !tbaa !9
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %38, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %41 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 6
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN16HighsCliqueTable6CliqueESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %43) #5
  %45 = getelementptr inbounds %"struct.HighsCliqueTable::Clique", ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !12
  %47 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 6
  %48 = load i32, ptr %6, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN16HighsCliqueTable6CliqueESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #5
  %51 = getelementptr inbounds %"struct.HighsCliqueTable::Clique", ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = sub nsw i32 %46, %52
  store i32 %53, ptr %7, align 4, !tbaa !9
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 2
  br i1 %55, label %56, label %66

56:                                               ; preds = %30
  %57 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 2
  %58 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 0
  %59 = load i32, ptr %5, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60) #5
  %62 = call noundef i32 @_ZNK16HighsCliqueTable9CliqueVar5indexEv(ptr noundef nonnull align 4 dereferenceable(4) %61)
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIivESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %63) #5
  %65 = call noundef zeroext i1 @_ZN13HighsHashTreeIivE6insertIJRiEEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br label %76

66:                                               ; preds = %30
  %67 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 1
  %68 = getelementptr inbounds %class.HighsCliqueTable, ptr %8, i32 0, i32 0
  %69 = load i32, ptr %5, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %70) #5
  %72 = call noundef i32 @_ZNK16HighsCliqueTable9CliqueVar5indexEv(ptr noundef nonnull align 4 dereferenceable(4) %71)
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %73) #5
  %75 = call noundef zeroext i1 @_ZN13HighsHashTreeIiiE6insertIJRiS2_EEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br label %76

76:                                               ; preds = %66, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13HighsHashTreeIivE6insertIJRiEEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13HighsHashTreeIiiE6insertIJRiS2_EEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { noreturn nounwind }
attributes #5 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 4}
!13 = !{!"_ZTSN16HighsCliqueTable6CliqueE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !14, i64 16}
!14 = !{!"bool", !7, i64 0}
!15 = !{!13, !10, i64 0}


; 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.51 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN16HighsCliqueTable4linkEii = external hidden unnamed_addr constant [48 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK16HighsCliqueTable9CliqueVar5indexEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN16HighsCliqueTable6CliqueESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIivESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16HighsCliqueTable4linkEii(ptr noundef nonnull align 8 dereferenceable(488) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #2 align 2 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 %1, ptr %4, align 4, !tbaa !5
  store i32 %2, ptr %5, align 4, !tbaa !5
  %6 = icmp sgt i32 %1, -1
  br i1 %6, label %8, label %7

7:                                                ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.51, ptr noundef nonnull @.str.52, i32 noundef 46, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16HighsCliqueTable4linkEii) #3
  unreachable

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %0, i64 376
  %10 = zext nneg i32 %1 to i64
  %11 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %10) #4
  %12 = load i32, ptr %11, align 4
  %13 = and i32 %12, 2147483647
  %14 = zext nneg i32 %13 to i64
  %15 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %14) #4
  %16 = load i8, ptr %15, align 1, !tbaa !9
  %.not = icmp eq i8 %16, 0
  br i1 %.not, label %18, label %17

17:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.53, ptr noundef nonnull @.str.52, i32 noundef 47, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16HighsCliqueTable4linkEii) #3
  unreachable

18:                                               ; preds = %8
  %19 = getelementptr inbounds i8, ptr %0, i64 208
  %20 = zext nneg i32 %1 to i64
  %21 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %20) #4
  %22 = tail call noundef i32 @_ZNK16HighsCliqueTable9CliqueVar5indexEv(ptr noundef nonnull align 4 dereferenceable(4) %21)
  %23 = sext i32 %22 to i64
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %23) #4
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %24, align 4, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %0, i64 184
  %28 = sext i32 %2 to i64
  %29 = tail call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN16HighsCliqueTable6CliqueESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %28) #4
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  %31 = load i32, ptr %30, align 4, !tbaa !10
  %32 = tail call noundef nonnull align 4 dereferenceable(20) ptr @_ZNSt6vectorIN16HighsCliqueTable6CliqueESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %28) #4
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = sub nsw i32 %31, %33
  %35 = icmp eq i32 %34, 2
  %36 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIN16HighsCliqueTable9CliqueVarESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %20) #4
  %37 = tail call noundef i32 @_ZNK16HighsCliqueTable9CliqueVar5indexEv(ptr noundef nonnull align 4 dereferenceable(4) %36)
  %38 = sext i32 %37 to i64
  br i1 %35, label %39, label %43

39:                                               ; preds = %18
  %40 = getelementptr inbounds i8, ptr %0, i64 48
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIivESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %38) #4
  %42 = call noundef zeroext i1 @_ZN13HighsHashTreeIivE6insertIJRiEEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br label %47

43:                                               ; preds = %18
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorI13HighsHashTreeIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %38) #4
  %46 = call noundef zeroext i1 @_ZN13HighsHashTreeIiiE6insertIJRiS2_EEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %47

47:                                               ; preds = %43, %39
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13HighsHashTreeIivE6insertIJRiEEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN13HighsHashTreeIiiE6insertIJRiS2_EEEbDpOT_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

attributes #0 = { 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 #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 = { noreturn nounwind }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 4}
!11 = !{!"_ZTSN16HighsCliqueTable6CliqueE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !12, i64 16}
!12 = !{!"bool", !7, i64 0}
!13 = !{!11, !6, i64 0}


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