; 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.223 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [19 x i8], align 1
@__func__.testMinJerkTrjPoly = external hidden unnamed_addr constant [19 x i8], align 1
@.str.248 = external hidden unnamed_addr constant [234 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [148 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [44 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) #3

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() #4

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

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

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

declare i32 @fclose(ptr noundef) #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testMinJerkTrjPoly(i32 noundef %0, ptr noundef %1) #6 {
  %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 double, align 8
  %9 = alloca i32, align 4
  %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
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  br label %20

20:                                               ; preds = %2
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrjPoly, i32 noundef 2537) #7
  %23 = load ptr, ptr @stderr, align 8, !tbaa !9
  %24 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.248) #7
  %25 = load ptr, ptr @stderr, align 8, !tbaa !9
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.6) #7
  %27 = load ptr, ptr @stderr, align 8, !tbaa !9
  %28 = call i32 @fflush(ptr noundef %27)
  br label %29

29:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 100, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %6, i32 noundef %30, ptr noundef %31)
  %32 = 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) #7
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = call ptr @MatNd_create(i32 noundef %33, i32 noundef 3)
  store ptr %34, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store double 0.000000e+00, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %87, %29
  %36 = load i32, ptr %9, 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 %9) #7
  br label %90

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = sitofp i32 %41 to double
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 1
  %45 = sitofp i32 %44 to double
  %46 = fdiv double %42, %45
  store double %46, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store double 1.000000e+01, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store double -1.500000e+01, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store double 6.000000e+00, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %47 = load double, ptr %11, align 8, !tbaa !11
  %48 = load double, ptr %10, align 8, !tbaa !11
  %49 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %48, i32 noundef 3)
  %50 = load double, ptr %12, align 8, !tbaa !11
  %51 = load double, ptr %10, align 8, !tbaa !11
  %52 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %51, i32 noundef 4)
  %53 = fmul double %50, %52
  %54 = call double @llvm.fmuladd.f64(double %47, double %49, double %53)
  %55 = load double, ptr %13, align 8, !tbaa !11
  %56 = load double, ptr %10, align 8, !tbaa !11
  %57 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %56, i32 noundef 5)
  %58 = call double @llvm.fmuladd.f64(double %55, double %57, double %54)
  store double %58, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %59 = load double, ptr %11, align 8, !tbaa !11
  %60 = fmul double 3.000000e+00, %59
  %61 = load double, ptr %10, align 8, !tbaa !11
  %62 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %61, i32 noundef 3)
  %63 = load double, ptr %12, align 8, !tbaa !11
  %64 = fmul double 4.000000e+00, %63
  %65 = load double, ptr %10, align 8, !tbaa !11
  %66 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %65, i32 noundef 4)
  %67 = fmul double %64, %66
  %68 = call double @llvm.fmuladd.f64(double %60, double %62, double %67)
  %69 = load double, ptr %13, align 8, !tbaa !11
  %70 = fmul double 5.000000e+00, %69
  %71 = load double, ptr %10, align 8, !tbaa !11
  %72 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %71, i32 noundef 5)
  %73 = call double @llvm.fmuladd.f64(double %70, double %72, double %68)
  store double %73, ptr %15, align 8, !tbaa !11
  %74 = load double, ptr %15, align 8, !tbaa !11
  %75 = call double @llvm.fabs.f64(double %74)
  %76 = load double, ptr %8, align 8, !tbaa !11
  %77 = fadd double %76, %75
  store double %77, ptr %8, align 8, !tbaa !11
  %78 = load ptr, ptr %7, align 8, !tbaa !9
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = load double, ptr %10, align 8, !tbaa !11
  call void @MatNd_set(ptr noundef %78, i32 noundef %79, i32 noundef 0, double noundef %80)
  %81 = load ptr, ptr %7, align 8, !tbaa !9
  %82 = load i32, ptr %9, align 4, !tbaa !5
  %83 = load double, ptr %14, align 8, !tbaa !11
  call void @MatNd_set(ptr noundef %81, i32 noundef %82, i32 noundef 1, double noundef %83)
  %84 = load ptr, ptr %7, align 8, !tbaa !9
  %85 = load i32, ptr %9, align 4, !tbaa !5
  %86 = load double, ptr %15, align 8, !tbaa !11
  call void @MatNd_set(ptr noundef %84, i32 noundef %85, i32 noundef 2, double noundef %86)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %87

87:                                               ; preds = %40
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %9, align 4, !tbaa !5
  br label %35, !llvm.loop !13

90:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %104, %90
  %92 = load i32, ptr %16, align 4, !tbaa !5
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %107

96:                                               ; preds = %91
  %97 = load ptr, ptr %7, align 8, !tbaa !9
  %98 = load i32, ptr %16, align 4, !tbaa !5
  %99 = load ptr, ptr %7, align 8, !tbaa !9
  %100 = load i32, ptr %16, align 4, !tbaa !5
  %101 = call double @MatNd_get(ptr noundef %99, i32 noundef %100, i32 noundef 2)
  %102 = load double, ptr %8, align 8, !tbaa !11
  %103 = fdiv double %101, %102
  call void @MatNd_set(ptr noundef %97, i32 noundef %98, i32 noundef 2, double noundef %103)
  br label %104

104:                                              ; preds = %96
  %105 = load i32, ptr %16, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %16, align 4, !tbaa !5
  br label %91, !llvm.loop !15

107:                                              ; preds = %95
  %108 = load ptr, ptr %7, align 8, !tbaa !9
  %109 = call zeroext i1 @MatNd_toFile(ptr noundef %108, ptr noundef @.str.249)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  store ptr @.str.250, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %110 = call noalias ptr @fopen(ptr noundef @.str.251, ptr noundef @.str.165)
  store ptr %110, ptr %18, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %107
  %112 = load ptr, ptr %18, align 8, !tbaa !9
  %113 = icmp ne ptr %112, null
  br i1 %113, label %117, label %114

114:                                              ; preds = %111
  %115 = load ptr, ptr @stderr, align 8, !tbaa !9
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testMinJerkTrjPoly, i32 noundef 2575, ptr noundef @.str.166) #7
  call void @print_trace()
  call void @abort() #8
  unreachable

117:                                              ; preds = %111
  br label %118

118:                                              ; preds = %117
  br label %119

119:                                              ; preds = %118
  %120 = load ptr, ptr %18, align 8, !tbaa !9
  %121 = load ptr, ptr %17, align 8, !tbaa !9
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef %121) #7
  %123 = load ptr, ptr %18, align 8, !tbaa !9
  %124 = call i32 @fflush(ptr noundef %123)
  %125 = load ptr, ptr %18, align 8, !tbaa !9
  %126 = call i32 @fclose(ptr noundef %125)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %127 = call i32 @system(ptr noundef @.str.252)
  store i32 %127, ptr %19, align 4, !tbaa !5
  %128 = load i32, ptr %19, align 4, !tbaa !5
  %129 = icmp eq i32 %128, -1
  br i1 %129, label %130, label %142

130:                                              ; preds = %119
  br label %131

131:                                              ; preds = %130
  %132 = load ptr, ptr @stderr, align 8, !tbaa !9
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrjPoly, i32 noundef 2584) #7
  %134 = load ptr, ptr @stderr, align 8, !tbaa !9
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %134, ptr noundef @.str.168) #7
  %136 = load ptr, ptr @stderr, align 8, !tbaa !9
  %137 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.6) #7
  %138 = load ptr, ptr @stderr, align 8, !tbaa !9
  %139 = call i32 @fflush(ptr noundef %138)
  br label %140

140:                                              ; preds = %131
  br label %141

141:                                              ; preds = %140
  br label %154

142:                                              ; preds = %119
  br label %143

143:                                              ; preds = %142
  %144 = load ptr, ptr @stderr, align 8, !tbaa !9
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrjPoly, i32 noundef 2588) #7
  %146 = load ptr, ptr @stderr, align 8, !tbaa !9
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef @.str.252) #7
  %148 = load ptr, ptr @stderr, align 8, !tbaa !9
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef @.str.6) #7
  %150 = load ptr, ptr @stderr, align 8, !tbaa !9
  %151 = call i32 @fflush(ptr noundef %150)
  br label %152

152:                                              ; preds = %143
  br label %153

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153, %141
  %155 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %156 = icmp sle i32 1, %155
  br i1 %156, label %157, label %170

157:                                              ; preds = %154
  br label %158

158:                                              ; preds = %157
  %159 = load ptr, ptr @stderr, align 8, !tbaa !9
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.22, ptr noundef @__func__.testMinJerkTrjPoly, i32 noundef 2593) #7
  %161 = load ptr, ptr @stderr, align 8, !tbaa !9
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.247) #7
  %163 = load ptr, ptr @stderr, align 8, !tbaa !9
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef @.str.6) #7
  %165 = load ptr, ptr @stderr, align 8, !tbaa !9
  %166 = call i32 @fflush(ptr noundef %165)
  br label %167

167:                                              ; preds = %158
  br label %168

168:                                              ; preds = %167
  %169 = load ptr, ptr %7, align 8, !tbaa !9
  call void @MatNd_printDigits(ptr noundef %169, i32 noundef 6)
  br label %170

170:                                              ; preds = %168, %154
  %171 = load ptr, ptr %7, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %171)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret i1 true
}

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #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 = !{!"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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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.223 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.247 = external hidden unnamed_addr constant [19 x i8], align 1
@__func__.testMinJerkTrjPoly = external hidden unnamed_addr constant [19 x i8], align 1
@.str.248 = external hidden unnamed_addr constant [234 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [148 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [44 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i32 noundef) local_unnamed_addr #3

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 #4

declare void @print_trace() local_unnamed_addr #2

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

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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #6

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @testMinJerkTrjPoly(i32 noundef %0, ptr noundef %1) local_unnamed_addr #7 {
  %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__.testMinJerkTrjPoly, i32 noundef 2537) #8
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.248) #8
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.6) #8
  %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) #9
  store i32 100, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #9
  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 3)
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

.preheader:                                       ; preds = %.lr.ph
  %18 = icmp sgt i32 %39, 0
  br i1 %18, label %.lr.ph50, label %._crit_edge

.lr.ph:                                           ; preds = %2, %.lr.ph
  %19 = phi i32 [ %39, %.lr.ph ], [ %16, %2 ]
  %.048 = phi double [ %37, %.lr.ph ], [ 0.000000e+00, %2 ]
  %.04347 = phi i32 [ %38, %.lr.ph ], [ 0, %2 ]
  %20 = uitofp nneg i32 %.04347 to double
  %21 = add nsw i32 %19, -1
  %22 = sitofp i32 %21 to double
  %23 = fdiv double %20, %22
  %24 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %23, i32 noundef 3)
  %25 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %23, i32 noundef 4)
  %26 = fmul double %25, -1.500000e+01
  %27 = call double @llvm.fmuladd.f64(double %24, double 1.000000e+01, double %26)
  %28 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %23, i32 noundef 5)
  %29 = call double @llvm.fmuladd.f64(double %28, double 6.000000e+00, double %27)
  %30 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %23, i32 noundef 3)
  %31 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %23, i32 noundef 4)
  %32 = fmul double %31, -6.000000e+01
  %33 = call double @llvm.fmuladd.f64(double %30, double 3.000000e+01, double %32)
  %34 = call noundef double @_ZSt3powIdiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef %23, i32 noundef 5)
  %35 = call double @llvm.fmuladd.f64(double %34, double 3.000000e+01, double %33)
  %36 = call double @llvm.fabs.f64(double %35)
  %37 = fadd double %.048, %36
  call void @MatNd_set(ptr noundef %15, i32 noundef %.04347, i32 noundef 0, double noundef %23)
  call void @MatNd_set(ptr noundef %15, i32 noundef %.04347, i32 noundef 1, double noundef %29)
  call void @MatNd_set(ptr noundef %15, i32 noundef %.04347, i32 noundef 2, double noundef %35)
  %38 = add nuw nsw i32 %.04347, 1
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %.lr.ph, label %.preheader, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph50, %2, %.preheader
  %41 = call zeroext i1 @MatNd_toFile(ptr noundef %15, ptr noundef nonnull @.str.249)
  %42 = call noalias ptr @fopen(ptr noundef nonnull @.str.251, ptr noundef nonnull @.str.165)
  %.not = icmp eq ptr %42, null
  br i1 %.not, label %48, label %51

.lr.ph50:                                         ; preds = %.preheader, %.lr.ph50
  %.04449 = phi i32 [ %45, %.lr.ph50 ], [ 0, %.preheader ]
  %43 = call double @MatNd_get(ptr noundef %15, i32 noundef %.04449, i32 noundef 2)
  %44 = fdiv double %43, %37
  call void @MatNd_set(ptr noundef %15, i32 noundef %.04449, i32 noundef 2, double noundef %44)
  %45 = add nuw nsw i32 %.04449, 1
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %.lr.ph50, label %._crit_edge, !llvm.loop !13

48:                                               ; preds = %._crit_edge
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testMinJerkTrjPoly, i32 noundef 2575, ptr noundef nonnull @.str.166) #8
  call void @print_trace()
  call void @abort() #10
  unreachable

51:                                               ; preds = %._crit_edge
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %42, ptr noundef nonnull @.str.250) #9
  %53 = call i32 @fflush(ptr noundef nonnull %42)
  %54 = call i32 @fclose(ptr noundef nonnull %42)
  %55 = call i32 @system(ptr noundef nonnull @.str.252)
  %56 = icmp eq i32 %55, -1
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %. = select i1 %56, i32 2584, i32 2588
  %.str.168..str.252 = select i1 %56, ptr @.str.168, ptr @.str.252
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testMinJerkTrjPoly, i32 noundef %.) #8
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull %.str.168..str.252) #8
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.6) #8
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = call i32 @fflush(ptr noundef %63)
  %65 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %67, label %76

67:                                               ; preds = %51
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testMinJerkTrjPoly, i32 noundef 2593) #8
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef nonnull @.str.247) #8
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.6) #8
  %74 = load ptr, ptr @stderr, align 8, !tbaa !5
  %75 = call i32 @fflush(ptr noundef %74)
  call void @MatNd_printDigits(ptr noundef %15, i32 noundef 6)
  br label %76

76:                                               ; preds = %67, %51
  call void @MatNd_destroy(ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  ret i1 true
}

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { cold nounwind }
attributes #9 = { nounwind }
attributes #10 = { 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"}
!13 = distinct !{!13, !12}


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