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

; 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::ForrestTomlin" = type { %"class.ipx::LuUpdate.base", ptr, i32, %"class.std::unique_ptr", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::vector", i32, i8, i8, double, double, %"class.std::valarray" }
%"class.ipx::LuUpdate.base" = type <{ ptr, i32 }>
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.5", %"class.std::vector", %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = 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 }

@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx13ForrestTomlin10ComputeEtaEi = external hidden unnamed_addr constant [41 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [27 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

declare noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext, ptr noundef, i32 noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx13ForrestTomlin10ComputeEtaEi(ptr noundef nonnull align 8 dereferenceable(608) %0, i32 noundef %1) #4 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  %12 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %13 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 12
  %14 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  %15 = trunc i64 %14 to i32
  store i32 %15, ptr %5, align 4, !tbaa !9
  %16 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 10
  %17 = call noundef i32 @_ZNK3ipx12SparseMatrix4colsEv(ptr noundef nonnull align 8 dereferenceable(128) %16)
  %18 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 2
  %19 = load i32, ptr %18, align 8, !tbaa !11
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = add nsw i32 %19, %20
  %22 = icmp eq i32 %17, %21
  br i1 %22, label %23, label %24

23:                                               ; preds = %2
  br label %26

24:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.17, i32 noundef 329, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx13ForrestTomlin10ComputeEtaEi) #8
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %27 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 7
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %29) #7
  %31 = load i32, ptr %30, align 4, !tbaa !9
  store i32 %31, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %51, %26
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %54

37:                                               ; preds = %32
  %38 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 12
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40) #7
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = icmp eq i32 %42, %43
  br i1 %44, label %45, label %50

45:                                               ; preds = %37
  %46 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 2
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = load i32, ptr %7, align 4, !tbaa !9
  %49 = add nsw i32 %47, %48
  store i32 %49, ptr %6, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %45, %37
  br label %51

51:                                               ; preds = %50
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %7, align 4, !tbaa !9
  br label %32, !llvm.loop !33

54:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store double 0.000000e+00, ptr %8, align 8, !tbaa !35
  %55 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 18
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %57 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 18
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %57, i64 noundef %59) #7
  store double 1.000000e+00, ptr %60, align 8, !tbaa !35
  %61 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 10
  %62 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 18
  %63 = call noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128) %61, ptr noundef nonnull align 8 dereferenceable(16) %62, i8 noundef signext 116, ptr noundef @.str.12, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %84, %54
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = load i32, ptr %5, align 4, !tbaa !9
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %87

69:                                               ; preds = %64
  %70 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 18
  %71 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 12
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %73) #7
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %70, i64 noundef %76) #7
  %78 = load double, ptr %77, align 8, !tbaa !35
  %79 = fcmp oeq double %78, 0.000000e+00
  br i1 %79, label %80, label %81

80:                                               ; preds = %69
  br label %83

81:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str.17, i32 noundef 345, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx13ForrestTomlin10ComputeEtaEi) #8
  unreachable

82:                                               ; No predecessors!
  br label %83

83:                                               ; preds = %82, %80
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %9, align 4, !tbaa !9
  br label %64, !llvm.loop !36

87:                                               ; preds = %68
  %88 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 11
  call void @_ZN3ipx12SparseMatrix11clear_queueEv(ptr noundef nonnull align 8 dereferenceable(128) %88)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %89 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 18
  %90 = load i32, ptr %6, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %89, i64 noundef %91) #7
  %93 = load double, ptr %92, align 8, !tbaa !35
  store double %93, ptr %10, align 8, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %11, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %123, %87
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !11
  %100 = load i32, ptr %5, align 4, !tbaa !9
  %101 = add nsw i32 %99, %100
  %102 = icmp slt i32 %97, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %126

104:                                              ; preds = %96
  %105 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 18
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %105, i64 noundef %107) #7
  %109 = load double, ptr %108, align 8, !tbaa !35
  %110 = fcmp une double %109, 0.000000e+00
  br i1 %110, label %111, label %122

111:                                              ; preds = %104
  %112 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 11
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 18
  %115 = load i32, ptr %11, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %114, i64 noundef %116) #7
  %118 = load double, ptr %117, align 8, !tbaa !35
  %119 = fneg double %118
  %120 = load double, ptr %10, align 8, !tbaa !35
  %121 = fdiv double %119, %120
  call void @_ZN3ipx12SparseMatrix9push_backEid(ptr noundef nonnull align 8 dereferenceable(128) %112, i32 noundef %113, double noundef %121)
  br label %122

122:                                              ; preds = %111, %104
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %11, align 4, !tbaa !9
  br label %96, !llvm.loop !37

126:                                              ; preds = %103
  %127 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 14
  store i8 1, ptr %127, align 4, !tbaa !38
  %128 = load i32, ptr %6, align 4, !tbaa !9
  %129 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %12, i32 0, i32 13
  store i32 %128, ptr %129, align 8, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ipx12SparseMatrix9push_backEid(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

declare void @_ZN3ipx12SparseMatrix11clear_queueEv(ptr noundef nonnull align 8 dereferenceable(128)) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !10, i64 24}
!12 = !{!"_ZTSN3ipx13ForrestTomlinE", !13, i64 0, !6, i64 16, !10, i64 24, !14, i64 32, !20, i64 40, !20, i64 64, !20, i64 88, !20, i64 112, !20, i64 136, !24, i64 160, !24, i64 288, !24, i64 416, !20, i64 544, !10, i64 568, !29, i64 572, !29, i64 573, !30, i64 576, !30, i64 584, !31, i64 592}
!13 = !{!"_ZTSN3ipx8LuUpdateE", !10, i64 8}
!14 = !{!"_ZTSSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx15LuFactorizationESt14default_deleteIS1_ELb1ELb1EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt5tupleIJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx15LuFactorizationELb0EE", !6, i64 0}
!20 = !{!"_ZTSSt6vectorIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3ipx12SparseMatrixE", !10, i64 0, !20, i64 8, !20, i64 32, !25, i64 56, !20, i64 80, !25, i64 104}
!25 = !{!"_ZTSSt6vectorIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"double", !7, i64 0}
!31 = !{!"_ZTSSt8valarrayIdE", !32, i64 0, !6, i64 8}
!32 = !{!"long", !7, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!30, !30, i64 0}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !34}
!38 = !{!12, !29, i64 572}
!39 = !{!12, !10, i64 568}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.12 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [30 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx13ForrestTomlin10ComputeEtaEi = external hidden unnamed_addr constant [41 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [27 x i8], align 1

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

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

declare noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext, ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx13ForrestTomlin10ComputeEtaEi(ptr noundef nonnull align 8 dereferenceable(608) %0, i32 noundef %1) local_unnamed_addr #4 align 2 {
  %3 = alloca double, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 544
  %5 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %6 = trunc i64 %5 to i32
  %7 = getelementptr inbounds i8, ptr %0, i64 288
  %8 = tail call noundef i32 @_ZNK3ipx12SparseMatrix4colsEv(ptr noundef nonnull align 8 dereferenceable(128) %7)
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load i32, ptr %9, align 8, !tbaa !5
  %11 = add nsw i32 %10, %6
  %12 = icmp eq i32 %8, %11
  br i1 %12, label %14, label %13

13:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.17, i32 noundef 329, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx13ForrestTomlin10ComputeEtaEi) #8
  unreachable

14:                                               ; preds = %2
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  %16 = sext i32 %1 to i64
  %17 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %16) #7
  %18 = load i32, ptr %17, align 4, !tbaa !31
  %19 = icmp sgt i32 %6, 0
  br i1 %19, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %14
  %wide.trip.count = and i64 %5, 2147483647
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %14
  %.023.lcssa = phi i32 [ %18, %14 ], [ %.1, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store double 0.000000e+00, ptr %3, align 8, !tbaa !32
  %20 = getelementptr inbounds i8, ptr %0, i64 592
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %22 = sext i32 %.023.lcssa to i64
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %22) #7
  store double 1.000000e+00, ptr %23, align 8, !tbaa !32
  %24 = call noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull align 8 dereferenceable(16) %20, i8 noundef signext 116, ptr noundef nonnull @.str.12, i32 noundef 0)
  br i1 %19, label %.lr.ph31.preheader, label %._crit_edge32

.lr.ph31.preheader:                               ; preds = %._crit_edge
  %wide.trip.count42 = and i64 %5, 2147483647
  br label %.lr.ph31

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.02328 = phi i32 [ %18, %.lr.ph.preheader ], [ %.1, %.lr.ph ]
  %25 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv) #7
  %26 = load i32, ptr %25, align 4, !tbaa !31
  %27 = icmp eq i32 %26, %.02328
  %28 = load i32, ptr %9, align 8
  %29 = trunc nuw nsw i64 %indvars.iv to i32
  %30 = add nsw i32 %28, %29
  %.1 = select i1 %27, i32 %30, i32 %.02328
  %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 %.lr.ph, !llvm.loop !33

31:                                               ; preds = %.lr.ph31
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %exitcond43.not = icmp eq i64 %indvars.iv.next40, %wide.trip.count42
  br i1 %exitcond43.not, label %._crit_edge32, label %.lr.ph31, !llvm.loop !35

._crit_edge32:                                    ; preds = %31, %._crit_edge
  %32 = getelementptr inbounds i8, ptr %0, i64 416
  call void @_ZN3ipx12SparseMatrix11clear_queueEv(ptr noundef nonnull align 8 dereferenceable(128) %32)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %22) #7
  %34 = load double, ptr %33, align 8, !tbaa !32
  %.033 = add nsw i32 %.023.lcssa, 1
  %35 = load i32, ptr %9, align 8, !tbaa !5
  %36 = add nsw i32 %35, %6
  %37 = icmp slt i32 %.033, %36
  br i1 %37, label %.lr.ph36.preheader, label %._crit_edge37

.lr.ph36.preheader:                               ; preds = %._crit_edge32
  %38 = sext i32 %.033 to i64
  br label %.lr.ph36

.lr.ph31:                                         ; preds = %.lr.ph31.preheader, %31
  %indvars.iv39 = phi i64 [ 0, %.lr.ph31.preheader ], [ %indvars.iv.next40, %31 ]
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv39) #7
  %40 = load i32, ptr %39, align 4, !tbaa !31
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %41) #7
  %43 = load double, ptr %42, align 8, !tbaa !32
  %44 = fcmp oeq double %43, 0.000000e+00
  br i1 %44, label %31, label %45

45:                                               ; preds = %.lr.ph31
  call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.17, i32 noundef 345, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx13ForrestTomlin10ComputeEtaEi) #8
  unreachable

._crit_edge37:                                    ; preds = %57, %._crit_edge32
  %46 = getelementptr inbounds i8, ptr %0, i64 572
  store i8 1, ptr %46, align 4, !tbaa !36
  %47 = getelementptr inbounds i8, ptr %0, i64 568
  store i32 %.023.lcssa, ptr %47, align 8, !tbaa !37
  ret void

.lr.ph36:                                         ; preds = %.lr.ph36.preheader, %57
  %indvars.iv44 = phi i64 [ %38, %.lr.ph36.preheader ], [ %indvars.iv.next45, %57 ]
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %indvars.iv44) #7
  %49 = load double, ptr %48, align 8, !tbaa !32
  %50 = fcmp une double %49, 0.000000e+00
  br i1 %50, label %51, label %57

51:                                               ; preds = %.lr.ph36
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %indvars.iv44) #7
  %53 = load double, ptr %52, align 8, !tbaa !32
  %54 = fneg double %53
  %55 = fdiv double %54, %34
  %56 = trunc nsw i64 %indvars.iv44 to i32
  call void @_ZN3ipx12SparseMatrix9push_backEid(ptr noundef nonnull align 8 dereferenceable(128) %32, i32 noundef %56, double noundef %55)
  br label %57

57:                                               ; preds = %.lr.ph36, %51
  %indvars.iv.next45 = add nsw i64 %indvars.iv44, 1
  %58 = load i32, ptr %9, align 8, !tbaa !5
  %59 = add nsw i32 %58, %6
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next45, %60
  br i1 %61, label %.lr.ph36, label %._crit_edge37, !llvm.loop !38
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ipx12SparseMatrix9push_backEid(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

declare void @_ZN3ipx12SparseMatrix11clear_queueEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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, !8, i64 24}
!6 = !{!"_ZTSN3ipx13ForrestTomlinE", !7, i64 0, !11, i64 16, !8, i64 24, !12, i64 32, !18, i64 40, !18, i64 64, !18, i64 88, !18, i64 112, !18, i64 136, !22, i64 160, !22, i64 288, !22, i64 416, !18, i64 544, !8, i64 568, !27, i64 572, !27, i64 573, !28, i64 576, !28, i64 584, !29, i64 592}
!7 = !{!"_ZTSN3ipx8LuUpdateE", !8, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx15LuFactorizationESt14default_deleteIS1_ELb1ELb1EE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt5tupleIJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx15LuFactorizationELb0EE", !11, i64 0}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!"_ZTSN3ipx12SparseMatrixE", !8, i64 0, !18, i64 8, !18, i64 32, !23, i64 56, !18, i64 80, !23, i64 104}
!23 = !{!"_ZTSSt6vectorIdSaIdEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!27 = !{!"bool", !9, i64 0}
!28 = !{!"double", !9, i64 0}
!29 = !{!"_ZTSSt8valarrayIdE", !30, i64 0, !11, i64 8}
!30 = !{!"long", !9, i64 0}
!31 = !{!8, !8, i64 0}
!32 = !{!28, !28, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = !{!6, !27, i64 572}
!37 = !{!6, !8, i64 568}
!38 = distinct !{!38, !34}


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