; LLVM IR from shupx/swarm_sync_sim :: src/px4_rotor_sim/src/mavros_px4_quadrotor_sim/px4_modules/mc_pos_control/Positi_011d6a00 (s)

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

%"class.matrix::Vector3" = type { %"class.matrix::Vector" }
%"class.matrix::Vector" = type { %"class.matrix::Matrix" }
%"class.matrix::Matrix" = type { [3 x [1 x float]] }
%"class.matrix::Dcm" = type { %"class.matrix::SquareMatrix" }
%"class.matrix::SquareMatrix" = type { %"class.matrix::Matrix.0" }
%"class.matrix::Matrix.0" = type { [3 x [3 x float]] }
%"class.matrix::Quaternion" = type { %"class.matrix::Vector.1" }
%"class.matrix::Vector.1" = type { %"class.matrix::Matrix.2" }
%"class.matrix::Matrix.2" = type { [4 x [1 x float]] }
%"class.matrix::Euler" = type { %"class.matrix::Vector" }
%struct.vehicle_attitude_setpoint_s = type { i64, float, float, float, float, [4 x float], [3 x float], i8, i8, i8, i8, i8, [7 x i8] }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11ControlMath15bodyzToAttitudeEN6matrix7Vector3IfEEfR27vehicle_attitude_setpoint_s(ptr noundef %0, float noundef %1, ptr noundef nonnull align 8 dereferenceable(64) %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.matrix::Vector3", align 4
  %8 = alloca %"class.matrix::Vector3", align 4
  %9 = alloca %"class.matrix::Vector3", align 4
  %10 = alloca %"class.matrix::Vector3", align 4
  %11 = alloca %"class.matrix::Dcm", align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.matrix::Quaternion", align 4
  %14 = alloca %"class.matrix::Euler", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store float %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %15 = call noundef float @_ZNK6matrix6VectorIfLm3EE12norm_squaredEv(ptr noundef nonnull align 4 dereferenceable(12) %0)
  %16 = fcmp olt float %15, 0x3E80000000000000
  br i1 %16, label %17, label %19

17:                                               ; preds = %3
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 2)
  store float 1.000000e+00, ptr %18, align 4, !tbaa !9
  br label %19

19:                                               ; preds = %17, %3
  call void @_ZN6matrix6VectorIfLm3EE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #7
  %20 = load float, ptr %5, align 4, !tbaa !9
  %21 = call float @sinf(float noundef %20) #7
  %22 = fneg float %21
  %23 = load float, ptr %5, align 4, !tbaa !9
  %24 = call float @cosf(float noundef %23) #7
  call void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %7, float noundef %22, float noundef %24, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #7
  call void @_ZNK6matrix7Vector3IfErmERKNS_6MatrixIfLm3ELm1EEE(ptr dead_on_unwind writable sret(%"class.matrix::Vector3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 2)
  %26 = load float, ptr %25, align 4, !tbaa !9
  %27 = fcmp olt float %26, 0.000000e+00
  br i1 %27, label %28, label %30

28:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #7
  call void @_ZNK6matrix7Vector3IfEngEv(ptr dead_on_unwind writable sret(%"class.matrix::Vector3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %29 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #7
  br label %30

30:                                               ; preds = %28, %19
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 2)
  %32 = load float, ptr %31, align 4, !tbaa !9
  %33 = call float @llvm.fabs.f32(float %32)
  %34 = fcmp olt float %33, 0x3EB0C6F7A0000000
  br i1 %34, label %35, label %37

35:                                               ; preds = %30
  call void @_ZN6matrix6MatrixIfLm3ELm1EE4zeroEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %36 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %8, i64 noundef 2)
  store float 1.000000e+00, ptr %36, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %35, %30
  call void @_ZN6matrix6VectorIfLm3EE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #7
  call void @_ZNK6matrix7Vector3IfErmERKNS_6MatrixIfLm3ELm1EEE(ptr dead_on_unwind writable sret(%"class.matrix::Vector3") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.start.p0(i64 36, ptr %11) #7
  call void @_ZN6matrix3DcmIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(36) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %38

38:                                               ; preds = %64, %37
  %39 = load i32, ptr %12, align 4, !tbaa !11
  %40 = icmp slt i32 %39, 3
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %67

42:                                               ; preds = %38
  %43 = load i32, ptr %12, align 4, !tbaa !11
  %44 = sext i32 %43 to i64
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %8, i64 noundef %44)
  %46 = load float, ptr %45, align 4, !tbaa !9
  %47 = load i32, ptr %12, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %11, i64 noundef %48, i64 noundef 0)
  store float %46, ptr %49, align 4, !tbaa !9
  %50 = load i32, ptr %12, align 4, !tbaa !11
  %51 = sext i32 %50 to i64
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %10, i64 noundef %51)
  %53 = load float, ptr %52, align 4, !tbaa !9
  %54 = load i32, ptr %12, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %11, i64 noundef %55, i64 noundef 1)
  store float %53, ptr %56, align 4, !tbaa !9
  %57 = load i32, ptr %12, align 4, !tbaa !11
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef %58)
  %60 = load float, ptr %59, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %11, i64 noundef %62, i64 noundef 2)
  store float %60, ptr %63, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %42
  %65 = load i32, ptr %12, align 4, !tbaa !11
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %12, align 4, !tbaa !11
  br label %38, !llvm.loop !13

67:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #7
  call void @_ZN6matrix10QuaternionIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(36) %11)
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.vehicle_attitude_setpoint_s, ptr %68, i32 0, i32 5
  %70 = getelementptr inbounds [4 x float], ptr %69, i64 0, i64 0
  call void @_ZNK6matrix6MatrixIfLm4ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef %70)
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  call void @_ZN6matrix5EulerIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(36) %11)
  %71 = call noundef float @_ZNK6matrix5EulerIfE3phiEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.vehicle_attitude_setpoint_s, ptr %72, i32 0, i32 1
  store float %71, ptr %73, align 8, !tbaa !15
  %74 = call noundef float @_ZNK6matrix5EulerIfE5thetaEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.vehicle_attitude_setpoint_s, ptr %75, i32 0, i32 2
  store float %74, ptr %76, align 4, !tbaa !19
  %77 = call noundef float @_ZNK6matrix5EulerIfE3psiEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.vehicle_attitude_setpoint_s, ptr %78, i32 0, i32 3
  store float %77, ptr %79, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6matrix7Vector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.matrix::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix6VectorIfLm3EE12norm_squaredEv(ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) #4 align 2

; Function Attrs: nounwind
declare float @cosf(float noundef) #5

; Function Attrs: nounwind
declare float @sinf(float noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6matrix6VectorIfLm3EE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6matrix7Vector3IfErmERKNS_6MatrixIfLm3ELm1EEE(ptr dead_on_unwind noalias writable sret(%"class.matrix::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6matrix6MatrixIfLm3ELm1EE4zeroEv(ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix3DcmIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef, i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix10QuaternionIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6matrix6MatrixIfLm4ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix5EulerIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix5EulerIfE3phiEv(ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix5EulerIfE5thetaEv(ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix5EulerIfE3psiEv(ptr noundef nonnull align 4 dereferenceable(12)) #4 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTS27vehicle_attitude_setpoint_s", !17, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 40, !18, i64 52, !18, i64 53, !18, i64 54, !18, i64 55, !7, i64 56, !7, i64 57}
!17 = !{!"long", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!16, !10, i64 12}
!20 = !{!16, !10, i64 16}


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

%"class.matrix::Vector3" = type { %"class.matrix::Vector" }
%"class.matrix::Vector" = type { %"class.matrix::Matrix" }
%"class.matrix::Matrix" = type { [3 x [1 x float]] }
%"class.matrix::Dcm" = type { %"class.matrix::SquareMatrix" }
%"class.matrix::SquareMatrix" = type { %"class.matrix::Matrix.0" }
%"class.matrix::Matrix.0" = type { [3 x [3 x float]] }
%"class.matrix::Quaternion" = type { %"class.matrix::Vector.1" }
%"class.matrix::Vector.1" = type { %"class.matrix::Matrix.2" }
%"class.matrix::Matrix.2" = type { [4 x [1 x float]] }
%"class.matrix::Euler" = type { %"class.matrix::Vector" }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11ControlMath15bodyzToAttitudeEN6matrix7Vector3IfEEfR27vehicle_attitude_setpoint_s(ptr noundef nonnull %0, float noundef %1, ptr noundef nonnull align 8 dereferenceable(64) %2) local_unnamed_addr #0 {
  %4 = alloca %"class.matrix::Vector3", align 4
  %5 = alloca %"class.matrix::Vector3", align 4
  %6 = alloca %"class.matrix::Vector3", align 4
  %7 = alloca %"class.matrix::Vector3", align 4
  %8 = alloca %"class.matrix::Dcm", align 4
  %9 = alloca %"class.matrix::Quaternion", align 4
  %10 = alloca %"class.matrix::Euler", align 4
  %11 = tail call noundef float @_ZNK6matrix6VectorIfLm3EE12norm_squaredEv(ptr noundef nonnull align 4 dereferenceable(12) %0)
  %12 = fcmp olt float %11, 0x3E80000000000000
  br i1 %12, label %13, label %15

13:                                               ; preds = %3
  %14 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 2)
  store float 1.000000e+00, ptr %14, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %13, %3
  tail call void @_ZN6matrix6VectorIfLm3EE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #7
  %16 = tail call float @sinf(float noundef %1) #7
  %17 = fneg float %16
  %18 = tail call float @cosf(float noundef %1) #7
  call void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %17, float noundef %18, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  call void @_ZNK6matrix7Vector3IfErmERKNS_6MatrixIfLm3ELm1EEE(ptr dead_on_unwind nonnull writable sret(%"class.matrix::Vector3") align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 2)
  %20 = load float, ptr %19, align 4, !tbaa !5
  %21 = fcmp olt float %20, 0.000000e+00
  br i1 %21, label %22, label %24

22:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  call void @_ZNK6matrix7Vector3IfEngEv(ptr dead_on_unwind nonnull writable sret(%"class.matrix::Vector3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %5)
  %23 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  br label %24

24:                                               ; preds = %22, %15
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 2)
  %26 = load float, ptr %25, align 4, !tbaa !5
  %27 = call float @llvm.fabs.f32(float %26)
  %28 = fcmp olt float %27, 0x3EB0C6F7A0000000
  br i1 %28, label %29, label %31

29:                                               ; preds = %24
  call void @_ZN6matrix6MatrixIfLm3ELm1EE4zeroEv(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %5, i64 noundef 2)
  store float 1.000000e+00, ptr %30, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %29, %24
  call void @_ZN6matrix6VectorIfLm3EE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  call void @_ZNK6matrix7Vector3IfErmERKNS_6MatrixIfLm3ELm1EEE(ptr dead_on_unwind nonnull writable sret(%"class.matrix::Vector3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %8) #7
  call void @_ZN6matrix3DcmIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(36) %8)
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %5, i64 noundef 0)
  %33 = load float, ptr %32, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 0, i64 noundef 0)
  store float %33, ptr %34, align 4, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %7, i64 noundef 0)
  %36 = load float, ptr %35, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 0, i64 noundef 1)
  store float %36, ptr %37, align 4, !tbaa !5
  %38 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 0)
  %39 = load float, ptr %38, align 4, !tbaa !5
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 0, i64 noundef 2)
  store float %39, ptr %40, align 4, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %5, i64 noundef 1)
  %42 = load float, ptr %41, align 4, !tbaa !5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 1, i64 noundef 0)
  store float %42, ptr %43, align 4, !tbaa !5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %7, i64 noundef 1)
  %45 = load float, ptr %44, align 4, !tbaa !5
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 1, i64 noundef 1)
  store float %45, ptr %46, align 4, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 1)
  %48 = load float, ptr %47, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 1, i64 noundef 2)
  store float %48, ptr %49, align 4, !tbaa !5
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %5, i64 noundef 2)
  %51 = load float, ptr %50, align 4, !tbaa !5
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 2, i64 noundef 0)
  store float %51, ptr %52, align 4, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %7, i64 noundef 2)
  %54 = load float, ptr %53, align 4, !tbaa !5
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 2, i64 noundef 1)
  store float %54, ptr %55, align 4, !tbaa !5
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %0, i64 noundef 2)
  %57 = load float, ptr %56, align 4, !tbaa !5
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %8, i64 noundef 2, i64 noundef 2)
  store float %57, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @_ZN6matrix10QuaternionIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(36) %8)
  %59 = getelementptr inbounds i8, ptr %2, i64 24
  call void @_ZNK6matrix6MatrixIfLm4ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull %59)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  call void @_ZN6matrix5EulerIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(36) %8)
  %60 = call noundef float @_ZNK6matrix5EulerIfE3phiEv(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %61 = getelementptr inbounds i8, ptr %2, i64 8
  store float %60, ptr %61, align 8, !tbaa !9
  %62 = call noundef float @_ZNK6matrix5EulerIfE5thetaEv(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %63 = getelementptr inbounds i8, ptr %2, i64 12
  store float %62, ptr %63, align 4, !tbaa !13
  %64 = call noundef float @_ZNK6matrix5EulerIfE3psiEv(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %65 = getelementptr inbounds i8, ptr %2, i64 16
  store float %64, ptr %65, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #7
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6matrix7Vector3IfEngEv(ptr dead_on_unwind noalias writable sret(%"class.matrix::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix6VectorIfLm3EE12norm_squaredEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sinf(float noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6matrix6VectorIfLm3EE9normalizeEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK6matrix7Vector3IfErmERKNS_6MatrixIfLm3ELm1EEE(ptr dead_on_unwind noalias writable sret(%"class.matrix::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6matrix6MatrixIfLm3ELm1EE4zeroEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix3DcmIfEC2Ev(ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6matrix6MatrixIfLm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef, i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix10QuaternionIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6matrix6MatrixIfLm4ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix5EulerIfEC2ERKNS_3DcmIfEE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(36)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix5EulerIfE3phiEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix5EulerIfE5thetaEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK6matrix5EulerIfE3psiEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTS27vehicle_attitude_setpoint_s", !11, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !7, i64 24, !7, i64 40, !12, i64 52, !12, i64 53, !12, i64 54, !12, i64 55, !7, i64 56, !7, i64 57}
!11 = !{!"long", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!10, !6, i64 12}
!14 = !{!10, !6, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass