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

; 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::Model" = type { i8, i32, i32, i32, i32, %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", double, double, i32, i32, i32, i32, i32, %"class.std::vector", %"class.std::vector.8", double, double, double, %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.ipx::SparseMatrix", %"class.std::vector", %"class.std::valarray", %"class.std::valarray" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"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 }

@.str.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx5Model10ScaleModelERKNS_7ControlE = external hidden unnamed_addr constant [45 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [37 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 @_ZN3ipx5Model10ScaleModelERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(704) %0, ptr noundef nonnull align 8 dereferenceable(1496) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8
  %7 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 28
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %8

8:                                                ; preds = %53, %2
  %9 = load i32, ptr %5, align 4, !tbaa !9
  %10 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %11 = load i32, ptr %10, align 8, !tbaa !11
  %12 = icmp slt i32 %9, %11
  br i1 %12, label %14, label %13

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

14:                                               ; preds = %8
  %15 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 26
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %15, i64 noundef %17) #6
  %19 = load double, ptr %18, align 8, !tbaa !30
  %20 = call noundef zeroext i1 @_ZSt8isfinited(double noundef %19)
  br i1 %20, label %21, label %52

21:                                               ; preds = %14
  %22 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 25
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %22, i64 noundef %24) #6
  %26 = load double, ptr %25, align 8, !tbaa !30
  %27 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %26)
  br i1 %27, label %28, label %52

28:                                               ; preds = %21
  %29 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 26
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %31) #6
  %33 = load double, ptr %32, align 8, !tbaa !30
  %34 = fneg double %33
  %35 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 25
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %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) #6
  store double %34, ptr %38, align 8, !tbaa !30
  %39 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 26
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %39, i64 noundef %41) #6
  store double 0x7FF0000000000000, ptr %42, align 8, !tbaa !30
  %43 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 27
  %44 = load i32, ptr %5, align 4, !tbaa !9
  call void @_ZN3ipx11ScaleColumnERNS_12SparseMatrixEid(ptr noundef nonnull align 8 dereferenceable(128) %43, i32 noundef %44, double noundef -1.000000e+00)
  %45 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 23
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %45, i64 noundef %47) #6
  %49 = load double, ptr %48, align 8, !tbaa !30
  %50 = fmul double %49, -1.000000e+00
  store double %50, ptr %48, align 8, !tbaa !30
  %51 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 28
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br label %52

52:                                               ; preds = %28, %21, %14
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %5, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %5, align 4, !tbaa !9
  br label %8, !llvm.loop !31

56:                                               ; preds = %13
  %57 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 29
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %57, i64 noundef 0, double noundef 0.000000e+00)
  %58 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 30
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %58, i64 noundef 0, double noundef 0.000000e+00)
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call noundef i32 @_ZNK3ipx7Control5scaleEv(ptr noundef nonnull align 8 dereferenceable(1496) %59)
  %61 = icmp sge i32 %60, 1
  br i1 %61, label %62, label %63

62:                                               ; preds = %56
  call void @_ZN3ipx5Model17EquilibrateMatrixEv(ptr noundef nonnull align 8 dereferenceable(704) %6)
  br label %63

63:                                               ; preds = %62, %56
  %64 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 29
  %65 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %64)
  %66 = icmp ugt i64 %65, 0
  br i1 %66, label %67, label %87

67:                                               ; preds = %63
  %68 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 29
  %69 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %68)
  %70 = trunc i64 %69 to i32
  %71 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %73 = icmp eq i32 %70, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %67
  br label %77

75:                                               ; preds = %67
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.18, i32 noundef 609, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx5Model10ScaleModelERKNS_7ControlE) #7
  unreachable

76:                                               ; No predecessors!
  br label %77

77:                                               ; preds = %76, %74
  %78 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 29
  %79 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 23
  %80 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEmLERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %79, ptr noundef nonnull align 8 dereferenceable(16) %78)
  %81 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 29
  %82 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 25
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEdVERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull align 8 dereferenceable(16) %81)
  %84 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 29
  %85 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 26
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEdVERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %84)
  br label %87

87:                                               ; preds = %77, %63
  %88 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 30
  %89 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %88)
  %90 = icmp ugt i64 %89, 0
  br i1 %90, label %91, label %105

91:                                               ; preds = %87
  %92 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 30
  %93 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %92)
  %94 = trunc i64 %93 to i32
  %95 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 13
  %96 = load i32, ptr %95, align 8, !tbaa !33
  %97 = icmp eq i32 %94, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %91
  br label %101

99:                                               ; preds = %91
  call void @__assert_fail(ptr noundef @.str.32, ptr noundef @.str.18, i32 noundef 615, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx5Model10ScaleModelERKNS_7ControlE) #7
  unreachable

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %98
  %102 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 30
  %103 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 24
  %104 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEmLERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %103, ptr noundef nonnull align 8 dereferenceable(16) %102)
  br label %105

105:                                              ; preds = %101, %87
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt8isfinited(double noundef) #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #5 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) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) #3

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

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

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

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

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

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

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 = { 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 #3 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 368}
!12 = !{!"_ZTSN3ipx5ModelE", !13, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !14, i64 24, !14, i64 152, !23, i64 280, !23, i64 296, !23, i64 312, !23, i64 328, !25, i64 344, !25, i64 352, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !15, i64 384, !26, i64 408, !25, i64 432, !25, i64 440, !25, i64 448, !23, i64 456, !23, i64 472, !23, i64 488, !23, i64 504, !14, i64 520, !15, i64 648, !23, i64 672, !23, i64 688}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN3ipx12SparseMatrixE", !10, i64 0, !15, i64 8, !15, i64 32, !19, i64 56, !15, i64 80, !19, i64 104}
!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", !6, i64 0, !6, i64 8, !6, 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", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt8valarrayIdE", !24, i64 0, !6, i64 8}
!24 = !{!"long", !7, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!"_ZTSSt6vectorIcSaIcEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!25, !25, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!12, !10, i64 360}


; 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.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx5Model10ScaleModelERKNS_7ControlE = external hidden unnamed_addr constant [45 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [37 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx5Model10ScaleModelERKNS_7ControlE(ptr noundef nonnull align 8 dereferenceable(704) %0, ptr noundef nonnull align 8 dereferenceable(1496) %1) local_unnamed_addr #1 align 2 {
  %3 = alloca i32, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 648
  tail call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %5 = getelementptr inbounds i8, ptr %0, i64 368
  store i32 0, ptr %3, align 4, !tbaa !5
  %6 = load i32, ptr %5, align 8, !tbaa !9
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 504
  %9 = getelementptr inbounds i8, ptr %0, i64 488
  %10 = getelementptr inbounds i8, ptr %0, i64 520
  %11 = getelementptr inbounds i8, ptr %0, i64 456
  br label %16

._crit_edge:                                      ; preds = %45, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %12 = getelementptr inbounds i8, ptr %0, i64 672
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef 0, double noundef 0.000000e+00)
  %13 = getelementptr inbounds i8, ptr %0, i64 688
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef 0, double noundef 0.000000e+00)
  %14 = call noundef i32 @_ZNK3ipx7Control5scaleEv(ptr noundef nonnull align 8 dereferenceable(1496) %1)
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %50, label %51

16:                                               ; preds = %.lr.ph, %45
  %storemerge3 = phi i32 [ 0, %.lr.ph ], [ %47, %45 ]
  %17 = sext i32 %storemerge3 to i64
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %17) #6
  %19 = load double, ptr %18, align 8, !tbaa !29
  %20 = call noundef zeroext i1 @_ZSt8isfinited(double noundef %19)
  br i1 %20, label %21, label %45

21:                                               ; preds = %16
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %23) #6
  %25 = load double, ptr %24, align 8, !tbaa !29
  %26 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %25)
  br i1 %26, label %27, label %45

27:                                               ; preds = %21
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %29) #6
  %31 = load double, ptr %30, align 8, !tbaa !29
  %32 = fneg double %31
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %34) #6
  store double %32, ptr %35, align 8, !tbaa !29
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %37) #6
  store double 0x7FF0000000000000, ptr %38, align 8, !tbaa !29
  %39 = load i32, ptr %3, align 4, !tbaa !5
  call void @_ZN3ipx11ScaleColumnERNS_12SparseMatrixEid(ptr noundef nonnull align 8 dereferenceable(128) %10, i32 noundef %39, double noundef -1.000000e+00)
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %11, i64 noundef %41) #6
  %43 = load double, ptr %42, align 8, !tbaa !29
  %44 = fneg double %43
  store double %44, ptr %42, align 8, !tbaa !29
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br label %45

45:                                               ; preds = %16, %21, %27
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %3, align 4, !tbaa !5
  %48 = load i32, ptr %5, align 8, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %16, label %._crit_edge, !llvm.loop !30

50:                                               ; preds = %._crit_edge
  call void @_ZN3ipx5Model17EquilibrateMatrixEv(ptr noundef nonnull align 8 dereferenceable(704) %0)
  br label %51

51:                                               ; preds = %50, %._crit_edge
  %52 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %.not = icmp eq i64 %52, 0
  br i1 %.not, label %66, label %53

53:                                               ; preds = %51
  %54 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  %55 = trunc i64 %54 to i32
  %56 = load i32, ptr %5, align 8, !tbaa !9
  %57 = icmp eq i32 %56, %55
  br i1 %57, label %59, label %58

58:                                               ; preds = %53
  call void @__assert_fail(ptr noundef nonnull @.str.31, ptr noundef nonnull @.str.18, i32 noundef 609, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx5Model10ScaleModelERKNS_7ControlE) #7
  unreachable

59:                                               ; preds = %53
  %60 = getelementptr inbounds i8, ptr %0, i64 456
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEmLERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %60, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %62 = getelementptr inbounds i8, ptr %0, i64 488
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEdVERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %64 = getelementptr inbounds i8, ptr %0, i64 504
  %65 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEdVERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %64, ptr noundef nonnull align 8 dereferenceable(16) %12)
  br label %66

66:                                               ; preds = %59, %51
  %67 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %.not2 = icmp eq i64 %67, 0
  br i1 %.not2, label %78, label %68

68:                                               ; preds = %66
  %69 = call noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %13)
  %70 = trunc i64 %69 to i32
  %71 = getelementptr inbounds i8, ptr %0, i64 360
  %72 = load i32, ptr %71, align 8, !tbaa !32
  %73 = icmp eq i32 %72, %70
  br i1 %73, label %75, label %74

74:                                               ; preds = %68
  call void @__assert_fail(ptr noundef nonnull @.str.32, ptr noundef nonnull @.str.18, i32 noundef 615, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx5Model10ScaleModelERKNS_7ControlE) #7
  unreachable

75:                                               ; preds = %68
  %76 = getelementptr inbounds i8, ptr %0, i64 472
  %77 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEmLERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %76, ptr noundef nonnull align 8 dereferenceable(16) %13)
  br label %78

78:                                               ; preds = %75, %66
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt8isfinited(double noundef) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt8valarrayIdE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 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 #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) local_unnamed_addr #3

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

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

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

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

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

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

attributes #0 = { mustprogress 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 = { 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 #3 = { 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 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 368}
!10 = !{!"_ZTSN3ipx5ModelE", !11, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !12, i64 24, !12, i64 152, !22, i64 280, !22, i64 296, !22, i64 312, !22, i64 328, !24, i64 344, !24, i64 352, !6, i64 360, !6, i64 364, !6, i64 368, !6, i64 372, !6, i64 376, !13, i64 384, !25, i64 408, !24, i64 432, !24, i64 440, !24, i64 448, !22, i64 456, !22, i64 472, !22, i64 488, !22, i64 504, !12, i64 520, !13, i64 648, !22, i64 672, !22, i64 688}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN3ipx12SparseMatrixE", !6, i64 0, !13, i64 8, !13, i64 32, !18, i64 56, !13, i64 80, !18, i64 104}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!22 = !{!"_ZTSSt8valarrayIdE", !23, i64 0, !17, i64 8}
!23 = !{!"long", !7, i64 0}
!24 = !{!"double", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIcSaIcEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!29 = !{!24, !24, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!10, !6, i64 360}


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