; 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
@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.60 = external hidden unnamed_addr constant [6 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.235 = external hidden unnamed_addr constant [286 x i8], align 1
@.str.236 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.testMovingMeanFilter = external hidden unnamed_addr constant [21 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [96 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 void @MatNd_setRandom(ptr noundef, double noundef, double 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 noalias ptr @fopen(ptr noundef, ptr noundef) #2

declare i32 @fclose(ptr noundef) #2

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

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

24:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 10, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 100, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %7, i32 noundef %25, ptr noundef %26)
  %27 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef @.str.236, ptr noundef %5, ptr noundef null)
  %28 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef @.str.60, ptr noundef %6, ptr noundef null)
  br label %29

29:                                               ; preds = %24
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = icmp ugt i32 %30, 0
  br i1 %31, label %32, label %36

32:                                               ; preds = %29
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = icmp ult i32 %33, %34
  br i1 %35, label %39, label %36

36:                                               ; preds = %32, %29
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testMovingMeanFilter, i32 noundef 2417, ptr noundef @.str.238) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

39:                                               ; preds = %32
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = call ptr @MatNd_create(i32 noundef %42, i32 noundef 3)
  store ptr %43, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = call ptr @MatNd_create(i32 noundef %44, i32 noundef 3)
  store ptr %45, ptr %9, align 8, !tbaa !9
  %46 = load ptr, ptr %8, align 8, !tbaa !9
  call void @MatNd_setRandom(ptr noundef %46, double noundef 0.000000e+00, double noundef 1.000000e+00)
  %47 = load ptr, ptr %9, align 8, !tbaa !9
  %48 = load ptr, ptr %8, align 8, !tbaa !9
  %49 = load i32, ptr %5, align 4, !tbaa !5
  call void @MatNd_filterMovingMean(ptr noundef %47, ptr noundef %48, i32 noundef %49)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = call ptr @MatNd_create(i32 noundef %50, i32 noundef 3)
  store ptr %51, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %72, %41
  %53 = load i32, ptr %11, align 4, !tbaa !5
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = icmp ult i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %75

57:                                               ; preds = %52
  %58 = load ptr, ptr %10, align 8, !tbaa !9
  %59 = load i32, ptr %11, align 4, !tbaa !5
  %60 = load i32, ptr %11, align 4, !tbaa !5
  %61 = uitofp i32 %60 to double
  call void @MatNd_set(ptr noundef %58, i32 noundef %59, i32 noundef 0, double noundef %61)
  %62 = load ptr, ptr %10, align 8, !tbaa !9
  %63 = load i32, ptr %11, align 4, !tbaa !5
  %64 = load ptr, ptr %8, align 8, !tbaa !9
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = call double @MatNd_get(ptr noundef %64, i32 noundef %65, i32 noundef 0)
  call void @MatNd_set(ptr noundef %62, i32 noundef %63, i32 noundef 1, double noundef %66)
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  %68 = load i32, ptr %11, align 4, !tbaa !5
  %69 = load ptr, ptr %9, align 8, !tbaa !9
  %70 = load i32, ptr %11, align 4, !tbaa !5
  %71 = call double @MatNd_get(ptr noundef %69, i32 noundef %70, i32 noundef 0)
  call void @MatNd_set(ptr noundef %67, i32 noundef %68, i32 noundef 2, double noundef %71)
  br label %72

72:                                               ; preds = %57
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = add i32 %73, 1
  store i32 %74, ptr %11, align 4, !tbaa !5
  br label %52, !llvm.loop !11

75:                                               ; preds = %56
  %76 = load ptr, ptr %10, align 8, !tbaa !9
  %77 = call zeroext i1 @MatNd_toFile(ptr noundef %76, ptr noundef @.str.240)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr @.str.243, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %78 = call noalias ptr @fopen(ptr noundef @.str.242, ptr noundef @.str.165)
  store ptr %78, ptr %13, align 8, !tbaa !9
  br label %79

79:                                               ; preds = %75
  %80 = load ptr, ptr %13, align 8, !tbaa !9
  %81 = icmp ne ptr %80, null
  br i1 %81, label %85, label %82

82:                                               ; preds = %79
  %83 = load ptr, ptr @stderr, align 8, !tbaa !9
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testMovingMeanFilter, i32 noundef 2440, ptr noundef @.str.166) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

85:                                               ; preds = %79
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %13, align 8, !tbaa !9
  %89 = load ptr, ptr %12, align 8, !tbaa !9
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef %89) #5
  %91 = load ptr, ptr %13, align 8, !tbaa !9
  %92 = call i32 @fflush(ptr noundef %91)
  %93 = load ptr, ptr %13, align 8, !tbaa !9
  %94 = call i32 @fclose(ptr noundef %93)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %95 = call i32 @system(ptr noundef @.str.169)
  store i32 %95, ptr %14, align 4, !tbaa !5
  %96 = load i32, ptr %14, align 4, !tbaa !5
  %97 = icmp eq i32 %96, -1
  br i1 %97, label %98, label %110

98:                                               ; preds = %87
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str.22, ptr noundef @__func__.testMovingMeanFilter, i32 noundef 2449) #5
  %102 = load ptr, ptr @stderr, align 8, !tbaa !9
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef @.str.168) #5
  %104 = load ptr, ptr @stderr, align 8, !tbaa !9
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef @.str.6) #5
  %106 = load ptr, ptr @stderr, align 8, !tbaa !9
  %107 = call i32 @fflush(ptr noundef %106)
  br label %108

108:                                              ; preds = %99
  br label %109

109:                                              ; preds = %108
  br label %122

110:                                              ; preds = %87
  br label %111

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

120:                                              ; preds = %111
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121, %109
  %123 = load ptr, ptr %10, 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)
  %125 = load ptr, ptr %9, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %125)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #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 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i1 true
}

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

declare void @MatNd_filterMovingMean(ptr noundef, 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
@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.60 = external hidden unnamed_addr constant [6 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.235 = external hidden unnamed_addr constant [286 x i8], align 1
@.str.236 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.238 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.240 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.testMovingMeanFilter = external hidden unnamed_addr constant [21 x i8], align 1
@.str.243 = external hidden unnamed_addr constant [96 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 void @MatNd_setRandom(ptr noundef, double noundef, double 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

; 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 @testMovingMeanFilter(i32 noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.Rcs::CmdLineParser", align 1
  %6 = load ptr, ptr @stderr, align 8, !tbaa !5
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %6, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testMovingMeanFilter, i32 noundef 2409) #6
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.235) #6
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str.6) #6
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = tail call i32 @fflush(ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 10, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store i32 100, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %5, i32 noundef %0, ptr noundef %1)
  %14 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull @.str.236, ptr noundef nonnull %3, ptr noundef null)
  %15 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull @.str.60, ptr noundef nonnull %4, ptr noundef null)
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %20, label %17

17:                                               ; preds = %2
  %18 = load i32, ptr %4, align 4, !tbaa !9
  %19 = icmp ult i32 %16, %18
  br i1 %19, label %23, label %20

20:                                               ; preds = %17, %2
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testMovingMeanFilter, i32 noundef 2417, ptr noundef nonnull @.str.238) #6
  call void @print_trace()
  call void @abort() #8
  unreachable

23:                                               ; preds = %17
  %24 = call ptr @MatNd_create(i32 noundef %18, i32 noundef 3)
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = call ptr @MatNd_create(i32 noundef %25, i32 noundef 3)
  call void @MatNd_setRandom(ptr noundef %24, double noundef 0.000000e+00, double noundef 1.000000e+00)
  %27 = load i32, ptr %3, align 4, !tbaa !9
  call void @MatNd_filterMovingMean(ptr noundef %26, ptr noundef %24, i32 noundef %27)
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = call ptr @MatNd_create(i32 noundef %28, i32 noundef 3)
  %30 = load i32, ptr %4, align 4, !tbaa !9
  %.not32 = icmp eq i32 %30, 0
  br i1 %.not32, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %23
  %31 = call zeroext i1 @MatNd_toFile(ptr noundef %29, ptr noundef nonnull @.str.240)
  %32 = call noalias ptr @fopen(ptr noundef nonnull @.str.242, ptr noundef nonnull @.str.165)
  %.not30 = icmp eq ptr %32, null
  br i1 %.not30, label %39, label %42

.lr.ph:                                           ; preds = %23, %.lr.ph
  %.031 = phi i32 [ %36, %.lr.ph ], [ 0, %23 ]
  %33 = uitofp i32 %.031 to double
  call void @MatNd_set(ptr noundef %29, i32 noundef %.031, i32 noundef 0, double noundef %33)
  %34 = call double @MatNd_get(ptr noundef %24, i32 noundef %.031, i32 noundef 0)
  call void @MatNd_set(ptr noundef %29, i32 noundef %.031, i32 noundef 1, double noundef %34)
  %35 = call double @MatNd_get(ptr noundef %26, i32 noundef %.031, i32 noundef 0)
  call void @MatNd_set(ptr noundef %29, i32 noundef %.031, i32 noundef 2, double noundef %35)
  %36 = add nuw i32 %.031, 1
  %37 = load i32, ptr %4, align 4, !tbaa !9
  %38 = icmp ult i32 %36, %37
  br i1 %38, label %.lr.ph, label %._crit_edge, !llvm.loop !11

39:                                               ; preds = %._crit_edge
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testMovingMeanFilter, i32 noundef 2440, ptr noundef nonnull @.str.166) #6
  call void @print_trace()
  call void @abort() #8
  unreachable

42:                                               ; preds = %._crit_edge
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %32, ptr noundef nonnull @.str.243) #7
  %44 = call i32 @fflush(ptr noundef nonnull %32)
  %45 = call i32 @fclose(ptr noundef nonnull %32)
  %46 = call i32 @system(ptr noundef nonnull @.str.169)
  %47 = icmp eq i32 %46, -1
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %. = select i1 %47, i32 2449, i32 2453
  %.str.168..str.169 = select i1 %47, ptr @.str.168, ptr @.str.169
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testMovingMeanFilter, i32 noundef %.) #6
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull %.str.168..str.169) #6
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.6) #6
  %54 = load ptr, ptr @stderr, align 8, !tbaa !5
  %55 = call i32 @fflush(ptr noundef %54)
  call void @MatNd_destroy(ptr noundef %29)
  call void @MatNd_destroy(ptr noundef %24)
  call void @MatNd_destroy(ptr noundef %26)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  ret i1 true
}

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

declare void @MatNd_filterMovingMean(ptr noundef, 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass