; LLVM IR from HRI-EU/Rcs :: src/RcsCore (Rcs_gradientTests)

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

%struct._RcsBody = type { double, i8, i32, [3 x double], [3 x double], double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._RcsGraph = type { ptr, [10 x %struct._RcsBody], i32, i32, ptr, ptr, ptr, ptr, ptr }
%struct._MatNd = type { ptr, i32, i32, i32, i8 }

@stderr = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [76 x i8], align 1
@RcsLogLevel = external global i32, align 4
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@RCS_GRADIENTTESTS_BODYPT1 = external dso_local global [3 x double], align 16
@RCS_GRADIENTTESTS_BODY1 = external hidden global ptr, align 8
@RCS_GRADIENTTESTS_BODY2 = external hidden global ptr, align 8
@RCS_GRADIENTTESTS_BODY3 = external hidden global ptr, align 8
@RCS_GRADIENTTESTS_BODYPT2 = external dso_local global [3 x double], align 16
@RCS_RNDXYZ = external hidden global i32, align 4
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.Rcs_gradientTestGraph = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [119 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.44 = 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @test_jacobianPinv(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_hessianPinv(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_jacobianPinv2(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_hessianPinv2(ptr noundef, ptr noundef, ptr noundef) #2

declare zeroext i1 @RcsGraph_setState(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @test_rotMat(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_rotMatDerivative(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_jacobianRot(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_hessianRot(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_omegaJacobian3D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_omegaHessian3D(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @RcsBody_numDistanceShapes(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @test_effort(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_effortJ(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @Rcs_gradientTestGraph(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %10 = zext i1 %2 to i8
  store i8 %10, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  store i8 1, ptr %7, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store double 5.000000e-02, ptr %8, align 8, !tbaa !11
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  call void @Rcs_setRndBdy1(ptr noundef %11)
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  call void @Rcs_setRndBdy2(ptr noundef %12)
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  call void @Rcs_setRndBdy3(ptr noundef %13)
  %14 = call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01)
  store double %14, ptr @RCS_GRADIENTTESTS_BODYPT1, align 16, !tbaa !11
  %15 = call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01)
  store double %15, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT1, i64 0, i64 1), align 8, !tbaa !11
  %16 = call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01)
  store double %16, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT1, i64 0, i64 2), align 16, !tbaa !11
  %17 = call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01)
  store double %17, ptr @RCS_GRADIENTTESTS_BODYPT2, align 16, !tbaa !11
  %18 = call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01)
  store double %18, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT2, i64 0, i64 1), align 8, !tbaa !11
  %19 = call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01)
  store double %19, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT2, i64 0, i64 2), align 16, !tbaa !11
  %20 = call i32 @rand() #5
  %21 = sitofp i32 %20 to double
  %22 = fdiv double %21, 0x41E0000000000000
  %23 = fmul double 3.000000e+00, %22
  %24 = fptosi double %23 to i32
  store i32 %24, ptr @RCS_RNDXYZ, align 4, !tbaa !13
  %25 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %26 = trunc i8 %25 to i1
  %27 = zext i1 %26 to i32
  %28 = icmp eq i32 %27, 1
  br i1 %28, label %29, label %41

29:                                               ; preds = %3
  br label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.12, ptr noundef @.str.2, ptr noundef @__func__.Rcs_gradientTestGraph, i32 noundef 2407) #5
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef @.str.13) #5
  %35 = load ptr, ptr @stderr, align 8, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef @.str.7) #5
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 @fflush(ptr noundef %37)
  br label %39

39:                                               ; preds = %30
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40, %3
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = call zeroext i1 @RcsGraph_setState(ptr noundef %42, ptr noundef %43, ptr noundef null)
  %45 = load i32, ptr @RcsLogLevel, align 4, !tbaa !13
  %46 = icmp sle i32 5, %45
  br i1 %46, label %47, label %91

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !11
  %48 = load ptr, ptr @RCS_GRADIENTTESTS_BODY1, align 8, !tbaa !5
  %49 = call i32 @RcsBody_numDistanceShapes(ptr noundef %48)
  %50 = icmp ugt i32 %49, 0
  br i1 %50, label %51, label %59

51:                                               ; preds = %47
  %52 = load ptr, ptr @RCS_GRADIENTTESTS_BODY2, align 8, !tbaa !5
  %53 = call i32 @RcsBody_numDistanceShapes(ptr noundef %52)
  %54 = icmp ugt i32 %53, 0
  br i1 %54, label %55, label %59

55:                                               ; preds = %51
  %56 = load ptr, ptr @RCS_GRADIENTTESTS_BODY1, align 8, !tbaa !5
  %57 = load ptr, ptr @RCS_GRADIENTTESTS_BODY2, align 8, !tbaa !5
  %58 = call double @RcsBody_distance(ptr noundef %56, ptr noundef %57, ptr noundef null, ptr noundef null, ptr noundef null)
  store double %58, ptr %9, align 8, !tbaa !11
  br label %59

59:                                               ; preds = %55, %51, %47
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef @.str.12, ptr noundef @.str.2, ptr noundef @__func__.Rcs_gradientTestGraph, i32 noundef 2436) #5
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = load ptr, ptr @RCS_GRADIENTTESTS_BODY1, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._RcsBody, ptr %64, i32 0, i32 6
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  %67 = load ptr, ptr @RCS_GRADIENTTESTS_BODY2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._RcsBody, ptr %67, i32 0, i32 6
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %70 = load ptr, ptr @RCS_GRADIENTTESTS_BODY3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._RcsBody, ptr %70, i32 0, i32 6
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._RcsGraph, ptr %73, i32 0, i32 3
  %75 = load i32, ptr %74, align 4, !tbaa !19
  %76 = load double, ptr %9, align 8, !tbaa !11
  %77 = load double, ptr @RCS_GRADIENTTESTS_BODYPT1, align 16, !tbaa !11
  %78 = load double, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT1, i64 0, i64 1), align 8, !tbaa !11
  %79 = load double, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT1, i64 0, i64 2), align 16, !tbaa !11
  %80 = load double, ptr @RCS_GRADIENTTESTS_BODYPT2, align 16, !tbaa !11
  %81 = load double, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT2, i64 0, i64 1), align 8, !tbaa !11
  %82 = load double, ptr getelementptr inbounds ([3 x double], ptr @RCS_GRADIENTTESTS_BODYPT2, i64 0, i64 2), align 16, !tbaa !11
  %83 = load i32, ptr @RCS_RNDXYZ, align 4, !tbaa !13
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.14, ptr noundef %66, ptr noundef %69, ptr noundef %72, i32 noundef %75, double noundef %76, double noundef %77, double noundef %78, double noundef %79, double noundef %80, double noundef %81, double noundef %82, i32 noundef %83) #5
  %85 = load ptr, ptr @stderr, align 8, !tbaa !5
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.7) #5
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 @fflush(ptr noundef %87)
  br label %89

89:                                               ; preds = %60
  br label %90

90:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %91

91:                                               ; preds = %90, %41
  %92 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %93 = trunc i8 %92 to i1
  %94 = zext i1 %93 to i32
  %95 = icmp eq i32 %94, 1
  br i1 %95, label %96, label %99

96:                                               ; preds = %91
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str.15) #5
  br label %99

99:                                               ; preds = %96, %91
  %100 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %114

102:                                              ; preds = %99
  %103 = load ptr, ptr %4, align 8, !tbaa !5
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._MatNd, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !21
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._RcsGraph, ptr %107, i32 0, i32 3
  %109 = load i32, ptr %108, align 4, !tbaa !19
  %110 = load double, ptr %8, align 8, !tbaa !11
  %111 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %112 = trunc i8 %111 to i1
  %113 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_position3D, ptr noundef @test_jacobian3D, ptr noundef %103, ptr noundef %106, i32 noundef %109, i32 noundef 3, double noundef %110, i1 noundef zeroext %112)
  br label %114

114:                                              ; preds = %102, %99
  %115 = phi i1 [ false, %99 ], [ %113, %102 ]
  %116 = zext i1 %115 to i8
  store i8 %116, ptr %7, align 1, !tbaa !9
  %117 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %118 = trunc i8 %117 to i1
  %119 = zext i1 %118 to i32
  %120 = icmp eq i32 %119, 1
  br i1 %120, label %121, label %124

121:                                              ; preds = %114
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.16) #5
  br label %124

124:                                              ; preds = %121, %114
  %125 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %126 = trunc i8 %125 to i1
  br i1 %126, label %127, label %143

127:                                              ; preds = %124
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._MatNd, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !21
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._RcsGraph, ptr %132, i32 0, i32 3
  %134 = load i32, ptr %133, align 4, !tbaa !19
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._RcsGraph, ptr %135, i32 0, i32 3
  %137 = load i32, ptr %136, align 4, !tbaa !19
  %138 = mul i32 3, %137
  %139 = load double, ptr %8, align 8, !tbaa !11
  %140 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %141 = trunc i8 %140 to i1
  %142 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jacobian3D, ptr noundef @test_hessian3D, ptr noundef %128, ptr noundef %131, i32 noundef %134, i32 noundef %138, double noundef %139, i1 noundef zeroext %141)
  br label %143

143:                                              ; preds = %127, %124
  %144 = phi i1 [ false, %124 ], [ %142, %127 ]
  %145 = zext i1 %144 to i8
  store i8 %145, ptr %7, align 1, !tbaa !9
  %146 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %147 = trunc i8 %146 to i1
  %148 = zext i1 %147 to i32
  %149 = icmp eq i32 %148, 1
  br i1 %149, label %150, label %153

150:                                              ; preds = %143
  %151 = load ptr, ptr @stderr, align 8, !tbaa !5
  %152 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %151, ptr noundef @.str.17) #5
  br label %153

153:                                              ; preds = %150, %143
  %154 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %155 = trunc i8 %154 to i1
  br i1 %155, label %156, label %168

156:                                              ; preds = %153
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct._MatNd, ptr %158, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !21
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._RcsGraph, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 4, !tbaa !19
  %164 = load double, ptr %8, align 8, !tbaa !11
  %165 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %166 = trunc i8 %165 to i1
  %167 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_manipulability, ptr noundef @test_manipulabilityJ, ptr noundef %157, ptr noundef %160, i32 noundef %163, i32 noundef 1, double noundef %164, i1 noundef zeroext %166)
  br label %168

168:                                              ; preds = %156, %153
  %169 = phi i1 [ false, %153 ], [ %167, %156 ]
  %170 = zext i1 %169 to i8
  store i8 %170, ptr %7, align 1, !tbaa !9
  %171 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %172 = trunc i8 %171 to i1
  %173 = zext i1 %172 to i32
  %174 = icmp eq i32 %173, 1
  br i1 %174, label %175, label %178

175:                                              ; preds = %168
  %176 = load ptr, ptr @stderr, align 8, !tbaa !5
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %176, ptr noundef @.str.18) #5
  br label %178

178:                                              ; preds = %175, %168
  %179 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %180 = trunc i8 %179 to i1
  br i1 %180, label %181, label %193

181:                                              ; preds = %178
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._MatNd, ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !21
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._RcsGraph, ptr %186, i32 0, i32 3
  %188 = load i32, ptr %187, align 4, !tbaa !19
  %189 = load double, ptr %8, align 8, !tbaa !11
  %190 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %191 = trunc i8 %190 to i1
  %192 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_rotMat, ptr noundef @test_rotMatDerivative, ptr noundef %182, ptr noundef %185, i32 noundef %188, i32 noundef 9, double noundef %189, i1 noundef zeroext %191)
  br label %193

193:                                              ; preds = %181, %178
  %194 = phi i1 [ false, %178 ], [ %192, %181 ]
  %195 = zext i1 %194 to i8
  store i8 %195, ptr %7, align 1, !tbaa !9
  %196 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %197 = trunc i8 %196 to i1
  %198 = zext i1 %197 to i32
  %199 = icmp eq i32 %198, 1
  br i1 %199, label %200, label %203

200:                                              ; preds = %193
  %201 = load ptr, ptr @stderr, align 8, !tbaa !5
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.19) #5
  br label %203

203:                                              ; preds = %200, %193
  %204 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %205 = trunc i8 %204 to i1
  br i1 %205, label %206, label %218

206:                                              ; preds = %203
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct._MatNd, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !21
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._RcsGraph, ptr %211, i32 0, i32 3
  %213 = load i32, ptr %212, align 4, !tbaa !19
  %214 = load double, ptr %8, align 8, !tbaa !11
  %215 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %216 = trunc i8 %215 to i1
  %217 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_A, ptr noundef @test_dA, ptr noundef %207, ptr noundef %210, i32 noundef %213, i32 noundef 9, double noundef %214, i1 noundef zeroext %216)
  br label %218

218:                                              ; preds = %206, %203
  %219 = phi i1 [ false, %203 ], [ %217, %206 ]
  %220 = zext i1 %219 to i8
  store i8 %220, ptr %7, align 1, !tbaa !9
  %221 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %222 = trunc i8 %221 to i1
  %223 = zext i1 %222 to i32
  %224 = icmp eq i32 %223, 1
  br i1 %224, label %225, label %228

225:                                              ; preds = %218
  %226 = load ptr, ptr @stderr, align 8, !tbaa !5
  %227 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str.20) #5
  br label %228

228:                                              ; preds = %225, %218
  %229 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %230 = trunc i8 %229 to i1
  br i1 %230, label %231, label %243

231:                                              ; preds = %228
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = load ptr, ptr %5, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct._MatNd, ptr %233, i32 0, i32 0
  %235 = load ptr, ptr %234, align 8, !tbaa !21
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct._RcsGraph, ptr %236, i32 0, i32 2
  %238 = load i32, ptr %237, align 8, !tbaa !23
  %239 = load double, ptr %8, align 8, !tbaa !11
  %240 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %241 = trunc i8 %240 to i1
  %242 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jointLimit_Full, ptr noundef @test_jointLimitJ_Full, ptr noundef %232, ptr noundef %235, i32 noundef %238, i32 noundef 1, double noundef %239, i1 noundef zeroext %241)
  br label %243

243:                                              ; preds = %231, %228
  %244 = phi i1 [ false, %228 ], [ %242, %231 ]
  %245 = zext i1 %244 to i8
  store i8 %245, ptr %7, align 1, !tbaa !9
  %246 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %247 = trunc i8 %246 to i1
  %248 = zext i1 %247 to i32
  %249 = icmp eq i32 %248, 1
  br i1 %249, label %250, label %253

250:                                              ; preds = %243
  %251 = load ptr, ptr @stderr, align 8, !tbaa !5
  %252 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %251, ptr noundef @.str.21) #5
  br label %253

253:                                              ; preds = %250, %243
  %254 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %255 = trunc i8 %254 to i1
  br i1 %255, label %256, label %271

256:                                              ; preds = %253
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = load ptr, ptr %5, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct._MatNd, ptr %258, i32 0, i32 0
  %260 = load ptr, ptr %259, align 8, !tbaa !21
  %261 = load ptr, ptr %4, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct._RcsGraph, ptr %261, i32 0, i32 2
  %263 = load i32, ptr %262, align 8, !tbaa !23
  %264 = load ptr, ptr %4, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct._RcsGraph, ptr %264, i32 0, i32 2
  %266 = load i32, ptr %265, align 8, !tbaa !23
  %267 = load double, ptr %8, align 8, !tbaa !11
  %268 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %269 = trunc i8 %268 to i1
  %270 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jointLimitJ_Full, ptr noundef @test_jointLimitH_Full, ptr noundef %257, ptr noundef %260, i32 noundef %263, i32 noundef %266, double noundef %267, i1 noundef zeroext %269)
  br label %271

271:                                              ; preds = %256, %253
  %272 = phi i1 [ false, %253 ], [ %270, %256 ]
  %273 = zext i1 %272 to i8
  store i8 %273, ptr %7, align 1, !tbaa !9
  %274 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %275 = trunc i8 %274 to i1
  %276 = zext i1 %275 to i32
  %277 = icmp eq i32 %276, 1
  br i1 %277, label %278, label %281

278:                                              ; preds = %271
  %279 = load ptr, ptr @stderr, align 8, !tbaa !5
  %280 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %279, ptr noundef @.str.22) #5
  br label %281

281:                                              ; preds = %278, %271
  %282 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %283 = trunc i8 %282 to i1
  br i1 %283, label %284, label %296

284:                                              ; preds = %281
  %285 = load ptr, ptr %4, align 8, !tbaa !5
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct._MatNd, ptr %286, i32 0, i32 0
  %288 = load ptr, ptr %287, align 8, !tbaa !21
  %289 = load ptr, ptr %4, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct._RcsGraph, ptr %289, i32 0, i32 3
  %291 = load i32, ptr %290, align 4, !tbaa !19
  %292 = load double, ptr %8, align 8, !tbaa !11
  %293 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %294 = trunc i8 %293 to i1
  %295 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jointLimit_IK, ptr noundef @test_jointLimitJ_IK, ptr noundef %285, ptr noundef %288, i32 noundef %291, i32 noundef 1, double noundef %292, i1 noundef zeroext %294)
  br label %296

296:                                              ; preds = %284, %281
  %297 = phi i1 [ false, %281 ], [ %295, %284 ]
  %298 = zext i1 %297 to i8
  store i8 %298, ptr %7, align 1, !tbaa !9
  %299 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %300 = trunc i8 %299 to i1
  %301 = zext i1 %300 to i32
  %302 = icmp eq i32 %301, 1
  br i1 %302, label %303, label %306

303:                                              ; preds = %296
  %304 = load ptr, ptr @stderr, align 8, !tbaa !5
  %305 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %304, ptr noundef @.str.23) #5
  br label %306

306:                                              ; preds = %303, %296
  %307 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %308 = trunc i8 %307 to i1
  br i1 %308, label %309, label %324

309:                                              ; preds = %306
  %310 = load ptr, ptr %4, align 8, !tbaa !5
  %311 = load ptr, ptr %5, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct._MatNd, ptr %311, i32 0, i32 0
  %313 = load ptr, ptr %312, align 8, !tbaa !21
  %314 = load ptr, ptr %4, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct._RcsGraph, ptr %314, i32 0, i32 3
  %316 = load i32, ptr %315, align 4, !tbaa !19
  %317 = load ptr, ptr %4, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct._RcsGraph, ptr %317, i32 0, i32 3
  %319 = load i32, ptr %318, align 4, !tbaa !19
  %320 = load double, ptr %8, align 8, !tbaa !11
  %321 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %322 = trunc i8 %321 to i1
  %323 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jointLimitJ_IK, ptr noundef @test_jointLimitH_IK, ptr noundef %310, ptr noundef %313, i32 noundef %316, i32 noundef %319, double noundef %320, i1 noundef zeroext %322)
  br label %324

324:                                              ; preds = %309, %306
  %325 = phi i1 [ false, %306 ], [ %323, %309 ]
  %326 = zext i1 %325 to i8
  store i8 %326, ptr %7, align 1, !tbaa !9
  %327 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %328 = trunc i8 %327 to i1
  %329 = zext i1 %328 to i32
  %330 = icmp eq i32 %329, 1
  br i1 %330, label %331, label %334

331:                                              ; preds = %324
  %332 = load ptr, ptr @stderr, align 8, !tbaa !5
  %333 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %332, ptr noundef @.str.24) #5
  br label %334

334:                                              ; preds = %331, %324
  %335 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %336 = trunc i8 %335 to i1
  br i1 %336, label %337, label %349

337:                                              ; preds = %334
  %338 = load ptr, ptr %4, align 8, !tbaa !5
  %339 = load ptr, ptr %5, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct._MatNd, ptr %339, i32 0, i32 0
  %341 = load ptr, ptr %340, align 8, !tbaa !21
  %342 = load ptr, ptr %4, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct._RcsGraph, ptr %342, i32 0, i32 2
  %344 = load i32, ptr %343, align 8, !tbaa !23
  %345 = load double, ptr %8, align 8, !tbaa !11
  %346 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %347 = trunc i8 %346 to i1
  %348 = call zeroext i1 @Rcs_testGradient(ptr noundef @f_jlBorderFull, ptr noundef @df_jlBorderFull, ptr noundef %338, ptr noundef %341, i32 noundef %344, i32 noundef 1, double noundef %345, i1 noundef zeroext %347)
  br label %349

349:                                              ; preds = %337, %334
  %350 = phi i1 [ false, %334 ], [ %348, %337 ]
  %351 = zext i1 %350 to i8
  store i8 %351, ptr %7, align 1, !tbaa !9
  %352 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %353 = trunc i8 %352 to i1
  %354 = zext i1 %353 to i32
  %355 = icmp eq i32 %354, 1
  br i1 %355, label %356, label %359

356:                                              ; preds = %349
  %357 = load ptr, ptr @stderr, align 8, !tbaa !5
  %358 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %357, ptr noundef @.str.25) #5
  br label %359

359:                                              ; preds = %356, %349
  %360 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %361 = trunc i8 %360 to i1
  br i1 %361, label %362, label %374

362:                                              ; preds = %359
  %363 = load ptr, ptr %4, align 8, !tbaa !5
  %364 = load ptr, ptr %5, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct._MatNd, ptr %364, i32 0, i32 0
  %366 = load ptr, ptr %365, align 8, !tbaa !21
  %367 = load ptr, ptr %4, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct._RcsGraph, ptr %367, i32 0, i32 3
  %369 = load i32, ptr %368, align 4, !tbaa !19
  %370 = load double, ptr %8, align 8, !tbaa !11
  %371 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %372 = trunc i8 %371 to i1
  %373 = call zeroext i1 @Rcs_testGradient(ptr noundef @f_jlBorderIK, ptr noundef @df_jlBorderIK, ptr noundef %363, ptr noundef %366, i32 noundef %369, i32 noundef 1, double noundef %370, i1 noundef zeroext %372)
  br label %374

374:                                              ; preds = %362, %359
  %375 = phi i1 [ false, %359 ], [ %373, %362 ]
  %376 = zext i1 %375 to i8
  store i8 %376, ptr %7, align 1, !tbaa !9
  %377 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %378 = trunc i8 %377 to i1
  %379 = zext i1 %378 to i32
  %380 = icmp eq i32 %379, 1
  br i1 %380, label %381, label %384

381:                                              ; preds = %374
  %382 = load ptr, ptr @stderr, align 8, !tbaa !5
  %383 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %382, ptr noundef @.str.26) #5
  br label %384

384:                                              ; preds = %381, %374
  %385 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %386 = trunc i8 %385 to i1
  br i1 %386, label %387, label %399

387:                                              ; preds = %384
  %388 = load ptr, ptr %4, align 8, !tbaa !5
  %389 = load ptr, ptr %5, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct._MatNd, ptr %389, i32 0, i32 0
  %391 = load ptr, ptr %390, align 8, !tbaa !21
  %392 = load ptr, ptr %4, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct._RcsGraph, ptr %392, i32 0, i32 3
  %394 = load i32, ptr %393, align 4, !tbaa !19
  %395 = load double, ptr %8, align 8, !tbaa !11
  %396 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %397 = trunc i8 %396 to i1
  %398 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_kinematics, ptr noundef @test_kinematicsJ, ptr noundef %388, ptr noundef %391, i32 noundef %394, i32 noundef 3, double noundef %395, i1 noundef zeroext %397)
  br label %399

399:                                              ; preds = %387, %384
  %400 = phi i1 [ false, %384 ], [ %398, %387 ]
  %401 = zext i1 %400 to i8
  store i8 %401, ptr %7, align 1, !tbaa !9
  %402 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %403 = trunc i8 %402 to i1
  %404 = zext i1 %403 to i32
  %405 = icmp eq i32 %404, 1
  br i1 %405, label %406, label %409

406:                                              ; preds = %399
  %407 = load ptr, ptr @stderr, align 8, !tbaa !5
  %408 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %407, ptr noundef @.str.27) #5
  br label %409

409:                                              ; preds = %406, %399
  %410 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %411 = trunc i8 %410 to i1
  br i1 %411, label %412, label %428

412:                                              ; preds = %409
  %413 = load ptr, ptr %4, align 8, !tbaa !5
  %414 = load ptr, ptr %5, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct._MatNd, ptr %414, i32 0, i32 0
  %416 = load ptr, ptr %415, align 8, !tbaa !21
  %417 = load ptr, ptr %4, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct._RcsGraph, ptr %417, i32 0, i32 3
  %419 = load i32, ptr %418, align 4, !tbaa !19
  %420 = load ptr, ptr %4, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct._RcsGraph, ptr %420, i32 0, i32 3
  %422 = load i32, ptr %421, align 4, !tbaa !19
  %423 = mul i32 3, %422
  %424 = load double, ptr %8, align 8, !tbaa !11
  %425 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %426 = trunc i8 %425 to i1
  %427 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_kinematicsJ, ptr noundef @test_kinematicsH, ptr noundef %413, ptr noundef %416, i32 noundef %419, i32 noundef %423, double noundef %424, i1 noundef zeroext %426)
  br label %428

428:                                              ; preds = %412, %409
  %429 = phi i1 [ false, %409 ], [ %427, %412 ]
  %430 = zext i1 %429 to i8
  store i8 %430, ptr %7, align 1, !tbaa !9
  %431 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %432 = trunc i8 %431 to i1
  %433 = zext i1 %432 to i32
  %434 = icmp eq i32 %433, 1
  br i1 %434, label %435, label %438

435:                                              ; preds = %428
  %436 = load ptr, ptr @stderr, align 8, !tbaa !5
  %437 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %436, ptr noundef @.str.28) #5
  br label %438

438:                                              ; preds = %435, %428
  %439 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %440 = trunc i8 %439 to i1
  br i1 %440, label %441, label %457

441:                                              ; preds = %438
  %442 = load ptr, ptr %4, align 8, !tbaa !5
  %443 = load ptr, ptr %5, align 8, !tbaa !5
  %444 = getelementptr inbounds %struct._MatNd, ptr %443, i32 0, i32 0
  %445 = load ptr, ptr %444, align 8, !tbaa !21
  %446 = load ptr, ptr %4, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct._RcsGraph, ptr %446, i32 0, i32 3
  %448 = load i32, ptr %447, align 4, !tbaa !19
  %449 = load ptr, ptr %4, align 8, !tbaa !5
  %450 = getelementptr inbounds %struct._RcsGraph, ptr %449, i32 0, i32 3
  %451 = load i32, ptr %450, align 4, !tbaa !19
  %452 = mul i32 3, %451
  %453 = load double, ptr %8, align 8, !tbaa !11
  %454 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %455 = trunc i8 %454 to i1
  %456 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jacobianRot, ptr noundef @test_hessianRot, ptr noundef %442, ptr noundef %445, i32 noundef %448, i32 noundef %452, double noundef %453, i1 noundef zeroext %455)
  br label %457

457:                                              ; preds = %441, %438
  %458 = phi i1 [ false, %438 ], [ %456, %441 ]
  %459 = zext i1 %458 to i8
  store i8 %459, ptr %7, align 1, !tbaa !9
  %460 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %461 = trunc i8 %460 to i1
  %462 = zext i1 %461 to i32
  %463 = icmp eq i32 %462, 1
  br i1 %463, label %464, label %467

464:                                              ; preds = %457
  %465 = load ptr, ptr @stderr, align 8, !tbaa !5
  %466 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %465, ptr noundef @.str.29) #5
  br label %467

467:                                              ; preds = %464, %457
  %468 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %469 = trunc i8 %468 to i1
  br i1 %469, label %470, label %482

470:                                              ; preds = %467
  %471 = load ptr, ptr %4, align 8, !tbaa !5
  %472 = load ptr, ptr %5, align 8, !tbaa !5
  %473 = getelementptr inbounds %struct._MatNd, ptr %472, i32 0, i32 0
  %474 = load ptr, ptr %473, align 8, !tbaa !21
  %475 = load ptr, ptr %4, align 8, !tbaa !5
  %476 = getelementptr inbounds %struct._RcsGraph, ptr %475, i32 0, i32 3
  %477 = load i32, ptr %476, align 4, !tbaa !19
  %478 = load double, ptr %8, align 8, !tbaa !11
  %479 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %480 = trunc i8 %479 to i1
  %481 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_COG, ptr noundef @test_COGJ, ptr noundef %471, ptr noundef %474, i32 noundef %477, i32 noundef 3, double noundef %478, i1 noundef zeroext %480)
  br label %482

482:                                              ; preds = %470, %467
  %483 = phi i1 [ false, %467 ], [ %481, %470 ]
  %484 = zext i1 %483 to i8
  store i8 %484, ptr %7, align 1, !tbaa !9
  %485 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %486 = trunc i8 %485 to i1
  %487 = zext i1 %486 to i32
  %488 = icmp eq i32 %487, 1
  br i1 %488, label %489, label %492

489:                                              ; preds = %482
  %490 = load ptr, ptr @stderr, align 8, !tbaa !5
  %491 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %490, ptr noundef @.str.30) #5
  br label %492

492:                                              ; preds = %489, %482
  %493 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %494 = trunc i8 %493 to i1
  br i1 %494, label %495, label %511

495:                                              ; preds = %492
  %496 = load ptr, ptr %4, align 8, !tbaa !5
  %497 = load ptr, ptr %5, align 8, !tbaa !5
  %498 = getelementptr inbounds %struct._MatNd, ptr %497, i32 0, i32 0
  %499 = load ptr, ptr %498, align 8, !tbaa !21
  %500 = load ptr, ptr %4, align 8, !tbaa !5
  %501 = getelementptr inbounds %struct._RcsGraph, ptr %500, i32 0, i32 3
  %502 = load i32, ptr %501, align 4, !tbaa !19
  %503 = load ptr, ptr %4, align 8, !tbaa !5
  %504 = getelementptr inbounds %struct._RcsGraph, ptr %503, i32 0, i32 3
  %505 = load i32, ptr %504, align 4, !tbaa !19
  %506 = mul i32 3, %505
  %507 = load double, ptr %8, align 8, !tbaa !11
  %508 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %509 = trunc i8 %508 to i1
  %510 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_COGJ, ptr noundef @test_COGH, ptr noundef %496, ptr noundef %499, i32 noundef %502, i32 noundef %506, double noundef %507, i1 noundef zeroext %509)
  br label %511

511:                                              ; preds = %495, %492
  %512 = phi i1 [ false, %492 ], [ %510, %495 ]
  %513 = zext i1 %512 to i8
  store i8 %513, ptr %7, align 1, !tbaa !9
  %514 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %515 = trunc i8 %514 to i1
  %516 = zext i1 %515 to i32
  %517 = icmp eq i32 %516, 1
  br i1 %517, label %518, label %521

518:                                              ; preds = %511
  %519 = load ptr, ptr @stderr, align 8, !tbaa !5
  %520 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %519, ptr noundef @.str.15) #5
  br label %521

521:                                              ; preds = %518, %511
  %522 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %523 = trunc i8 %522 to i1
  br i1 %523, label %524, label %536

524:                                              ; preds = %521
  %525 = load ptr, ptr %4, align 8, !tbaa !5
  %526 = load ptr, ptr %5, align 8, !tbaa !5
  %527 = getelementptr inbounds %struct._MatNd, ptr %526, i32 0, i32 0
  %528 = load ptr, ptr %527, align 8, !tbaa !21
  %529 = load ptr, ptr %4, align 8, !tbaa !5
  %530 = getelementptr inbounds %struct._RcsGraph, ptr %529, i32 0, i32 3
  %531 = load i32, ptr %530, align 4, !tbaa !19
  %532 = load double, ptr %8, align 8, !tbaa !11
  %533 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %534 = trunc i8 %533 to i1
  %535 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_position3D, ptr noundef @test_jacobian3D, ptr noundef %525, ptr noundef %528, i32 noundef %531, i32 noundef 3, double noundef %532, i1 noundef zeroext %534)
  br label %536

536:                                              ; preds = %524, %521
  %537 = phi i1 [ false, %521 ], [ %535, %524 ]
  %538 = zext i1 %537 to i8
  store i8 %538, ptr %7, align 1, !tbaa !9
  %539 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %540 = trunc i8 %539 to i1
  %541 = zext i1 %540 to i32
  %542 = icmp eq i32 %541, 1
  br i1 %542, label %543, label %546

543:                                              ; preds = %536
  %544 = load ptr, ptr @stderr, align 8, !tbaa !5
  %545 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %544, ptr noundef @.str.16) #5
  br label %546

546:                                              ; preds = %543, %536
  %547 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %548 = trunc i8 %547 to i1
  br i1 %548, label %549, label %565

549:                                              ; preds = %546
  %550 = load ptr, ptr %4, align 8, !tbaa !5
  %551 = load ptr, ptr %5, align 8, !tbaa !5
  %552 = getelementptr inbounds %struct._MatNd, ptr %551, i32 0, i32 0
  %553 = load ptr, ptr %552, align 8, !tbaa !21
  %554 = load ptr, ptr %4, align 8, !tbaa !5
  %555 = getelementptr inbounds %struct._RcsGraph, ptr %554, i32 0, i32 3
  %556 = load i32, ptr %555, align 4, !tbaa !19
  %557 = load ptr, ptr %4, align 8, !tbaa !5
  %558 = getelementptr inbounds %struct._RcsGraph, ptr %557, i32 0, i32 3
  %559 = load i32, ptr %558, align 4, !tbaa !19
  %560 = mul i32 3, %559
  %561 = load double, ptr %8, align 8, !tbaa !11
  %562 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %563 = trunc i8 %562 to i1
  %564 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jacobian3D, ptr noundef @test_hessian3D, ptr noundef %550, ptr noundef %553, i32 noundef %556, i32 noundef %560, double noundef %561, i1 noundef zeroext %563)
  br label %565

565:                                              ; preds = %549, %546
  %566 = phi i1 [ false, %546 ], [ %564, %549 ]
  %567 = zext i1 %566 to i8
  store i8 %567, ptr %7, align 1, !tbaa !9
  %568 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %569 = trunc i8 %568 to i1
  %570 = zext i1 %569 to i32
  %571 = icmp eq i32 %570, 1
  br i1 %571, label %572, label %575

572:                                              ; preds = %565
  %573 = load ptr, ptr @stderr, align 8, !tbaa !5
  %574 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %573, ptr noundef @.str.31) #5
  br label %575

575:                                              ; preds = %572, %565
  %576 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %577 = trunc i8 %576 to i1
  br i1 %577, label %578, label %590

578:                                              ; preds = %575
  %579 = load ptr, ptr %4, align 8, !tbaa !5
  %580 = load ptr, ptr %5, align 8, !tbaa !5
  %581 = getelementptr inbounds %struct._MatNd, ptr %580, i32 0, i32 0
  %582 = load ptr, ptr %581, align 8, !tbaa !21
  %583 = load ptr, ptr %4, align 8, !tbaa !5
  %584 = getelementptr inbounds %struct._RcsGraph, ptr %583, i32 0, i32 3
  %585 = load i32, ptr %584, align 4, !tbaa !19
  %586 = load double, ptr %8, align 8, !tbaa !11
  %587 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %588 = trunc i8 %587 to i1
  %589 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_position1D, ptr noundef @test_jacobian1D, ptr noundef %579, ptr noundef %582, i32 noundef %585, i32 noundef 1, double noundef %586, i1 noundef zeroext %588)
  br label %590

590:                                              ; preds = %578, %575
  %591 = phi i1 [ false, %575 ], [ %589, %578 ]
  %592 = zext i1 %591 to i8
  store i8 %592, ptr %7, align 1, !tbaa !9
  %593 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %594 = trunc i8 %593 to i1
  %595 = zext i1 %594 to i32
  %596 = icmp eq i32 %595, 1
  br i1 %596, label %597, label %600

597:                                              ; preds = %590
  %598 = load ptr, ptr @stderr, align 8, !tbaa !5
  %599 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %598, ptr noundef @.str.32) #5
  br label %600

600:                                              ; preds = %597, %590
  %601 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %602 = trunc i8 %601 to i1
  br i1 %602, label %603, label %618

603:                                              ; preds = %600
  %604 = load ptr, ptr %4, align 8, !tbaa !5
  %605 = load ptr, ptr %5, align 8, !tbaa !5
  %606 = getelementptr inbounds %struct._MatNd, ptr %605, i32 0, i32 0
  %607 = load ptr, ptr %606, align 8, !tbaa !21
  %608 = load ptr, ptr %4, align 8, !tbaa !5
  %609 = getelementptr inbounds %struct._RcsGraph, ptr %608, i32 0, i32 3
  %610 = load i32, ptr %609, align 4, !tbaa !19
  %611 = load ptr, ptr %4, align 8, !tbaa !5
  %612 = getelementptr inbounds %struct._RcsGraph, ptr %611, i32 0, i32 3
  %613 = load i32, ptr %612, align 4, !tbaa !19
  %614 = load double, ptr %8, align 8, !tbaa !11
  %615 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %616 = trunc i8 %615 to i1
  %617 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jacobian1D, ptr noundef @test_hessian1D, ptr noundef %604, ptr noundef %607, i32 noundef %610, i32 noundef %613, double noundef %614, i1 noundef zeroext %616)
  br label %618

618:                                              ; preds = %603, %600
  %619 = phi i1 [ false, %600 ], [ %617, %603 ]
  %620 = zext i1 %619 to i8
  store i8 %620, ptr %7, align 1, !tbaa !9
  %621 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %622 = trunc i8 %621 to i1
  %623 = zext i1 %622 to i32
  %624 = icmp eq i32 %623, 1
  br i1 %624, label %625, label %628

625:                                              ; preds = %618
  %626 = load ptr, ptr @stderr, align 8, !tbaa !5
  %627 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %626, ptr noundef @.str.33) #5
  br label %628

628:                                              ; preds = %625, %618
  %629 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %630 = trunc i8 %629 to i1
  br i1 %630, label %631, label %647

631:                                              ; preds = %628
  %632 = load ptr, ptr %4, align 8, !tbaa !5
  %633 = load ptr, ptr %5, align 8, !tbaa !5
  %634 = getelementptr inbounds %struct._MatNd, ptr %633, i32 0, i32 0
  %635 = load ptr, ptr %634, align 8, !tbaa !21
  %636 = load ptr, ptr %4, align 8, !tbaa !5
  %637 = getelementptr inbounds %struct._RcsGraph, ptr %636, i32 0, i32 3
  %638 = load i32, ptr %637, align 4, !tbaa !19
  %639 = load ptr, ptr %4, align 8, !tbaa !5
  %640 = getelementptr inbounds %struct._RcsGraph, ptr %639, i32 0, i32 3
  %641 = load i32, ptr %640, align 4, !tbaa !19
  %642 = mul i32 3, %641
  %643 = load double, ptr %8, align 8, !tbaa !11
  %644 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %645 = trunc i8 %644 to i1
  %646 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_omegaJacobian3D, ptr noundef @test_omegaHessian3D, ptr noundef %632, ptr noundef %635, i32 noundef %638, i32 noundef %642, double noundef %643, i1 noundef zeroext %645)
  br label %647

647:                                              ; preds = %631, %628
  %648 = phi i1 [ false, %628 ], [ %646, %631 ]
  %649 = zext i1 %648 to i8
  store i8 %649, ptr %7, align 1, !tbaa !9
  %650 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %651 = trunc i8 %650 to i1
  %652 = zext i1 %651 to i32
  %653 = icmp eq i32 %652, 1
  br i1 %653, label %654, label %657

654:                                              ; preds = %647
  %655 = load ptr, ptr @stderr, align 8, !tbaa !5
  %656 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %655, ptr noundef @.str.34) #5
  br label %657

657:                                              ; preds = %654, %647
  %658 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %659 = trunc i8 %658 to i1
  br i1 %659, label %660, label %672

660:                                              ; preds = %657
  %661 = load ptr, ptr %4, align 8, !tbaa !5
  %662 = load ptr, ptr %5, align 8, !tbaa !5
  %663 = getelementptr inbounds %struct._MatNd, ptr %662, i32 0, i32 0
  %664 = load ptr, ptr %663, align 8, !tbaa !21
  %665 = load ptr, ptr %4, align 8, !tbaa !5
  %666 = getelementptr inbounds %struct._RcsGraph, ptr %665, i32 0, i32 3
  %667 = load i32, ptr %666, align 4, !tbaa !19
  %668 = load double, ptr %8, align 8, !tbaa !11
  %669 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %670 = trunc i8 %669 to i1
  %671 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_EulerError, ptr noundef @test_EulerErrorJ, ptr noundef %661, ptr noundef %664, i32 noundef %667, i32 noundef 3, double noundef %668, i1 noundef zeroext %670)
  br label %672

672:                                              ; preds = %660, %657
  %673 = phi i1 [ false, %657 ], [ %671, %660 ]
  %674 = zext i1 %673 to i8
  store i8 %674, ptr %7, align 1, !tbaa !9
  %675 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %676 = trunc i8 %675 to i1
  %677 = zext i1 %676 to i32
  %678 = icmp eq i32 %677, 1
  br i1 %678, label %679, label %682

679:                                              ; preds = %672
  %680 = load ptr, ptr @stderr, align 8, !tbaa !5
  %681 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %680, ptr noundef @.str.35) #5
  br label %682

682:                                              ; preds = %679, %672
  %683 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %684 = trunc i8 %683 to i1
  br i1 %684, label %685, label %697

685:                                              ; preds = %682
  %686 = load ptr, ptr %4, align 8, !tbaa !5
  %687 = load ptr, ptr %5, align 8, !tbaa !5
  %688 = getelementptr inbounds %struct._MatNd, ptr %687, i32 0, i32 0
  %689 = load ptr, ptr %688, align 8, !tbaa !21
  %690 = load ptr, ptr %4, align 8, !tbaa !5
  %691 = getelementptr inbounds %struct._RcsGraph, ptr %690, i32 0, i32 3
  %692 = load i32, ptr %691, align 4, !tbaa !19
  %693 = load double, ptr %8, align 8, !tbaa !11
  %694 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %695 = trunc i8 %694 to i1
  %696 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_positionError, ptr noundef @test_positionErrorJ, ptr noundef %686, ptr noundef %689, i32 noundef %692, i32 noundef 3, double noundef %693, i1 noundef zeroext %695)
  br label %697

697:                                              ; preds = %685, %682
  %698 = phi i1 [ false, %682 ], [ %696, %685 ]
  %699 = zext i1 %698 to i8
  store i8 %699, ptr %7, align 1, !tbaa !9
  %700 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %701 = trunc i8 %700 to i1
  %702 = zext i1 %701 to i32
  %703 = icmp eq i32 %702, 1
  br i1 %703, label %704, label %707

704:                                              ; preds = %697
  %705 = load ptr, ptr @stderr, align 8, !tbaa !5
  %706 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %705, ptr noundef @.str.36) #5
  br label %707

707:                                              ; preds = %704, %697
  %708 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %709 = trunc i8 %708 to i1
  br i1 %709, label %710, label %722

710:                                              ; preds = %707
  %711 = load ptr, ptr %4, align 8, !tbaa !5
  %712 = load ptr, ptr %5, align 8, !tbaa !5
  %713 = getelementptr inbounds %struct._MatNd, ptr %712, i32 0, i32 0
  %714 = load ptr, ptr %713, align 8, !tbaa !21
  %715 = load ptr, ptr %4, align 8, !tbaa !5
  %716 = getelementptr inbounds %struct._RcsGraph, ptr %715, i32 0, i32 3
  %717 = load i32, ptr %716, align 4, !tbaa !19
  %718 = load double, ptr %8, align 8, !tbaa !11
  %719 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %720 = trunc i8 %719 to i1
  %721 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_distance, ptr noundef @test_distanceJ, ptr noundef %711, ptr noundef %714, i32 noundef %717, i32 noundef 1, double noundef %718, i1 noundef zeroext %720)
  br label %722

722:                                              ; preds = %710, %707
  %723 = phi i1 [ false, %707 ], [ %721, %710 ]
  %724 = zext i1 %723 to i8
  store i8 %724, ptr %7, align 1, !tbaa !9
  %725 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %726 = trunc i8 %725 to i1
  %727 = zext i1 %726 to i32
  %728 = icmp eq i32 %727, 1
  br i1 %728, label %729, label %732

729:                                              ; preds = %722
  %730 = load ptr, ptr @stderr, align 8, !tbaa !5
  %731 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %730, ptr noundef @.str.37) #5
  br label %732

732:                                              ; preds = %729, %722
  %733 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %734 = trunc i8 %733 to i1
  br i1 %734, label %735, label %750

735:                                              ; preds = %732
  %736 = load ptr, ptr %4, align 8, !tbaa !5
  %737 = load ptr, ptr %5, align 8, !tbaa !5
  %738 = getelementptr inbounds %struct._MatNd, ptr %737, i32 0, i32 0
  %739 = load ptr, ptr %738, align 8, !tbaa !21
  %740 = load ptr, ptr %4, align 8, !tbaa !5
  %741 = getelementptr inbounds %struct._RcsGraph, ptr %740, i32 0, i32 3
  %742 = load i32, ptr %741, align 4, !tbaa !19
  %743 = load ptr, ptr %4, align 8, !tbaa !5
  %744 = getelementptr inbounds %struct._RcsGraph, ptr %743, i32 0, i32 3
  %745 = load i32, ptr %744, align 4, !tbaa !19
  %746 = load double, ptr %8, align 8, !tbaa !11
  %747 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %748 = trunc i8 %747 to i1
  %749 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_distanceJ, ptr noundef @test_distanceH, ptr noundef %736, ptr noundef %739, i32 noundef %742, i32 noundef %745, double noundef %746, i1 noundef zeroext %748)
  br label %750

750:                                              ; preds = %735, %732
  %751 = phi i1 [ false, %732 ], [ %749, %735 ]
  %752 = zext i1 %751 to i8
  store i8 %752, ptr %7, align 1, !tbaa !9
  %753 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %754 = trunc i8 %753 to i1
  %755 = zext i1 %754 to i32
  %756 = icmp eq i32 %755, 1
  br i1 %756, label %757, label %760

757:                                              ; preds = %750
  %758 = load ptr, ptr @stderr, align 8, !tbaa !5
  %759 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %758, ptr noundef @.str.38) #5
  br label %760

760:                                              ; preds = %757, %750
  %761 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %762 = trunc i8 %761 to i1
  br i1 %762, label %763, label %775

763:                                              ; preds = %760
  %764 = load ptr, ptr %4, align 8, !tbaa !5
  %765 = load ptr, ptr %5, align 8, !tbaa !5
  %766 = getelementptr inbounds %struct._MatNd, ptr %765, i32 0, i32 0
  %767 = load ptr, ptr %766, align 8, !tbaa !21
  %768 = load ptr, ptr %4, align 8, !tbaa !5
  %769 = getelementptr inbounds %struct._RcsGraph, ptr %768, i32 0, i32 3
  %770 = load i32, ptr %769, align 4, !tbaa !19
  %771 = load double, ptr %8, align 8, !tbaa !11
  %772 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %773 = trunc i8 %772 to i1
  %774 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_effort, ptr noundef @test_effortJ, ptr noundef %764, ptr noundef %767, i32 noundef %770, i32 noundef 1, double noundef %771, i1 noundef zeroext %773)
  br label %775

775:                                              ; preds = %763, %760
  %776 = phi i1 [ false, %760 ], [ %774, %763 ]
  %777 = zext i1 %776 to i8
  store i8 %777, ptr %7, align 1, !tbaa !9
  %778 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %779 = trunc i8 %778 to i1
  %780 = zext i1 %779 to i32
  %781 = icmp eq i32 %780, 1
  br i1 %781, label %782, label %785

782:                                              ; preds = %775
  %783 = load ptr, ptr @stderr, align 8, !tbaa !5
  %784 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %783, ptr noundef @.str.39) #5
  br label %785

785:                                              ; preds = %782, %775
  %786 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %787 = trunc i8 %786 to i1
  br i1 %787, label %788, label %800

788:                                              ; preds = %785
  %789 = load ptr, ptr %4, align 8, !tbaa !5
  %790 = load ptr, ptr %5, align 8, !tbaa !5
  %791 = getelementptr inbounds %struct._MatNd, ptr %790, i32 0, i32 0
  %792 = load ptr, ptr %791, align 8, !tbaa !21
  %793 = load ptr, ptr %4, align 8, !tbaa !5
  %794 = getelementptr inbounds %struct._RcsGraph, ptr %793, i32 0, i32 3
  %795 = load i32, ptr %794, align 4, !tbaa !19
  %796 = load double, ptr %8, align 8, !tbaa !11
  %797 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %798 = trunc i8 %797 to i1
  %799 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_attitude3D, ptr noundef @test_dAttitude3D, ptr noundef %789, ptr noundef %792, i32 noundef %795, i32 noundef 1, double noundef %796, i1 noundef zeroext %798)
  br label %800

800:                                              ; preds = %788, %785
  %801 = phi i1 [ false, %785 ], [ %799, %788 ]
  %802 = zext i1 %801 to i8
  store i8 %802, ptr %7, align 1, !tbaa !9
  %803 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %804 = trunc i8 %803 to i1
  %805 = zext i1 %804 to i32
  %806 = icmp eq i32 %805, 1
  br i1 %806, label %807, label %810

807:                                              ; preds = %800
  %808 = load ptr, ptr @stderr, align 8, !tbaa !5
  %809 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %808, ptr noundef @.str.40) #5
  br label %810

810:                                              ; preds = %807, %800
  %811 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %812 = trunc i8 %811 to i1
  br i1 %812, label %813, label %829

813:                                              ; preds = %810
  %814 = load ptr, ptr %4, align 8, !tbaa !5
  %815 = load ptr, ptr %5, align 8, !tbaa !5
  %816 = getelementptr inbounds %struct._MatNd, ptr %815, i32 0, i32 0
  %817 = load ptr, ptr %816, align 8, !tbaa !21
  %818 = load ptr, ptr %4, align 8, !tbaa !5
  %819 = getelementptr inbounds %struct._RcsGraph, ptr %818, i32 0, i32 3
  %820 = load i32, ptr %819, align 4, !tbaa !19
  %821 = load ptr, ptr %4, align 8, !tbaa !5
  %822 = getelementptr inbounds %struct._RcsGraph, ptr %821, i32 0, i32 3
  %823 = load i32, ptr %822, align 4, !tbaa !19
  %824 = mul i32 3, %823
  %825 = load double, ptr %8, align 8, !tbaa !11
  %826 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %827 = trunc i8 %826 to i1
  %828 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jacobianPinv, ptr noundef @test_hessianPinv, ptr noundef %814, ptr noundef %817, i32 noundef %820, i32 noundef %824, double noundef %825, i1 noundef zeroext %827)
  br label %829

829:                                              ; preds = %813, %810
  %830 = phi i1 [ false, %810 ], [ %828, %813 ]
  %831 = zext i1 %830 to i8
  store i8 %831, ptr %7, align 1, !tbaa !9
  %832 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %833 = trunc i8 %832 to i1
  %834 = zext i1 %833 to i32
  %835 = icmp eq i32 %834, 1
  br i1 %835, label %836, label %839

836:                                              ; preds = %829
  %837 = load ptr, ptr @stderr, align 8, !tbaa !5
  %838 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %837, ptr noundef @.str.41) #5
  br label %839

839:                                              ; preds = %836, %829
  %840 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %841 = trunc i8 %840 to i1
  br i1 %841, label %842, label %858

842:                                              ; preds = %839
  %843 = load ptr, ptr %4, align 8, !tbaa !5
  %844 = load ptr, ptr %5, align 8, !tbaa !5
  %845 = getelementptr inbounds %struct._MatNd, ptr %844, i32 0, i32 0
  %846 = load ptr, ptr %845, align 8, !tbaa !21
  %847 = load ptr, ptr %4, align 8, !tbaa !5
  %848 = getelementptr inbounds %struct._RcsGraph, ptr %847, i32 0, i32 3
  %849 = load i32, ptr %848, align 4, !tbaa !19
  %850 = load ptr, ptr %4, align 8, !tbaa !5
  %851 = getelementptr inbounds %struct._RcsGraph, ptr %850, i32 0, i32 3
  %852 = load i32, ptr %851, align 4, !tbaa !19
  %853 = mul i32 3, %852
  %854 = load double, ptr %8, align 8, !tbaa !11
  %855 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %856 = trunc i8 %855 to i1
  %857 = call zeroext i1 @Rcs_testGradient(ptr noundef @test_jacobianPinv2, ptr noundef @test_hessianPinv2, ptr noundef %843, ptr noundef %846, i32 noundef %849, i32 noundef %853, double noundef %854, i1 noundef zeroext %856)
  br label %858

858:                                              ; preds = %842, %839
  %859 = phi i1 [ false, %839 ], [ %857, %842 ]
  %860 = zext i1 %859 to i8
  store i8 %860, ptr %7, align 1, !tbaa !9
  %861 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %862 = trunc i8 %861 to i1
  %863 = zext i1 %862 to i32
  %864 = icmp eq i32 %863, 1
  br i1 %864, label %865, label %892

865:                                              ; preds = %858
  %866 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %867 = trunc i8 %866 to i1
  %868 = zext i1 %867 to i32
  %869 = icmp eq i32 %868, 0
  br i1 %869, label %870, label %888

870:                                              ; preds = %865
  br label %871

871:                                              ; preds = %870
  %872 = load ptr, ptr @stderr, align 8, !tbaa !5
  %873 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %872, ptr noundef @.str.12, ptr noundef @.str.2, ptr noundef @__func__.Rcs_gradientTestGraph, i32 noundef 2764) #5
  %874 = load ptr, ptr @stderr, align 8, !tbaa !5
  %875 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %874, ptr noundef @.str.42) #5
  %876 = load ptr, ptr @stderr, align 8, !tbaa !5
  %877 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %876, ptr noundef @.str.7) #5
  %878 = load ptr, ptr @stderr, align 8, !tbaa !5
  %879 = call i32 @fflush(ptr noundef %878)
  br label %880

880:                                              ; preds = %871
  br label %881

881:                                              ; preds = %880
  br label %882

882:                                              ; preds = %881
  %883 = load ptr, ptr @stderr, align 8, !tbaa !5
  %884 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %883, ptr noundef @.str.43, ptr noundef @.str.2, ptr noundef @__func__.Rcs_gradientTestGraph, i32 noundef 2765) #5
  %885 = call i32 @getchar()
  br label %886

886:                                              ; preds = %882
  br label %887

887:                                              ; preds = %886
  br label %891

888:                                              ; preds = %865
  %889 = load ptr, ptr @stderr, align 8, !tbaa !5
  %890 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %889, ptr noundef @.str.44) #5
  br label %891

891:                                              ; preds = %888, %887
  br label %892

892:                                              ; preds = %891, %858
  %893 = load i8, ptr %7, align 1, !tbaa !9, !range !15, !noundef !16
  %894 = trunc i8 %893 to i1
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  ret i1 %894
}

; Function Attrs: nounwind uwtable
declare hidden void @Rcs_setRndBdy1(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @Rcs_setRndBdy2(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @Rcs_setRndBdy3(ptr noundef) #2

declare double @Math_getRandomNumber(double noundef, double noundef) #3

; Function Attrs: nounwind
declare i32 @rand() #1

declare i32 @fflush(ptr noundef) #3

declare double @RcsBody_distance(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare zeroext i1 @Rcs_testGradient(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, double noundef, i1 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden void @test_position3D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jacobian3D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_hessian3D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_manipulability(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_manipulabilityJ(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_A(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_dA(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimit_Full(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitJ_Full(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitH_Full(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimit_IK(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitJ_IK(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitH_IK(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @f_jlBorderFull(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @df_jlBorderFull(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @f_jlBorderIK(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @df_jlBorderIK(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_kinematics(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_kinematicsJ(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_kinematicsH(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_COG(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_COGJ(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_COGH(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_position1D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_jacobian1D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_hessian1D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_EulerError(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_EulerErrorJ(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_positionError(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_positionErrorJ(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_distance(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_distanceJ(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_distanceH(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_attitude3D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @test_dAttitude3D(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare i32 @getchar() #4

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 = { nounwind 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 #3 = { "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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !6, i64 72}
!18 = !{!"_RcsBody", !12, i64 0, !10, i64 8, !14, i64 12, !7, i64 16, !7, i64 40, !12, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!19 = !{!20, !14, i64 1852}
!20 = !{!"_RcsGraph", !6, i64 0, !7, i64 8, !14, i64 1848, !14, i64 1852, !6, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888}
!21 = !{!22, !6, i64 0}
!22 = !{!"_MatNd", !6, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !10, i64 20}
!23 = !{!20, !14, i64 1848}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [76 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@RCS_GRADIENTTESTS_BODYPT1 = external dso_local local_unnamed_addr global [3 x double], align 16
@RCS_GRADIENTTESTS_BODY1 = external hidden local_unnamed_addr global ptr, align 8
@RCS_GRADIENTTESTS_BODY2 = external hidden local_unnamed_addr global ptr, align 8
@RCS_GRADIENTTESTS_BODY3 = external hidden local_unnamed_addr global ptr, align 8
@RCS_GRADIENTTESTS_BODYPT2 = external dso_local local_unnamed_addr global [3 x double], align 16
@RCS_RNDXYZ = external hidden local_unnamed_addr global i32, align 4
@.str.12 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.Rcs_gradientTestGraph = external hidden unnamed_addr constant [22 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [119 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [31 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare dso_local void @test_jacobianPinv(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_hessianPinv(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_jacobianPinv2(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_hessianPinv2(ptr noundef, ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @test_rotMat(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_rotMatDerivative(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_jacobianRot(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_hessianRot(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_omegaJacobian3D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_omegaHessian3D(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @RcsBody_numDistanceShapes(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @test_effort(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @test_effortJ(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local zeroext i1 @Rcs_gradientTestGraph(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #1 {
  tail call void @Rcs_setRndBdy1(ptr noundef %0)
  tail call void @Rcs_setRndBdy2(ptr noundef %0)
  tail call void @Rcs_setRndBdy3(ptr noundef %0)
  %4 = tail call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01) #5
  store double %4, ptr @RCS_GRADIENTTESTS_BODYPT1, align 16, !tbaa !5
  %5 = tail call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01) #5
  store double %5, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT1, i64 8), align 8, !tbaa !5
  %6 = tail call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01) #5
  store double %6, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT1, i64 16), align 16, !tbaa !5
  %7 = tail call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01) #5
  store double %7, ptr @RCS_GRADIENTTESTS_BODYPT2, align 16, !tbaa !5
  %8 = tail call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01) #5
  store double %8, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT2, i64 8), align 8, !tbaa !5
  %9 = tail call double @Math_getRandomNumber(double noundef -1.000000e-01, double noundef 1.000000e-01) #5
  store double %9, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT2, i64 16), align 16, !tbaa !5
  %10 = tail call i32 @rand() #5
  %11 = sitofp i32 %10 to double
  %12 = fmul double %11, 0x3E00000000000000
  %13 = fmul double %12, 3.000000e+00
  %14 = fptosi double %13 to i32
  store i32 %14, ptr @RCS_RNDXYZ, align 4, !tbaa !9
  br i1 %2, label %15, label %24

15:                                               ; preds = %3
  %16 = load ptr, ptr @stderr, align 8, !tbaa !11
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.Rcs_gradientTestGraph, i32 noundef 2407) #6
  %18 = load ptr, ptr @stderr, align 8, !tbaa !11
  %19 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.13) #6
  %20 = load ptr, ptr @stderr, align 8, !tbaa !11
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str.7) #6
  %22 = load ptr, ptr @stderr, align 8, !tbaa !11
  %23 = tail call i32 @fflush(ptr noundef %22)
  br label %24

24:                                               ; preds = %15, %3
  %25 = tail call zeroext i1 @RcsGraph_setState(ptr noundef %0, ptr noundef %1, ptr noundef null) #5
  %26 = load i32, ptr @RcsLogLevel, align 4, !tbaa !9
  %27 = icmp sgt i32 %26, 4
  br i1 %27, label %28, label %65

28:                                               ; preds = %24
  %29 = load ptr, ptr @RCS_GRADIENTTESTS_BODY1, align 8, !tbaa !11
  %30 = tail call i32 @RcsBody_numDistanceShapes(ptr noundef %29) #5
  %.not = icmp eq i32 %30, 0
  br i1 %.not, label %38, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr @RCS_GRADIENTTESTS_BODY2, align 8, !tbaa !11
  %33 = tail call i32 @RcsBody_numDistanceShapes(ptr noundef %32) #5
  %.not225 = icmp eq i32 %33, 0
  br i1 %.not225, label %38, label %34

34:                                               ; preds = %31
  %35 = load ptr, ptr @RCS_GRADIENTTESTS_BODY1, align 8, !tbaa !11
  %36 = load ptr, ptr @RCS_GRADIENTTESTS_BODY2, align 8, !tbaa !11
  %37 = tail call double @RcsBody_distance(ptr noundef %35, ptr noundef %36, ptr noundef null, ptr noundef null, ptr noundef null) #5
  br label %38

38:                                               ; preds = %28, %31, %34
  %.0 = phi double [ %37, %34 ], [ 0.000000e+00, %31 ], [ 0.000000e+00, %28 ]
  %39 = load ptr, ptr @stderr, align 8, !tbaa !11
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.Rcs_gradientTestGraph, i32 noundef 2436) #6
  %41 = load ptr, ptr @stderr, align 8, !tbaa !11
  %42 = load ptr, ptr @RCS_GRADIENTTESTS_BODY1, align 8, !tbaa !11
  %43 = getelementptr inbounds i8, ptr %42, i64 72
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  %45 = load ptr, ptr @RCS_GRADIENTTESTS_BODY2, align 8, !tbaa !11
  %46 = getelementptr inbounds i8, ptr %45, i64 72
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = load ptr, ptr @RCS_GRADIENTTESTS_BODY3, align 8, !tbaa !11
  %49 = getelementptr inbounds i8, ptr %48, i64 72
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %0, i64 1852
  %52 = load i32, ptr %51, align 4, !tbaa !16
  %53 = load double, ptr @RCS_GRADIENTTESTS_BODYPT1, align 16, !tbaa !5
  %54 = load double, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT1, i64 8), align 8, !tbaa !5
  %55 = load double, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT1, i64 16), align 16, !tbaa !5
  %56 = load double, ptr @RCS_GRADIENTTESTS_BODYPT2, align 16, !tbaa !5
  %57 = load double, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT2, i64 8), align 8, !tbaa !5
  %58 = load double, ptr getelementptr inbounds (i8, ptr @RCS_GRADIENTTESTS_BODYPT2, i64 16), align 16, !tbaa !5
  %59 = load i32, ptr @RCS_RNDXYZ, align 4, !tbaa !9
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.14, ptr noundef %44, ptr noundef %47, ptr noundef %50, i32 noundef %52, double noundef %.0, double noundef %53, double noundef %54, double noundef %55, double noundef %56, double noundef %57, double noundef %58, i32 noundef %59) #6
  %61 = load ptr, ptr @stderr, align 8, !tbaa !11
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.7) #6
  %63 = load ptr, ptr @stderr, align 8, !tbaa !11
  %64 = tail call i32 @fflush(ptr noundef %63)
  br label %65

65:                                               ; preds = %38, %24
  br i1 %2, label %66, label %77

66:                                               ; preds = %65
  %67 = load ptr, ptr @stderr, align 8, !tbaa !11
  %68 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.15) #6
  %69 = load ptr, ptr %1, align 8, !tbaa !18
  %70 = getelementptr inbounds i8, ptr %0, i64 1852
  %71 = load i32, ptr %70, align 4, !tbaa !16
  %72 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_position3D, ptr noundef nonnull @test_jacobian3D, ptr noundef %0, ptr noundef %69, i32 noundef %71, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %73 = load ptr, ptr @stderr, align 8, !tbaa !11
  %74 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.16) #6
  br i1 %72, label %82, label %.thread226.thread

.thread226.thread:                                ; preds = %66
  %75 = load ptr, ptr @stderr, align 8, !tbaa !11
  %76 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str.17) #6
  br label %.thread230.thread

77:                                               ; preds = %65
  %78 = load ptr, ptr %1, align 8, !tbaa !18
  %79 = getelementptr inbounds i8, ptr %0, i64 1852
  %80 = load i32, ptr %79, align 4, !tbaa !16
  %81 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_position3D, ptr noundef nonnull @test_jacobian3D, ptr noundef %0, ptr noundef %78, i32 noundef %80, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %81, label %82, label %.thread378

82:                                               ; preds = %77, %66
  %83 = phi ptr [ %70, %66 ], [ %79, %77 ]
  %84 = load ptr, ptr %1, align 8, !tbaa !18
  %85 = load i32, ptr %83, align 4, !tbaa !16
  %86 = mul i32 %85, 3
  %87 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jacobian3D, ptr noundef nonnull @test_hessian3D, ptr noundef nonnull %0, ptr noundef %84, i32 noundef %85, i32 noundef %86, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %.thread226, label %90

.thread226:                                       ; preds = %82
  %88 = load ptr, ptr @stderr, align 8, !tbaa !11
  %89 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str.17) #6
  br i1 %87, label %.thread230, label %.thread230.thread

90:                                               ; preds = %82
  br i1 %87, label %98, label %.thread378

.thread230.thread:                                ; preds = %.thread226.thread, %.thread226
  %91 = load ptr, ptr @stderr, align 8, !tbaa !11
  %92 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %91, ptr noundef nonnull @.str.18) #6
  br label %.thread236.thread

.thread230:                                       ; preds = %.thread226
  %93 = load ptr, ptr %1, align 8, !tbaa !18
  %94 = load i32, ptr %83, align 4, !tbaa !16
  %95 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_manipulability, ptr noundef nonnull @test_manipulabilityJ, ptr noundef nonnull %0, ptr noundef %93, i32 noundef %94, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %96 = load ptr, ptr @stderr, align 8, !tbaa !11
  %97 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef nonnull @.str.18) #6
  br i1 %95, label %.thread236, label %.thread236.thread

98:                                               ; preds = %90
  %99 = load ptr, ptr %1, align 8, !tbaa !18
  %100 = load i32, ptr %83, align 4, !tbaa !16
  %101 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_manipulability, ptr noundef nonnull @test_manipulabilityJ, ptr noundef nonnull %0, ptr noundef %99, i32 noundef %100, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %101, label %109, label %.thread378

.thread236.thread:                                ; preds = %.thread230.thread, %.thread230
  %102 = load ptr, ptr @stderr, align 8, !tbaa !11
  %103 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %102, ptr noundef nonnull @.str.19) #6
  br label %.thread242.thread

.thread236:                                       ; preds = %.thread230
  %104 = load ptr, ptr %1, align 8, !tbaa !18
  %105 = load i32, ptr %83, align 4, !tbaa !16
  %106 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_rotMat, ptr noundef nonnull @test_rotMatDerivative, ptr noundef nonnull %0, ptr noundef %104, i32 noundef %105, i32 noundef 9, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %107 = load ptr, ptr @stderr, align 8, !tbaa !11
  %108 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.19) #6
  br i1 %106, label %.thread242, label %.thread242.thread

109:                                              ; preds = %98
  %110 = load ptr, ptr %1, align 8, !tbaa !18
  %111 = load i32, ptr %83, align 4, !tbaa !16
  %112 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_rotMat, ptr noundef nonnull @test_rotMatDerivative, ptr noundef nonnull %0, ptr noundef %110, i32 noundef %111, i32 noundef 9, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %112, label %120, label %.thread378

.thread242.thread:                                ; preds = %.thread236.thread, %.thread236
  %113 = load ptr, ptr @stderr, align 8, !tbaa !11
  %114 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %113, ptr noundef nonnull @.str.20) #6
  br label %.thread248.thread

.thread242:                                       ; preds = %.thread236
  %115 = load ptr, ptr %1, align 8, !tbaa !18
  %116 = load i32, ptr %83, align 4, !tbaa !16
  %117 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_A, ptr noundef nonnull @test_dA, ptr noundef nonnull %0, ptr noundef %115, i32 noundef %116, i32 noundef 9, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %118 = load ptr, ptr @stderr, align 8, !tbaa !11
  %119 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str.20) #6
  br i1 %117, label %.thread248, label %.thread248.thread

120:                                              ; preds = %109
  %121 = load ptr, ptr %1, align 8, !tbaa !18
  %122 = load i32, ptr %83, align 4, !tbaa !16
  %123 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_A, ptr noundef nonnull @test_dA, ptr noundef nonnull %0, ptr noundef %121, i32 noundef %122, i32 noundef 9, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %123, label %132, label %.thread378

.thread248.thread:                                ; preds = %.thread242.thread, %.thread242
  %124 = load ptr, ptr @stderr, align 8, !tbaa !11
  %125 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef nonnull @.str.21) #6
  br label %.thread254.thread

.thread248:                                       ; preds = %.thread242
  %126 = load ptr, ptr %1, align 8, !tbaa !18
  %127 = getelementptr inbounds i8, ptr %0, i64 1848
  %128 = load i32, ptr %127, align 8, !tbaa !20
  %129 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimit_Full, ptr noundef nonnull @test_jointLimitJ_Full, ptr noundef nonnull %0, ptr noundef %126, i32 noundef %128, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %130 = load ptr, ptr @stderr, align 8, !tbaa !11
  %131 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef nonnull @.str.21) #6
  br i1 %129, label %.thread254, label %.thread254.thread

132:                                              ; preds = %120
  %133 = load ptr, ptr %1, align 8, !tbaa !18
  %134 = getelementptr inbounds i8, ptr %0, i64 1848
  %135 = load i32, ptr %134, align 8, !tbaa !20
  %136 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimit_Full, ptr noundef nonnull @test_jointLimitJ_Full, ptr noundef nonnull %0, ptr noundef %133, i32 noundef %135, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %136, label %144, label %.thread378

.thread254.thread:                                ; preds = %.thread248.thread, %.thread248
  %137 = load ptr, ptr @stderr, align 8, !tbaa !11
  %138 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef nonnull @.str.22) #6
  br label %.thread260.thread

.thread254:                                       ; preds = %.thread248
  %139 = load ptr, ptr %1, align 8, !tbaa !18
  %140 = load i32, ptr %127, align 8, !tbaa !20
  %141 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimitJ_Full, ptr noundef nonnull @test_jointLimitH_Full, ptr noundef nonnull %0, ptr noundef %139, i32 noundef %140, i32 noundef %140, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %142 = load ptr, ptr @stderr, align 8, !tbaa !11
  %143 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef nonnull @.str.22) #6
  br i1 %141, label %.thread260, label %.thread260.thread

144:                                              ; preds = %132
  %145 = load ptr, ptr %1, align 8, !tbaa !18
  %146 = load i32, ptr %134, align 8, !tbaa !20
  %147 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimitJ_Full, ptr noundef nonnull @test_jointLimitH_Full, ptr noundef nonnull %0, ptr noundef %145, i32 noundef %146, i32 noundef %146, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %147, label %155, label %.thread378

.thread260.thread:                                ; preds = %.thread254.thread, %.thread254
  %148 = load ptr, ptr @stderr, align 8, !tbaa !11
  %149 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef nonnull @.str.23) #6
  br label %.thread266.thread

.thread260:                                       ; preds = %.thread254
  %150 = load ptr, ptr %1, align 8, !tbaa !18
  %151 = load i32, ptr %83, align 4, !tbaa !16
  %152 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimit_IK, ptr noundef nonnull @test_jointLimitJ_IK, ptr noundef nonnull %0, ptr noundef %150, i32 noundef %151, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %153 = load ptr, ptr @stderr, align 8, !tbaa !11
  %154 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef nonnull @.str.23) #6
  br i1 %152, label %.thread266, label %.thread266.thread

155:                                              ; preds = %144
  %156 = load ptr, ptr %1, align 8, !tbaa !18
  %157 = load i32, ptr %83, align 4, !tbaa !16
  %158 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimit_IK, ptr noundef nonnull @test_jointLimitJ_IK, ptr noundef nonnull %0, ptr noundef %156, i32 noundef %157, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %158, label %166, label %.thread378

.thread266.thread:                                ; preds = %.thread260.thread, %.thread260
  %159 = load ptr, ptr @stderr, align 8, !tbaa !11
  %160 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef nonnull @.str.24) #6
  br label %.thread272.thread

.thread266:                                       ; preds = %.thread260
  %161 = load ptr, ptr %1, align 8, !tbaa !18
  %162 = load i32, ptr %83, align 4, !tbaa !16
  %163 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimitJ_IK, ptr noundef nonnull @test_jointLimitH_IK, ptr noundef nonnull %0, ptr noundef %161, i32 noundef %162, i32 noundef %162, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %164 = load ptr, ptr @stderr, align 8, !tbaa !11
  %165 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef nonnull @.str.24) #6
  br i1 %163, label %.thread272, label %.thread272.thread

166:                                              ; preds = %155
  %167 = load ptr, ptr %1, align 8, !tbaa !18
  %168 = load i32, ptr %83, align 4, !tbaa !16
  %169 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jointLimitJ_IK, ptr noundef nonnull @test_jointLimitH_IK, ptr noundef nonnull %0, ptr noundef %167, i32 noundef %168, i32 noundef %168, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %169, label %177, label %.thread378

.thread272.thread:                                ; preds = %.thread266.thread, %.thread266
  %170 = load ptr, ptr @stderr, align 8, !tbaa !11
  %171 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef nonnull @.str.25) #6
  br label %.thread278.thread

.thread272:                                       ; preds = %.thread266
  %172 = load ptr, ptr %1, align 8, !tbaa !18
  %173 = load i32, ptr %127, align 8, !tbaa !20
  %174 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @f_jlBorderFull, ptr noundef nonnull @df_jlBorderFull, ptr noundef nonnull %0, ptr noundef %172, i32 noundef %173, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %175 = load ptr, ptr @stderr, align 8, !tbaa !11
  %176 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef nonnull @.str.25) #6
  br i1 %174, label %.thread278, label %.thread278.thread

177:                                              ; preds = %166
  %178 = load ptr, ptr %1, align 8, !tbaa !18
  %179 = load i32, ptr %134, align 8, !tbaa !20
  %180 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @f_jlBorderFull, ptr noundef nonnull @df_jlBorderFull, ptr noundef nonnull %0, ptr noundef %178, i32 noundef %179, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %180, label %188, label %.thread378

.thread278.thread:                                ; preds = %.thread272.thread, %.thread272
  %181 = load ptr, ptr @stderr, align 8, !tbaa !11
  %182 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef nonnull @.str.26) #6
  br label %.thread284.thread

.thread278:                                       ; preds = %.thread272
  %183 = load ptr, ptr %1, align 8, !tbaa !18
  %184 = load i32, ptr %83, align 4, !tbaa !16
  %185 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @f_jlBorderIK, ptr noundef nonnull @df_jlBorderIK, ptr noundef nonnull %0, ptr noundef %183, i32 noundef %184, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %186 = load ptr, ptr @stderr, align 8, !tbaa !11
  %187 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %186, ptr noundef nonnull @.str.26) #6
  br i1 %185, label %.thread284, label %.thread284.thread

188:                                              ; preds = %177
  %189 = load ptr, ptr %1, align 8, !tbaa !18
  %190 = load i32, ptr %83, align 4, !tbaa !16
  %191 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @f_jlBorderIK, ptr noundef nonnull @df_jlBorderIK, ptr noundef nonnull %0, ptr noundef %189, i32 noundef %190, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %191, label %199, label %.thread378

.thread284.thread:                                ; preds = %.thread278.thread, %.thread278
  %192 = load ptr, ptr @stderr, align 8, !tbaa !11
  %193 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %192, ptr noundef nonnull @.str.27) #6
  br label %.thread290.thread

.thread284:                                       ; preds = %.thread278
  %194 = load ptr, ptr %1, align 8, !tbaa !18
  %195 = load i32, ptr %83, align 4, !tbaa !16
  %196 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_kinematics, ptr noundef nonnull @test_kinematicsJ, ptr noundef nonnull %0, ptr noundef %194, i32 noundef %195, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %197 = load ptr, ptr @stderr, align 8, !tbaa !11
  %198 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %197, ptr noundef nonnull @.str.27) #6
  br i1 %196, label %203, label %.thread290.thread

199:                                              ; preds = %188
  %200 = load ptr, ptr %1, align 8, !tbaa !18
  %201 = load i32, ptr %83, align 4, !tbaa !16
  %202 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_kinematics, ptr noundef nonnull @test_kinematicsJ, ptr noundef nonnull %0, ptr noundef %200, i32 noundef %201, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %202, label %203, label %.thread378

203:                                              ; preds = %199, %.thread284
  %204 = load ptr, ptr %1, align 8, !tbaa !18
  %205 = load i32, ptr %83, align 4, !tbaa !16
  %206 = mul i32 %205, 3
  %207 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_kinematicsJ, ptr noundef nonnull @test_kinematicsH, ptr noundef nonnull %0, ptr noundef %204, i32 noundef %205, i32 noundef %206, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %.thread290, label %212

.thread290.thread:                                ; preds = %.thread284.thread, %.thread284
  %208 = load ptr, ptr @stderr, align 8, !tbaa !11
  %209 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %208, ptr noundef nonnull @.str.28) #6
  br label %.thread295.thread

.thread290:                                       ; preds = %203
  %210 = load ptr, ptr @stderr, align 8, !tbaa !11
  %211 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %210, ptr noundef nonnull @.str.28) #6
  br i1 %207, label %213, label %.thread295.thread

212:                                              ; preds = %203
  br i1 %207, label %213, label %.thread378

213:                                              ; preds = %212, %.thread290
  %214 = load ptr, ptr %1, align 8, !tbaa !18
  %215 = load i32, ptr %83, align 4, !tbaa !16
  %216 = mul i32 %215, 3
  %217 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jacobianRot, ptr noundef nonnull @test_hessianRot, ptr noundef nonnull %0, ptr noundef %214, i32 noundef %215, i32 noundef %216, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %.thread295, label %222

.thread295.thread:                                ; preds = %.thread290.thread, %.thread290
  %218 = load ptr, ptr @stderr, align 8, !tbaa !11
  %219 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %218, ptr noundef nonnull @.str.29) #6
  br label %.thread300.thread

.thread295:                                       ; preds = %213
  %220 = load ptr, ptr @stderr, align 8, !tbaa !11
  %221 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %220, ptr noundef nonnull @.str.29) #6
  br i1 %217, label %.thread300, label %.thread300.thread

222:                                              ; preds = %213
  br i1 %217, label %230, label %.thread378

.thread300.thread:                                ; preds = %.thread295.thread, %.thread295
  %223 = load ptr, ptr @stderr, align 8, !tbaa !11
  %224 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %223, ptr noundef nonnull @.str.30) #6
  br label %.thread306.thread

.thread300:                                       ; preds = %.thread295
  %225 = load ptr, ptr %1, align 8, !tbaa !18
  %226 = load i32, ptr %83, align 4, !tbaa !16
  %227 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_COG, ptr noundef nonnull @test_COGJ, ptr noundef nonnull %0, ptr noundef %225, i32 noundef %226, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %228 = load ptr, ptr @stderr, align 8, !tbaa !11
  %229 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %228, ptr noundef nonnull @.str.30) #6
  br i1 %227, label %234, label %.thread306.thread

230:                                              ; preds = %222
  %231 = load ptr, ptr %1, align 8, !tbaa !18
  %232 = load i32, ptr %83, align 4, !tbaa !16
  %233 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_COG, ptr noundef nonnull @test_COGJ, ptr noundef nonnull %0, ptr noundef %231, i32 noundef %232, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %233, label %234, label %.thread378

234:                                              ; preds = %230, %.thread300
  %235 = load ptr, ptr %1, align 8, !tbaa !18
  %236 = load i32, ptr %83, align 4, !tbaa !16
  %237 = mul i32 %236, 3
  %238 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_COGJ, ptr noundef nonnull @test_COGH, ptr noundef nonnull %0, ptr noundef %235, i32 noundef %236, i32 noundef %237, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %.thread306, label %243

.thread306.thread:                                ; preds = %.thread300.thread, %.thread300
  %239 = load ptr, ptr @stderr, align 8, !tbaa !11
  %240 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %239, ptr noundef nonnull @.str.15) #6
  br label %.thread311.thread

.thread306:                                       ; preds = %234
  %241 = load ptr, ptr @stderr, align 8, !tbaa !11
  %242 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %241, ptr noundef nonnull @.str.15) #6
  br i1 %238, label %.thread311, label %.thread311.thread

243:                                              ; preds = %234
  br i1 %238, label %251, label %.thread378

.thread311.thread:                                ; preds = %.thread306.thread, %.thread306
  %244 = load ptr, ptr @stderr, align 8, !tbaa !11
  %245 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %244, ptr noundef nonnull @.str.16) #6
  br label %.thread317.thread

.thread311:                                       ; preds = %.thread306
  %246 = load ptr, ptr %1, align 8, !tbaa !18
  %247 = load i32, ptr %83, align 4, !tbaa !16
  %248 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_position3D, ptr noundef nonnull @test_jacobian3D, ptr noundef nonnull %0, ptr noundef %246, i32 noundef %247, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %249 = load ptr, ptr @stderr, align 8, !tbaa !11
  %250 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %249, ptr noundef nonnull @.str.16) #6
  br i1 %248, label %255, label %.thread317.thread

251:                                              ; preds = %243
  %252 = load ptr, ptr %1, align 8, !tbaa !18
  %253 = load i32, ptr %83, align 4, !tbaa !16
  %254 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_position3D, ptr noundef nonnull @test_jacobian3D, ptr noundef nonnull %0, ptr noundef %252, i32 noundef %253, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %254, label %255, label %.thread378

255:                                              ; preds = %251, %.thread311
  %256 = load ptr, ptr %1, align 8, !tbaa !18
  %257 = load i32, ptr %83, align 4, !tbaa !16
  %258 = mul i32 %257, 3
  %259 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jacobian3D, ptr noundef nonnull @test_hessian3D, ptr noundef nonnull %0, ptr noundef %256, i32 noundef %257, i32 noundef %258, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %.thread317, label %264

.thread317.thread:                                ; preds = %.thread311.thread, %.thread311
  %260 = load ptr, ptr @stderr, align 8, !tbaa !11
  %261 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %260, ptr noundef nonnull @.str.31) #6
  br label %.thread322.thread

.thread317:                                       ; preds = %255
  %262 = load ptr, ptr @stderr, align 8, !tbaa !11
  %263 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %262, ptr noundef nonnull @.str.31) #6
  br i1 %259, label %.thread322, label %.thread322.thread

264:                                              ; preds = %255
  br i1 %259, label %272, label %.thread378

.thread322.thread:                                ; preds = %.thread317.thread, %.thread317
  %265 = load ptr, ptr @stderr, align 8, !tbaa !11
  %266 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %265, ptr noundef nonnull @.str.32) #6
  br label %.thread328.thread

.thread322:                                       ; preds = %.thread317
  %267 = load ptr, ptr %1, align 8, !tbaa !18
  %268 = load i32, ptr %83, align 4, !tbaa !16
  %269 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_position1D, ptr noundef nonnull @test_jacobian1D, ptr noundef nonnull %0, ptr noundef %267, i32 noundef %268, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %270 = load ptr, ptr @stderr, align 8, !tbaa !11
  %271 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %270, ptr noundef nonnull @.str.32) #6
  br i1 %269, label %.thread328, label %.thread328.thread

272:                                              ; preds = %264
  %273 = load ptr, ptr %1, align 8, !tbaa !18
  %274 = load i32, ptr %83, align 4, !tbaa !16
  %275 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_position1D, ptr noundef nonnull @test_jacobian1D, ptr noundef nonnull %0, ptr noundef %273, i32 noundef %274, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %275, label %283, label %.thread378

.thread328.thread:                                ; preds = %.thread322.thread, %.thread322
  %276 = load ptr, ptr @stderr, align 8, !tbaa !11
  %277 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %276, ptr noundef nonnull @.str.33) #6
  br label %.thread334.thread

.thread328:                                       ; preds = %.thread322
  %278 = load ptr, ptr %1, align 8, !tbaa !18
  %279 = load i32, ptr %83, align 4, !tbaa !16
  %280 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jacobian1D, ptr noundef nonnull @test_hessian1D, ptr noundef nonnull %0, ptr noundef %278, i32 noundef %279, i32 noundef %279, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %281 = load ptr, ptr @stderr, align 8, !tbaa !11
  %282 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %281, ptr noundef nonnull @.str.33) #6
  br i1 %280, label %287, label %.thread334.thread

283:                                              ; preds = %272
  %284 = load ptr, ptr %1, align 8, !tbaa !18
  %285 = load i32, ptr %83, align 4, !tbaa !16
  %286 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jacobian1D, ptr noundef nonnull @test_hessian1D, ptr noundef nonnull %0, ptr noundef %284, i32 noundef %285, i32 noundef %285, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %286, label %287, label %.thread378

287:                                              ; preds = %283, %.thread328
  %288 = load ptr, ptr %1, align 8, !tbaa !18
  %289 = load i32, ptr %83, align 4, !tbaa !16
  %290 = mul i32 %289, 3
  %291 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_omegaJacobian3D, ptr noundef nonnull @test_omegaHessian3D, ptr noundef nonnull %0, ptr noundef %288, i32 noundef %289, i32 noundef %290, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %.thread334, label %296

.thread334.thread:                                ; preds = %.thread328.thread, %.thread328
  %292 = load ptr, ptr @stderr, align 8, !tbaa !11
  %293 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %292, ptr noundef nonnull @.str.34) #6
  br label %.thread339.thread

.thread334:                                       ; preds = %287
  %294 = load ptr, ptr @stderr, align 8, !tbaa !11
  %295 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %294, ptr noundef nonnull @.str.34) #6
  br i1 %291, label %.thread339, label %.thread339.thread

296:                                              ; preds = %287
  br i1 %291, label %304, label %.thread378

.thread339.thread:                                ; preds = %.thread334.thread, %.thread334
  %297 = load ptr, ptr @stderr, align 8, !tbaa !11
  %298 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %297, ptr noundef nonnull @.str.35) #6
  br label %.thread345.thread

.thread339:                                       ; preds = %.thread334
  %299 = load ptr, ptr %1, align 8, !tbaa !18
  %300 = load i32, ptr %83, align 4, !tbaa !16
  %301 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_EulerError, ptr noundef nonnull @test_EulerErrorJ, ptr noundef nonnull %0, ptr noundef %299, i32 noundef %300, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %302 = load ptr, ptr @stderr, align 8, !tbaa !11
  %303 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %302, ptr noundef nonnull @.str.35) #6
  br i1 %301, label %.thread345, label %.thread345.thread

304:                                              ; preds = %296
  %305 = load ptr, ptr %1, align 8, !tbaa !18
  %306 = load i32, ptr %83, align 4, !tbaa !16
  %307 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_EulerError, ptr noundef nonnull @test_EulerErrorJ, ptr noundef nonnull %0, ptr noundef %305, i32 noundef %306, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %307, label %315, label %.thread378

.thread345.thread:                                ; preds = %.thread339.thread, %.thread339
  %308 = load ptr, ptr @stderr, align 8, !tbaa !11
  %309 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %308, ptr noundef nonnull @.str.36) #6
  br label %.thread351.thread

.thread345:                                       ; preds = %.thread339
  %310 = load ptr, ptr %1, align 8, !tbaa !18
  %311 = load i32, ptr %83, align 4, !tbaa !16
  %312 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_positionError, ptr noundef nonnull @test_positionErrorJ, ptr noundef nonnull %0, ptr noundef %310, i32 noundef %311, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %313 = load ptr, ptr @stderr, align 8, !tbaa !11
  %314 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %313, ptr noundef nonnull @.str.36) #6
  br i1 %312, label %.thread351, label %.thread351.thread

315:                                              ; preds = %304
  %316 = load ptr, ptr %1, align 8, !tbaa !18
  %317 = load i32, ptr %83, align 4, !tbaa !16
  %318 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_positionError, ptr noundef nonnull @test_positionErrorJ, ptr noundef nonnull %0, ptr noundef %316, i32 noundef %317, i32 noundef 3, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %318, label %326, label %.thread378

.thread351.thread:                                ; preds = %.thread345.thread, %.thread345
  %319 = load ptr, ptr @stderr, align 8, !tbaa !11
  %320 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %319, ptr noundef nonnull @.str.37) #6
  br label %.thread357.thread

.thread351:                                       ; preds = %.thread345
  %321 = load ptr, ptr %1, align 8, !tbaa !18
  %322 = load i32, ptr %83, align 4, !tbaa !16
  %323 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_distance, ptr noundef nonnull @test_distanceJ, ptr noundef nonnull %0, ptr noundef %321, i32 noundef %322, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %324 = load ptr, ptr @stderr, align 8, !tbaa !11
  %325 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %324, ptr noundef nonnull @.str.37) #6
  br i1 %323, label %.thread357, label %.thread357.thread

326:                                              ; preds = %315
  %327 = load ptr, ptr %1, align 8, !tbaa !18
  %328 = load i32, ptr %83, align 4, !tbaa !16
  %329 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_distance, ptr noundef nonnull @test_distanceJ, ptr noundef nonnull %0, ptr noundef %327, i32 noundef %328, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %329, label %337, label %.thread378

.thread357.thread:                                ; preds = %.thread351.thread, %.thread351
  %330 = load ptr, ptr @stderr, align 8, !tbaa !11
  %331 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %330, ptr noundef nonnull @.str.38) #6
  br label %.thread363.thread

.thread357:                                       ; preds = %.thread351
  %332 = load ptr, ptr %1, align 8, !tbaa !18
  %333 = load i32, ptr %83, align 4, !tbaa !16
  %334 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_distanceJ, ptr noundef nonnull @test_distanceH, ptr noundef nonnull %0, ptr noundef %332, i32 noundef %333, i32 noundef %333, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %335 = load ptr, ptr @stderr, align 8, !tbaa !11
  %336 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %335, ptr noundef nonnull @.str.38) #6
  br i1 %334, label %.thread363, label %.thread363.thread

337:                                              ; preds = %326
  %338 = load ptr, ptr %1, align 8, !tbaa !18
  %339 = load i32, ptr %83, align 4, !tbaa !16
  %340 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_distanceJ, ptr noundef nonnull @test_distanceH, ptr noundef nonnull %0, ptr noundef %338, i32 noundef %339, i32 noundef %339, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %340, label %348, label %.thread378

.thread363.thread:                                ; preds = %.thread357.thread, %.thread357
  %341 = load ptr, ptr @stderr, align 8, !tbaa !11
  %342 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %341, ptr noundef nonnull @.str.39) #6
  br label %.thread369.thread

.thread363:                                       ; preds = %.thread357
  %343 = load ptr, ptr %1, align 8, !tbaa !18
  %344 = load i32, ptr %83, align 4, !tbaa !16
  %345 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_effort, ptr noundef nonnull @test_effortJ, ptr noundef nonnull %0, ptr noundef %343, i32 noundef %344, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %346 = load ptr, ptr @stderr, align 8, !tbaa !11
  %347 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %346, ptr noundef nonnull @.str.39) #6
  br i1 %345, label %.thread369, label %.thread369.thread

348:                                              ; preds = %337
  %349 = load ptr, ptr %1, align 8, !tbaa !18
  %350 = load i32, ptr %83, align 4, !tbaa !16
  %351 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_effort, ptr noundef nonnull @test_effortJ, ptr noundef nonnull %0, ptr noundef %349, i32 noundef %350, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %351, label %359, label %.thread378

.thread369.thread:                                ; preds = %.thread363.thread, %.thread363
  %352 = load ptr, ptr @stderr, align 8, !tbaa !11
  %353 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %352, ptr noundef nonnull @.str.40) #6
  br label %.thread375.thread

.thread369:                                       ; preds = %.thread363
  %354 = load ptr, ptr %1, align 8, !tbaa !18
  %355 = load i32, ptr %83, align 4, !tbaa !16
  %356 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_attitude3D, ptr noundef nonnull @test_dAttitude3D, ptr noundef nonnull %0, ptr noundef %354, i32 noundef %355, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext true) #5
  %357 = load ptr, ptr @stderr, align 8, !tbaa !11
  %358 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %357, ptr noundef nonnull @.str.40) #6
  br i1 %356, label %363, label %.thread375.thread

359:                                              ; preds = %348
  %360 = load ptr, ptr %1, align 8, !tbaa !18
  %361 = load i32, ptr %83, align 4, !tbaa !16
  %362 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_attitude3D, ptr noundef nonnull @test_dAttitude3D, ptr noundef nonnull %0, ptr noundef %360, i32 noundef %361, i32 noundef 1, double noundef 5.000000e-02, i1 noundef zeroext false) #5
  br i1 %362, label %363, label %.thread378

363:                                              ; preds = %359, %.thread369
  %364 = load ptr, ptr %1, align 8, !tbaa !18
  %365 = load i32, ptr %83, align 4, !tbaa !16
  %366 = mul i32 %365, 3
  %367 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jacobianPinv, ptr noundef nonnull @test_hessianPinv, ptr noundef nonnull %0, ptr noundef %364, i32 noundef %365, i32 noundef %366, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %.thread375, label %372

.thread375.thread:                                ; preds = %.thread369.thread, %.thread369
  %368 = load ptr, ptr @stderr, align 8, !tbaa !11
  %369 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %368, ptr noundef nonnull @.str.41) #6
  br label %.thread380

.thread375:                                       ; preds = %363
  %370 = load ptr, ptr @stderr, align 8, !tbaa !11
  %371 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %370, ptr noundef nonnull @.str.41) #6
  br i1 %367, label %373, label %.thread380

372:                                              ; preds = %363
  br i1 %367, label %373, label %.thread378

373:                                              ; preds = %372, %.thread375
  %374 = load ptr, ptr %1, align 8, !tbaa !18
  %375 = load i32, ptr %83, align 4, !tbaa !16
  %376 = mul i32 %375, 3
  %377 = tail call zeroext i1 @Rcs_testGradient(ptr noundef nonnull @test_jacobianPinv2, ptr noundef nonnull @test_hessianPinv2, ptr noundef nonnull %0, ptr noundef %374, i32 noundef %375, i32 noundef %376, double noundef 5.000000e-02, i1 noundef zeroext %2) #5
  br i1 %2, label %378, label %.thread378

378:                                              ; preds = %373
  br i1 %377, label %390, label %.thread380

.thread380:                                       ; preds = %.thread375.thread, %.thread375, %378
  %379 = load ptr, ptr @stderr, align 8, !tbaa !11
  %380 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %379, ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.Rcs_gradientTestGraph, i32 noundef 2764) #6
  %381 = load ptr, ptr @stderr, align 8, !tbaa !11
  %382 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %381, ptr noundef nonnull @.str.42) #6
  %383 = load ptr, ptr @stderr, align 8, !tbaa !11
  %384 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %383, ptr noundef nonnull @.str.7) #6
  %385 = load ptr, ptr @stderr, align 8, !tbaa !11
  %386 = tail call i32 @fflush(ptr noundef %385)
  %387 = load ptr, ptr @stderr, align 8, !tbaa !11
  %388 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %387, ptr noundef nonnull @.str.43, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.Rcs_gradientTestGraph, i32 noundef 2765) #6
  %389 = tail call i32 @getchar()
  br label %.thread378

390:                                              ; preds = %378
  %391 = load ptr, ptr @stderr, align 8, !tbaa !11
  %392 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %391, ptr noundef nonnull @.str.44) #6
  br label %.thread378

.thread378:                                       ; preds = %359, %337, %315, %296, %272, %251, %230, %212, %188, %166, %144, %120, %98, %77, %90, %109, %132, %155, %177, %199, %222, %243, %264, %283, %304, %326, %348, %372, %.thread380, %390, %373
  %393 = phi i1 [ false, %.thread380 ], [ true, %390 ], [ %377, %373 ], [ false, %372 ], [ false, %348 ], [ false, %326 ], [ false, %304 ], [ false, %283 ], [ false, %264 ], [ false, %243 ], [ false, %222 ], [ false, %199 ], [ false, %177 ], [ false, %155 ], [ false, %132 ], [ false, %109 ], [ false, %90 ], [ false, %77 ], [ false, %98 ], [ false, %120 ], [ false, %144 ], [ false, %166 ], [ false, %188 ], [ false, %212 ], [ false, %230 ], [ false, %251 ], [ false, %272 ], [ false, %296 ], [ false, %315 ], [ false, %337 ], [ false, %359 ]
  ret i1 %393
}

; Function Attrs: nounwind uwtable
declare hidden void @Rcs_setRndBdy1(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @Rcs_setRndBdy2(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @Rcs_setRndBdy3(ptr noundef) local_unnamed_addr #1

declare double @Math_getRandomNumber(double noundef, double noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #3

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @test_position3D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jacobian3D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_hessian3D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_manipulability(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_manipulabilityJ(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_A(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_dA(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimit_Full(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitJ_Full(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitH_Full(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimit_IK(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitJ_IK(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jointLimitH_IK(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @f_jlBorderFull(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @df_jlBorderFull(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @f_jlBorderIK(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @df_jlBorderIK(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_kinematics(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_kinematicsJ(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_kinematicsH(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_COG(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_COGJ(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_COGH(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_position1D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_jacobian1D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_hessian1D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_EulerError(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_EulerErrorJ(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_positionError(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_positionErrorJ(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_distance(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_distanceJ(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_distanceH(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_attitude3D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @test_dAttitude3D(ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint nofree nounwind uwtable
declare noundef i32 @getchar() local_unnamed_addr #4

attributes #0 = { 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 #1 = { nounwind 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 #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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !12, i64 72}
!14 = !{!"_RcsBody", !6, i64 0, !15, i64 8, !10, i64 12, !7, i64 16, !7, i64 40, !6, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!17, !10, i64 1852}
!17 = !{!"_RcsGraph", !12, i64 0, !7, i64 8, !10, i64 1848, !10, i64 1852, !12, i64 1856, !12, i64 1864, !12, i64 1872, !12, i64 1880, !12, i64 1888}
!18 = !{!19, !12, i64 0}
!19 = !{!"_MatNd", !12, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !15, i64 20}
!20 = !{!17, !10, i64 1848}


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