; LLVM IR from drohmer/cgp :: library/cgp/10_camera_model/camera_model/camera_first_person_euler/camera_first/30d8eab7 (yawEfff)

; 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.cgp::camera_first_person_euler" = type <{ %"struct.cgp::camera_generic_base", float, float, float, %"struct.cgp::numarray_stack", %"struct.cgp::numarray_stack", [4 x i8] }>
%"struct.cgp::camera_generic_base" = type { ptr }
%"struct.cgp::numarray_stack" = type { float, float, float }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN3cgp25camera_first_person_euler33manipulator_rotate_roll_pitch_yawEfff(ptr noundef nonnull align 8 dereferenceable(44) %0, float noundef %1, float noundef %2, float noundef %3) #0 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store float %1, ptr %6, align 4, !tbaa !9
  store float %2, ptr %7, align 4, !tbaa !9
  store float %3, ptr %8, align 4, !tbaa !9
  %9 = load ptr, ptr %5, align 8
  %10 = load float, ptr %6, align 4, !tbaa !9
  %11 = getelementptr inbounds %"struct.cgp::camera_first_person_euler", ptr %9, i32 0, i32 1
  %12 = load float, ptr %11, align 8, !tbaa !11
  %13 = fadd float %12, %10
  store float %13, ptr %11, align 8, !tbaa !11
  %14 = load float, ptr %7, align 4, !tbaa !9
  %15 = getelementptr inbounds %"struct.cgp::camera_first_person_euler", ptr %9, i32 0, i32 2
  %16 = load float, ptr %15, align 4, !tbaa !15
  %17 = fadd float %16, %14
  store float %17, ptr %15, align 4, !tbaa !15
  %18 = load float, ptr %8, align 4, !tbaa !9
  %19 = getelementptr inbounds %"struct.cgp::camera_first_person_euler", ptr %9, i32 0, i32 3
  %20 = load float, ptr %19, align 8, !tbaa !16
  %21 = fadd float %20, %18
  store float %21, ptr %19, align 8, !tbaa !16
  ret void
}

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

!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 = !{!"_ZTSN3cgp25camera_first_person_eulerE", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !14, i64 20, !14, i64 32}
!13 = !{!"_ZTSN3cgp19camera_generic_baseE"}
!14 = !{!"_ZTSN3cgp14numarray_stackIfLi3EEE", !10, i64 0, !10, i64 4, !10, i64 8}
!15 = !{!12, !10, i64 12}
!16 = !{!12, !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"

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local void @_ZN3cgp25camera_first_person_euler33manipulator_rotate_roll_pitch_yawEfff(ptr nocapture noundef nonnull align 8 dereferenceable(44) %0, float noundef %1, float noundef %2, float noundef %3) local_unnamed_addr #0 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load <2 x float>, ptr %5, align 8, !tbaa !5
  %7 = insertelement <2 x float> poison, float %1, i64 0
  %8 = insertelement <2 x float> %7, float %2, i64 1
  %9 = fadd <2 x float> %6, %8
  store <2 x float> %9, ptr %5, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load float, ptr %10, align 8, !tbaa !9
  %12 = fadd float %11, %3
  store float %12, ptr %10, align 8, !tbaa !9
  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++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"_ZTSN3cgp25camera_first_person_eulerE", !11, i64 0, !6, i64 8, !6, i64 12, !6, i64 16, !12, i64 20, !12, i64 32}
!11 = !{!"_ZTSN3cgp19camera_generic_baseE"}
!12 = !{!"_ZTSN3cgp14numarray_stackIfLi3EEE", !6, i64 0, !6, i64 4, !6, i64 8}


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