; LLVM IR from HRI-EU/Rcs :: src/RcsCore (ViaPointSequence)

; 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.Rcs::ViaPointSequencePlotter" = type { ptr, ptr, i8, [3 x double], [3 x double], double, double }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

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

; Function Attrs: nounwind
declare i64 @lround(double noundef) #1

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) #2

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

declare ptr @MatNd_create(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3Rcs16ViaPointSequence2t0Ev(ptr noundef nonnull align 8 dereferenceable(104)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3Rcs16ViaPointSequence2t1Ev(ptr noundef nonnull align 8 dereferenceable(104)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, double noundef, double noundef, double noundef) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Rcs23ViaPointSequencePlotter15enableFixedAxesERKNS_16ViaPointSequenceEbd(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, i1 noundef zeroext %2, double noundef %3) unnamed_addr #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  %17 = zext i1 %2 to i8
  store i8 %17, ptr %7, align 1, !tbaa !9
  store double %3, ptr %8, align 8, !tbaa !11
  %18 = load ptr, ptr %5, align 8
  %19 = load i8, ptr %7, align 1, !tbaa !9, !range !13, !noundef !14
  %20 = trunc i8 %19 to i1
  %21 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 2
  %22 = zext i1 %20 to i8
  store i8 %22, ptr %21, align 8, !tbaa !15
  %23 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 2
  %24 = load i8, ptr %23, align 8, !tbaa !15, !range !13, !noundef !14
  %25 = trunc i8 %24 to i1
  %26 = zext i1 %25 to i32
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %4
  br label %192

29:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store double 1.000000e-02, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104) %30)
  %32 = fdiv double %31, 1.000000e-02
  %33 = call i64 @lround(double noundef %32) #6
  %34 = add nsw i64 1, %33
  %35 = trunc i64 %34 to i32
  %36 = call ptr @MatNd_create(i32 noundef 4, i32 noundef %35)
  store ptr %36, ptr %10, align 8, !tbaa !5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call noundef double @_ZNK3Rcs16ViaPointSequence2t0Ev(ptr noundef nonnull align 8 dereferenceable(104) %39)
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = call noundef double @_ZNK3Rcs16ViaPointSequence2t1Ev(ptr noundef nonnull align 8 dereferenceable(104) %41)
  call void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %37, ptr noundef %38, double noundef %40, double noundef %42, double noundef 1.000000e-02)
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = call double @MatNd_get(ptr noundef %43, i32 noundef 1, i32 noundef 0)
  %45 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %46 = getelementptr inbounds [3 x double], ptr %45, i64 0, i64 0
  store double %44, ptr %46, align 8, !tbaa !11
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  %48 = call double @MatNd_get(ptr noundef %47, i32 noundef 2, i32 noundef 0)
  %49 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %50 = getelementptr inbounds [3 x double], ptr %49, i64 0, i64 1
  store double %48, ptr %50, align 8, !tbaa !11
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = call double @MatNd_get(ptr noundef %51, i32 noundef 3, i32 noundef 0)
  %53 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %54 = getelementptr inbounds [3 x double], ptr %53, i64 0, i64 2
  store double %52, ptr %54, align 8, !tbaa !11
  %55 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %56 = getelementptr inbounds [3 x double], ptr %55, i64 0, i64 0
  %57 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %58 = getelementptr inbounds [3 x double], ptr %57, i64 0, i64 0
  call void @Vec3d_copy(ptr noundef %56, ptr noundef %58)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !17
  br label %59

59:                                               ; preds = %136, %29
  %60 = load i32, ptr %11, align 4, !tbaa !17
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._MatNd, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %62, align 4, !tbaa !19
  %64 = icmp ult i32 %60, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %139

66:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = load i32, ptr %11, align 4, !tbaa !17
  %69 = call double @MatNd_get(ptr noundef %67, i32 noundef 1, i32 noundef %68)
  store double %69, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load i32, ptr %11, align 4, !tbaa !17
  %72 = call double @MatNd_get(ptr noundef %70, i32 noundef 2, i32 noundef %71)
  store double %72, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = load i32, ptr %11, align 4, !tbaa !17
  %75 = call double @MatNd_get(ptr noundef %73, i32 noundef 3, i32 noundef %74)
  store double %75, ptr %14, align 8, !tbaa !11
  %76 = load double, ptr %12, align 8, !tbaa !11
  %77 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %78 = getelementptr inbounds [3 x double], ptr %77, i64 0, i64 0
  %79 = load double, ptr %78, align 8, !tbaa !11
  %80 = fcmp olt double %76, %79
  br i1 %80, label %81, label %85

81:                                               ; preds = %66
  %82 = load double, ptr %12, align 8, !tbaa !11
  %83 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %84 = getelementptr inbounds [3 x double], ptr %83, i64 0, i64 0
  store double %82, ptr %84, align 8, !tbaa !11
  br label %85

85:                                               ; preds = %81, %66
  %86 = load double, ptr %12, align 8, !tbaa !11
  %87 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %88 = getelementptr inbounds [3 x double], ptr %87, i64 0, i64 0
  %89 = load double, ptr %88, align 8, !tbaa !11
  %90 = fcmp ogt double %86, %89
  br i1 %90, label %91, label %95

91:                                               ; preds = %85
  %92 = load double, ptr %12, align 8, !tbaa !11
  %93 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %94 = getelementptr inbounds [3 x double], ptr %93, i64 0, i64 0
  store double %92, ptr %94, align 8, !tbaa !11
  br label %95

95:                                               ; preds = %91, %85
  %96 = load double, ptr %13, align 8, !tbaa !11
  %97 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %98 = getelementptr inbounds [3 x double], ptr %97, i64 0, i64 1
  %99 = load double, ptr %98, align 8, !tbaa !11
  %100 = fcmp olt double %96, %99
  br i1 %100, label %101, label %105

101:                                              ; preds = %95
  %102 = load double, ptr %13, align 8, !tbaa !11
  %103 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %104 = getelementptr inbounds [3 x double], ptr %103, i64 0, i64 1
  store double %102, ptr %104, align 8, !tbaa !11
  br label %105

105:                                              ; preds = %101, %95
  %106 = load double, ptr %13, align 8, !tbaa !11
  %107 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %108 = getelementptr inbounds [3 x double], ptr %107, i64 0, i64 1
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = fcmp ogt double %106, %109
  br i1 %110, label %111, label %115

111:                                              ; preds = %105
  %112 = load double, ptr %13, align 8, !tbaa !11
  %113 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %114 = getelementptr inbounds [3 x double], ptr %113, i64 0, i64 1
  store double %112, ptr %114, align 8, !tbaa !11
  br label %115

115:                                              ; preds = %111, %105
  %116 = load double, ptr %14, align 8, !tbaa !11
  %117 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %118 = getelementptr inbounds [3 x double], ptr %117, i64 0, i64 2
  %119 = load double, ptr %118, align 8, !tbaa !11
  %120 = fcmp olt double %116, %119
  br i1 %120, label %121, label %125

121:                                              ; preds = %115
  %122 = load double, ptr %14, align 8, !tbaa !11
  %123 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %124 = getelementptr inbounds [3 x double], ptr %123, i64 0, i64 2
  store double %122, ptr %124, align 8, !tbaa !11
  br label %125

125:                                              ; preds = %121, %115
  %126 = load double, ptr %14, align 8, !tbaa !11
  %127 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %128 = getelementptr inbounds [3 x double], ptr %127, i64 0, i64 2
  %129 = load double, ptr %128, align 8, !tbaa !11
  %130 = fcmp ogt double %126, %129
  br i1 %130, label %131, label %135

131:                                              ; preds = %125
  %132 = load double, ptr %14, align 8, !tbaa !11
  %133 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %134 = getelementptr inbounds [3 x double], ptr %133, i64 0, i64 2
  store double %132, ptr %134, align 8, !tbaa !11
  br label %135

135:                                              ; preds = %131, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %11, align 4, !tbaa !17
  %138 = add i32 %137, 1
  store i32 %138, ptr %11, align 4, !tbaa !17
  br label %59, !llvm.loop !21

139:                                              ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 0, ptr %15, align 4, !tbaa !17
  br label %140

140:                                              ; preds = %173, %139
  %141 = load i32, ptr %15, align 4, !tbaa !17
  %142 = icmp slt i32 %141, 3
  br i1 %142, label %144, label %143

143:                                              ; preds = %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %176

144:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %145 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %146 = load i32, ptr %15, align 4, !tbaa !17
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [3 x double], ptr %145, i64 0, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !11
  %150 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %151 = load i32, ptr %15, align 4, !tbaa !17
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [3 x double], ptr %150, i64 0, i64 %152
  %154 = load double, ptr %153, align 8, !tbaa !11
  %155 = fsub double %149, %154
  store double %155, ptr %16, align 8, !tbaa !11
  %156 = load double, ptr %8, align 8, !tbaa !11
  %157 = load double, ptr %16, align 8, !tbaa !11
  %158 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 4
  %159 = load i32, ptr %15, align 4, !tbaa !17
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [3 x double], ptr %158, i64 0, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = call double @llvm.fmuladd.f64(double %156, double %157, double %162)
  store double %163, ptr %161, align 8, !tbaa !11
  %164 = load double, ptr %8, align 8, !tbaa !11
  %165 = load double, ptr %16, align 8, !tbaa !11
  %166 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 3
  %167 = load i32, ptr %15, align 4, !tbaa !17
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [3 x double], ptr %166, i64 0, i64 %168
  %170 = load double, ptr %169, align 8, !tbaa !11
  %171 = fneg double %164
  %172 = call double @llvm.fmuladd.f64(double %171, double %165, double %170)
  store double %172, ptr %169, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %173

173:                                              ; preds = %144
  %174 = load i32, ptr %15, align 4, !tbaa !17
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %15, align 4, !tbaa !17
  br label %140, !llvm.loop !23

176:                                              ; preds = %143
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = call noundef double @_ZNK3Rcs16ViaPointSequence2t0Ev(ptr noundef nonnull align 8 dereferenceable(104) %177)
  %179 = load double, ptr %8, align 8, !tbaa !11
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = call noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104) %180)
  %182 = fneg double %179
  %183 = call double @llvm.fmuladd.f64(double %182, double %181, double %178)
  %184 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 5
  store double %183, ptr %184, align 8, !tbaa !24
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = call noundef double @_ZNK3Rcs16ViaPointSequence2t1Ev(ptr noundef nonnull align 8 dereferenceable(104) %185)
  %187 = load double, ptr %8, align 8, !tbaa !11
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = call noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104) %188)
  %190 = call double @llvm.fmuladd.f64(double %187, double %189, double %186)
  %191 = getelementptr inbounds %"class.Rcs::ViaPointSequencePlotter", ptr %18, i32 0, i32 6
  store double %190, ptr %191, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %192

192:                                              ; preds = %176, %28
  ret void
}

declare void @Vec3d_copy(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !10, i64 16}
!16 = !{!"_ZTSN3Rcs23ViaPointSequencePlotterE", !6, i64 8, !10, i64 16, !7, i64 24, !7, i64 48, !12, i64 72, !12, i64 80}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!20, !18, i64 12}
!20 = !{!"_ZTS6_MatNd", !6, i64 0, !18, i64 8, !18, i64 12, !18, i64 16, !10, i64 20}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = !{!16, !12, i64 72}
!25 = !{!16, !12, i64 80}


; 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: nounwind
declare i64 @lround(double noundef) local_unnamed_addr #0

declare double @MatNd_get(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3Rcs16ViaPointSequence2t0Ev(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3Rcs16ViaPointSequence2t1Ev(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef, double noundef, double noundef, double noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3Rcs23ViaPointSequencePlotter15enableFixedAxesERKNS_16ViaPointSequenceEbd(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(104) %1, i1 noundef zeroext %2, double noundef %3) unnamed_addr #3 align 2 {
  %5 = zext i1 %2 to i8
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 %5, ptr %6, align 8, !tbaa !5
  br i1 %2, label %7, label %95

7:                                                ; preds = %4
  %8 = tail call noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %9 = fdiv double %8, 1.000000e-02
  %10 = tail call i64 @lround(double noundef %9) #6
  %11 = trunc i64 %10 to i32
  %12 = add i32 %11, 1
  %13 = tail call ptr @MatNd_create(i32 noundef 4, i32 noundef %12)
  %14 = tail call noundef double @_ZNK3Rcs16ViaPointSequence2t0Ev(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %15 = tail call noundef double @_ZNK3Rcs16ViaPointSequence2t1Ev(ptr noundef nonnull align 8 dereferenceable(104) %1)
  tail call void @_ZNK3Rcs16ViaPointSequence17computeTrajectoryEP6_MatNdddd(ptr noundef nonnull align 8 dereferenceable(104) %1, ptr noundef %13, double noundef %14, double noundef %15, double noundef 1.000000e-02)
  %16 = tail call double @MatNd_get(ptr noundef %13, i32 noundef 1, i32 noundef 0)
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  store double %16, ptr %17, align 8, !tbaa !12
  %18 = tail call double @MatNd_get(ptr noundef %13, i32 noundef 2, i32 noundef 0)
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  store double %18, ptr %19, align 8, !tbaa !12
  %20 = tail call double @MatNd_get(ptr noundef %13, i32 noundef 3, i32 noundef 0)
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  store double %20, ptr %21, align 8, !tbaa !12
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @Vec3d_copy(ptr noundef nonnull %22, ptr noundef nonnull %17)
  %23 = getelementptr inbounds i8, ptr %13, i64 12
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %..preheader_crit_edge, label %.lr.ph

..preheader_crit_edge:                            ; preds = %7
  %25 = load <2 x double>, ptr %22, align 8, !tbaa !12
  %26 = load <2 x double>, ptr %17, align 8, !tbaa !12
  %.phi.trans.insert59 = getelementptr inbounds i8, ptr %0, i64 64
  %.pre60 = load double, ptr %.phi.trans.insert59, align 8, !tbaa !12
  %.phi.trans.insert61 = getelementptr inbounds i8, ptr %0, i64 40
  %.pre62 = load double, ptr %.phi.trans.insert61, align 8, !tbaa !12
  br label %.preheader

.lr.ph:                                           ; preds = %7
  %27 = getelementptr inbounds i8, ptr %0, i64 56
  %28 = getelementptr inbounds i8, ptr %0, i64 64
  br label %58

.preheader.loopexit:                              ; preds = %90
  %29 = insertelement <2 x double> poison, double %66, i64 0
  %30 = insertelement <2 x double> %29, double %76, i64 1
  %31 = insertelement <2 x double> poison, double %71, i64 0
  %32 = insertelement <2 x double> %31, double %81, i64 1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %..preheader_crit_edge
  %33 = phi double [ %.pre62, %..preheader_crit_edge ], [ %86, %.preheader.loopexit ]
  %34 = phi double [ %.pre60, %..preheader_crit_edge ], [ %91, %.preheader.loopexit ]
  %35 = phi <2 x double> [ %25, %..preheader_crit_edge ], [ %32, %.preheader.loopexit ]
  %36 = phi <2 x double> [ %26, %..preheader_crit_edge ], [ %30, %.preheader.loopexit ]
  %37 = fneg double %3
  %38 = fsub <2 x double> %35, %36
  %39 = insertelement <2 x double> poison, double %3, i64 0
  %40 = shufflevector <2 x double> %39, <2 x double> poison, <2 x i32> zeroinitializer
  %41 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %40, <2 x double> %38, <2 x double> %35)
  store <2 x double> %41, ptr %22, align 8, !tbaa !12
  %42 = insertelement <2 x double> poison, double %37, i64 0
  %43 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> zeroinitializer
  %44 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %43, <2 x double> %38, <2 x double> %36)
  store <2 x double> %44, ptr %17, align 8, !tbaa !12
  %45 = getelementptr inbounds i8, ptr %0, i64 64
  %46 = getelementptr inbounds i8, ptr %0, i64 40
  %47 = fsub double %34, %33
  %48 = tail call double @llvm.fmuladd.f64(double %3, double %47, double %34)
  store double %48, ptr %45, align 8, !tbaa !12
  %49 = tail call double @llvm.fmuladd.f64(double %37, double %47, double %33)
  store double %49, ptr %46, align 8, !tbaa !12
  %50 = tail call noundef double @_ZNK3Rcs16ViaPointSequence2t0Ev(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %51 = tail call noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %52 = tail call double @llvm.fmuladd.f64(double %37, double %51, double %50)
  %53 = getelementptr inbounds i8, ptr %0, i64 72
  store double %52, ptr %53, align 8, !tbaa !16
  %54 = tail call noundef double @_ZNK3Rcs16ViaPointSequence2t1Ev(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %55 = tail call noundef double @_ZNK3Rcs16ViaPointSequence8durationEv(ptr noundef nonnull align 8 dereferenceable(104) %1)
  %56 = tail call double @llvm.fmuladd.f64(double %3, double %55, double %54)
  %57 = getelementptr inbounds i8, ptr %0, i64 80
  store double %56, ptr %57, align 8, !tbaa !17
  br label %95

58:                                               ; preds = %.lr.ph, %90
  %.052 = phi i32 [ 0, %.lr.ph ], [ %92, %90 ]
  %59 = tail call double @MatNd_get(ptr noundef nonnull %13, i32 noundef 1, i32 noundef %.052)
  %60 = tail call double @MatNd_get(ptr noundef nonnull %13, i32 noundef 2, i32 noundef %.052)
  %61 = tail call double @MatNd_get(ptr noundef nonnull %13, i32 noundef 3, i32 noundef %.052)
  %62 = load double, ptr %17, align 8, !tbaa !12
  %63 = fcmp olt double %59, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %58
  store double %59, ptr %17, align 8, !tbaa !12
  br label %65

65:                                               ; preds = %64, %58
  %66 = phi double [ %59, %64 ], [ %62, %58 ]
  %67 = load double, ptr %22, align 8, !tbaa !12
  %68 = fcmp ogt double %59, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %65
  store double %59, ptr %22, align 8, !tbaa !12
  br label %70

70:                                               ; preds = %69, %65
  %71 = phi double [ %59, %69 ], [ %67, %65 ]
  %72 = load double, ptr %19, align 8, !tbaa !12
  %73 = fcmp olt double %60, %72
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  store double %60, ptr %19, align 8, !tbaa !12
  br label %75

75:                                               ; preds = %74, %70
  %76 = phi double [ %60, %74 ], [ %72, %70 ]
  %77 = load double, ptr %27, align 8, !tbaa !12
  %78 = fcmp ogt double %60, %77
  br i1 %78, label %79, label %80

79:                                               ; preds = %75
  store double %60, ptr %27, align 8, !tbaa !12
  br label %80

80:                                               ; preds = %79, %75
  %81 = phi double [ %60, %79 ], [ %77, %75 ]
  %82 = load double, ptr %21, align 8, !tbaa !12
  %83 = fcmp olt double %61, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %80
  store double %61, ptr %21, align 8, !tbaa !12
  br label %85

85:                                               ; preds = %84, %80
  %86 = phi double [ %61, %84 ], [ %82, %80 ]
  %87 = load double, ptr %28, align 8, !tbaa !12
  %88 = fcmp ogt double %61, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %85
  store double %61, ptr %28, align 8, !tbaa !12
  br label %90

90:                                               ; preds = %89, %85
  %91 = phi double [ %61, %89 ], [ %87, %85 ]
  %92 = add nuw i32 %.052, 1
  %93 = load i32, ptr %23, align 4, !tbaa !13
  %94 = icmp ult i32 %92, %93
  br i1 %94, label %58, label %.preheader.loopexit, !llvm.loop !18

95:                                               ; preds = %4, %.preheader
  ret void
}

declare void @Vec3d_copy(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

attributes #0 = { 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 #1 = { "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 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 16}
!6 = !{!"_ZTSN3Rcs23ViaPointSequencePlotterE", !7, i64 8, !10, i64 16, !8, i64 24, !8, i64 48, !11, i64 72, !11, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !15, i64 12}
!14 = !{!"_ZTS6_MatNd", !7, i64 0, !15, i64 8, !15, i64 12, !15, i64 16, !10, i64 20}
!15 = !{!"int", !8, i64 0}
!16 = !{!6, !11, i64 72}
!17 = !{!6, !11, i64 80}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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