; 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.5 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_filterMovingMean = external hidden unnamed_addr constant [23 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [41 x i8], align 1

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

declare void @print_trace() #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_subSelf(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_addSelf(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_getRowView(ptr dead_on_unwind noalias writable sret(%struct._MatNd) align 8, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_constMulSelf(ptr noundef, double noundef) #3

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_interpolateRows(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_filterMovingMean(ptr noundef %0, ptr noundef %1, i32 noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct._MatNd, align 8
  %12 = alloca %struct._MatNd, align 8
  %13 = alloca %struct._MatNd, align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct._MatNd, align 8
  %16 = alloca %struct._MatNd, align 8
  %17 = alloca %struct._MatNd, align 8
  %18 = alloca i32, align 4
  %19 = alloca %struct._MatNd, align 8
  %20 = alloca %struct._MatNd, align 8
  %21 = alloca %struct._MatNd, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %3
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._MatNd, ptr %23, i32 0, i32 1
  %25 = load i32, ptr %24, align 8, !tbaa !11
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._MatNd, ptr %26, i32 0, i32 1
  %28 = load i32, ptr %27, align 8, !tbaa !11
  %29 = icmp eq i32 %25, %28
  br i1 %29, label %30, label %38

30:                                               ; preds = %22
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._MatNd, ptr %31, i32 0, i32 2
  %33 = load i32, ptr %32, align 4, !tbaa !14
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._MatNd, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 4, !tbaa !14
  %37 = icmp eq i32 %33, %36
  br i1 %37, label %41, label %38

38:                                               ; preds = %30, %22
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.5, ptr noundef @.str.1, ptr noundef @__func__.MatNd_filterMovingMean, i32 noundef 4837, ptr noundef @.str.254) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

41:                                               ; preds = %30
  br label %42

42:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._MatNd, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 8, !tbaa !11
  store i32 %45, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = add i32 %46, %47
  %49 = sub i32 %48, 1
  store i32 %49, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct._MatNd, ptr %51, i32 0, i32 2
  %53 = load i32, ptr %52, align 4, !tbaa !14
  %54 = call ptr @MatNd_create(i32 noundef %50, i32 noundef %53)
  store ptr %54, ptr %9, align 8, !tbaa !5
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_copyRow(ptr noundef %55, i32 noundef 0, ptr noundef %56, i32 noundef 0)
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._MatNd, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !15
  %60 = load i32, ptr %6, align 4, !tbaa !9
  %61 = uitofp i32 %60 to double
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._MatNd, ptr %62, i32 0, i32 2
  %64 = load i32, ptr %63, align 4, !tbaa !14
  call void @VecNd_constMulSelf(ptr noundef %59, double noundef %61, i32 noundef %64)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %81, %42
  %66 = load i32, ptr %10, align 4, !tbaa !9
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = icmp ult i32 %66, %67
  br i1 %68, label %70, label %69

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

70:                                               ; preds = %65
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = sub i32 %74, 1
  call void @MatNd_copyRow(ptr noundef %71, i32 noundef %72, ptr noundef %73, i32 noundef %75)
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load i32, ptr %10, align 4, !tbaa !9
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %11, ptr noundef %76, i32 noundef %77)
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load i32, ptr %10, align 4, !tbaa !9
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %12, ptr noundef %78, i32 noundef %79)
  call void @MatNd_addSelf(ptr noundef %12, ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %13, ptr noundef %80, i32 noundef 0)
  call void @MatNd_subSelf(ptr noundef %12, ptr noundef %13)
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  br label %81

81:                                               ; preds = %70
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = add i32 %82, 1
  store i32 %83, ptr %10, align 4, !tbaa !9
  br label %65, !llvm.loop !16

84:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %85 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %85, ptr %14, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %105, %84
  %87 = load i32, ptr %14, align 4, !tbaa !9
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = icmp ult i32 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %108

91:                                               ; preds = %86
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load i32, ptr %14, align 4, !tbaa !9
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load i32, ptr %14, align 4, !tbaa !9
  %96 = sub i32 %95, 1
  call void @MatNd_copyRow(ptr noundef %92, i32 noundef %93, ptr noundef %94, i32 noundef %96)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load i32, ptr %14, align 4, !tbaa !9
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %15, ptr noundef %97, i32 noundef %98)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load i32, ptr %14, align 4, !tbaa !9
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %16, ptr noundef %99, i32 noundef %100)
  call void @MatNd_addSelf(ptr noundef %16, ptr noundef %15)
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = load i32, ptr %14, align 4, !tbaa !9
  %103 = load i32, ptr %6, align 4, !tbaa !9
  %104 = sub i32 %102, %103
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %17, ptr noundef %101, i32 noundef %104)
  call void @MatNd_subSelf(ptr noundef %16, ptr noundef %17)
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  br label %105

105:                                              ; preds = %91
  %106 = load i32, ptr %14, align 4, !tbaa !9
  %107 = add i32 %106, 1
  store i32 %107, ptr %14, align 4, !tbaa !9
  br label %86, !llvm.loop !18

108:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %109 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %109, ptr %18, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %130, %108
  %111 = load i32, ptr %18, align 4, !tbaa !9
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = icmp ult i32 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %133

115:                                              ; preds = %110
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = load i32, ptr %18, align 4, !tbaa !9
  %120 = sub i32 %119, 1
  call void @MatNd_copyRow(ptr noundef %116, i32 noundef %117, ptr noundef %118, i32 noundef %120)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #5
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = sub i32 %122, 1
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %19, ptr noundef %121, i32 noundef %123)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = load i32, ptr %18, align 4, !tbaa !9
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %20, ptr noundef %124, i32 noundef %125)
  call void @MatNd_addSelf(ptr noundef %20, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = load i32, ptr %18, align 4, !tbaa !9
  %128 = load i32, ptr %6, align 4, !tbaa !9
  %129 = sub i32 %127, %128
  call void @MatNd_getRowView(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %21, ptr noundef %126, i32 noundef %129)
  call void @MatNd_subSelf(ptr noundef %20, ptr noundef %21)
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #5
  br label %130

130:                                              ; preds = %115
  %131 = load i32, ptr %18, align 4, !tbaa !9
  %132 = add i32 %131, 1
  store i32 %132, ptr %18, align 4, !tbaa !9
  br label %110, !llvm.loop !19

133:                                              ; preds = %114
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = load i32, ptr %6, align 4, !tbaa !9
  %136 = uitofp i32 %135 to double
  %137 = fdiv double 1.000000e+00, %136
  call void @MatNd_constMulSelf(ptr noundef %134, double noundef %137)
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  call void @MatNd_interpolateRows(ptr noundef %138, ptr noundef %139)
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %140)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

declare void @VecNd_constMulSelf(ptr noundef, double noundef, i32 noundef) #1

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


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

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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [43 x i8], align 1
@__func__.MatNd_filterMovingMean = external hidden unnamed_addr constant [23 x i8], align 1
@.str.254 = external hidden unnamed_addr constant [41 x i8], align 1

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

declare void @print_trace() local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @MatNd_create(i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_subSelf(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_addSelf(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_getRowView(ptr dead_on_unwind noalias writable sret(%struct._MatNd) align 8, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_constMulSelf(ptr noundef, double noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local void @MatNd_interpolateRows(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @MatNd_filterMovingMean(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #3 {
  %4 = alloca %struct._MatNd, align 8
  %5 = alloca %struct._MatNd, align 8
  %6 = alloca %struct._MatNd, align 8
  %7 = alloca %struct._MatNd, align 8
  %8 = alloca %struct._MatNd, align 8
  %9 = alloca %struct._MatNd, align 8
  %10 = alloca %struct._MatNd, align 8
  %11 = alloca %struct._MatNd, align 8
  %12 = alloca %struct._MatNd, align 8
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = icmp eq i32 %14, %16
  br i1 %17, label %18, label %24

18:                                               ; preds = %3
  %19 = getelementptr inbounds i8, ptr %1, i64 12
  %20 = load i32, ptr %19, align 4, !tbaa !12
  %21 = getelementptr inbounds i8, ptr %0, i64 12
  %22 = load i32, ptr %21, align 4, !tbaa !12
  %23 = icmp eq i32 %20, %22
  br i1 %23, label %27, label %24

24:                                               ; preds = %18, %3
  %25 = load ptr, ptr @stderr, align 8, !tbaa !13
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.MatNd_filterMovingMean, i32 noundef 4837, ptr noundef nonnull @.str.254) #5
  tail call void @print_trace() #6
  tail call void @abort() #7
  unreachable

27:                                               ; preds = %18
  %28 = add i32 %14, -1
  %29 = add i32 %28, %2
  %30 = tail call ptr @MatNd_create(i32 noundef %29, i32 noundef %20)
  tail call void @MatNd_copyRow(ptr noundef %30, i32 noundef 0, ptr noundef nonnull %1, i32 noundef 0)
  %31 = load ptr, ptr %30, align 8, !tbaa !14
  %32 = uitofp i32 %2 to double
  %33 = getelementptr inbounds i8, ptr %30, i64 12
  %34 = load i32, ptr %33, align 4, !tbaa !12
  tail call void @VecNd_constMulSelf(ptr noundef %31, double noundef %32, i32 noundef %34) #6
  %35 = icmp ugt i32 %2, 1
  br i1 %35, label %.lr.ph, label %.preheader65

.preheader65:                                     ; preds = %.lr.ph, %27
  %36 = icmp ugt i32 %14, %2
  br i1 %36, label %.lr.ph68, label %.preheader

.lr.ph:                                           ; preds = %27, %.lr.ph
  %.06166 = phi i32 [ %38, %.lr.ph ], [ 1, %27 ]
  %37 = add i32 %.06166, -1
  call void @MatNd_copyRow(ptr noundef nonnull %30, i32 noundef %.06166, ptr noundef nonnull %30, i32 noundef %37)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %4, ptr noundef %1, i32 noundef %.06166)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %5, ptr noundef nonnull %30, i32 noundef %.06166)
  call void @MatNd_addSelf(ptr noundef nonnull %5, ptr noundef nonnull %4)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %6, ptr noundef %1, i32 noundef 0)
  call void @MatNd_subSelf(ptr noundef nonnull %5, ptr noundef nonnull %6)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  %38 = add nuw i32 %.06166, 1
  %exitcond.not = icmp eq i32 %38, %2
  br i1 %exitcond.not, label %.preheader65, label %.lr.ph, !llvm.loop !15

.preheader:                                       ; preds = %.lr.ph68, %.preheader65
  %39 = icmp ult i32 %14, %29
  br i1 %39, label %.lr.ph70, label %._crit_edge

.lr.ph68:                                         ; preds = %.preheader65, %.lr.ph68
  %.06067 = phi i32 [ %42, %.lr.ph68 ], [ %2, %.preheader65 ]
  %40 = add i32 %.06067, -1
  call void @MatNd_copyRow(ptr noundef nonnull %30, i32 noundef %.06067, ptr noundef nonnull %30, i32 noundef %40)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %7, ptr noundef %1, i32 noundef %.06067)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %8, ptr noundef nonnull %30, i32 noundef %.06067)
  call void @MatNd_addSelf(ptr noundef nonnull %8, ptr noundef nonnull %7)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  %41 = sub nuw i32 %.06067, %2
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %9, ptr noundef %1, i32 noundef %41)
  call void @MatNd_subSelf(ptr noundef nonnull %8, ptr noundef nonnull %9)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  %42 = add i32 %.06067, 1
  %exitcond71.not = icmp eq i32 %42, %14
  br i1 %exitcond71.not, label %.preheader, label %.lr.ph68, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph70, %.preheader
  %43 = fdiv double 1.000000e+00, %32
  call void @MatNd_constMulSelf(ptr noundef nonnull %30, double noundef %43)
  call void @MatNd_interpolateRows(ptr noundef %0, ptr noundef nonnull %30)
  call void @MatNd_destroy(ptr noundef nonnull %30)
  ret void

.lr.ph70:                                         ; preds = %.preheader, %.lr.ph70
  %.069 = phi i32 [ %46, %.lr.ph70 ], [ %14, %.preheader ]
  %44 = add i32 %.069, -1
  call void @MatNd_copyRow(ptr noundef nonnull %30, i32 noundef %.069, ptr noundef nonnull %30, i32 noundef %44)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %10, ptr noundef %1, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %11, ptr noundef nonnull %30, i32 noundef %.069)
  call void @MatNd_addSelf(ptr noundef nonnull %11, ptr noundef nonnull %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  %45 = sub i32 %.069, %2
  call void @MatNd_getRowView(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %12, ptr noundef %1, i32 noundef %45)
  call void @MatNd_subSelf(ptr noundef nonnull %11, ptr noundef nonnull %12)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  %46 = add i32 %.069, 1
  %exitcond72.not = icmp eq i32 %46, %29
  br i1 %exitcond72.not, label %._crit_edge, label %.lr.ph70, !llvm.loop !18
}

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

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 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { cold nounwind }
attributes #6 = { nounwind }
attributes #7 = { 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, !10, i64 8}
!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 = !{!7, !7, i64 0}
!14 = !{!6, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}


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