; LLVM IR from pantor/ruckig :: src/ruckig (position_second_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::PositionSecondOrderStep2" = type { double, 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 @_ZN6ruckig24PositionSecondOrderStep29time_noneERNS_7ProfileEdddd(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) #3 align 2 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store double %2, ptr %10, align 8, !tbaa !9
  store double %3, ptr %11, align 8, !tbaa !9
  store double %4, ptr %12, align 8, !tbaa !9
  store double %5, ptr %13, align 8, !tbaa !9
  %17 = load ptr, ptr %8, align 8
  %18 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep2", ptr %17, i32 0, i32 0
  %19 = load double, ptr %18, align 8, !tbaa !11
  %20 = call noundef double @_ZSt3absd(double noundef %19)
  %21 = fcmp olt double %20, 0x3CB0000000000000
  br i1 %21, label %22, label %72

22:                                               ; preds = %6
  %23 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep2", ptr %17, i32 0, i32 2
  %24 = load double, ptr %23, align 8, !tbaa !13
  %25 = call noundef double @_ZSt3absd(double noundef %24)
  %26 = fcmp olt double %25, 0x3CB0000000000000
  br i1 %26, label %27, label %72

27:                                               ; preds = %22
  %28 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep2", ptr %17, i32 0, i32 7
  %29 = load double, ptr %28, align 8, !tbaa !14
  %30 = call noundef double @_ZSt3absd(double noundef %29)
  %31 = fcmp olt double %30, 0x3CB0000000000000
  br i1 %31, label %32, label %72

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

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

71:                                               ; preds = %32
  br label %72

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

125:                                              ; preds = %72
  %126 = load double, ptr %15, align 8, !tbaa !9
  %127 = load double, ptr %12, align 8, !tbaa !9
  %128 = fadd double %127, 0x3D719799812DEA11
  %129 = fcmp olt double %126, %128
  br i1 %129, label %130, label %147

130:                                              ; preds = %125
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep2", ptr %17, i32 0, i32 1
  %133 = load double, ptr %132, align 8, !tbaa !15
  %134 = load double, ptr %15, align 8, !tbaa !9
  %135 = load double, ptr %15, align 8, !tbaa !9
  %136 = fneg double %135
  %137 = load double, ptr %10, align 8, !tbaa !9
  %138 = load double, ptr %11, align 8, !tbaa !9
  %139 = call noundef zeroext i1 @_ZN6ruckig7Profile34check_for_second_order_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572) %131, double noundef %133, double noundef %134, double noundef %136, double noundef %137, double noundef %138)
  br i1 %139, label %140, label %147

140:                                              ; preds = %130
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %"class.ruckig::Profile", ptr %141, i32 0, i32 5
  %143 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm8EE4backEv(ptr noundef nonnull align 8 dereferenceable(64) %142) #6
  %144 = load double, ptr %143, align 8, !tbaa !9
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %"class.ruckig::Profile", ptr %145, i32 0, i32 8
  store double %144, ptr %146, align 8, !tbaa !16
  store i1 true, ptr %7, align 1
  store i32 1, ptr %16, align 4
  br label %148

147:                                              ; preds = %130, %125, %72
  store i32 0, ptr %16, align 4
  br label %148

148:                                              ; preds = %147, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %149 = load i32, ptr %16, align 4
  switch i32 %149, label %153 [
    i32 0, label %150
    i32 1, label %151
  ]

150:                                              ; preds = %148
  store i1 false, ptr %7, align 1
  br label %151

151:                                              ; preds = %150, %148, %64
  %152 = load i1, ptr %7, align 1
  ret i1 %152

153:                                              ; preds = %148
  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 @_ZN6ruckig7Profile34check_for_second_order_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572), double noundef, 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 = !{!"_ZTSN6ruckig24PositionSecondOrderStep2E", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!13 = !{!12, !10, i64 16}
!14 = !{!12, !10, i64 56}
!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 64}


; 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 @_ZN6ruckig24PositionSecondOrderStep29time_noneERNS_7ProfileEdddd(ptr nocapture noundef nonnull readonly align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) local_unnamed_addr #2 align 2 {
  %7 = load double, ptr %0, align 8, !tbaa !5
  %8 = tail call noundef double @_ZSt3absd(double noundef %7)
  %9 = fcmp olt double %8, 0x3CB0000000000000
  br i1 %9, label %10, label %32

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

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

20:                                               ; preds = %15
  %21 = 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 %21, align 8, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = load double, ptr %22, align 8, !tbaa !13
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 1) #5
  store double %23, 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 2) #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 3) #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 4) #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 5) #5
  store double 0.000000e+00, ptr %28, align 8, !tbaa !12
  %29 = 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 %29, align 8, !tbaa !12
  %30 = load double, ptr %22, align 8, !tbaa !13
  %31 = tail call noundef zeroext i1 @_ZN6ruckig7Profile34check_for_second_order_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %30, double noundef %4, double noundef %5, double noundef %2, double noundef %3)
  br i1 %31, label %.sink.split, label %32

32:                                               ; preds = %20, %15, %10, %6
  %33 = getelementptr inbounds i8, ptr %0, i64 16
  %34 = load double, ptr %33, align 8, !tbaa !10
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = load double, ptr %35, align 8, !tbaa !13
  %37 = getelementptr inbounds i8, ptr %0, i64 56
  %38 = load double, ptr %37, align 8, !tbaa !11
  %39 = fneg double %38
  %40 = tail call double @llvm.fmuladd.f64(double %34, double %36, double %39)
  %41 = fmul double %40, 2.000000e+00
  %42 = getelementptr inbounds i8, ptr %0, i64 64
  %43 = load double, ptr %42, align 8, !tbaa !14
  %44 = fdiv double %41, %43
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 0) #5
  store double %44, ptr %45, align 8, !tbaa !12
  %46 = load double, ptr %35, align 8, !tbaa !13
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 0) #5
  %48 = load double, ptr %47, align 8, !tbaa !12
  %49 = fsub double %46, %48
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %1, i64 noundef 1) #5
  store double %49, 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 2) #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 3) #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 4) #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 5) #5
  store double 0.000000e+00, ptr %54, align 8, !tbaa !12
  %55 = 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 %55, align 8, !tbaa !12
  %56 = load double, ptr %42, align 8, !tbaa !14
  %57 = fmul double %56, %56
  %58 = fdiv double %57, %41
  %59 = fadd double %5, 0xBD719799812DEA11
  %60 = fcmp olt double %59, %58
  %61 = fadd double %4, 0x3D719799812DEA11
  %62 = fcmp olt double %58, %61
  %or.cond = and i1 %60, %62
  br i1 %or.cond, label %63, label %71

63:                                               ; preds = %32
  %64 = load double, ptr %35, align 8, !tbaa !13
  %65 = fneg double %58
  %66 = tail call noundef zeroext i1 @_ZN6ruckig7Profile34check_for_second_order_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572) %1, double noundef %64, double noundef %58, double noundef %65, double noundef %2, double noundef %3)
  br i1 %66, label %.sink.split, label %71

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

71:                                               ; preds = %.sink.split, %63, %32
  %.1 = phi i1 [ false, %63 ], [ false, %32 ], [ 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 @_ZN6ruckig7Profile34check_for_second_order_with_timingILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572), double noundef, 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 = !{!"_ZTSN6ruckig24PositionSecondOrderStep2E", !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, i64 64}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 16}
!11 = !{!6, !7, i64 56}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 64}
!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