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

; 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_parameter = type { i32, i32, i32, double, double, double, double, double, i32, ptr, ptr, double, double, i32, i32 }
%struct.svm_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: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef, ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN6Kernel10k_functionEPK8svm_nodeS2_RK13svm_parameter(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(104) %2) #3 align 2 {
  %4 = alloca double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  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
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.svm_parameter, ptr %10, i32 0, i32 1
  %12 = load i32, ptr %11, align 4, !tbaa !9
  switch i32 %12, label %165 [
    i32 0, label %13
    i32 1, label %17
    i32 2, label %32
    i32 3, label %143
    i32 4, label %155
  ]

13:                                               ; preds = %3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = call noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef %14, ptr noundef %15)
  store double %16, ptr %4, align 8
  br label %166

17:                                               ; preds = %3
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.svm_parameter, ptr %18, i32 0, i32 3
  %20 = load double, ptr %19, align 8, !tbaa !13
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef %21, ptr noundef %22)
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.svm_parameter, ptr %24, i32 0, i32 4
  %26 = load double, ptr %25, align 8, !tbaa !14
  %27 = call double @llvm.fmuladd.f64(double %20, double %23, double %26)
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.svm_parameter, ptr %28, i32 0, i32 2
  %30 = load i32, ptr %29, align 8, !tbaa !15
  %31 = call noundef double @_ZL4powidi(double noundef %27, i32 noundef %30)
  store double %31, ptr %4, align 8
  br label %166

32:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double 0.000000e+00, ptr %8, align 8, !tbaa !16
  br label %33

33:                                               ; preds = %100, %32
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.svm_node, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !17
  %37 = icmp ne i32 %36, -1
  br i1 %37, label %38, label %43

38:                                               ; preds = %33
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.svm_node, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !17
  %42 = icmp ne i32 %41, -1
  br label %43

43:                                               ; preds = %38, %33
  %44 = phi i1 [ false, %33 ], [ %42, %38 ]
  br i1 %44, label %45, label %101

45:                                               ; preds = %43
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.svm_node, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !17
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.svm_node, ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !17
  %52 = icmp eq i32 %48, %51
  br i1 %52, label %53, label %69

53:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.svm_node, ptr %54, i32 0, i32 1
  %56 = load double, ptr %55, align 8, !tbaa !19
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.svm_node, ptr %57, i32 0, i32 1
  %59 = load double, ptr %58, align 8, !tbaa !19
  %60 = fsub double %56, %59
  store double %60, ptr %9, align 8, !tbaa !16
  %61 = load double, ptr %9, align 8, !tbaa !16
  %62 = load double, ptr %9, align 8, !tbaa !16
  %63 = load double, ptr %8, align 8, !tbaa !16
  %64 = call double @llvm.fmuladd.f64(double %61, double %62, double %63)
  store double %64, ptr %8, align 8, !tbaa !16
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.svm_node, ptr %65, i32 1
  store ptr %66, ptr %5, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.svm_node, ptr %67, i32 1
  store ptr %68, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %100

69:                                               ; preds = %45
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.svm_node, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !17
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.svm_node, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !17
  %76 = icmp sgt i32 %72, %75
  br i1 %76, label %77, label %88

77:                                               ; preds = %69
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.svm_node, ptr %78, i32 0, i32 1
  %80 = load double, ptr %79, align 8, !tbaa !19
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.svm_node, ptr %81, i32 0, i32 1
  %83 = load double, ptr %82, align 8, !tbaa !19
  %84 = load double, ptr %8, align 8, !tbaa !16
  %85 = call double @llvm.fmuladd.f64(double %80, double %83, double %84)
  store double %85, ptr %8, align 8, !tbaa !16
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.svm_node, ptr %86, i32 1
  store ptr %87, ptr %6, align 8, !tbaa !5
  br label %99

88:                                               ; preds = %69
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.svm_node, ptr %89, i32 0, i32 1
  %91 = load double, ptr %90, align 8, !tbaa !19
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.svm_node, ptr %92, i32 0, i32 1
  %94 = load double, ptr %93, align 8, !tbaa !19
  %95 = load double, ptr %8, align 8, !tbaa !16
  %96 = call double @llvm.fmuladd.f64(double %91, double %94, double %95)
  store double %96, ptr %8, align 8, !tbaa !16
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.svm_node, ptr %97, i32 1
  store ptr %98, ptr %5, align 8, !tbaa !5
  br label %99

99:                                               ; preds = %88, %77
  br label %100

100:                                              ; preds = %99, %53
  br label %33, !llvm.loop !20

101:                                              ; preds = %43
  br label %102

102:                                              ; preds = %107, %101
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.svm_node, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 8, !tbaa !17
  %106 = icmp ne i32 %105, -1
  br i1 %106, label %107, label %118

107:                                              ; preds = %102
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.svm_node, ptr %108, i32 0, i32 1
  %110 = load double, ptr %109, align 8, !tbaa !19
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.svm_node, ptr %111, i32 0, i32 1
  %113 = load double, ptr %112, align 8, !tbaa !19
  %114 = load double, ptr %8, align 8, !tbaa !16
  %115 = call double @llvm.fmuladd.f64(double %110, double %113, double %114)
  store double %115, ptr %8, align 8, !tbaa !16
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.svm_node, ptr %116, i32 1
  store ptr %117, ptr %5, align 8, !tbaa !5
  br label %102, !llvm.loop !22

118:                                              ; preds = %102
  br label %119

119:                                              ; preds = %124, %118
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.svm_node, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !17
  %123 = icmp ne i32 %122, -1
  br i1 %123, label %124, label %135

124:                                              ; preds = %119
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.svm_node, ptr %125, i32 0, i32 1
  %127 = load double, ptr %126, align 8, !tbaa !19
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.svm_node, ptr %128, i32 0, i32 1
  %130 = load double, ptr %129, align 8, !tbaa !19
  %131 = load double, ptr %8, align 8, !tbaa !16
  %132 = call double @llvm.fmuladd.f64(double %127, double %130, double %131)
  store double %132, ptr %8, align 8, !tbaa !16
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.svm_node, ptr %133, i32 1
  store ptr %134, ptr %6, align 8, !tbaa !5
  br label %119, !llvm.loop !23

135:                                              ; preds = %119
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.svm_parameter, ptr %136, i32 0, i32 3
  %138 = load double, ptr %137, align 8, !tbaa !13
  %139 = fneg double %138
  %140 = load double, ptr %8, align 8, !tbaa !16
  %141 = fmul double %139, %140
  %142 = call double @exp(double noundef %141) #6
  store double %142, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %166

143:                                              ; preds = %3
  %144 = load ptr, ptr %7, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.svm_parameter, ptr %144, i32 0, i32 3
  %146 = load double, ptr %145, align 8, !tbaa !13
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = call noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef %147, ptr noundef %148)
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.svm_parameter, ptr %150, i32 0, i32 4
  %152 = load double, ptr %151, align 8, !tbaa !14
  %153 = call double @llvm.fmuladd.f64(double %146, double %149, double %152)
  %154 = call double @tanh(double noundef %153) #6
  store double %154, ptr %4, align 8
  br label %166

155:                                              ; preds = %3
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.svm_node, ptr %157, i32 0, i32 1
  %159 = load double, ptr %158, align 8, !tbaa !19
  %160 = fptosi double %159 to i32
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds %struct.svm_node, ptr %156, i64 %161
  %163 = getelementptr inbounds %struct.svm_node, ptr %162, i32 0, i32 1
  %164 = load double, ptr %163, align 8, !tbaa !19
  store double %164, ptr %4, align 8
  br label %166

165:                                              ; preds = %3
  store double 0.000000e+00, ptr %4, align 8
  br label %166

166:                                              ; preds = %165, %155, %143, %135, %17, %13
  %167 = load double, ptr %4, align 8
  ret double %167
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef double @_ZL4powidi(double noundef, i32 noundef) #4

; Function Attrs: nounwind
declare double @exp(double noundef) #5

; Function Attrs: nounwind
declare double @tanh(double noundef) #5

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #5 = { 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 #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTS13svm_parameter", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !12, i64 88, !11, i64 96, !11, i64 100}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !12, i64 16}
!14 = !{!10, !12, i64 24}
!15 = !{!10, !11, i64 8}
!16 = !{!12, !12, i64 0}
!17 = !{!18, !11, i64 0}
!18 = !{!"_ZTS8svm_node", !11, i64 0, !12, i64 8}
!19 = !{!18, !12, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !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"

%struct.svm_node = type { i32, double }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN6Kernel10k_functionEPK8svm_nodeS2_RK13svm_parameter(ptr noundef %0, ptr noundef %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(104) %2) local_unnamed_addr #0 align 2 {
  %4 = getelementptr inbounds i8, ptr %2, i64 4
  %5 = load i32, ptr %4, align 4, !tbaa !5
  switch i32 %5, label %77 [
    i32 0, label %7
    i32 1, label %9
    i32 2, label %.preheader60
    i32 3, label %62
    i32 4, label %70
  ]

.preheader60:                                     ; preds = %3
  %6 = load i32, ptr %0, align 8, !tbaa !12
  %.not61 = icmp eq i32 %6, -1
  br i1 %.not61, label %.preheader, label %.lr.ph

7:                                                ; preds = %3
  %8 = tail call noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef %0, ptr noundef %1)
  br label %77

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %2, i64 16
  %11 = load double, ptr %10, align 8, !tbaa !14
  %12 = tail call noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef %0, ptr noundef %1)
  %13 = getelementptr inbounds i8, ptr %2, i64 24
  %14 = load double, ptr %13, align 8, !tbaa !15
  %15 = tail call double @llvm.fmuladd.f64(double %11, double %12, double %14)
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !16
  %18 = tail call noundef double @_ZL4powidi(double noundef %15, i32 noundef %17)
  br label %77

.lr.ph:                                           ; preds = %.preheader60, %44
  %19 = phi i32 [ %45, %44 ], [ %6, %.preheader60 ]
  %.04864 = phi double [ %.1, %44 ], [ 0.000000e+00, %.preheader60 ]
  %.04963 = phi ptr [ %.150, %44 ], [ %0, %.preheader60 ]
  %.05262 = phi ptr [ %.153, %44 ], [ %1, %.preheader60 ]
  %20 = load i32, ptr %.05262, align 8, !tbaa !12
  %.not57 = icmp eq i32 %20, -1
  br i1 %.not57, label %.lr.ph74, label %21

21:                                               ; preds = %.lr.ph
  %22 = icmp eq i32 %19, %20
  br i1 %22, label %23, label %32

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %.04963, i64 8
  %25 = load double, ptr %24, align 8, !tbaa !17
  %26 = getelementptr inbounds i8, ptr %.05262, i64 8
  %27 = load double, ptr %26, align 8, !tbaa !17
  %28 = fsub double %25, %27
  %29 = tail call double @llvm.fmuladd.f64(double %28, double %28, double %.04864)
  %30 = getelementptr inbounds i8, ptr %.04963, i64 16
  %31 = getelementptr inbounds i8, ptr %.05262, i64 16
  br label %44

32:                                               ; preds = %21
  %33 = icmp sgt i32 %19, %20
  br i1 %33, label %34, label %39

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %.05262, i64 8
  %36 = load double, ptr %35, align 8, !tbaa !17
  %37 = tail call double @llvm.fmuladd.f64(double %36, double %36, double %.04864)
  %38 = getelementptr inbounds i8, ptr %.05262, i64 16
  br label %44

39:                                               ; preds = %32
  %40 = getelementptr inbounds i8, ptr %.04963, i64 8
  %41 = load double, ptr %40, align 8, !tbaa !17
  %42 = tail call double @llvm.fmuladd.f64(double %41, double %41, double %.04864)
  %43 = getelementptr inbounds i8, ptr %.04963, i64 16
  br label %44

44:                                               ; preds = %34, %39, %23
  %.153 = phi ptr [ %31, %23 ], [ %38, %34 ], [ %.05262, %39 ]
  %.150 = phi ptr [ %30, %23 ], [ %.04963, %34 ], [ %43, %39 ]
  %.1 = phi double [ %29, %23 ], [ %37, %34 ], [ %42, %39 ]
  %45 = load i32, ptr %.150, align 8, !tbaa !12
  %.not = icmp eq i32 %45, -1
  br i1 %.not, label %.preheader, label %.lr.ph, !llvm.loop !18

.preheader:                                       ; preds = %44, %.lr.ph74, %.preheader60
  %.052.lcssa86 = phi ptr [ %1, %.preheader60 ], [ %.05262, %.lr.ph74 ], [ %.153, %44 ]
  %.2.lcssa = phi double [ 0.000000e+00, %.preheader60 ], [ %49, %.lr.ph74 ], [ %.1, %44 ]
  %46 = load i32, ptr %.052.lcssa86, align 8, !tbaa !12
  %.not5976 = icmp eq i32 %46, -1
  br i1 %.not5976, label %._crit_edge, label %.lr.ph79

.lr.ph74:                                         ; preds = %.lr.ph, %.lr.ph74
  %.273 = phi double [ %49, %.lr.ph74 ], [ %.04864, %.lr.ph ]
  %.25172 = phi ptr [ %50, %.lr.ph74 ], [ %.04963, %.lr.ph ]
  %47 = getelementptr inbounds i8, ptr %.25172, i64 8
  %48 = load double, ptr %47, align 8, !tbaa !17
  %49 = tail call double @llvm.fmuladd.f64(double %48, double %48, double %.273)
  %50 = getelementptr inbounds i8, ptr %.25172, i64 16
  %51 = load i32, ptr %50, align 8, !tbaa !12
  %.not58 = icmp eq i32 %51, -1
  br i1 %.not58, label %.preheader, label %.lr.ph74, !llvm.loop !20

.lr.ph79:                                         ; preds = %.preheader, %.lr.ph79
  %.378 = phi double [ %54, %.lr.ph79 ], [ %.2.lcssa, %.preheader ]
  %.25477 = phi ptr [ %55, %.lr.ph79 ], [ %.052.lcssa86, %.preheader ]
  %52 = getelementptr inbounds i8, ptr %.25477, i64 8
  %53 = load double, ptr %52, align 8, !tbaa !17
  %54 = tail call double @llvm.fmuladd.f64(double %53, double %53, double %.378)
  %55 = getelementptr inbounds i8, ptr %.25477, i64 16
  %56 = load i32, ptr %55, align 8, !tbaa !12
  %.not59 = icmp eq i32 %56, -1
  br i1 %.not59, label %._crit_edge, label %.lr.ph79, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph79, %.preheader
  %.3.lcssa = phi double [ %.2.lcssa, %.preheader ], [ %54, %.lr.ph79 ]
  %57 = getelementptr inbounds i8, ptr %2, i64 16
  %58 = load double, ptr %57, align 8, !tbaa !14
  %59 = fneg double %58
  %60 = fmul double %.3.lcssa, %59
  %61 = tail call double @exp(double noundef %60) #4
  br label %77

62:                                               ; preds = %3
  %63 = getelementptr inbounds i8, ptr %2, i64 16
  %64 = load double, ptr %63, align 8, !tbaa !14
  %65 = tail call noundef double @_ZN6Kernel3dotEPK8svm_nodeS2_(ptr noundef %0, ptr noundef %1)
  %66 = getelementptr inbounds i8, ptr %2, i64 24
  %67 = load double, ptr %66, align 8, !tbaa !15
  %68 = tail call double @llvm.fmuladd.f64(double %64, double %65, double %67)
  %69 = tail call double @tanh(double noundef %68) #4
  br label %77

70:                                               ; preds = %3
  %71 = getelementptr inbounds i8, ptr %1, i64 8
  %72 = load double, ptr %71, align 8, !tbaa !17
  %73 = fptosi double %72 to i32
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds %struct.svm_node, ptr %0, i64 %74, i32 1
  %76 = load double, ptr %75, align 8, !tbaa !17
  br label %77

77:                                               ; preds = %3, %70, %62, %._crit_edge, %9, %7
  %.0 = phi double [ %76, %70 ], [ %69, %62 ], [ %61, %._crit_edge ], [ %18, %9 ], [ %8, %7 ], [ 0.000000e+00, %3 ]
  ret double %.0
}

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !7, i64 4}
!6 = !{!"_ZTS13svm_parameter", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !11, i64 64, !11, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"_ZTS8svm_node", !7, i64 0, !10, i64 8}
!14 = !{!6, !10, i64 16}
!15 = !{!6, !10, i64 24}
!16 = !{!6, !7, i64 8}
!17 = !{!13, !10, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass