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

; 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::PositionSecondOrderStep1" = type { double, double, double, double, double, double, double, %"struct.std::array" }
%"struct.std::array" = type { [3 x %"class.ruckig::Profile"] }
%"class.ruckig::Profile" = type <{ %"struct.std::array.0", %"struct.std::array.0", %"struct.std::array.0", %"struct.std::array.1", %"struct.std::array.1", %"struct.std::array.1", %"class.ruckig::BrakeProfile", %"class.ruckig::BrakeProfile", double, double, double, i32, i32, i32, [4 x i8] }>
%"struct.std::array.0" = type { [7 x double] }
%"struct.std::array.1" = type { [8 x double] }
%"class.ruckig::BrakeProfile" = type { double, %"struct.std::array.2", %"struct.std::array.2", %"struct.std::array.2", %"struct.std::array.2", %"struct.std::array.2" }
%"struct.std::array.2" = type { [2 x double] }

; 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) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6ruckig24PositionSecondOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6ruckig24PositionSecondOrderStep19time_noneERPNS_7ProfileEddddb(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, i1 noundef zeroext %6) #3 align 2 {
  %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 i8, align 1
  %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 = zext i1 %6 to i8
  store i8 %17, ptr %14, align 1, !tbaa !11
  %18 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %19 = load double, ptr %12, align 8, !tbaa !9
  %20 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 1
  %21 = load double, ptr %20, align 8, !tbaa !13
  %22 = fmul double %19, %21
  %23 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 1
  %24 = load double, ptr %23, align 8, !tbaa !13
  %25 = load double, ptr %13, align 8, !tbaa !9
  %26 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 0
  %27 = load double, ptr %26, align 8, !tbaa !16
  %28 = fmul double %25, %27
  %29 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 0
  %30 = load double, ptr %29, align 8, !tbaa !16
  %31 = fmul double %28, %30
  %32 = fneg double %31
  %33 = call double @llvm.fmuladd.f64(double %22, double %24, double %32)
  %34 = load double, ptr %12, align 8, !tbaa !9
  %35 = fmul double 2.000000e+00, %34
  %36 = load double, ptr %13, align 8, !tbaa !9
  %37 = fmul double %35, %36
  %38 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 6
  %39 = load double, ptr %38, align 8, !tbaa !17
  %40 = fneg double %37
  %41 = call double @llvm.fmuladd.f64(double %40, double %39, double %33)
  %42 = load double, ptr %12, align 8, !tbaa !9
  %43 = load double, ptr %13, align 8, !tbaa !9
  %44 = fsub double %42, %43
  %45 = fdiv double %41, %44
  store double %45, ptr %15, align 8, !tbaa !9
  %46 = load double, ptr %15, align 8, !tbaa !9
  %47 = fcmp oge double %46, 0.000000e+00
  br i1 %47, label %48, label %157

48:                                               ; preds = %7
  %49 = load double, ptr %15, align 8, !tbaa !9
  %50 = call double @sqrt(double noundef %49) #6
  store double %50, ptr %15, align 8, !tbaa !9
  %51 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 0
  %52 = load double, ptr %51, align 8, !tbaa !16
  %53 = load double, ptr %15, align 8, !tbaa !9
  %54 = fadd double %52, %53
  %55 = fneg double %54
  %56 = load double, ptr %12, align 8, !tbaa !9
  %57 = fdiv double %55, %56
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.ruckig::Profile", ptr %59, i32 0, i32 0
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %60, i64 noundef 0) #6
  store double %57, ptr %61, align 8, !tbaa !9
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = getelementptr inbounds %"class.ruckig::Profile", ptr %63, i32 0, i32 0
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %64, i64 noundef 1) #6
  store double 0.000000e+00, ptr %65, align 8, !tbaa !9
  %66 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 1
  %67 = load double, ptr %66, align 8, !tbaa !13
  %68 = load double, ptr %15, align 8, !tbaa !9
  %69 = fadd double %67, %68
  %70 = load double, ptr %13, align 8, !tbaa !9
  %71 = fdiv double %69, %70
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.ruckig::Profile", ptr %73, i32 0, i32 0
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %74, i64 noundef 2) #6
  store double %71, ptr %75, align 8, !tbaa !9
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.ruckig::Profile", ptr %77, i32 0, i32 0
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %78, i64 noundef 3) #6
  store double 0.000000e+00, ptr %79, align 8, !tbaa !9
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.ruckig::Profile", ptr %81, i32 0, i32 0
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %82, i64 noundef 4) #6
  store double 0.000000e+00, ptr %83, align 8, !tbaa !9
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds %"class.ruckig::Profile", ptr %85, i32 0, i32 0
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %86, i64 noundef 5) #6
  store double 0.000000e+00, ptr %87, align 8, !tbaa !9
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds %"class.ruckig::Profile", ptr %89, i32 0, i32 0
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %90, i64 noundef 6) #6
  store double 0.000000e+00, ptr %91, align 8, !tbaa !9
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = load double, ptr %12, align 8, !tbaa !9
  %95 = load double, ptr %13, align 8, !tbaa !9
  %96 = load double, ptr %10, align 8, !tbaa !9
  %97 = load double, ptr %11, align 8, !tbaa !9
  %98 = call noundef zeroext i1 @_ZN6ruckig7Profile22check_for_second_orderILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %93, double noundef %94, double noundef %95, double noundef %96, double noundef %97)
  br i1 %98, label %99, label %105

99:                                               ; preds = %48
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK6ruckig24PositionSecondOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(1784) %18, ptr noundef nonnull align 8 dereferenceable(8) %100)
  %101 = load i8, ptr %14, align 1, !tbaa !11, !range !18, !noundef !19
  %102 = trunc i8 %101 to i1
  br i1 %102, label %103, label %104

103:                                              ; preds = %99
  store i32 1, ptr %16, align 4
  br label %158

104:                                              ; preds = %99
  br label %105

105:                                              ; preds = %104, %48
  %106 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 0
  %107 = load double, ptr %106, align 8, !tbaa !16
  %108 = fneg double %107
  %109 = load double, ptr %15, align 8, !tbaa !9
  %110 = fadd double %108, %109
  %111 = load double, ptr %12, align 8, !tbaa !9
  %112 = fdiv double %110, %111
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = getelementptr inbounds %"class.ruckig::Profile", ptr %114, i32 0, i32 0
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %115, i64 noundef 0) #6
  store double %112, ptr %116, align 8, !tbaa !9
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = getelementptr inbounds %"class.ruckig::Profile", ptr %118, i32 0, i32 0
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %119, i64 noundef 1) #6
  store double 0.000000e+00, ptr %120, align 8, !tbaa !9
  %121 = getelementptr inbounds %"class.ruckig::PositionSecondOrderStep1", ptr %18, i32 0, i32 1
  %122 = load double, ptr %121, align 8, !tbaa !13
  %123 = load double, ptr %15, align 8, !tbaa !9
  %124 = fsub double %122, %123
  %125 = load double, ptr %13, align 8, !tbaa !9
  %126 = fdiv double %124, %125
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.ruckig::Profile", ptr %128, i32 0, i32 0
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %129, i64 noundef 2) #6
  store double %126, ptr %130, align 8, !tbaa !9
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = getelementptr inbounds %"class.ruckig::Profile", ptr %132, i32 0, i32 0
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %133, i64 noundef 3) #6
  store double 0.000000e+00, ptr %134, align 8, !tbaa !9
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.ruckig::Profile", ptr %136, i32 0, i32 0
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %137, i64 noundef 4) #6
  store double 0.000000e+00, ptr %138, align 8, !tbaa !9
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = getelementptr inbounds %"class.ruckig::Profile", ptr %140, i32 0, i32 0
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %141, i64 noundef 5) #6
  store double 0.000000e+00, ptr %142, align 8, !tbaa !9
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = load ptr, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds %"class.ruckig::Profile", ptr %144, i32 0, i32 0
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %145, i64 noundef 6) #6
  store double 0.000000e+00, ptr %146, align 8, !tbaa !9
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load double, ptr %12, align 8, !tbaa !9
  %150 = load double, ptr %13, align 8, !tbaa !9
  %151 = load double, ptr %10, align 8, !tbaa !9
  %152 = load double, ptr %11, align 8, !tbaa !9
  %153 = call noundef zeroext i1 @_ZN6ruckig7Profile22check_for_second_orderILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %148, double noundef %149, double noundef %150, double noundef %151, double noundef %152)
  br i1 %153, label %154, label %156

154:                                              ; preds = %105
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK6ruckig24PositionSecondOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(1784) %18, ptr noundef nonnull align 8 dereferenceable(8) %155)
  br label %156

156:                                              ; preds = %154, %105
  br label %157

157:                                              ; preds = %156, %7
  store i32 0, ptr %16, align 4
  br label %158

158:                                              ; preds = %157, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %159 = load i32, ptr %16, align 4
  switch i32 %159, label %161 [
    i32 0, label %160
    i32 1, label %160
  ]

160:                                              ; preds = %158, %158
  ret void

161:                                              ; preds = %158
  unreachable
}

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

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

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

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

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTSN6ruckig24PositionSecondOrderStep1E", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !15, i64 56}
!15 = !{!"_ZTSSt5arrayIN6ruckig7ProfileELm3EE", !7, i64 0}
!16 = !{!14, !10, i64 0}
!17 = !{!14, !10, i64 48}
!18 = !{i8 0, i8 2}
!19 = !{}


; 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 uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56), i64 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: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6ruckig24PositionSecondOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(1784), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6ruckig24PositionSecondOrderStep19time_noneERPNS_7ProfileEddddb(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, i1 noundef zeroext %6) local_unnamed_addr #3 align 2 {
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load double, ptr %8, align 8, !tbaa !5
  %10 = fmul double %9, %4
  %11 = load double, ptr %0, align 8, !tbaa !11
  %12 = fneg double %11
  %13 = fmul double %12, %5
  %14 = fmul double %11, %13
  %15 = tail call double @llvm.fmuladd.f64(double %10, double %9, double %14)
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = load double, ptr %16, align 8, !tbaa !12
  %18 = fmul double %4, -2.000000e+00
  %19 = fmul double %18, %5
  %20 = tail call double @llvm.fmuladd.f64(double %19, double %17, double %15)
  %21 = fsub double %4, %5
  %22 = fdiv double %20, %21
  %23 = fcmp ult double %22, 0.000000e+00
  br i1 %23, label %74, label %24

24:                                               ; preds = %7
  %25 = tail call double @sqrt(double noundef %22) #5
  %26 = load double, ptr %0, align 8, !tbaa !11
  %27 = fadd double %25, %26
  %28 = fneg double %27
  %29 = fdiv double %28, %4
  %30 = load ptr, ptr %1, align 8, !tbaa !13
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %30, i64 noundef 0) #5
  store double %29, ptr %31, align 8, !tbaa !15
  %32 = load ptr, ptr %1, align 8, !tbaa !13
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %32, i64 noundef 1) #5
  store double 0.000000e+00, ptr %33, align 8, !tbaa !15
  %34 = load double, ptr %8, align 8, !tbaa !5
  %35 = fadd double %25, %34
  %36 = fdiv double %35, %5
  %37 = load ptr, ptr %1, align 8, !tbaa !13
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %37, i64 noundef 2) #5
  store double %36, ptr %38, align 8, !tbaa !15
  %39 = load ptr, ptr %1, align 8, !tbaa !13
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %39, i64 noundef 3) #5
  store double 0.000000e+00, ptr %40, align 8, !tbaa !15
  %41 = load ptr, ptr %1, align 8, !tbaa !13
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %41, i64 noundef 4) #5
  store double 0.000000e+00, ptr %42, align 8, !tbaa !15
  %43 = load ptr, ptr %1, align 8, !tbaa !13
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %43, i64 noundef 5) #5
  store double 0.000000e+00, ptr %44, align 8, !tbaa !15
  %45 = load ptr, ptr %1, align 8, !tbaa !13
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %45, i64 noundef 6) #5
  store double 0.000000e+00, ptr %46, align 8, !tbaa !15
  %47 = load ptr, ptr %1, align 8, !tbaa !13
  %48 = tail call noundef zeroext i1 @_ZN6ruckig7Profile22check_for_second_orderILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %47, double noundef %4, double noundef %5, double noundef %2, double noundef %3)
  br i1 %48, label %49, label %50

49:                                               ; preds = %24
  tail call void @_ZNK6ruckig24PositionSecondOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  br i1 %6, label %74, label %50

50:                                               ; preds = %49, %24
  %51 = load double, ptr %0, align 8, !tbaa !11
  %52 = fsub double %25, %51
  %53 = fdiv double %52, %4
  %54 = load ptr, ptr %1, align 8, !tbaa !13
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %54, i64 noundef 0) #5
  store double %53, ptr %55, align 8, !tbaa !15
  %56 = load ptr, ptr %1, align 8, !tbaa !13
  %57 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %56, i64 noundef 1) #5
  store double 0.000000e+00, ptr %57, align 8, !tbaa !15
  %58 = load double, ptr %8, align 8, !tbaa !5
  %59 = fsub double %58, %25
  %60 = fdiv double %59, %5
  %61 = load ptr, ptr %1, align 8, !tbaa !13
  %62 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %61, i64 noundef 2) #5
  store double %60, ptr %62, align 8, !tbaa !15
  %63 = load ptr, ptr %1, align 8, !tbaa !13
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %63, i64 noundef 3) #5
  store double 0.000000e+00, ptr %64, align 8, !tbaa !15
  %65 = load ptr, ptr %1, align 8, !tbaa !13
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %65, i64 noundef 4) #5
  store double 0.000000e+00, ptr %66, align 8, !tbaa !15
  %67 = load ptr, ptr %1, align 8, !tbaa !13
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %67, i64 noundef 5) #5
  store double 0.000000e+00, ptr %68, align 8, !tbaa !15
  %69 = load ptr, ptr %1, align 8, !tbaa !13
  %70 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %69, i64 noundef 6) #5
  store double 0.000000e+00, ptr %70, align 8, !tbaa !15
  %71 = load ptr, ptr %1, align 8, !tbaa !13
  %72 = tail call noundef zeroext i1 @_ZN6ruckig7Profile22check_for_second_orderILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE7EEEbdddd(ptr noundef nonnull align 8 dereferenceable(572) %71, double noundef %4, double noundef %5, double noundef %2, double noundef %3)
  br i1 %72, label %73, label %74

73:                                               ; preds = %50
  tail call void @_ZNK6ruckig24PositionSecondOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(1784) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  br label %74

74:                                               ; preds = %7, %73, %50, %49
  ret void
}

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

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

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 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 = { 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 #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 8}
!6 = !{!"_ZTSN6ruckig24PositionSecondOrderStep1E", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt5arrayIN6ruckig7ProfileELm3EE", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 48}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass