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

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

@RCS_GLOBAL_RLOG_CB = external global ptr, align 8
@RcsLogLevel = external global i32, align 4
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@__func__.RcsShape_computeInertiaTensor = external hidden unnamed_addr constant [30 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [56 x i8], align 1

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

declare void @Vec3d_setZero(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local double @RcsShape_computeVolume(ptr noundef) #2

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

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

declare void @print_trace() #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local ptr @RcsShape_name(i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @RcsShape_computeInertiaTensor(ptr noundef %0, double noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca [3 x double], align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store double %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  call void @Mat3d_setZero(ptr noundef %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %12 = load double, ptr %5, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = call double @RcsShape_computeVolume(ptr noundef %13)
  %15 = fmul double %12, %14
  store double %15, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._RcsShape, ptr %16, i32 0, i32 2
  %18 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 0
  %19 = load double, ptr %18, align 8, !tbaa !9
  store double %19, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._RcsShape, ptr %20, i32 0, i32 2
  %22 = getelementptr inbounds [3 x double], ptr %21, i64 0, i64 2
  %23 = load double, ptr %22, align 8, !tbaa !9
  store double %23, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  %24 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  call void @Vec3d_setZero(ptr noundef %24)
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._RcsShape, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !11
  switch i32 %27, label %90 [
    i32 0, label %28
    i32 6, label %28
    i32 12, label %28
    i32 13, label %28
    i32 3, label %29
    i32 11, label %33
    i32 2, label %60
    i32 4, label %60
    i32 1, label %66
    i32 5, label %71
    i32 7, label %76
    i32 8, label %80
    i32 10, label %85
  ]

28:                                               ; preds = %3, %3, %3, %3
  br label %103

29:                                               ; preds = %3
  %30 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load double, ptr %5, align 8, !tbaa !9
  call void @RcsShape_meshInertia(ptr noundef %30, ptr noundef %31, double noundef %32)
  br label %103

33:                                               ; preds = %3
  br label %34

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

37:                                               ; preds = %34
  %38 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._RcsShape, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = call ptr @RcsShape_name(i32 noundef %41)
  call void (i32, ptr, ptr, i32, ptr, ...) %38(i32 noundef 5, ptr noundef @.str.7, ptr noundef @__func__.RcsShape_computeInertiaTensor, i32 noundef 407, ptr noundef @.str.13, ptr noundef %42)
  br label %43

43:                                               ; preds = %37, %34
  %44 = load i32, ptr @RcsLogLevel, align 4, !tbaa !16
  %45 = icmp sle i32 5, %44
  br i1 %45, label %46, label %57

46:                                               ; preds = %43
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef @.str.9, ptr noundef @.str.7, ptr noundef @__func__.RcsShape_computeInertiaTensor, i32 noundef 407) #5
  %49 = load ptr, ptr @stderr, align 8, !tbaa !5
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._RcsShape, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !11
  %53 = call ptr @RcsShape_name(i32 noundef %52)
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.13, ptr noundef %53) #5
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.3) #5
  br label %57

57:                                               ; preds = %46, %43
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58
  br label %103

60:                                               ; preds = %3, %3
  %61 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %62 = load double, ptr %7, align 8, !tbaa !9
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._RcsShape, ptr %63, i32 0, i32 2
  %65 = getelementptr inbounds [3 x double], ptr %64, i64 0, i64 0
  call void @RcsShape_boxInertia(ptr noundef %61, double noundef %62, ptr noundef %65)
  br label %103

66:                                               ; preds = %3
  %67 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %68 = load double, ptr %5, align 8, !tbaa !9
  %69 = load double, ptr %8, align 8, !tbaa !9
  %70 = load double, ptr %9, align 8, !tbaa !9
  call void @RcsShape_capsuleInertia(ptr noundef %67, double noundef %68, double noundef %69, double noundef %70)
  br label %103

71:                                               ; preds = %3
  %72 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %73 = load double, ptr %7, align 8, !tbaa !9
  %74 = load double, ptr %8, align 8, !tbaa !9
  %75 = load double, ptr %9, align 8, !tbaa !9
  call void @RcsShape_cylinderInertia(ptr noundef %72, double noundef %73, double noundef %74, double noundef %75)
  br label %103

76:                                               ; preds = %3
  %77 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %78 = load double, ptr %7, align 8, !tbaa !9
  %79 = load double, ptr %8, align 8, !tbaa !9
  call void @RcsShape_sphereInertia(ptr noundef %77, double noundef %78, double noundef %79)
  br label %103

80:                                               ; preds = %3
  %81 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %82 = load double, ptr %7, align 8, !tbaa !9
  %83 = load double, ptr %8, align 8, !tbaa !9
  %84 = load double, ptr %9, align 8, !tbaa !9
  call void @RcsShape_coneInertia(ptr noundef %81, double noundef %82, double noundef %83, double noundef %84)
  br label %103

85:                                               ; preds = %3
  %86 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  %87 = load double, ptr %7, align 8, !tbaa !9
  %88 = load double, ptr %8, align 8, !tbaa !9
  %89 = load double, ptr %9, align 8, !tbaa !9
  call void @RcsShape_torusInertia(ptr noundef %86, double noundef %87, double noundef %88, double noundef %89)
  br label %103

90:                                               ; preds = %3
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr @stderr, align 8, !tbaa !5
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef @.str.10, ptr noundef @.str.7, ptr noundef @__func__.RcsShape_computeInertiaTensor, i32 noundef 443) #5
  %94 = load ptr, ptr @stderr, align 8, !tbaa !5
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._RcsShape, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !11
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %94, ptr noundef @.str.11, i32 noundef %97) #5
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str.3) #5
  call void @print_trace()
  call void @exit(i32 noundef 1) #6
  unreachable

101:                                              ; No predecessors!
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102, %85, %80, %76, %71, %66, %60, %59, %29, %28
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds [3 x double], ptr %10, i64 0, i64 0
  call void @Mat3d_setDiag(ptr noundef %104, ptr noundef %105)
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  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 @Mat3d_setZero(ptr noundef) #1

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

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

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

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

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

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

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

declare void @Mat3d_setDiag(ptr noundef, ptr noundef) #1

attributes #0 = { 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 0}
!12 = !{!"_RcsShape", !13, i64 0, !14, i64 8, !7, i64 104, !10, i64 128, !15, i64 136, !7, i64 137, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !7, i64 0, !7, i64 24}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{!13, !13, i64 0}


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

@RCS_GLOBAL_RLOG_CB = external local_unnamed_addr global ptr, align 8
@RcsLogLevel = external local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@__func__.RcsShape_computeInertiaTensor = external hidden unnamed_addr constant [30 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [56 x i8], align 1

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

declare void @Vec3d_setZero(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local double @RcsShape_computeVolume(ptr noundef) local_unnamed_addr #2

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

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

declare void @print_trace() local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local ptr @RcsShape_name(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @RcsShape_computeInertiaTensor(ptr noundef %0, double noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca [3 x double], align 16
  tail call void @Mat3d_setZero(ptr noundef %2) #5
  %5 = tail call double @RcsShape_computeVolume(ptr noundef %0)
  %6 = fmul double %5, %1
  %7 = getelementptr inbounds i8, ptr %0, i64 104
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 120
  %10 = load double, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @Vec3d_setZero(ptr noundef nonnull %4) #5
  %11 = load i32, ptr %0, align 8, !tbaa !9
  switch i32 %11, label %35 [
    i32 0, label %43
    i32 6, label %43
    i32 12, label %43
    i32 13, label %43
    i32 3, label %12
    i32 11, label %13
    i32 2, label %29
    i32 4, label %29
    i32 1, label %30
    i32 5, label %31
    i32 7, label %32
    i32 8, label %33
    i32 10, label %34
  ]

12:                                               ; preds = %3
  call void @RcsShape_meshInertia(ptr noundef nonnull %4, ptr noundef nonnull %0, double noundef %1)
  br label %43

13:                                               ; preds = %3
  %14 = load ptr, ptr @RCS_GLOBAL_RLOG_CB, align 8, !tbaa !15
  %.not = icmp eq ptr %14, null
  br i1 %.not, label %17, label %15

15:                                               ; preds = %13
  %16 = call ptr @RcsShape_name(i32 noundef 11)
  call void (i32, ptr, ptr, i32, ptr, ...) %14(i32 noundef 5, ptr noundef nonnull @.str.7, ptr noundef nonnull @__func__.RcsShape_computeInertiaTensor, i32 noundef 407, ptr noundef nonnull @.str.13, ptr noundef %16) #5
  br label %17

17:                                               ; preds = %15, %13
  %18 = load i32, ptr @RcsLogLevel, align 4, !tbaa !16
  %19 = icmp sgt i32 %18, 4
  br i1 %19, label %20, label %43

20:                                               ; preds = %17
  %21 = load ptr, ptr @stderr, align 8, !tbaa !15
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.7, ptr noundef nonnull @__func__.RcsShape_computeInertiaTensor, i32 noundef 407) #6
  %23 = load ptr, ptr @stderr, align 8, !tbaa !15
  %24 = load i32, ptr %0, align 8, !tbaa !9
  %25 = call ptr @RcsShape_name(i32 noundef %24)
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.13, ptr noundef %25) #6
  %27 = load ptr, ptr @stderr, align 8, !tbaa !15
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.3) #6
  br label %43

29:                                               ; preds = %3, %3
  call void @RcsShape_boxInertia(ptr noundef nonnull %4, double noundef %6, ptr noundef nonnull %7)
  br label %43

30:                                               ; preds = %3
  call void @RcsShape_capsuleInertia(ptr noundef nonnull %4, double noundef %1, double noundef %8, double noundef %10)
  br label %43

31:                                               ; preds = %3
  call void @RcsShape_cylinderInertia(ptr noundef nonnull %4, double noundef %6, double noundef %8, double noundef %10)
  br label %43

32:                                               ; preds = %3
  call void @RcsShape_sphereInertia(ptr noundef nonnull %4, double noundef %6, double noundef %8)
  br label %43

33:                                               ; preds = %3
  call void @RcsShape_coneInertia(ptr noundef nonnull %4, double noundef %6, double noundef %8, double noundef %10)
  br label %43

34:                                               ; preds = %3
  call void @RcsShape_torusInertia(ptr noundef nonnull %4, double noundef %6, double noundef %8, double noundef %10)
  br label %43

35:                                               ; preds = %3
  %36 = load ptr, ptr @stderr, align 8, !tbaa !15
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.7, ptr noundef nonnull @__func__.RcsShape_computeInertiaTensor, i32 noundef 443) #6
  %38 = load ptr, ptr @stderr, align 8, !tbaa !15
  %39 = load i32, ptr %0, align 8, !tbaa !9
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.11, i32 noundef %39) #6
  %41 = load ptr, ptr @stderr, align 8, !tbaa !15
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.3) #6
  call void @print_trace() #5
  call void @exit(i32 noundef 1) #7
  unreachable

43:                                               ; preds = %17, %20, %3, %3, %3, %3, %34, %33, %32, %31, %30, %29, %12
  call void @Mat3d_setDiag(ptr noundef %2, ptr noundef nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  ret void
}

declare void @Mat3d_setZero(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

declare void @Mat3d_setDiag(ptr noundef, ptr noundef) local_unnamed_addr #1

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 = { "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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { cold nounwind }
attributes #7 = { noreturn 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, !11, i64 0}
!10 = !{!"_RcsShape", !11, i64 0, !12, i64 8, !7, i64 104, !6, i64 128, !13, i64 136, !7, i64 137, !14, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !7, i64 0, !7, i64 24}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!11, !11, i64 0}


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