; 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 }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external global i32, align 4
@stderr = external global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [6 x i8], align 1
@__func__.testWoodburyIdenity = external hidden unnamed_addr constant [20 x i8], align 1
@.str.189 = external hidden unnamed_addr constant [318 x i8], align 1
@.str.190 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.191 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.192 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.193 = external hidden unnamed_addr constant [24 x i8], align 1

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

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

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

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #2

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

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

declare void @MatNd_destroy(ptr noundef) #2

declare i32 @fflush(ptr noundef) #2

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

declare void @MatNd_printTwoArraysDiff(ptr noundef, ptr noundef, i32 noundef) #2

declare void @MatNd_transpose(ptr noundef, ptr noundef) #2

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

22:                                               ; preds = %2
  %23 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  call void (i32, ptr, ptr, i32, ptr, ...) %26(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testWoodburyIdenity, i32 noundef 1689, ptr noundef @.str.189)
  br label %27

27:                                               ; preds = %25, %22
  %28 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %29 = icmp sle i32 2, %28
  br i1 %29, label %30, label %37

30:                                               ; preds = %27
  %31 = load ptr, ptr @stderr, align 8, !tbaa !9
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testWoodburyIdenity, i32 noundef 1689) #4
  %33 = load ptr, ptr @stderr, align 8, !tbaa !9
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.189) #4
  %35 = load ptr, ptr @stderr, align 8, !tbaa !9
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.6) #4
  br label %37

37:                                               ; preds = %30, %27
  br label %38

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 1, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 4, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 20, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 6, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = load ptr, ptr %4, align 8, !tbaa !9
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %10, i32 noundef %39, ptr noundef %40)
  %41 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.60, ptr noundef %6, ptr noundef null)
  %42 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.62, ptr noundef %7, ptr noundef null)
  %43 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef @.str.190, ptr noundef %8, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = call ptr @MatNd_create(i32 noundef %44, i32 noundef %45)
  store ptr %46, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %47 = load i32, ptr %7, align 4, !tbaa !5
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = call ptr @MatNd_create(i32 noundef %47, i32 noundef %48)
  store ptr %49, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = call ptr @MatNd_create(i32 noundef %50, i32 noundef 1)
  store ptr %51, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = call ptr @MatNd_create(i32 noundef %52, i32 noundef 1)
  store ptr %53, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = call ptr @MatNd_create(i32 noundef %54, i32 noundef 1)
  store ptr %55, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = call ptr @MatNd_create(i32 noundef %56, i32 noundef 1)
  store ptr %57, ptr %16, align 8, !tbaa !9
  %58 = load ptr, ptr %11, align 8, !tbaa !9
  call void @MatNd_setRandom(ptr noundef %58, double noundef -1.000000e+00, double noundef 1.000000e+00)
  %59 = load ptr, ptr %12, align 8, !tbaa !9
  %60 = load ptr, ptr %11, align 8, !tbaa !9
  call void @MatNd_transpose(ptr noundef %59, ptr noundef %60)
  %61 = load ptr, ptr %13, align 8, !tbaa !9
  call void @MatNd_setRandom(ptr noundef %61, double noundef 1.000000e-08, double noundef 0x3EB0C6F7A0B5ED8D)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %83, %38
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = load ptr, ptr %13, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct._MatNd, ptr %64, i32 0, i32 3
  %66 = load i32, ptr %65, align 8, !tbaa !13
  %67 = icmp ult i32 %63, %66
  br i1 %67, label %68, label %86

68:                                               ; preds = %62
  %69 = load ptr, ptr %13, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct._MatNd, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !15
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %71, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !16
  %76 = fdiv double 1.000000e+00, %75
  %77 = load ptr, ptr %14, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct._MatNd, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !15
  %80 = load i32, ptr %9, align 4, !tbaa !5
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  store double %76, ptr %82, align 8, !tbaa !16
  br label %83

83:                                               ; preds = %68
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = add i32 %84, 1
  store i32 %85, ptr %9, align 4, !tbaa !5
  br label %62, !llvm.loop !18

86:                                               ; preds = %62
  %87 = load ptr, ptr %15, align 8, !tbaa !9
  call void @MatNd_setRandom(ptr noundef %87, double noundef 4.000000e-01, double noundef 6.000000e-01)
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %109, %86
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = load ptr, ptr %15, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct._MatNd, ptr %90, i32 0, i32 3
  %92 = load i32, ptr %91, align 8, !tbaa !13
  %93 = icmp ult i32 %89, %92
  br i1 %93, label %94, label %112

94:                                               ; preds = %88
  %95 = load ptr, ptr %15, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct._MatNd, ptr %95, i32 0, i32 0
  %97 = load ptr, ptr %96, align 8, !tbaa !15
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds double, ptr %97, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !16
  %102 = fdiv double 1.000000e+00, %101
  %103 = load ptr, ptr %16, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct._MatNd, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !15
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  store double %102, ptr %108, align 8, !tbaa !16
  br label %109

109:                                              ; preds = %94
  %110 = load i32, ptr %9, align 4, !tbaa !5
  %111 = add i32 %110, 1
  store i32 %111, ptr %9, align 4, !tbaa !5
  br label %88, !llvm.loop !20

112:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = load i32, ptr %6, align 4, !tbaa !5
  %115 = call ptr @MatNd_create(i32 noundef %113, i32 noundef %114)
  store ptr %115, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %116 = load ptr, ptr %17, align 8, !tbaa !9
  %117 = load ptr, ptr %11, align 8, !tbaa !9
  %118 = load ptr, ptr %14, align 8, !tbaa !9
  %119 = load ptr, ptr %16, align 8, !tbaa !9
  %120 = call double @MatNd_rwPinv(ptr noundef %116, ptr noundef %117, ptr noundef %118, ptr noundef %119)
  store double %120, ptr %18, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = call ptr @MatNd_create(i32 noundef %121, i32 noundef %122)
  store ptr %123, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %124 = load ptr, ptr %19, align 8, !tbaa !9
  %125 = load ptr, ptr %11, align 8, !tbaa !9
  %126 = load ptr, ptr %15, align 8, !tbaa !9
  %127 = load ptr, ptr %13, align 8, !tbaa !9
  %128 = call double @MatNd_rwPinv2(ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef %127)
  store double %128, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %129 = load ptr, ptr %17, align 8, !tbaa !9
  %130 = load ptr, ptr %19, align 8, !tbaa !9
  %131 = call double @MatNd_sqrDistance(ptr noundef %129, ptr noundef %130)
  store double %131, ptr %21, align 8, !tbaa !16
  %132 = load double, ptr %21, align 8, !tbaa !16
  %133 = fcmp ogt double %132, 1.000000e-08
  br i1 %133, label %134, label %135

134:                                              ; preds = %112
  store i8 0, ptr %5, align 1, !tbaa !11
  br label %135

135:                                              ; preds = %134, %112
  %136 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %137 = icmp sle i32 2, %136
  br i1 %137, label %138, label %166

138:                                              ; preds = %135
  br label %139

139:                                              ; preds = %138
  %140 = load ptr, ptr @stderr, align 8, !tbaa !9
  %141 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.22, ptr noundef @__func__.testWoodburyIdenity, i32 noundef 1739) #4
  %142 = load ptr, ptr @stderr, align 8, !tbaa !9
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef @.str.191) #4
  %144 = load ptr, ptr @stderr, align 8, !tbaa !9
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef @.str.6) #4
  %146 = load ptr, ptr @stderr, align 8, !tbaa !9
  %147 = call i32 @fflush(ptr noundef %146)
  br label %148

148:                                              ; preds = %139
  br label %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %17, align 8, !tbaa !9
  %151 = load ptr, ptr %19, align 8, !tbaa !9
  %152 = load i32, ptr %8, align 4, !tbaa !5
  call void @MatNd_printTwoArraysDiff(ptr noundef %150, ptr noundef %151, i32 noundef %152)
  br label %153

153:                                              ; preds = %149
  %154 = load ptr, ptr @stderr, align 8, !tbaa !9
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str.22, ptr noundef @__func__.testWoodburyIdenity, i32 noundef 1741) #4
  %156 = load ptr, ptr @stderr, align 8, !tbaa !9
  %157 = load double, ptr %18, align 8, !tbaa !16
  %158 = load double, ptr %20, align 8, !tbaa !16
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef @.str.192, double noundef %157, double noundef %158) #4
  %160 = load ptr, ptr @stderr, align 8, !tbaa !9
  %161 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef @.str.6) #4
  %162 = load ptr, ptr @stderr, align 8, !tbaa !9
  %163 = call i32 @fflush(ptr noundef %162)
  br label %164

164:                                              ; preds = %153
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165, %135
  %167 = load ptr, ptr %11, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %167)
  %168 = load ptr, ptr %12, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %168)
  %169 = load ptr, ptr %13, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %169)
  %170 = load ptr, ptr %14, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %170)
  %171 = load ptr, ptr %15, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %171)
  %172 = load ptr, ptr %16, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %172)
  %173 = load ptr, ptr %17, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %173)
  %174 = load ptr, ptr %19, align 8, !tbaa !9
  call void @MatNd_destroy(ptr noundef %174)
  br label %175

175:                                              ; preds = %166
  %176 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %177 = icmp ne ptr %176, null
  br i1 %177, label %178, label %188

178:                                              ; preds = %175
  %179 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !9
  %180 = load i8, ptr %5, align 1, !tbaa !11, !range !21, !noundef !22
  %181 = trunc i8 %180 to i1
  br i1 %181, label %182, label %183

182:                                              ; preds = %178
  br label %184

183:                                              ; preds = %178
  br label %184

184:                                              ; preds = %183, %182
  %185 = phi ptr [ @.str.20, %182 ], [ @.str.21, %183 ]
  %186 = getelementptr inbounds [8 x i8], ptr %185, i64 0, i64 0
  %187 = load double, ptr %21, align 8, !tbaa !16
  call void (i32, ptr, ptr, i32, ptr, ...) %179(i32 noundef 1, ptr noundef @.str.18, ptr noundef @__func__.testWoodburyIdenity, i32 noundef 1753, ptr noundef @.str.193, ptr noundef %186, double noundef %187)
  br label %188

188:                                              ; preds = %184, %175
  %189 = load i32, ptr @RcsLogLevel, align 4, !tbaa !5
  %190 = icmp sle i32 1, %189
  br i1 %190, label %191, label %206

191:                                              ; preds = %188
  %192 = load ptr, ptr @stderr, align 8, !tbaa !9
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef @.str.22, ptr noundef @__func__.testWoodburyIdenity, i32 noundef 1753) #4
  %194 = load ptr, ptr @stderr, align 8, !tbaa !9
  %195 = load i8, ptr %5, align 1, !tbaa !11, !range !21, !noundef !22
  %196 = trunc i8 %195 to i1
  br i1 %196, label %197, label %198

197:                                              ; preds = %191
  br label %199

198:                                              ; preds = %191
  br label %199

199:                                              ; preds = %198, %197
  %200 = phi ptr [ @.str.20, %197 ], [ @.str.21, %198 ]
  %201 = getelementptr inbounds [8 x i8], ptr %200, i64 0, i64 0
  %202 = load double, ptr %21, align 8, !tbaa !16
  %203 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.193, ptr noundef %201, double noundef %202) #4
  %204 = load ptr, ptr @stderr, align 8, !tbaa !9
  %205 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %204, ptr noundef @.str.6) #4
  br label %206

206:                                              ; preds = %199, %188
  br label %207

207:                                              ; preds = %206
  br label %208

208:                                              ; preds = %207
  %209 = load i8, ptr %5, align 1, !tbaa !11, !range !21, !noundef !22
  %210 = trunc i8 %209 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret i1 %210
}

declare double @MatNd_rwPinv(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare double @MatNd_rwPinv2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare double @MatNd_sqrDistance(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS6_MatNd", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !12, i64 20}
!15 = !{!14, !10, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{i8 0, i8 2}
!22 = !{}


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

@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [74 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.5 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [6 x i8], align 1
@__func__.testWoodburyIdenity = external hidden unnamed_addr constant [20 x i8], align 1
@.str.189 = external hidden unnamed_addr constant [318 x i8], align 1
@.str.190 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.191 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.192 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.193 = external hidden unnamed_addr constant [24 x i8], align 1

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

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

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

declare void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef, ptr noundef) unnamed_addr #2

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

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

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

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

declare void @MatNd_transpose(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testWoodburyIdenity(i32 noundef %0, ptr noundef %1) local_unnamed_addr #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.Rcs::CmdLineParser", align 1
  %7 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %9, label %8

8:                                                ; preds = %2
  tail call void (i32, ptr, ptr, i32, ptr, ...) %7(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testWoodburyIdenity, i32 noundef 1689, ptr noundef nonnull @.str.189)
  br label %9

9:                                                ; preds = %8, %2
  %10 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %11 = icmp sgt i32 %10, 1
  br i1 %11, label %12, label %19

12:                                               ; preds = %9
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testWoodburyIdenity, i32 noundef 1689) #4
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.189) #4
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.6) #4
  br label %19

19:                                               ; preds = %9, %12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store i32 4, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 20, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 6, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #5
  call void @_ZN3Rcs13CmdLineParserC1EiPPc(ptr noundef nonnull align 1 dereferenceable(1) %6, i32 noundef %0, ptr noundef %1)
  %20 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull @.str.60, ptr noundef nonnull %3, ptr noundef null)
  %21 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull @.str.62, ptr noundef nonnull %4, ptr noundef null)
  %22 = call noundef zeroext i1 (ptr, ptr, ptr, ptr, ...) @_ZNK3Rcs13CmdLineParser11getArgumentEPKcPiS2_z(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull @.str.190, ptr noundef nonnull %5, ptr noundef null)
  %23 = load i32, ptr %3, align 4, !tbaa !9
  %24 = load i32, ptr %4, align 4, !tbaa !9
  %25 = call ptr @MatNd_create(i32 noundef %23, i32 noundef %24)
  %26 = load i32, ptr %4, align 4, !tbaa !9
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = call ptr @MatNd_create(i32 noundef %26, i32 noundef %27)
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = call ptr @MatNd_create(i32 noundef %29, i32 noundef 1)
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = call ptr @MatNd_create(i32 noundef %31, i32 noundef 1)
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = call ptr @MatNd_create(i32 noundef %33, i32 noundef 1)
  %35 = load i32, ptr %3, align 4, !tbaa !9
  %36 = call ptr @MatNd_create(i32 noundef %35, i32 noundef 1)
  call void @MatNd_setRandom(ptr noundef %25, double noundef -1.000000e+00, double noundef 1.000000e+00)
  call void @MatNd_transpose(ptr noundef %28, ptr noundef %25)
  call void @MatNd_setRandom(ptr noundef %30, double noundef 1.000000e-08, double noundef 0x3EB0C6F7A0B5ED8D)
  %37 = getelementptr inbounds i8, ptr %30, i64 16
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %.not58 = icmp eq i32 %38, 0
  br i1 %.not58, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %19
  %39 = load ptr, ptr %30, align 8, !tbaa !14
  %40 = load ptr, ptr %32, align 8, !tbaa !14
  %wide.trip.count = zext i32 %38 to i64
  %min.iters.check = icmp eq i32 %38, 1
  %41 = ptrtoint ptr %40 to i64
  %42 = ptrtoint ptr %39 to i64
  %43 = sub i64 %41, %42
  %diff.check = icmp ult i64 %43, 16
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 4294967294
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %44 = getelementptr inbounds double, ptr %39, i64 %index
  %wide.load = load <2 x double>, ptr %44, align 8, !tbaa !15
  %45 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %wide.load
  %46 = getelementptr inbounds double, ptr %40, i64 %index
  store <2 x double> %45, ptr %46, align 8, !tbaa !15
  %index.next = add nuw i64 %index, 2
  %47 = icmp eq i64 %index.next, %n.vec
  br i1 %47, label %middle.block, label %vector.body, !llvm.loop !17

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %48 = sub nsw i64 %wide.trip.count, %indvars.iv.ph
  %xtraiter = and i64 %48, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %49 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.prol
  %50 = load double, ptr %49, align 8, !tbaa !15
  %51 = fdiv double 1.000000e+00, %50
  %52 = getelementptr inbounds double, ptr %40, i64 %indvars.iv.prol
  store double %51, ptr %52, align 8, !tbaa !15
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !21

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %53 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %54 = icmp ugt i64 %53, -4
  br i1 %54, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %55 = getelementptr inbounds double, ptr %39, i64 %indvars.iv
  %56 = load double, ptr %55, align 8, !tbaa !15
  %57 = fdiv double 1.000000e+00, %56
  %58 = getelementptr inbounds double, ptr %40, i64 %indvars.iv
  store double %57, ptr %58, align 8, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %59 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.next
  %60 = load double, ptr %59, align 8, !tbaa !15
  %61 = fdiv double 1.000000e+00, %60
  %62 = getelementptr inbounds double, ptr %40, i64 %indvars.iv.next
  store double %61, ptr %62, align 8, !tbaa !15
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %63 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.next.1
  %64 = load double, ptr %63, align 8, !tbaa !15
  %65 = fdiv double 1.000000e+00, %64
  %66 = getelementptr inbounds double, ptr %40, i64 %indvars.iv.next.1
  store double %65, ptr %66, align 8, !tbaa !15
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %67 = getelementptr inbounds double, ptr %39, i64 %indvars.iv.next.2
  %68 = load double, ptr %67, align 8, !tbaa !15
  %69 = fdiv double 1.000000e+00, %68
  %70 = getelementptr inbounds double, ptr %40, i64 %indvars.iv.next.2
  store double %69, ptr %70, align 8, !tbaa !15
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %19
  call void @MatNd_setRandom(ptr noundef %34, double noundef 4.000000e-01, double noundef 6.000000e-01)
  %71 = getelementptr inbounds i8, ptr %34, i64 16
  %72 = load i32, ptr %71, align 8, !tbaa !11
  %.not59 = icmp eq i32 %72, 0
  br i1 %.not59, label %._crit_edge57, label %.lr.ph56

.lr.ph56:                                         ; preds = %._crit_edge
  %73 = load ptr, ptr %34, align 8, !tbaa !14
  %74 = load ptr, ptr %36, align 8, !tbaa !14
  %wide.trip.count64 = zext i32 %72 to i64
  %min.iters.check70 = icmp eq i32 %72, 1
  %75 = ptrtoint ptr %74 to i64
  %76 = ptrtoint ptr %73 to i64
  %77 = sub i64 %75, %76
  %diff.check67 = icmp ult i64 %77, 16
  %or.cond84 = select i1 %min.iters.check70, i1 true, i1 %diff.check67
  br i1 %or.cond84, label %scalar.ph69.preheader, label %vector.ph71

vector.ph71:                                      ; preds = %.lr.ph56
  %n.vec73 = and i64 %wide.trip.count64, 4294967294
  br label %vector.body75

vector.body75:                                    ; preds = %vector.body75, %vector.ph71
  %index76 = phi i64 [ 0, %vector.ph71 ], [ %index.next78, %vector.body75 ]
  %78 = getelementptr inbounds double, ptr %73, i64 %index76
  %wide.load77 = load <2 x double>, ptr %78, align 8, !tbaa !15
  %79 = fdiv <2 x double> <double 1.000000e+00, double 1.000000e+00>, %wide.load77
  %80 = getelementptr inbounds double, ptr %74, i64 %index76
  store <2 x double> %79, ptr %80, align 8, !tbaa !15
  %index.next78 = add nuw i64 %index76, 2
  %81 = icmp eq i64 %index.next78, %n.vec73
  br i1 %81, label %middle.block68, label %vector.body75, !llvm.loop !24

middle.block68:                                   ; preds = %vector.body75
  %cmp.n79 = icmp eq i64 %n.vec73, %wide.trip.count64
  br i1 %cmp.n79, label %._crit_edge57, label %scalar.ph69.preheader

scalar.ph69.preheader:                            ; preds = %middle.block68, %.lr.ph56
  %indvars.iv61.ph = phi i64 [ 0, %.lr.ph56 ], [ %n.vec73, %middle.block68 ]
  %82 = sub nsw i64 %wide.trip.count64, %indvars.iv61.ph
  %xtraiter85 = and i64 %82, 3
  %lcmp.mod86.not = icmp eq i64 %xtraiter85, 0
  br i1 %lcmp.mod86.not, label %scalar.ph69.prol.loopexit, label %scalar.ph69.prol

scalar.ph69.prol:                                 ; preds = %scalar.ph69.preheader, %scalar.ph69.prol
  %indvars.iv61.prol = phi i64 [ %indvars.iv.next62.prol, %scalar.ph69.prol ], [ %indvars.iv61.ph, %scalar.ph69.preheader ]
  %prol.iter87 = phi i64 [ %prol.iter87.next, %scalar.ph69.prol ], [ 0, %scalar.ph69.preheader ]
  %83 = getelementptr inbounds double, ptr %73, i64 %indvars.iv61.prol
  %84 = load double, ptr %83, align 8, !tbaa !15
  %85 = fdiv double 1.000000e+00, %84
  %86 = getelementptr inbounds double, ptr %74, i64 %indvars.iv61.prol
  store double %85, ptr %86, align 8, !tbaa !15
  %indvars.iv.next62.prol = add nuw nsw i64 %indvars.iv61.prol, 1
  %prol.iter87.next = add i64 %prol.iter87, 1
  %prol.iter87.cmp.not = icmp eq i64 %prol.iter87.next, %xtraiter85
  br i1 %prol.iter87.cmp.not, label %scalar.ph69.prol.loopexit, label %scalar.ph69.prol, !llvm.loop !25

scalar.ph69.prol.loopexit:                        ; preds = %scalar.ph69.prol, %scalar.ph69.preheader
  %indvars.iv61.unr = phi i64 [ %indvars.iv61.ph, %scalar.ph69.preheader ], [ %indvars.iv.next62.prol, %scalar.ph69.prol ]
  %87 = sub nsw i64 %indvars.iv61.ph, %wide.trip.count64
  %88 = icmp ugt i64 %87, -4
  br i1 %88, label %._crit_edge57, label %scalar.ph69

scalar.ph69:                                      ; preds = %scalar.ph69.prol.loopexit, %scalar.ph69
  %indvars.iv61 = phi i64 [ %indvars.iv.next62.3, %scalar.ph69 ], [ %indvars.iv61.unr, %scalar.ph69.prol.loopexit ]
  %89 = getelementptr inbounds double, ptr %73, i64 %indvars.iv61
  %90 = load double, ptr %89, align 8, !tbaa !15
  %91 = fdiv double 1.000000e+00, %90
  %92 = getelementptr inbounds double, ptr %74, i64 %indvars.iv61
  store double %91, ptr %92, align 8, !tbaa !15
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %93 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next62
  %94 = load double, ptr %93, align 8, !tbaa !15
  %95 = fdiv double 1.000000e+00, %94
  %96 = getelementptr inbounds double, ptr %74, i64 %indvars.iv.next62
  store double %95, ptr %96, align 8, !tbaa !15
  %indvars.iv.next62.1 = add nuw nsw i64 %indvars.iv61, 2
  %97 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next62.1
  %98 = load double, ptr %97, align 8, !tbaa !15
  %99 = fdiv double 1.000000e+00, %98
  %100 = getelementptr inbounds double, ptr %74, i64 %indvars.iv.next62.1
  store double %99, ptr %100, align 8, !tbaa !15
  %indvars.iv.next62.2 = add nuw nsw i64 %indvars.iv61, 3
  %101 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next62.2
  %102 = load double, ptr %101, align 8, !tbaa !15
  %103 = fdiv double 1.000000e+00, %102
  %104 = getelementptr inbounds double, ptr %74, i64 %indvars.iv.next62.2
  store double %103, ptr %104, align 8, !tbaa !15
  %indvars.iv.next62.3 = add nuw nsw i64 %indvars.iv61, 4
  %exitcond65.not.3 = icmp eq i64 %indvars.iv.next62.3, %wide.trip.count64
  br i1 %exitcond65.not.3, label %._crit_edge57, label %scalar.ph69, !llvm.loop !26

._crit_edge57:                                    ; preds = %scalar.ph69.prol.loopexit, %scalar.ph69, %middle.block68, %._crit_edge
  %105 = load i32, ptr %4, align 4, !tbaa !9
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = call ptr @MatNd_create(i32 noundef %105, i32 noundef %106)
  %108 = call double @MatNd_rwPinv(ptr noundef %107, ptr noundef %25, ptr noundef %32, ptr noundef %36)
  %109 = load i32, ptr %4, align 4, !tbaa !9
  %110 = load i32, ptr %3, align 4, !tbaa !9
  %111 = call ptr @MatNd_create(i32 noundef %109, i32 noundef %110)
  %112 = call double @MatNd_rwPinv2(ptr noundef %111, ptr noundef %25, ptr noundef nonnull %34, ptr noundef %30)
  %113 = call double @MatNd_sqrDistance(ptr noundef %107, ptr noundef %111)
  %114 = fcmp ule double %113, 1.000000e-08
  %115 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %116 = icmp sgt i32 %115, 1
  br i1 %116, label %117, label %135

117:                                              ; preds = %._crit_edge57
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testWoodburyIdenity, i32 noundef 1739) #4
  %120 = load ptr, ptr @stderr, align 8, !tbaa !5
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.191) #4
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef nonnull @.str.6) #4
  %124 = load ptr, ptr @stderr, align 8, !tbaa !5
  %125 = call i32 @fflush(ptr noundef %124)
  %126 = load i32, ptr %5, align 4, !tbaa !9
  call void @MatNd_printTwoArraysDiff(ptr noundef %107, ptr noundef %111, i32 noundef %126)
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testWoodburyIdenity, i32 noundef 1741) #4
  %129 = load ptr, ptr @stderr, align 8, !tbaa !5
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef nonnull @.str.192, double noundef %108, double noundef %112) #4
  %131 = load ptr, ptr @stderr, align 8, !tbaa !5
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef nonnull @.str.6) #4
  %133 = load ptr, ptr @stderr, align 8, !tbaa !5
  %134 = call i32 @fflush(ptr noundef %133)
  br label %135

135:                                              ; preds = %117, %._crit_edge57
  call void @MatNd_destroy(ptr noundef %25)
  call void @MatNd_destroy(ptr noundef %28)
  call void @MatNd_destroy(ptr noundef %30)
  call void @MatNd_destroy(ptr noundef %32)
  call void @MatNd_destroy(ptr noundef nonnull %34)
  call void @MatNd_destroy(ptr noundef %36)
  call void @MatNd_destroy(ptr noundef %107)
  call void @MatNd_destroy(ptr noundef %111)
  %136 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not52 = icmp eq ptr %136, null
  br i1 %.not52, label %138, label %137

137:                                              ; preds = %135
  %.str.20..str.21 = select i1 %114, ptr @.str.20, ptr @.str.21
  call void (i32, ptr, ptr, i32, ptr, ...) %136(i32 noundef 1, ptr noundef nonnull @.str.18, ptr noundef nonnull @__func__.testWoodburyIdenity, i32 noundef 1753, ptr noundef nonnull @.str.193, ptr noundef nonnull %.str.20..str.21, double noundef %113)
  br label %138

138:                                              ; preds = %137, %135
  %139 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %140 = icmp sgt i32 %139, 0
  br i1 %140, label %141, label %148

141:                                              ; preds = %138
  %142 = load ptr, ptr @stderr, align 8, !tbaa !5
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testWoodburyIdenity, i32 noundef 1753) #4
  %144 = load ptr, ptr @stderr, align 8, !tbaa !5
  %.str.20..str.211 = select i1 %114, ptr @.str.20, ptr @.str.21
  %145 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %144, ptr noundef nonnull @.str.193, ptr noundef nonnull %.str.20..str.211, double noundef %113) #4
  %146 = load ptr, ptr @stderr, align 8, !tbaa !5
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef nonnull @.str.6) #4
  br label %148

148:                                              ; preds = %141, %138
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  ret i1 %114
}

declare double @MatNd_rwPinv(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare double @MatNd_rwPinv2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare double @MatNd_sqrDistance(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { cold nounwind }
attributes #5 = { 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, !10, i64 16}
!12 = !{!"_ZTS6_MatNd", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !13, i64 20}
!13 = !{!"bool", !7, i64 0}
!14 = !{!12, !6, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !18, !19, !20}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !18, !19}
!24 = distinct !{!24, !18, !19, !20}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !18, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass