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

@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@RcsLogLevel = external global i32, align 4
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.RcsGraph_COGJacobian_Body = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [62 x i8], align 1

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

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

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

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

; 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) #2

declare void @MatNd_destroy(ptr noundef) #2

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

declare ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef) #2

declare ptr @RcsBody_getLastChild(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @RcsGraph_COGJacobian_Body(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr null, ptr %8, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct._RcsGraph, ptr %12, i32 0, i32 3
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = mul i32 3, %14
  %16 = icmp ugt i32 %15, 1296
  br i1 %16, label %17, label %22

17:                                               ; preds = %3
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._RcsGraph, ptr %18, i32 0, i32 3
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = call ptr @MatNd_create(i32 noundef 3, i32 noundef %20)
  store ptr %21, ptr %8, align 8, !tbaa !5
  br label %63

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._RcsGraph, ptr %23, i32 0, i32 3
  %25 = load i32, ptr %24, align 4, !tbaa !11
  %26 = mul i32 3, %25
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %22
  br label %34

29:                                               ; preds = %22
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._RcsGraph, ptr %30, i32 0, i32 3
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = mul i32 3, %32
  br label %34

34:                                               ; preds = %29, %28
  %35 = phi i32 [ 1, %28 ], [ %33, %29 ]
  store i32 %35, ptr %9, align 4, !tbaa !14
  %36 = load i32, ptr %9, align 4, !tbaa !14
  %37 = zext i32 %36 to i64
  %38 = mul i64 %37, 8
  %39 = add i64 24, %38
  %40 = alloca i8, i64 %39, align 16
  store ptr %40, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._MatNd, ptr %41, i64 1
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._MatNd, ptr %43, i32 0, i32 0
  store ptr %42, ptr %44, align 8, !tbaa !15
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._MatNd, ptr %45, i32 0, i32 1
  store i32 3, ptr %46, align 8, !tbaa !18
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._RcsGraph, ptr %47, i32 0, i32 3
  %49 = load i32, ptr %48, align 4, !tbaa !11
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._MatNd, ptr %50, i32 0, i32 2
  store i32 %49, ptr %51, align 4, !tbaa !19
  %52 = load i32, ptr %9, align 4, !tbaa !14
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._MatNd, ptr %53, i32 0, i32 3
  store i32 %52, ptr %54, align 8, !tbaa !20
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._MatNd, ptr %55, i32 0, i32 4
  store i8 1, ptr %56, align 4, !tbaa !21
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._MatNd, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !15
  %60 = load i32, ptr %9, align 4, !tbaa !14
  %61 = zext i32 %60 to i64
  %62 = mul i64 %61, 8
  call void @llvm.memset.p0.i64(ptr align 8 %59, i8 0, i64 %62, i1 false)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %63

63:                                               ; preds = %34, %17
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._RcsGraph, ptr %65, i32 0, i32 3
  %67 = load i32, ptr %66, align 4, !tbaa !11
  call void @MatNd_reshape(ptr noundef %64, i32 noundef 3, i32 noundef %67)
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @MatNd_setZero(ptr noundef %68)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %69, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = call ptr @RcsBody_getLastChild(ptr noundef %70)
  %72 = call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef %71)
  store ptr %72, ptr %11, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %108, %63
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %80

76:                                               ; preds = %73
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = icmp ne ptr %77, %78
  br label %80

80:                                               ; preds = %76, %73
  %81 = phi i1 [ false, %73 ], [ %79, %76 ]
  br i1 %81, label %83, label %82

82:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %111

83:                                               ; preds = %80
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._RcsBody, ptr %84, i32 0, i32 0
  %86 = load double, ptr %85, align 8, !tbaa !22
  %87 = fcmp ogt double %86, 0.000000e+00
  br i1 %87, label %88, label %107

88:                                               ; preds = %83
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._RcsBody, ptr %91, i32 0, i32 11
  %93 = load ptr, ptr %92, align 8, !tbaa !24
  %94 = getelementptr inbounds %struct.HTr, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds [3 x double], ptr %94, i64 0, i64 0
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  call void @RcsGraph_bodyPointJacobian(ptr noundef %89, ptr noundef %90, ptr noundef %95, ptr noundef null, ptr noundef %96)
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._RcsBody, ptr %99, i32 0, i32 0
  %101 = load double, ptr %100, align 8, !tbaa !22
  call void @MatNd_constMulAndAddSelf(ptr noundef %97, ptr noundef %98, double noundef %101)
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._RcsBody, ptr %102, i32 0, i32 0
  %104 = load double, ptr %103, align 8, !tbaa !22
  %105 = load double, ptr %7, align 8, !tbaa !9
  %106 = fadd double %105, %104
  store double %106, ptr %7, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %88, %83
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef %109)
  store ptr %110, ptr %10, align 8, !tbaa !5
  br label %73, !llvm.loop !25

111:                                              ; preds = %82
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  call void @MatNd_destroy(ptr noundef %112)
  %113 = load double, ptr %7, align 8, !tbaa !9
  %114 = fcmp ogt double %113, 0.000000e+00
  br i1 %114, label %115, label %119

115:                                              ; preds = %111
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load double, ptr %7, align 8, !tbaa !9
  %118 = fdiv double 1.000000e+00, %117
  call void @MatNd_constMulSelf(ptr noundef %116, double noundef %118)
  br label %138

119:                                              ; preds = %111
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %125

123:                                              ; preds = %120
  %124 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  call void (i32, ptr, ptr, i32, ptr, ...) %124(i32 noundef 1, ptr noundef @.str.1, ptr noundef @__func__.RcsGraph_COGJacobian_Body, i32 noundef 1034, ptr noundef @.str.7)
  br label %125

125:                                              ; preds = %123, %120
  %126 = load i32, ptr @RcsLogLevel, align 4, !tbaa !14
  %127 = icmp sle i32 1, %126
  br i1 %127, label %128, label %135

128:                                              ; preds = %125
  %129 = load ptr, ptr @stderr, align 8, !tbaa !5
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %129, ptr noundef @.str.4, ptr noundef @.str.1, ptr noundef @__func__.RcsGraph_COGJacobian_Body, i32 noundef 1034) #5
  %131 = load ptr, ptr @stderr, align 8, !tbaa !5
  %132 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %131, ptr noundef @.str.7) #5
  %133 = load ptr, ptr @stderr, align 8, !tbaa !5
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.5) #5
  br label %135

135:                                              ; preds = %128, %125
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void
}

declare void @MatNd_setZero(ptr noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !13, i64 1852}
!12 = !{!"_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}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_MatNd", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !17, i64 20}
!17 = !{!"_Bool", !7, i64 0}
!18 = !{!16, !13, i64 8}
!19 = !{!16, !13, i64 12}
!20 = !{!16, !13, i64 16}
!21 = !{!16, !17, i64 20}
!22 = !{!23, !10, i64 0}
!23 = !{!"_RcsBody", !10, i64 0, !17, i64 8, !13, 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}
!24 = !{!23, !6, i64 112}
!25 = distinct !{!25, !26}
!26 = !{!"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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [73 x i8], align 1
@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@__func__.RcsGraph_COGJacobian_Body = external hidden unnamed_addr constant [26 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [62 x i8], align 1

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

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

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

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

declare void @MatNd_destroy(ptr noundef) local_unnamed_addr #1

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

declare ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef) local_unnamed_addr #1

declare ptr @RcsBody_getLastChild(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @RcsGraph_COGJacobian_Body(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 1852
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = mul i32 %5, 3
  %7 = icmp ugt i32 %6, 1296
  br i1 %7, label %8, label %10

8:                                                ; preds = %3
  %9 = tail call ptr @MatNd_create(i32 noundef 3, i32 noundef %5) #4
  %.pre = load i32, ptr %4, align 4, !tbaa !5
  br label %21

10:                                               ; preds = %3
  %11 = icmp eq i32 %5, 0
  %spec.select = select i1 %11, i32 1, i32 %6
  %12 = shl nuw nsw i32 %spec.select, 3
  %13 = zext nneg i32 %12 to i64
  %14 = add nuw nsw i64 %13, 24
  %15 = alloca i8, i64 %14, align 16
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  store ptr %16, ptr %15, align 16, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %15, i64 8
  store i32 3, ptr %17, align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %15, i64 12
  store i32 %5, ptr %18, align 4, !tbaa !15
  %19 = getelementptr inbounds i8, ptr %15, i64 16
  store i32 %spec.select, ptr %19, align 16, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %15, i64 20
  store i8 1, ptr %20, align 4, !tbaa !17
  call void @llvm.memset.p0.i64(ptr nonnull align 8 %16, i8 0, i64 %13, i1 false)
  br label %21

21:                                               ; preds = %10, %8
  %22 = phi i32 [ %.pre, %8 ], [ %5, %10 ]
  %.038 = phi ptr [ %9, %8 ], [ %15, %10 ]
  call void @MatNd_reshape(ptr noundef %2, i32 noundef 3, i32 noundef %22) #4
  call void @MatNd_setZero(ptr noundef %2) #4
  %23 = call ptr @RcsBody_getLastChild(ptr noundef %1) #4
  %24 = call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef %23) #4
  %25 = icmp ne ptr %1, null
  %26 = icmp ne ptr %24, %1
  %27 = select i1 %25, i1 %26, i1 false
  br i1 %27, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %21
  call void @MatNd_destroy(ptr noundef %.038) #4
  br label %44

._crit_edge:                                      ; preds = %37
  call void @MatNd_destroy(ptr noundef %.038) #4
  %28 = fcmp ogt double %.1, 0.000000e+00
  br i1 %28, label %42, label %44

.lr.ph:                                           ; preds = %21, %37
  %.042 = phi double [ %.1, %37 ], [ 0.000000e+00, %21 ]
  %.03741 = phi ptr [ %38, %37 ], [ %1, %21 ]
  %29 = load double, ptr %.03741, align 8, !tbaa !18
  %30 = fcmp ogt double %29, 0.000000e+00
  br i1 %30, label %31, label %37

31:                                               ; preds = %.lr.ph
  %32 = getelementptr inbounds i8, ptr %.03741, i64 112
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  call void @RcsGraph_bodyPointJacobian(ptr noundef %0, ptr noundef nonnull %.03741, ptr noundef %33, ptr noundef null, ptr noundef %.038)
  %34 = load double, ptr %.03741, align 8, !tbaa !18
  call void @MatNd_constMulAndAddSelf(ptr noundef %2, ptr noundef %.038, double noundef %34) #4
  %35 = load double, ptr %.03741, align 8, !tbaa !18
  %36 = fadd double %.042, %35
  br label %37

37:                                               ; preds = %.lr.ph, %31
  %.1 = phi double [ %36, %31 ], [ %.042, %.lr.ph ]
  %38 = call ptr @RcsBody_depthFirstTraversalGetNext(ptr noundef nonnull %.03741) #4
  %39 = icmp ne ptr %38, null
  %40 = icmp ne ptr %38, %24
  %41 = select i1 %39, i1 %40, i1 false
  br i1 %41, label %.lr.ph, label %._crit_edge, !llvm.loop !22

42:                                               ; preds = %._crit_edge
  %43 = fdiv double 1.000000e+00, %.1
  call void @MatNd_constMulSelf(ptr noundef %2, double noundef %43) #4
  br label %57

44:                                               ; preds = %._crit_edge.thread, %._crit_edge
  %45 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !24
  %.not = icmp eq ptr %45, null
  br i1 %.not, label %47, label %46

46:                                               ; preds = %44
  call void (i32, ptr, ptr, i32, ptr, ...) %45(i32 noundef 1, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.RcsGraph_COGJacobian_Body, i32 noundef 1034, ptr noundef nonnull @.str.7) #4
  br label %47

47:                                               ; preds = %46, %44
  %48 = load i32, ptr @RcsLogLevel, align 4, !tbaa !25
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %50, label %57

50:                                               ; preds = %47
  %51 = load ptr, ptr @stderr, align 8, !tbaa !24
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, ptr noundef nonnull @__func__.RcsGraph_COGJacobian_Body, i32 noundef 1034) #5
  %53 = load ptr, ptr @stderr, align 8, !tbaa !24
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.7) #5
  %55 = load ptr, ptr @stderr, align 8, !tbaa !24
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.5) #5
  br label %57

57:                                               ; preds = %47, %50, %42
  ret void
}

declare void @MatNd_setZero(ptr noundef) local_unnamed_addr #1

declare void @MatNd_constMulAndAddSelf(ptr noundef, ptr noundef, double noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { nounwind }
attributes #5 = { cold nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 1852}
!6 = !{!"_RcsGraph", !7, i64 0, !8, i64 8, !10, i64 1848, !10, i64 1852, !7, i64 1856, !7, i64 1864, !7, i64 1872, !7, i64 1880, !7, i64 1888}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 0}
!12 = !{!"_MatNd", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !13, i64 20}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!12, !10, i64 12}
!16 = !{!12, !10, i64 16}
!17 = !{!12, !13, i64 20}
!18 = !{!19, !20, i64 0}
!19 = !{!"_RcsBody", !20, i64 0, !13, i64 8, !10, i64 12, !8, i64 16, !8, i64 40, !20, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176}
!20 = !{!"double", !8, i64 0}
!21 = !{!19, !7, i64 112}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!7, !7, i64 0}
!25 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass