; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx (kkt_solver_basis)

; 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.ipx::Maxvolume" = type { ptr, i32, i32, i32, i32, double, double, i32, double, double }
%"class.ipx::KKTSolverBasis" = type { %"class.ipx::KKTSolver", ptr, ptr, ptr, %"class.ipx::SplittedNormalMatrix", %"class.std::valarray", i8, i32, i32, i32 }
%"class.ipx::KKTSolver" = type { ptr }
%"class.ipx::SplittedNormalMatrix" = type { %"class.ipx::LinearOperator", ptr, %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::valarray", i8, double, double, double }
%"class.ipx::LinearOperator" = type { ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.3", %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%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 }

; 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx14KKTSolverBasis10_FactorizeEPNS_7IterateEPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(584) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.ipx::Maxvolume", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %13 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 2
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %14)
  store i32 %15, ptr %7, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %16 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 2
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %17)
  store i32 %18, ptr %8, align 4, !tbaa !28
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.ipx_info, ptr %19, i32 0, i32 3
  store i32 0, ptr %20, align 4, !tbaa !29
  %21 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 6
  store i8 0, ptr %21, align 8, !tbaa !31
  %22 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 8
  store i32 0, ptr %22, align 8, !tbaa !32
  %23 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 9
  store i32 0, ptr %23, align 4, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !28
  br label %24

24:                                               ; preds = %39, %3
  %25 = load i32, ptr %9, align 4, !tbaa !28
  %26 = load i32, ptr %8, align 4, !tbaa !28
  %27 = load i32, ptr %7, align 4, !tbaa !28
  %28 = add nsw i32 %26, %27
  %29 = icmp slt i32 %25, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %42

31:                                               ; preds = %24
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load i32, ptr %9, align 4, !tbaa !28
  %34 = call noundef double @_ZNK3ipx7Iterate13ScalingFactorEi(ptr noundef nonnull align 8 dereferenceable(296) %32, i32 noundef %33)
  %35 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 5
  %36 = load i32, ptr %9, align 4, !tbaa !28
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %35, i64 noundef %37) #5
  store double %34, ptr %38, align 8, !tbaa !34
  br label %39

39:                                               ; preds = %31
  %40 = load i32, ptr %9, align 4, !tbaa !28
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %9, align 4, !tbaa !28
  br label %24, !llvm.loop !35

42:                                               ; preds = %30
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call noundef double @_ZNK3ipx7Iterate10pobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296) %43)
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call noundef double @_ZNK3ipx7Iterate10dobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296) %45)
  %47 = fcmp oge double %44, %46
  br i1 %47, label %48, label %65

48:                                               ; preds = %42
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3ipx14KKTSolverBasis10DropPrimalEPNS_7IterateEPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(584) %12, ptr noundef %49, ptr noundef %50)
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ipx_info, ptr %51, i32 0, i32 3
  %53 = load i32, ptr %52, align 4, !tbaa !29
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %48
  store i32 1, ptr %10, align 4
  br label %132

56:                                               ; preds = %48
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3ipx14KKTSolverBasis8DropDualEPNS_7IterateEPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(584) %12, ptr noundef %57, ptr noundef %58)
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.ipx_info, ptr %59, i32 0, i32 3
  %61 = load i32, ptr %60, align 4, !tbaa !29
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %64

63:                                               ; preds = %56
  store i32 1, ptr %10, align 4
  br label %132

64:                                               ; preds = %56
  br label %65

65:                                               ; preds = %64, %42
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #5
  %66 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !37
  call void @_ZN3ipx9MaxvolumeC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(64) %11, ptr noundef nonnull align 8 dereferenceable(1496) %67)
  %68 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !37
  %70 = call noundef i32 @_ZNK3ipx7Control16update_heuristicEv(ptr noundef nonnull align 8 dereferenceable(1496) %69)
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %80

72:                                               ; preds = %65
  %73 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 5
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %73, i64 noundef 0) #5
  %75 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !38
  %77 = call noundef i32 @_ZN3ipx9Maxvolume13RunSequentialEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64) %11, ptr noundef %74, ptr noundef nonnull align 8 dereferenceable(176) %76)
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ipx_info, ptr %78, i32 0, i32 3
  store i32 %77, ptr %79, align 4, !tbaa !29
  br label %88

80:                                               ; preds = %65
  %81 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %81, i64 noundef 0) #5
  %83 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 3
  %84 = load ptr, ptr %83, align 8, !tbaa !38
  %85 = call noundef i32 @_ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64) %11, ptr noundef %82, ptr noundef nonnull align 8 dereferenceable(176) %84)
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ipx_info, ptr %86, i32 0, i32 3
  store i32 %85, ptr %87, align 4, !tbaa !29
  br label %88

88:                                               ; preds = %80, %72
  %89 = call noundef i32 @_ZNK3ipx9Maxvolume7updatesEv(ptr noundef nonnull align 8 dereferenceable(64) %11)
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.ipx_info, ptr %90, i32 0, i32 39
  %92 = load i32, ptr %91, align 4, !tbaa !39
  %93 = add nsw i32 %92, %89
  store i32 %93, ptr %91, align 4, !tbaa !39
  %94 = call noundef double @_ZNK3ipx9Maxvolume4timeEv(ptr noundef nonnull align 8 dereferenceable(64) %11)
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ipx_info, ptr %95, i32 0, i32 48
  %97 = load double, ptr %96, align 8, !tbaa !40
  %98 = fadd double %97, %94
  store double %98, ptr %96, align 8, !tbaa !40
  %99 = call noundef i32 @_ZNK3ipx9Maxvolume7updatesEv(ptr noundef nonnull align 8 dereferenceable(64) %11)
  %100 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 9
  %101 = load i32, ptr %100, align 4, !tbaa !33
  %102 = add nsw i32 %101, %99
  store i32 %102, ptr %100, align 4, !tbaa !33
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ipx_info, ptr %103, i32 0, i32 3
  %105 = load i32, ptr %104, align 4, !tbaa !29
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %108

107:                                              ; preds = %88
  store i32 1, ptr %10, align 4
  br label %131

108:                                              ; preds = %88
  %109 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 3
  %110 = load ptr, ptr %109, align 8, !tbaa !38
  %111 = call noundef zeroext i1 @_ZNK3ipx5Basis20FactorizationIsFreshEv(ptr noundef nonnull align 8 dereferenceable(176) %110)
  br i1 %111, label %124, label %112

112:                                              ; preds = %108
  %113 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 3
  %114 = load ptr, ptr %113, align 8, !tbaa !38
  %115 = call noundef i32 @_ZN3ipx5Basis9FactorizeEv(ptr noundef nonnull align 8 dereferenceable(176) %114)
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ipx_info, ptr %116, i32 0, i32 3
  store i32 %115, ptr %117, align 4, !tbaa !29
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ipx_info, ptr %118, i32 0, i32 3
  %120 = load i32, ptr %119, align 4, !tbaa !29
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %123

122:                                              ; preds = %112
  store i32 1, ptr %10, align 4
  br label %131

123:                                              ; preds = %112
  br label %124

124:                                              ; preds = %123, %108
  %125 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 4
  %126 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 3
  %127 = load ptr, ptr %126, align 8, !tbaa !38
  %128 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 5
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %128, i64 noundef 0) #5
  call void @_ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd(ptr noundef nonnull align 8 dereferenceable(520) %125, ptr noundef nonnull align 8 dereferenceable(176) %127, ptr noundef %129)
  %130 = getelementptr inbounds %"class.ipx::KKTSolverBasis", ptr %12, i32 0, i32 6
  store i8 1, ptr %130, align 8, !tbaa !31
  store i32 0, ptr %10, align 4
  br label %131

131:                                              ; preds = %124, %122, %107
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #5
  br label %132

132:                                              ; preds = %131, %63, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %133 = load i32, ptr %10, align 4
  switch i32 %133, label %135 [
    i32 0, label %134
    i32 1, label %134
  ]

134:                                              ; preds = %132, %132
  ret void

135:                                              ; preds = %132
  unreachable
}

declare noundef double @_ZNK3ipx7Iterate13ScalingFactorEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) #3

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

declare noundef double @_ZNK3ipx7Iterate10pobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296)) #3

declare noundef double @_ZNK3ipx7Iterate10dobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296)) #3

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

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

declare void @_ZN3ipx9MaxvolumeC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(1496)) unnamed_addr #3

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

declare noundef i32 @_ZN3ipx9Maxvolume13RunSequentialEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef nonnull align 8 dereferenceable(176)) #3

declare noundef i32 @_ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef nonnull align 8 dereferenceable(176)) #3

declare noundef i32 @_ZNK3ipx9Maxvolume7updatesEv(ptr noundef nonnull align 8 dereferenceable(64)) #3

declare noundef double @_ZNK3ipx9Maxvolume4timeEv(ptr noundef nonnull align 8 dereferenceable(64)) #3

declare noundef zeroext i1 @_ZNK3ipx5Basis20FactorizationIsFreshEv(ptr noundef nonnull align 8 dereferenceable(176)) #3

declare noundef i32 @_ZN3ipx5Basis9FactorizeEv(ptr noundef nonnull align 8 dereferenceable(176)) #3

declare void @_ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd(ptr noundef nonnull align 8 dereferenceable(520), ptr noundef nonnull align 8 dereferenceable(176), ptr noundef) #3

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 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"_ZTSN3ipx14KKTSolverBasisE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !24, i64 552, !26, i64 568, !15, i64 572, !15, i64 576, !15, i64 580}
!11 = !{!"_ZTSN3ipx9KKTSolverE"}
!12 = !{!"_ZTSN3ipx20SplittedNormalMatrixE", !13, i64 0, !6, i64 8, !14, i64 16, !14, i64 144, !14, i64 272, !16, i64 400, !16, i64 424, !16, i64 448, !24, i64 472, !26, i64 488, !27, i64 496, !27, i64 504, !27, i64 512}
!13 = !{!"_ZTSN3ipx14LinearOperatorE"}
!14 = !{!"_ZTSN3ipx12SparseMatrixE", !15, i64 0, !16, i64 8, !16, i64 32, !20, i64 56, !16, i64 80, !20, i64 104}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt8valarrayIdE", !25, i64 0, !6, i64 8}
!25 = !{!"long", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"double", !7, i64 0}
!28 = !{!15, !15, i64 0}
!29 = !{!30, !15, i64 12}
!30 = !{!"_ZTS8ipx_info", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68, !15, i64 72, !15, i64 76, !27, i64 80, !27, i64 88, !27, i64 96, !27, i64 104, !27, i64 112, !27, i64 120, !27, i64 128, !27, i64 136, !27, i64 144, !27, i64 152, !27, i64 160, !27, i64 168, !27, i64 176, !27, i64 184, !15, i64 192, !15, i64 196, !15, i64 200, !15, i64 204, !15, i64 208, !15, i64 212, !15, i64 216, !27, i64 224, !27, i64 232, !27, i64 240, !27, i64 248, !27, i64 256, !27, i64 264, !27, i64 272, !27, i64 280, !27, i64 288, !27, i64 296, !27, i64 304, !27, i64 312, !27, i64 320, !27, i64 328, !27, i64 336, !27, i64 344, !27, i64 352, !27, i64 360, !27, i64 368, !27, i64 376, !27, i64 384, !27, i64 392, !27, i64 400, !27, i64 408, !15, i64 416, !15, i64 420, !15, i64 424, !15, i64 428, !27, i64 432, !27, i64 440, !27, i64 448, !27, i64 456}
!31 = !{!10, !26, i64 568}
!32 = !{!10, !15, i64 576}
!33 = !{!10, !15, i64 580}
!34 = !{!27, !27, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!10, !6, i64 8}
!38 = !{!10, !6, i64 24}
!39 = !{!30, !15, i64 212}
!40 = !{!30, !27, i64 280}


; 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.ipx::Maxvolume" = type { ptr, i32, i32, i32, i32, double, double, i32, double, double }

; 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 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 i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx14KKTSolverBasis10_FactorizeEPNS_7IterateEPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(584) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca %"class.ipx::Maxvolume", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %6)
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = tail call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %8)
  %10 = getelementptr inbounds i8, ptr %2, i64 12
  store i32 0, ptr %10, align 4, !tbaa !27
  %11 = getelementptr inbounds i8, ptr %0, i64 568
  store i8 0, ptr %11, align 8, !tbaa !29
  %12 = getelementptr inbounds i8, ptr %0, i64 576
  store i32 0, ptr %12, align 8, !tbaa !30
  %13 = getelementptr inbounds i8, ptr %0, i64 580
  store i32 0, ptr %13, align 4, !tbaa !31
  %14 = add nsw i32 %9, %7
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %16 = getelementptr inbounds i8, ptr %0, i64 552
  %wide.trip.count = zext nneg i32 %14 to i64
  br label %20

._crit_edge:                                      ; preds = %20, %3
  %17 = tail call noundef double @_ZNK3ipx7Iterate10pobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296) %1)
  %18 = tail call noundef double @_ZNK3ipx7Iterate10dobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296) %1)
  %19 = fcmp ult double %17, %18
  br i1 %19, label %28, label %24

20:                                               ; preds = %.lr.ph, %20
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %20 ]
  %21 = trunc nuw nsw i64 %indvars.iv to i32
  %22 = tail call noundef double @_ZNK3ipx7Iterate13ScalingFactorEi(ptr noundef nonnull align 8 dereferenceable(296) %1, i32 noundef %21)
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %16, i64 noundef %indvars.iv) #5
  store double %22, ptr %23, align 8, !tbaa !32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %20, !llvm.loop !33

24:                                               ; preds = %._crit_edge
  tail call void @_ZN3ipx14KKTSolverBasis10DropPrimalEPNS_7IterateEPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(584) %0, ptr noundef nonnull %1, ptr noundef %2)
  %25 = load i32, ptr %10, align 4, !tbaa !27
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %26, label %68

26:                                               ; preds = %24
  tail call void @_ZN3ipx14KKTSolverBasis8DropDualEPNS_7IterateEPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(584) %0, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %27 = load i32, ptr %10, align 4, !tbaa !27
  %.not23 = icmp eq i32 %27, 0
  br i1 %.not23, label %28, label %68

28:                                               ; preds = %26, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #5
  %29 = getelementptr inbounds i8, ptr %0, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !35
  call void @_ZN3ipx9MaxvolumeC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(64) %4, ptr noundef nonnull align 8 dereferenceable(1496) %30)
  %31 = load ptr, ptr %29, align 8, !tbaa !35
  %32 = call noundef i32 @_ZNK3ipx7Control16update_heuristicEv(ptr noundef nonnull align 8 dereferenceable(1496) %31)
  %33 = icmp eq i32 %32, 0
  %34 = getelementptr inbounds i8, ptr %0, i64 552
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %34, i64 noundef 0) #5
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  %37 = load ptr, ptr %36, align 8, !tbaa !36
  br i1 %33, label %38, label %40

38:                                               ; preds = %28
  %39 = call noundef i32 @_ZN3ipx9Maxvolume13RunSequentialEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64) %4, ptr noundef nonnull %35, ptr noundef nonnull align 8 dereferenceable(176) %37)
  br label %42

40:                                               ; preds = %28
  %41 = call noundef i32 @_ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64) %4, ptr noundef nonnull %35, ptr noundef nonnull align 8 dereferenceable(176) %37)
  br label %42

42:                                               ; preds = %40, %38
  %storemerge = phi i32 [ %41, %40 ], [ %39, %38 ]
  store i32 %storemerge, ptr %10, align 4, !tbaa !27
  %43 = call noundef i32 @_ZNK3ipx9Maxvolume7updatesEv(ptr noundef nonnull align 8 dereferenceable(64) %4)
  %44 = getelementptr inbounds i8, ptr %2, i64 212
  %45 = load i32, ptr %44, align 4, !tbaa !37
  %46 = add nsw i32 %45, %43
  store i32 %46, ptr %44, align 4, !tbaa !37
  %47 = call noundef double @_ZNK3ipx9Maxvolume4timeEv(ptr noundef nonnull align 8 dereferenceable(64) %4)
  %48 = getelementptr inbounds i8, ptr %2, i64 280
  %49 = load double, ptr %48, align 8, !tbaa !38
  %50 = fadd double %47, %49
  store double %50, ptr %48, align 8, !tbaa !38
  %51 = call noundef i32 @_ZNK3ipx9Maxvolume7updatesEv(ptr noundef nonnull align 8 dereferenceable(64) %4)
  %52 = load i32, ptr %13, align 4, !tbaa !31
  %53 = add nsw i32 %52, %51
  store i32 %53, ptr %13, align 4, !tbaa !31
  %54 = load i32, ptr %10, align 4, !tbaa !27
  %.not24 = icmp eq i32 %54, 0
  br i1 %.not24, label %55, label %67

55:                                               ; preds = %42
  %56 = getelementptr inbounds i8, ptr %0, i64 24
  %57 = load ptr, ptr %56, align 8, !tbaa !36
  %58 = call noundef zeroext i1 @_ZNK3ipx5Basis20FactorizationIsFreshEv(ptr noundef nonnull align 8 dereferenceable(176) %57)
  br i1 %58, label %62, label %59

59:                                               ; preds = %55
  %60 = load ptr, ptr %56, align 8, !tbaa !36
  %61 = call noundef i32 @_ZN3ipx5Basis9FactorizeEv(ptr noundef nonnull align 8 dereferenceable(176) %60)
  store i32 %61, ptr %10, align 4, !tbaa !27
  %.not25 = icmp eq i32 %61, 0
  br i1 %.not25, label %62, label %67

62:                                               ; preds = %59, %55
  %63 = getelementptr inbounds i8, ptr %0, i64 32
  %64 = load ptr, ptr %56, align 8, !tbaa !36
  %65 = getelementptr inbounds i8, ptr %0, i64 552
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %65, i64 noundef 0) #5
  call void @_ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd(ptr noundef nonnull align 8 dereferenceable(520) %63, ptr noundef nonnull align 8 dereferenceable(176) %64, ptr noundef nonnull %66)
  store i8 1, ptr %11, align 8, !tbaa !29
  br label %67

67:                                               ; preds = %59, %42, %62
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #5
  br label %68

68:                                               ; preds = %26, %24, %67
  ret void
}

declare noundef double @_ZNK3ipx7Iterate13ScalingFactorEi(ptr noundef nonnull align 8 dereferenceable(296), i32 noundef) local_unnamed_addr #3

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

declare noundef double @_ZNK3ipx7Iterate10pobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296)) local_unnamed_addr #3

declare noundef double @_ZNK3ipx7Iterate10dobjectiveEv(ptr noundef nonnull align 8 dereferenceable(296)) local_unnamed_addr #3

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

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

declare void @_ZN3ipx9MaxvolumeC1ERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(1496)) unnamed_addr #3

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

declare noundef i32 @_ZN3ipx9Maxvolume13RunSequentialEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3

declare noundef i32 @_ZN3ipx9Maxvolume12RunHeuristicEPKdRNS_5BasisE(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef, ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3

declare noundef i32 @_ZNK3ipx9Maxvolume7updatesEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #3

declare noundef double @_ZNK3ipx9Maxvolume4timeEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZNK3ipx5Basis20FactorizationIsFreshEv(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3

declare noundef i32 @_ZN3ipx5Basis9FactorizeEv(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3

declare void @_ZN3ipx20SplittedNormalMatrix7PrepareERKNS_5BasisEPKd(ptr noundef nonnull align 8 dereferenceable(520), ptr noundef nonnull align 8 dereferenceable(176), ptr noundef) local_unnamed_addr #3

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 = { 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 #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 16}
!6 = !{!"_ZTSN3ipx14KKTSolverBasisE", !7, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !11, i64 32, !23, i64 552, !25, i64 568, !14, i64 572, !14, i64 576, !14, i64 580}
!7 = !{!"_ZTSN3ipx9KKTSolverE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN3ipx20SplittedNormalMatrixE", !12, i64 0, !8, i64 8, !13, i64 16, !13, i64 144, !13, i64 272, !15, i64 400, !15, i64 424, !15, i64 448, !23, i64 472, !25, i64 488, !26, i64 496, !26, i64 504, !26, i64 512}
!12 = !{!"_ZTSN3ipx14LinearOperatorE"}
!13 = !{!"_ZTSN3ipx12SparseMatrixE", !14, i64 0, !15, i64 8, !15, i64 32, !19, i64 56, !15, i64 80, !19, i64 104}
!14 = !{!"int", !9, i64 0}
!15 = !{!"_ZTSSt6vectorIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!23 = !{!"_ZTSSt8valarrayIdE", !24, i64 0, !8, i64 8}
!24 = !{!"long", !9, i64 0}
!25 = !{!"bool", !9, i64 0}
!26 = !{!"double", !9, i64 0}
!27 = !{!28, !14, i64 12}
!28 = !{!"_ZTS8ipx_info", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !26, i64 80, !26, i64 88, !26, i64 96, !26, i64 104, !26, i64 112, !26, i64 120, !26, i64 128, !26, i64 136, !26, i64 144, !26, i64 152, !26, i64 160, !26, i64 168, !26, i64 176, !26, i64 184, !14, i64 192, !14, i64 196, !14, i64 200, !14, i64 204, !14, i64 208, !14, i64 212, !14, i64 216, !26, i64 224, !26, i64 232, !26, i64 240, !26, i64 248, !26, i64 256, !26, i64 264, !26, i64 272, !26, i64 280, !26, i64 288, !26, i64 296, !26, i64 304, !26, i64 312, !26, i64 320, !26, i64 328, !26, i64 336, !26, i64 344, !26, i64 352, !26, i64 360, !26, i64 368, !26, i64 376, !26, i64 384, !26, i64 392, !26, i64 400, !26, i64 408, !14, i64 416, !14, i64 420, !14, i64 424, !14, i64 428, !26, i64 432, !26, i64 440, !26, i64 448, !26, i64 456}
!29 = !{!6, !25, i64 568}
!30 = !{!6, !14, i64 576}
!31 = !{!6, !14, i64 580}
!32 = !{!26, !26, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!6, !8, i64 8}
!36 = !{!6, !8, i64 24}
!37 = !{!28, !14, i64 212}
!38 = !{!28, !26, i64 280}


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