; LLVM IR from shupx/swarm_sync_sim :: src/px4_rotor_sim/src/mavros_px4_quadrotor_sim/px4_modules/mc_pos_control/Positi_ea563750 (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]] }
%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] }
%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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15PositionControl16setInputSetpointERK33vehicle_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
  %5 = alloca %"class.matrix::Vector3", align 4
  %6 = alloca %"class.matrix::Vector3", align 4
  %7 = alloca %"class.matrix::Vector3", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #4
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %9, i32 0, i32 1
  %11 = load float, ptr %10, align 8, !tbaa !9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %12, i32 0, i32 2
  %14 = load float, ptr %13, align 4, !tbaa !13
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %15, i32 0, i32 3
  %17 = load float, ptr %16, align 8, !tbaa !14
  call void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %11, float noundef %14, float noundef %17)
  %18 = getelementptr inbounds %class.PositionControl, ptr %8, i32 0, i32 17
  %19 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #4
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %20, i32 0, i32 6
  %22 = load float, ptr %21, align 4, !tbaa !15
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %23, i32 0, i32 7
  %25 = load float, ptr %24, align 8, !tbaa !16
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %26, i32 0, i32 8
  %28 = load float, ptr %27, align 4, !tbaa !17
  call void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %6, float noundef %22, float noundef %25, float noundef %28)
  %29 = getelementptr inbounds %class.PositionControl, ptr %8, i32 0, i32 18
  %30 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #4
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %31, i32 0, i32 9
  %33 = getelementptr inbounds [3 x float], ptr %32, i64 0, i64 0
  call void @_ZN6matrix7Vector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef %33)
  %34 = getelementptr inbounds %class.PositionControl, ptr %8, i32 0, i32 19
  %35 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #4
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %36, i32 0, i32 4
  %38 = load float, ptr %37, align 4, !tbaa !18
  %39 = getelementptr inbounds %class.PositionControl, ptr %8, i32 0, i32 21
  store float %38, ptr %39, align 4, !tbaa !19
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.vehicle_local_position_setpoint_s, ptr %40, i32 0, i32 5
  %42 = load float, ptr %41, align 8, !tbaa !24
  %43 = getelementptr inbounds %class.PositionControl, ptr %8, i32 0, i32 22
  store float %42, ptr %43, align 4, !tbaa !25
  ret void
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix7Vector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) unnamed_addr #0 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #3 = { 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 #4 = { 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, !12, i64 8}
!10 = !{!"_ZTS33vehicle_local_position_setpoint_s", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !7, i64 40, !7, i64 52, !7, i64 64, !7, i64 76}
!11 = !{!"long", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !12, i64 12}
!14 = !{!10, !12, i64 16}
!15 = !{!10, !12, i64 28}
!16 = !{!10, !12, i64 32}
!17 = !{!10, !12, i64 36}
!18 = !{!10, !12, i64 20}
!19 = !{!20, !12, i64 180}
!20 = !{!"_ZTS15PositionControl", !21, i64 0, !21, i64 12, !21, i64 24, !21, i64 36, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !21, i64 80, !21, i64 92, !21, i64 104, !21, i64 116, !12, i64 128, !21, i64 132, !21, i64 144, !21, i64 156, !21, i64 168, !12, i64 180, !12, i64 184}
!21 = !{!"_ZTSN6matrix7Vector3IfEE", !22, i64 0}
!22 = !{!"_ZTSN6matrix6VectorIfLm3EEE", !23, i64 0}
!23 = !{!"_ZTSN6matrix6MatrixIfLm3ELm1EEE", !7, i64 0}
!24 = !{!10, !12, i64 24}
!25 = !{!20, !12, i64 184}


; 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]] }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15PositionControl16setInputSetpointERK33vehicle_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 = alloca %"class.matrix::Vector3", align 4
  %4 = alloca %"class.matrix::Vector3", align 4
  %5 = alloca %"class.matrix::Vector3", align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #4
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load float, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 12
  %9 = load float, ptr %8, align 4, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %1, i64 16
  %11 = load float, ptr %10, align 8, !tbaa !12
  call void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %3, float noundef %7, float noundef %9, float noundef %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 132
  %13 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #4
  %14 = getelementptr inbounds i8, ptr %1, i64 28
  %15 = load float, ptr %14, align 4, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %1, i64 32
  %17 = load float, ptr %16, align 8, !tbaa !14
  %18 = getelementptr inbounds i8, ptr %1, i64 36
  %19 = load float, ptr %18, align 4, !tbaa !15
  call void @_ZN6matrix7Vector3IfEC2Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %15, float noundef %17, float noundef %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 144
  %21 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #4
  %22 = getelementptr inbounds i8, ptr %1, i64 40
  call void @_ZN6matrix7Vector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull %22)
  %23 = getelementptr inbounds i8, ptr %0, i64 156
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN6matrix7Vector3IfEaSEOS1_(ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  %25 = getelementptr inbounds i8, ptr %1, i64 20
  %26 = getelementptr inbounds i8, ptr %0, i64 180
  %27 = load <2 x float>, ptr %25, align 4, !tbaa !16
  store <2 x float> %27, ptr %26, align 4, !tbaa !16
  ret void
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6matrix7Vector3IfEC2EPKf(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) unnamed_addr #0 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #3 = { 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 #4 = { 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 8}
!6 = !{!"_ZTS33vehicle_local_position_setpoint_s", !7, 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, !8, i64 40, !8, i64 52, !8, i64 64, !8, i64 76}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!6, !10, i64 12}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !10, i64 28}
!14 = !{!6, !10, i64 32}
!15 = !{!6, !10, i64 36}
!16 = !{!10, !10, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass