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

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

%struct._MatNd = type { ptr, i32, i32, i32, i8 }

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@RcsLogLevel = external global i32, align 4
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__.MatNd_lineFit2D = external hidden unnamed_addr constant [16 x i8], align 1
@.str.232 = external hidden unnamed_addr constant [63 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_clone(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_swapElements(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_transposeSelf(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @MatNd_lineFit2D(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, 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 i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call ptr @MatNd_clone(ptr noundef %20)
  store ptr %21, ptr %8, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  call void @MatNd_transposeSelf(ptr noundef %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._MatNd, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds double, ptr %25, i64 0
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._MatNd, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = call double @VecNd_minEle(ptr noundef %26, i32 noundef %29)
  store double %30, ptr %9, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._MatNd, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds double, ptr %33, i64 0
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._MatNd, ptr %35, i32 0, i32 2
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = call double @VecNd_maxEle(ptr noundef %34, i32 noundef %37)
  store double %38, ptr %10, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._MatNd, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._MatNd, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds double, ptr %41, i64 %45
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._MatNd, ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = call double @VecNd_minEle(ptr noundef %46, i32 noundef %49)
  store double %50, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct._MatNd, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._MatNd, ptr %54, i32 0, i32 2
  %56 = load i32, ptr %55, align 4, !tbaa !13
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds double, ptr %53, i64 %57
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._MatNd, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %60, align 4, !tbaa !13
  %62 = call double @VecNd_maxEle(ptr noundef %58, i32 noundef %61)
  store double %62, ptr %12, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %63 = load double, ptr %10, align 8, !tbaa !14
  %64 = load double, ptr %9, align 8, !tbaa !14
  %65 = fsub double %63, %64
  store double %65, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %66 = load double, ptr %12, align 8, !tbaa !14
  %67 = load double, ptr %11, align 8, !tbaa !14
  %68 = fsub double %66, %67
  store double %68, ptr %14, align 8, !tbaa !14
  %69 = load double, ptr %13, align 8, !tbaa !14
  %70 = load double, ptr %14, align 8, !tbaa !14
  %71 = fcmp oge double %69, %70
  br i1 %71, label %72, label %78

72:                                               ; preds = %3
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %73)
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = call zeroext i1 @MatNd_lineFit2D_(ptr noundef %74, ptr noundef %75, ptr noundef %76)
  store i1 %77, ptr %4, align 1
  store i32 1, ptr %15, align 4
  br label %131

78:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !16
  br label %79

79:                                               ; preds = %90, %78
  %80 = load i32, ptr %16, align 4, !tbaa !16
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._MatNd, ptr %81, i32 0, i32 2
  %83 = load i32, ptr %82, align 4, !tbaa !13
  %84 = icmp ult i32 %80, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %79
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %93

86:                                               ; preds = %79
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = load i32, ptr %16, align 4, !tbaa !16
  %89 = load i32, ptr %16, align 4, !tbaa !16
  call void @MatNd_swapElements(ptr noundef %87, i32 noundef 0, i32 noundef %88, i32 noundef 1, i32 noundef %89)
  br label %90

90:                                               ; preds = %86
  %91 = load i32, ptr %16, align 4, !tbaa !16
  %92 = add i32 %91, 1
  store i32 %92, ptr %16, align 4, !tbaa !16
  br label %79, !llvm.loop !17

93:                                               ; preds = %85
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  call void @MatNd_transposeSelf(ptr noundef %94)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #4
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = call zeroext i1 @MatNd_lineFit2D_(ptr noundef %17, ptr noundef %18, ptr noundef %95)
  %97 = zext i1 %96 to i8
  store i8 %97, ptr %19, align 1, !tbaa !19
  %98 = load double, ptr %17, align 8, !tbaa !14
  %99 = fcmp oeq double %98, 0.000000e+00
  br i1 %99, label %100, label %119

100:                                              ; preds = %93
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %106

104:                                              ; preds = %101
  %105 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %105(i32 noundef 1, ptr noundef @.str.1, ptr noundef @__func__.MatNd_lineFit2D, i32 noundef 4144, ptr noundef @.str.232)
  br label %106

106:                                              ; preds = %104, %101
  %107 = load i32, ptr @RcsLogLevel, align 4, !tbaa !16
  %108 = icmp sle i32 1, %107
  br i1 %108, label %109, label %116

109:                                              ; preds = %106
  %110 = load ptr, ptr @stderr, align 8, !tbaa !5
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.26, ptr noundef @.str.1, ptr noundef @__func__.MatNd_lineFit2D, i32 noundef 4144) #4
  %112 = load ptr, ptr @stderr, align 8, !tbaa !5
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.232) #4
  %114 = load ptr, ptr @stderr, align 8, !tbaa !5
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.4) #4
  br label %116

116:                                              ; preds = %109, %106
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  store double 1.000000e-08, ptr %17, align 8, !tbaa !14
  br label %119

119:                                              ; preds = %118, %93
  %120 = load double, ptr %17, align 8, !tbaa !14
  %121 = fdiv double 1.000000e+00, %120
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  store double %121, ptr %122, align 8, !tbaa !14
  %123 = load double, ptr %18, align 8, !tbaa !14
  %124 = fneg double %123
  %125 = load double, ptr %17, align 8, !tbaa !14
  %126 = fdiv double %124, %125
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  store double %126, ptr %127, align 8, !tbaa !14
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %128)
  %129 = load i8, ptr %19, align 1, !tbaa !19, !range !20, !noundef !21
  %130 = trunc i8 %129 to i1
  store i1 %130, ptr %4, align 1
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %131

131:                                              ; preds = %119, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %132 = load i1, ptr %4, align 1
  ret i1 %132
}

declare double @VecNd_minEle(ptr noundef, i32 noundef) #3

declare double @VecNd_maxEle(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @MatNd_lineFit2D_(ptr noundef, ptr noundef, ptr noundef) #2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = { 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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_MatNd", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!10, !11, i64 12}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !12, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.26 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__.MatNd_lineFit2D = external hidden unnamed_addr constant [16 x i8], align 1
@.str.232 = external hidden unnamed_addr constant [63 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_clone(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_swapElements(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_transposeSelf(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @MatNd_lineFit2D(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = tail call ptr @MatNd_clone(ptr noundef %2)
  tail call void @MatNd_transposeSelf(ptr noundef %6)
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %6, i64 12
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %10 = tail call double @VecNd_minEle(ptr noundef %7, i32 noundef %9) #4
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = load i32, ptr %8, align 4, !tbaa !12
  %13 = tail call double @VecNd_maxEle(ptr noundef %11, i32 noundef %12) #4
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = load i32, ptr %8, align 4, !tbaa !12
  %16 = zext i32 %15 to i64
  %17 = getelementptr inbounds double, ptr %14, i64 %16
  %18 = tail call double @VecNd_minEle(ptr noundef %17, i32 noundef %15) #4
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = load i32, ptr %8, align 4, !tbaa !12
  %21 = zext i32 %20 to i64
  %22 = getelementptr inbounds double, ptr %19, i64 %21
  %23 = tail call double @VecNd_maxEle(ptr noundef %22, i32 noundef %20) #4
  %24 = fsub double %13, %10
  %25 = fsub double %23, %18
  %26 = fcmp ult double %24, %25
  br i1 %26, label %.preheader, label %28

.preheader:                                       ; preds = %3
  %27 = load i32, ptr %8, align 4, !tbaa !12
  %.not37 = icmp eq i32 %27, 0
  br i1 %.not37, label %._crit_edge, label %.lr.ph

28:                                               ; preds = %3
  tail call void @MatNd_destroy(ptr noundef nonnull %6)
  %29 = tail call zeroext i1 @MatNd_lineFit2D_(ptr noundef %0, ptr noundef %1, ptr noundef %2)
  br label %56

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  tail call void @MatNd_transposeSelf(ptr noundef nonnull %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %30 = call zeroext i1 @MatNd_lineFit2D_(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6)
  %31 = load double, ptr %4, align 8, !tbaa !13
  %32 = fcmp oeq double %31, 0.000000e+00
  br i1 %32, label %36, label %50

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.03436 = phi i32 [ %33, %.lr.ph ], [ 0, %.preheader ]
  tail call void @MatNd_swapElements(ptr noundef nonnull %6, i32 noundef 0, i32 noundef %.03436, i32 noundef 1, i32 noundef %.03436)
  %33 = add nuw i32 %.03436, 1
  %34 = load i32, ptr %8, align 4, !tbaa !12
  %35 = icmp ult i32 %33, %34
  br i1 %35, label %.lr.ph, label %._crit_edge, !llvm.loop !15

36:                                               ; preds = %._crit_edge
  %37 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !17
  %.not = icmp eq ptr %37, null
  br i1 %.not, label %39, label %38

38:                                               ; preds = %36
  call void (i32, ptr, ptr, i32, ptr, ...) %37(i32 noundef 1, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_lineFit2D, i32 noundef 4144, ptr noundef nonnull @.str.232) #4
  br label %39

39:                                               ; preds = %38, %36
  %40 = load i32, ptr @RcsLogLevel, align 4, !tbaa !18
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %42, label %49

42:                                               ; preds = %39
  %43 = load ptr, ptr @stderr, align 8, !tbaa !17
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_lineFit2D, i32 noundef 4144) #5
  %45 = load ptr, ptr @stderr, align 8, !tbaa !17
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.232) #5
  %47 = load ptr, ptr @stderr, align 8, !tbaa !17
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str.4) #5
  br label %49

49:                                               ; preds = %42, %39
  store double 1.000000e-08, ptr %4, align 8, !tbaa !13
  br label %50

50:                                               ; preds = %49, %._crit_edge
  %51 = phi double [ 1.000000e-08, %49 ], [ %31, %._crit_edge ]
  %52 = fdiv double 1.000000e+00, %51
  store double %52, ptr %0, align 8, !tbaa !13
  %53 = load double, ptr %5, align 8, !tbaa !13
  %54 = fneg double %53
  %55 = fdiv double %54, %51
  store double %55, ptr %1, align 8, !tbaa !13
  call void @MatNd_destroy(ptr noundef nonnull %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %56

56:                                               ; preds = %50, %28
  %.0 = phi i1 [ %29, %28 ], [ %30, %50 ]
  ret i1 %.0
}

declare double @VecNd_minEle(ptr noundef, i32 noundef) local_unnamed_addr #3

declare double @VecNd_maxEle(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @MatNd_lineFit2D_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = { nounwind }
attributes #5 = { cold 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 0}
!6 = !{!"_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 20}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_Bool", !8, i64 0}
!12 = !{!6, !10, i64 12}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !10, i64 0}


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