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

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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.std::locale" = type { ptr }
%"struct.presolve::dev_kkt_check::KktConditionDetails" = type { i32, double, double, i32, i32 }
%"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 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: mustprogress uwtable
define dso_local void @_ZN8presolve13dev_kkt_check17checkPrimalBoundsERKNS0_5StateERNS0_19KktConditionDetailsE(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %7, i32 0, i32 0
  store i32 0, ptr %8, align 8, !tbaa !9
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %9, i32 0, i32 3
  store i32 0, ptr %10, align 8, !tbaa !14
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %11, i32 0, i32 4
  store i32 0, ptr %12, align 4, !tbaa !15
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %13, i32 0, i32 1
  store double 0.000000e+00, ptr %14, align 8, !tbaa !16
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %15, i32 0, i32 2
  store double 0.000000e+00, ptr %16, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !18
  br label %17

17:                                               ; preds = %174, %2
  %18 = load i32, ptr %5, align 4, !tbaa !18
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !19
  %22 = icmp slt i32 %18, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %177

24:                                               ; preds = %17
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %25, i32 0, i32 14
  %27 = load ptr, ptr %26, align 8, !tbaa !21
  %28 = load i32, ptr %5, align 4, !tbaa !18
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29) #6
  %31 = load i32, ptr %30, align 4, !tbaa !18
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %173

33:                                               ; preds = %24
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %34, i32 0, i32 3
  %36 = load i32, ptr %35, align 8, !tbaa !14
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %35, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store double 0.000000e+00, ptr %6, align 8, !tbaa !22
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %38, i32 0, i32 10
  %40 = load ptr, ptr %39, align 8, !tbaa !23
  %41 = load i32, ptr %5, align 4, !tbaa !18
  %42 = sext i32 %41 to i64
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %42) #6
  %44 = load double, ptr %43, align 8, !tbaa !22
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %45, i32 0, i32 16
  %47 = load ptr, ptr %46, align 8, !tbaa !24
  %48 = load i32, ptr %5, align 4, !tbaa !18
  %49 = sext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %49) #6
  %51 = load double, ptr %50, align 8, !tbaa !22
  %52 = fsub double %44, %51
  %53 = fcmp ogt double %52, 0x3E7AD7F29ABCAF48
  br i1 %53, label %71, label %54

54:                                               ; preds = %33
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %55, i32 0, i32 16
  %57 = load ptr, ptr %56, align 8, !tbaa !24
  %58 = load i32, ptr %5, align 4, !tbaa !18
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #6
  %61 = load double, ptr %60, align 8, !tbaa !22
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %62, i32 0, i32 11
  %64 = load ptr, ptr %63, align 8, !tbaa !25
  %65 = load i32, ptr %5, align 4, !tbaa !18
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %64, i64 noundef %66) #6
  %68 = load double, ptr %67, align 8, !tbaa !22
  %69 = fsub double %61, %68
  %70 = fcmp ogt double %69, 0x3E7AD7F29ABCAF48
  br i1 %70, label %71, label %172

71:                                               ; preds = %54, %33
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %72, i32 0, i32 10
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %75 = load i32, ptr %5, align 4, !tbaa !18
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #6
  %78 = load double, ptr %77, align 8, !tbaa !22
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %79, i32 0, i32 16
  %81 = load ptr, ptr %80, align 8, !tbaa !24
  %82 = load i32, ptr %5, align 4, !tbaa !18
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #6
  %85 = load double, ptr %84, align 8, !tbaa !22
  %86 = fsub double %78, %85
  %87 = fcmp ogt double %86, 0x3E7AD7F29ABCAF48
  br i1 %87, label %88, label %104

88:                                               ; preds = %71
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %89, i32 0, i32 10
  %91 = load ptr, ptr %90, align 8, !tbaa !23
  %92 = load i32, ptr %5, align 4, !tbaa !18
  %93 = sext i32 %92 to i64
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %91, i64 noundef %93) #6
  %95 = load double, ptr %94, align 8, !tbaa !22
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %96, i32 0, i32 16
  %98 = load ptr, ptr %97, align 8, !tbaa !24
  %99 = load i32, ptr %5, align 4, !tbaa !18
  %100 = sext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %98, i64 noundef %100) #6
  %102 = load double, ptr %101, align 8, !tbaa !22
  %103 = fsub double %95, %102
  store double %103, ptr %6, align 8, !tbaa !22
  br label %120

104:                                              ; preds = %71
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %105, i32 0, i32 16
  %107 = load ptr, ptr %106, align 8, !tbaa !24
  %108 = load i32, ptr %5, align 4, !tbaa !18
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %109) #6
  %111 = load double, ptr %110, align 8, !tbaa !22
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %112, i32 0, i32 11
  %114 = load ptr, ptr %113, align 8, !tbaa !25
  %115 = load i32, ptr %5, align 4, !tbaa !18
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %116) #6
  %118 = load double, ptr %117, align 8, !tbaa !22
  %119 = fsub double %111, %118
  store double %119, ptr %6, align 8, !tbaa !22
  br label %120

120:                                              ; preds = %104, %88
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
  %122 = load i32, ptr %5, align 4, !tbaa !18
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %121, i32 noundef %122)
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %123, ptr noundef @.str.12)
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %125, i32 0, i32 10
  %127 = load ptr, ptr %126, align 8, !tbaa !23
  %128 = load i32, ptr %5, align 4, !tbaa !18
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %129) #6
  %131 = load double, ptr %130, align 8, !tbaa !22
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %124, double noundef %131)
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef @.str.13)
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %134, i32 0, i32 16
  %136 = load ptr, ptr %135, align 8, !tbaa !24
  %137 = load i32, ptr %5, align 4, !tbaa !18
  %138 = sext i32 %137 to i64
  %139 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %136, i64 noundef %138) #6
  %140 = load double, ptr %139, align 8, !tbaa !22
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %133, double noundef %140)
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef @.str.14)
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.presolve::dev_kkt_check::State", ptr %143, i32 0, i32 11
  %145 = load ptr, ptr %144, align 8, !tbaa !25
  %146 = load i32, ptr %5, align 4, !tbaa !18
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %145, i64 noundef %147) #6
  %149 = load double, ptr %148, align 8, !tbaa !22
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %142, double noundef %149)
  %151 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %152, i32 0, i32 4
  %154 = load i32, ptr %153, align 4, !tbaa !15
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %153, align 4, !tbaa !15
  %156 = load double, ptr %6, align 8, !tbaa !22
  %157 = load double, ptr %6, align 8, !tbaa !22
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %158, i32 0, i32 2
  %160 = load double, ptr %159, align 8, !tbaa !17
  %161 = call double @llvm.fmuladd.f64(double %156, double %157, double %160)
  store double %161, ptr %159, align 8, !tbaa !17
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %162, i32 0, i32 1
  %164 = load double, ptr %163, align 8, !tbaa !16
  %165 = load double, ptr %6, align 8, !tbaa !22
  %166 = fcmp olt double %164, %165
  br i1 %166, label %167, label %171

167:                                              ; preds = %120
  %168 = load double, ptr %6, align 8, !tbaa !22
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.presolve::dev_kkt_check::KktConditionDetails", ptr %169, i32 0, i32 1
  store double %168, ptr %170, align 8, !tbaa !16
  br label %171

171:                                              ; preds = %167, %120
  br label %172

172:                                              ; preds = %171, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %173

173:                                              ; preds = %172, %24
  br label %174

174:                                              ; preds = %173
  %175 = load i32, ptr %5, align 4, !tbaa !18
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %5, align 4, !tbaa !18
  br label %17, !llvm.loop !26

177:                                              ; preds = %23
  ret void
}

; 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) #2 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) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { inlinehint 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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 0}
!10 = !{!"_ZTSN8presolve13dev_kkt_check19KktConditionDetailsE", !11, i64 0, !12, i64 8, !12, i64 16, !13, i64 24, !13, i64 28}
!11 = !{!"_ZTSN8presolve13dev_kkt_check12KktConditionE", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!10, !13, i64 24}
!15 = !{!10, !13, i64 28}
!16 = !{!10, !12, i64 8}
!17 = !{!10, !12, i64 16}
!18 = !{!13, !13, i64 0}
!19 = !{!20, !13, i64 0}
!20 = !{!"_ZTSN8presolve13dev_kkt_check5StateE", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160}
!21 = !{!20, !6, i64 104}
!22 = !{!12, !12, i64 0}
!23 = !{!20, !6, i64 72}
!24 = !{!20, !6, i64 120}
!25 = !{!20, !6, i64 80}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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.std::locale" = type { ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8presolve13dev_kkt_check17checkPrimalBoundsERKNS0_5StateERNS0_19KktConditionDetailsE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(168) %0, ptr nocapture noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #0 {
  store i32 0, ptr %1, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %1, i64 24
  %4 = getelementptr inbounds i8, ptr %1, i64 28
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = getelementptr inbounds i8, ptr %1, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, i8 0, i64 24, i1 false)
  %7 = load i32, ptr %0, align 8, !tbaa !12
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %9 = getelementptr inbounds i8, ptr %0, i64 104
  %10 = getelementptr inbounds i8, ptr %0, i64 72
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  br label %13

._crit_edge:                                      ; preds = %79, %2
  ret void

13:                                               ; preds = %.lr.ph, %79
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %79 ]
  %14 = load ptr, ptr %9, align 8, !tbaa !15
  %15 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv) #6
  %16 = load i32, ptr %15, align 4, !tbaa !16
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %79, label %17

17:                                               ; preds = %13
  %18 = load i32, ptr %3, align 8, !tbaa !17
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %3, align 8, !tbaa !17
  %20 = load ptr, ptr %10, align 8, !tbaa !18
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv) #6
  %22 = load double, ptr %21, align 8, !tbaa !19
  %23 = load ptr, ptr %11, align 8, !tbaa !20
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv) #6
  %25 = load double, ptr %24, align 8, !tbaa !19
  %26 = fsub double %22, %25
  %27 = fcmp ogt double %26, 0x3E7AD7F29ABCAF48
  br i1 %27, label %37, label %28

28:                                               ; preds = %17
  %29 = load ptr, ptr %11, align 8, !tbaa !20
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %indvars.iv) #6
  %31 = load double, ptr %30, align 8, !tbaa !19
  %32 = load ptr, ptr %12, align 8, !tbaa !21
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %indvars.iv) #6
  %34 = load double, ptr %33, align 8, !tbaa !19
  %35 = fsub double %31, %34
  %36 = fcmp ogt double %35, 0x3E7AD7F29ABCAF48
  br i1 %36, label %37, label %79

37:                                               ; preds = %28, %17
  %38 = load ptr, ptr %10, align 8, !tbaa !18
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %indvars.iv) #6
  %40 = load double, ptr %39, align 8, !tbaa !19
  %41 = load ptr, ptr %11, align 8, !tbaa !20
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %indvars.iv) #6
  %43 = load double, ptr %42, align 8, !tbaa !19
  %44 = fsub double %40, %43
  %45 = fcmp ogt double %44, 0x3E7AD7F29ABCAF48
  %.val = load ptr, ptr %10, align 8
  %.val55 = load ptr, ptr %11, align 8
  %46 = select i1 %45, ptr %.val, ptr %.val55
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv) #6
  %48 = load double, ptr %47, align 8, !tbaa !19
  %.val56 = load ptr, ptr %11, align 8
  %.val57 = load ptr, ptr %12, align 8
  %49 = select i1 %45, ptr %.val56, ptr %.val57
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv) #6
  %51 = load double, ptr %50, align 8, !tbaa !19
  %52 = fsub double %48, %51
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
  %54 = trunc nuw nsw i64 %indvars.iv to i32
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %53, i32 noundef %54)
  %56 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @.str.12)
  %57 = load ptr, ptr %10, align 8, !tbaa !18
  %58 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %indvars.iv) #6
  %59 = load double, ptr %58, align 8, !tbaa !19
  %60 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %56, double noundef %59)
  %61 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str.13)
  %62 = load ptr, ptr %11, align 8, !tbaa !20
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %indvars.iv) #6
  %64 = load double, ptr %63, align 8, !tbaa !19
  %65 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %61, double noundef %64)
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @.str.14)
  %67 = load ptr, ptr %12, align 8, !tbaa !21
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %indvars.iv) #6
  %69 = load double, ptr %68, align 8, !tbaa !19
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %66, double noundef %69)
  %71 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %72 = load i32, ptr %4, align 4, !tbaa !22
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %4, align 4, !tbaa !22
  %74 = load double, ptr %6, align 8, !tbaa !23
  %75 = tail call double @llvm.fmuladd.f64(double %52, double %52, double %74)
  store double %75, ptr %6, align 8, !tbaa !23
  %76 = load double, ptr %5, align 8, !tbaa !24
  %77 = fcmp olt double %76, %52
  br i1 %77, label %78, label %79

78:                                               ; preds = %37
  store double %52, ptr %5, align 8, !tbaa !24
  br label %79

79:                                               ; preds = %28, %78, %37, %13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %80 = load i32, ptr %0, align 8, !tbaa !12
  %81 = sext i32 %80 to i64
  %82 = icmp slt i64 %indvars.iv.next, %81
  br i1 %82, label %13, label %._crit_edge, !llvm.loop !25
}

; 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { 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 #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 = { inlinehint 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 0}
!6 = !{!"_ZTSN8presolve13dev_kkt_check19KktConditionDetailsE", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !11, i64 28}
!7 = !{!"_ZTSN8presolve13dev_kkt_check12KktConditionE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_ZTSN8presolve13dev_kkt_check5StateE", !11, i64 0, !11, i64 4, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !14, i64 112, !14, i64 120, !14, i64 128, !14, i64 136, !14, i64 144, !14, i64 152, !14, i64 160}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!13, !14, i64 104}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !11, i64 24}
!18 = !{!13, !14, i64 72}
!19 = !{!10, !10, i64 0}
!20 = !{!13, !14, i64 120}
!21 = !{!13, !14, i64 80}
!22 = !{!6, !11, i64 28}
!23 = !{!6, !10, i64 16}
!24 = !{!6, !10, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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