; LLVM IR from pantor/ruckig :: src/ruckig (position_third_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::PositionThirdOrderStep1" = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, %"struct.std::array" }
%"struct.std::array" = type { [6 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 @_ZNK6ruckig23PositionThirdOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(3608), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6ruckig7Profile5checkILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE1ELb0EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572), double noundef, 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) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6ruckig23PositionThirdOrderStep117time_vel_two_stepERPNS_7ProfileEddddd(ptr noundef nonnull align 8 dereferenceable(3608) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6) #5 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 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
  store double %6, ptr %14, align 8, !tbaa !9
  %17 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %18 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 15
  %19 = load double, ptr %18, align 8, !tbaa !11
  %20 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 18
  %21 = load double, ptr %20, align 8, !tbaa !14
  %22 = fmul double 2.000000e+00, %21
  %23 = fdiv double %19, %22
  %24 = load double, ptr %10, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 2
  %26 = load double, ptr %25, align 8, !tbaa !15
  %27 = fsub double %24, %26
  %28 = load double, ptr %14, align 8, !tbaa !9
  %29 = fdiv double %27, %28
  %30 = fadd double %23, %29
  %31 = call double @sqrt(double noundef %30) #6
  store double %31, ptr %15, align 8, !tbaa !9
  %32 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 1
  %33 = load double, ptr %32, align 8, !tbaa !16
  %34 = fneg double %33
  %35 = load double, ptr %14, align 8, !tbaa !9
  %36 = fdiv double %34, %35
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = load ptr, ptr %37, 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 0) #6
  store double %36, ptr %40, align 8, !tbaa !9
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = load ptr, ptr %41, 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 1) #6
  store double 0.000000e+00, ptr %44, align 8, !tbaa !9
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.ruckig::Profile", ptr %46, i32 0, i32 0
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %47, i64 noundef 2) #6
  store double 0.000000e+00, ptr %48, align 8, !tbaa !9
  %49 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 16
  %50 = load double, ptr %49, align 8, !tbaa !17
  %51 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 13
  %52 = load double, ptr %51, align 8, !tbaa !18
  %53 = fsub double %50, %52
  %54 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 18
  %55 = load double, ptr %54, align 8, !tbaa !14
  %56 = fmul double 3.000000e+00, %55
  %57 = load double, ptr %10, align 8, !tbaa !9
  %58 = fmul double %56, %57
  %59 = fdiv double %53, %58
  %60 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 1
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 0
  %63 = load double, ptr %62, align 8, !tbaa !19
  %64 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 3
  %65 = load double, ptr %64, align 8, !tbaa !20
  %66 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 2
  %67 = load double, ptr %66, align 8, !tbaa !15
  %68 = fmul double %65, %67
  %69 = fneg double %68
  %70 = call double @llvm.fmuladd.f64(double %61, double %63, double %69)
  %71 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 15
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = load double, ptr %15, align 8, !tbaa !9
  %74 = fmul double %72, %73
  %75 = fdiv double %74, 2.000000e+00
  %76 = fadd double %70, %75
  %77 = load double, ptr %14, align 8, !tbaa !9
  %78 = load double, ptr %10, align 8, !tbaa !9
  %79 = fmul double %77, %78
  %80 = fdiv double %76, %79
  %81 = fadd double %59, %80
  %82 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 2
  %83 = load double, ptr %82, align 8, !tbaa !15
  %84 = load double, ptr %10, align 8, !tbaa !9
  %85 = fdiv double %83, %84
  %86 = fadd double %85, 1.000000e+00
  %87 = load double, ptr %15, align 8, !tbaa !9
  %88 = fneg double %86
  %89 = call double @llvm.fmuladd.f64(double %88, double %87, double %81)
  %90 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 9
  %91 = load double, ptr %90, align 8, !tbaa !21
  %92 = load double, ptr %10, align 8, !tbaa !9
  %93 = fdiv double %91, %92
  %94 = fadd double %89, %93
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = load ptr, ptr %95, 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 3) #6
  store double %94, ptr %98, align 8, !tbaa !9
  %99 = load double, ptr %15, align 8, !tbaa !9
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.ruckig::Profile", ptr %101, i32 0, i32 0
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %102, i64 noundef 4) #6
  store double %99, ptr %103, align 8, !tbaa !9
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = load ptr, ptr %104, 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 double, ptr %15, align 8, !tbaa !9
  %109 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 3
  %110 = load double, ptr %109, align 8, !tbaa !20
  %111 = load double, ptr %14, align 8, !tbaa !9
  %112 = fdiv double %110, %111
  %113 = fadd double %108, %112
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %"class.ruckig::Profile", ptr %115, i32 0, i32 0
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %116, i64 noundef 6) #6
  store double %113, ptr %117, align 8, !tbaa !9
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load double, ptr %14, align 8, !tbaa !9
  %121 = load double, ptr %10, align 8, !tbaa !9
  %122 = load double, ptr %11, align 8, !tbaa !9
  %123 = load double, ptr %12, align 8, !tbaa !9
  %124 = load double, ptr %13, align 8, !tbaa !9
  %125 = call noundef zeroext i1 @_ZN6ruckig7Profile5checkILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE1ELb0EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572) %119, double noundef %120, double noundef %121, double noundef %122, double noundef %123, double noundef %124)
  br i1 %125, label %126, label %128

126:                                              ; preds = %7
  %127 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK6ruckig23PositionThirdOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(3608) %17, ptr noundef nonnull align 8 dereferenceable(8) %127)
  store i32 1, ptr %16, align 4
  br label %240

128:                                              ; preds = %7
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = getelementptr inbounds %"class.ruckig::Profile", ptr %130, i32 0, i32 0
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %131, i64 noundef 0) #6
  store double 0.000000e+00, ptr %132, align 8, !tbaa !9
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  %135 = getelementptr inbounds %"class.ruckig::Profile", ptr %134, i32 0, i32 0
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %135, i64 noundef 1) #6
  store double 0.000000e+00, ptr %136, align 8, !tbaa !9
  %137 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 1
  %138 = load double, ptr %137, align 8, !tbaa !16
  %139 = load double, ptr %14, align 8, !tbaa !9
  %140 = fdiv double %138, %139
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = getelementptr inbounds %"class.ruckig::Profile", ptr %142, i32 0, i32 0
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %143, i64 noundef 2) #6
  store double %140, ptr %144, align 8, !tbaa !9
  %145 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 16
  %146 = load double, ptr %145, align 8, !tbaa !17
  %147 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 13
  %148 = load double, ptr %147, align 8, !tbaa !18
  %149 = fsub double %146, %148
  %150 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 18
  %151 = load double, ptr %150, align 8, !tbaa !14
  %152 = fmul double 3.000000e+00, %151
  %153 = load double, ptr %10, align 8, !tbaa !9
  %154 = fmul double %152, %153
  %155 = fdiv double %149, %154
  %156 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 1
  %157 = load double, ptr %156, align 8, !tbaa !16
  %158 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 0
  %159 = load double, ptr %158, align 8, !tbaa !19
  %160 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 3
  %161 = load double, ptr %160, align 8, !tbaa !20
  %162 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 2
  %163 = load double, ptr %162, align 8, !tbaa !15
  %164 = fmul double %161, %163
  %165 = fneg double %164
  %166 = call double @llvm.fmuladd.f64(double %157, double %159, double %165)
  %167 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 15
  %168 = load double, ptr %167, align 8, !tbaa !11
  %169 = load double, ptr %15, align 8, !tbaa !9
  %170 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 13
  %171 = load double, ptr %170, align 8, !tbaa !18
  %172 = load double, ptr %14, align 8, !tbaa !9
  %173 = fdiv double %171, %172
  %174 = call double @llvm.fmuladd.f64(double %168, double %169, double %173)
  %175 = fdiv double %174, 2.000000e+00
  %176 = fadd double %166, %175
  %177 = load double, ptr %14, align 8, !tbaa !9
  %178 = load double, ptr %10, align 8, !tbaa !9
  %179 = fmul double %177, %178
  %180 = fdiv double %176, %179
  %181 = fadd double %155, %180
  %182 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 0
  %183 = load double, ptr %182, align 8, !tbaa !19
  %184 = load double, ptr %10, align 8, !tbaa !9
  %185 = fdiv double %183, %184
  %186 = fadd double %185, 1.000000e+00
  %187 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 1
  %188 = load double, ptr %187, align 8, !tbaa !16
  %189 = fmul double %186, %188
  %190 = load double, ptr %14, align 8, !tbaa !9
  %191 = fdiv double %189, %190
  %192 = fsub double %181, %191
  %193 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 2
  %194 = load double, ptr %193, align 8, !tbaa !15
  %195 = load double, ptr %10, align 8, !tbaa !9
  %196 = fdiv double %194, %195
  %197 = fadd double %196, 1.000000e+00
  %198 = load double, ptr %15, align 8, !tbaa !9
  %199 = fneg double %197
  %200 = call double @llvm.fmuladd.f64(double %199, double %198, double %192)
  %201 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 9
  %202 = load double, ptr %201, align 8, !tbaa !21
  %203 = load double, ptr %10, align 8, !tbaa !9
  %204 = fdiv double %202, %203
  %205 = fadd double %200, %204
  %206 = load ptr, ptr %9, align 8, !tbaa !5
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  %208 = getelementptr inbounds %"class.ruckig::Profile", ptr %207, i32 0, i32 0
  %209 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %208, i64 noundef 3) #6
  store double %205, ptr %209, align 8, !tbaa !9
  %210 = load double, ptr %15, align 8, !tbaa !9
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = load ptr, ptr %211, align 8, !tbaa !5
  %213 = getelementptr inbounds %"class.ruckig::Profile", ptr %212, i32 0, i32 0
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %213, i64 noundef 4) #6
  store double %210, ptr %214, align 8, !tbaa !9
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = load ptr, ptr %215, align 8, !tbaa !5
  %217 = getelementptr inbounds %"class.ruckig::Profile", ptr %216, i32 0, i32 0
  %218 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %217, i64 noundef 5) #6
  store double 0.000000e+00, ptr %218, align 8, !tbaa !9
  %219 = load double, ptr %15, align 8, !tbaa !9
  %220 = getelementptr inbounds %"class.ruckig::PositionThirdOrderStep1", ptr %17, i32 0, i32 3
  %221 = load double, ptr %220, align 8, !tbaa !20
  %222 = load double, ptr %14, align 8, !tbaa !9
  %223 = fdiv double %221, %222
  %224 = fadd double %219, %223
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  %227 = getelementptr inbounds %"class.ruckig::Profile", ptr %226, i32 0, i32 0
  %228 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %227, i64 noundef 6) #6
  store double %224, ptr %228, align 8, !tbaa !9
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  %230 = load ptr, ptr %229, align 8, !tbaa !5
  %231 = load double, ptr %14, align 8, !tbaa !9
  %232 = load double, ptr %10, align 8, !tbaa !9
  %233 = load double, ptr %11, align 8, !tbaa !9
  %234 = load double, ptr %12, align 8, !tbaa !9
  %235 = load double, ptr %13, align 8, !tbaa !9
  %236 = call noundef zeroext i1 @_ZN6ruckig7Profile5checkILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE1ELb0EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572) %230, double noundef %231, double noundef %232, double noundef %233, double noundef %234, double noundef %235)
  br i1 %236, label %237, label %239

237:                                              ; preds = %128
  %238 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK6ruckig23PositionThirdOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(3608) %17, ptr noundef nonnull align 8 dereferenceable(8) %238)
  store i32 1, ptr %16, align 4
  br label %240

239:                                              ; preds = %128
  store i32 0, ptr %16, align 4
  br label %240

240:                                              ; preds = %239, %237, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %241 = load i32, ptr %16, align 4
  switch i32 %241, label %243 [
    i32 0, label %242
    i32 1, label %242
  ]

242:                                              ; preds = %240, %240
  ret void

243:                                              ; preds = %240
  unreachable
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 120}
!12 = !{!"_ZTSN6ruckig23PositionThirdOrderStep1E", !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, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !13, i64 152}
!13 = !{!"_ZTSSt5arrayIN6ruckig7ProfileELm6EE", !7, i64 0}
!14 = !{!12, !10, i64 144}
!15 = !{!12, !10, i64 16}
!16 = !{!12, !10, i64 8}
!17 = !{!12, !10, i64 128}
!18 = !{!12, !10, i64 104}
!19 = !{!12, !10, i64 0}
!20 = !{!12, !10, i64 24}
!21 = !{!12, !10, i64 72}


; 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 @_ZNK6ruckig23PositionThirdOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(3608), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6ruckig23PositionThirdOrderStep117time_vel_two_stepERPNS_7ProfileEddddd(ptr noundef nonnull align 8 dereferenceable(3608) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6) local_unnamed_addr #4 align 2 {
  %8 = getelementptr inbounds i8, ptr %0, i64 120
  %9 = load <2 x double>, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 144
  %11 = load double, ptr %10, align 8, !tbaa !5
  %12 = fmul double %11, 2.000000e+00
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load double, ptr %13, align 8, !tbaa !11
  %15 = fsub double %2, %14
  %16 = insertelement <2 x double> %9, double %15, i64 1
  %17 = insertelement <2 x double> poison, double %6, i64 1
  %18 = insertelement <2 x double> %17, double %12, i64 0
  %19 = fdiv <2 x double> %16, %18
  %shift = shufflevector <2 x double> %19, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %20 = fadd <2 x double> %19, %shift
  %21 = extractelement <2 x double> %20, i64 0
  %22 = tail call double @sqrt(double noundef %21) #5
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load double, ptr %23, align 8, !tbaa !12
  %25 = fneg double %24
  %26 = fdiv double %25, %6
  %27 = load ptr, ptr %1, align 8, !tbaa !13
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %27, i64 noundef 0) #5
  store double %26, ptr %28, align 8, !tbaa !15
  %29 = load ptr, ptr %1, align 8, !tbaa !13
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %29, i64 noundef 1) #5
  store double 0.000000e+00, ptr %30, align 8, !tbaa !15
  %31 = load ptr, ptr %1, align 8, !tbaa !13
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %31, i64 noundef 2) #5
  store double 0.000000e+00, ptr %32, align 8, !tbaa !15
  %33 = getelementptr inbounds i8, ptr %0, i64 128
  %34 = load double, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds i8, ptr %0, i64 104
  %36 = load double, ptr %35, align 8, !tbaa !17
  %37 = fsub double %34, %36
  %38 = load double, ptr %10, align 8, !tbaa !5
  %39 = fmul double %38, 3.000000e+00
  %40 = load double, ptr %23, align 8, !tbaa !12
  %41 = load double, ptr %0, align 8, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %0, i64 24
  %43 = load double, ptr %42, align 8, !tbaa !19
  %44 = load double, ptr %13, align 8, !tbaa !11
  %45 = fneg double %43
  %46 = fmul double %44, %45
  %47 = tail call double @llvm.fmuladd.f64(double %40, double %41, double %46)
  %48 = load double, ptr %8, align 8, !tbaa !20
  %49 = fmul double %22, %48
  %50 = fmul double %49, 5.000000e-01
  %51 = fadd double %47, %50
  %52 = insertelement <2 x double> poison, double %2, i64 0
  %53 = shufflevector <2 x double> %52, <2 x double> poison, <2 x i32> zeroinitializer
  %54 = insertelement <2 x double> %17, double %39, i64 0
  %55 = fmul <2 x double> %53, %54
  %56 = insertelement <2 x double> poison, double %37, i64 0
  %57 = insertelement <2 x double> %56, double %51, i64 1
  %58 = fdiv <2 x double> %57, %55
  %shift56 = shufflevector <2 x double> %58, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %59 = fadd <2 x double> %58, %shift56
  %60 = extractelement <2 x double> %59, i64 0
  %61 = fdiv double %44, %2
  %62 = fadd double %61, 1.000000e+00
  %63 = fneg double %62
  %64 = tail call double @llvm.fmuladd.f64(double %63, double %22, double %60)
  %65 = getelementptr inbounds i8, ptr %0, i64 72
  %66 = load double, ptr %65, align 8, !tbaa !21
  %67 = fdiv double %66, %2
  %68 = fadd double %67, %64
  %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 3) #5
  store double %68, ptr %70, align 8, !tbaa !15
  %71 = load ptr, ptr %1, align 8, !tbaa !13
  %72 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %71, i64 noundef 4) #5
  store double %22, ptr %72, align 8, !tbaa !15
  %73 = load ptr, ptr %1, align 8, !tbaa !13
  %74 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %73, i64 noundef 5) #5
  store double 0.000000e+00, ptr %74, align 8, !tbaa !15
  %75 = load double, ptr %42, align 8, !tbaa !19
  %76 = fdiv double %75, %6
  %77 = fadd double %22, %76
  %78 = load ptr, ptr %1, align 8, !tbaa !13
  %79 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %78, i64 noundef 6) #5
  store double %77, ptr %79, align 8, !tbaa !15
  %80 = load ptr, ptr %1, align 8, !tbaa !13
  %81 = tail call noundef zeroext i1 @_ZN6ruckig7Profile5checkILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE1ELb0EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572) %80, double noundef %6, double noundef %2, double noundef %3, double noundef %4, double noundef %5)
  br i1 %81, label %.sink.split, label %82

82:                                               ; preds = %7
  %83 = load ptr, ptr %1, align 8, !tbaa !13
  %84 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %83, i64 noundef 0) #5
  store double 0.000000e+00, ptr %84, align 8, !tbaa !15
  %85 = load ptr, ptr %1, align 8, !tbaa !13
  %86 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %85, i64 noundef 1) #5
  store double 0.000000e+00, ptr %86, align 8, !tbaa !15
  %87 = load double, ptr %23, align 8, !tbaa !12
  %88 = fdiv double %87, %6
  %89 = load ptr, ptr %1, align 8, !tbaa !13
  %90 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %89, i64 noundef 2) #5
  store double %88, ptr %90, align 8, !tbaa !15
  %91 = load <2 x double>, ptr %33, align 8
  %92 = load double, ptr %35, align 8, !tbaa !17
  %93 = load double, ptr %10, align 8, !tbaa !5
  %94 = fmul double %93, 3.000000e+00
  %95 = fmul double %94, %2
  %96 = load double, ptr %23, align 8, !tbaa !12
  %97 = load double, ptr %0, align 8, !tbaa !18
  %98 = load double, ptr %42, align 8, !tbaa !19
  %99 = load double, ptr %13, align 8, !tbaa !11
  %100 = fneg double %98
  %101 = fmul double %99, %100
  %102 = tail call double @llvm.fmuladd.f64(double %96, double %97, double %101)
  %103 = load double, ptr %8, align 8, !tbaa !20
  %104 = fdiv double %92, %6
  %105 = tail call double @llvm.fmuladd.f64(double %103, double %22, double %104)
  %106 = fmul double %105, 5.000000e-01
  %107 = fadd double %102, %106
  %108 = extractelement <2 x double> %55, i64 1
  %109 = fdiv double %107, %108
  %110 = fdiv double %97, %2
  %111 = fadd double %110, 1.000000e+00
  %112 = insertelement <2 x double> %91, double %96, i64 1
  %113 = insertelement <2 x double> poison, double %92, i64 0
  %114 = insertelement <2 x double> %113, double %111, i64 1
  %115 = fsub <2 x double> %112, %114
  %116 = fmul <2 x double> %112, %114
  %117 = shufflevector <2 x double> %115, <2 x double> %116, <2 x i32> <i32 0, i32 3>
  %118 = insertelement <2 x double> %17, double %95, i64 0
  %119 = fdiv <2 x double> %117, %118
  %120 = extractelement <2 x double> %119, i64 0
  %121 = fadd double %120, %109
  %122 = extractelement <2 x double> %119, i64 1
  %123 = fsub double %121, %122
  %124 = fdiv double %99, %2
  %125 = fadd double %124, 1.000000e+00
  %126 = fneg double %125
  %127 = tail call double @llvm.fmuladd.f64(double %126, double %22, double %123)
  %128 = load double, ptr %65, align 8, !tbaa !21
  %129 = fdiv double %128, %2
  %130 = fadd double %129, %127
  %131 = load ptr, ptr %1, align 8, !tbaa !13
  %132 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %131, i64 noundef 3) #5
  store double %130, ptr %132, align 8, !tbaa !15
  %133 = load ptr, ptr %1, align 8, !tbaa !13
  %134 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %133, i64 noundef 4) #5
  store double %22, ptr %134, align 8, !tbaa !15
  %135 = load ptr, ptr %1, align 8, !tbaa !13
  %136 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %135, i64 noundef 5) #5
  store double 0.000000e+00, ptr %136, align 8, !tbaa !15
  %137 = load double, ptr %42, align 8, !tbaa !19
  %138 = fdiv double %137, %6
  %139 = fadd double %22, %138
  %140 = load ptr, ptr %1, align 8, !tbaa !13
  %141 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm7EEixEm(ptr noundef nonnull align 8 dereferenceable(56) %140, i64 noundef 6) #5
  store double %139, ptr %141, align 8, !tbaa !15
  %142 = load ptr, ptr %1, align 8, !tbaa !13
  %143 = tail call noundef zeroext i1 @_ZN6ruckig7Profile5checkILNS0_12ControlSignsE0ELNS0_13ReachedLimitsE1ELb0EEEbddddd(ptr noundef nonnull align 8 dereferenceable(572) %142, double noundef %6, double noundef %2, double noundef %3, double noundef %4, double noundef %5)
  br i1 %143, label %.sink.split, label %144

.sink.split:                                      ; preds = %82, %7
  tail call void @_ZNK6ruckig23PositionThirdOrderStep111add_profileERPNS_7ProfileE(ptr noundef nonnull align 8 dereferenceable(3608) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
  br label %144

144:                                              ; preds = %.sink.split, %82
  ret void
}

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 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 = { 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 144}
!6 = !{!"_ZTSN6ruckig23PositionThirdOrderStep1E", !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, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !10, i64 152}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt5arrayIN6ruckig7ProfileELm6EE", !8, i64 0}
!11 = !{!6, !7, i64 16}
!12 = !{!6, !7, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !7, i64 128}
!17 = !{!6, !7, i64 104}
!18 = !{!6, !7, i64 0}
!19 = !{!6, !7, i64 24}
!20 = !{!6, !7, i64 120}
!21 = !{!6, !7, i64 72}


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