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

; 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._MatNd = type { ptr, i32, i32, i32, i8 }
%struct.HTr = type { [3 x double], [3 x [3 x double]] }
%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 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@RcsLogLevel = external global i32, align 4
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.RcsGraph_pointFrustrumGradient = external hidden unnamed_addr constant [31 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [33 x i8], align 1

declare void @Vec3d_copy(ptr noundef, ptr noundef) #0

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) #0

declare void @MatNd_mul(ptr noundef, ptr noundef, ptr noundef) #0

declare void @MatNd_destroy(ptr noundef) #0

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

declare void @Vec3d_sub(ptr noundef, ptr noundef, ptr noundef) #0

declare void @MatNd_columnCrossProductSelf(ptr noundef, ptr noundef) #0

declare void @MatNd_rotateSelf(ptr noundef, ptr noundef) #0

declare void @MatNd_fromPtr(ptr dead_on_unwind writable sret(%struct._MatNd) align 8, i32 noundef, i32 noundef, ptr noundef) #0

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

declare void @print_trace() #0

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

declare void @MatNd_constMulSelf(ptr noundef, double noundef) #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #7

declare void @HTr_invTransform(ptr noundef, ptr noundef, ptr noundef) #0

declare void @Vec3d_invTransform(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare double @atan(double noundef) #4

declare i32 @fflush(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @RcsGraph_pointFrustrumGradient(ptr noundef %0, ptr noundef %1, ptr noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6, ptr noundef %7, ptr noundef %8) #2 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca [3 x double], align 16
  %20 = alloca ptr, align 8
  %21 = alloca %struct.HTr, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca [3 x double], align 16
  %26 = alloca [3 x double], align 16
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca i32, align 4
  %36 = alloca ptr, align 8
  %37 = alloca i32, align 4
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca [3 x double], align 16
  %41 = alloca [3 x double], align 16
  %42 = alloca ptr, align 8
  %43 = alloca [3 x double], align 16
  %44 = alloca i32, align 4
  %45 = alloca %struct._MatNd, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !5
  store double %3, ptr %13, align 8, !tbaa !9
  store double %4, ptr %14, align 8, !tbaa !9
  store double %5, ptr %15, align 8, !tbaa !9
  store double %6, ptr %16, align 8, !tbaa !9
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %9
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %52, label %49

49:                                               ; preds = %46
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @__func__.RcsGraph_pointFrustrumGradient, i32 noundef 1878, ptr noundef @.str.12) #8
  call void @print_trace()
  call void @abort() #9
  unreachable

52:                                               ; preds = %46
  br label %53

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  store ptr null, ptr %20, align 8, !tbaa !5
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._RcsBody, ptr %54, i32 0, i32 6
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = call i32 @strncmp(ptr noundef %56, ptr noundef @.str.13, i64 noundef 11) #10
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %63

59:                                               ; preds = %53
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._RcsBody, ptr %60, i32 0, i32 19
  %62 = load ptr, ptr %61, align 8, !tbaa !15
  store ptr %62, ptr %20, align 8, !tbaa !5
  br label %65

63:                                               ; preds = %53
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %64, ptr %20, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %63, %59
  %66 = load ptr, ptr %20, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %77

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 96, ptr %21) #8
  %69 = load ptr, ptr %20, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._RcsBody, ptr %69, i32 0, i32 10
  %71 = load ptr, ptr %70, align 8, !tbaa !16
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._RcsBody, ptr %72, i32 0, i32 10
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  call void @HTr_invTransform(ptr noundef %21, ptr noundef %71, ptr noundef %74)
  %75 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %76 = load ptr, ptr %17, align 8, !tbaa !5
  call void @Vec3d_invTransform(ptr noundef %75, ptr noundef %21, ptr noundef %76)
  call void @llvm.lifetime.end.p0(i64 96, ptr %21) #8
  br label %83

77:                                               ; preds = %65
  %78 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._RcsBody, ptr %79, i32 0, i32 10
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  call void @Vec3d_invTransform(ptr noundef %78, ptr noundef %81, ptr noundef %82)
  br label %83

83:                                               ; preds = %77, %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %84 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %87 = load double, ptr %86, align 16, !tbaa !9
  %88 = fdiv double %85, %87
  %89 = call double @atan(double noundef %88) #8
  %90 = load double, ptr %14, align 8, !tbaa !9
  %91 = load double, ptr %16, align 8, !tbaa !9
  %92 = fneg double %90
  %93 = call double @llvm.fmuladd.f64(double %92, double %91, double %89)
  store double %93, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store double 0.000000e+00, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store double 0.000000e+00, ptr %24, align 8, !tbaa !9
  %94 = load double, ptr %22, align 8, !tbaa !9
  %95 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %96 = load double, ptr %95, align 8, !tbaa !9
  %97 = fmul double %94, %96
  %98 = fcmp oge double %97, 0.000000e+00
  br i1 %98, label %99, label %102

99:                                               ; preds = %83
  %100 = load double, ptr %22, align 8, !tbaa !9
  %101 = fmul double 2.000000e+00, %100
  store double %101, ptr %24, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %99, %83
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %103 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %104 = load double, ptr %103, align 16, !tbaa !9
  %105 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %106 = load double, ptr %105, align 16, !tbaa !9
  %107 = fmul double %104, %106
  store double %107, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %108 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %109 = load double, ptr %108, align 8, !tbaa !9
  %110 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %111 = load double, ptr %110, align 8, !tbaa !9
  %112 = fmul double %109, %111
  store double %112, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %113 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 2
  %114 = load double, ptr %113, align 16, !tbaa !9
  %115 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 2
  %116 = load double, ptr %115, align 16, !tbaa !9
  %117 = fmul double %114, %116
  store double %117, ptr %29, align 8, !tbaa !9
  %118 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 2
  %119 = load double, ptr %118, align 16, !tbaa !9
  %120 = fneg double %119
  %121 = load double, ptr %27, align 8, !tbaa !9
  %122 = load double, ptr %29, align 8, !tbaa !9
  %123 = fadd double %121, %122
  %124 = fdiv double %120, %123
  %125 = getelementptr inbounds [3 x double], ptr %25, i64 0, i64 0
  store double %124, ptr %125, align 16, !tbaa !9
  %126 = getelementptr inbounds [3 x double], ptr %25, i64 0, i64 1
  store double 0.000000e+00, ptr %126, align 8, !tbaa !9
  %127 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %128 = load double, ptr %127, align 16, !tbaa !9
  %129 = load double, ptr %27, align 8, !tbaa !9
  %130 = load double, ptr %29, align 8, !tbaa !9
  %131 = fadd double %129, %130
  %132 = fdiv double %128, %131
  %133 = getelementptr inbounds [3 x double], ptr %25, i64 0, i64 2
  store double %132, ptr %133, align 16, !tbaa !9
  %134 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 1
  %135 = load double, ptr %134, align 8, !tbaa !9
  %136 = fneg double %135
  %137 = load double, ptr %27, align 8, !tbaa !9
  %138 = load double, ptr %28, align 8, !tbaa !9
  %139 = fadd double %137, %138
  %140 = fdiv double %136, %139
  %141 = getelementptr inbounds [3 x double], ptr %26, i64 0, i64 0
  store double %140, ptr %141, align 16, !tbaa !9
  %142 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %143 = load double, ptr %142, align 16, !tbaa !9
  %144 = load double, ptr %27, align 8, !tbaa !9
  %145 = load double, ptr %28, align 8, !tbaa !9
  %146 = fadd double %144, %145
  %147 = fdiv double %143, %146
  %148 = getelementptr inbounds [3 x double], ptr %26, i64 0, i64 1
  store double %147, ptr %148, align 8, !tbaa !9
  %149 = getelementptr inbounds [3 x double], ptr %26, i64 0, i64 2
  store double 0.000000e+00, ptr %149, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  store ptr null, ptr %30, align 8, !tbaa !5
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct._RcsGraph, ptr %150, i32 0, i32 3
  %152 = load i32, ptr %151, align 4, !tbaa !17
  %153 = mul i32 3, %152
  %154 = icmp ugt i32 %153, 1296
  br i1 %154, label %155, label %160

155:                                              ; preds = %102
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._RcsGraph, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %157, align 4, !tbaa !17
  %159 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %158)
  store ptr %159, ptr %30, align 8, !tbaa !5
  br label %201

160:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._RcsGraph, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 4, !tbaa !17
  %164 = mul i32 3, %163
  %165 = icmp eq i32 %164, 0
  br i1 %165, label %166, label %167

166:                                              ; preds = %160
  br label %172

167:                                              ; preds = %160
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._RcsGraph, ptr %168, i32 0, i32 3
  %170 = load i32, ptr %169, align 4, !tbaa !17
  %171 = mul i32 3, %170
  br label %172

172:                                              ; preds = %167, %166
  %173 = phi i32 [ 1, %166 ], [ %171, %167 ]
  store i32 %173, ptr %31, align 4, !tbaa !19
  %174 = load i32, ptr %31, align 4, !tbaa !19
  %175 = zext i32 %174 to i64
  %176 = mul i64 %175, 8
  %177 = add i64 24, %176
  %178 = alloca i8, i64 %177, align 16
  store ptr %178, ptr %30, align 8, !tbaa !5
  %179 = load ptr, ptr %30, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._MatNd, ptr %179, i64 1
  %181 = load ptr, ptr %30, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._MatNd, ptr %181, i32 0, i32 0
  store ptr %180, ptr %182, align 8, !tbaa !20
  %183 = load ptr, ptr %30, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._MatNd, ptr %183, i32 0, i32 1
  store i32 3, ptr %184, align 8, !tbaa !22
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._RcsGraph, ptr %185, i32 0, i32 3
  %187 = load i32, ptr %186, align 4, !tbaa !17
  %188 = load ptr, ptr %30, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct._MatNd, ptr %188, i32 0, i32 2
  store i32 %187, ptr %189, align 4, !tbaa !23
  %190 = load i32, ptr %31, align 4, !tbaa !19
  %191 = load ptr, ptr %30, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct._MatNd, ptr %191, i32 0, i32 3
  store i32 %190, ptr %192, align 8, !tbaa !24
  %193 = load ptr, ptr %30, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct._MatNd, ptr %193, i32 0, i32 4
  store i8 1, ptr %194, align 4, !tbaa !25
  %195 = load ptr, ptr %30, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._MatNd, ptr %195, i32 0, i32 0
  %197 = load ptr, ptr %196, align 8, !tbaa !20
  %198 = load i32, ptr %31, align 4, !tbaa !19
  %199 = zext i32 %198 to i64
  %200 = mul i64 %199, 8
  call void @llvm.memset.p0.i64(ptr align 8 %197, i8 0, i64 %200, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %201

201:                                              ; preds = %172, %155
  %202 = load ptr, ptr %20, align 8, !tbaa !5
  %203 = icmp ne ptr %202, null
  br i1 %203, label %204, label %455

204:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  store ptr null, ptr %32, align 8, !tbaa !5
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._RcsGraph, ptr %205, i32 0, i32 3
  %207 = load i32, ptr %206, align 4, !tbaa !17
  %208 = mul i32 3, %207
  %209 = icmp ugt i32 %208, 1296
  br i1 %209, label %210, label %215

210:                                              ; preds = %204
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._RcsGraph, ptr %211, i32 0, i32 3
  %213 = load i32, ptr %212, align 4, !tbaa !17
  %214 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %213)
  store ptr %214, ptr %32, align 8, !tbaa !5
  br label %256

215:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct._RcsGraph, ptr %216, i32 0, i32 3
  %218 = load i32, ptr %217, align 4, !tbaa !17
  %219 = mul i32 3, %218
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %221, label %222

221:                                              ; preds = %215
  br label %227

222:                                              ; preds = %215
  %223 = load ptr, ptr %10, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct._RcsGraph, ptr %223, i32 0, i32 3
  %225 = load i32, ptr %224, align 4, !tbaa !17
  %226 = mul i32 3, %225
  br label %227

227:                                              ; preds = %222, %221
  %228 = phi i32 [ 1, %221 ], [ %226, %222 ]
  store i32 %228, ptr %33, align 4, !tbaa !19
  %229 = load i32, ptr %33, align 4, !tbaa !19
  %230 = zext i32 %229 to i64
  %231 = mul i64 %230, 8
  %232 = add i64 24, %231
  %233 = alloca i8, i64 %232, align 16
  store ptr %233, ptr %32, align 8, !tbaa !5
  %234 = load ptr, ptr %32, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct._MatNd, ptr %234, i64 1
  %236 = load ptr, ptr %32, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct._MatNd, ptr %236, i32 0, i32 0
  store ptr %235, ptr %237, align 8, !tbaa !20
  %238 = load ptr, ptr %32, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct._MatNd, ptr %238, i32 0, i32 1
  store i32 3, ptr %239, align 8, !tbaa !22
  %240 = load ptr, ptr %10, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct._RcsGraph, ptr %240, i32 0, i32 3
  %242 = load i32, ptr %241, align 4, !tbaa !17
  %243 = load ptr, ptr %32, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct._MatNd, ptr %243, i32 0, i32 2
  store i32 %242, ptr %244, align 4, !tbaa !23
  %245 = load i32, ptr %33, align 4, !tbaa !19
  %246 = load ptr, ptr %32, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct._MatNd, ptr %246, i32 0, i32 3
  store i32 %245, ptr %247, align 8, !tbaa !24
  %248 = load ptr, ptr %32, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct._MatNd, ptr %248, i32 0, i32 4
  store i8 1, ptr %249, align 4, !tbaa !25
  %250 = load ptr, ptr %32, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct._MatNd, ptr %250, i32 0, i32 0
  %252 = load ptr, ptr %251, align 8, !tbaa !20
  %253 = load i32, ptr %33, align 4, !tbaa !19
  %254 = zext i32 %253 to i64
  %255 = mul i64 %254, 8
  call void @llvm.memset.p0.i64(ptr align 8 %252, i8 0, i64 %255, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %256

256:                                              ; preds = %227, %210
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #8
  store ptr null, ptr %34, align 8, !tbaa !5
  %257 = load ptr, ptr %10, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct._RcsGraph, ptr %257, i32 0, i32 3
  %259 = load i32, ptr %258, align 4, !tbaa !17
  %260 = mul i32 3, %259
  %261 = icmp ugt i32 %260, 1296
  br i1 %261, label %262, label %267

262:                                              ; preds = %256
  %263 = load ptr, ptr %10, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct._RcsGraph, ptr %263, i32 0, i32 3
  %265 = load i32, ptr %264, align 4, !tbaa !17
  %266 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %265)
  store ptr %266, ptr %34, align 8, !tbaa !5
  br label %308

267:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %268 = load ptr, ptr %10, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct._RcsGraph, ptr %268, i32 0, i32 3
  %270 = load i32, ptr %269, align 4, !tbaa !17
  %271 = mul i32 3, %270
  %272 = icmp eq i32 %271, 0
  br i1 %272, label %273, label %274

273:                                              ; preds = %267
  br label %279

274:                                              ; preds = %267
  %275 = load ptr, ptr %10, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct._RcsGraph, ptr %275, i32 0, i32 3
  %277 = load i32, ptr %276, align 4, !tbaa !17
  %278 = mul i32 3, %277
  br label %279

279:                                              ; preds = %274, %273
  %280 = phi i32 [ 1, %273 ], [ %278, %274 ]
  store i32 %280, ptr %35, align 4, !tbaa !19
  %281 = load i32, ptr %35, align 4, !tbaa !19
  %282 = zext i32 %281 to i64
  %283 = mul i64 %282, 8
  %284 = add i64 24, %283
  %285 = alloca i8, i64 %284, align 16
  store ptr %285, ptr %34, align 8, !tbaa !5
  %286 = load ptr, ptr %34, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct._MatNd, ptr %286, i64 1
  %288 = load ptr, ptr %34, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct._MatNd, ptr %288, i32 0, i32 0
  store ptr %287, ptr %289, align 8, !tbaa !20
  %290 = load ptr, ptr %34, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct._MatNd, ptr %290, i32 0, i32 1
  store i32 3, ptr %291, align 8, !tbaa !22
  %292 = load ptr, ptr %10, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct._RcsGraph, ptr %292, i32 0, i32 3
  %294 = load i32, ptr %293, align 4, !tbaa !17
  %295 = load ptr, ptr %34, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct._MatNd, ptr %295, i32 0, i32 2
  store i32 %294, ptr %296, align 4, !tbaa !23
  %297 = load i32, ptr %35, align 4, !tbaa !19
  %298 = load ptr, ptr %34, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct._MatNd, ptr %298, i32 0, i32 3
  store i32 %297, ptr %299, align 8, !tbaa !24
  %300 = load ptr, ptr %34, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct._MatNd, ptr %300, i32 0, i32 4
  store i8 1, ptr %301, align 4, !tbaa !25
  %302 = load ptr, ptr %34, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct._MatNd, ptr %302, i32 0, i32 0
  %304 = load ptr, ptr %303, align 8, !tbaa !20
  %305 = load i32, ptr %35, align 4, !tbaa !19
  %306 = zext i32 %305 to i64
  %307 = mul i64 %306, 8
  call void @llvm.memset.p0.i64(ptr align 8 %304, i8 0, i64 %307, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  br label %308

308:                                              ; preds = %279, %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  store ptr null, ptr %36, align 8, !tbaa !5
  %309 = load ptr, ptr %10, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct._RcsGraph, ptr %309, i32 0, i32 3
  %311 = load i32, ptr %310, align 4, !tbaa !17
  %312 = mul i32 3, %311
  %313 = icmp ugt i32 %312, 1296
  br i1 %313, label %314, label %319

314:                                              ; preds = %308
  %315 = load ptr, ptr %10, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct._RcsGraph, ptr %315, i32 0, i32 3
  %317 = load i32, ptr %316, align 4, !tbaa !17
  %318 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %317)
  store ptr %318, ptr %36, align 8, !tbaa !5
  br label %360

319:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %320 = load ptr, ptr %10, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct._RcsGraph, ptr %320, i32 0, i32 3
  %322 = load i32, ptr %321, align 4, !tbaa !17
  %323 = mul i32 3, %322
  %324 = icmp eq i32 %323, 0
  br i1 %324, label %325, label %326

325:                                              ; preds = %319
  br label %331

326:                                              ; preds = %319
  %327 = load ptr, ptr %10, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct._RcsGraph, ptr %327, i32 0, i32 3
  %329 = load i32, ptr %328, align 4, !tbaa !17
  %330 = mul i32 3, %329
  br label %331

331:                                              ; preds = %326, %325
  %332 = phi i32 [ 1, %325 ], [ %330, %326 ]
  store i32 %332, ptr %37, align 4, !tbaa !19
  %333 = load i32, ptr %37, align 4, !tbaa !19
  %334 = zext i32 %333 to i64
  %335 = mul i64 %334, 8
  %336 = add i64 24, %335
  %337 = alloca i8, i64 %336, align 16
  store ptr %337, ptr %36, align 8, !tbaa !5
  %338 = load ptr, ptr %36, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct._MatNd, ptr %338, i64 1
  %340 = load ptr, ptr %36, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct._MatNd, ptr %340, i32 0, i32 0
  store ptr %339, ptr %341, align 8, !tbaa !20
  %342 = load ptr, ptr %36, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct._MatNd, ptr %342, i32 0, i32 1
  store i32 3, ptr %343, align 8, !tbaa !22
  %344 = load ptr, ptr %10, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct._RcsGraph, ptr %344, i32 0, i32 3
  %346 = load i32, ptr %345, align 4, !tbaa !17
  %347 = load ptr, ptr %36, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct._MatNd, ptr %347, i32 0, i32 2
  store i32 %346, ptr %348, align 4, !tbaa !23
  %349 = load i32, ptr %37, align 4, !tbaa !19
  %350 = load ptr, ptr %36, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct._MatNd, ptr %350, i32 0, i32 3
  store i32 %349, ptr %351, align 8, !tbaa !24
  %352 = load ptr, ptr %36, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct._MatNd, ptr %352, i32 0, i32 4
  store i8 1, ptr %353, align 4, !tbaa !25
  %354 = load ptr, ptr %36, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct._MatNd, ptr %354, i32 0, i32 0
  %356 = load ptr, ptr %355, align 8, !tbaa !20
  %357 = load i32, ptr %37, align 4, !tbaa !19
  %358 = zext i32 %357 to i64
  %359 = mul i64 %358, 8
  call void @llvm.memset.p0.i64(ptr align 8 %356, i8 0, i64 %359, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %360

360:                                              ; preds = %331, %314
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  store ptr null, ptr %38, align 8, !tbaa !5
  %361 = load ptr, ptr %10, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct._RcsGraph, ptr %361, i32 0, i32 3
  %363 = load i32, ptr %362, align 4, !tbaa !17
  %364 = mul i32 3, %363
  %365 = icmp ugt i32 %364, 1296
  br i1 %365, label %366, label %371

366:                                              ; preds = %360
  %367 = load ptr, ptr %10, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct._RcsGraph, ptr %367, i32 0, i32 3
  %369 = load i32, ptr %368, align 4, !tbaa !17
  %370 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %369)
  store ptr %370, ptr %38, align 8, !tbaa !5
  br label %412

371:                                              ; preds = %360
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %372 = load ptr, ptr %10, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct._RcsGraph, ptr %372, i32 0, i32 3
  %374 = load i32, ptr %373, align 4, !tbaa !17
  %375 = mul i32 3, %374
  %376 = icmp eq i32 %375, 0
  br i1 %376, label %377, label %378

377:                                              ; preds = %371
  br label %383

378:                                              ; preds = %371
  %379 = load ptr, ptr %10, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct._RcsGraph, ptr %379, i32 0, i32 3
  %381 = load i32, ptr %380, align 4, !tbaa !17
  %382 = mul i32 3, %381
  br label %383

383:                                              ; preds = %378, %377
  %384 = phi i32 [ 1, %377 ], [ %382, %378 ]
  store i32 %384, ptr %39, align 4, !tbaa !19
  %385 = load i32, ptr %39, align 4, !tbaa !19
  %386 = zext i32 %385 to i64
  %387 = mul i64 %386, 8
  %388 = add i64 24, %387
  %389 = alloca i8, i64 %388, align 16
  store ptr %389, ptr %38, align 8, !tbaa !5
  %390 = load ptr, ptr %38, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct._MatNd, ptr %390, i64 1
  %392 = load ptr, ptr %38, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct._MatNd, ptr %392, i32 0, i32 0
  store ptr %391, ptr %393, align 8, !tbaa !20
  %394 = load ptr, ptr %38, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct._MatNd, ptr %394, i32 0, i32 1
  store i32 3, ptr %395, align 8, !tbaa !22
  %396 = load ptr, ptr %10, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct._RcsGraph, ptr %396, i32 0, i32 3
  %398 = load i32, ptr %397, align 4, !tbaa !17
  %399 = load ptr, ptr %38, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct._MatNd, ptr %399, i32 0, i32 2
  store i32 %398, ptr %400, align 4, !tbaa !23
  %401 = load i32, ptr %39, align 4, !tbaa !19
  %402 = load ptr, ptr %38, align 8, !tbaa !5
  %403 = getelementptr inbounds %struct._MatNd, ptr %402, i32 0, i32 3
  store i32 %401, ptr %403, align 8, !tbaa !24
  %404 = load ptr, ptr %38, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct._MatNd, ptr %404, i32 0, i32 4
  store i8 1, ptr %405, align 4, !tbaa !25
  %406 = load ptr, ptr %38, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct._MatNd, ptr %406, i32 0, i32 0
  %408 = load ptr, ptr %407, align 8, !tbaa !20
  %409 = load i32, ptr %39, align 4, !tbaa !19
  %410 = zext i32 %409 to i64
  %411 = mul i64 %410, 8
  call void @llvm.memset.p0.i64(ptr align 8 %408, i8 0, i64 %411, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %412

412:                                              ; preds = %383, %366
  %413 = load ptr, ptr %10, align 8, !tbaa !5
  %414 = load ptr, ptr %11, align 8, !tbaa !5
  %415 = load ptr, ptr %32, align 8, !tbaa !5
  call void @RcsGraph_bodyPointJacobian(ptr noundef %413, ptr noundef %414, ptr noundef null, ptr noundef null, ptr noundef %415)
  %416 = load ptr, ptr %10, align 8, !tbaa !5
  %417 = load ptr, ptr %20, align 8, !tbaa !5
  %418 = load ptr, ptr %17, align 8, !tbaa !5
  %419 = load ptr, ptr %34, align 8, !tbaa !5
  call void @RcsGraph_bodyPointJacobian(ptr noundef %416, ptr noundef %417, ptr noundef %418, ptr noundef null, ptr noundef %419)
  %420 = load ptr, ptr %36, align 8, !tbaa !5
  %421 = load ptr, ptr %34, align 8, !tbaa !5
  %422 = load ptr, ptr %32, align 8, !tbaa !5
  call void @MatNd_sub(ptr noundef %420, ptr noundef %421, ptr noundef %422)
  call void @llvm.lifetime.start.p0(i64 24, ptr %40) #8
  %423 = getelementptr inbounds [3 x double], ptr %40, i64 0, i64 0
  %424 = load ptr, ptr %17, align 8, !tbaa !5
  call void @Vec3d_copy(ptr noundef %423, ptr noundef %424)
  %425 = getelementptr inbounds [3 x double], ptr %40, i64 0, i64 0
  %426 = load ptr, ptr %20, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct._RcsBody, ptr %426, i32 0, i32 10
  %428 = load ptr, ptr %427, align 8, !tbaa !16
  call void @Vec3d_transformSelf(ptr noundef %425, ptr noundef %428)
  call void @llvm.lifetime.start.p0(i64 24, ptr %41) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %429 = load ptr, ptr %11, align 8, !tbaa !5
  %430 = getelementptr inbounds %struct._RcsBody, ptr %429, i32 0, i32 10
  %431 = load ptr, ptr %430, align 8, !tbaa !16
  %432 = getelementptr inbounds %struct.HTr, ptr %431, i32 0, i32 0
  %433 = getelementptr inbounds [3 x double], ptr %432, i64 0, i64 0
  store ptr %433, ptr %42, align 8, !tbaa !5
  %434 = getelementptr inbounds [3 x double], ptr %41, i64 0, i64 0
  %435 = getelementptr inbounds [3 x double], ptr %40, i64 0, i64 0
  %436 = load ptr, ptr %42, align 8, !tbaa !5
  call void @Vec3d_sub(ptr noundef %434, ptr noundef %435, ptr noundef %436)
  %437 = load ptr, ptr %10, align 8, !tbaa !5
  %438 = load ptr, ptr %11, align 8, !tbaa !5
  %439 = load ptr, ptr %38, align 8, !tbaa !5
  call void @RcsGraph_rotationJacobian(ptr noundef %437, ptr noundef %438, ptr noundef null, ptr noundef %439)
  %440 = load ptr, ptr %38, align 8, !tbaa !5
  %441 = getelementptr inbounds [3 x double], ptr %41, i64 0, i64 0
  call void @MatNd_columnCrossProductSelf(ptr noundef %440, ptr noundef %441)
  %442 = load ptr, ptr %30, align 8, !tbaa !5
  %443 = load ptr, ptr %36, align 8, !tbaa !5
  %444 = load ptr, ptr %38, align 8, !tbaa !5
  call void @MatNd_add(ptr noundef %442, ptr noundef %443, ptr noundef %444)
  %445 = load ptr, ptr %30, align 8, !tbaa !5
  %446 = load ptr, ptr %11, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct._RcsBody, ptr %446, i32 0, i32 10
  %448 = load ptr, ptr %447, align 8, !tbaa !16
  %449 = getelementptr inbounds %struct.HTr, ptr %448, i32 0, i32 1
  %450 = getelementptr inbounds [3 x [3 x double]], ptr %449, i64 0, i64 0
  call void @MatNd_rotateSelf(ptr noundef %445, ptr noundef %450)
  %451 = load ptr, ptr %32, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %451)
  %452 = load ptr, ptr %34, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %452)
  %453 = load ptr, ptr %36, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %453)
  %454 = load ptr, ptr %38, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %454)
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %467

455:                                              ; preds = %201
  %456 = load ptr, ptr %10, align 8, !tbaa !5
  %457 = load ptr, ptr %11, align 8, !tbaa !5
  %458 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %459 = load ptr, ptr %30, align 8, !tbaa !5
  call void @RcsGraph_bodyPointJacobian(ptr noundef %456, ptr noundef %457, ptr noundef %458, ptr noundef null, ptr noundef %459)
  %460 = load ptr, ptr %30, align 8, !tbaa !5
  call void @MatNd_constMulSelf(ptr noundef %460, double noundef -1.000000e+00)
  %461 = load ptr, ptr %30, align 8, !tbaa !5
  %462 = load ptr, ptr %11, align 8, !tbaa !5
  %463 = getelementptr inbounds %struct._RcsBody, ptr %462, i32 0, i32 10
  %464 = load ptr, ptr %463, align 8, !tbaa !16
  %465 = getelementptr inbounds %struct.HTr, ptr %464, i32 0, i32 1
  %466 = getelementptr inbounds [3 x [3 x double]], ptr %465, i64 0, i64 0
  call void @MatNd_rotateSelf(ptr noundef %461, ptr noundef %466)
  br label %467

467:                                              ; preds = %455, %412
  call void @llvm.lifetime.start.p0(i64 24, ptr %43) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  store i32 0, ptr %44, align 4, !tbaa !19
  br label %468

468:                                              ; preds = %488, %467
  %469 = load i32, ptr %44, align 4, !tbaa !19
  %470 = icmp slt i32 %469, 3
  br i1 %470, label %472, label %471

471:                                              ; preds = %468
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  br label %491

472:                                              ; preds = %468
  %473 = load double, ptr %23, align 8, !tbaa !9
  %474 = load i32, ptr %44, align 4, !tbaa !19
  %475 = sext i32 %474 to i64
  %476 = getelementptr inbounds [3 x double], ptr %25, i64 0, i64 %475
  %477 = load double, ptr %476, align 8, !tbaa !9
  %478 = load double, ptr %24, align 8, !tbaa !9
  %479 = load i32, ptr %44, align 4, !tbaa !19
  %480 = sext i32 %479 to i64
  %481 = getelementptr inbounds [3 x double], ptr %26, i64 0, i64 %480
  %482 = load double, ptr %481, align 8, !tbaa !9
  %483 = fmul double %478, %482
  %484 = call double @llvm.fmuladd.f64(double %473, double %477, double %483)
  %485 = load i32, ptr %44, align 4, !tbaa !19
  %486 = sext i32 %485 to i64
  %487 = getelementptr inbounds [3 x double], ptr %43, i64 0, i64 %486
  store double %484, ptr %487, align 8, !tbaa !9
  br label %488

488:                                              ; preds = %472
  %489 = load i32, ptr %44, align 4, !tbaa !19
  %490 = add nsw i32 %489, 1
  store i32 %490, ptr %44, align 4, !tbaa !19
  br label %468, !llvm.loop !26

491:                                              ; preds = %471
  call void @llvm.lifetime.start.p0(i64 24, ptr %45) #8
  %492 = getelementptr inbounds [3 x double], ptr %43, i64 0, i64 0
  call void @MatNd_fromPtr(ptr dead_on_unwind writable sret(%struct._MatNd) align 8 %45, i32 noundef 1, i32 noundef 3, ptr noundef %492)
  %493 = load ptr, ptr %18, align 8, !tbaa !5
  %494 = load ptr, ptr %10, align 8, !tbaa !5
  %495 = getelementptr inbounds %struct._RcsGraph, ptr %494, i32 0, i32 3
  %496 = load i32, ptr %495, align 4, !tbaa !17
  call void @MatNd_reshape(ptr noundef %493, i32 noundef 1, i32 noundef %496)
  %497 = load ptr, ptr %18, align 8, !tbaa !5
  %498 = load ptr, ptr %30, align 8, !tbaa !5
  call void @MatNd_mul(ptr noundef %497, ptr noundef %45, ptr noundef %498)
  %499 = load ptr, ptr %30, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %499)
  %500 = load i32, ptr @RcsLogLevel, align 4, !tbaa !19
  %501 = icmp sle i32 6, %500
  br i1 %501, label %502, label %525

502:                                              ; preds = %491
  %503 = load ptr, ptr %20, align 8, !tbaa !5
  %504 = icmp ne ptr %503, null
  br i1 %504, label %505, label %524

505:                                              ; preds = %502
  br label %506

506:                                              ; preds = %505
  %507 = load ptr, ptr @stderr, align 8, !tbaa !5
  %508 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %507, ptr noundef @.str.14, ptr noundef @.str.1, ptr noundef @__func__.RcsGraph_pointFrustrumGradient, i32 noundef 2001) #8
  %509 = load ptr, ptr @stderr, align 8, !tbaa !5
  %510 = load ptr, ptr %20, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct._RcsBody, ptr %510, i32 0, i32 6
  %512 = load ptr, ptr %511, align 8, !tbaa !11
  %513 = load ptr, ptr %11, align 8, !tbaa !5
  %514 = getelementptr inbounds %struct._RcsBody, ptr %513, i32 0, i32 6
  %515 = load ptr, ptr %514, align 8, !tbaa !11
  %516 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %509, ptr noundef @.str.16, ptr noundef %512, ptr noundef %515) #8
  %517 = load ptr, ptr @stderr, align 8, !tbaa !5
  %518 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %517, ptr noundef @.str.5) #8
  %519 = load ptr, ptr @stderr, align 8, !tbaa !5
  %520 = call i32 @fflush(ptr noundef %519)
  br label %521

521:                                              ; preds = %506
  br label %522

522:                                              ; preds = %521
  %523 = load ptr, ptr %18, align 8, !tbaa !5
  call void @MatNd_printDigits(ptr noundef %523, i32 noundef 2)
  br label %524

524:                                              ; preds = %522, %502
  br label %525

525:                                              ; preds = %524, %491
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  ret void
}

declare void @MatNd_sub(ptr noundef, ptr noundef, ptr noundef) #0

declare void @Vec3d_transformSelf(ptr noundef, ptr noundef) #0

declare void @MatNd_add(ptr noundef, ptr noundef, ptr noundef) #0

declare void @MatNd_printDigits(ptr noundef, i32 noundef) #0

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

!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 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"_RcsBody", !10, i64 0, !13, i64 8, !14, i64 12, !7, i64 16, !7, i64 40, !10, 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}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !6, i64 176}
!16 = !{!12, !6, i64 104}
!17 = !{!18, !14, i64 1852}
!18 = !{!"_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}
!19 = !{!14, !14, i64 0}
!20 = !{!21, !6, i64 0}
!21 = !{!"_MatNd", !6, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !13, i64 20}
!22 = !{!21, !14, i64 8}
!23 = !{!21, !14, i64 12}
!24 = !{!21, !14, i64 16}
!25 = !{!21, !13, i64 20}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [43 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.RcsGraph_pointFrustrumGradient = external hidden unnamed_addr constant [31 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [33 x i8], align 1

declare void @Vec3d_copy(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare void @MatNd_reshape(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare void @MatNd_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #0

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

declare void @Vec3d_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @MatNd_columnCrossProductSelf(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @MatNd_rotateSelf(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @MatNd_fromPtr(ptr dead_on_unwind writable sret(%struct._MatNd) align 8, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

declare void @print_trace() local_unnamed_addr #0

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

declare void @MatNd_constMulSelf(ptr noundef, double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #7

declare void @HTr_invTransform(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @Vec3d_invTransform(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @atan(double noundef) local_unnamed_addr #8

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

; Function Attrs: nounwind uwtable
define dso_local void @RcsGraph_pointFrustrumGradient(ptr noundef %0, ptr noundef %1, ptr noundef %2, double noundef %3, double noundef %4, double noundef %5, double noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #2 {
  %10 = alloca [3 x double], align 16
  %11 = alloca %struct.HTr, align 8
  %12 = alloca [3 x double], align 16
  %13 = alloca [3 x double], align 16
  %14 = alloca [3 x double], align 16
  %15 = alloca %struct._MatNd, align 8
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %16, label %19

16:                                               ; preds = %9
  %17 = load ptr, ptr @stderr, align 8, !tbaa !5
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.RcsGraph_pointFrustrumGradient, i32 noundef 1878, ptr noundef nonnull @.str.12) #9
  tail call void @print_trace() #10
  tail call void @abort() #11
  unreachable

19:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #10
  %20 = getelementptr inbounds i8, ptr %2, i64 72
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = tail call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %21, ptr noundef nonnull dereferenceable(1) @.str.13, i64 noundef 11) #12
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %.thread

24:                                               ; preds = %19
  %25 = getelementptr inbounds i8, ptr %2, i64 176
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  %.not167 = icmp eq ptr %26, null
  br i1 %.not167, label %31, label %.thread

.thread:                                          ; preds = %19, %24
  %.0147166 = phi ptr [ %26, %24 ], [ %2, %19 ]
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %11) #10
  %27 = getelementptr inbounds i8, ptr %.0147166, i64 104
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %29 = getelementptr inbounds i8, ptr %1, i64 104
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  call void @HTr_invTransform(ptr noundef nonnull %11, ptr noundef %28, ptr noundef %30) #10
  call void @Vec3d_invTransform(ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef %7) #10
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %11) #10
  br label %34

31:                                               ; preds = %24
  %32 = getelementptr inbounds i8, ptr %1, i64 104
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  call void @Vec3d_invTransform(ptr noundef nonnull %10, ptr noundef %33, ptr noundef %7) #10
  br label %34

34:                                               ; preds = %31, %.thread
  %35 = phi i1 [ false, %31 ], [ true, %.thread ]
  %.0147165 = phi ptr [ null, %31 ], [ %.0147166, %.thread ]
  %36 = getelementptr inbounds i8, ptr %10, i64 8
  %37 = load double, ptr %36, align 8, !tbaa !16
  %38 = load double, ptr %10, align 16, !tbaa !16
  %39 = fdiv double %37, %38
  %40 = call double @atan(double noundef %39) #10
  %41 = fneg double %4
  %42 = call double @llvm.fmuladd.f64(double %41, double %6, double %40)
  %43 = load double, ptr %36, align 8, !tbaa !16
  %44 = fmul double %42, %43
  %45 = fcmp ult double %44, 0.000000e+00
  %46 = fmul double %42, 2.000000e+00
  %.0148 = select i1 %45, double 0.000000e+00, double %46
  %47 = load double, ptr %10, align 16, !tbaa !16
  %48 = fmul double %47, %47
  %49 = fmul double %43, %43
  %50 = getelementptr inbounds i8, ptr %10, i64 16
  %51 = load double, ptr %50, align 16, !tbaa !16
  %52 = fmul double %51, %51
  %53 = fneg double %51
  %54 = fadd double %48, %52
  %55 = fdiv double %53, %54
  %56 = fdiv double %47, %54
  %57 = fneg double %43
  %58 = fadd double %49, %48
  %59 = fdiv double %57, %58
  %60 = fdiv double %47, %58
  %61 = getelementptr inbounds i8, ptr %0, i64 1852
  %62 = load i32, ptr %61, align 4, !tbaa !17
  %63 = mul i32 %62, 3
  %64 = icmp ugt i32 %63, 1296
  br i1 %64, label %65, label %67

65:                                               ; preds = %34
  %66 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %62) #10
  br label %78

67:                                               ; preds = %34
  %68 = icmp eq i32 %62, 0
  %spec.select = select i1 %68, i32 1, i32 %63
  %69 = shl nuw nsw i32 %spec.select, 3
  %70 = zext nneg i32 %69 to i64
  %71 = add nuw nsw i64 %70, 24
  %72 = alloca i8, i64 %71, align 16
  %73 = getelementptr inbounds i8, ptr %72, i64 24
  store ptr %73, ptr %72, align 16, !tbaa !19
  %74 = getelementptr inbounds i8, ptr %72, i64 8
  store i32 3, ptr %74, align 8, !tbaa !21
  %75 = getelementptr inbounds i8, ptr %72, i64 12
  store i32 %62, ptr %75, align 4, !tbaa !22
  %76 = getelementptr inbounds i8, ptr %72, i64 16
  store i32 %spec.select, ptr %76, align 16, !tbaa !23
  %77 = getelementptr inbounds i8, ptr %72, i64 20
  store i8 1, ptr %77, align 4, !tbaa !24
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %73, i8 0, i64 %70, i1 false)
  br label %78

78:                                               ; preds = %67, %65
  %.0150 = phi ptr [ %66, %65 ], [ %72, %67 ]
  br i1 %35, label %79, label %145

79:                                               ; preds = %78
  %80 = load i32, ptr %61, align 4, !tbaa !17
  %81 = mul i32 %80, 3
  %82 = icmp ugt i32 %81, 1296
  br i1 %82, label %93, label %.thread180

.thread180:                                       ; preds = %79
  %83 = icmp eq i32 %80, 0
  %spec.select160 = select i1 %83, i32 1, i32 %81
  %84 = shl nuw nsw i32 %spec.select160, 3
  %85 = zext nneg i32 %84 to i64
  %86 = add nuw nsw i64 %85, 24
  %87 = alloca i8, i64 %86, align 16
  %88 = getelementptr inbounds i8, ptr %87, i64 24
  store ptr %88, ptr %87, align 16, !tbaa !19
  %89 = getelementptr inbounds i8, ptr %87, i64 8
  store i32 3, ptr %89, align 8, !tbaa !21
  %90 = getelementptr inbounds i8, ptr %87, i64 12
  store i32 %80, ptr %90, align 4, !tbaa !22
  %91 = getelementptr inbounds i8, ptr %87, i64 16
  store i32 %spec.select160, ptr %91, align 16, !tbaa !23
  %92 = getelementptr inbounds i8, ptr %87, i64 20
  store i8 1, ptr %92, align 4, !tbaa !24
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %88, i8 0, i64 %85, i1 false)
  br label %.thread186

93:                                               ; preds = %79
  %94 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %80) #10
  %.pre = load i32, ptr %61, align 4, !tbaa !17
  %.pre175 = mul i32 %.pre, 3
  %95 = icmp ugt i32 %.pre175, 1296
  br i1 %95, label %107, label %.thread186

.thread186:                                       ; preds = %93, %.thread180
  %.0152185 = phi ptr [ %87, %.thread180 ], [ %94, %93 ]
  %96 = phi i32 [ %80, %.thread180 ], [ %.pre, %93 ]
  %.pre-phi183 = phi i32 [ %81, %.thread180 ], [ %.pre175, %93 ]
  %97 = icmp eq i32 %96, 0
  %spec.select161 = select i1 %97, i32 1, i32 %.pre-phi183
  %98 = shl nuw nsw i32 %spec.select161, 3
  %99 = zext nneg i32 %98 to i64
  %100 = add nuw nsw i64 %99, 24
  %101 = alloca i8, i64 %100, align 16
  %102 = getelementptr inbounds i8, ptr %101, i64 24
  store ptr %102, ptr %101, align 16, !tbaa !19
  %103 = getelementptr inbounds i8, ptr %101, i64 8
  store i32 3, ptr %103, align 8, !tbaa !21
  %104 = getelementptr inbounds i8, ptr %101, i64 12
  store i32 %96, ptr %104, align 4, !tbaa !22
  %105 = getelementptr inbounds i8, ptr %101, i64 16
  store i32 %spec.select161, ptr %105, align 16, !tbaa !23
  %106 = getelementptr inbounds i8, ptr %101, i64 20
  store i8 1, ptr %106, align 4, !tbaa !24
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %102, i8 0, i64 %99, i1 false)
  br label %.thread195

107:                                              ; preds = %93
  %108 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %.pre) #10
  %.pre173 = load i32, ptr %61, align 4, !tbaa !17
  %.pre176 = mul i32 %.pre173, 3
  %109 = icmp ugt i32 %.pre176, 1296
  br i1 %109, label %121, label %.thread195

.thread195:                                       ; preds = %107, %.thread186
  %.0153194 = phi ptr [ %101, %.thread186 ], [ %108, %107 ]
  %110 = phi i32 [ %96, %.thread186 ], [ %.pre173, %107 ]
  %.pre-phi177192 = phi i32 [ %.pre-phi183, %.thread186 ], [ %.pre176, %107 ]
  %.0152184191 = phi ptr [ %.0152185, %.thread186 ], [ %94, %107 ]
  %111 = icmp eq i32 %110, 0
  %spec.select162 = select i1 %111, i32 1, i32 %.pre-phi177192
  %112 = shl nuw nsw i32 %spec.select162, 3
  %113 = zext nneg i32 %112 to i64
  %114 = add nuw nsw i64 %113, 24
  %115 = alloca i8, i64 %114, align 16
  %116 = getelementptr inbounds i8, ptr %115, i64 24
  store ptr %116, ptr %115, align 16, !tbaa !19
  %117 = getelementptr inbounds i8, ptr %115, i64 8
  store i32 3, ptr %117, align 8, !tbaa !21
  %118 = getelementptr inbounds i8, ptr %115, i64 12
  store i32 %110, ptr %118, align 4, !tbaa !22
  %119 = getelementptr inbounds i8, ptr %115, i64 16
  store i32 %spec.select162, ptr %119, align 16, !tbaa !23
  %120 = getelementptr inbounds i8, ptr %115, i64 20
  store i8 1, ptr %120, align 4, !tbaa !24
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %116, i8 0, i64 %113, i1 false)
  br label %126

121:                                              ; preds = %107
  %122 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %.pre173) #10
  %.pre174 = load i32, ptr %61, align 4, !tbaa !17
  %.pre178 = mul i32 %.pre174, 3
  %123 = icmp ugt i32 %.pre178, 1296
  br i1 %123, label %124, label %126

124:                                              ; preds = %121
  %125 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %.pre174) #10
  br label %138

126:                                              ; preds = %.thread195, %121
  %.0151206 = phi ptr [ %115, %.thread195 ], [ %122, %121 ]
  %127 = phi i32 [ %110, %.thread195 ], [ %.pre174, %121 ]
  %.pre-phi179204 = phi i32 [ %.pre-phi177192, %.thread195 ], [ %.pre178, %121 ]
  %.0152184190203 = phi ptr [ %.0152184191, %.thread195 ], [ %94, %121 ]
  %.0153193201 = phi ptr [ %.0153194, %.thread195 ], [ %108, %121 ]
  %128 = icmp eq i32 %127, 0
  %spec.select163 = select i1 %128, i32 1, i32 %.pre-phi179204
  %129 = shl nuw nsw i32 %spec.select163, 3
  %130 = zext nneg i32 %129 to i64
  %131 = add nuw nsw i64 %130, 24
  %132 = alloca i8, i64 %131, align 16
  %133 = getelementptr inbounds i8, ptr %132, i64 24
  store ptr %133, ptr %132, align 16, !tbaa !19
  %134 = getelementptr inbounds i8, ptr %132, i64 8
  store i32 3, ptr %134, align 8, !tbaa !21
  %135 = getelementptr inbounds i8, ptr %132, i64 12
  store i32 %127, ptr %135, align 4, !tbaa !22
  %136 = getelementptr inbounds i8, ptr %132, i64 16
  store i32 %spec.select163, ptr %136, align 16, !tbaa !23
  %137 = getelementptr inbounds i8, ptr %132, i64 20
  store i8 1, ptr %137, align 4, !tbaa !24
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %133, i8 0, i64 %130, i1 false)
  br label %138

138:                                              ; preds = %126, %124
  %.0151205 = phi ptr [ %122, %124 ], [ %.0151206, %126 ]
  %.0152184190202 = phi ptr [ %94, %124 ], [ %.0152184190203, %126 ]
  %.0153193200 = phi ptr [ %108, %124 ], [ %.0153193201, %126 ]
  %.0149 = phi ptr [ %125, %124 ], [ %132, %126 ]
  call void @RcsGraph_bodyPointJacobian(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef null, ptr noundef null, ptr noundef %.0152184190202)
  call void @RcsGraph_bodyPointJacobian(ptr noundef nonnull %0, ptr noundef nonnull %.0147165, ptr noundef %7, ptr noundef null, ptr noundef %.0153193200)
  call void @MatNd_sub(ptr noundef %.0151205, ptr noundef %.0153193200, ptr noundef %.0152184190202) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #10
  call void @Vec3d_copy(ptr noundef nonnull %12, ptr noundef %7) #10
  %139 = getelementptr inbounds i8, ptr %.0147165, i64 104
  %140 = load ptr, ptr %139, align 8, !tbaa !15
  call void @Vec3d_transformSelf(ptr noundef nonnull %12, ptr noundef %140) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #10
  %141 = getelementptr inbounds i8, ptr %1, i64 104
  %142 = load ptr, ptr %141, align 8, !tbaa !15
  call void @Vec3d_sub(ptr noundef nonnull %13, ptr noundef nonnull %12, ptr noundef %142) #10
  call void @RcsGraph_rotationJacobian(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef null, ptr noundef %.0149)
  call void @MatNd_columnCrossProductSelf(ptr noundef %.0149, ptr noundef nonnull %13) #10
  call void @MatNd_add(ptr noundef %.0150, ptr noundef %.0151205, ptr noundef %.0149) #10
  %143 = load ptr, ptr %141, align 8, !tbaa !15
  %144 = getelementptr inbounds i8, ptr %143, i64 24
  call void @MatNd_rotateSelf(ptr noundef %.0150, ptr noundef nonnull %144) #10
  call void @MatNd_destroy(ptr noundef %.0152184190202) #10
  call void @MatNd_destroy(ptr noundef %.0153193200) #10
  call void @MatNd_destroy(ptr noundef %.0151205) #10
  call void @MatNd_destroy(ptr noundef %.0149) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #10
  br label %149

145:                                              ; preds = %78
  call void @RcsGraph_bodyPointJacobian(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %10, ptr noundef null, ptr noundef %.0150)
  call void @MatNd_constMulSelf(ptr noundef %.0150, double noundef -1.000000e+00) #10
  %146 = getelementptr inbounds i8, ptr %1, i64 104
  %147 = load ptr, ptr %146, align 8, !tbaa !15
  %148 = getelementptr inbounds i8, ptr %147, i64 24
  call void @MatNd_rotateSelf(ptr noundef %.0150, ptr noundef nonnull %148) #10
  br label %149

149:                                              ; preds = %145, %138
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #10
  %150 = fmul double %.0148, %59
  %151 = call double @llvm.fmuladd.f64(double %55, double 0.000000e+00, double %150)
  store double %151, ptr %14, align 16, !tbaa !16
  %152 = fmul double %.0148, %60
  %153 = fadd double %152, 0.000000e+00
  %154 = getelementptr inbounds i8, ptr %14, i64 8
  store double %153, ptr %154, align 8, !tbaa !16
  %155 = fmul double %.0148, 0.000000e+00
  %156 = call double @llvm.fmuladd.f64(double %56, double 0.000000e+00, double %155)
  %157 = getelementptr inbounds i8, ptr %14, i64 16
  store double %156, ptr %157, align 16, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #10
  call void @MatNd_fromPtr(ptr dead_on_unwind nonnull writable sret(%struct._MatNd) align 8 %15, i32 noundef 1, i32 noundef 3, ptr noundef nonnull %14) #10
  %158 = load i32, ptr %61, align 4, !tbaa !17
  call void @MatNd_reshape(ptr noundef %8, i32 noundef 1, i32 noundef %158) #10
  call void @MatNd_mul(ptr noundef %8, ptr noundef nonnull %15, ptr noundef %.0150) #10
  call void @MatNd_destroy(ptr noundef %.0150) #10
  %159 = load i32, ptr @RcsLogLevel, align 4, !tbaa !25
  %160 = icmp sgt i32 %159, 5
  %or.cond = and i1 %35, %160
  br i1 %or.cond, label %161, label %174

161:                                              ; preds = %149
  %162 = load ptr, ptr @stderr, align 8, !tbaa !5
  %163 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %162, ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.RcsGraph_pointFrustrumGradient, i32 noundef 2001) #9
  %164 = load ptr, ptr @stderr, align 8, !tbaa !5
  %165 = getelementptr inbounds i8, ptr %.0147165, i64 72
  %166 = load ptr, ptr %165, align 8, !tbaa !9
  %167 = getelementptr inbounds i8, ptr %1, i64 72
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef nonnull @.str.16, ptr noundef %166, ptr noundef %168) #9
  %170 = load ptr, ptr @stderr, align 8, !tbaa !5
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef nonnull @.str.5) #9
  %172 = load ptr, ptr @stderr, align 8, !tbaa !5
  %173 = call i32 @fflush(ptr noundef %172)
  call void @MatNd_printDigits(ptr noundef %8, i32 noundef 2) #10
  br label %174

174:                                              ; preds = %161, %149
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #10
  ret void
}

declare void @MatNd_sub(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @Vec3d_transformSelf(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @MatNd_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @MatNd_printDigits(ptr noundef, i32 noundef) local_unnamed_addr #0

attributes #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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nofree nounwind willreturn memory(write) "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 #9 = { cold nounwind }
attributes #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(read) }

!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, !6, i64 72}
!10 = !{!"_RcsBody", !11, i64 0, !12, i64 8, !13, i64 12, !7, i64 16, !7, i64 40, !11, 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}
!11 = !{!"double", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!10, !6, i64 176}
!15 = !{!10, !6, i64 104}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !13, i64 1852}
!18 = !{!"_RcsGraph", !6, i64 0, !7, i64 8, !13, i64 1848, !13, i64 1852, !6, i64 1856, !6, i64 1864, !6, i64 1872, !6, i64 1880, !6, i64 1888}
!19 = !{!20, !6, i64 0}
!20 = !{!"_MatNd", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !12, i64 20}
!21 = !{!20, !13, i64 8}
!22 = !{!20, !13, i64 12}
!23 = !{!20, !13, i64 16}
!24 = !{!20, !12, i64 20}
!25 = !{!13, !13, i64 0}


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