; LLVM IR from softmin/ReHLine-SVM :: liblinear (linear)

; 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.model = type { %struct.parameter, i32, i32, ptr, ptr, double, double }
%struct.parameter = type { i32, double, double, i32, ptr, ptr, double, double, ptr, i32 }
%struct.feature_node = type { i32, double }

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @check_regression_model(ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @check_oneclass_model(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local double @predict_values(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.model, ptr %17, i32 0, i32 5
  %19 = load double, ptr %18, align 8, !tbaa !9
  %20 = fcmp oge double %19, 0.000000e+00
  br i1 %20, label %21, label %26

21:                                               ; preds = %3
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.model, ptr %22, i32 0, i32 2
  %24 = load i32, ptr %23, align 4, !tbaa !14
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %9, align 4, !tbaa !15
  br label %30

26:                                               ; preds = %3
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.model, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 4, !tbaa !14
  store i32 %29, ptr %9, align 4, !tbaa !15
  br label %30

30:                                               ; preds = %26, %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.model, ptr %31, i32 0, i32 3
  %33 = load ptr, ptr %32, align 8, !tbaa !16
  store ptr %33, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.model, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 8, !tbaa !17
  store i32 %36, ptr %11, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %37 = load i32, ptr %11, align 4, !tbaa !15
  %38 = icmp eq i32 %37, 2
  br i1 %38, label %39, label %46

39:                                               ; preds = %30
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.model, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds %struct.parameter, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !18
  %44 = icmp ne i32 %43, 4
  br i1 %44, label %45, label %46

45:                                               ; preds = %39
  store i32 1, ptr %13, align 4, !tbaa !15
  br label %48

46:                                               ; preds = %39, %30
  %47 = load i32, ptr %11, align 4, !tbaa !15
  store i32 %47, ptr %13, align 4, !tbaa !15
  br label %48

48:                                               ; preds = %46, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %49, ptr %14, align 8, !tbaa !5
  store i32 0, ptr %12, align 4, !tbaa !15
  br label %50

50:                                               ; preds = %59, %48
  %51 = load i32, ptr %12, align 4, !tbaa !15
  %52 = load i32, ptr %13, align 4, !tbaa !15
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %54, label %62

54:                                               ; preds = %50
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load i32, ptr %12, align 4, !tbaa !15
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %55, i64 %57
  store double 0.000000e+00, ptr %58, align 8, !tbaa !19
  br label %59

59:                                               ; preds = %54
  %60 = load i32, ptr %12, align 4, !tbaa !15
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %12, align 4, !tbaa !15
  br label %50, !llvm.loop !20

62:                                               ; preds = %50
  br label %63

63:                                               ; preds = %102, %62
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.feature_node, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !22
  store i32 %66, ptr %8, align 4, !tbaa !15
  %67 = icmp ne i32 %66, -1
  br i1 %67, label %68, label %105

68:                                               ; preds = %63
  %69 = load i32, ptr %8, align 4, !tbaa !15
  %70 = load i32, ptr %9, align 4, !tbaa !15
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %72, label %101

72:                                               ; preds = %68
  store i32 0, ptr %12, align 4, !tbaa !15
  br label %73

73:                                               ; preds = %97, %72
  %74 = load i32, ptr %12, align 4, !tbaa !15
  %75 = load i32, ptr %13, align 4, !tbaa !15
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %77, label %100

77:                                               ; preds = %73
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load i32, ptr %8, align 4, !tbaa !15
  %80 = sub nsw i32 %79, 1
  %81 = load i32, ptr %13, align 4, !tbaa !15
  %82 = mul nsw i32 %80, %81
  %83 = load i32, ptr %12, align 4, !tbaa !15
  %84 = add nsw i32 %82, %83
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %78, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !19
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.feature_node, ptr %88, i32 0, i32 1
  %90 = load double, ptr %89, align 8, !tbaa !24
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load i32, ptr %12, align 4, !tbaa !15
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %91, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !19
  %96 = call double @llvm.fmuladd.f64(double %87, double %90, double %95)
  store double %96, ptr %94, align 8, !tbaa !19
  br label %97

97:                                               ; preds = %77
  %98 = load i32, ptr %12, align 4, !tbaa !15
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %12, align 4, !tbaa !15
  br label %73, !llvm.loop !25

100:                                              ; preds = %73
  br label %101

101:                                              ; preds = %100, %68
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.feature_node, ptr %103, i32 1
  store ptr %104, ptr %14, align 8, !tbaa !5
  br label %63, !llvm.loop !26

105:                                              ; preds = %63
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = call i32 @check_oneclass_model(ptr noundef %106)
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %117

109:                                              ; preds = %105
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.model, ptr %110, i32 0, i32 6
  %112 = load double, ptr %111, align 8, !tbaa !27
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = getelementptr inbounds double, ptr %113, i64 0
  %115 = load double, ptr %114, align 8, !tbaa !19
  %116 = fsub double %115, %112
  store double %116, ptr %114, align 8, !tbaa !19
  br label %117

117:                                              ; preds = %109, %105
  %118 = load i32, ptr %11, align 4, !tbaa !15
  %119 = icmp eq i32 %118, 2
  br i1 %119, label %120, label %160

120:                                              ; preds = %117
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = call i32 @check_regression_model(ptr noundef %121)
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %128

124:                                              ; preds = %120
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = getelementptr inbounds double, ptr %125, i64 0
  %127 = load double, ptr %126, align 8, !tbaa !19
  store double %127, ptr %4, align 8
  store i32 1, ptr %15, align 4
  br label %192

128:                                              ; preds = %120
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = call i32 @check_oneclass_model(ptr noundef %129)
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %140

132:                                              ; preds = %128
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds double, ptr %133, i64 0
  %135 = load double, ptr %134, align 8, !tbaa !19
  %136 = fcmp ogt double %135, 0.000000e+00
  %137 = zext i1 %136 to i64
  %138 = select i1 %136, i32 1, i32 -1
  %139 = sitofp i32 %138 to double
  store double %139, ptr %4, align 8
  store i32 1, ptr %15, align 4
  br label %192

140:                                              ; preds = %128
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds double, ptr %141, i64 0
  %143 = load double, ptr %142, align 8, !tbaa !19
  %144 = fcmp ogt double %143, 0.000000e+00
  br i1 %144, label %145, label %151

145:                                              ; preds = %140
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.model, ptr %146, i32 0, i32 4
  %148 = load ptr, ptr %147, align 8, !tbaa !28
  %149 = getelementptr inbounds i32, ptr %148, i64 0
  %150 = load i32, ptr %149, align 4, !tbaa !15
  br label %157

151:                                              ; preds = %140
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.model, ptr %152, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !28
  %155 = getelementptr inbounds i32, ptr %154, i64 1
  %156 = load i32, ptr %155, align 4, !tbaa !15
  br label %157

157:                                              ; preds = %151, %145
  %158 = phi i32 [ %150, %145 ], [ %156, %151 ]
  %159 = sitofp i32 %158 to double
  store double %159, ptr %4, align 8
  store i32 1, ptr %15, align 4
  br label %192

160:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !15
  store i32 1, ptr %12, align 4, !tbaa !15
  br label %161

161:                                              ; preds = %180, %160
  %162 = load i32, ptr %12, align 4, !tbaa !15
  %163 = load i32, ptr %11, align 4, !tbaa !15
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %165, label %183

165:                                              ; preds = %161
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  %167 = load i32, ptr %12, align 4, !tbaa !15
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds double, ptr %166, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !19
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = load i32, ptr %16, align 4, !tbaa !15
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds double, ptr %171, i64 %173
  %175 = load double, ptr %174, align 8, !tbaa !19
  %176 = fcmp ogt double %170, %175
  br i1 %176, label %177, label %179

177:                                              ; preds = %165
  %178 = load i32, ptr %12, align 4, !tbaa !15
  store i32 %178, ptr %16, align 4, !tbaa !15
  br label %179

179:                                              ; preds = %177, %165
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %12, align 4, !tbaa !15
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %12, align 4, !tbaa !15
  br label %161, !llvm.loop !29

183:                                              ; preds = %161
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.model, ptr %184, i32 0, i32 4
  %186 = load ptr, ptr %185, align 8, !tbaa !28
  %187 = load i32, ptr %16, align 4, !tbaa !15
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds i32, ptr %186, i64 %188
  %190 = load i32, ptr %189, align 4, !tbaa !15
  %191 = sitofp i32 %190 to double
  store double %191, ptr %4, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %192

192:                                              ; preds = %183, %157, %132, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  %193 = load double, ptr %4, align 8
  ret double %193
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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, !13, i64 104}
!10 = !{!"_ZTS5model", !11, i64 0, !12, i64 80, !12, i64 84, !6, i64 88, !6, i64 96, !13, i64 104, !13, i64 112}
!11 = !{!"_ZTS9parameter", !12, i64 0, !13, i64 8, !13, i64 16, !12, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !13, i64 56, !6, i64 64, !12, i64 72}
!12 = !{!"int", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!10, !12, i64 84}
!15 = !{!12, !12, i64 0}
!16 = !{!10, !6, i64 88}
!17 = !{!10, !12, i64 80}
!18 = !{!10, !12, i64 0}
!19 = !{!13, !13, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !12, i64 0}
!23 = !{!"_ZTS12feature_node", !12, i64 0, !13, i64 8}
!24 = !{!23, !13, i64 8}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}
!27 = !{!10, !13, i64 112}
!28 = !{!10, !6, i64 96}
!29 = distinct !{!29, !21}


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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @check_regression_model(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @check_oneclass_model(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local double @predict_values(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 104
  %5 = load double, ptr %4, align 8, !tbaa !5
  %6 = fcmp oge double %5, 0.000000e+00
  %7 = getelementptr inbounds i8, ptr %0, i64 84
  %8 = load i32, ptr %7, align 4, !tbaa !13
  %9 = zext i1 %6 to i32
  %.054 = add nsw i32 %8, %9
  %10 = getelementptr inbounds i8, ptr %0, i64 88
  %11 = load ptr, ptr %10, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %0, i64 80
  %13 = load i32, ptr %12, align 8, !tbaa !15
  %14 = freeze i32 %13
  %15 = icmp eq i32 %14, 2
  br i1 %15, label %16, label %18

16:                                               ; preds = %3
  %17 = load i32, ptr %0, align 8, !tbaa !16
  %.not = icmp eq i32 %17, 4
  %spec.select = select i1 %.not, i32 2, i32 1
  br label %.lr.ph.preheader

18:                                               ; preds = %3
  %19 = icmp sgt i32 %14, 0
  br i1 %19, label %.lr.ph.preheader, label %.preheader63

.lr.ph.preheader:                                 ; preds = %16, %18
  %.05085 = phi i32 [ %14, %18 ], [ %spec.select, %16 ]
  %20 = zext nneg i32 %.05085 to i64
  %21 = shl nuw nsw i64 %20, 3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %2, i8 0, i64 %21, i1 false), !tbaa !17
  br label %.preheader63

.preheader63:                                     ; preds = %.lr.ph.preheader, %18
  %.not87 = phi i1 [ false, %.lr.ph.preheader ], [ true, %18 ]
  %.05084 = phi i32 [ %.05085, %.lr.ph.preheader ], [ %14, %18 ]
  %22 = load i32, ptr %1, align 8, !tbaa !18
  %.not5767 = icmp eq i32 %22, -1
  %brmerge = or i1 %.not5767, %.not87
  br i1 %brmerge, label %._crit_edge, label %.lr.ph70.split.us.preheader

.lr.ph70.split.us.preheader:                      ; preds = %.preheader63
  %wide.trip.count = zext i32 %.05084 to i64
  %23 = shl nuw nsw i64 %wide.trip.count, 3
  %scevgep = getelementptr i8, ptr %2, i64 %23
  %scevgep88 = getelementptr i8, ptr %11, i64 %23
  %invariant.gep103 = getelementptr i8, ptr %1, i64 16
  %min.iters.check = icmp ult i32 %.05084, 4
  %n.vec = and i64 %wide.trip.count, 4294967292
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %24 = add nsw i64 %wide.trip.count, -1
  br label %.lr.ph70.split.us

.lr.ph70.split.us:                                ; preds = %.lr.ph70.split.us.preheader, %..loopexit_crit_edge.us
  %indvar = phi i64 [ 0, %.lr.ph70.split.us.preheader ], [ %indvar.next, %..loopexit_crit_edge.us ]
  %25 = phi i32 [ %22, %.lr.ph70.split.us.preheader ], [ %39, %..loopexit_crit_edge.us ]
  %.04968.us = phi ptr [ %1, %.lr.ph70.split.us.preheader ], [ %38, %..loopexit_crit_edge.us ]
  %26 = shl i64 %indvar, 4
  %27 = or disjoint i64 %26, 8
  %scevgep90 = getelementptr i8, ptr %1, i64 %27
  %gep104 = getelementptr i8, ptr %invariant.gep103, i64 %26
  %.not61.us = icmp sgt i32 %25, %.054
  br i1 %.not61.us, label %..loopexit_crit_edge.us, label %.preheader62.us

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %gep = getelementptr double, ptr %invariant.gep, i64 %indvars.iv
  %28 = load double, ptr %gep, align 8, !tbaa !17
  %29 = load double, ptr %42, align 8, !tbaa !20
  %30 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  %31 = load double, ptr %30, align 8, !tbaa !17
  %32 = tail call double @llvm.fmuladd.f64(double %28, double %29, double %31)
  store double %32, ptr %30, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %gep.1 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next
  %33 = load double, ptr %gep.1, align 8, !tbaa !17
  %34 = load double, ptr %42, align 8, !tbaa !20
  %35 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next
  %36 = load double, ptr %35, align 8, !tbaa !17
  %37 = tail call double @llvm.fmuladd.f64(double %33, double %34, double %36)
  store double %37, ptr %35, align 8, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %..loopexit_crit_edge.us, label %scalar.ph, !llvm.loop !21

..loopexit_crit_edge.us:                          ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %.lr.ph70.split.us
  %38 = getelementptr inbounds i8, ptr %.04968.us, i64 16
  %39 = load i32, ptr %38, align 8, !tbaa !18
  %.not57.us = icmp eq i32 %39, -1
  %indvar.next = add i64 %indvar, 1
  br i1 %.not57.us, label %._crit_edge, label %.lr.ph70.split.us, !llvm.loop !24

.preheader62.us:                                  ; preds = %.lr.ph70.split.us
  %40 = add nsw i32 %25, -1
  %41 = mul nsw i32 %40, %.05084
  %42 = getelementptr inbounds i8, ptr %.04968.us, i64 8
  %43 = sext i32 %41 to i64
  %invariant.gep = getelementptr double, ptr %11, i64 %43
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader62.us
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.preheader62.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %gep.prol = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.ph
  %44 = load double, ptr %gep.prol, align 8, !tbaa !17
  %45 = load double, ptr %42, align 8, !tbaa !20
  %46 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.ph
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = tail call double @llvm.fmuladd.f64(double %44, double %45, double %47)
  store double %48, ptr %46, align 8, !tbaa !17
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %49 = icmp eq i64 %indvars.iv.ph, %24
  br i1 %49, label %..loopexit_crit_edge.us, label %scalar.ph

vector.memcheck:                                  ; preds = %.preheader62.us
  %50 = shl nsw i64 %43, 3
  %scevgep89 = getelementptr i8, ptr %scevgep88, i64 %50
  %bound0 = icmp ugt ptr %scevgep89, %2
  %bound1 = icmp ult ptr %invariant.gep, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound092 = icmp ugt ptr %gep104, %2
  %bound193 = icmp ult ptr %scevgep90, %scevgep
  %found.conflict94 = and i1 %bound092, %bound193
  %conflict.rdx = or i1 %found.conflict, %found.conflict94
  br i1 %conflict.rdx, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %51 = load double, ptr %42, align 8, !tbaa !20, !alias.scope !25
  %broadcast.splatinsert98 = insertelement <2 x double> poison, double %51, i64 0
  %broadcast.splat99 = shufflevector <2 x double> %broadcast.splatinsert98, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %52 = getelementptr double, ptr %invariant.gep, i64 %index
  %53 = getelementptr i8, ptr %52, i64 16
  %wide.load = load <2 x double>, ptr %52, align 8, !tbaa !17, !alias.scope !28
  %wide.load95 = load <2 x double>, ptr %53, align 8, !tbaa !17, !alias.scope !28
  %54 = getelementptr inbounds double, ptr %2, i64 %index
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %wide.load96 = load <2 x double>, ptr %54, align 8, !tbaa !17, !alias.scope !30, !noalias !32
  %wide.load97 = load <2 x double>, ptr %55, align 8, !tbaa !17, !alias.scope !30, !noalias !32
  %56 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat99, <2 x double> %wide.load96)
  %57 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load95, <2 x double> %broadcast.splat99, <2 x double> %wide.load97)
  store <2 x double> %56, ptr %54, align 8, !tbaa !17, !alias.scope !30, !noalias !32
  store <2 x double> %57, ptr %55, align 8, !tbaa !17, !alias.scope !30, !noalias !32
  %index.next = add nuw i64 %index, 4
  %58 = icmp eq i64 %index.next, %n.vec
  br i1 %58, label %middle.block, label %vector.body, !llvm.loop !33

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %..loopexit_crit_edge.us, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %..loopexit_crit_edge.us, %.preheader63
  %59 = tail call i32 @check_oneclass_model(ptr noundef %0)
  %.not58 = icmp eq i32 %59, 0
  br i1 %.not58, label %65, label %60

60:                                               ; preds = %._crit_edge
  %61 = getelementptr inbounds i8, ptr %0, i64 112
  %62 = load double, ptr %61, align 8, !tbaa !35
  %63 = load double, ptr %2, align 8, !tbaa !17
  %64 = fsub double %63, %62
  store double %64, ptr %2, align 8, !tbaa !17
  br label %65

65:                                               ; preds = %60, %._crit_edge
  br i1 %15, label %70, label %.preheader

.preheader:                                       ; preds = %65
  %66 = icmp sgt i32 %14, 1
  br i1 %66, label %.lr.ph73.preheader, label %._crit_edge74

.lr.ph73.preheader:                               ; preds = %.preheader
  %wide.trip.count81 = zext nneg i32 %14 to i64
  %67 = add nsw i64 %wide.trip.count81, -1
  %68 = add nsw i64 %wide.trip.count81, -2
  %xtraiter100 = and i64 %67, 3
  %69 = icmp ult i64 %68, 3
  br i1 %69, label %._crit_edge74.loopexit.unr-lcssa, label %.lr.ph73.preheader.new

.lr.ph73.preheader.new:                           ; preds = %.lr.ph73.preheader
  %unroll_iter = and i64 %67, -4
  br label %.lr.ph73

70:                                               ; preds = %65
  %71 = tail call i32 @check_regression_model(ptr noundef %0)
  %.not59 = icmp eq i32 %71, 0
  br i1 %.not59, label %74, label %72

72:                                               ; preds = %70
  %73 = load double, ptr %2, align 8, !tbaa !17
  br label %126

74:                                               ; preds = %70
  %75 = tail call i32 @check_oneclass_model(ptr noundef %0)
  %.not60 = icmp eq i32 %75, 0
  %76 = load double, ptr %2, align 8, !tbaa !17
  %77 = fcmp ogt double %76, 0.000000e+00
  br i1 %.not60, label %80, label %78

78:                                               ; preds = %74
  %79 = select i1 %77, double 1.000000e+00, double -1.000000e+00
  br label %126

80:                                               ; preds = %74
  %81 = getelementptr inbounds i8, ptr %0, i64 96
  %82 = load ptr, ptr %81, align 8, !tbaa !36
  %.in.idx = select i1 %77, i64 0, i64 4
  %.in = getelementptr inbounds i8, ptr %82, i64 %.in.idx
  %83 = load i32, ptr %.in, align 4, !tbaa !37
  %84 = sitofp i32 %83 to double
  br label %126

.lr.ph73:                                         ; preds = %.lr.ph73, %.lr.ph73.preheader.new
  %indvars.iv78 = phi i64 [ 1, %.lr.ph73.preheader.new ], [ %indvars.iv.next79.3, %.lr.ph73 ]
  %.072 = phi i32 [ 0, %.lr.ph73.preheader.new ], [ %.1.3, %.lr.ph73 ]
  %niter = phi i64 [ 0, %.lr.ph73.preheader.new ], [ %niter.next.3, %.lr.ph73 ]
  %85 = getelementptr inbounds double, ptr %2, i64 %indvars.iv78
  %86 = load double, ptr %85, align 8, !tbaa !17
  %87 = sext i32 %.072 to i64
  %88 = getelementptr inbounds double, ptr %2, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !17
  %90 = fcmp ogt double %86, %89
  %91 = trunc nuw nsw i64 %indvars.iv78 to i32
  %.1 = select i1 %90, i32 %91, i32 %.072
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %92 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next79
  %93 = load double, ptr %92, align 8, !tbaa !17
  %94 = sext i32 %.1 to i64
  %95 = getelementptr inbounds double, ptr %2, i64 %94
  %96 = load double, ptr %95, align 8, !tbaa !17
  %97 = fcmp ogt double %93, %96
  %98 = trunc nuw nsw i64 %indvars.iv.next79 to i32
  %.1.1 = select i1 %97, i32 %98, i32 %.1
  %indvars.iv.next79.1 = add nuw nsw i64 %indvars.iv78, 2
  %99 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next79.1
  %100 = load double, ptr %99, align 8, !tbaa !17
  %101 = sext i32 %.1.1 to i64
  %102 = getelementptr inbounds double, ptr %2, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !17
  %104 = fcmp ogt double %100, %103
  %105 = trunc nuw nsw i64 %indvars.iv.next79.1 to i32
  %.1.2 = select i1 %104, i32 %105, i32 %.1.1
  %indvars.iv.next79.2 = add nuw nsw i64 %indvars.iv78, 3
  %106 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next79.2
  %107 = load double, ptr %106, align 8, !tbaa !17
  %108 = sext i32 %.1.2 to i64
  %109 = getelementptr inbounds double, ptr %2, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !17
  %111 = fcmp ogt double %107, %110
  %112 = trunc nuw nsw i64 %indvars.iv.next79.2 to i32
  %.1.3 = select i1 %111, i32 %112, i32 %.1.2
  %indvars.iv.next79.3 = add nuw nsw i64 %indvars.iv78, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge74.loopexit.unr-lcssa, label %.lr.ph73, !llvm.loop !38

._crit_edge74.loopexit.unr-lcssa:                 ; preds = %.lr.ph73, %.lr.ph73.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph73.preheader ], [ %.1.3, %.lr.ph73 ]
  %indvars.iv78.unr = phi i64 [ 1, %.lr.ph73.preheader ], [ %indvars.iv.next79.3, %.lr.ph73 ]
  %.072.unr = phi i32 [ 0, %.lr.ph73.preheader ], [ %.1.3, %.lr.ph73 ]
  %lcmp.mod101.not = icmp eq i64 %xtraiter100, 0
  br i1 %lcmp.mod101.not, label %._crit_edge74.loopexit, label %.lr.ph73.epil

.lr.ph73.epil:                                    ; preds = %._crit_edge74.loopexit.unr-lcssa, %.lr.ph73.epil
  %indvars.iv78.epil = phi i64 [ %indvars.iv.next79.epil, %.lr.ph73.epil ], [ %indvars.iv78.unr, %._crit_edge74.loopexit.unr-lcssa ]
  %.072.epil = phi i32 [ %.1.epil, %.lr.ph73.epil ], [ %.072.unr, %._crit_edge74.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph73.epil ], [ 0, %._crit_edge74.loopexit.unr-lcssa ]
  %113 = getelementptr inbounds double, ptr %2, i64 %indvars.iv78.epil
  %114 = load double, ptr %113, align 8, !tbaa !17
  %115 = sext i32 %.072.epil to i64
  %116 = getelementptr inbounds double, ptr %2, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !17
  %118 = fcmp ogt double %114, %117
  %119 = trunc nuw nsw i64 %indvars.iv78.epil to i32
  %.1.epil = select i1 %118, i32 %119, i32 %.072.epil
  %indvars.iv.next79.epil = add nuw nsw i64 %indvars.iv78.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter100
  br i1 %epil.iter.cmp.not, label %._crit_edge74.loopexit, label %.lr.ph73.epil, !llvm.loop !39

._crit_edge74.loopexit:                           ; preds = %.lr.ph73.epil, %._crit_edge74.loopexit.unr-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge74.loopexit.unr-lcssa ], [ %.1.epil, %.lr.ph73.epil ]
  %120 = sext i32 %.1.lcssa to i64
  br label %._crit_edge74

._crit_edge74:                                    ; preds = %._crit_edge74.loopexit, %.preheader
  %.0.lcssa = phi i64 [ 0, %.preheader ], [ %120, %._crit_edge74.loopexit ]
  %121 = getelementptr inbounds i8, ptr %0, i64 96
  %122 = load ptr, ptr %121, align 8, !tbaa !36
  %123 = getelementptr inbounds i32, ptr %122, i64 %.0.lcssa
  %124 = load i32, ptr %123, align 4, !tbaa !37
  %125 = sitofp i32 %124 to double
  br label %126

126:                                              ; preds = %._crit_edge74, %80, %78, %72
  %.053 = phi double [ %73, %72 ], [ %79, %78 ], [ %84, %80 ], [ %125, %._crit_edge74 ]
  ret double %.053
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !11, i64 104}
!6 = !{!"_ZTS5model", !7, i64 0, !8, i64 80, !8, i64 84, !12, i64 88, !12, i64 96, !11, i64 104, !11, i64 112}
!7 = !{!"_ZTS9parameter", !8, i64 0, !11, i64 8, !11, i64 16, !8, i64 24, !12, i64 32, !12, i64 40, !11, i64 48, !11, i64 56, !12, i64 64, !8, i64 72}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!6, !8, i64 84}
!14 = !{!6, !12, i64 88}
!15 = !{!6, !8, i64 80}
!16 = !{!6, !8, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !8, i64 0}
!19 = !{!"_ZTS12feature_node", !8, i64 0, !11, i64 8}
!20 = !{!19, !11, i64 8}
!21 = distinct !{!21, !22, !23}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = distinct !{!24, !22}
!25 = !{!26}
!26 = distinct !{!26, !27}
!27 = distinct !{!27, !"LVerDomain"}
!28 = !{!29}
!29 = distinct !{!29, !27}
!30 = !{!31}
!31 = distinct !{!31, !27}
!32 = !{!29, !26}
!33 = distinct !{!33, !22, !23, !34}
!34 = !{!"llvm.loop.unroll.runtime.disable"}
!35 = !{!6, !11, i64 112}
!36 = !{!6, !12, i64 96}
!37 = !{!8, !8, i64 0}
!38 = distinct !{!38, !22}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.unroll.disable"}


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