; 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::SecondOrderLPFND" = type { ptr, ptr, i64 }
%"class.Rcs::RampFilterND" = type { %"class.Rcs::SecondOrderLPFND", double, ptr }
%struct._MatNd = type { ptr, i32, i32, i32, 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.71 = external hidden unnamed_addr constant [5 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
@.str.277 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [6 x i8], align 1
@__func__.testFiltersND = external hidden unnamed_addr constant [14 x i8], align 1
@.str.292 = external hidden unnamed_addr constant [309 x i8], align 1
@.str.293 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.294 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.295 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.296 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.297 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.298 = external hidden unnamed_addr constant [48 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_setRandom(ptr noundef, double noundef, double 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

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare ptr @strcat(ptr noundef, ptr noundef) #1

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

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 @testFiltersND(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 i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca %"class.Rcs::CmdLineParser", align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.Rcs::SecondOrderLPFND", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.Rcs::RampFilterND", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca [4096 x i8], align 16
  %22 = alloca [256 x i8], align 16
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  br label %27

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

36:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 3, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1000, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store double 5.000000e-03, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store double 5.000000e-01, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 2.000000e+00, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %10, i32 noundef %37, ptr noundef %38)
  %39 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.277, ptr noundef %6, ptr noundef null)
  %40 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.279, ptr noundef %7, ptr noundef null)
  %41 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.281, ptr noundef %8, ptr noundef null)
  %42 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.287, ptr noundef %9, ptr noundef null)
  %43 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.71, ptr noundef %5, ptr noundef null)
  br label %44

44:                                               ; preds = %36
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = icmp ult i32 %45, 1000
  br i1 %46, label %50, label %47

47:                                               ; preds = %44
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testFiltersND, i32 noundef 2911, ptr noundef @.str.293) #5
  call void @print_trace()
  call void @abort() #6
  unreachable

50:                                               ; preds = %44
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = add i32 %53, 1
  %55 = load i32, ptr %5, align 4, !tbaa !5
  %56 = mul i32 3, %55
  %57 = call ptr @MatNd_create(i32 noundef %54, i32 noundef %56)
  store ptr %57, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = call ptr @MatNd_create(i32 noundef %58, i32 noundef 1)
  store ptr %59, ptr %12, align 8, !tbaa !9
  %60 = load ptr, ptr %12, align 8, !tbaa !9
  call void @MatNd_setRandom(ptr noundef %60, double noundef -1.000000e+00, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = call ptr @MatNd_create(i32 noundef %61, i32 noundef 1)
  store ptr %62, ptr %13, align 8, !tbaa !9
  %63 = load ptr, ptr %13, align 8, !tbaa !9
  call void @MatNd_setRandom(ptr noundef %63, double noundef 2.000000e+00, double noundef 3.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  %64 = load ptr, ptr %12, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct._MatNd, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = load double, ptr %8, align 8, !tbaa !11
  %68 = load double, ptr %7, align 8, !tbaa !11
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  call void @_ZN3Rcs16SecondOrderLPFNDC1EPKdddm(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef %66, double noundef %67, double noundef %68, i64 noundef %70)
  %71 = load ptr, ptr %13, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct._MatNd, ptr %71, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  invoke void @_ZN3Rcs16SecondOrderLPFND9setTargetEPKd(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef %73)
          to label %74 unwind label %93

74:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #5
  %75 = load ptr, ptr %12, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct._MatNd, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !13
  %78 = load double, ptr %8, align 8, !tbaa !11
  %79 = load double, ptr %9, align 8, !tbaa !11
  %80 = load double, ptr %7, align 8, !tbaa !11
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = zext i32 %81 to i64
  invoke void @_ZN3Rcs12RampFilterNDC1EPddddm(ptr noundef nonnull align 8 dereferenceable(40) %17, ptr noundef %77, double noundef %78, double noundef %79, double noundef %80, i64 noundef %82)
          to label %83 unwind label %97

83:                                               ; preds = %74
  %84 = load ptr, ptr %13, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct._MatNd, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  invoke void @_ZN3Rcs16SecondOrderLPFND9setTargetEPKd(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef %86)
          to label %87 unwind label %101

87:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %158, %87
  %89 = load i32, ptr %18, align 4, !tbaa !5
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = icmp ult i32 %89, %90
  br i1 %91, label %105, label %92

92:                                               ; preds = %88
  store i32 6, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %162

93:                                               ; preds = %52
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %15, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %16, align 4
  br label %289

97:                                               ; preds = %74
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %15, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %16, align 4
  br label %288

101:                                              ; preds = %162, %83
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %15, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %16, align 4
  br label %287

105:                                              ; preds = %88
  invoke void @_ZN3Rcs16SecondOrderLPFND7iterateEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %106 unwind label %113

106:                                              ; preds = %105
  invoke void @_ZN3Rcs12RampFilterND7iterateEv(ptr noundef nonnull align 8 dereferenceable(40) %17)
          to label %107 unwind label %113

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

108:                                              ; preds = %150, %107
  %109 = load i32, ptr %20, align 4, !tbaa !5
  %110 = load i32, ptr %5, align 4, !tbaa !5
  %111 = icmp ult i32 %109, %110
  br i1 %111, label %117, label %112

112:                                              ; preds = %108
  store i32 9, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %157

113:                                              ; preds = %106, %105
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %15, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %16, align 4
  br label %161

117:                                              ; preds = %108
  %118 = load ptr, ptr %11, align 8, !tbaa !9
  %119 = load i32, ptr %18, align 4, !tbaa !5
  %120 = add i32 %119, 1
  %121 = load i32, ptr %20, align 4, !tbaa !5
  %122 = load i32, ptr %20, align 4, !tbaa !5
  %123 = zext i32 %122 to i64
  %124 = invoke noundef double @_ZNK3Rcs16SecondOrderLPFND11getPositionEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %123)
          to label %125 unwind label %153

125:                                              ; preds = %117
  invoke void @MatNd_set(ptr noundef %118, i32 noundef %120, i32 noundef %121, double noundef %124)
          to label %126 unwind label %153

126:                                              ; preds = %125
  %127 = load ptr, ptr %11, align 8, !tbaa !9
  %128 = load i32, ptr %18, align 4, !tbaa !5
  %129 = add i32 %128, 1
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = load i32, ptr %20, align 4, !tbaa !5
  %132 = add i32 %130, %131
  %133 = load i32, ptr %20, align 4, !tbaa !5
  %134 = zext i32 %133 to i64
  %135 = invoke noundef double @_ZNK3Rcs12RampFilterND7getRampEm(ptr noundef nonnull align 8 dereferenceable(40) %17, i64 noundef %134)
          to label %136 unwind label %153

136:                                              ; preds = %126
  invoke void @MatNd_set(ptr noundef %127, i32 noundef %129, i32 noundef %132, double noundef %135)
          to label %137 unwind label %153

137:                                              ; preds = %136
  %138 = load ptr, ptr %11, align 8, !tbaa !9
  %139 = load i32, ptr %18, align 4, !tbaa !5
  %140 = add i32 %139, 1
  %141 = load i32, ptr %5, align 4, !tbaa !5
  %142 = mul i32 2, %141
  %143 = load i32, ptr %20, align 4, !tbaa !5
  %144 = add i32 %142, %143
  %145 = load i32, ptr %20, align 4, !tbaa !5
  %146 = zext i32 %145 to i64
  %147 = invoke noundef double @_ZNK3Rcs16SecondOrderLPFND11getPositionEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %146)
          to label %148 unwind label %153

148:                                              ; preds = %137
  invoke void @MatNd_set(ptr noundef %138, i32 noundef %140, i32 noundef %144, double noundef %147)
          to label %149 unwind label %153

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  %151 = load i32, ptr %20, align 4, !tbaa !5
  %152 = add i32 %151, 1
  store i32 %152, ptr %20, align 4, !tbaa !5
  br label %108, !llvm.loop !16

153:                                              ; preds = %148, %137, %136, %126, %125, %117
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %15, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %161

157:                                              ; preds = %112
  br label %158

158:                                              ; preds = %157
  %159 = load i32, ptr %18, align 4, !tbaa !5
  %160 = add i32 %159, 1
  store i32 %160, ptr %18, align 4, !tbaa !5
  br label %88, !llvm.loop !18

161:                                              ; preds = %153, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %287

162:                                              ; preds = %92
  %163 = load ptr, ptr %11, align 8, !tbaa !9
  %164 = invoke zeroext i1 @MatNd_toFile(ptr noundef %163, ptr noundef @.str.240)
          to label %165 unwind label %101

165:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 4096, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !5
  %166 = getelementptr inbounds [4096 x i8], ptr %21, i64 0, i64 0
  %167 = call ptr @strcpy(ptr noundef %166, ptr noundef @.str.294) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %220, %165
  %169 = load i32, ptr %24, align 4, !tbaa !5
  %170 = load i32, ptr %5, align 4, !tbaa !5
  %171 = icmp ult i32 %169, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %168
  store i32 12, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %223

173:                                              ; preds = %168
  %174 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %175 = load i32, ptr %24, align 4, !tbaa !5
  %176 = add i32 %175, 1
  %177 = load i32, ptr %24, align 4, !tbaa !5
  %178 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %174, ptr noundef @.str.295, i32 noundef %176, i32 noundef %177) #5
  %179 = getelementptr inbounds [4096 x i8], ptr %21, i64 0, i64 0
  %180 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %181 = call ptr @strcat(ptr noundef %179, ptr noundef %180) #5
  %182 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %183 = load i32, ptr %5, align 4, !tbaa !5
  %184 = load i32, ptr %24, align 4, !tbaa !5
  %185 = add i32 %183, %184
  %186 = add i32 %185, 1
  %187 = load i32, ptr %24, align 4, !tbaa !5
  %188 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %182, ptr noundef @.str.296, i32 noundef %186, i32 noundef %187) #5
  %189 = getelementptr inbounds [4096 x i8], ptr %21, i64 0, i64 0
  %190 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %191 = call ptr @strcat(ptr noundef %189, ptr noundef %190) #5
  %192 = load i32, ptr %24, align 4, !tbaa !5
  %193 = load i32, ptr %5, align 4, !tbaa !5
  %194 = sub i32 %193, 1
  %195 = icmp ne i32 %192, %194
  br i1 %195, label %196, label %205

196:                                              ; preds = %173
  %197 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %198 = load i32, ptr %5, align 4, !tbaa !5
  %199 = mul i32 2, %198
  %200 = load i32, ptr %24, align 4, !tbaa !5
  %201 = add i32 %199, %200
  %202 = add i32 %201, 1
  %203 = load i32, ptr %24, align 4, !tbaa !5
  %204 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %197, ptr noundef @.str.297, i32 noundef %202, i32 noundef %203) #5
  br label %214

205:                                              ; preds = %173
  %206 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %207 = load i32, ptr %5, align 4, !tbaa !5
  %208 = mul i32 2, %207
  %209 = load i32, ptr %24, align 4, !tbaa !5
  %210 = add i32 %208, %209
  %211 = add i32 %210, 1
  %212 = load i32, ptr %24, align 4, !tbaa !5
  %213 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %206, ptr noundef @.str.298, i32 noundef %211, i32 noundef %212) #5
  br label %214

214:                                              ; preds = %205, %196
  %215 = getelementptr inbounds [4096 x i8], ptr %21, i64 0, i64 0
  %216 = getelementptr inbounds [256 x i8], ptr %22, i64 0, i64 0
  %217 = call ptr @strcat(ptr noundef %215, ptr noundef %216) #5
  %218 = load i32, ptr %23, align 4, !tbaa !5
  %219 = add i32 %218, 1
  store i32 %219, ptr %23, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %214
  %221 = load i32, ptr %24, align 4, !tbaa !5
  %222 = add i32 %221, 1
  store i32 %222, ptr %24, align 4, !tbaa !5
  br label %168, !llvm.loop !19

223:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %224 = invoke noalias ptr @fopen(ptr noundef @.str.242, ptr noundef @.str.165)
          to label %225 unwind label %233

225:                                              ; preds = %223
  store ptr %224, ptr %25, align 8, !tbaa !9
  br label %226

226:                                              ; preds = %225
  %227 = load ptr, ptr %25, align 8, !tbaa !9
  %228 = icmp ne ptr %227, null
  br i1 %228, label %237, label %229

229:                                              ; preds = %226
  %230 = load ptr, ptr @stderr, align 8, !tbaa !9
  %231 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %230, ptr noundef @.str.57, ptr noundef @.str.3, ptr noundef @__func__.testFiltersND, i32 noundef 2974, ptr noundef @.str.166) #5
  invoke void @print_trace()
          to label %232 unwind label %233

232:                                              ; preds = %229
  call void @abort() #6
  unreachable

233:                                              ; preds = %245, %239, %229, %223
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %15, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %16, align 4
  br label %286

237:                                              ; preds = %226
  br label %238

238:                                              ; preds = %237
  br label %239

239:                                              ; preds = %238
  %240 = load ptr, ptr %25, align 8, !tbaa !9
  %241 = getelementptr inbounds [4096 x i8], ptr %21, i64 0, i64 0
  %242 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %240, ptr noundef %241) #5
  %243 = load ptr, ptr %25, align 8, !tbaa !9
  %244 = invoke i32 @fflush(ptr noundef %243)
          to label %245 unwind label %233

245:                                              ; preds = %239
  %246 = load ptr, ptr %25, align 8, !tbaa !9
  %247 = invoke i32 @fclose(ptr noundef %246)
          to label %248 unwind label %233

248:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %249 = invoke i32 @system(ptr noundef @.str.169)
          to label %250 unwind label %266

250:                                              ; preds = %248
  store i32 %249, ptr %26, align 4, !tbaa !5
  %251 = load i32, ptr %26, align 4, !tbaa !5
  %252 = icmp eq i32 %251, -1
  br i1 %252, label %253, label %270

253:                                              ; preds = %250
  br label %254

254:                                              ; preds = %253
  %255 = load ptr, ptr @stderr, align 8, !tbaa !9
  %256 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %255, ptr noundef @.str.22, ptr noundef @__func__.testFiltersND, i32 noundef 2983) #5
  %257 = load ptr, ptr @stderr, align 8, !tbaa !9
  %258 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %257, ptr noundef @.str.168) #5
  %259 = load ptr, ptr @stderr, align 8, !tbaa !9
  %260 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %259, ptr noundef @.str.6) #5
  %261 = load ptr, ptr @stderr, align 8, !tbaa !9
  %262 = invoke i32 @fflush(ptr noundef %261)
          to label %263 unwind label %266

263:                                              ; preds = %254
  br label %264

264:                                              ; preds = %263
  br label %265

265:                                              ; preds = %264
  br label %283

266:                                              ; preds = %283, %271, %254, %248
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %15, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %286

270:                                              ; preds = %250
  br label %271

271:                                              ; preds = %270
  %272 = load ptr, ptr @stderr, align 8, !tbaa !9
  %273 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %272, ptr noundef @.str.22, ptr noundef @__func__.testFiltersND, i32 noundef 2987) #5
  %274 = load ptr, ptr @stderr, align 8, !tbaa !9
  %275 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %274, ptr noundef @.str.169) #5
  %276 = load ptr, ptr @stderr, align 8, !tbaa !9
  %277 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %276, ptr noundef @.str.6) #5
  %278 = load ptr, ptr @stderr, align 8, !tbaa !9
  %279 = invoke i32 @fflush(ptr noundef %278)
          to label %280 unwind label %266

280:                                              ; preds = %271
  br label %281

281:                                              ; preds = %280
  br label %282

282:                                              ; preds = %281
  br label %283

283:                                              ; preds = %282, %265
  %284 = load ptr, ptr %11, align 8, !tbaa !9
  invoke void @MatNd_destroy(ptr noundef %284)
          to label %285 unwind label %266

285:                                              ; preds = %283
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr %21) #5
  call void @_ZN3Rcs12RampFilterNDD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #5
  call void @_ZN3Rcs16SecondOrderLPFNDD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, 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 %11) #5
  call void @llvm.lifetime.end.p0(i64 1, 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 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret i1 true

286:                                              ; preds = %266, %233
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4096, ptr %21) #5
  br label %287

287:                                              ; preds = %286, %161, %101
  call void @_ZN3Rcs12RampFilterNDD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %17) #5
  br label %288

288:                                              ; preds = %287, %97
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #5
  br label %289

289:                                              ; preds = %288, %93
  call void @_ZN3Rcs16SecondOrderLPFNDD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, 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 %11) #5
  call void @llvm.lifetime.end.p0(i64 1, 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 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %290

290:                                              ; preds = %289
  %291 = load ptr, ptr %15, align 8
  %292 = load i32, ptr %16, align 4
  %293 = insertvalue { ptr, i32 } poison, ptr %291, 0
  %294 = insertvalue { ptr, i32 } %293, i32 %292, 1
  resume { ptr, i32 } %294
}

declare void @_ZN3Rcs16SecondOrderLPFNDC1EPKdddm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, double noundef, double noundef, i64 noundef) unnamed_addr #2

declare void @_ZN3Rcs16SecondOrderLPFND9setTargetEPKd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #2

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

declare void @_ZN3Rcs16SecondOrderLPFND7iterateEv(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

declare void @_ZN3Rcs12RampFilterND7iterateEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare noundef double @_ZNK3Rcs16SecondOrderLPFND11getPositionEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #2

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind
declare void @_ZN3Rcs16SecondOrderLPFNDD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = !{!14, !10, i64 0}
!14 = !{!"_ZTS6_MatNd", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !15, i64 20}
!15 = !{!"bool", !7, 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"

%"class.Rcs::CmdLineParser" = type { i8 }
%"class.Rcs::SecondOrderLPFND" = type { ptr, ptr, i64 }
%"class.Rcs::RampFilterND" = type { %"class.Rcs::SecondOrderLPFND", double, 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.71 = external hidden unnamed_addr constant [5 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
@.str.277 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.279 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.281 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.287 = external hidden unnamed_addr constant [6 x i8], align 1
@__func__.testFiltersND = external hidden unnamed_addr constant [14 x i8], align 1
@.str.292 = external hidden unnamed_addr constant [309 x i8], align 1
@.str.293 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.294 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.295 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.296 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.297 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.298 = external hidden unnamed_addr constant [48 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_setRandom(ptr noundef, double noundef, double 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: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcat(ptr noalias noundef returned, ptr noalias nocapture noundef readonly) local_unnamed_addr #3

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

declare void @print_trace() local_unnamed_addr #2

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

; 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 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 @testFiltersND(i32 noundef %0, ptr noundef %1) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca %"class.Rcs::CmdLineParser", align 1
  %9 = alloca %"class.Rcs::SecondOrderLPFND", align 8
  %10 = alloca %"class.Rcs::RampFilterND", align 8
  %11 = alloca [4096 x i8], align 16
  %12 = alloca [256 x i8], align 16
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testFiltersND, i32 noundef 2896) #8
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.292) #8
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.6) #8
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = tail call i32 @fflush(ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 3, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 1000, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  store double 5.000000e-03, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  store double 5.000000e-01, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  store double 2.000000e+00, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %8, i32 noundef %0, ptr noundef %1)
  %21 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.277, ptr noundef nonnull %4, ptr noundef null)
  %22 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.279, ptr noundef nonnull %5, ptr noundef null)
  %23 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.281, ptr noundef nonnull %6, ptr noundef null)
  %24 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPdS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.287, ptr noundef nonnull %7, ptr noundef null)
  %25 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPjS2_z(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull @.str.71, ptr noundef nonnull %3, ptr noundef null)
  %26 = load i32, ptr %3, align 4, !tbaa !9
  %27 = icmp ult i32 %26, 1000
  br i1 %27, label %31, label %28

28:                                               ; preds = %2
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiltersND, i32 noundef 2911, ptr noundef nonnull @.str.293) #8
  call void @print_trace()
  call void @abort() #10
  unreachable

31:                                               ; preds = %2
  %32 = load i32, ptr %4, align 4, !tbaa !9
  %33 = add i32 %32, 1
  %34 = mul nuw nsw i32 %26, 3
  %35 = call ptr @MatNd_create(i32 noundef %33, i32 noundef %34)
  %36 = load i32, ptr %3, align 4, !tbaa !9
  %37 = call ptr @MatNd_create(i32 noundef %36, i32 noundef 1)
  call void @MatNd_setRandom(ptr noundef %37, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %38 = load i32, ptr %3, align 4, !tbaa !9
  %39 = call ptr @MatNd_create(i32 noundef %38, i32 noundef 1)
  call void @MatNd_setRandom(ptr noundef %39, double noundef 2.000000e+00, double noundef 3.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #9
  %40 = load ptr, ptr %37, align 8, !tbaa !13
  %41 = load double, ptr %6, align 8, !tbaa !11
  %42 = load double, ptr %5, align 8, !tbaa !11
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = zext i32 %43 to i64
  call void @_ZN3Rcs16SecondOrderLPFNDC1EPKdddm(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %40, double noundef %41, double noundef %42, i64 noundef %44)
  %45 = load ptr, ptr %39, align 8, !tbaa !13
  invoke void @_ZN3Rcs16SecondOrderLPFND9setTargetEPKd(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef %45)
          to label %46 unwind label %57

46:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #9
  %47 = load ptr, ptr %37, align 8, !tbaa !13
  %48 = load double, ptr %6, align 8, !tbaa !11
  %49 = load double, ptr %7, align 8, !tbaa !11
  %50 = load double, ptr %5, align 8, !tbaa !11
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  invoke void @_ZN3Rcs12RampFilterNDC1EPddddm(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef %47, double noundef %48, double noundef %49, double noundef %50, i64 noundef %52)
          to label %53 unwind label %59

53:                                               ; preds = %46
  %54 = load ptr, ptr %39, align 8, !tbaa !13
  invoke void @_ZN3Rcs16SecondOrderLPFND9setTargetEPKd(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef %54)
          to label %.preheader62 unwind label %61

.preheader62:                                     ; preds = %53
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %.not71 = icmp eq i32 %55, 0
  br i1 %.not71, label %._crit_edge66, label %.lr.ph65

._crit_edge66:                                    ; preds = %._crit_edge, %.preheader62
  %56 = invoke zeroext i1 @MatNd_toFile(ptr noundef %35, ptr noundef nonnull @.str.240)
          to label %89 unwind label %61

57:                                               ; preds = %31
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %135

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

61:                                               ; preds = %._crit_edge66, %53
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %133

.lr.ph65:                                         ; preds = %.preheader62, %._crit_edge
  %.05264 = phi i32 [ %.pre, %._crit_edge ], [ 0, %.preheader62 ]
  invoke void @_ZN3Rcs16SecondOrderLPFND7iterateEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %63 unwind label %67

63:                                               ; preds = %.lr.ph65
  invoke void @_ZN3Rcs12RampFilterND7iterateEv(ptr noundef nonnull align 8 dereferenceable(40) %10)
          to label %.preheader unwind label %67

.preheader:                                       ; preds = %63
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %.not72 = icmp eq i32 %64, 0
  %.pre = add nuw i32 %.05264, 1
  br i1 %.not72, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %83, %.preheader
  %65 = load i32, ptr %4, align 4, !tbaa !9
  %66 = icmp ult i32 %.pre, %65
  br i1 %66, label %.lr.ph65, label %._crit_edge66, !llvm.loop !16

67:                                               ; preds = %63, %.lr.ph65
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %133

.lr.ph:                                           ; preds = %.preheader, %83
  %indvars.iv = phi i64 [ %indvars.iv.next, %83 ], [ 0, %.preheader ]
  %69 = invoke noundef double @_ZNK3Rcs16SecondOrderLPFND11getPositionEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv)
          to label %70 unwind label %87

70:                                               ; preds = %.lr.ph
  %71 = trunc nuw i64 %indvars.iv to i32
  invoke void @MatNd_set(ptr noundef %35, i32 noundef %.pre, i32 noundef %71, double noundef %69)
          to label %72 unwind label %87

72:                                               ; preds = %70
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = invoke noundef double @_ZNK3Rcs12RampFilterND7getRampEm(ptr noundef nonnull align 8 dereferenceable(40) %10, i64 noundef %indvars.iv)
          to label %75 unwind label %87

75:                                               ; preds = %72
  %76 = add i32 %73, %71
  invoke void @MatNd_set(ptr noundef %35, i32 noundef %.pre, i32 noundef %76, double noundef %74)
          to label %77 unwind label %87

77:                                               ; preds = %75
  %78 = load i32, ptr %3, align 4, !tbaa !9
  %79 = invoke noundef double @_ZNK3Rcs16SecondOrderLPFND11getPositionEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv)
          to label %80 unwind label %87

80:                                               ; preds = %77
  %81 = shl i32 %78, 1
  %82 = add i32 %81, %71
  invoke void @MatNd_set(ptr noundef %35, i32 noundef %.pre, i32 noundef %82, double noundef %79)
          to label %83 unwind label %87

83:                                               ; preds = %80
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %84 = load i32, ptr %3, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = icmp ult i64 %indvars.iv.next, %85
  br i1 %86, label %.lr.ph, label %._crit_edge, !llvm.loop !18

87:                                               ; preds = %80, %77, %75, %72, %70, %.lr.ph
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %133

89:                                               ; preds = %._crit_edge66
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %12) #9
  %90 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) @.str.294) #9
  %91 = load i32, ptr %3, align 4, !tbaa !9
  %.not73 = icmp eq i32 %91, 0
  br i1 %.not73, label %._crit_edge70, label %.lr.ph69

._crit_edge70:                                    ; preds = %.lr.ph69, %89
  %92 = call noalias ptr @fopen(ptr noundef nonnull @.str.242, ptr noundef nonnull @.str.165)
  %.not = icmp eq ptr %92, null
  br i1 %.not, label %108, label %114

.lr.ph69:                                         ; preds = %89, %.lr.ph69
  %.04967 = phi i32 [ %93, %.lr.ph69 ], [ 0, %89 ]
  %93 = add nuw i32 %.04967, 1
  %94 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.295, i32 noundef %93, i32 noundef %.04967) #9
  %95 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) %12) #9
  %96 = load i32, ptr %3, align 4, !tbaa !9
  %97 = add i32 %93, %96
  %98 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.296, i32 noundef %97, i32 noundef %.04967) #9
  %99 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) %12) #9
  %100 = load i32, ptr %3, align 4, !tbaa !9
  %101 = add i32 %100, -1
  %.not56 = icmp eq i32 %.04967, %101
  %102 = shl i32 %100, 1
  %103 = add i32 %93, %102
  %.str.298..str.297 = select i1 %.not56, ptr @.str.298, ptr @.str.297
  %104 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) %.str.298..str.297, i32 noundef %103, i32 noundef %.04967) #9
  %105 = call ptr @strcat(ptr noundef nonnull dereferenceable(1) %11, ptr noundef nonnull dereferenceable(1) %12) #9
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = icmp ult i32 %93, %106
  br i1 %107, label %.lr.ph69, label %._crit_edge70, !llvm.loop !19

108:                                              ; preds = %._crit_edge70
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.57, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiltersND, i32 noundef 2974, ptr noundef nonnull @.str.166) #8
  invoke void @print_trace()
          to label %111 unwind label %112

111:                                              ; preds = %108
  call void @abort() #10
  unreachable

112:                                              ; preds = %108
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %132

114:                                              ; preds = %._crit_edge70
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %92, ptr noundef nonnull %11) #9
  %116 = call i32 @fflush(ptr noundef nonnull %92)
  %117 = call i32 @fclose(ptr noundef nonnull %92)
  %118 = invoke i32 @system(ptr noundef nonnull @.str.169)
          to label %119 unwind label %129

119:                                              ; preds = %114
  %120 = icmp eq i32 %118, -1
  %121 = load ptr, ptr @stderr, align 8, !tbaa !5
  %. = select i1 %120, i32 2983, i32 2987
  %.str.168..str.169 = select i1 %120, ptr @.str.168, ptr @.str.169
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testFiltersND, i32 noundef %.) #8
  %123 = load ptr, ptr @stderr, align 8, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef nonnull %.str.168..str.169) #8
  %125 = load ptr, ptr @stderr, align 8, !tbaa !5
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef nonnull @.str.6) #8
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = call i32 @fflush(ptr noundef %127)
  invoke void @MatNd_destroy(ptr noundef %35)
          to label %131 unwind label %129

129:                                              ; preds = %119, %114
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %132

131:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %11) #9
  call void @_ZN3Rcs12RampFilterNDD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #9
  call void @_ZN3Rcs16SecondOrderLPFNDD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  ret i1 true

132:                                              ; preds = %129, %112
  %.pn = phi { ptr, i32 } [ %130, %129 ], [ %113, %112 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %11) #9
  br label %133

133:                                              ; preds = %67, %87, %132, %61
  %.pn57.pn = phi { ptr, i32 } [ %.pn, %132 ], [ %62, %61 ], [ %88, %87 ], [ %68, %67 ]
  call void @_ZN3Rcs12RampFilterNDD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %10) #9
  br label %134

134:                                              ; preds = %133, %59
  %.pn57.pn.pn = phi { ptr, i32 } [ %.pn57.pn, %133 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #9
  br label %135

135:                                              ; preds = %134, %57
  %.pn57.pn.pn.pn = phi { ptr, i32 } [ %.pn57.pn.pn, %134 ], [ %58, %57 ]
  call void @_ZN3Rcs16SecondOrderLPFNDD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn57.pn.pn.pn
}

declare void @_ZN3Rcs16SecondOrderLPFNDC1EPKdddm(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, double noundef, double noundef, i64 noundef) unnamed_addr #2

declare void @_ZN3Rcs16SecondOrderLPFND9setTargetEPKd(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #2

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

declare void @_ZN3Rcs16SecondOrderLPFND7iterateEv(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

declare void @_ZN3Rcs12RampFilterND7iterateEv(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare noundef double @_ZNK3Rcs16SecondOrderLPFND11getPositionEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare void @_ZN3Rcs16SecondOrderLPFNDD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS6_MatNd", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !15, i64 20}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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