; LLVM IR from robotic-vision-lab/Cloud-Object-Recognition-Engine :: 3rdparty/libsvm (svm)

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3minIdET_S0_S0_(double noundef, double noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3maxIdET_S0_S0_(double noundef, double noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local double @svm_predict_probability(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %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 double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = 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
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.svm_model, ptr %16, i32 0, i32 0
  %18 = getelementptr inbounds %struct.svm_parameter, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %27, label %21

21:                                               ; preds = %3
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.svm_model, ptr %22, i32 0, i32 0
  %24 = getelementptr inbounds %struct.svm_parameter, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %27, label %198

27:                                               ; preds = %21, %3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.svm_model, ptr %28, i32 0, i32 6
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %198

32:                                               ; preds = %27
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.svm_model, ptr %33, i32 0, i32 7
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %198

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.svm_model, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 8, !tbaa !16
  store i32 %40, ptr %9, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %41 = load i32, ptr %9, align 4, !tbaa !17
  %42 = load i32, ptr %9, align 4, !tbaa !17
  %43 = sub nsw i32 %42, 1
  %44 = mul nsw i32 %41, %43
  %45 = sdiv i32 %44, 2
  %46 = sext i32 %45 to i64
  %47 = mul i64 %46, 8
  %48 = call noalias ptr @malloc(i64 noundef %47) #7
  store ptr %48, ptr %10, align 8, !tbaa !5
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = call double @svm_predict_values(ptr noundef %49, ptr noundef %50, ptr noundef %51)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store double 0x3E7AD7F29ABCAF48, ptr %11, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %53 = load i32, ptr %9, align 4, !tbaa !17
  %54 = sext i32 %53 to i64
  %55 = mul i64 %54, 8
  %56 = call noalias ptr @malloc(i64 noundef %55) #7
  store ptr %56, ptr %12, align 8, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !17
  br label %57

57:                                               ; preds = %70, %37
  %58 = load i32, ptr %8, align 4, !tbaa !17
  %59 = load i32, ptr %9, align 4, !tbaa !17
  %60 = icmp slt i32 %58, %59
  br i1 %60, label %61, label %73

61:                                               ; preds = %57
  %62 = load i32, ptr %9, align 4, !tbaa !17
  %63 = sext i32 %62 to i64
  %64 = mul i64 %63, 8
  %65 = call noalias ptr @malloc(i64 noundef %64) #7
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = load i32, ptr %8, align 4, !tbaa !17
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  store ptr %65, ptr %69, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %61
  %71 = load i32, ptr %8, align 4, !tbaa !17
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %8, align 4, !tbaa !17
  br label %57, !llvm.loop !19

73:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !17
  store i32 0, ptr %8, align 4, !tbaa !17
  br label %74

74:                                               ; preds = %144, %73
  %75 = load i32, ptr %8, align 4, !tbaa !17
  %76 = load i32, ptr %9, align 4, !tbaa !17
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %147

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %79 = load i32, ptr %8, align 4, !tbaa !17
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %14, align 4, !tbaa !17
  br label %81

81:                                               ; preds = %140, %78
  %82 = load i32, ptr %14, align 4, !tbaa !17
  %83 = load i32, ptr %9, align 4, !tbaa !17
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %143

86:                                               ; preds = %81
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load i32, ptr %13, align 4, !tbaa !17
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !18
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.svm_model, ptr %92, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !14
  %95 = load i32, ptr %13, align 4, !tbaa !17
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds double, ptr %94, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !18
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.svm_model, ptr %99, i32 0, i32 7
  %101 = load ptr, ptr %100, align 8, !tbaa !15
  %102 = load i32, ptr %13, align 4, !tbaa !17
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds double, ptr %101, i64 %103
  %105 = load double, ptr %104, align 8, !tbaa !18
  %106 = call noundef double @_ZL15sigmoid_predictddd(double noundef %91, double noundef %98, double noundef %105)
  %107 = load double, ptr %11, align 8, !tbaa !18
  %108 = call noundef double @_ZL3maxIdET_S0_S0_(double noundef %106, double noundef %107)
  %109 = load double, ptr %11, align 8, !tbaa !18
  %110 = fsub double 1.000000e+00, %109
  %111 = call noundef double @_ZL3minIdET_S0_S0_(double noundef %108, double noundef %110)
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = load i32, ptr %8, align 4, !tbaa !17
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds ptr, ptr %112, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load i32, ptr %14, align 4, !tbaa !17
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds double, ptr %116, i64 %118
  store double %111, ptr %119, align 8, !tbaa !18
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = load i32, ptr %8, align 4, !tbaa !17
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds ptr, ptr %120, i64 %122
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  %125 = load i32, ptr %14, align 4, !tbaa !17
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %124, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !18
  %129 = fsub double 1.000000e+00, %128
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = load i32, ptr %14, align 4, !tbaa !17
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds ptr, ptr %130, i64 %132
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = load i32, ptr %8, align 4, !tbaa !17
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds double, ptr %134, i64 %136
  store double %129, ptr %137, align 8, !tbaa !18
  %138 = load i32, ptr %13, align 4, !tbaa !17
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %13, align 4, !tbaa !17
  br label %140

140:                                              ; preds = %86
  %141 = load i32, ptr %14, align 4, !tbaa !17
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %14, align 4, !tbaa !17
  br label %81, !llvm.loop !21

143:                                              ; preds = %85
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %8, align 4, !tbaa !17
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %8, align 4, !tbaa !17
  br label %74, !llvm.loop !22

147:                                              ; preds = %74
  %148 = load i32, ptr %9, align 4, !tbaa !17
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL22multiclass_probabilityiPPdS_(i32 noundef %148, ptr noundef %149, ptr noundef %150)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !17
  store i32 1, ptr %8, align 4, !tbaa !17
  br label %151

151:                                              ; preds = %170, %147
  %152 = load i32, ptr %8, align 4, !tbaa !17
  %153 = load i32, ptr %9, align 4, !tbaa !17
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %155, label %173

155:                                              ; preds = %151
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = load i32, ptr %8, align 4, !tbaa !17
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds double, ptr %156, i64 %158
  %160 = load double, ptr %159, align 8, !tbaa !18
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = load i32, ptr %15, align 4, !tbaa !17
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds double, ptr %161, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !18
  %166 = fcmp ogt double %160, %165
  br i1 %166, label %167, label %169

167:                                              ; preds = %155
  %168 = load i32, ptr %8, align 4, !tbaa !17
  store i32 %168, ptr %15, align 4, !tbaa !17
  br label %169

169:                                              ; preds = %167, %155
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %8, align 4, !tbaa !17
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %8, align 4, !tbaa !17
  br label %151, !llvm.loop !23

173:                                              ; preds = %151
  store i32 0, ptr %8, align 4, !tbaa !17
  br label %174

174:                                              ; preds = %184, %173
  %175 = load i32, ptr %8, align 4, !tbaa !17
  %176 = load i32, ptr %9, align 4, !tbaa !17
  %177 = icmp slt i32 %175, %176
  br i1 %177, label %178, label %187

178:                                              ; preds = %174
  %179 = load ptr, ptr %12, align 8, !tbaa !5
  %180 = load i32, ptr %8, align 4, !tbaa !17
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds ptr, ptr %179, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  call void @free(ptr noundef %183) #6
  br label %184

184:                                              ; preds = %178
  %185 = load i32, ptr %8, align 4, !tbaa !17
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %8, align 4, !tbaa !17
  br label %174, !llvm.loop !24

187:                                              ; preds = %174
  %188 = load ptr, ptr %10, align 8, !tbaa !5
  call void @free(ptr noundef %188) #6
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %189) #6
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.svm_model, ptr %190, i32 0, i32 9
  %192 = load ptr, ptr %191, align 8, !tbaa !25
  %193 = load i32, ptr %15, align 4, !tbaa !17
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds i32, ptr %192, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !17
  %197 = sitofp i32 %196 to double
  store double %197, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %202

198:                                              ; preds = %32, %27, %21
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = call double @svm_predict(ptr noundef %199, ptr noundef %200)
  store double %201, ptr %4, align 8
  br label %202

202:                                              ; preds = %198, %187
  %203 = load double, ptr %4, align 8
  ret double %203
}

; Function Attrs: mustprogress uwtable
declare dso_local double @svm_predict(ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local double @svm_predict_values(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef double @_ZL15sigmoid_predictddd(double noundef, double noundef, double noundef) #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22multiclass_probabilityiPPdS_(i32 noundef, ptr noundef, ptr noundef) #4

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

!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, !12, i64 0}
!10 = !{!"_ZTS9svm_model", !11, i64 0, !12, i64 104, !12, i64 108, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !12, i64 176}
!11 = !{!"_ZTS13svm_parameter", !12, i64 0, !12, i64 4, !12, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !12, i64 56, !6, i64 64, !6, i64 72, !13, i64 80, !13, i64 88, !12, i64 96, !12, i64 100}
!12 = !{!"int", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!10, !6, i64 136}
!15 = !{!10, !6, i64 144}
!16 = !{!10, !12, i64 104}
!17 = !{!12, !12, i64 0}
!18 = !{!13, !13, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}
!25 = !{!10, !6, i64 160}


; 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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3minIdET_S0_S0_(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL3maxIdET_S0_S0_(double noundef, double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local double @svm_predict_probability(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %switch = icmp ult i32 %4, 2
  br i1 %switch, label %5, label %95

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 136
  %7 = load ptr, ptr %6, align 8, !tbaa !13
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %95, label %8

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 144
  %10 = load ptr, ptr %9, align 8, !tbaa !14
  %.not72 = icmp eq ptr %10, null
  br i1 %.not72, label %95, label %11

11:                                               ; preds = %8
  %12 = getelementptr inbounds i8, ptr %0, i64 104
  %13 = load i32, ptr %12, align 8, !tbaa !15
  %14 = add nsw i32 %13, -1
  %15 = mul nsw i32 %14, %13
  %16 = sdiv i32 %15, 2
  %17 = sext i32 %16 to i64
  %18 = shl nsw i64 %17, 3
  %19 = tail call noalias ptr @malloc(i64 noundef %18) #5
  %20 = tail call double @svm_predict_values(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %19)
  %21 = sext i32 %13 to i64
  %22 = shl nsw i64 %21, 3
  %23 = tail call noalias ptr @malloc(i64 noundef %22) #5
  %24 = icmp sgt i32 %13, 0
  br i1 %24, label %.lr.ph.preheader, label %.preheader.thread

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

.preheader73:                                     ; preds = %.lr.ph
  br i1 %24, label %.lr.ph80.preheader, label %.preheader.thread

.lr.ph80.preheader:                               ; preds = %.preheader73
  %wide.trip.count104 = zext nneg i32 %13 to i64
  br label %.lr.ph80

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %25 = tail call noalias ptr @malloc(i64 noundef %22) #5
  %26 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv
  store ptr %25, ptr %26, align 8, !tbaa !16
  %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 %.preheader73, label %.lr.ph, !llvm.loop !17

.loopexit.loopexit:                               ; preds = %31
  %27 = trunc nsw i64 %indvars.iv.next95 to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph80
  %.166.lcssa = phi i32 [ %.06579, %.lr.ph80 ], [ %27, %.loopexit.loopexit ]
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond105.not = icmp eq i64 %indvars.iv.next102, %wide.trip.count104
  br i1 %exitcond105.not, label %._crit_edge, label %.lr.ph80, !llvm.loop !19

.lr.ph80:                                         ; preds = %.lr.ph80.preheader, %.loopexit
  %indvars.iv101 = phi i64 [ 0, %.lr.ph80.preheader ], [ %indvars.iv.next102, %.loopexit ]
  %indvars.iv90 = phi i64 [ 1, %.lr.ph80.preheader ], [ %indvars.iv.next91, %.loopexit ]
  %.06579 = phi i32 [ 0, %.lr.ph80.preheader ], [ %.166.lcssa, %.loopexit ]
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %28 = icmp slt i64 %indvars.iv.next102, %21
  br i1 %28, label %.lr.ph77, label %.loopexit

.lr.ph77:                                         ; preds = %.lr.ph80
  %29 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv101
  %30 = sext i32 %.06579 to i64
  br label %31

31:                                               ; preds = %.lr.ph77, %31
  %indvars.iv94 = phi i64 [ %30, %.lr.ph77 ], [ %indvars.iv.next95, %31 ]
  %indvars.iv92 = phi i64 [ %indvars.iv90, %.lr.ph77 ], [ %indvars.iv.next93, %31 ]
  %32 = getelementptr inbounds double, ptr %19, i64 %indvars.iv94
  %33 = load double, ptr %32, align 8, !tbaa !20
  %34 = load ptr, ptr %6, align 8, !tbaa !13
  %35 = getelementptr inbounds double, ptr %34, i64 %indvars.iv94
  %36 = load double, ptr %35, align 8, !tbaa !20
  %37 = load ptr, ptr %9, align 8, !tbaa !14
  %38 = getelementptr inbounds double, ptr %37, i64 %indvars.iv94
  %39 = load double, ptr %38, align 8, !tbaa !20
  %40 = tail call noundef double @_ZL15sigmoid_predictddd(double noundef %33, double noundef %36, double noundef %39)
  %41 = tail call noundef double @_ZL3maxIdET_S0_S0_(double noundef %40, double noundef 0x3E7AD7F29ABCAF48)
  %42 = tail call noundef double @_ZL3minIdET_S0_S0_(double noundef %41, double noundef 0x3FEFFFFFCA501ACB)
  %43 = load ptr, ptr %29, align 8, !tbaa !16
  %44 = getelementptr inbounds double, ptr %43, i64 %indvars.iv92
  store double %42, ptr %44, align 8, !tbaa !20
  %45 = fsub double 1.000000e+00, %42
  %46 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv92
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = getelementptr inbounds double, ptr %47, i64 %indvars.iv101
  store double %45, ptr %48, align 8, !tbaa !20
  %indvars.iv.next95 = add nsw i64 %indvars.iv94, 1
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond100.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count104
  br i1 %exitcond100.not, label %.loopexit.loopexit, label %31, !llvm.loop !21

.preheader.thread:                                ; preds = %11, %.preheader73
  tail call void @_ZL22multiclass_probabilityiPPdS_(i32 noundef %13, ptr noundef %23, ptr noundef %2)
  br label %._crit_edge88

._crit_edge:                                      ; preds = %.loopexit
  tail call void @_ZL22multiclass_probabilityiPPdS_(i32 noundef %13, ptr noundef %23, ptr noundef %2)
  %.not118 = icmp eq i32 %13, 1
  br i1 %.not118, label %.preheader, label %.lr.ph84.preheader

.lr.ph84.preheader:                               ; preds = %._crit_edge
  %wide.trip.count109 = zext nneg i32 %13 to i64
  %49 = add nsw i64 %wide.trip.count109, -1
  %50 = add nsw i64 %wide.trip.count109, -2
  %xtraiter = and i64 %49, 3
  %51 = icmp ult i64 %50, 3
  br i1 %51, label %.preheader.loopexit.unr-lcssa, label %.lr.ph84.preheader.new

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

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph84, %.lr.ph84.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph84.preheader ], [ %.1.3, %.lr.ph84 ]
  %indvars.iv106.unr = phi i64 [ 1, %.lr.ph84.preheader ], [ %indvars.iv.next107.3, %.lr.ph84 ]
  %.082.unr = phi i32 [ 0, %.lr.ph84.preheader ], [ %.1.3, %.lr.ph84 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader.loopexit, label %.lr.ph84.epil

.lr.ph84.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph84.epil
  %indvars.iv106.epil = phi i64 [ %indvars.iv.next107.epil, %.lr.ph84.epil ], [ %indvars.iv106.unr, %.preheader.loopexit.unr-lcssa ]
  %.082.epil = phi i32 [ %.1.epil, %.lr.ph84.epil ], [ %.082.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph84.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %52 = getelementptr inbounds double, ptr %2, i64 %indvars.iv106.epil
  %53 = load double, ptr %52, align 8, !tbaa !20
  %54 = sext i32 %.082.epil to i64
  %55 = getelementptr inbounds double, ptr %2, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !20
  %57 = fcmp ogt double %53, %56
  %58 = trunc nuw nsw i64 %indvars.iv106.epil to i32
  %.1.epil = select i1 %57, i32 %58, i32 %.082.epil
  %indvars.iv.next107.epil = add nuw nsw i64 %indvars.iv106.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader.loopexit, label %.lr.ph84.epil, !llvm.loop !22

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

.preheader:                                       ; preds = %.preheader.loopexit, %._crit_edge
  %.0.lcssa = phi i64 [ 0, %._crit_edge ], [ %59, %.preheader.loopexit ]
  br i1 %24, label %.lr.ph87.preheader, label %._crit_edge88

.lr.ph87.preheader:                               ; preds = %.preheader
  %wide.trip.count114 = zext nneg i32 %13 to i64
  br label %.lr.ph87

.lr.ph84:                                         ; preds = %.lr.ph84, %.lr.ph84.preheader.new
  %indvars.iv106 = phi i64 [ 1, %.lr.ph84.preheader.new ], [ %indvars.iv.next107.3, %.lr.ph84 ]
  %.082 = phi i32 [ 0, %.lr.ph84.preheader.new ], [ %.1.3, %.lr.ph84 ]
  %niter = phi i64 [ 0, %.lr.ph84.preheader.new ], [ %niter.next.3, %.lr.ph84 ]
  %60 = getelementptr inbounds double, ptr %2, i64 %indvars.iv106
  %61 = load double, ptr %60, align 8, !tbaa !20
  %62 = sext i32 %.082 to i64
  %63 = getelementptr inbounds double, ptr %2, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !20
  %65 = fcmp ogt double %61, %64
  %66 = trunc nuw nsw i64 %indvars.iv106 to i32
  %.1 = select i1 %65, i32 %66, i32 %.082
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %67 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next107
  %68 = load double, ptr %67, align 8, !tbaa !20
  %69 = sext i32 %.1 to i64
  %70 = getelementptr inbounds double, ptr %2, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !20
  %72 = fcmp ogt double %68, %71
  %73 = trunc nuw nsw i64 %indvars.iv.next107 to i32
  %.1.1 = select i1 %72, i32 %73, i32 %.1
  %indvars.iv.next107.1 = add nuw nsw i64 %indvars.iv106, 2
  %74 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next107.1
  %75 = load double, ptr %74, align 8, !tbaa !20
  %76 = sext i32 %.1.1 to i64
  %77 = getelementptr inbounds double, ptr %2, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !20
  %79 = fcmp ogt double %75, %78
  %80 = trunc nuw nsw i64 %indvars.iv.next107.1 to i32
  %.1.2 = select i1 %79, i32 %80, i32 %.1.1
  %indvars.iv.next107.2 = add nuw nsw i64 %indvars.iv106, 3
  %81 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next107.2
  %82 = load double, ptr %81, align 8, !tbaa !20
  %83 = sext i32 %.1.2 to i64
  %84 = getelementptr inbounds double, ptr %2, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !20
  %86 = fcmp ogt double %82, %85
  %87 = trunc nuw nsw i64 %indvars.iv.next107.2 to i32
  %.1.3 = select i1 %86, i32 %87, i32 %.1.2
  %indvars.iv.next107.3 = add nuw nsw i64 %indvars.iv106, 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 %.preheader.loopexit.unr-lcssa, label %.lr.ph84, !llvm.loop !24

.lr.ph87:                                         ; preds = %.lr.ph87.preheader, %.lr.ph87
  %indvars.iv111 = phi i64 [ 0, %.lr.ph87.preheader ], [ %indvars.iv.next112, %.lr.ph87 ]
  %88 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv111
  %89 = load ptr, ptr %88, align 8, !tbaa !16
  tail call void @free(ptr noundef %89) #6
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %exitcond115.not = icmp eq i64 %indvars.iv.next112, %wide.trip.count114
  br i1 %exitcond115.not, label %._crit_edge88, label %.lr.ph87, !llvm.loop !25

._crit_edge88:                                    ; preds = %.lr.ph87, %.preheader.thread, %.preheader
  %.0.lcssa117 = phi i64 [ 0, %.preheader.thread ], [ %.0.lcssa, %.preheader ], [ %.0.lcssa, %.lr.ph87 ]
  tail call void @free(ptr noundef %19) #6
  tail call void @free(ptr noundef %23) #6
  %90 = getelementptr inbounds i8, ptr %0, i64 160
  %91 = load ptr, ptr %90, align 8, !tbaa !26
  %92 = getelementptr inbounds i32, ptr %91, i64 %.0.lcssa117
  %93 = load i32, ptr %92, align 4, !tbaa !27
  %94 = sitofp i32 %93 to double
  br label %97

95:                                               ; preds = %3, %8, %5
  %96 = tail call double @svm_predict(ptr noundef nonnull %0, ptr noundef %1)
  br label %97

97:                                               ; preds = %95, %._crit_edge88
  %.067 = phi double [ %94, %._crit_edge88 ], [ %96, %95 ]
  ret double %.067
}

; Function Attrs: mustprogress uwtable
declare dso_local double @svm_predict(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local double @svm_predict_values(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef double @_ZL15sigmoid_predictddd(double noundef, double noundef, double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22multiclass_probabilityiPPdS_(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #5 = { nounwind allocsize(0) }
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, !8, i64 0}
!6 = !{!"_ZTS9svm_model", !7, i64 0, !8, i64 104, !8, i64 108, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !8, i64 176}
!7 = !{!"_ZTS13svm_parameter", !8, i64 0, !8, i64 4, !8, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !8, i64 56, !12, i64 64, !12, i64 72, !11, i64 80, !11, i64 88, !8, i64 96, !8, i64 100}
!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, !12, i64 136}
!14 = !{!6, !12, i64 144}
!15 = !{!6, !8, i64 104}
!16 = !{!12, !12, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!11, !11, i64 0}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !18}
!25 = distinct !{!25, !18}
!26 = !{!6, !12, i64 160}
!27 = !{!8, !8, i64 0}


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