; LLVM IR from ebirenbaum/ParticleSolver :: gpu/src/rendering/orbitingcamera.ll (ZN14OrbitingCameraC2Ev)

; 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.OrbitingCamera = type { ptr, %"struct.glm::detail::tmat4x4", %"struct.glm::detail::tmat4x4", %"struct.glm::detail::tmat4x4", %"struct.glm::detail::tmat4x4", float, float, float, float, i32, i32, float, float }
%"struct.glm::detail::tmat4x4" = type { [4 x %"struct.glm::detail::tvec4"] }
%"struct.glm::detail::tvec4" = type { %union.anon, %union.anon.0, %union.anon.1, %union.anon.2 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%union.anon.2 = type { float }

@_ZTV14OrbitingCamera = external dso_local unnamed_addr constant { [13 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14OrbitingCameraC2Ev(ptr noundef nonnull align 8 dereferenceable(296) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  store ptr getelementptr inbounds inrange(-16, 88) ({ [13 x ptr] }, ptr @_ZTV14OrbitingCamera, i32 0, i32 0, i32 2), ptr %3, align 8, !tbaa !9
  %4 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 1
  call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %4)
  %5 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 2
  call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %5)
  %6 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 3
  call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %6)
  %7 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 4
  call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %7)
  %8 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 5
  store float 1.000000e+00, ptr %8, align 8, !tbaa !11
  %9 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 7
  store float 0.000000e+00, ptr %9, align 8, !tbaa !16
  %10 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 6
  store float 0.000000e+00, ptr %10, align 4, !tbaa !17
  %11 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 11
  store float 5.000000e+00, ptr %11, align 8, !tbaa !18
  %12 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 8
  store float -2.000000e+01, ptr %12, align 4, !tbaa !19
  %13 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 7
  store float -4.500000e+01, ptr %13, align 8, !tbaa !16
  %14 = getelementptr inbounds %class.OrbitingCamera, ptr %3, i32 0, i32 12
  store float 0.000000e+00, ptr %14, align 4, !tbaa !20
  call void @_ZN14OrbitingCamera14updateMatricesEv(ptr noundef nonnull align 8 dereferenceable(296) %3)
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14OrbitingCamera14updateMatricesEv(ptr noundef nonnull align 8 dereferenceable(296)) #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 = { 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" }

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !14, i64 264}
!12 = !{!"_ZTS14OrbitingCamera", !13, i64 8, !13, i64 72, !13, i64 136, !13, i64 200, !14, i64 264, !14, i64 268, !14, i64 272, !14, i64 276, !15, i64 280, !15, i64 284, !14, i64 288, !14, i64 292}
!13 = !{!"_ZTSN3glm6detail7tmat4x4IfLNS_9precisionE0EEE", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!12, !14, i64 272}
!17 = !{!12, !14, i64 268}
!18 = !{!12, !14, i64 288}
!19 = !{!12, !14, i64 276}
!20 = !{!12, !14, i64 292}


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

@_ZTV14OrbitingCamera = external dso_local unnamed_addr constant { [13 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14OrbitingCameraC2Ev(ptr noundef nonnull align 8 dereferenceable(296) %0) unnamed_addr #0 align 2 {
  store ptr getelementptr inbounds inrange(-16, 88) (i8, ptr @_ZTV14OrbitingCamera, i64 16), ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %2)
  %3 = getelementptr inbounds i8, ptr %0, i64 72
  tail call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %3)
  %4 = getelementptr inbounds i8, ptr %0, i64 136
  tail call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @_ZN3glm6detail7tmat4x4IfLNS_9precisionE0EEC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %5)
  %6 = getelementptr inbounds i8, ptr %0, i64 264
  %7 = getelementptr inbounds i8, ptr %0, i64 288
  store <4 x float> <float 1.000000e+00, float 0.000000e+00, float -4.500000e+01, float -2.000000e+01>, ptr %6, align 8, !tbaa !8
  store <2 x float> <float 5.000000e+00, float 0.000000e+00>, ptr %7, align 8, !tbaa !8
  tail call void @_ZN14OrbitingCamera14updateMatricesEv(ptr noundef nonnull align 8 dereferenceable(296) %0)
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14OrbitingCamera14updateMatricesEv(ptr noundef nonnull align 8 dereferenceable(296)) local_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 = { 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" }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"float", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}


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