; LLVM IR from ERGO-Code/HiGHS :: src/util (HighsUtils)

; 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"

%struct.HighsValueDistribution = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32, i32, [4 x i8], double, double, %"class.std::vector.3", %"class.std::vector", i32, [4 x i8] }>
%"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.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 }

@.str.52 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution = external hidden unnamed_addr constant [139 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [21 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 @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: nounwind
declare double @log(double noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, double noundef %4, ptr noundef nonnull align 8 dereferenceable(148) %5) #4 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store double %2, ptr %10, align 8, !tbaa !9
  store double %3, ptr %11, align 8, !tbaa !9
  store double %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  %21 = load double, ptr %10, align 8, !tbaa !9
  %22 = fcmp ogt double %21, 0.000000e+00
  br i1 %22, label %23, label %24

23:                                               ; preds = %6
  br label %26

24:                                               ; preds = %6
  call void @__assert_fail(ptr noundef @.str.99, ptr noundef @.str.52, i32 noundef 705, ptr noundef @__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution) #5
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  %27 = load double, ptr %11, align 8, !tbaa !9
  %28 = fcmp ogt double %27, 0.000000e+00
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  br label %32

30:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str.100, ptr noundef @.str.52, i32 noundef 706, ptr noundef @__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution) #5
  unreachable

31:                                               ; No predecessors!
  br label %32

32:                                               ; preds = %31, %29
  %33 = load double, ptr %12, align 8, !tbaa !9
  %34 = fcmp ogt double %33, 1.000000e+00
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  br label %38

36:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.101, ptr noundef @.str.52, i32 noundef 707, ptr noundef @__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution) #5
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.HighsValueDistribution, ptr %39, i32 0, i32 0
  %41 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.HighsValueDistribution, ptr %42, i32 0, i32 1
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %45 = load double, ptr %10, align 8, !tbaa !9
  %46 = fcmp ole double %45, 0.000000e+00
  br i1 %46, label %47, label %48

47:                                               ; preds = %38
  store i1 false, ptr %7, align 1
  br label %126

48:                                               ; preds = %38
  %49 = load double, ptr %11, align 8, !tbaa !9
  %50 = load double, ptr %10, align 8, !tbaa !9
  %51 = fcmp olt double %49, %50
  br i1 %51, label %52, label %53

52:                                               ; preds = %48
  store i1 false, ptr %7, align 1
  br label %126

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %54 = load double, ptr %10, align 8, !tbaa !9
  %55 = load double, ptr %11, align 8, !tbaa !9
  %56 = fcmp oeq double %54, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %53
  store i32 1, ptr %14, align 4, !tbaa !11
  br label %74

58:                                               ; preds = %53
  %59 = load double, ptr %12, align 8, !tbaa !9
  %60 = fcmp ole double %59, 0.000000e+00
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  store i1 false, ptr %7, align 1
  store i32 1, ptr %15, align 4
  br label %125

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %63 = load double, ptr %11, align 8, !tbaa !9
  %64 = load double, ptr %10, align 8, !tbaa !9
  %65 = fdiv double %63, %64
  %66 = call double @log(double noundef %65) #6
  store double %66, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %67 = load double, ptr %12, align 8, !tbaa !9
  %68 = call double @log(double noundef %67) #6
  store double %68, ptr %17, align 8, !tbaa !9
  %69 = load double, ptr %16, align 8, !tbaa !9
  %70 = load double, ptr %17, align 8, !tbaa !9
  %71 = fdiv double %69, %70
  %72 = fadd double %71, 1.000000e+00
  %73 = fptosi double %72 to i32
  store i32 %73, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %74

74:                                               ; preds = %62, %57
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.HighsValueDistribution, ptr %75, i32 0, i32 9
  %77 = load i32, ptr %14, align 4, !tbaa !11
  %78 = add nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !11
  call void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %79, ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.HighsValueDistribution, ptr %80, i32 0, i32 8
  %82 = load i32, ptr %14, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  store double 0.000000e+00, ptr %19, align 8, !tbaa !9
  call void @_ZNSt6vectorIdSaIdEE6assignEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  %84 = load double, ptr %10, align 8, !tbaa !9
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.HighsValueDistribution, ptr %85, i32 0, i32 8
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %86, i64 noundef 0) #6
  store double %84, ptr %87, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 1, ptr %20, align 4, !tbaa !11
  br label %88

88:                                               ; preds = %108, %74
  %89 = load i32, ptr %20, align 4, !tbaa !11
  %90 = load i32, ptr %14, align 4, !tbaa !11
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %111

93:                                               ; preds = %88
  %94 = load double, ptr %12, align 8, !tbaa !9
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.HighsValueDistribution, ptr %95, i32 0, i32 8
  %97 = load i32, ptr %20, align 4, !tbaa !11
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %99) #6
  %101 = load double, ptr %100, align 8, !tbaa !9
  %102 = fmul double %94, %101
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.HighsValueDistribution, ptr %103, i32 0, i32 8
  %105 = load i32, ptr %20, align 4, !tbaa !11
  %106 = sext i32 %105 to i64
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %104, i64 noundef %106) #6
  store double %102, ptr %107, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %93
  %109 = load i32, ptr %20, align 4, !tbaa !11
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %20, align 4, !tbaa !11
  br label %88, !llvm.loop !13

111:                                              ; preds = %92
  %112 = load i32, ptr %14, align 4, !tbaa !11
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.HighsValueDistribution, ptr %113, i32 0, i32 2
  store i32 %112, ptr %114, align 8, !tbaa !15
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.HighsValueDistribution, ptr %115, i32 0, i32 3
  store i32 0, ptr %116, align 4, !tbaa !28
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.HighsValueDistribution, ptr %117, i32 0, i32 4
  store i32 0, ptr %118, align 8, !tbaa !29
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.HighsValueDistribution, ptr %119, i32 0, i32 6
  store double 0x7FF0000000000000, ptr %120, align 8, !tbaa !30
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.HighsValueDistribution, ptr %121, i32 0, i32 7
  store double 0.000000e+00, ptr %122, align 8, !tbaa !31
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.HighsValueDistribution, ptr %123, i32 0, i32 10
  store i32 0, ptr %124, align 8, !tbaa !32
  store i1 true, ptr %7, align 1
  store i32 1, ptr %15, align 4
  br label %125

125:                                              ; preds = %111, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %126

126:                                              ; preds = %125, %52, %47
  %127 = load i1, ptr %7, align 1
  ret i1 %127
}

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 64}
!16 = !{!"_ZTS22HighsValueDistribution", !17, i64 0, !17, i64 32, !12, i64 64, !12, i64 68, !12, i64 72, !10, i64 80, !10, i64 88, !20, i64 96, !24, i64 120, !12, i64 144}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !19, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSSt6vectorIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt6vectorIiSaIiEE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!16, !12, i64 68}
!29 = !{!16, !12, i64 72}
!30 = !{!16, !10, i64 80}
!31 = !{!16, !10, i64 88}
!32 = !{!16, !12, i64 144}


; 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.99 = external hidden unnamed_addr constant [20 x i8], align 1
@__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution = external hidden unnamed_addr constant [139 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [21 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution(ptr noundef %0, ptr noundef %1, double noundef %2, double noundef %3, double noundef %4, ptr noundef nonnull align 8 dereferenceable(148) %5) local_unnamed_addr #4 {
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = fcmp ogt double %2, 0.000000e+00
  br i1 %9, label %11, label %10

10:                                               ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.99, ptr noundef nonnull @.str.52, i32 noundef 705, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution) #5
  unreachable

11:                                               ; preds = %6
  %12 = fcmp ogt double %3, 0.000000e+00
  br i1 %12, label %14, label %13

13:                                               ; preds = %11
  tail call void @__assert_fail(ptr noundef nonnull @.str.100, ptr noundef nonnull @.str.52, i32 noundef 706, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution) #5
  unreachable

14:                                               ; preds = %11
  %15 = fcmp ogt double %4, 1.000000e+00
  br i1 %15, label %17, label %16

16:                                               ; preds = %14
  tail call void @__assert_fail(ptr noundef nonnull @.str.101, ptr noundef nonnull @.str.52, i32 noundef 707, ptr noundef nonnull @__PRETTY_FUNCTION__._Z27initialiseValueDistributionNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_dddR22HighsValueDistribution) #5
  unreachable

17:                                               ; preds = %14
  %18 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %0)
  %19 = getelementptr inbounds i8, ptr %5, i64 32
  %20 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %21 = fcmp uge double %3, %2
  br i1 %21, label %22, label %49

22:                                               ; preds = %17
  %23 = fcmp oeq double %2, %3
  br i1 %23, label %31, label %24

24:                                               ; preds = %22
  %25 = fdiv double %3, %2
  %26 = tail call double @log(double noundef %25) #6
  %27 = tail call double @log(double noundef %4) #6
  %28 = fdiv double %26, %27
  %29 = fadd double %28, 1.000000e+00
  %30 = fptosi double %29 to i32
  br label %31

31:                                               ; preds = %22, %24
  %.038 = phi i32 [ %30, %24 ], [ 1, %22 ]
  %32 = getelementptr inbounds i8, ptr %5, i64 120
  %33 = add nsw i32 %.038, 1
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE6assignEmRKi(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  %35 = getelementptr inbounds i8, ptr %5, i64 96
  %36 = sext i32 %.038 to i64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store double 0.000000e+00, ptr %8, align 8, !tbaa !9
  call void @_ZNSt6vectorIdSaIdEE6assignEmRKd(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %36, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef 0) #6
  store double %2, ptr %37, align 8, !tbaa !9
  %38 = icmp sgt i32 %.038, 1
  br i1 %38, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %31
  %wide.trip.count = zext nneg i32 %.038 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %31
  %39 = getelementptr inbounds i8, ptr %5, i64 64
  store i32 %.038, ptr %39, align 8, !tbaa !11
  %40 = getelementptr inbounds i8, ptr %5, i64 68
  store i32 0, ptr %40, align 4, !tbaa !25
  %41 = getelementptr inbounds i8, ptr %5, i64 72
  store i32 0, ptr %41, align 8, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %5, i64 80
  store <2 x double> <double 0x7FF0000000000000, double 0.000000e+00>, ptr %42, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %5, i64 144
  store i32 0, ptr %43, align 8, !tbaa !27
  br label %49

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %44 = add nsw i64 %indvars.iv, -1
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %44) #6
  %46 = load double, ptr %45, align 8, !tbaa !9
  %47 = fmul double %46, %4
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %indvars.iv) #6
  store double %47, ptr %48, align 8, !tbaa !9
  %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 !28

49:                                               ; preds = %17, %._crit_edge
  ret i1 %21
}

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

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

attributes #0 = { mustprogress 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 nofree nounwind willreturn memory(write) "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 }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 64}
!12 = !{!"_ZTS22HighsValueDistribution", !13, i64 0, !13, i64 32, !6, i64 64, !6, i64 68, !6, i64 72, !10, i64 80, !10, i64 88, !17, i64 96, !21, i64 120, !6, i64 144}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !16, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !15, i64 0}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!21 = !{!"_ZTSSt6vectorIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!25 = !{!12, !6, i64 68}
!26 = !{!12, !6, i64 72}
!27 = !{!12, !6, i64 144}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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