; LLVM IR from ERGO-Code/HiGHS :: src/lp_data/HighsLp.ll (ZN7HighsLp10applyScaleEv)

; 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.HighsLp = type { i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %class.HighsSparseMatrix, i32, double, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32, %"class.std::vector.8", %"class.std::vector.8", %"class.std::vector.13", %struct.HighsNameHash, %struct.HighsNameHash, i32, i32, %struct.HighsScale, i8, i8, i32, i8, %struct.HighsLpMods }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.HighsSparseMatrix = type { i32, i32, i32, %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl" }
%"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl" = type { %"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HighsVarType, std::allocator<HighsVarType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.HighsNameHash = type { %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%struct.HighsScale = type { i32, i8, i32, i32, double, %"class.std::vector", %"class.std::vector" }
%struct.HighsLpMods = type { %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector", %"class.std::vector", %"class.std::vector.13", %"class.std::vector.3", %"class.std::vector", %"class.std::vector.3", %"class.std::vector", %"class.std::vector.3", %"class.std::vector", %"class.std::vector", %"class.std::vector" }

@.str.52 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN7HighsLp10applyScaleEv = 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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7HighsLp10applyScaleEv(ptr noundef nonnull align 8 dereferenceable(920) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %8 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 21
  store ptr %8, ptr %3, align 8, !tbaa !5
  %9 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 22
  %10 = load i8, ptr %9, align 8, !tbaa !9, !range !44, !noundef !45
  %11 = trunc i8 %10 to i1
  br i1 %11, label %12, label %21

12:                                               ; preds = %1
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.HighsScale, ptr %13, i32 0, i32 1
  %15 = load i8, ptr %14, align 4, !tbaa !46, !range !44, !noundef !45
  %16 = trunc i8 %15 to i1
  br i1 %16, label %17, label %18

17:                                               ; preds = %12
  br label %20

18:                                               ; preds = %12
  call void @__assert_fail(ptr noundef @.str.58, ptr noundef @.str.52, i32 noundef 225, ptr noundef @__PRETTY_FUNCTION__._ZN7HighsLp10applyScaleEv) #6
  unreachable

19:                                               ; No predecessors!
  br label %20

20:                                               ; preds = %19, %17
  store i32 1, ptr %4, align 4
  br label %114

21:                                               ; preds = %1
  %22 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 22
  store i8 0, ptr %22, align 8, !tbaa !9
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.HighsScale, ptr %23, i32 0, i32 1
  %25 = load i8, ptr %24, align 4, !tbaa !46, !range !44, !noundef !45
  %26 = trunc i8 %25 to i1
  br i1 %26, label %27, label %113

27:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !47
  br label %28

28:                                               ; preds = %71, %27
  %29 = load i32, ptr %5, align 4, !tbaa !47
  %30 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 0
  %31 = load i32, ptr %30, align 8, !tbaa !48
  %32 = icmp slt i32 %29, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %74

34:                                               ; preds = %28
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.HighsScale, ptr %35, i32 0, i32 5
  %37 = load i32, ptr %5, align 4, !tbaa !47
  %38 = sext i32 %37 to i64
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %38) #5
  %40 = load double, ptr %39, align 8, !tbaa !49
  %41 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 3
  %42 = load i32, ptr %5, align 4, !tbaa !47
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %43) #5
  %45 = load double, ptr %44, align 8, !tbaa !49
  %46 = fdiv double %45, %40
  store double %46, ptr %44, align 8, !tbaa !49
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.HighsScale, ptr %47, i32 0, i32 5
  %49 = load i32, ptr %5, align 4, !tbaa !47
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #5
  %52 = load double, ptr %51, align 8, !tbaa !49
  %53 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 4
  %54 = load i32, ptr %5, align 4, !tbaa !47
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #5
  %57 = load double, ptr %56, align 8, !tbaa !49
  %58 = fdiv double %57, %52
  store double %58, ptr %56, align 8, !tbaa !49
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.HighsScale, ptr %59, i32 0, i32 5
  %61 = load i32, ptr %5, align 4, !tbaa !47
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62) #5
  %64 = load double, ptr %63, align 8, !tbaa !49
  %65 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 2
  %66 = load i32, ptr %5, align 4, !tbaa !47
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %67) #5
  %69 = load double, ptr %68, align 8, !tbaa !49
  %70 = fmul double %69, %64
  store double %70, ptr %68, align 8, !tbaa !49
  br label %71

71:                                               ; preds = %34
  %72 = load i32, ptr %5, align 4, !tbaa !47
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %5, align 4, !tbaa !47
  br label %28, !llvm.loop !50

74:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !47
  br label %75

75:                                               ; preds = %106, %74
  %76 = load i32, ptr %6, align 4, !tbaa !47
  %77 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !52
  %79 = icmp slt i32 %76, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %75
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %109

81:                                               ; preds = %75
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.HighsScale, ptr %82, i32 0, i32 6
  %84 = load i32, ptr %6, align 4, !tbaa !47
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #5
  %87 = load double, ptr %86, align 8, !tbaa !49
  %88 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 5
  %89 = load i32, ptr %6, align 4, !tbaa !47
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90) #5
  %92 = load double, ptr %91, align 8, !tbaa !49
  %93 = fmul double %92, %87
  store double %93, ptr %91, align 8, !tbaa !49
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.HighsScale, ptr %94, i32 0, i32 6
  %96 = load i32, ptr %6, align 4, !tbaa !47
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %97) #5
  %99 = load double, ptr %98, align 8, !tbaa !49
  %100 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 6
  %101 = load i32, ptr %6, align 4, !tbaa !47
  %102 = sext i32 %101 to i64
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %102) #5
  %104 = load double, ptr %103, align 8, !tbaa !49
  %105 = fmul double %104, %99
  store double %105, ptr %103, align 8, !tbaa !49
  br label %106

106:                                              ; preds = %81
  %107 = load i32, ptr %6, align 4, !tbaa !47
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %6, align 4, !tbaa !47
  br label %75, !llvm.loop !53

109:                                              ; preds = %80
  %110 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 7
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN17HighsSparseMatrix10applyScaleERK10HighsScale(ptr noundef nonnull align 8 dereferenceable(112) %110, ptr noundef nonnull align 8 dereferenceable(72) %111)
  %112 = getelementptr inbounds %class.HighsLp, ptr %7, i32 0, i32 22
  store i8 1, ptr %112, align 8, !tbaa !9
  br label %113

113:                                              ; preds = %109, %21
  store i32 0, ptr %4, align 4
  br label %114

114:                                              ; preds = %113, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %115 = load i32, ptr %4, align 4
  switch i32 %115, label %117 [
    i32 0, label %116
    i32 1, label %116
  ]

116:                                              ; preds = %114, %114
  ret void

117:                                              ; preds = %114
  unreachable
}

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

declare void @_ZN17HighsSparseMatrix10applyScaleERK10HighsScale(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(72)) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !42, i64 592}
!10 = !{!"_ZTS7HighsLp", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 32, !12, i64 56, !12, i64 80, !12, i64 104, !16, i64 128, !22, i64 240, !23, i64 248, !24, i64 256, !24, i64 288, !11, i64 320, !11, i64 324, !27, i64 328, !27, i64 352, !31, i64 376, !35, i64 400, !35, i64 456, !11, i64 512, !11, i64 516, !41, i64 520, !42, i64 592, !42, i64 593, !11, i64 596, !42, i64 600, !43, i64 608}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIdSaIdEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTS17HighsSparseMatrix", !17, i64 0, !11, i64 4, !11, i64 8, !18, i64 16, !18, i64 40, !18, i64 64, !12, i64 88}
!17 = !{!"_ZTS12MatrixFormat", !7, 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", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTS8ObjSense", !7, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !26, i64 8, !7, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSSt6vectorI12HighsVarTypeSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseI12HighsVarTypeSaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTS13HighsNameHash", !36, i64 0}
!36 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE", !37, i64 0}
!37 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !26, i64 8, !38, i64 16, !26, i64 24, !39, i64 32, !6, i64 48}
!38 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!39 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !40, i64 0, !26, i64 8}
!40 = !{!"float", !7, i64 0}
!41 = !{!"_ZTS10HighsScale", !11, i64 0, !42, i64 4, !11, i64 8, !11, i64 12, !23, i64 16, !12, i64 24, !12, i64 48}
!42 = !{!"bool", !7, i64 0}
!43 = !{!"_ZTS11HighsLpMods", !18, i64 0, !18, i64 24, !12, i64 48, !12, i64 72, !31, i64 96, !18, i64 120, !12, i64 144, !18, i64 168, !12, i64 192, !18, i64 216, !12, i64 240, !12, i64 264, !12, i64 288}
!44 = !{i8 0, i8 2}
!45 = !{}
!46 = !{!41, !42, i64 4}
!47 = !{!11, !11, i64 0}
!48 = !{!10, !11, i64 0}
!49 = !{!23, !23, i64 0}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}
!52 = !{!10, !11, i64 4}
!53 = distinct !{!53, !51}


; 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.52 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [18 x i8], align 1
@__PRETTY_FUNCTION__._ZN7HighsLp10applyScaleEv = external hidden unnamed_addr constant [27 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7HighsLp10applyScaleEv(ptr noundef nonnull align 8 dereferenceable(920) %0) local_unnamed_addr #2 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 520
  %3 = getelementptr inbounds i8, ptr %0, i64 592
  %4 = load i8, ptr %3, align 8, !tbaa !5, !range !43, !noundef !44
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %11

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %0, i64 524
  %8 = load i8, ptr %7, align 4, !tbaa !45, !range !43, !noundef !44
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %61, label %10

10:                                               ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.58, ptr noundef nonnull @.str.52, i32 noundef 225, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7HighsLp10applyScaleEv) #4
  unreachable

11:                                               ; preds = %1
  store i8 0, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 524
  %13 = load i8, ptr %12, align 4, !tbaa !45, !range !43, !noundef !44
  %14 = trunc nuw i8 %13 to i1
  br i1 %14, label %.preheader23, label %61

.preheader23:                                     ; preds = %11
  %15 = load i32, ptr %0, align 8, !tbaa !46
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %.preheader23
  %17 = getelementptr inbounds i8, ptr %0, i64 544
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  br label %27

.preheader:                                       ; preds = %27, %.preheader23
  %21 = getelementptr inbounds i8, ptr %0, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !47
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph26, label %._crit_edge

.lr.ph26:                                         ; preds = %.preheader
  %24 = getelementptr inbounds i8, ptr %0, i64 568
  %25 = getelementptr inbounds i8, ptr %0, i64 80
  %26 = getelementptr inbounds i8, ptr %0, i64 104
  br label %47

27:                                               ; preds = %.lr.ph, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %27 ]
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %29 = load double, ptr %28, align 8, !tbaa !48
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #5
  %31 = load double, ptr %30, align 8, !tbaa !48
  %32 = fdiv double %31, %29
  store double %32, ptr %30, align 8, !tbaa !48
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %34 = load double, ptr %33, align 8, !tbaa !48
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv) #5
  %36 = load double, ptr %35, align 8, !tbaa !48
  %37 = fdiv double %36, %34
  store double %37, ptr %35, align 8, !tbaa !48
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %indvars.iv) #5
  %39 = load double, ptr %38, align 8, !tbaa !48
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv) #5
  %41 = load double, ptr %40, align 8, !tbaa !48
  %42 = fmul double %39, %41
  store double %42, ptr %40, align 8, !tbaa !48
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %43 = load i32, ptr %0, align 8, !tbaa !46
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv.next, %44
  br i1 %45, label %27, label %.preheader, !llvm.loop !49

._crit_edge:                                      ; preds = %47, %.preheader
  %46 = getelementptr inbounds i8, ptr %0, i64 128
  tail call void @_ZN17HighsSparseMatrix10applyScaleERK10HighsScale(ptr noundef nonnull align 8 dereferenceable(112) %46, ptr noundef nonnull align 8 dereferenceable(72) %2)
  store i8 1, ptr %3, align 8, !tbaa !5
  br label %61

47:                                               ; preds = %.lr.ph26, %47
  %indvars.iv28 = phi i64 [ 0, %.lr.ph26 ], [ %indvars.iv.next29, %47 ]
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv28) #5
  %49 = load double, ptr %48, align 8, !tbaa !48
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %indvars.iv28) #5
  %51 = load double, ptr %50, align 8, !tbaa !48
  %52 = fmul double %49, %51
  store double %52, ptr %50, align 8, !tbaa !48
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv28) #5
  %54 = load double, ptr %53, align 8, !tbaa !48
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %indvars.iv28) #5
  %56 = load double, ptr %55, align 8, !tbaa !48
  %57 = fmul double %54, %56
  store double %57, ptr %55, align 8, !tbaa !48
  %indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1
  %58 = load i32, ptr %21, align 4, !tbaa !47
  %59 = sext i32 %58 to i64
  %60 = icmp slt i64 %indvars.iv.next29, %59
  br i1 %60, label %47, label %._crit_edge, !llvm.loop !51

61:                                               ; preds = %11, %._crit_edge, %6
  ret void
}

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

declare void @_ZN17HighsSparseMatrix10applyScaleERK10HighsScale(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #3

attributes #0 = { 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 #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 = { noreturn nounwind }
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, !41, i64 592}
!6 = !{!"_ZTS7HighsLp", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 32, !10, i64 56, !10, i64 80, !10, i64 104, !15, i64 128, !21, i64 240, !22, i64 248, !23, i64 256, !23, i64 288, !7, i64 320, !7, i64 324, !26, i64 328, !26, i64 352, !30, i64 376, !34, i64 400, !34, i64 456, !7, i64 512, !7, i64 516, !40, i64 520, !41, i64 592, !41, i64 593, !7, i64 596, !41, i64 600, !42, i64 608}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIdSaIdEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTS17HighsSparseMatrix", !16, i64 0, !7, i64 4, !7, i64 8, !17, i64 16, !17, i64 40, !17, i64 64, !10, i64 88}
!16 = !{!"_ZTS12MatrixFormat", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIiSaIiEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!21 = !{!"_ZTS8ObjSense", !8, i64 0}
!22 = !{!"double", !8, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !8, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!25 = !{!"long", !8, i64 0}
!26 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!30 = !{!"_ZTSSt6vectorI12HighsVarTypeSaIS0_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseI12HighsVarTypeSaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseI12HighsVarTypeSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!34 = !{!"_ZTS13HighsNameHash", !35, i64 0}
!35 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_iEEE", !36, i64 0}
!36 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_iESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE", !14, i64 0, !25, i64 8, !37, i64 16, !25, i64 24, !38, i64 32, !14, i64 48}
!37 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !14, i64 0}
!38 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !39, i64 0, !25, i64 8}
!39 = !{!"float", !8, i64 0}
!40 = !{!"_ZTS10HighsScale", !7, i64 0, !41, i64 4, !7, i64 8, !7, i64 12, !22, i64 16, !10, i64 24, !10, i64 48}
!41 = !{!"bool", !8, i64 0}
!42 = !{!"_ZTS11HighsLpMods", !17, i64 0, !17, i64 24, !10, i64 48, !10, i64 72, !30, i64 96, !17, i64 120, !10, i64 144, !17, i64 168, !10, i64 192, !17, i64 216, !10, i64 240, !10, i64 264, !10, i64 288}
!43 = !{i8 0, i8 2}
!44 = !{}
!45 = !{!40, !41, i64 4}
!46 = !{!6, !7, i64 0}
!47 = !{!6, !7, i64 4}
!48 = !{!22, !22, i64 0}
!49 = distinct !{!49, !50}
!50 = !{!"llvm.loop.mustprogress"}
!51 = distinct !{!51, !50}


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