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

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

@.str.119 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [69 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z33computeScatterDataRegressionErrorR16HighsScatterDatab(ptr noundef nonnull align 8 dereferenceable(156) %0, i1 noundef zeroext %1) #4 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %18 = zext i1 %1 to i8
  store i8 %18, ptr %5, align 1, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.HighsScatterData, ptr %19, i32 0, i32 6
  %21 = load i8, ptr %20, align 8, !tbaa !11, !range !19, !noundef !20
  %22 = trunc i8 %21 to i1
  br i1 %22, label %24, label %23

23:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %154

24:                                               ; preds = %2
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.HighsScatterData, ptr %25, i32 0, i32 1
  %27 = load i32, ptr %26, align 4, !tbaa !21
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.HighsScatterData, ptr %28, i32 0, i32 0
  %30 = load i32, ptr %29, align 8, !tbaa !22
  %31 = icmp slt i32 %27, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %24
  store i1 false, ptr %3, align 1
  br label %154

33:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store double 0.000000e+00, ptr %6, align 8, !tbaa !23
  %34 = load i8, ptr %5, align 1, !tbaa !9, !range !19, !noundef !20
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.119)
  br label %38

38:                                               ; preds = %36, %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !24
  br label %39

39:                                               ; preds = %81, %38
  %40 = load i32, ptr %7, align 4, !tbaa !24
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.HighsScatterData, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !22
  %44 = icmp slt i32 %40, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %84

46:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.HighsScatterData, ptr %47, i32 0, i32 4
  %49 = load i32, ptr %7, align 4, !tbaa !24
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #5
  %52 = load double, ptr %51, align 8, !tbaa !23
  store double %52, ptr %8, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.HighsScatterData, ptr %53, i32 0, i32 5
  %55 = load i32, ptr %7, align 4, !tbaa !24
  %56 = sext i32 %55 to i64
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %54, i64 noundef %56) #5
  %58 = load double, ptr %57, align 8, !tbaa !23
  store double %58, ptr %9, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = load double, ptr %8, align 8, !tbaa !23
  %61 = call noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156) %59, double noundef %60, ptr noundef nonnull align 8 dereferenceable(8) %10, i1 noundef zeroext true)
  br i1 %61, label %62, label %80

62:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %63 = load double, ptr %10, align 8, !tbaa !23
  %64 = load double, ptr %9, align 8, !tbaa !23
  %65 = fsub double %63, %64
  %66 = call double @llvm.fabs.f64(double %65)
  store double %66, ptr %11, align 8, !tbaa !23
  %67 = load i8, ptr %5, align 1, !tbaa !9, !range !19, !noundef !20
  %68 = trunc i8 %67 to i1
  br i1 %68, label %69, label %76

69:                                               ; preds = %62
  %70 = load i32, ptr %7, align 4, !tbaa !24
  %71 = load double, ptr %8, align 8, !tbaa !23
  %72 = load double, ptr %9, align 8, !tbaa !23
  %73 = load double, ptr %10, align 8, !tbaa !23
  %74 = load double, ptr %11, align 8, !tbaa !23
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.120, i32 noundef %70, double noundef %71, double noundef %72, double noundef %73, double noundef %74)
  br label %76

76:                                               ; preds = %69, %62
  %77 = load double, ptr %11, align 8, !tbaa !23
  %78 = load double, ptr %6, align 8, !tbaa !23
  %79 = fadd double %78, %77
  store double %79, ptr %6, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %80

80:                                               ; preds = %76, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %7, align 4, !tbaa !24
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %7, align 4, !tbaa !24
  br label %39, !llvm.loop !25

84:                                               ; preds = %45
  %85 = load i8, ptr %5, align 1, !tbaa !9, !range !19, !noundef !20
  %86 = trunc i8 %85 to i1
  br i1 %86, label %87, label %90

87:                                               ; preds = %84
  %88 = load double, ptr %6, align 8, !tbaa !23
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.121, double noundef %88)
  br label %90

90:                                               ; preds = %87, %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store double 0.000000e+00, ptr %12, align 8, !tbaa !23
  %91 = load i8, ptr %5, align 1, !tbaa !9, !range !19, !noundef !20
  %92 = trunc i8 %91 to i1
  br i1 %92, label %93, label %95

93:                                               ; preds = %90
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str.122)
  br label %95

95:                                               ; preds = %93, %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !24
  br label %96

96:                                               ; preds = %138, %95
  %97 = load i32, ptr %13, align 4, !tbaa !24
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.HighsScatterData, ptr %98, i32 0, i32 0
  %100 = load i32, ptr %99, align 8, !tbaa !22
  %101 = icmp slt i32 %97, %100
  br i1 %101, label %103, label %102

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

103:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.HighsScatterData, ptr %104, i32 0, i32 4
  %106 = load i32, ptr %13, align 4, !tbaa !24
  %107 = sext i32 %106 to i64
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %107) #5
  %109 = load double, ptr %108, align 8, !tbaa !23
  store double %109, ptr %14, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.HighsScatterData, ptr %110, i32 0, i32 5
  %112 = load i32, ptr %13, align 4, !tbaa !24
  %113 = sext i32 %112 to i64
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %111, i64 noundef %113) #5
  %115 = load double, ptr %114, align 8, !tbaa !23
  store double %115, ptr %15, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = load double, ptr %14, align 8, !tbaa !23
  %118 = call noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156) %116, double noundef %117, ptr noundef nonnull align 8 dereferenceable(8) %16, i1 noundef zeroext false)
  br i1 %118, label %119, label %137

119:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %120 = load double, ptr %16, align 8, !tbaa !23
  %121 = load double, ptr %15, align 8, !tbaa !23
  %122 = fsub double %120, %121
  %123 = call double @llvm.fabs.f64(double %122)
  store double %123, ptr %17, align 8, !tbaa !23
  %124 = load i8, ptr %5, align 1, !tbaa !9, !range !19, !noundef !20
  %125 = trunc i8 %124 to i1
  br i1 %125, label %126, label %133

126:                                              ; preds = %119
  %127 = load i32, ptr %13, align 4, !tbaa !24
  %128 = load double, ptr %14, align 8, !tbaa !23
  %129 = load double, ptr %15, align 8, !tbaa !23
  %130 = load double, ptr %16, align 8, !tbaa !23
  %131 = load double, ptr %17, align 8, !tbaa !23
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.120, i32 noundef %127, double noundef %128, double noundef %129, double noundef %130, double noundef %131)
  br label %133

133:                                              ; preds = %126, %119
  %134 = load double, ptr %17, align 8, !tbaa !23
  %135 = load double, ptr %12, align 8, !tbaa !23
  %136 = fadd double %135, %134
  store double %136, ptr %12, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %137

137:                                              ; preds = %133, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %13, align 4, !tbaa !24
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %13, align 4, !tbaa !24
  br label %96, !llvm.loop !27

141:                                              ; preds = %102
  %142 = load i8, ptr %5, align 1, !tbaa !9, !range !19, !noundef !20
  %143 = trunc i8 %142 to i1
  br i1 %143, label %144, label %147

144:                                              ; preds = %141
  %145 = load double, ptr %12, align 8, !tbaa !23
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.121, double noundef %145)
  br label %147

147:                                              ; preds = %144, %141
  %148 = load double, ptr %6, align 8, !tbaa !23
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.HighsScatterData, ptr %149, i32 0, i32 13
  store double %148, ptr %150, align 8, !tbaa !28
  %151 = load double, ptr %12, align 8, !tbaa !23
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.HighsScatterData, ptr %152, i32 0, i32 10
  store double %151, ptr %153, align 8, !tbaa !29
  store i1 true, ptr %3, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %154

154:                                              ; preds = %147, %32, %23
  %155 = load i1, ptr %3, align 1
  ret i1 %155
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156), double noundef, ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !10, i64 64}
!12 = !{!"_ZTS16HighsScatterData", !13, i64 0, !13, i64 4, !13, i64 8, !14, i64 16, !14, i64 40, !10, i64 64, !18, i64 72, !18, i64 80, !18, i64 88, !18, i64 96, !18, i64 104, !18, i64 112, !13, i64 120, !13, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148, !13, i64 152}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIdSaIdEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"double", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!12, !13, i64 4}
!22 = !{!12, !13, i64 0}
!23 = !{!18, !18, i64 0}
!24 = !{!13, !13, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = !{!12, !18, i64 112}
!29 = !{!12, !18, i64 88}


; 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.119 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.120 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [69 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 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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #3

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_Z33computeScatterDataRegressionErrorR16HighsScatterDatab(ptr noundef nonnull align 8 dereferenceable(156) %0, i1 noundef zeroext %1) local_unnamed_addr #1 {
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 64
  %6 = load i8, ptr %5, align 8, !tbaa !5, !range !17, !noundef !18
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %8, label %94

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %0, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !19
  %11 = load i32, ptr %0, align 8, !tbaa !20
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %94, label %13

13:                                               ; preds = %8
  br i1 %1, label %14, label %.thread

14:                                               ; preds = %13
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.119)
  %.pre = load i32, ptr %0, align 8, !tbaa !20
  %16 = icmp sgt i32 %.pre, 0
  br i1 %16, label %.lr.ph.split.us.preheader, label %.critedge

.thread:                                          ; preds = %13
  %17 = icmp sgt i32 %11, 0
  br i1 %17, label %.lr.ph.split.preheader, label %._crit_edge59.thread

.lr.ph.split.preheader:                           ; preds = %.thread
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = getelementptr inbounds i8, ptr %0, i64 40
  br label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %14
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader, %34
  %indvars.iv65 = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %indvars.iv.next66, %34 ]
  %.04754.us = phi double [ 0.000000e+00, %.lr.ph.split.us.preheader ], [ %.1.us, %34 ]
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv65) #4
  %23 = load double, ptr %22, align 8, !tbaa !21
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv65) #4
  %25 = load double, ptr %24, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %26 = call noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156) %0, double noundef %23, ptr noundef nonnull align 8 dereferenceable(8) %3, i1 noundef zeroext true)
  br i1 %26, label %27, label %34

27:                                               ; preds = %.lr.ph.split.us
  %28 = load double, ptr %3, align 8, !tbaa !21
  %29 = fsub double %28, %25
  %30 = call double @llvm.fabs.f64(double %29)
  %31 = trunc nuw nsw i64 %indvars.iv65 to i32
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, i32 noundef %31, double noundef %23, double noundef %25, double noundef %28, double noundef %30)
  %33 = fadd double %.04754.us, %30
  br label %34

34:                                               ; preds = %27, %.lr.ph.split.us
  %.1.us = phi double [ %33, %27 ], [ %.04754.us, %.lr.ph.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %35 = load i32, ptr %0, align 8, !tbaa !20
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next66, %36
  br i1 %37, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %49, %34
  %38 = phi i32 [ %35, %34 ], [ %50, %49 ]
  %.047.lcssa = phi double [ %.1.us, %34 ], [ %.1, %49 ]
  br i1 %1, label %.critedge, label %.critedge.thread79

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %49
  %indvars.iv = phi i64 [ 0, %.lr.ph.split.preheader ], [ %indvars.iv.next, %49 ]
  %.04754 = phi double [ 0.000000e+00, %.lr.ph.split.preheader ], [ %.1, %49 ]
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv) #4
  %40 = load double, ptr %39, align 8, !tbaa !21
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %indvars.iv) #4
  %42 = load double, ptr %41, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %43 = call noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156) %0, double noundef %40, ptr noundef nonnull align 8 dereferenceable(8) %3, i1 noundef zeroext true)
  br i1 %43, label %44, label %49

44:                                               ; preds = %.lr.ph.split
  %45 = load double, ptr %3, align 8, !tbaa !21
  %46 = fsub double %45, %42
  %47 = call double @llvm.fabs.f64(double %46)
  %48 = fadd double %.04754, %47
  br label %49

49:                                               ; preds = %44, %.lr.ph.split
  %.1 = phi double [ %48, %44 ], [ %.04754, %.lr.ph.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = load i32, ptr %0, align 8, !tbaa !20
  %51 = sext i32 %50 to i64
  %52 = icmp slt i64 %indvars.iv.next, %51
  br i1 %52, label %.lr.ph.split, label %._crit_edge, !llvm.loop !22

.critedge:                                        ; preds = %14, %._crit_edge
  %.047.lcssa88 = phi double [ %.047.lcssa, %._crit_edge ], [ 0.000000e+00, %14 ]
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.121, double noundef %.047.lcssa88)
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.122)
  %.pre74 = load i32, ptr %0, align 8, !tbaa !20
  %55 = icmp sgt i32 %.pre74, 0
  br i1 %55, label %.lr.ph58.split.us.preheader, label %._crit_edge59.thread90

.critedge.thread79:                               ; preds = %._crit_edge
  %56 = icmp sgt i32 %38, 0
  br i1 %56, label %.lr.ph58.split.preheader, label %._crit_edge59.thread

.lr.ph58.split.preheader:                         ; preds = %.critedge.thread79
  %57 = getelementptr inbounds i8, ptr %0, i64 16
  %58 = getelementptr inbounds i8, ptr %0, i64 40
  br label %.lr.ph58.split

.lr.ph58.split.us.preheader:                      ; preds = %.critedge
  %59 = getelementptr inbounds i8, ptr %0, i64 16
  %60 = getelementptr inbounds i8, ptr %0, i64 40
  br label %.lr.ph58.split.us

.lr.ph58.split.us:                                ; preds = %.lr.ph58.split.us.preheader, %73
  %indvars.iv71 = phi i64 [ 0, %.lr.ph58.split.us.preheader ], [ %indvars.iv.next72, %73 ]
  %.05055.us = phi double [ 0.000000e+00, %.lr.ph58.split.us.preheader ], [ %.151.us, %73 ]
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %indvars.iv71) #4
  %62 = load double, ptr %61, align 8, !tbaa !21
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %indvars.iv71) #4
  %64 = load double, ptr %63, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %65 = call noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156) %0, double noundef %62, ptr noundef nonnull align 8 dereferenceable(8) %4, i1 noundef zeroext false)
  br i1 %65, label %66, label %73

66:                                               ; preds = %.lr.ph58.split.us
  %67 = load double, ptr %4, align 8, !tbaa !21
  %68 = fsub double %67, %64
  %69 = call double @llvm.fabs.f64(double %68)
  %70 = trunc nuw nsw i64 %indvars.iv71 to i32
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.120, i32 noundef %70, double noundef %62, double noundef %64, double noundef %67, double noundef %69)
  %72 = fadd double %.05055.us, %69
  br label %73

73:                                               ; preds = %66, %.lr.ph58.split.us
  %.151.us = phi double [ %72, %66 ], [ %.05055.us, %.lr.ph58.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %74 = load i32, ptr %0, align 8, !tbaa !20
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next72, %75
  br i1 %76, label %.lr.ph58.split.us, label %._crit_edge59, !llvm.loop !24

._crit_edge59:                                    ; preds = %87, %73
  %.047.lcssa7678 = phi double [ %.047.lcssa88, %73 ], [ %.047.lcssa, %87 ]
  %.050.lcssa = phi double [ %.151.us, %73 ], [ %.151, %87 ]
  br i1 %1, label %._crit_edge59.thread90, label %._crit_edge59.thread

.lr.ph58.split:                                   ; preds = %.lr.ph58.split.preheader, %87
  %indvars.iv68 = phi i64 [ 0, %.lr.ph58.split.preheader ], [ %indvars.iv.next69, %87 ]
  %.05055 = phi double [ 0.000000e+00, %.lr.ph58.split.preheader ], [ %.151, %87 ]
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %indvars.iv68) #4
  %78 = load double, ptr %77, align 8, !tbaa !21
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %indvars.iv68) #4
  %80 = load double, ptr %79, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %81 = call noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156) %0, double noundef %78, ptr noundef nonnull align 8 dereferenceable(8) %4, i1 noundef zeroext false)
  br i1 %81, label %82, label %87

82:                                               ; preds = %.lr.ph58.split
  %83 = load double, ptr %4, align 8, !tbaa !21
  %84 = fsub double %83, %80
  %85 = call double @llvm.fabs.f64(double %84)
  %86 = fadd double %.05055, %85
  br label %87

87:                                               ; preds = %82, %.lr.ph58.split
  %.151 = phi double [ %86, %82 ], [ %.05055, %.lr.ph58.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %88 = load i32, ptr %0, align 8, !tbaa !20
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next69, %89
  br i1 %90, label %.lr.ph58.split, label %._crit_edge59, !llvm.loop !24

._crit_edge59.thread90:                           ; preds = %.critedge, %._crit_edge59
  %.050.lcssa94 = phi double [ %.050.lcssa, %._crit_edge59 ], [ 0.000000e+00, %.critedge ]
  %.047.lcssa767893 = phi double [ %.047.lcssa7678, %._crit_edge59 ], [ %.047.lcssa88, %.critedge ]
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.121, double noundef %.050.lcssa94)
  br label %._crit_edge59.thread

._crit_edge59.thread:                             ; preds = %.thread, %.critedge.thread79, %._crit_edge59.thread90, %._crit_edge59
  %.050.lcssa85 = phi double [ %.050.lcssa94, %._crit_edge59.thread90 ], [ %.050.lcssa, %._crit_edge59 ], [ 0.000000e+00, %.critedge.thread79 ], [ 0.000000e+00, %.thread ]
  %.047.lcssa767884 = phi double [ %.047.lcssa767893, %._crit_edge59.thread90 ], [ %.047.lcssa7678, %._crit_edge59 ], [ %.047.lcssa, %.critedge.thread79 ], [ 0.000000e+00, %.thread ]
  %92 = getelementptr inbounds i8, ptr %0, i64 112
  store double %.047.lcssa767884, ptr %92, align 8, !tbaa !25
  %93 = getelementptr inbounds i8, ptr %0, i64 88
  store double %.050.lcssa85, ptr %93, align 8, !tbaa !26
  br label %94

94:                                               ; preds = %8, %2, %._crit_edge59.thread
  %.0 = phi i1 [ true, %._crit_edge59.thread ], [ false, %2 ], [ false, %8 ]
  ret i1 %.0
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z22predictFromScatterDataRK16HighsScatterDatadRdb(ptr noundef nonnull align 8 dereferenceable(156), double noundef, ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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, !15, i64 64}
!6 = !{!"_ZTS16HighsScatterData", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 40, !15, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !7, i64 152}
!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 = !{!"bool", !8, i64 0}
!16 = !{!"double", !8, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!6, !7, i64 4}
!20 = !{!6, !7, i64 0}
!21 = !{!16, !16, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!6, !16, i64 112}
!26 = !{!6, !16, i64 88}


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