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

@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
@__func__.testFiniteNan = external hidden unnamed_addr constant [14 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.183 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.184 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.185 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.186 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.187 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [31 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 i32 @fflush(ptr noundef) #2

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

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

declare void @Mat3d_setIdentity(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testFiniteNan() #3 {
  %1 = alloca [3 x [3 x double]], align 16
  %2 = alloca [3 x double], align 16
  %3 = alloca i8, align 1
  %4 = alloca i8, align 1
  %5 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 72, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  store i8 1, ptr %4, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store double 0x7FF0000000000000, ptr %5, align 8, !tbaa !9
  br label %6

6:                                                ; preds = %0
  %7 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %8 = icmp ne ptr %7, null
  br i1 %8, label %9, label %11

9:                                                ; preds = %6
  %10 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  call void (i32, ptr, ptr, i32, ptr, ...) %10(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1587, ptr noundef @.str.181)
  br label %11

11:                                               ; preds = %9, %6
  %12 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %13 = icmp sle i32 2, %12
  br i1 %13, label %14, label %21

14:                                               ; preds = %11
  %15 = load ptr, ptr @stderr, align 8, !tbaa !11
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1587) #4
  %17 = load ptr, ptr @stderr, align 8, !tbaa !11
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef @.str.181) #4
  %19 = load ptr, ptr @stderr, align 8, !tbaa !11
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.6) #4
  br label %21

21:                                               ; preds = %14, %11
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %22
  %24 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  call void @Vec3d_set(ptr noundef %24, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef 3.000000e+00)
  %25 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %26 = call zeroext i1 @Vec3d_isFinite(ptr noundef %25)
  %27 = zext i1 %26 to i8
  store i8 %27, ptr %3, align 1, !tbaa !5
  %28 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %29 = trunc i8 %28 to i1
  %30 = zext i1 %29 to i32
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %23
  store i8 0, ptr %4, align 1, !tbaa !5
  br label %33

33:                                               ; preds = %32, %23
  br label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %51

37:                                               ; preds = %34
  %38 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %39 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %40 = load double, ptr %39, align 16, !tbaa !9
  %41 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %42 = load double, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %44 = load double, ptr %43, align 16, !tbaa !9
  %45 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %46 = trunc i8 %45 to i1
  %47 = zext i1 %46 to i32
  %48 = icmp eq i32 %47, 1
  %49 = zext i1 %48 to i64
  %50 = select i1 %48, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %38(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1598, ptr noundef @.str.182, double noundef %40, double noundef %42, double noundef %44, ptr noundef %50)
  br label %51

51:                                               ; preds = %37, %34
  %52 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %53 = icmp sle i32 2, %52
  br i1 %53, label %54, label %73

54:                                               ; preds = %51
  %55 = load ptr, ptr @stderr, align 8, !tbaa !11
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1598) #4
  %57 = load ptr, ptr @stderr, align 8, !tbaa !11
  %58 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %59 = load double, ptr %58, align 16, !tbaa !9
  %60 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %61 = load double, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %63 = load double, ptr %62, align 16, !tbaa !9
  %64 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %65 = trunc i8 %64 to i1
  %66 = zext i1 %65 to i32
  %67 = icmp eq i32 %66, 1
  %68 = zext i1 %67 to i64
  %69 = select i1 %67, ptr @.str.183, ptr @.str.184
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef @.str.182, double noundef %59, double noundef %61, double noundef %63, ptr noundef %69) #4
  %71 = load ptr, ptr @stderr, align 8, !tbaa !11
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str.6) #4
  br label %73

73:                                               ; preds = %54, %51
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %77 = load double, ptr %5, align 8, !tbaa !9
  call void @Vec3d_set(ptr noundef %76, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef %77)
  %78 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %79 = call zeroext i1 @Vec3d_isFinite(ptr noundef %78)
  %80 = zext i1 %79 to i8
  store i8 %80, ptr %3, align 1, !tbaa !5
  %81 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %82 = trunc i8 %81 to i1
  %83 = zext i1 %82 to i32
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %85, label %86

85:                                               ; preds = %75
  store i8 0, ptr %4, align 1, !tbaa !5
  br label %86

86:                                               ; preds = %85, %75
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %104

90:                                               ; preds = %87
  %91 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %92 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %93 = load double, ptr %92, align 16, !tbaa !9
  %94 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %95 = load double, ptr %94, align 8, !tbaa !9
  %96 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %97 = load double, ptr %96, align 16, !tbaa !9
  %98 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %99 = trunc i8 %98 to i1
  %100 = zext i1 %99 to i32
  %101 = icmp eq i32 %100, 1
  %102 = zext i1 %101 to i64
  %103 = select i1 %101, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %91(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1609, ptr noundef @.str.182, double noundef %93, double noundef %95, double noundef %97, ptr noundef %103)
  br label %104

104:                                              ; preds = %90, %87
  %105 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %106 = icmp sle i32 2, %105
  br i1 %106, label %107, label %126

107:                                              ; preds = %104
  %108 = load ptr, ptr @stderr, align 8, !tbaa !11
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %108, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1609) #4
  %110 = load ptr, ptr @stderr, align 8, !tbaa !11
  %111 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %112 = load double, ptr %111, align 16, !tbaa !9
  %113 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %114 = load double, ptr %113, align 8, !tbaa !9
  %115 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %116 = load double, ptr %115, align 16, !tbaa !9
  %117 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %118 = trunc i8 %117 to i1
  %119 = zext i1 %118 to i32
  %120 = icmp eq i32 %119, 1
  %121 = zext i1 %120 to i64
  %122 = select i1 %120, ptr @.str.183, ptr @.str.184
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.182, double noundef %112, double noundef %114, double noundef %116, ptr noundef %122) #4
  %124 = load ptr, ptr @stderr, align 8, !tbaa !11
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.6) #4
  br label %126

126:                                              ; preds = %107, %104
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %134

132:                                              ; preds = %129
  %133 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  call void (i32, ptr, ptr, i32, ptr, ...) %133(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1614, ptr noundef @.str.185)
  br label %134

134:                                              ; preds = %132, %129
  %135 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %136 = icmp sle i32 2, %135
  br i1 %136, label %137, label %144

137:                                              ; preds = %134
  %138 = load ptr, ptr @stderr, align 8, !tbaa !11
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %138, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1614) #4
  %140 = load ptr, ptr @stderr, align 8, !tbaa !11
  %141 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str.185) #4
  %142 = load ptr, ptr @stderr, align 8, !tbaa !11
  %143 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef @.str.6) #4
  br label %144

144:                                              ; preds = %137, %134
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  %147 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  call void @Vec3d_set(ptr noundef %147, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef 3.000000e+00)
  %148 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %149 = call zeroext i1 @Vec3d_isFinite(ptr noundef %148)
  %150 = zext i1 %149 to i8
  store i8 %150, ptr %3, align 1, !tbaa !5
  %151 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %152 = trunc i8 %151 to i1
  %153 = zext i1 %152 to i32
  %154 = icmp eq i32 %153, 0
  br i1 %154, label %155, label %156

155:                                              ; preds = %146
  store i8 0, ptr %4, align 1, !tbaa !5
  br label %156

156:                                              ; preds = %155, %146
  br label %157

157:                                              ; preds = %156
  %158 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %159 = icmp ne ptr %158, null
  br i1 %159, label %160, label %174

160:                                              ; preds = %157
  %161 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %162 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %163 = load double, ptr %162, align 16, !tbaa !9
  %164 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %165 = load double, ptr %164, align 8, !tbaa !9
  %166 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %167 = load double, ptr %166, align 16, !tbaa !9
  %168 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %169 = trunc i8 %168 to i1
  %170 = zext i1 %169 to i32
  %171 = icmp eq i32 %170, 1
  %172 = zext i1 %171 to i64
  %173 = select i1 %171, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %161(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1625, ptr noundef @.str.182, double noundef %163, double noundef %165, double noundef %167, ptr noundef %173)
  br label %174

174:                                              ; preds = %160, %157
  %175 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %176 = icmp sle i32 2, %175
  br i1 %176, label %177, label %196

177:                                              ; preds = %174
  %178 = load ptr, ptr @stderr, align 8, !tbaa !11
  %179 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1625) #4
  %180 = load ptr, ptr @stderr, align 8, !tbaa !11
  %181 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %182 = load double, ptr %181, align 16, !tbaa !9
  %183 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %184 = load double, ptr %183, align 8, !tbaa !9
  %185 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %186 = load double, ptr %185, align 16, !tbaa !9
  %187 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %188 = trunc i8 %187 to i1
  %189 = zext i1 %188 to i32
  %190 = icmp eq i32 %189, 1
  %191 = zext i1 %190 to i64
  %192 = select i1 %190, ptr @.str.183, ptr @.str.184
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %180, ptr noundef @.str.182, double noundef %182, double noundef %184, double noundef %186, ptr noundef %192) #4
  %194 = load ptr, ptr @stderr, align 8, !tbaa !11
  %195 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str.6) #4
  br label %196

196:                                              ; preds = %177, %174
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197
  %199 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %200 = load double, ptr %5, align 8, !tbaa !9
  call void @Vec3d_set(ptr noundef %199, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef %200)
  %201 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %202 = call zeroext i1 @VecNd_isFinite(ptr noundef %201, i32 noundef 3)
  %203 = zext i1 %202 to i8
  store i8 %203, ptr %3, align 1, !tbaa !5
  %204 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %205 = trunc i8 %204 to i1
  %206 = zext i1 %205 to i32
  %207 = icmp eq i32 %206, 1
  br i1 %207, label %208, label %209

208:                                              ; preds = %198
  store i8 0, ptr %4, align 1, !tbaa !5
  br label %209

209:                                              ; preds = %208, %198
  br label %210

210:                                              ; preds = %209
  %211 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %212 = icmp ne ptr %211, null
  br i1 %212, label %213, label %227

213:                                              ; preds = %210
  %214 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %215 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %216 = load double, ptr %215, align 16, !tbaa !9
  %217 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %218 = load double, ptr %217, align 8, !tbaa !9
  %219 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %220 = load double, ptr %219, align 16, !tbaa !9
  %221 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %222 = trunc i8 %221 to i1
  %223 = zext i1 %222 to i32
  %224 = icmp eq i32 %223, 1
  %225 = zext i1 %224 to i64
  %226 = select i1 %224, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %214(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1636, ptr noundef @.str.182, double noundef %216, double noundef %218, double noundef %220, ptr noundef %226)
  br label %227

227:                                              ; preds = %213, %210
  %228 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %229 = icmp sle i32 2, %228
  br i1 %229, label %230, label %249

230:                                              ; preds = %227
  %231 = load ptr, ptr @stderr, align 8, !tbaa !11
  %232 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %231, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1636) #4
  %233 = load ptr, ptr @stderr, align 8, !tbaa !11
  %234 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 0
  %235 = load double, ptr %234, align 16, !tbaa !9
  %236 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 1
  %237 = load double, ptr %236, align 8, !tbaa !9
  %238 = getelementptr inbounds [3 x double], ptr %2, i64 0, i64 2
  %239 = load double, ptr %238, align 16, !tbaa !9
  %240 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %241 = trunc i8 %240 to i1
  %242 = zext i1 %241 to i32
  %243 = icmp eq i32 %242, 1
  %244 = zext i1 %243 to i64
  %245 = select i1 %243, ptr @.str.183, ptr @.str.184
  %246 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %233, ptr noundef @.str.182, double noundef %235, double noundef %237, double noundef %239, ptr noundef %245) #4
  %247 = load ptr, ptr @stderr, align 8, !tbaa !11
  %248 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %247, ptr noundef @.str.6) #4
  br label %249

249:                                              ; preds = %230, %227
  br label %250

250:                                              ; preds = %249
  br label %251

251:                                              ; preds = %250
  br label %252

252:                                              ; preds = %251
  %253 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %254 = icmp ne ptr %253, null
  br i1 %254, label %255, label %257

255:                                              ; preds = %252
  %256 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  call void (i32, ptr, ptr, i32, ptr, ...) %256(i32 noundef 2, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1641, ptr noundef @.str.186)
  br label %257

257:                                              ; preds = %255, %252
  %258 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %259 = icmp sle i32 2, %258
  br i1 %259, label %260, label %267

260:                                              ; preds = %257
  %261 = load ptr, ptr @stderr, align 8, !tbaa !11
  %262 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %261, ptr noundef @.str.5, ptr noundef @.str.3, ptr noundef @__func__.testFiniteNan, i32 noundef 1641) #4
  %263 = load ptr, ptr @stderr, align 8, !tbaa !11
  %264 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %263, ptr noundef @.str.186) #4
  %265 = load ptr, ptr @stderr, align 8, !tbaa !11
  %266 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %265, ptr noundef @.str.6) #4
  br label %267

267:                                              ; preds = %260, %257
  br label %268

268:                                              ; preds = %267
  br label %269

269:                                              ; preds = %268
  %270 = getelementptr inbounds [3 x [3 x double]], ptr %1, i64 0, i64 0
  call void @Mat3d_setIdentity(ptr noundef %270)
  %271 = getelementptr inbounds [3 x [3 x double]], ptr %1, i64 0, i64 0
  %272 = call zeroext i1 @Mat3d_isFinite(ptr noundef %271)
  %273 = zext i1 %272 to i8
  store i8 %273, ptr %3, align 1, !tbaa !5
  %274 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %275 = trunc i8 %274 to i1
  %276 = zext i1 %275 to i32
  %277 = icmp eq i32 %276, 0
  br i1 %277, label %278, label %279

278:                                              ; preds = %269
  store i8 0, ptr %4, align 1, !tbaa !5
  br label %279

279:                                              ; preds = %278, %269
  %280 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %281 = icmp sle i32 2, %280
  br i1 %281, label %282, label %302

282:                                              ; preds = %279
  %283 = load ptr, ptr @stderr, align 8, !tbaa !11
  %284 = getelementptr inbounds [3 x [3 x double]], ptr %1, i64 0, i64 0
  call void @Mat3d_fprint(ptr noundef %283, ptr noundef %284)
  br label %285

285:                                              ; preds = %282
  %286 = load ptr, ptr @stderr, align 8, !tbaa !11
  %287 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %286, ptr noundef @.str.22, ptr noundef @__func__.testFiniteNan, i32 noundef 1654) #4
  %288 = load ptr, ptr @stderr, align 8, !tbaa !11
  %289 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %290 = trunc i8 %289 to i1
  %291 = zext i1 %290 to i32
  %292 = icmp eq i32 %291, 1
  %293 = zext i1 %292 to i64
  %294 = select i1 %292, ptr @.str.183, ptr @.str.184
  %295 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %288, ptr noundef @.str.187, ptr noundef %294) #4
  %296 = load ptr, ptr @stderr, align 8, !tbaa !11
  %297 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %296, ptr noundef @.str.6) #4
  %298 = load ptr, ptr @stderr, align 8, !tbaa !11
  %299 = call i32 @fflush(ptr noundef %298)
  br label %300

300:                                              ; preds = %285
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301, %279
  %303 = load double, ptr %5, align 8, !tbaa !9
  %304 = getelementptr inbounds [3 x [3 x double]], ptr %1, i64 0, i64 0
  %305 = getelementptr inbounds [3 x double], ptr %304, i64 0, i64 2
  store double %303, ptr %305, align 16, !tbaa !9
  %306 = getelementptr inbounds [3 x [3 x double]], ptr %1, i64 0, i64 0
  %307 = call zeroext i1 @Mat3d_isFinite(ptr noundef %306)
  %308 = zext i1 %307 to i8
  store i8 %308, ptr %3, align 1, !tbaa !5
  %309 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %310 = trunc i8 %309 to i1
  %311 = zext i1 %310 to i32
  %312 = icmp eq i32 %311, 1
  br i1 %312, label %313, label %314

313:                                              ; preds = %302
  store i8 0, ptr %4, align 1, !tbaa !5
  br label %314

314:                                              ; preds = %313, %302
  %315 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %316 = icmp sle i32 2, %315
  br i1 %316, label %317, label %337

317:                                              ; preds = %314
  %318 = load ptr, ptr @stderr, align 8, !tbaa !11
  %319 = getelementptr inbounds [3 x [3 x double]], ptr %1, i64 0, i64 0
  call void @Mat3d_fprint(ptr noundef %318, ptr noundef %319)
  br label %320

320:                                              ; preds = %317
  %321 = load ptr, ptr @stderr, align 8, !tbaa !11
  %322 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %321, ptr noundef @.str.22, ptr noundef @__func__.testFiniteNan, i32 noundef 1669) #4
  %323 = load ptr, ptr @stderr, align 8, !tbaa !11
  %324 = load i8, ptr %3, align 1, !tbaa !5, !range !15, !noundef !16
  %325 = trunc i8 %324 to i1
  %326 = zext i1 %325 to i32
  %327 = icmp eq i32 %326, 1
  %328 = zext i1 %327 to i64
  %329 = select i1 %327, ptr @.str.183, ptr @.str.184
  %330 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %323, ptr noundef @.str.187, ptr noundef %329) #4
  %331 = load ptr, ptr @stderr, align 8, !tbaa !11
  %332 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %331, ptr noundef @.str.6) #4
  %333 = load ptr, ptr @stderr, align 8, !tbaa !11
  %334 = call i32 @fflush(ptr noundef %333)
  br label %335

335:                                              ; preds = %320
  br label %336

336:                                              ; preds = %335
  br label %337

337:                                              ; preds = %336, %314
  br label %338

338:                                              ; preds = %337
  %339 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %340 = icmp ne ptr %339, null
  br i1 %340, label %341, label %350

341:                                              ; preds = %338
  %342 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !11
  %343 = load i8, ptr %4, align 1, !tbaa !5, !range !15, !noundef !16
  %344 = trunc i8 %343 to i1
  br i1 %344, label %345, label %346

345:                                              ; preds = %341
  br label %347

346:                                              ; preds = %341
  br label %347

347:                                              ; preds = %346, %345
  %348 = phi ptr [ @.str.20, %345 ], [ @.str.21, %346 ]
  %349 = getelementptr inbounds [8 x i8], ptr %348, i64 0, i64 0
  call void (i32, ptr, ptr, i32, ptr, ...) %342(i32 noundef 1, ptr noundef @.str.18, ptr noundef @__func__.testFiniteNan, i32 noundef 1672, ptr noundef @.str.188, ptr noundef %349)
  br label %350

350:                                              ; preds = %347, %338
  %351 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %352 = icmp sle i32 1, %351
  br i1 %352, label %353, label %367

353:                                              ; preds = %350
  %354 = load ptr, ptr @stderr, align 8, !tbaa !11
  %355 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %354, ptr noundef @.str.22, ptr noundef @__func__.testFiniteNan, i32 noundef 1672) #4
  %356 = load ptr, ptr @stderr, align 8, !tbaa !11
  %357 = load i8, ptr %4, align 1, !tbaa !5, !range !15, !noundef !16
  %358 = trunc i8 %357 to i1
  br i1 %358, label %359, label %360

359:                                              ; preds = %353
  br label %361

360:                                              ; preds = %353
  br label %361

361:                                              ; preds = %360, %359
  %362 = phi ptr [ @.str.20, %359 ], [ @.str.21, %360 ]
  %363 = getelementptr inbounds [8 x i8], ptr %362, i64 0, i64 0
  %364 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %356, ptr noundef @.str.188, ptr noundef %363) #4
  %365 = load ptr, ptr @stderr, align 8, !tbaa !11
  %366 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %365, ptr noundef @.str.6) #4
  br label %367

367:                                              ; preds = %361, %350
  br label %368

368:                                              ; preds = %367
  br label %369

369:                                              ; preds = %368
  %370 = load i8, ptr %4, align 1, !tbaa !5, !range !15, !noundef !16
  %371 = trunc i8 %370 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %1) #4
  ret i1 %371
}

declare zeroext i1 @Vec3d_isFinite(ptr noundef) #2

declare zeroext i1 @VecNd_isFinite(ptr noundef, i32 noundef) #2

declare zeroext i1 @Mat3d_isFinite(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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


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

@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
@__func__.testFiniteNan = external hidden unnamed_addr constant [14 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.183 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.184 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.185 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.186 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.187 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.188 = external hidden unnamed_addr constant [31 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

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

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

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

declare void @Mat3d_setIdentity(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @testFiniteNan() local_unnamed_addr #3 {
  %1 = alloca [3 x [3 x double]], align 16
  %2 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  %3 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %5, label %4

4:                                                ; preds = %0
  tail call void (i32, ptr, ptr, i32, ptr, ...) %3(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1587, ptr noundef nonnull @.str.181)
  br label %5

5:                                                ; preds = %4, %0
  %6 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %7 = icmp sgt i32 %6, 1
  br i1 %7, label %8, label %15

8:                                                ; preds = %5
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1587) #5
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.181) #5
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.6) #5
  br label %15

15:                                               ; preds = %8, %5
  call void @Vec3d_set(ptr noundef nonnull %2, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef 3.000000e+00)
  %16 = call zeroext i1 @Vec3d_isFinite(ptr noundef nonnull %2)
  %17 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not30 = icmp eq ptr %17, null
  br i1 %.not30, label %25, label %18

18:                                               ; preds = %15
  %19 = load double, ptr %2, align 16, !tbaa !11
  %20 = getelementptr inbounds i8, ptr %2, i64 8
  %21 = load double, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %2, i64 16
  %23 = load double, ptr %22, align 16, !tbaa !11
  %24 = select i1 %16, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %17(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1598, ptr noundef nonnull @.str.182, double noundef %19, double noundef %21, double noundef %23, ptr noundef nonnull %24)
  br label %25

25:                                               ; preds = %18, %15
  %26 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %27 = icmp sgt i32 %26, 1
  br i1 %27, label %28, label %41

28:                                               ; preds = %25
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1598) #5
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = load double, ptr %2, align 16, !tbaa !11
  %33 = getelementptr inbounds i8, ptr %2, i64 8
  %34 = load double, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %2, i64 16
  %36 = load double, ptr %35, align 16, !tbaa !11
  %37 = select i1 %16, ptr @.str.183, ptr @.str.184
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.182, double noundef %32, double noundef %34, double noundef %36, ptr noundef nonnull %37) #5
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.6) #5
  br label %41

41:                                               ; preds = %28, %25
  call void @Vec3d_set(ptr noundef nonnull %2, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef 0x7FF0000000000000)
  %42 = call zeroext i1 @Vec3d_isFinite(ptr noundef nonnull %2)
  %not. = xor i1 %42, true
  %43 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not31 = icmp eq ptr %43, null
  br i1 %.not31, label %51, label %44

44:                                               ; preds = %41
  %45 = load double, ptr %2, align 16, !tbaa !11
  %46 = getelementptr inbounds i8, ptr %2, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %2, i64 16
  %49 = load double, ptr %48, align 16, !tbaa !11
  %50 = select i1 %42, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %43(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1609, ptr noundef nonnull @.str.182, double noundef %45, double noundef %47, double noundef %49, ptr noundef nonnull %50)
  br label %51

51:                                               ; preds = %44, %41
  %52 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %53 = icmp sgt i32 %52, 1
  br i1 %53, label %54, label %67

54:                                               ; preds = %51
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1609) #5
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = load double, ptr %2, align 16, !tbaa !11
  %59 = getelementptr inbounds i8, ptr %2, i64 8
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %2, i64 16
  %62 = load double, ptr %61, align 16, !tbaa !11
  %63 = select i1 %42, ptr @.str.183, ptr @.str.184
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.182, double noundef %58, double noundef %60, double noundef %62, ptr noundef nonnull %63) #5
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.6) #5
  br label %67

67:                                               ; preds = %51, %54
  %68 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not32 = icmp eq ptr %68, null
  br i1 %.not32, label %70, label %69

69:                                               ; preds = %67
  call void (i32, ptr, ptr, i32, ptr, ...) %68(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1614, ptr noundef nonnull @.str.185)
  br label %70

70:                                               ; preds = %69, %67
  %71 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %72 = icmp sgt i32 %71, 1
  br i1 %72, label %73, label %80

73:                                               ; preds = %70
  %74 = load ptr, ptr @stderr, align 8, !tbaa !5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1614) #5
  %76 = load ptr, ptr @stderr, align 8, !tbaa !5
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.185) #5
  %78 = load ptr, ptr @stderr, align 8, !tbaa !5
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef nonnull @.str.6) #5
  br label %80

80:                                               ; preds = %73, %70
  call void @Vec3d_set(ptr noundef nonnull %2, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef 3.000000e+00)
  %81 = call zeroext i1 @Vec3d_isFinite(ptr noundef nonnull %2)
  %82 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not33 = icmp eq ptr %82, null
  br i1 %.not33, label %90, label %83

83:                                               ; preds = %80
  %84 = load double, ptr %2, align 16, !tbaa !11
  %85 = getelementptr inbounds i8, ptr %2, i64 8
  %86 = load double, ptr %85, align 8, !tbaa !11
  %87 = getelementptr inbounds i8, ptr %2, i64 16
  %88 = load double, ptr %87, align 16, !tbaa !11
  %89 = select i1 %81, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %82(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1625, ptr noundef nonnull @.str.182, double noundef %84, double noundef %86, double noundef %88, ptr noundef nonnull %89)
  br label %90

90:                                               ; preds = %83, %80
  %91 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %92 = icmp sgt i32 %91, 1
  br i1 %92, label %93, label %106

93:                                               ; preds = %90
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1625) #5
  %96 = load ptr, ptr @stderr, align 8, !tbaa !5
  %97 = load double, ptr %2, align 16, !tbaa !11
  %98 = getelementptr inbounds i8, ptr %2, i64 8
  %99 = load double, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds i8, ptr %2, i64 16
  %101 = load double, ptr %100, align 16, !tbaa !11
  %102 = select i1 %81, ptr @.str.183, ptr @.str.184
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef nonnull @.str.182, double noundef %97, double noundef %99, double noundef %101, ptr noundef nonnull %102) #5
  %104 = load ptr, ptr @stderr, align 8, !tbaa !5
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef nonnull @.str.6) #5
  br label %106

106:                                              ; preds = %93, %90
  call void @Vec3d_set(ptr noundef nonnull %2, double noundef 1.000000e+00, double noundef 2.000000e+00, double noundef 0x7FF0000000000000)
  %107 = call zeroext i1 @VecNd_isFinite(ptr noundef nonnull %2, i32 noundef 3)
  %not.43 = xor i1 %107, true
  %108 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not34 = icmp eq ptr %108, null
  br i1 %.not34, label %116, label %109

109:                                              ; preds = %106
  %110 = load double, ptr %2, align 16, !tbaa !11
  %111 = getelementptr inbounds i8, ptr %2, i64 8
  %112 = load double, ptr %111, align 8, !tbaa !11
  %113 = getelementptr inbounds i8, ptr %2, i64 16
  %114 = load double, ptr %113, align 16, !tbaa !11
  %115 = select i1 %107, ptr @.str.183, ptr @.str.184
  call void (i32, ptr, ptr, i32, ptr, ...) %108(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1636, ptr noundef nonnull @.str.182, double noundef %110, double noundef %112, double noundef %114, ptr noundef nonnull %115)
  br label %116

116:                                              ; preds = %109, %106
  %117 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %118 = icmp sgt i32 %117, 1
  br i1 %118, label %119, label %132

119:                                              ; preds = %116
  %120 = load ptr, ptr @stderr, align 8, !tbaa !5
  %121 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1636) #5
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = load double, ptr %2, align 16, !tbaa !11
  %124 = getelementptr inbounds i8, ptr %2, i64 8
  %125 = load double, ptr %124, align 8, !tbaa !11
  %126 = getelementptr inbounds i8, ptr %2, i64 16
  %127 = load double, ptr %126, align 16, !tbaa !11
  %128 = select i1 %107, ptr @.str.183, ptr @.str.184
  %129 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef nonnull @.str.182, double noundef %123, double noundef %125, double noundef %127, ptr noundef nonnull %128) #5
  %130 = load ptr, ptr @stderr, align 8, !tbaa !5
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef nonnull @.str.6) #5
  br label %132

132:                                              ; preds = %116, %119
  %133 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not35 = icmp eq ptr %133, null
  br i1 %.not35, label %135, label %134

134:                                              ; preds = %132
  call void (i32, ptr, ptr, i32, ptr, ...) %133(i32 noundef 2, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1641, ptr noundef nonnull @.str.186)
  br label %135

135:                                              ; preds = %134, %132
  %136 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %137 = icmp sgt i32 %136, 1
  br i1 %137, label %138, label %145

138:                                              ; preds = %135
  %139 = load ptr, ptr @stderr, align 8, !tbaa !5
  %140 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %139, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1641) #5
  %141 = load ptr, ptr @stderr, align 8, !tbaa !5
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef nonnull @.str.186) #5
  %143 = load ptr, ptr @stderr, align 8, !tbaa !5
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef nonnull @.str.6) #5
  br label %145

145:                                              ; preds = %138, %135
  call void @Mat3d_setIdentity(ptr noundef nonnull %1)
  %146 = call zeroext i1 @Mat3d_isFinite(ptr noundef nonnull %1)
  %147 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %148 = icmp sgt i32 %147, 1
  br i1 %148, label %149, label %160

149:                                              ; preds = %145
  %150 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @Mat3d_fprint(ptr noundef %150, ptr noundef nonnull %1)
  %151 = load ptr, ptr @stderr, align 8, !tbaa !5
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %151, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1654) #5
  %153 = load ptr, ptr @stderr, align 8, !tbaa !5
  %154 = select i1 %146, ptr @.str.183, ptr @.str.184
  %155 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef nonnull @.str.187, ptr noundef nonnull %154) #5
  %156 = load ptr, ptr @stderr, align 8, !tbaa !5
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %156, ptr noundef nonnull @.str.6) #5
  %158 = load ptr, ptr @stderr, align 8, !tbaa !5
  %159 = call i32 @fflush(ptr noundef %158)
  br label %160

160:                                              ; preds = %149, %145
  %161 = getelementptr inbounds i8, ptr %1, i64 16
  store double 0x7FF0000000000000, ptr %161, align 16, !tbaa !11
  %162 = call zeroext i1 @Mat3d_isFinite(ptr noundef nonnull %1)
  %not.45 = xor i1 %162, true
  %163 = select i1 %not.45, i1 %146, i1 false
  %164 = select i1 %163, i1 %not.43, i1 false
  %165 = select i1 %164, i1 %81, i1 false
  %166 = select i1 %165, i1 %not., i1 false
  %narrow = select i1 %166, i1 %16, i1 false
  %167 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %168 = icmp sgt i32 %167, 1
  br i1 %168, label %169, label %180

169:                                              ; preds = %160
  %170 = load ptr, ptr @stderr, align 8, !tbaa !5
  call void @Mat3d_fprint(ptr noundef %170, ptr noundef nonnull %1)
  %171 = load ptr, ptr @stderr, align 8, !tbaa !5
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1669) #5
  %173 = load ptr, ptr @stderr, align 8, !tbaa !5
  %174 = select i1 %162, ptr @.str.183, ptr @.str.184
  %175 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef nonnull @.str.187, ptr noundef nonnull %174) #5
  %176 = load ptr, ptr @stderr, align 8, !tbaa !5
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef nonnull @.str.6) #5
  %178 = load ptr, ptr @stderr, align 8, !tbaa !5
  %179 = call i32 @fflush(ptr noundef %178)
  br label %180

180:                                              ; preds = %160, %169
  %181 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %.not36 = icmp eq ptr %181, null
  br i1 %.not36, label %183, label %182

182:                                              ; preds = %180
  %.str.20..str.21 = select i1 %narrow, ptr @.str.20, ptr @.str.21
  call void (i32, ptr, ptr, i32, ptr, ...) %181(i32 noundef 1, ptr noundef nonnull @.str.18, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1672, ptr noundef nonnull @.str.188, ptr noundef nonnull %.str.20..str.21)
  br label %183

183:                                              ; preds = %182, %180
  %184 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %185 = icmp sgt i32 %184, 0
  br i1 %185, label %186, label %193

186:                                              ; preds = %183
  %187 = load ptr, ptr @stderr, align 8, !tbaa !5
  %188 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %187, ptr noundef nonnull @.str.22, ptr noundef nonnull @__func__.testFiniteNan, i32 noundef 1672) #5
  %189 = load ptr, ptr @stderr, align 8, !tbaa !5
  %.str.20..str.211 = select i1 %narrow, ptr @.str.20, ptr @.str.21
  %190 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %189, ptr noundef nonnull @.str.188, ptr noundef nonnull %.str.20..str.211) #5
  %191 = load ptr, ptr @stderr, align 8, !tbaa !5
  %192 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef nonnull @.str.6) #5
  br label %193

193:                                              ; preds = %186, %183
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %1) #4
  ret i1 %narrow
}

declare zeroext i1 @Vec3d_isFinite(ptr noundef) local_unnamed_addr #2

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

declare zeroext i1 @Mat3d_isFinite(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 = { nounwind }
attributes #5 = { cold 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}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass