; 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 }
%"class.Rcs::SecondOrderLPF1D" = type { ptr, double, double, double, double, double, double }
%"class.Rcs::RampFilter1D" = type { %"class.Rcs::SecondOrderLPF1D", double, double }
%"class.Rcs::Ramp1D" = type { ptr, double, double, double, double }
%"class.Rcs::MedianFilter1D" = type { ptr, i32, double, ptr, ptr }

@.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.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.240 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.testFilters1D = external hidden unnamed_addr constant [14 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [334 x i8], align 1
@.str.277 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.285 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.286 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.288 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.289 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.290 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.291 = external hidden unnamed_addr constant [236 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

declare i32 @__gxx_personality_v0(...)

; 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 noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) #2

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

declare void @MatNd_destroy(ptr noundef) #2

declare i32 @fflush(ptr noundef) #2

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

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

declare i32 @system(ptr noundef) #2

declare void @print_trace() #2

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

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

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

declare i32 @fclose(ptr noundef) #2

declare void @MatNd_setElementsTo(ptr noundef, double noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testFilters1D(i32 noundef %0, ptr noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.Rcs::CmdLineParser", align 1
  %13 = alloca ptr, align 8
  %14 = alloca %"class.Rcs::SecondOrderLPF1D", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.Rcs::RampFilter1D", align 8
  %18 = alloca %"class.Rcs::Ramp1D", align 8
  %19 = alloca %"class.Rcs::MedianFilter1D", align 8
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  br label %25

25:                                               ; preds = %2
  %26 = load ptr, ptr @stderr, align 8, !tbaa !9
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef @.str.22, ptr noundef @__func__.testFilters1D, i32 noundef 2805) #5
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str.276) #5
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.6) #5
  %32 = load ptr, ptr @stderr, align 8, !tbaa !9
  %33 = call i32 @fflush(ptr noundef %32)
  br label %34

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1000, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store double 5.000000e-03, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store double 5.000000e-01, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store double 0.000000e+00, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 1.000000e+00, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store double 5.000000e-01, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 100, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %12, i32 noundef %35, ptr noundef %36)
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef @.str.277, ptr noundef %5, ptr noundef @.str.278, i32 noundef %37)
  %39 = load double, ptr %6, align 8, !tbaa !11
  %40 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef @.str.279, ptr noundef %6, ptr noundef @.str.280, double noundef %39)
  %41 = load double, ptr %7, align 8, !tbaa !11
  %42 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef @.str.281, ptr noundef %7, ptr noundef @.str.282, double noundef %41)
  %43 = load double, ptr %8, align 8, !tbaa !11
  %44 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef @.str.283, ptr noundef %8, ptr noundef @.str.284, double noundef %43)
  %45 = load double, ptr %9, align 8, !tbaa !11
  %46 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef @.str.285, ptr noundef %9, ptr noundef @.str.286, double noundef %45)
  %47 = load double, ptr %10, align 8, !tbaa !11
  %48 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef @.str.287, ptr noundef %10, ptr noundef @.str.288, double noundef %47)
  %49 = load i32, ptr %11, align 4, !tbaa !5
  %50 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef @.str.289, ptr noundef %11, ptr noundef @.str.290, i32 noundef %49)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  %53 = call ptr @MatNd_create(i32 noundef %52, i32 noundef 5)
  store ptr %53, ptr %13, align 8, !tbaa !9
  %54 = load ptr, ptr %13, align 8, !tbaa !9
  %55 = load double, ptr %8, align 8, !tbaa !11
  call void @MatNd_setElementsTo(ptr noundef %54, double noundef %55)
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #5
  %56 = load double, ptr %8, align 8, !tbaa !11
  %57 = load double, ptr %7, align 8, !tbaa !11
  %58 = load double, ptr %6, align 8, !tbaa !11
  call void @_ZN3Rcs16SecondOrderLPF1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(56) %14, double noundef %56, double noundef %57, double noundef %58)
  %59 = load double, ptr %9, align 8, !tbaa !11
  invoke void @_ZN3Rcs16SecondOrderLPF1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(56) %14, double noundef %59)
          to label %60 unwind label %83

60:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 72, ptr %17) #5
  %61 = load double, ptr %8, align 8, !tbaa !11
  %62 = load double, ptr %7, align 8, !tbaa !11
  %63 = load double, ptr %10, align 8, !tbaa !11
  %64 = load double, ptr %6, align 8, !tbaa !11
  invoke void @_ZN3Rcs12RampFilter1DC1Edddd(ptr noundef nonnull align 8 dereferenceable(72) %17, double noundef %61, double noundef %62, double noundef %63, double noundef %64)
          to label %65 unwind label %87

65:                                               ; preds = %60
  %66 = load double, ptr %9, align 8, !tbaa !11
  invoke void @_ZN3Rcs16SecondOrderLPF1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(56) %17, double noundef %66)
          to label %67 unwind label %91

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #5
  %68 = load double, ptr %8, align 8, !tbaa !11
  %69 = load double, ptr %10, align 8, !tbaa !11
  %70 = fmul double 5.000000e-01, %69
  %71 = load double, ptr %6, align 8, !tbaa !11
  invoke void @_ZN3Rcs6Ramp1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(40) %18, double noundef %68, double noundef %70, double noundef %71)
          to label %72 unwind label %95

72:                                               ; preds = %67
  %73 = load double, ptr %9, align 8, !tbaa !11
  invoke void @_ZN3Rcs6Ramp1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(40) %18, double noundef %73)
          to label %74 unwind label %99

74:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #5
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = load double, ptr %8, align 8, !tbaa !11
  invoke void @_ZN3Rcs14MedianFilter1DC1Ejd(ptr noundef nonnull align 8 dereferenceable(40) %19, i32 noundef %75, double noundef %76)
          to label %77 unwind label %103

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

78:                                               ; preds = %147, %77
  %79 = load i32, ptr %20, align 4, !tbaa !5
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %107, label %82

82:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %159

83:                                               ; preds = %34
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %15, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %16, align 4
  br label %236

87:                                               ; preds = %60
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %15, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %16, align 4
  br label %235

91:                                               ; preds = %65
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %15, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %16, align 4
  br label %234

95:                                               ; preds = %67
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %15, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %16, align 4
  br label %233

99:                                               ; preds = %72
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %15, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %16, align 4
  br label %232

103:                                              ; preds = %74
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %15, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %16, align 4
  br label %231

107:                                              ; preds = %78
  %108 = invoke noundef double @_ZN3Rcs16SecondOrderLPF1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %109 unwind label %150

109:                                              ; preds = %107
  %110 = invoke noundef double @_ZN3Rcs12RampFilter1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(72) %17)
          to label %111 unwind label %150

111:                                              ; preds = %109
  %112 = invoke noundef double @_ZN3Rcs6Ramp1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %113 unwind label %150

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %114 = invoke noundef double @_ZN3Rcs14MedianFilter1D4filtEv(ptr noundef nonnull align 8 dereferenceable(40) %19)
          to label %115 unwind label %154

115:                                              ; preds = %113
  store double %114, ptr %21, align 8, !tbaa !11
  %116 = load double, ptr %9, align 8, !tbaa !11
  invoke void @_ZN3Rcs14MedianFilter1D9addSampleEd(ptr noundef nonnull align 8 dereferenceable(40) %19, double noundef %116)
          to label %117 unwind label %154

117:                                              ; preds = %115
  %118 = load ptr, ptr %13, align 8, !tbaa !9
  %119 = load i32, ptr %20, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  %121 = invoke noundef double @_ZNK3Rcs16SecondOrderLPF1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %122 unwind label %154

122:                                              ; preds = %117
  invoke void @MatNd_set(ptr noundef %118, i32 noundef %120, i32 noundef 0, double noundef %121)
          to label %123 unwind label %154

123:                                              ; preds = %122
  %124 = load ptr, ptr %13, align 8, !tbaa !9
  %125 = load i32, ptr %20, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  %127 = invoke noundef double @_ZNK3Rcs12RampFilter1D7getRampEv(ptr noundef nonnull align 8 dereferenceable(72) %17)
          to label %128 unwind label %154

128:                                              ; preds = %123
  invoke void @MatNd_set(ptr noundef %124, i32 noundef %126, i32 noundef 1, double noundef %127)
          to label %129 unwind label %154

129:                                              ; preds = %128
  %130 = load ptr, ptr %13, align 8, !tbaa !9
  %131 = load i32, ptr %20, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  %133 = invoke noundef double @_ZNK3Rcs16SecondOrderLPF1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56) %17)
          to label %134 unwind label %154

134:                                              ; preds = %129
  invoke void @MatNd_set(ptr noundef %130, i32 noundef %132, i32 noundef 2, double noundef %133)
          to label %135 unwind label %154

135:                                              ; preds = %134
  %136 = load ptr, ptr %13, align 8, !tbaa !9
  %137 = load i32, ptr %20, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  %139 = invoke noundef double @_ZNK3Rcs6Ramp1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %140 unwind label %154

140:                                              ; preds = %135
  invoke void @MatNd_set(ptr noundef %136, i32 noundef %138, i32 noundef 3, double noundef %139)
          to label %141 unwind label %154

141:                                              ; preds = %140
  %142 = load ptr, ptr %13, align 8, !tbaa !9
  %143 = load i32, ptr %20, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  %145 = load double, ptr %21, align 8, !tbaa !11
  invoke void @MatNd_set(ptr noundef %142, i32 noundef %144, i32 noundef 4, double noundef %145)
          to label %146 unwind label %154

146:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %20, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %20, align 4, !tbaa !5
  br label %78, !llvm.loop !13

150:                                              ; preds = %111, %109, %107
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %15, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %16, align 4
  br label %158

154:                                              ; preds = %141, %140, %135, %134, %129, %128, %123, %122, %117, %115, %113
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %15, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %158

158:                                              ; preds = %154, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %230

159:                                              ; preds = %82
  %160 = load ptr, ptr %13, align 8, !tbaa !9
  %161 = invoke zeroext i1 @MatNd_toFile(ptr noundef %160, ptr noundef @.str.240)
          to label %162 unwind label %172

162:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  store ptr @.str.291, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %163 = invoke noalias ptr @fopen(ptr noundef @.str.242, ptr noundef @.str.165)
          to label %164 unwind label %176

164:                                              ; preds = %162
  store ptr %163, ptr %23, align 8, !tbaa !9
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr %23, align 8, !tbaa !9
  %167 = icmp ne ptr %166, null
  br i1 %167, label %180, label %168

168:                                              ; preds = %165
  %169 = load ptr, ptr @stderr, align 8, !tbaa !9
  %170 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testFilters1D, i32 noundef 2863, ptr noundef @.str.166) #5
  invoke void @print_trace()
          to label %171 unwind label %176

171:                                              ; preds = %168
  call void @abort() #6
  unreachable

172:                                              ; preds = %159
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %15, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %16, align 4
  br label %230

176:                                              ; preds = %188, %182, %168, %162
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %15, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %16, align 4
  br label %229

180:                                              ; preds = %165
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  %183 = load ptr, ptr %23, align 8, !tbaa !9
  %184 = load ptr, ptr %22, align 8, !tbaa !9
  %185 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %183, ptr noundef %184) #5
  %186 = load ptr, ptr %23, align 8, !tbaa !9
  %187 = invoke i32 @fflush(ptr noundef %186)
          to label %188 unwind label %176

188:                                              ; preds = %182
  %189 = load ptr, ptr %23, align 8, !tbaa !9
  %190 = invoke i32 @fclose(ptr noundef %189)
          to label %191 unwind label %176

191:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %192 = invoke i32 @system(ptr noundef @.str.169)
          to label %193 unwind label %209

193:                                              ; preds = %191
  store i32 %192, ptr %24, align 4, !tbaa !5
  %194 = load i32, ptr %24, align 4, !tbaa !5
  %195 = icmp eq i32 %194, -1
  br i1 %195, label %196, label %213

196:                                              ; preds = %193
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr @stderr, align 8, !tbaa !9
  %199 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %198, ptr noundef @.str.22, ptr noundef @__func__.testFilters1D, i32 noundef 2872) #5
  %200 = load ptr, ptr @stderr, align 8, !tbaa !9
  %201 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %200, ptr noundef @.str.168) #5
  %202 = load ptr, ptr @stderr, align 8, !tbaa !9
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef @.str.6) #5
  %204 = load ptr, ptr @stderr, align 8, !tbaa !9
  %205 = invoke i32 @fflush(ptr noundef %204)
          to label %206 unwind label %209

206:                                              ; preds = %197
  br label %207

207:                                              ; preds = %206
  br label %208

208:                                              ; preds = %207
  br label %226

209:                                              ; preds = %226, %214, %197, %191
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %15, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %229

213:                                              ; preds = %193
  br label %214

214:                                              ; preds = %213
  %215 = load ptr, ptr @stderr, align 8, !tbaa !9
  %216 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.22, ptr noundef @__func__.testFilters1D, i32 noundef 2876) #5
  %217 = load ptr, ptr @stderr, align 8, !tbaa !9
  %218 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %217, ptr noundef @.str.169) #5
  %219 = load ptr, ptr @stderr, align 8, !tbaa !9
  %220 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %219, ptr noundef @.str.6) #5
  %221 = load ptr, ptr @stderr, align 8, !tbaa !9
  %222 = invoke i32 @fflush(ptr noundef %221)
          to label %223 unwind label %209

223:                                              ; preds = %214
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225, %208
  %227 = load ptr, ptr %13, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %227)
          to label %228 unwind label %209

228:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @_ZN3Rcs14MedianFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #5
  call void @_ZN3Rcs6Ramp1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #5
  call void @_ZN3Rcs12RampFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %17) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #5
  call void @_ZN3Rcs16SecondOrderLPF1DD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #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 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i1 true

229:                                              ; preds = %209, %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %230

230:                                              ; preds = %229, %172, %158
  call void @_ZN3Rcs14MedianFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #5
  br label %231

231:                                              ; preds = %230, %103
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #5
  br label %232

232:                                              ; preds = %231, %99
  call void @_ZN3Rcs6Ramp1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #5
  br label %233

233:                                              ; preds = %232, %95
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #5
  br label %234

234:                                              ; preds = %233, %91
  call void @_ZN3Rcs12RampFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %17) #5
  br label %235

235:                                              ; preds = %234, %87
  call void @llvm.lifetime.end.p0(i64 72, ptr %17) #5
  br label %236

236:                                              ; preds = %235, %83
  call void @_ZN3Rcs16SecondOrderLPF1DD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #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 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %15, align 8
  %239 = load i32, ptr %16, align 4
  %240 = insertvalue { ptr, i32 } poison, ptr %238, 0
  %241 = insertvalue { ptr, i32 } %240, i32 %239, 1
  resume { ptr, i32 } %241
}

declare void @_ZN3Rcs16SecondOrderLPF1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(56), double noundef, double noundef, double noundef) unnamed_addr #2

declare void @_ZN3Rcs16SecondOrderLPF1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(56), double noundef) unnamed_addr #2

declare void @_ZN3Rcs12RampFilter1DC1Edddd(ptr noundef nonnull align 8 dereferenceable(72), double noundef, double noundef, double noundef, double noundef) unnamed_addr #2

declare void @_ZN3Rcs6Ramp1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(40), double noundef, double noundef, double noundef) unnamed_addr #2

declare void @_ZN3Rcs6Ramp1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) unnamed_addr #2

declare void @_ZN3Rcs14MedianFilter1DC1Ejd(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, double noundef) unnamed_addr #2

declare noundef double @_ZN3Rcs16SecondOrderLPF1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

declare noundef double @_ZN3Rcs12RampFilter1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2

declare noundef double @_ZN3Rcs6Ramp1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare noundef double @_ZN3Rcs14MedianFilter1D4filtEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare void @_ZN3Rcs14MedianFilter1D9addSampleEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) unnamed_addr #2

declare noundef double @_ZNK3Rcs16SecondOrderLPF1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

declare noundef double @_ZNK3Rcs12RampFilter1D7getRampEv(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2

declare noundef double @_ZNK3Rcs6Ramp1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN3Rcs14MedianFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3Rcs6Ramp1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3Rcs12RampFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3Rcs16SecondOrderLPF1DD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #1

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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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 }
%"class.Rcs::SecondOrderLPF1D" = type { ptr, double, double, double, double, double, double }
%"class.Rcs::RampFilter1D" = type { %"class.Rcs::SecondOrderLPF1D", double, double }
%"class.Rcs::Ramp1D" = type { ptr, double, double, double, double }
%"class.Rcs::MedianFilter1D" = type { ptr, i32, double, ptr, ptr }

@.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.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.240 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.242 = external hidden unnamed_addr constant [17 x i8], align 1
@__func__.testFilters1D = external hidden unnamed_addr constant [14 x i8], align 1
@.str.276 = external hidden unnamed_addr constant [334 x i8], align 1
@.str.277 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.278 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.280 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.282 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.283 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.284 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.285 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.286 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.288 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.289 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.290 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.291 = external hidden unnamed_addr constant [236 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

declare i32 @__gxx_personality_v0(...)

; 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 noundef zeroext i1 @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

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

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #2

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

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

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

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

declare void @print_trace() local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @testFilters1D(i32 noundef %0, ptr noundef %1) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.Rcs::CmdLineParser", align 1
  %11 = alloca %"class.Rcs::SecondOrderLPF1D", align 8
  %12 = alloca %"class.Rcs::RampFilter1D", align 8
  %13 = alloca %"class.Rcs::Ramp1D", align 8
  %14 = alloca %"class.Rcs::MedianFilter1D", align 8
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testFilters1D, i32 noundef 2805) #7
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.276) #7
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.6) #7
  %21 = load ptr, ptr @stderr, align 8, !tbaa !5
  %22 = tail call i32 @fflush(ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 1000, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store double 5.000000e-03, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store double 5.000000e-01, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  store double 0.000000e+00, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  store double 1.000000e+00, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  store double 5.000000e-01, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 100, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #8
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %10, i32 noundef %0, ptr noundef %1)
  %23 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull @.str.277, ptr noundef nonnull %3, ptr noundef nonnull @.str.278, i32 noundef 1000)
  %24 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull @.str.279, ptr noundef nonnull %4, ptr noundef nonnull @.str.280, double noundef 5.000000e-03)
  %25 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull @.str.281, ptr noundef nonnull %5, ptr noundef nonnull @.str.282, double noundef 5.000000e-01)
  %26 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull @.str.283, ptr noundef nonnull %6, ptr noundef nonnull @.str.284, double noundef 0.000000e+00)
  %27 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull @.str.285, ptr noundef nonnull %7, ptr noundef nonnull @.str.286, double noundef 1.000000e+00)
  %28 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull @.str.287, ptr noundef nonnull %8, ptr noundef nonnull @.str.288, double noundef 5.000000e-01)
  %29 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull @.str.289, ptr noundef nonnull %9, ptr noundef nonnull @.str.290, i32 noundef 100)
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  %32 = call ptr @MatNd_create(i32 noundef %31, i32 noundef 5)
  %33 = load double, ptr %6, align 8, !tbaa !11
  call void @MatNd_setElementsTo(ptr noundef %32, double noundef %33)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %11) #8
  %34 = load double, ptr %6, align 8, !tbaa !11
  %35 = load double, ptr %5, align 8, !tbaa !11
  %36 = load double, ptr %4, align 8, !tbaa !11
  call void @_ZN3Rcs16SecondOrderLPF1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(56) %11, double noundef %34, double noundef %35, double noundef %36)
  %37 = load double, ptr %7, align 8, !tbaa !11
  invoke void @_ZN3Rcs16SecondOrderLPF1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(56) %11, double noundef %37)
          to label %38 unwind label %59

38:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %12) #8
  %39 = load double, ptr %6, align 8, !tbaa !11
  %40 = load double, ptr %5, align 8, !tbaa !11
  %41 = load double, ptr %8, align 8, !tbaa !11
  %42 = load double, ptr %4, align 8, !tbaa !11
  invoke void @_ZN3Rcs12RampFilter1DC1Edddd(ptr noundef nonnull align 8 dereferenceable(72) %12, double noundef %39, double noundef %40, double noundef %41, double noundef %42)
          to label %43 unwind label %61

43:                                               ; preds = %38
  %44 = load double, ptr %7, align 8, !tbaa !11
  invoke void @_ZN3Rcs16SecondOrderLPF1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(56) %12, double noundef %44)
          to label %45 unwind label %63

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #8
  %46 = load double, ptr %6, align 8, !tbaa !11
  %47 = load double, ptr %8, align 8, !tbaa !11
  %48 = fmul double %47, 5.000000e-01
  %49 = load double, ptr %4, align 8, !tbaa !11
  invoke void @_ZN3Rcs6Ramp1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(40) %13, double noundef %46, double noundef %48, double noundef %49)
          to label %50 unwind label %65

50:                                               ; preds = %45
  %51 = load double, ptr %7, align 8, !tbaa !11
  invoke void @_ZN3Rcs6Ramp1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(40) %13, double noundef %51)
          to label %52 unwind label %67

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #8
  %53 = load i32, ptr %9, align 4, !tbaa !9
  %54 = load double, ptr %6, align 8, !tbaa !11
  invoke void @_ZN3Rcs14MedianFilter1DC1Ejd(ptr noundef nonnull align 8 dereferenceable(40) %14, i32 noundef %53, double noundef %54)
          to label %.preheader unwind label %69

.preheader:                                       ; preds = %52, %94
  %.034 = phi i32 [ %82, %94 ], [ 0, %52 ]
  %55 = load i32, ptr %3, align 4, !tbaa !9
  %56 = icmp slt i32 %.034, %55
  br i1 %56, label %71, label %57

57:                                               ; preds = %.preheader
  %58 = invoke zeroext i1 @MatNd_toFile(ptr noundef %32, ptr noundef nonnull @.str.240)
          to label %99 unwind label %105

59:                                               ; preds = %2
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %133

61:                                               ; preds = %38
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %132

63:                                               ; preds = %43
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %131

65:                                               ; preds = %45
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %130

67:                                               ; preds = %50
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %129

69:                                               ; preds = %52
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %128

71:                                               ; preds = %.preheader
  %72 = invoke noundef double @_ZN3Rcs16SecondOrderLPF1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(56) %11)
          to label %73 unwind label %95

73:                                               ; preds = %71
  %74 = invoke noundef double @_ZN3Rcs12RampFilter1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(72) %12)
          to label %75 unwind label %95

75:                                               ; preds = %73
  %76 = invoke noundef double @_ZN3Rcs6Ramp1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %77 unwind label %95

77:                                               ; preds = %75
  %78 = invoke noundef double @_ZN3Rcs14MedianFilter1D4filtEv(ptr noundef nonnull align 8 dereferenceable(40) %14)
          to label %79 unwind label %97

79:                                               ; preds = %77
  %80 = load double, ptr %7, align 8, !tbaa !11
  invoke void @_ZN3Rcs14MedianFilter1D9addSampleEd(ptr noundef nonnull align 8 dereferenceable(40) %14, double noundef %80)
          to label %81 unwind label %97

81:                                               ; preds = %79
  %82 = add nuw nsw i32 %.034, 1
  %83 = invoke noundef double @_ZNK3Rcs16SecondOrderLPF1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56) %11)
          to label %84 unwind label %97

84:                                               ; preds = %81
  invoke void @MatNd_set(ptr noundef %32, i32 noundef %82, i32 noundef 0, double noundef %83)
          to label %85 unwind label %97

85:                                               ; preds = %84
  %86 = invoke noundef double @_ZNK3Rcs12RampFilter1D7getRampEv(ptr noundef nonnull align 8 dereferenceable(72) %12)
          to label %87 unwind label %97

87:                                               ; preds = %85
  invoke void @MatNd_set(ptr noundef %32, i32 noundef %82, i32 noundef 1, double noundef %86)
          to label %88 unwind label %97

88:                                               ; preds = %87
  %89 = invoke noundef double @_ZNK3Rcs16SecondOrderLPF1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56) %12)
          to label %90 unwind label %97

90:                                               ; preds = %88
  invoke void @MatNd_set(ptr noundef %32, i32 noundef %82, i32 noundef 2, double noundef %89)
          to label %91 unwind label %97

91:                                               ; preds = %90
  %92 = invoke noundef double @_ZNK3Rcs6Ramp1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %93 unwind label %97

93:                                               ; preds = %91
  invoke void @MatNd_set(ptr noundef %32, i32 noundef %82, i32 noundef 3, double noundef %92)
          to label %94 unwind label %97

94:                                               ; preds = %93
  invoke void @MatNd_set(ptr noundef %32, i32 noundef %82, i32 noundef 4, double noundef %78)
          to label %.preheader unwind label %97, !llvm.loop !13

95:                                               ; preds = %75, %73, %71
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %127

97:                                               ; preds = %94, %93, %91, %90, %88, %87, %85, %84, %81, %79, %77
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %127

99:                                               ; preds = %57
  %100 = call noalias ptr @fopen(ptr noundef nonnull @.str.242, ptr noundef nonnull @.str.165)
  %.not = icmp eq ptr %100, null
  br i1 %.not, label %101, label %109

101:                                              ; preds = %99
  %102 = load ptr, ptr @stderr, align 8, !tbaa !5
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFilters1D, i32 noundef 2863, ptr noundef nonnull @.str.166) #7
  invoke void @print_trace()
          to label %104 unwind label %107

104:                                              ; preds = %101
  call void @abort() #9
  unreachable

105:                                              ; preds = %57
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %127

107:                                              ; preds = %101
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %127

109:                                              ; preds = %99
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %100, ptr noundef nonnull @.str.291) #8
  %111 = call i32 @fflush(ptr noundef nonnull %100)
  %112 = call i32 @fclose(ptr noundef nonnull %100)
  %113 = invoke i32 @system(ptr noundef nonnull @.str.169)
          to label %114 unwind label %124

114:                                              ; preds = %109
  %115 = icmp eq i32 %113, -1
  %116 = load ptr, ptr @stderr, align 8, !tbaa !5
  %. = select i1 %115, i32 2872, i32 2876
  %.str.168..str.169 = select i1 %115, ptr @.str.168, ptr @.str.169
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testFilters1D, i32 noundef %.) #7
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull %.str.168..str.169) #7
  %120 = load ptr, ptr @stderr, align 8, !tbaa !5
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.6) #7
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = call i32 @fflush(ptr noundef %122)
  invoke void @MatNd_destroy(ptr noundef %32)
          to label %126 unwind label %124

124:                                              ; preds = %114, %109
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %127

126:                                              ; preds = %114
  call void @_ZN3Rcs14MedianFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #8
  call void @_ZN3Rcs6Ramp1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #8
  call void @_ZN3Rcs12RampFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %12) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %12) #8
  call void @_ZN3Rcs16SecondOrderLPF1DD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  ret i1 true

127:                                              ; preds = %107, %124, %95, %97, %105
  %.pn37.pn = phi { ptr, i32 } [ %106, %105 ], [ %98, %97 ], [ %96, %95 ], [ %125, %124 ], [ %108, %107 ]
  call void @_ZN3Rcs14MedianFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #8
  br label %128

128:                                              ; preds = %127, %69
  %.pn37.pn.pn = phi { ptr, i32 } [ %.pn37.pn, %127 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #8
  br label %129

129:                                              ; preds = %128, %67
  %.pn37.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn, %128 ], [ %68, %67 ]
  call void @_ZN3Rcs6Ramp1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #8
  br label %130

130:                                              ; preds = %129, %65
  %.pn37.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn.pn, %129 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #8
  br label %131

131:                                              ; preds = %130, %63
  %.pn37.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn.pn.pn, %130 ], [ %64, %63 ]
  call void @_ZN3Rcs12RampFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %12) #8
  br label %132

132:                                              ; preds = %131, %61
  %.pn37.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn.pn.pn.pn, %131 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %12) #8
  br label %133

133:                                              ; preds = %132, %59
  %.pn37.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn37.pn.pn.pn.pn.pn.pn, %132 ], [ %60, %59 ]
  call void @_ZN3Rcs16SecondOrderLPF1DD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn37.pn.pn.pn.pn.pn.pn.pn
}

declare void @_ZN3Rcs16SecondOrderLPF1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(56), double noundef, double noundef, double noundef) unnamed_addr #2

declare void @_ZN3Rcs16SecondOrderLPF1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(56), double noundef) unnamed_addr #2

declare void @_ZN3Rcs12RampFilter1DC1Edddd(ptr noundef nonnull align 8 dereferenceable(72), double noundef, double noundef, double noundef, double noundef) unnamed_addr #2

declare void @_ZN3Rcs6Ramp1DC1Eddd(ptr noundef nonnull align 8 dereferenceable(40), double noundef, double noundef, double noundef) unnamed_addr #2

declare void @_ZN3Rcs6Ramp1D9setTargetEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) unnamed_addr #2

declare void @_ZN3Rcs14MedianFilter1DC1Ejd(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, double noundef) unnamed_addr #2

declare noundef double @_ZN3Rcs16SecondOrderLPF1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

declare noundef double @_ZN3Rcs12RampFilter1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2

declare noundef double @_ZN3Rcs6Ramp1D7iterateEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare noundef double @_ZN3Rcs14MedianFilter1D4filtEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare void @_ZN3Rcs14MedianFilter1D9addSampleEd(ptr noundef nonnull align 8 dereferenceable(40), double noundef) unnamed_addr #2

declare noundef double @_ZNK3Rcs16SecondOrderLPF1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

declare noundef double @_ZNK3Rcs12RampFilter1D7getRampEv(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #2

declare noundef double @_ZNK3Rcs6Ramp1D11getPositionEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN3Rcs14MedianFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN3Rcs6Ramp1DD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN3Rcs12RampFilter1DD1Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #6

; Function Attrs: nounwind
declare void @_ZN3Rcs16SecondOrderLPF1DD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6

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 = { 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 #7 = { cold nounwind }
attributes #8 = { nounwind }
attributes #9 = { 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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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