; LLVM IR from pms67/HadesFCS :: Firmware/F4Quad/Core/Src (KalmanRollPitchYaw)

; 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.KalmanRollPitchYaw = type { float, float, float, [9 x float], [3 x float], float, float, [3 x float] }

; Function Attrs: nounwind uwtable
define dso_local void @KalmanRollPitchYaw_Init(ptr noundef %0, float noundef %1, ptr noundef %2, float noundef %3, float noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store float %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store float %3, ptr %9, align 4, !tbaa !9
  store float %4, ptr %10, align 4, !tbaa !9
  %11 = load ptr, ptr %6, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %11, i32 0, i32 0
  store float 0.000000e+00, ptr %12, align 4, !tbaa !11
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %13, i32 0, i32 1
  store float 0.000000e+00, ptr %14, align 4, !tbaa !13
  %15 = load float, ptr %7, align 4, !tbaa !9
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %16, i32 0, i32 3
  %18 = getelementptr inbounds [9 x float], ptr %17, i64 0, i64 0
  store float %15, ptr %18, align 4, !tbaa !9
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %19, i32 0, i32 3
  %21 = getelementptr inbounds [9 x float], ptr %20, i64 0, i64 1
  store float 0.000000e+00, ptr %21, align 4, !tbaa !9
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %22, i32 0, i32 3
  %24 = getelementptr inbounds [9 x float], ptr %23, i64 0, i64 2
  store float 0.000000e+00, ptr %24, align 4, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %25, i32 0, i32 3
  %27 = getelementptr inbounds [9 x float], ptr %26, i64 0, i64 3
  store float 0.000000e+00, ptr %27, align 4, !tbaa !9
  %28 = load float, ptr %7, align 4, !tbaa !9
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %29, i32 0, i32 3
  %31 = getelementptr inbounds [9 x float], ptr %30, i64 0, i64 4
  store float %28, ptr %31, align 4, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %32, i32 0, i32 3
  %34 = getelementptr inbounds [9 x float], ptr %33, i64 0, i64 5
  store float 0.000000e+00, ptr %34, align 4, !tbaa !9
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %35, i32 0, i32 3
  %37 = getelementptr inbounds [9 x float], ptr %36, i64 0, i64 6
  store float 0.000000e+00, ptr %37, align 4, !tbaa !9
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %38, i32 0, i32 3
  %40 = getelementptr inbounds [9 x float], ptr %39, i64 0, i64 7
  store float 0.000000e+00, ptr %40, align 4, !tbaa !9
  %41 = load float, ptr %7, align 4, !tbaa !9
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %42, i32 0, i32 3
  %44 = getelementptr inbounds [9 x float], ptr %43, i64 0, i64 8
  store float %41, ptr %44, align 4, !tbaa !9
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = getelementptr inbounds float, ptr %45, i64 0
  %47 = load float, ptr %46, align 4, !tbaa !9
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %48, i32 0, i32 4
  %50 = getelementptr inbounds [3 x float], ptr %49, i64 0, i64 0
  store float %47, ptr %50, align 4, !tbaa !9
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds float, ptr %51, i64 1
  %53 = load float, ptr %52, align 4, !tbaa !9
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %54, i32 0, i32 4
  %56 = getelementptr inbounds [3 x float], ptr %55, i64 0, i64 1
  store float %53, ptr %56, align 4, !tbaa !9
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds float, ptr %57, i64 2
  %59 = load float, ptr %58, align 4, !tbaa !9
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %60, i32 0, i32 4
  %62 = getelementptr inbounds [3 x float], ptr %61, i64 0, i64 2
  store float %59, ptr %62, align 4, !tbaa !9
  %63 = load float, ptr %9, align 4, !tbaa !9
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %64, i32 0, i32 5
  store float %63, ptr %65, align 4, !tbaa !14
  %66 = load float, ptr %10, align 4, !tbaa !9
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %67, i32 0, i32 6
  store float %66, ptr %68, align 4, !tbaa !15
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %69, i32 0, i32 7
  %71 = getelementptr inbounds [3 x float], ptr %70, i64 0, i64 0
  store float 0.000000e+00, ptr %71, align 4, !tbaa !9
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %72, i32 0, i32 7
  %74 = getelementptr inbounds [3 x float], ptr %73, i64 0, i64 1
  store float 0.000000e+00, ptr %74, align 4, !tbaa !9
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.KalmanRollPitchYaw, ptr %75, i32 0, i32 7
  %77 = getelementptr inbounds [3 x float], ptr %76, i64 0, i64 2
  store float 0.000000e+00, ptr %77, align 4, !tbaa !9
  ret void
}

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

!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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 48, !10, i64 60, !10, i64 64, !7, i64 68}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 60}
!15 = !{!12, !10, i64 64}


; 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 nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @KalmanRollPitchYaw_Init(ptr nocapture noundef writeonly %0, float noundef %1, ptr nocapture noundef readonly %2, float noundef %3, float noundef %4) local_unnamed_addr #0 {
  store <2 x float> zeroinitializer, ptr %0, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 12
  store float %1, ptr %6, align 4, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  store <2 x float> zeroinitializer, ptr %7, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  store float 0.000000e+00, ptr %8, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 28
  store float %1, ptr %9, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  store <2 x float> zeroinitializer, ptr %10, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  store float 0.000000e+00, ptr %11, align 4, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 44
  store float %1, ptr %12, align 4, !tbaa !5
  %13 = load float, ptr %2, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 48
  store float %13, ptr %14, align 4, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %2, i64 4
  %16 = load float, ptr %15, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 52
  store float %16, ptr %17, align 4, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %2, i64 8
  %19 = load float, ptr %18, align 4, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %0, i64 56
  store float %19, ptr %20, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 60
  store float %3, ptr %21, align 4, !tbaa !9
  %22 = getelementptr inbounds i8, ptr %0, i64 64
  store float %4, ptr %22, align 4, !tbaa !11
  %23 = getelementptr inbounds i8, ptr %0, i64 68
  store <2 x float> zeroinitializer, ptr %23, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %0, i64 76
  store float 0.000000e+00, ptr %24, align 4, !tbaa !5
  ret void
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) 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/C++ TBAA"}
!9 = !{!10, !6, i64 60}
!10 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !7, i64 12, !7, i64 48, !6, i64 60, !6, i64 64, !7, i64 68}
!11 = !{!10, !6, i64 64}


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