; LLVM IR from shupx/swarm_sync_sim :: src/px4_rotor_sim/src/mavros_px4_quadrotor_sim/px4_modules/mc_pos_control/Positi_e0d0f357 (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.PositionControl = type { %"class.matrix::Vector3", %"class.matrix::Vector3", %"class.matrix::Vector3", %"class.matrix::Vector3", float, float, float, float, float, float, float, float, %"class.matrix::Vector3", %"class.matrix::Vector3", %"class.matrix::Vector3", %"class.matrix::Vector3", float, %"class.matrix::Vector3", %"class.matrix::Vector3", %"class.matrix::Vector3", %"class.matrix::Vector3", float, float }
%"class.matrix::Vector3" = type { %"class.matrix::Vector" }
%"class.matrix::Vector" = type { %"class.matrix::Matrix" }
%"class.matrix::Matrix" = type { [3 x [1 x float]] }
%struct.vehicle_local_position_setpoint_s = type { i64, float, float, float, float, float, float, float, float, [3 x float], [3 x float], [3 x float], [4 x i8] }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK15PositionControl24getLocalPositionSetpointER33vehicle_local_position_setpoint_s(ptr noundef nonnull align 4 dereferenceable(188) %0, ptr noundef nonnull align 8 dereferenceable(80) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 17
  %7 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %6, i64 noundef 0)
  %8 = load float, ptr %7, align 4, !tbaa !9
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %9, i32 0, i32 1
  store float %8, ptr %10, align 8, !tbaa !11
  %11 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 17
  %12 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %11, i64 noundef 1)
  %13 = load float, ptr %12, align 4, !tbaa !9
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %14, i32 0, i32 2
  store float %13, ptr %15, align 4, !tbaa !14
  %16 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 17
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %16, i64 noundef 2)
  %18 = load float, ptr %17, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %19, i32 0, i32 3
  store float %18, ptr %20, align 8, !tbaa !15
  %21 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 21
  %22 = load float, ptr %21, align 4, !tbaa !16
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %23, i32 0, i32 4
  store float %22, ptr %24, align 4, !tbaa !21
  %25 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 22
  %26 = load float, ptr %25, align 4, !tbaa !22
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %27, i32 0, i32 5
  store float %26, ptr %28, align 8, !tbaa !23
  %29 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 18
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %29, i64 noundef 0)
  %31 = load float, ptr %30, align 4, !tbaa !9
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %32, i32 0, i32 6
  store float %31, ptr %33, align 4, !tbaa !24
  %34 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 18
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %34, i64 noundef 1)
  %36 = load float, ptr %35, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %37, i32 0, i32 7
  store float %36, ptr %38, align 8, !tbaa !25
  %39 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 18
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %39, i64 noundef 2)
  %41 = load float, ptr %40, align 4, !tbaa !9
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %42, i32 0, i32 8
  store float %41, ptr %43, align 4, !tbaa !26
  %44 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 19
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %45, i32 0, i32 9
  %47 = getelementptr inbounds [3 x float], ptr %46, i64 0, i64 0
  call void @_ZNK6matrix6MatrixIfLm3ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(12) %44, ptr noundef %47)
  %48 = getelementptr inbounds %class.PositionControl, ptr %5, i32 0, i32 20
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %49, i32 0, i32 11
  %51 = getelementptr inbounds [3 x float], ptr %50, i64 0, i64 0
  call void @_ZNK6matrix6MatrixIfLm3ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef %51)
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK6matrix6MatrixIfLm3ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) #2 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 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 = { 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" }

!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, !10, i64 8}
!12 = !{!"_ZTS33vehicle_local_position_setpoint_s", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 52, !7, i64 64, !7, i64 76}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !10, i64 12}
!15 = !{!12, !10, i64 16}
!16 = !{!17, !10, i64 180}
!17 = !{!"_ZTS15PositionControl", !18, i64 0, !18, i64 12, !18, i64 24, !18, i64 36, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !18, i64 80, !18, i64 92, !18, i64 104, !18, i64 116, !10, i64 128, !18, i64 132, !18, i64 144, !18, i64 156, !18, i64 168, !10, i64 180, !10, i64 184}
!18 = !{!"_ZTSN6matrix7Vector3IfEE", !19, i64 0}
!19 = !{!"_ZTSN6matrix6VectorIfLm3EEE", !20, i64 0}
!20 = !{!"_ZTSN6matrix6MatrixIfLm3ELm1EEE", !7, i64 0}
!21 = !{!12, !10, i64 20}
!22 = !{!17, !10, i64 184}
!23 = !{!12, !10, i64 24}
!24 = !{!12, !10, i64 28}
!25 = !{!12, !10, i64 32}
!26 = !{!12, !10, i64 36}


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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK15PositionControl24getLocalPositionSetpointER33vehicle_local_position_setpoint_s(ptr noundef nonnull align 4 dereferenceable(188) %0, ptr noundef nonnull align 8 dereferenceable(80) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 132
  %4 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %3, i64 noundef 0)
  %5 = load float, ptr %4, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  store float %5, ptr %6, align 8, !tbaa !9
  %7 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %3, i64 noundef 1)
  %8 = load float, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 12
  store float %8, ptr %9, align 4, !tbaa !12
  %10 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %3, i64 noundef 2)
  %11 = load float, ptr %10, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  store float %11, ptr %12, align 8, !tbaa !13
  %13 = getelementptr inbounds i8, ptr %0, i64 180
  %14 = getelementptr inbounds i8, ptr %1, i64 20
  %15 = load <2 x float>, ptr %13, align 4, !tbaa !5
  store <2 x float> %15, ptr %14, align 4, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %0, i64 144
  %17 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %16, i64 noundef 0)
  %18 = load float, ptr %17, align 4, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %1, i64 28
  store float %18, ptr %19, align 4, !tbaa !14
  %20 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %16, i64 noundef 1)
  %21 = load float, ptr %20, align 4, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %1, i64 32
  store float %21, ptr %22, align 8, !tbaa !15
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6matrix6VectorIfLm3EEclEm(ptr noundef nonnull align 4 dereferenceable(12) %16, i64 noundef 2)
  %24 = load float, ptr %23, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %1, i64 36
  store float %24, ptr %25, align 4, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %0, i64 156
  %27 = getelementptr inbounds i8, ptr %1, i64 40
  tail call void @_ZNK6matrix6MatrixIfLm3ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull %27)
  %28 = getelementptr inbounds i8, ptr %0, i64 168
  %29 = getelementptr inbounds i8, ptr %1, i64 64
  tail call void @_ZNK6matrix6MatrixIfLm3ELm1EE6copyToEPf(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull %29)
  ret void
}

; 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 #1 align 2

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

attributes #0 = { 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 #1 = { 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" }

!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 = !{!"_ZTS33vehicle_local_position_setpoint_s", !11, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !7, i64 40, !7, i64 52, !7, i64 64, !7, i64 76}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !6, i64 12}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !6, i64 28}
!15 = !{!10, !6, i64 32}
!16 = !{!10, !6, i64 36}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass