; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx/lp_solver.ll (ZN3ipx8LpSolver18BuildStartingBasisEv)

; 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.std::allocator" = type { i8 }
%"class.ipx::LpSolver" = type { %"class.ipx::Control", %"struct.ipx::Info", %"class.ipx::Model", %"class.std::unique_ptr", %"class.std::unique_ptr.18", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::vector.4", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray" }
%"class.ipx::Control" = type { %"struct.ipx::Parameters", ptr, %"class.std::basic_ofstream", %"class.ipx::Timer", %"class.ipx::Timer", %"class.ipx::Multistream", %"class.ipx::Multistream" }
%"struct.ipx::Parameters" = type { %struct.ipx_parameters }
%struct.ipx_parameters = type { i32, ptr, double, double, i8, i32, i32, i32, double, double, double, double, double, i32, double, double, i32, i32, i32, double, i32, double, double, double, i32, i32, i32, i32, i32, i32, i32, double, double, double, i32, i8, i8, ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.ipx::Timer" = type { %"class.std::chrono::time_point" }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.ipx::Multistream" = type { %"class.std::basic_ostream.base", %"struct.ipx::Multistream::multibuffer", %"class.std::basic_ios" }
%"struct.ipx::Multistream::multibuffer" = type { %"class.std::basic_streambuf", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::basic_streambuf<char> *, std::allocator<std::basic_streambuf<char> *>>::_Vector_impl" }
%"struct.std::_Vector_base<std::basic_streambuf<char> *, std::allocator<std::basic_streambuf<char> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::basic_streambuf<char> *, std::allocator<std::basic_streambuf<char> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::basic_streambuf<char> *, std::allocator<std::basic_streambuf<char> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ipx::Info" = type { %struct.ipx_info }
%struct.ipx_info = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, i32, i32, i32, double, double, double, double }
%"class.ipx::Model" = type { i8, i32, i32, i32, i32, %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", double, double, i32, i32, i32, i32, i32, %"class.std::vector.4", %"class.std::vector.14", double, double, double, %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.ipx::SparseMatrix", %"class.std::vector.4", %"class.std::valarray", %"class.std::valarray" }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector.4", %"class.std::vector.4", %"class.std::vector.9", %"class.std::vector.4", %"class.std::vector.9" }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.17" }
%"struct.std::_Head_base.17" = type { ptr }
%"class.std::unique_ptr.18" = type { %"struct.std::__uniq_ptr_data.19" }
%"struct.std::__uniq_ptr_data.19" = type { %"class.std::__uniq_ptr_impl.20" }
%"class.std::__uniq_ptr_impl.20" = type { %"class.std::tuple.21" }
%"class.std::tuple.21" = type { %"struct.std::_Tuple_impl.22" }
%"struct.std::_Tuple_impl.22" = type { %"struct.std::_Head_base.25" }
%"struct.std::_Head_base.25" = type { ptr }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = 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.std::valarray" = type { i64, ptr }

@.str.35 = external hidden unnamed_addr constant [33 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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 @_ZNK3ipx7Control4hLogENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(1496), ptr noundef) #3

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

declare void @_ZN3ipx5BasisC1ERKNS_7ControlERKNS_5ModelE(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(1496), ptr noundef nonnull align 8 dereferenceable(704)) unnamed_addr #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx8LpSolver18BuildStartingBasisEv(ptr noundef nonnull align 8 dereferenceable(2864) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  %8 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 0
  %9 = call noundef i32 @_ZNK3ipx7Control14stop_at_switchEv(ptr noundef nonnull align 8 dereferenceable(1496) %8)
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %11, label %14

11:                                               ; preds = %1
  %12 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %13 = getelementptr inbounds %struct.ipx_info, ptr %12, i32 0, i32 1
  store i32 10, ptr %13, align 4, !tbaa !9
  br label %105

14:                                               ; preds = %1
  %15 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 4
  %16 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #7
  %17 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 0
  %18 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 2
  invoke void @_ZN3ipx5BasisC1ERKNS_7ControlERKNS_5ModelE(ptr noundef nonnull align 8 dereferenceable(176) %16, ptr noundef nonnull align 8 dereferenceable(1496) %17, ptr noundef nonnull align 8 dereferenceable(704) %18)
          to label %19 unwind label %37

19:                                               ; preds = %14
  call void @_ZNSt10unique_ptrIN3ipx5BasisESt14default_deleteIS1_EE5resetEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %16) #8
  %20 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %21 unwind label %41

21:                                               ; preds = %19
  invoke void @_ZNK3ipx7Control4hLogENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(1496) %20, ptr noundef %5)
          to label %22 unwind label %45

22:                                               ; preds = %21
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  %23 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 3
  %24 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx7IterateESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  %25 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 4
  %26 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx5BasisESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #8
  %27 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  call void @_ZN3ipx13StartingBasisEPNS_7IterateEPNS_5BasisEPNS_4InfoE(ptr noundef %24, ptr noundef %26, ptr noundef %27)
  %28 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %29 = getelementptr inbounds %struct.ipx_info, ptr %28, i32 0, i32 3
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = icmp eq i32 %30, 998
  br i1 %31, label %32, label %50

32:                                               ; preds = %22
  %33 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %34 = getelementptr inbounds %struct.ipx_info, ptr %33, i32 0, i32 3
  store i32 0, ptr %34, align 4, !tbaa !13
  %35 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %36 = getelementptr inbounds %struct.ipx_info, ptr %35, i32 0, i32 1
  store i32 5, ptr %36, align 4, !tbaa !9
  br label %105

37:                                               ; preds = %14
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %3, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %4, align 4
  call void @_ZdlPvm(ptr noundef %16, i64 noundef 176) #9
  br label %106

41:                                               ; preds = %19
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %3, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %4, align 4
  br label %49

45:                                               ; preds = %21
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %3, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %4, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %49

49:                                               ; preds = %45, %41
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  br label %106

50:                                               ; preds = %22
  %51 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %52 = getelementptr inbounds %struct.ipx_info, ptr %51, i32 0, i32 3
  %53 = load i32, ptr %52, align 4, !tbaa !13
  %54 = icmp eq i32 %53, 999
  br i1 %54, label %55, label %60

55:                                               ; preds = %50
  %56 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %57 = getelementptr inbounds %struct.ipx_info, ptr %56, i32 0, i32 3
  store i32 0, ptr %57, align 4, !tbaa !13
  %58 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %59 = getelementptr inbounds %struct.ipx_info, ptr %58, i32 0, i32 1
  store i32 6, ptr %59, align 4, !tbaa !9
  br label %105

60:                                               ; preds = %50
  %61 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %62 = getelementptr inbounds %struct.ipx_info, ptr %61, i32 0, i32 3
  %63 = load i32, ptr %62, align 4, !tbaa !13
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %60
  %66 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %67 = getelementptr inbounds %struct.ipx_info, ptr %66, i32 0, i32 1
  store i32 9, ptr %67, align 4, !tbaa !9
  br label %105

68:                                               ; preds = %60
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 2
  %72 = call noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704) %71)
  br i1 %72, label %73, label %82

73:                                               ; preds = %70
  %74 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %75 = getelementptr inbounds %struct.ipx_info, ptr %74, i32 0, i32 14
  %76 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %77 = getelementptr inbounds %struct.ipx_info, ptr %76, i32 0, i32 15
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %75, ptr noundef nonnull align 4 dereferenceable(4) %77) #8
  %78 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %79 = getelementptr inbounds %struct.ipx_info, ptr %78, i32 0, i32 16
  %80 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %81 = getelementptr inbounds %struct.ipx_info, ptr %80, i32 0, i32 17
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %79, ptr noundef nonnull align 4 dereferenceable(4) %81) #8
  br label %82

82:                                               ; preds = %73, %70
  %83 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 0
  %84 = call noundef i32 @_ZNK3ipx7Control14stop_at_switchEv(ptr noundef nonnull align 8 dereferenceable(1496) %83)
  %85 = icmp sgt i32 %84, 0
  br i1 %85, label %86, label %89

86:                                               ; preds = %82
  %87 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %88 = getelementptr inbounds %struct.ipx_info, ptr %87, i32 0, i32 1
  store i32 10, ptr %88, align 4, !tbaa !9
  br label %105

89:                                               ; preds = %82
  %90 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %91 = getelementptr inbounds %struct.ipx_info, ptr %90, i32 0, i32 16
  %92 = load i32, ptr %91, align 8, !tbaa !14
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %97

94:                                               ; preds = %89
  %95 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %96 = getelementptr inbounds %struct.ipx_info, ptr %95, i32 0, i32 1
  store i32 3, ptr %96, align 4, !tbaa !9
  br label %105

97:                                               ; preds = %89
  %98 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %99 = getelementptr inbounds %struct.ipx_info, ptr %98, i32 0, i32 17
  %100 = load i32, ptr %99, align 4, !tbaa !15
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %105

102:                                              ; preds = %97
  %103 = getelementptr inbounds %"class.ipx::LpSolver", ptr %7, i32 0, i32 1
  %104 = getelementptr inbounds %struct.ipx_info, ptr %103, i32 0, i32 1
  store i32 4, ptr %104, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %102, %97, %94, %86, %65, %55, %32, %11
  ret void

106:                                              ; preds = %49, %37
  %107 = load ptr, ptr %3, align 8
  %108 = load i32, ptr %4, align 4
  %109 = insertvalue { ptr, i32 } poison, ptr %107, 0
  %110 = insertvalue { ptr, i32 } %109, i32 %108, 1
  resume { ptr, i32 } %110
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx7Control14stop_at_switchEv(ptr noundef nonnull align 8 dereferenceable(1496)) #1 align 2

declare void @_ZN3ipx13StartingBasisEPNS_7IterateEPNS_5BasisEPNS_4InfoE(ptr noundef, ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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 = { 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 = { "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 = { nobuiltin allocsize(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 = { nobuiltin 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 #6 = { inlinehint 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 #7 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { builtin 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 4}
!10 = !{!"_ZTS8ipx_info", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !12, i64 224, !12, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312, !12, i64 320, !12, i64 328, !12, i64 336, !12, i64 344, !12, i64 352, !12, i64 360, !12, i64 368, !12, i64 376, !12, i64 384, !12, i64 392, !12, i64 400, !12, i64 408, !11, i64 416, !11, i64 420, !11, i64 424, !11, i64 428, !12, i64 432, !12, i64 440, !12, i64 448, !12, i64 456}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !11, i64 12}
!14 = !{!10, !11, i64 64}
!15 = !{!10, !11, i64 68}


; 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] }
%"class.std::allocator" = type { i8 }

@.str.35 = external hidden unnamed_addr constant [33 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

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

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

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 @_ZNK3ipx7Control4hLogENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(1496), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #4

declare void @_ZN3ipx5BasisC1ERKNS_7ControlERKNS_5ModelE(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(1496), ptr noundef nonnull align 8 dereferenceable(704)) unnamed_addr #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx8LpSolver18BuildStartingBasisEv(ptr noundef nonnull align 8 dereferenceable(2864) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = tail call noundef i32 @_ZNK3ipx7Control14stop_at_switchEv(ptr noundef nonnull align 8 dereferenceable(1496) %0)
  %5 = icmp slt i32 %4, 0
  br i1 %5, label %.sink.split, label %6

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 2672
  %8 = tail call noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #7
  %9 = getelementptr inbounds i8, ptr %0, i64 1960
  invoke void @_ZN3ipx5BasisC1ERKNS_7ControlERKNS_5ModelE(ptr noundef nonnull align 8 dereferenceable(176) %8, ptr noundef nonnull align 8 dereferenceable(1496) %0, ptr noundef nonnull align 8 dereferenceable(704) %9)
          to label %10 unwind label %19

10:                                               ; preds = %6
  tail call void @_ZNSt10unique_ptrIN3ipx5BasisESt14default_deleteIS1_EE5resetEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.35, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %11 unwind label %21

11:                                               ; preds = %10
  invoke void @_ZNK3ipx7Control4hLogENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(1496) %0, ptr noundef nonnull %2)
          to label %12 unwind label %23

12:                                               ; preds = %11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  %13 = getelementptr inbounds i8, ptr %0, i64 2664
  %14 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx7IterateESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %15 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx5BasisESt14default_deleteIS1_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %16 = getelementptr inbounds i8, ptr %0, i64 1496
  call void @_ZN3ipx13StartingBasisEPNS_7IterateEPNS_5BasisEPNS_4InfoE(ptr noundef %14, ptr noundef %15, ptr noundef nonnull %16)
  %17 = getelementptr inbounds i8, ptr %0, i64 1508
  %18 = load i32, ptr %17, align 4, !tbaa !5
  switch i32 %18, label %.sink.split [
    i32 998, label %.sink.split.sink.split
    i32 999, label %26
    i32 0, label %27
  ]

19:                                               ; preds = %6
  %20 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 176) #9
  br label %45

21:                                               ; preds = %10
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %25

23:                                               ; preds = %11
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  br label %25

25:                                               ; preds = %23, %21
  %.pn = phi { ptr, i32 } [ %24, %23 ], [ %22, %21 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  br label %45

26:                                               ; preds = %12
  br label %.sink.split.sink.split

27:                                               ; preds = %12
  %28 = call noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704) %9)
  br i1 %28, label %29, label %34

29:                                               ; preds = %27
  %30 = getelementptr inbounds i8, ptr %0, i64 1552
  %31 = getelementptr inbounds i8, ptr %0, i64 1556
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31) #8
  %32 = getelementptr inbounds i8, ptr %0, i64 1560
  %33 = getelementptr inbounds i8, ptr %0, i64 1564
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %33) #8
  br label %34

34:                                               ; preds = %29, %27
  %35 = call noundef i32 @_ZNK3ipx7Control14stop_at_switchEv(ptr noundef nonnull align 8 dereferenceable(1496) %0)
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.sink.split, label %37

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %0, i64 1560
  %39 = load i32, ptr %38, align 8, !tbaa !11
  %.not7 = icmp eq i32 %39, 0
  br i1 %.not7, label %40, label %.sink.split

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %0, i64 1564
  %42 = load i32, ptr %41, align 4, !tbaa !12
  %.not8 = icmp eq i32 %42, 0
  br i1 %.not8, label %44, label %.sink.split

.sink.split.sink.split:                           ; preds = %12, %26
  %.sink.ph = phi i32 [ 6, %26 ], [ 5, %12 ]
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %.sink.split

.sink.split:                                      ; preds = %.sink.split.sink.split, %40, %37, %34, %12, %1
  %.sink = phi i32 [ 10, %1 ], [ 9, %12 ], [ 10, %34 ], [ 3, %37 ], [ 4, %40 ], [ %.sink.ph, %.sink.split.sink.split ]
  %43 = getelementptr inbounds i8, ptr %0, i64 1500
  store i32 %.sink, ptr %43, align 4, !tbaa !13
  br label %44

44:                                               ; preds = %.sink.split, %40
  ret void

45:                                               ; preds = %25, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %25 ], [ %20, %19 ]
  resume { ptr, i32 } %.pn.pn
}

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

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

declare void @_ZN3ipx13StartingBasisEPNS_7IterateEPNS_5BasisEPNS_4InfoE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3ipx5Model8dualizedEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

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 = { 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 = { "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 = { nobuiltin allocsize(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 = { nobuiltin 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 #6 = { inlinehint 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 #7 = { builtin allocsize(0) }
attributes #8 = { nounwind }
attributes #9 = { builtin 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 12}
!6 = !{!"_ZTS8ipx_info", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !7, i64 192, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !7, i64 416, !7, i64 420, !7, i64 424, !7, i64 428, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!6, !7, i64 64}
!12 = !{!6, !7, i64 68}
!13 = !{!6, !7, i64 4}


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