; LLVM IR from pantor/ruckig :: src/ruckig (velocity_third_step2)

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

%"class.ruckig::VelocityThirdOrderStep2" = type { double, double, double, double, double, double, double, double }
%"class.ruckig::Profile" = type <{ %"struct.std::array", %"struct.std::array", %"struct.std::array", %"struct.std::array.0", %"struct.std::array.0", %"struct.std::array.0", %"class.ruckig::BrakeProfile", %"class.ruckig::BrakeProfile", double, double, double, i32, i32, i32, [4 x i8] }>
%"struct.std::array" = type { [7 x double] }
%"struct.std::array.0" = type { [8 x double] }
%"class.ruckig::BrakeProfile" = type { double, %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1" }
%"struct.std::array.1" = type { [2 x 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm8EE4backEv(ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ruckig23VelocityThirdOrderStep29time_noneERNS_7ProfileEddd(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %2, double noundef %3, double noundef %4) #3 align 2 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store double %2, ptr %9, align 8, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !9
  store double %4, ptr %11, align 8, !tbaa !9
  %15 = load ptr, ptr %7, align 8
  %16 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 0
  %17 = load double, ptr %16, align 8, !tbaa !11
  %18 = call noundef double @_ZSt3absd(double noundef %17)
  %19 = fcmp olt double %18, 0x3CB0000000000000
  br i1 %19, label %20, label %69

20:                                               ; preds = %5
  %21 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 2
  %22 = load double, ptr %21, align 8, !tbaa !13
  %23 = call noundef double @_ZSt3absd(double noundef %22)
  %24 = fcmp olt double %23, 0x3CB0000000000000
  br i1 %24, label %25, label %69

25:                                               ; preds = %20
  %26 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 6
  %27 = load double, ptr %26, align 8, !tbaa !14
  %28 = call noundef double @_ZSt3absd(double noundef %27)
  %29 = fcmp olt double %28, 0x3CB0000000000000
  br i1 %29, label %30, label %69

30:                                               ; preds = %25
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.ruckig::Profile", ptr %31, i32 0, i32 0
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %32, i64 noundef 0) #6
  store double 0.000000e+00, ptr %33, align 8, !tbaa !9
  %34 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 1
  %35 = load double, ptr %34, align 8, !tbaa !15
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.ruckig::Profile", ptr %36, i32 0, i32 0
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %37, i64 noundef 1) #6
  store double %35, ptr %38, align 8, !tbaa !9
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %"class.ruckig::Profile", ptr %39, i32 0, i32 0
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %40, i64 noundef 2) #6
  store double 0.000000e+00, ptr %41, align 8, !tbaa !9
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %"class.ruckig::Profile", ptr %42, i32 0, i32 0
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %43, i64 noundef 3) #6
  store double 0.000000e+00, ptr %44, align 8, !tbaa !9
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.ruckig::Profile", ptr %45, i32 0, i32 0
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %46, i64 noundef 4) #6
  store double 0.000000e+00, ptr %47, align 8, !tbaa !9
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.ruckig::Profile", ptr %48, i32 0, i32 0
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %49, i64 noundef 5) #6
  store double 0.000000e+00, ptr %50, align 8, !tbaa !9
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.ruckig::Profile", ptr %51, i32 0, i32 0
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %52, i64 noundef 6) #6
  store double 0.000000e+00, ptr %53, align 8, !tbaa !9
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 1
  %56 = load double, ptr %55, align 8, !tbaa !15
  %57 = load double, ptr %11, align 8, !tbaa !9
  %58 = load double, ptr %9, align 8, !tbaa !9
  %59 = load double, ptr %10, align 8, !tbaa !9
  %60 = call noundef zeroext i1 @_ZN6ruckig7Profile30check_for_velocity_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %54, double noundef %56, double noundef %57, double noundef %58, double noundef %59)
  br i1 %60, label %61, label %68

61:                                               ; preds = %30
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.ruckig::Profile", ptr %62, i32 0, i32 5
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm8EE4backEv(ptr noundef nonnull align 8 dereferenceable(64) %63) #6
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.ruckig::Profile", ptr %66, i32 0, i32 8
  store double %65, ptr %67, align 8, !tbaa !16
  store i1 true, ptr %6, align 1
  br label %143

68:                                               ; preds = %30
  br label %69

69:                                               ; preds = %68, %25, %20, %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %70 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 2
  %71 = load double, ptr %70, align 8, !tbaa !13
  %72 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 1
  %73 = load double, ptr %72, align 8, !tbaa !15
  %74 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 6
  %75 = load double, ptr %74, align 8, !tbaa !14
  %76 = fneg double %75
  %77 = call double @llvm.fmuladd.f64(double %71, double %73, double %76)
  %78 = fmul double 2.000000e+00, %77
  store double %78, ptr %12, align 8, !tbaa !9
  %79 = load double, ptr %12, align 8, !tbaa !9
  %80 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 7
  %81 = load double, ptr %80, align 8, !tbaa !25
  %82 = fdiv double %79, %81
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.ruckig::Profile", ptr %83, i32 0, i32 0
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %84, i64 noundef 0) #6
  store double %82, ptr %85, align 8, !tbaa !9
  %86 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 1
  %87 = load double, ptr %86, align 8, !tbaa !15
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.ruckig::Profile", ptr %88, i32 0, i32 0
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %89, i64 noundef 0) #6
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = fsub double %87, %91
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.ruckig::Profile", ptr %93, i32 0, i32 0
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %94, i64 noundef 1) #6
  store double %92, ptr %95, align 8, !tbaa !9
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.ruckig::Profile", ptr %96, i32 0, i32 0
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %97, i64 noundef 2) #6
  store double 0.000000e+00, ptr %98, align 8, !tbaa !9
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %"class.ruckig::Profile", ptr %99, i32 0, i32 0
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %100, i64 noundef 3) #6
  store double 0.000000e+00, ptr %101, align 8, !tbaa !9
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.ruckig::Profile", ptr %102, i32 0, i32 0
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %103, i64 noundef 4) #6
  store double 0.000000e+00, ptr %104, align 8, !tbaa !9
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %"class.ruckig::Profile", ptr %105, i32 0, i32 0
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %106, i64 noundef 5) #6
  store double 0.000000e+00, ptr %107, align 8, !tbaa !9
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %"class.ruckig::Profile", ptr %108, i32 0, i32 0
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %109, i64 noundef 6) #6
  store double 0.000000e+00, ptr %110, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %111 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 7
  %112 = load double, ptr %111, align 8, !tbaa !25
  %113 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 7
  %114 = load double, ptr %113, align 8, !tbaa !25
  %115 = fmul double %112, %114
  %116 = load double, ptr %12, align 8, !tbaa !9
  %117 = fdiv double %115, %116
  store double %117, ptr %13, align 8, !tbaa !9
  %118 = load double, ptr %13, align 8, !tbaa !9
  %119 = call noundef double @_ZSt3absd(double noundef %118)
  %120 = load double, ptr %11, align 8, !tbaa !9
  %121 = call noundef double @_ZSt3absd(double noundef %120)
  %122 = fadd double %121, 0x3D719799812DEA11
  %123 = fcmp olt double %119, %122
  br i1 %123, label %124, label %139

124:                                              ; preds = %69
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %"class.ruckig::VelocityThirdOrderStep2", ptr %15, i32 0, i32 1
  %127 = load double, ptr %126, align 8, !tbaa !15
  %128 = load double, ptr %13, align 8, !tbaa !9
  %129 = load double, ptr %9, align 8, !tbaa !9
  %130 = load double, ptr %10, align 8, !tbaa !9
  %131 = call noundef zeroext i1 @_ZN6ruckig7Profile30check_for_velocity_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %125, double noundef %127, double noundef %128, double noundef %129, double noundef %130)
  br i1 %131, label %132, label %139

132:                                              ; preds = %124
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = getelementptr inbounds %"class.ruckig::Profile", ptr %133, i32 0, i32 5
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm8EE4backEv(ptr noundef nonnull align 8 dereferenceable(64) %134) #6
  %136 = load double, ptr %135, align 8, !tbaa !9
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.ruckig::Profile", ptr %137, i32 0, i32 8
  store double %136, ptr %138, align 8, !tbaa !16
  store i1 true, ptr %6, align 1
  store i32 1, ptr %14, align 4
  br label %140

139:                                              ; preds = %124, %69
  store i32 0, ptr %14, align 4
  br label %140

140:                                              ; preds = %139, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %141 = load i32, ptr %14, align 4
  switch i32 %141, label %145 [
    i32 0, label %142
    i32 1, label %143
  ]

142:                                              ; preds = %140
  store i1 false, ptr %6, align 1
  br label %143

143:                                              ; preds = %142, %140, %61
  %144 = load i1, ptr %6, align 1
  ret i1 %144

145:                                              ; preds = %140
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6ruckig7Profile30check_for_velocity_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572), double noundef, double noundef, double noundef, double noundef) #5 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN6ruckig23VelocityThirdOrderStep2E", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 48}
!15 = !{!12, !10, i64 8}
!16 = !{!17, !10, i64 536}
!17 = !{!"_ZTSN6ruckig7ProfileE", !18, i64 0, !18, i64 56, !18, i64 112, !19, i64 168, !19, i64 232, !19, i64 296, !20, i64 360, !20, i64 448, !10, i64 536, !10, i64 544, !10, i64 552, !22, i64 560, !23, i64 564, !24, i64 568}
!18 = !{!"_ZTSSt5arrayIdLm7EE", !7, i64 0}
!19 = !{!"_ZTSSt5arrayIdLm8EE", !7, i64 0}
!20 = !{!"_ZTSN6ruckig12BrakeProfileE", !10, i64 0, !21, i64 8, !21, i64 24, !21, i64 40, !21, i64 56, !21, i64 72}
!21 = !{!"_ZTSSt5arrayIdLm2EE", !7, i64 0}
!22 = !{!"_ZTSN6ruckig7Profile13ReachedLimitsE", !7, i64 0}
!23 = !{!"_ZTSN6ruckig7Profile9DirectionE", !7, i64 0}
!24 = !{!"_ZTSN6ruckig7Profile12ControlSignsE", !7, i64 0}
!25 = !{!12, !10, i64 56}


; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm8EE4backEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ruckig23VelocityThirdOrderStep29time_noneERNS_7ProfileEddd(ptr nocapture noundef nonnull readonly align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %2, double noundef %3, double noundef %4) local_unnamed_addr #2 align 2 {
  %6 = load double, ptr %0, align 8, !tbaa !5
  %7 = tail call noundef double @_ZSt3absd(double noundef %6)
  %8 = fcmp olt double %7, 0x3CB0000000000000
  br i1 %8, label %9, label %31

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load double, ptr %10, align 8, !tbaa !10
  %12 = tail call noundef double @_ZSt3absd(double noundef %11)
  %13 = fcmp olt double %12, 0x3CB0000000000000
  br i1 %13, label %14, label %31

14:                                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %16 = load double, ptr %15, align 8, !tbaa !11
  %17 = tail call noundef double @_ZSt3absd(double noundef %16)
  %18 = fcmp olt double %17, 0x3CB0000000000000
  br i1 %18, label %19, label %31

19:                                               ; preds = %14
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 0) #5
  store double 0.000000e+00, ptr %20, align 8, !tbaa !12
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load double, ptr %21, align 8, !tbaa !13
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 1) #5
  store double %22, ptr %23, align 8, !tbaa !12
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 2) #5
  store double 0.000000e+00, ptr %24, align 8, !tbaa !12
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 3) #5
  store double 0.000000e+00, ptr %25, align 8, !tbaa !12
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 4) #5
  store double 0.000000e+00, ptr %26, align 8, !tbaa !12
  %27 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 5) #5
  store double 0.000000e+00, ptr %27, align 8, !tbaa !12
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 6) #5
  store double 0.000000e+00, ptr %28, align 8, !tbaa !12
  %29 = load double, ptr %21, align 8, !tbaa !13
  %30 = tail call noundef zeroext i1 @_ZN6ruckig7Profile30check_for_velocity_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %29, double noundef %4, double noundef %2, double noundef %3)
  br i1 %30, label %.sink.split, label %31

31:                                               ; preds = %19, %14, %9, %5
  %32 = getelementptr inbounds i8, ptr %0, i64 16
  %33 = load double, ptr %32, align 8, !tbaa !10
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load double, ptr %34, align 8, !tbaa !13
  %36 = getelementptr inbounds i8, ptr %0, i64 48
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = fneg double %37
  %39 = tail call double @llvm.fmuladd.f64(double %33, double %35, double %38)
  %40 = fmul double %39, 2.000000e+00
  %41 = getelementptr inbounds i8, ptr %0, i64 56
  %42 = load double, ptr %41, align 8, !tbaa !14
  %43 = fdiv double %40, %42
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 0) #5
  store double %43, ptr %44, align 8, !tbaa !12
  %45 = load double, ptr %34, align 8, !tbaa !13
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 0) #5
  %47 = load double, ptr %46, align 8, !tbaa !12
  %48 = fsub double %45, %47
  %49 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 1) #5
  store double %48, ptr %49, align 8, !tbaa !12
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 2) #5
  store double 0.000000e+00, ptr %50, align 8, !tbaa !12
  %51 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 3) #5
  store double 0.000000e+00, ptr %51, align 8, !tbaa !12
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 4) #5
  store double 0.000000e+00, ptr %52, align 8, !tbaa !12
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 5) #5
  store double 0.000000e+00, ptr %53, align 8, !tbaa !12
  %54 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 6) #5
  store double 0.000000e+00, ptr %54, align 8, !tbaa !12
  %55 = load double, ptr %41, align 8, !tbaa !14
  %56 = fmul double %55, %55
  %57 = fdiv double %56, %40
  %58 = tail call noundef double @_ZSt3absd(double noundef %57)
  %59 = tail call noundef double @_ZSt3absd(double noundef %4)
  %60 = fadd double %59, 0x3D719799812DEA11
  %61 = fcmp olt double %58, %60
  br i1 %61, label %62, label %69

62:                                               ; preds = %31
  %63 = load double, ptr %34, align 8, !tbaa !13
  %64 = tail call noundef zeroext i1 @_ZN6ruckig7Profile30check_for_velocity_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %63, double noundef %57, double noundef %2, double noundef %3)
  br i1 %64, label %.sink.split, label %69

.sink.split:                                      ; preds = %62, %19
  %65 = getelementptr inbounds i8, ptr %1, i64 296
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm8EE4backEv(ptr noundef nonnull align 8 dereferenceable(64) %65) #5
  %67 = load double, ptr %66, align 8, !tbaa !12
  %68 = getelementptr inbounds i8, ptr %1, i64 536
  store double %67, ptr %68, align 8, !tbaa !15
  br label %69

69:                                               ; preds = %.sink.split, %62, %31
  %.1 = phi i1 [ false, %62 ], [ false, %31 ], [ true, %.sink.split ]
  ret i1 %.1
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6ruckig7Profile30check_for_velocity_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572), double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #4 align 2

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 = { 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 #3 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN6ruckig23VelocityThirdOrderStep2E", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 16}
!11 = !{!6, !7, i64 48}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 56}
!15 = !{!16, !7, i64 536}
!16 = !{!"_ZTSN6ruckig7ProfileE", !17, i64 0, !17, i64 56, !17, i64 112, !18, i64 168, !18, i64 232, !18, i64 296, !19, i64 360, !19, i64 448, !7, i64 536, !7, i64 544, !7, i64 552, !21, i64 560, !22, i64 564, !23, i64 568}
!17 = !{!"_ZTSSt5arrayIdLm7EE", !8, i64 0}
!18 = !{!"_ZTSSt5arrayIdLm8EE", !8, i64 0}
!19 = !{!"_ZTSN6ruckig12BrakeProfileE", !7, i64 0, !20, i64 8, !20, i64 24, !20, i64 40, !20, i64 56, !20, i64 72}
!20 = !{!"_ZTSSt5arrayIdLm2EE", !8, i64 0}
!21 = !{!"_ZTSN6ruckig7Profile13ReachedLimitsE", !8, i64 0}
!22 = !{!"_ZTSN6ruckig7Profile9DirectionE", !8, i64 0}
!23 = !{!"_ZTSN6ruckig7Profile12ControlSignsE", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass