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

; 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::CmdLineParser" = type { i8 }

@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external global i32, align 4
@stderr = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.testMinJerkTrj = external hidden unnamed_addr constant [15 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [238 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.246 = external hidden unnamed_addr constant [154 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #2

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

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

declare void @MatNd_destroy(ptr noundef) #2

declare i32 @fflush(ptr noundef) #2

declare void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) #2

declare zeroext i1 @MatNd_toFile(ptr noundef, ptr noundef) #2

declare i32 @system(ptr noundef) #2

declare void @print_trace() #2

; Function Attrs: noreturn nounwind
declare void @abort() #3

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testMinJerkTrj(i32 noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.Rcs::CmdLineParser", align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  br label %14

14:                                               ; preds = %2
  %15 = load ptr, ptr @stderr, align 8, !tbaa !9
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrj, i32 noundef 2472) #5
  %17 = load ptr, ptr @stderr, align 8, !tbaa !9
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.244) #5
  %19 = load ptr, ptr @stderr, align 8, !tbaa !9
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.6) #5
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = call i32 @fflush(ptr noundef %21)
  br label %23

23:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 100, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %6, i32 noundef %24, ptr noundef %25)
  %26 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef @.str.223, ptr noundef %5, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = call ptr @MatNd_create(i32 noundef %27, i32 noundef 1)
  store ptr %28, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = call ptr @MatNd_create(i32 noundef %29, i32 noundef 1)
  store ptr %30, ptr %8, align 8, !tbaa !9
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = load ptr, ptr %8, align 8, !tbaa !9
  call void @MatNd_computeMinimumJerkTrajectory(ptr noundef %31, ptr noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = call ptr @MatNd_create(i32 noundef %33, i32 noundef 3)
  store ptr %34, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %55, %23
  %36 = load i32, ptr %10, align 4, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %58

40:                                               ; preds = %35
  %41 = load ptr, ptr %9, align 8, !tbaa !9
  %42 = load i32, ptr %10, align 4, !tbaa !5
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = sitofp i32 %43 to double
  call void @MatNd_set(ptr noundef %41, i32 noundef %42, i32 noundef 0, double noundef %44)
  %45 = load ptr, ptr %9, align 8, !tbaa !9
  %46 = load i32, ptr %10, align 4, !tbaa !5
  %47 = load ptr, ptr %7, align 8, !tbaa !9
  %48 = load i32, ptr %10, align 4, !tbaa !5
  %49 = call double @MatNd_get(ptr noundef %47, i32 noundef %48, i32 noundef 0)
  call void @MatNd_set(ptr noundef %45, i32 noundef %46, i32 noundef 1, double noundef %49)
  %50 = load ptr, ptr %9, align 8, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = load ptr, ptr %8, align 8, !tbaa !9
  %53 = load i32, ptr %10, align 4, !tbaa !5
  %54 = call double @MatNd_get(ptr noundef %52, i32 noundef %53, i32 noundef 0)
  call void @MatNd_set(ptr noundef %50, i32 noundef %51, i32 noundef 2, double noundef %54)
  br label %55

55:                                               ; preds = %40
  %56 = load i32, ptr %10, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %10, align 4, !tbaa !5
  br label %35, !llvm.loop !11

58:                                               ; preds = %39
  %59 = load ptr, ptr %9, align 8, !tbaa !9
  %60 = call zeroext i1 @MatNd_toFile(ptr noundef %59, ptr noundef @.str.245)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr @.str.246, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %61 = call noalias ptr @fopen(ptr noundef @.str.242, ptr noundef @.str.165)
  store ptr %61, ptr %12, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %58
  %63 = load ptr, ptr %12, align 8, !tbaa !9
  %64 = icmp ne ptr %63, null
  br i1 %64, label %68, label %65

65:                                               ; preds = %62
  %66 = load ptr, ptr @stderr, align 8, !tbaa !9
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testMinJerkTrj, i32 noundef 2499, ptr noundef @.str.166) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

68:                                               ; preds = %62
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %12, align 8, !tbaa !9
  %72 = load ptr, ptr %11, align 8, !tbaa !9
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef %72) #5
  %74 = load ptr, ptr %12, align 8, !tbaa !9
  %75 = call i32 @fflush(ptr noundef %74)
  %76 = load ptr, ptr %12, align 8, !tbaa !9
  %77 = call i32 @fclose(ptr noundef %76)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %78 = call i32 @system(ptr noundef @.str.169)
  store i32 %78, ptr %13, align 4, !tbaa !5
  %79 = load i32, ptr %13, align 4, !tbaa !5
  %80 = icmp eq i32 %79, -1
  br i1 %80, label %81, label %93

81:                                               ; preds = %70
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr @stderr, align 8, !tbaa !9
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrj, i32 noundef 2508) #5
  %85 = load ptr, ptr @stderr, align 8, !tbaa !9
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.168) #5
  %87 = load ptr, ptr @stderr, align 8, !tbaa !9
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str.6) #5
  %89 = load ptr, ptr @stderr, align 8, !tbaa !9
  %90 = call i32 @fflush(ptr noundef %89)
  br label %91

91:                                               ; preds = %82
  br label %92

92:                                               ; preds = %91
  br label %105

93:                                               ; preds = %70
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr @stderr, align 8, !tbaa !9
  %96 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrj, i32 noundef 2512) #5
  %97 = load ptr, ptr @stderr, align 8, !tbaa !9
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.169) #5
  %99 = load ptr, ptr @stderr, align 8, !tbaa !9
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str.6) #5
  %101 = load ptr, ptr @stderr, align 8, !tbaa !9
  %102 = call i32 @fflush(ptr noundef %101)
  br label %103

103:                                              ; preds = %94
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104, %92
  %106 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %107 = icmp sle i32 1, %106
  br i1 %107, label %108, label %121

108:                                              ; preds = %105
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr @stderr, align 8, !tbaa !9
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrj, i32 noundef 2517) #5
  %112 = load ptr, ptr @stderr, align 8, !tbaa !9
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.247) #5
  %114 = load ptr, ptr @stderr, align 8, !tbaa !9
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.6) #5
  %116 = load ptr, ptr @stderr, align 8, !tbaa !9
  %117 = call i32 @fflush(ptr noundef %116)
  br label %118

118:                                              ; preds = %109
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %9, align 8, !tbaa !9
  call void @MatNd_printDigits(ptr noundef %120, i32 noundef 6)
  br label %121

121:                                              ; preds = %119, %105
  %122 = load ptr, ptr %9, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %122)
  %123 = load ptr, ptr %7, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %123)
  %124 = load ptr, ptr %8, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %124)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i1 true
}

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

declare void @MatNd_printDigits(ptr noundef, i32 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 = { noreturn 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 #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 }
attributes #6 = { noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

%"class.Rcs::CmdLineParser" = type { i8 }

@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.223 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.testMinJerkTrj = external hidden unnamed_addr constant [15 x i8], align 1
@.str.244 = external hidden unnamed_addr constant [238 x i8], align 1
@.str.245 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.246 = external hidden unnamed_addr constant [154 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #2

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

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

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #1

declare void @MatNd_set(ptr noundef, i32 noundef, i32 noundef, double noundef) local_unnamed_addr #2

declare zeroext i1 @MatNd_toFile(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree
declare noundef i32 @system(ptr nocapture noundef readonly) local_unnamed_addr #3

declare void @print_trace() local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #4

declare noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @testMinJerkTrj(i32 noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.Rcs::CmdLineParser", align 1
  %5 = load ptr, ptr @stderr, align 8, !tbaa !5
  %6 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %5, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testMinJerkTrj, i32 noundef 2472) #6
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.244) #6
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.6) #6
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = tail call i32 @fflush(ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 100, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %4, i32 noundef %0, ptr noundef %1)
  %13 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull @.str.223, ptr noundef nonnull %3, ptr noundef null)
  %14 = load i32, ptr %3, align 4, !tbaa !9
  %15 = call ptr @MatNd_create(i32 noundef %14, i32 noundef 1)
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = call ptr @MatNd_create(i32 noundef %16, i32 noundef 1)
  call void @MatNd_computeMinimumJerkTrajectory(ptr noundef %15, ptr noundef %17)
  %18 = load i32, ptr %3, align 4, !tbaa !9
  %19 = call ptr @MatNd_create(i32 noundef %18, i32 noundef 3)
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %2
  %22 = call zeroext i1 @MatNd_toFile(ptr noundef %19, ptr noundef nonnull @.str.245)
  %23 = call noalias ptr @fopen(ptr noundef nonnull @.str.242, ptr noundef nonnull @.str.165)
  %.not = icmp eq ptr %23, null
  br i1 %.not, label %30, label %33

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.028 = phi i32 [ %27, %.lr.ph ], [ 0, %2 ]
  %24 = uitofp nneg i32 %.028 to double
  call void @MatNd_set(ptr noundef %19, i32 noundef %.028, i32 noundef 0, double noundef %24)
  %25 = call double @MatNd_get(ptr noundef %15, i32 noundef %.028, i32 noundef 0)
  call void @MatNd_set(ptr noundef %19, i32 noundef %.028, i32 noundef 1, double noundef %25)
  %26 = call double @MatNd_get(ptr noundef %17, i32 noundef %.028, i32 noundef 0)
  call void @MatNd_set(ptr noundef %19, i32 noundef %.028, i32 noundef 2, double noundef %26)
  %27 = add nuw nsw i32 %.028, 1
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !11

30:                                               ; preds = %._crit_edge
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testMinJerkTrj, i32 noundef 2499, ptr noundef nonnull @.str.166) #6
  call void @print_trace()
  call void @abort() #8
  unreachable

33:                                               ; preds = %._crit_edge
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %23, ptr noundef nonnull @.str.246) #7
  %35 = call i32 @fflush(ptr noundef nonnull %23)
  %36 = call i32 @fclose(ptr noundef nonnull %23)
  %37 = call i32 @system(ptr noundef nonnull @.str.169)
  %38 = icmp eq i32 %37, -1
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %. = select i1 %38, i32 2508, i32 2512
  %.str.168..str.169 = select i1 %38, ptr @.str.168, ptr @.str.169
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testMinJerkTrj, i32 noundef %.) #6
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull %.str.168..str.169) #6
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.6) #6
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = call i32 @fflush(ptr noundef %45)
  %47 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %49, label %58

49:                                               ; preds = %33
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testMinJerkTrj, i32 noundef 2517) #6
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.247) #6
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.6) #6
  %56 = load ptr, ptr @stderr, align 8, !tbaa !5
  %57 = call i32 @fflush(ptr noundef %56)
  call void @MatNd_printDigits(ptr noundef %19, i32 noundef 6)
  br label %58

58:                                               ; preds = %49, %33
  call void @MatNd_destroy(ptr noundef %19)
  call void @MatNd_destroy(ptr noundef %15)
  call void @MatNd_destroy(ptr noundef %17)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret i1 true
}

declare void @MatNd_computeMinimumJerkTrajectory(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @MatNd_printDigits(ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree 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 = { nofree "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 = { noreturn 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 = { cold nounwind }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass