; LLVM IR from ERGO-Code/HiGHS :: src/test (KktCh2)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.presolve::dev_kkt_check::State" = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::allocator.0" = type { i8 }
%"class.presolve::dev_kkt_check::KktChStep" = type { ptr, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", i32, %"class.std::stack", %"class.std::stack", %"class.std::stack", %"class.std::stack", %"class.std::stack" }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::vector<std::pair<int, double>>, std::allocator<std::vector<std::pair<int, double>>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::vector<std::pair<int, double>>, std::allocator<std::vector<std::pair<int, double>>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::vector<std::pair<int, double>>, std::allocator<std::vector<std::pair<int, double>>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::vector<std::pair<int, double>>, std::allocator<std::vector<std::pair<int, double>>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._ZN8presolve13dev_kkt_check9KktChStep9initStateEiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_ = external hidden unnamed_addr constant [568 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 dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8presolve13dev_kkt_check9KktChStep9initStateEiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_(ptr dead_on_unwind noalias writable sret(%"struct.presolve::dev_kkt_check::State") align 8 %0, ptr noundef nonnull align 8 dereferenceable(536) %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 1 %17, ptr noundef nonnull align 1 %18) #2 align 2 personality ptr @__gxx_personality_v0 {
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca %"class.std::vector", align 8
  %39 = alloca double, align 8
  %40 = alloca %"class.std::allocator.0", align 1
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  store ptr %1, ptr %20, align 8, !tbaa !5
  store i32 %2, ptr %21, align 4, !tbaa !9
  store i32 %3, ptr %22, align 4, !tbaa !9
  store ptr %4, ptr %23, align 8, !tbaa !5
  store ptr %5, ptr %24, align 8, !tbaa !5
  store ptr %6, ptr %25, align 8, !tbaa !5
  store ptr %7, ptr %26, align 8, !tbaa !5
  store ptr %8, ptr %27, align 8, !tbaa !5
  store ptr %9, ptr %28, align 8, !tbaa !5
  store ptr %10, ptr %29, align 8, !tbaa !5
  store ptr %11, ptr %30, align 8, !tbaa !5
  store ptr %12, ptr %31, align 8, !tbaa !5
  store ptr %13, ptr %32, align 8, !tbaa !5
  store ptr %14, ptr %33, align 8, !tbaa !5
  store ptr %15, ptr %34, align 8, !tbaa !5
  store ptr %16, ptr %35, align 8, !tbaa !5
  store ptr %17, ptr %36, align 8, !tbaa !5
  store ptr %18, ptr %37, align 8, !tbaa !5
  %47 = load ptr, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %38) #5
  %48 = load i32, ptr %22, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  store double 0.000000e+00, ptr %39, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %40) #5
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #5
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %49, ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 1 dereferenceable(1) %40)
          to label %50 unwind label %56

50:                                               ; preds = %19
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #5
  store i32 0, ptr %43, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %131, %50
  %52 = load i32, ptr %43, align 4, !tbaa !9
  %53 = load i32, ptr %22, align 4, !tbaa !9
  %54 = icmp slt i32 %52, %53
  br i1 %54, label %60, label %55

55:                                               ; preds = %51
  store i32 2, ptr %44, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #5
  br label %134

56:                                               ; preds = %19
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %41, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %42, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  br label %162

60:                                               ; preds = %51
  %61 = load ptr, ptr %31, align 8, !tbaa !5
  %62 = load i32, ptr %43, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %63) #5
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %130

67:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #5
  %68 = load ptr, ptr %27, align 8, !tbaa !5
  %69 = load i32, ptr %43, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %68, i64 noundef %70) #5
  %72 = load i32, ptr %71, align 4, !tbaa !9
  store i32 %72, ptr %45, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %112, %67
  %74 = load i32, ptr %45, align 4, !tbaa !9
  %75 = load ptr, ptr %27, align 8, !tbaa !5
  %76 = load i32, ptr %43, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %78) #5
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = icmp slt i32 %74, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %73
  store i32 5, ptr %44, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #5
  br label %115

83:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #5
  %84 = load ptr, ptr %28, align 8, !tbaa !5
  %85 = load i32, ptr %45, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %86) #5
  %88 = load i32, ptr %87, align 4, !tbaa !9
  store i32 %88, ptr %46, align 4, !tbaa !9
  %89 = load ptr, ptr %30, align 8, !tbaa !5
  %90 = load i32, ptr %46, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %91) #5
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = icmp ne i32 %93, 0
  br i1 %94, label %95, label %111

95:                                               ; preds = %83
  %96 = load ptr, ptr %29, align 8, !tbaa !5
  %97 = load i32, ptr %45, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98) #5
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = load ptr, ptr %32, align 8, !tbaa !5
  %102 = load i32, ptr %46, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %101, i64 noundef %103) #5
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = load i32, ptr %43, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %107) #5
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = call double @llvm.fmuladd.f64(double %100, double %105, double %109)
  store double %110, ptr %108, align 8, !tbaa !11
  br label %111

111:                                              ; preds = %95, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #5
  br label %112

112:                                              ; preds = %111
  %113 = load i32, ptr %45, align 4, !tbaa !9
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %45, align 4, !tbaa !9
  br label %73, !llvm.loop !13

115:                                              ; preds = %82
  %116 = load ptr, ptr %34, align 8, !tbaa !5
  %117 = load i32, ptr %43, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef %118) #5
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = load i32, ptr %43, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %122) #5
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = fcmp oeq double %120, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %115
  br label %129

127:                                              ; preds = %115
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.12, i32 noundef 292, ptr noundef @__PRETTY_FUNCTION__._ZN8presolve13dev_kkt_check9KktChStep9initStateEiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_) #6
  unreachable

128:                                              ; No predecessors!
  br label %129

129:                                              ; preds = %128, %126
  br label %130

130:                                              ; preds = %129, %60
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %43, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %43, align 4, !tbaa !9
  br label %51, !llvm.loop !15

134:                                              ; preds = %55
  %135 = load i32, ptr %21, align 4, !tbaa !9
  %136 = load i32, ptr %22, align 4, !tbaa !9
  %137 = load ptr, ptr %23, align 8, !tbaa !5
  %138 = load ptr, ptr %24, align 8, !tbaa !5
  %139 = load ptr, ptr %25, align 8, !tbaa !5
  %140 = load ptr, ptr %26, align 8, !tbaa !5
  %141 = load ptr, ptr %27, align 8, !tbaa !5
  %142 = load ptr, ptr %28, align 8, !tbaa !5
  %143 = load ptr, ptr %29, align 8, !tbaa !5
  %144 = getelementptr inbounds %"class.presolve::dev_kkt_check::KktChStep", ptr %47, i32 0, i32 1
  %145 = getelementptr inbounds %"class.presolve::dev_kkt_check::KktChStep", ptr %47, i32 0, i32 2
  %146 = getelementptr inbounds %"class.presolve::dev_kkt_check::KktChStep", ptr %47, i32 0, i32 3
  %147 = getelementptr inbounds %"class.presolve::dev_kkt_check::KktChStep", ptr %47, i32 0, i32 4
  %148 = getelementptr inbounds %"class.presolve::dev_kkt_check::KktChStep", ptr %47, i32 0, i32 5
  %149 = load ptr, ptr %30, align 8, !tbaa !5
  %150 = load ptr, ptr %31, align 8, !tbaa !5
  %151 = load ptr, ptr %32, align 8, !tbaa !5
  %152 = load ptr, ptr %33, align 8, !tbaa !5
  %153 = load ptr, ptr %34, align 8, !tbaa !5
  %154 = load ptr, ptr %35, align 8, !tbaa !5
  %155 = load ptr, ptr %36, align 8, !tbaa !5
  %156 = load ptr, ptr %37, align 8, !tbaa !5
  invoke void @_ZN8presolve13dev_kkt_check5StateC2EiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_SA_SA_SA_SA_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %135, i32 noundef %136, ptr noundef nonnull align 8 dereferenceable(24) %137, ptr noundef nonnull align 8 dereferenceable(24) %138, ptr noundef nonnull align 8 dereferenceable(24) %139, ptr noundef nonnull align 8 dereferenceable(24) %140, ptr noundef nonnull align 8 dereferenceable(24) %141, ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef nonnull align 8 dereferenceable(24) %143, ptr noundef nonnull align 8 dereferenceable(24) %144, ptr noundef nonnull align 8 dereferenceable(24) %145, ptr noundef nonnull align 8 dereferenceable(24) %146, ptr noundef nonnull align 8 dereferenceable(24) %147, ptr noundef nonnull align 8 dereferenceable(24) %148, ptr noundef nonnull align 8 dereferenceable(24) %149, ptr noundef nonnull align 8 dereferenceable(24) %150, ptr noundef nonnull align 8 dereferenceable(24) %151, ptr noundef nonnull align 8 dereferenceable(24) %152, ptr noundef nonnull align 8 dereferenceable(24) %153, ptr noundef nonnull align 8 dereferenceable(24) %154, ptr noundef nonnull align 1 %155, ptr noundef nonnull align 1 %156)
          to label %157 unwind label %158

157:                                              ; preds = %134
  store i32 1, ptr %44, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #5
  ret void

158:                                              ; preds = %134
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %41, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %42, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %38) #5
  br label %162

162:                                              ; preds = %158, %56
  call void @llvm.lifetime.end.p0(i64 24, ptr %38) #5
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %41, align 8
  %165 = load i32, ptr %42, align 4
  %166 = insertvalue { ptr, i32 } poison, ptr %164, 0
  %167 = insertvalue { ptr, i32 } %166, i32 %165, 1
  resume { ptr, i32 } %167
}

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8presolve13dev_kkt_check5StateC2EiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_SA_SA_SA_SA_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1, ptr noundef nonnull align 1) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIdED2Ev(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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

%"struct.presolve::dev_kkt_check::State" = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::allocator.0" = type { i8 }

@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [69 x i8], align 1
@__PRETTY_FUNCTION__._ZN8presolve13dev_kkt_check9KktChStep9initStateEiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_ = external hidden unnamed_addr constant [568 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 dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8presolve13dev_kkt_check9KktChStep9initStateEiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_(ptr dead_on_unwind noalias writable sret(%"struct.presolve::dev_kkt_check::State") align 8 %0, ptr noundef nonnull align 8 dereferenceable(536) %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 1 %17, ptr noundef nonnull align 1 %18) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %20 = alloca %"class.std::vector", align 8
  %21 = alloca double, align 8
  %22 = alloca %"class.std::allocator.0", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #5
  %23 = sext i32 %3 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #5
  store double 0.000000e+00, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #5
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  invoke void @_ZNSt6vectorIdSaIdEEC2EmRKdRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %23, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %24 unwind label %31

24:                                               ; preds = %19
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  %25 = icmp sgt i32 %3, 0
  br i1 %25, label %.lr.ph49.preheader, label %._crit_edge50

.lr.ph49.preheader:                               ; preds = %24
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.lr.ph49

._crit_edge50:                                    ; preds = %67, %24
  %26 = getelementptr inbounds i8, ptr %1, i64 8
  %27 = getelementptr inbounds i8, ptr %1, i64 32
  %28 = getelementptr inbounds i8, ptr %1, i64 56
  %29 = getelementptr inbounds i8, ptr %1, i64 80
  %30 = getelementptr inbounds i8, ptr %1, i64 104
  call void @_ZN8presolve13dev_kkt_check5StateC2EiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_SA_SA_SA_SA_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 1 %17, ptr noundef nonnull align 1 %18)
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #5
  ret void

31:                                               ; preds = %19
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #5
  resume { ptr, i32 } %32

.lr.ph49:                                         ; preds = %.lr.ph49.preheader, %67
  %indvars.iv52 = phi i64 [ 0, %.lr.ph49.preheader ], [ %indvars.iv.next53.pre-phi, %67 ]
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv52) #5
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %.not = icmp eq i32 %34, 0
  br i1 %.not, label %.lr.ph49._crit_edge, label %35

.lr.ph49._crit_edge:                              ; preds = %.lr.ph49
  %.pre = add nuw nsw i64 %indvars.iv52, 1
  br label %67

35:                                               ; preds = %.lr.ph49
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %indvars.iv52) #5
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = add nuw nsw i64 %indvars.iv52, 1
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %38) #5
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = icmp slt i32 %37, %40
  br i1 %41, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %35
  %42 = sext i32 %37 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %61, %35
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv52) #5
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv52) #5
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = fcmp oeq double %44, %46
  br i1 %47, label %67, label %66

.lr.ph:                                           ; preds = %.lr.ph.preheader, %61
  %indvars.iv = phi i64 [ %42, %.lr.ph.preheader ], [ %indvars.iv.next, %61 ]
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv) #5
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %50) #5
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %.not45 = icmp eq i32 %52, 0
  br i1 %.not45, label %61, label %53

53:                                               ; preds = %.lr.ph
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv) #5
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %50) #5
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv52) #5
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = call double @llvm.fmuladd.f64(double %55, double %57, double %59)
  store double %60, ptr %58, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %53, %.lr.ph
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %38) #5
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next, %64
  br i1 %65, label %.lr.ph, label %._crit_edge, !llvm.loop !11

66:                                               ; preds = %._crit_edge
  call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.12, i32 noundef 292, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8presolve13dev_kkt_check9KktChStep9initStateEiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_) #6
  unreachable

67:                                               ; preds = %.lr.ph49._crit_edge, %._crit_edge
  %indvars.iv.next53.pre-phi = phi i64 [ %.pre, %.lr.ph49._crit_edge ], [ %38, %._crit_edge ]
  %exitcond.not = icmp eq i64 %indvars.iv.next53.pre-phi, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge50, label %.lr.ph49, !llvm.loop !13
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(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 @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8presolve13dev_kkt_check5StateC2EiiRKSt6vectorIiSaIiEES6_S6_RKS2_IdSaIdEES6_S6_SA_SA_SA_SA_SA_SA_S6_S6_SA_SA_SA_SA_RKS2_I16HighsBasisStatusSaISB_EESF_(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1, ptr noundef nonnull align 1) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIdED2Ev(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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass