; LLVM IR from awawa-dev/HyperHDR :: sources/effects/Animation_SystemShutdown.ll (ZN24Animation_SystemShutdownC2Ev)

; 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.Point3d = type { i8, i8, i8 }
%class.Animation_SystemShutdown = type <{ %class.AnimationBase.base, [3 x i8], double, %struct.Point3d, %struct.Point3d, i8, i8, i8, [3 x i8], i32, i32, [4 x i8] }>
%class.AnimationBase.base = type <{ ptr, i32, i8 }>

@_ZTV24Animation_SystemShutdown = external dso_local unnamed_addr constant { [10 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24Animation_SystemShutdownC2Ev(ptr noundef nonnull align 8 dereferenceable(44) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.Point3d, align 1
  %4 = alloca %struct.Point3d, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  call void @_ZN13AnimationBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(13) %5)
  store ptr getelementptr inbounds inrange(-16, 64) ({ [10 x ptr] }, ptr @_ZTV24Animation_SystemShutdown, i32 0, i32 0, i32 2), ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 3
  %7 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 4
  %8 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 2
  store double 6.000000e-01, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 3, ptr %3) #4
  %9 = getelementptr inbounds %struct.Point3d, ptr %3, i32 0, i32 0
  store i8 -1, ptr %9, align 1, !tbaa !18
  %10 = getelementptr inbounds %struct.Point3d, ptr %3, i32 0, i32 1
  store i8 0, ptr %10, align 1, !tbaa !19
  %11 = getelementptr inbounds %struct.Point3d, ptr %3, i32 0, i32 2
  store i8 0, ptr %11, align 1, !tbaa !20
  %12 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 1 %3, i64 3, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 3, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 3, ptr %4) #4
  %13 = getelementptr inbounds %struct.Point3d, ptr %4, i32 0, i32 0
  store i8 -1, ptr %13, align 1, !tbaa !18
  %14 = getelementptr inbounds %struct.Point3d, ptr %4, i32 0, i32 1
  store i8 -82, ptr %14, align 1, !tbaa !19
  %15 = getelementptr inbounds %struct.Point3d, ptr %4, i32 0, i32 2
  store i8 11, ptr %15, align 1, !tbaa !20
  %16 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %16, ptr align 1 %4, i64 3, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 3, ptr %4) #4
  %17 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 5
  store i8 0, ptr %17, align 2, !tbaa !23
  %18 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 6
  store i8 1, ptr %18, align 1, !tbaa !24
  %19 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 7
  store i8 1, ptr %19, align 8, !tbaa !25
  %20 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 9
  store i32 0, ptr %20, align 4, !tbaa !26
  %21 = getelementptr inbounds %class.Animation_SystemShutdown, ptr %5, i32 0, i32 10
  store i32 11, ptr %21, align 8, !tbaa !27
  ret void
}

declare void @_ZN13AnimationBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(13)) unnamed_addr #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !16, i64 16}
!12 = !{!"_ZTS24Animation_SystemShutdown", !13, i64 0, !16, i64 16, !17, i64 24, !17, i64 27, !15, i64 30, !15, i64 31, !15, i64 32, !14, i64 36, !14, i64 40}
!13 = !{!"_ZTS13AnimationBase", !14, i64 8, !15, i64 12}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTS7Point3d", !7, i64 0, !7, i64 1, !7, i64 2}
!18 = !{!17, !7, i64 0}
!19 = !{!17, !7, i64 1}
!20 = !{!17, !7, i64 2}
!21 = !{i64 0, i64 1, !22, i64 1, i64 1, !22, i64 2, i64 1, !22}
!22 = !{!7, !7, i64 0}
!23 = !{!12, !15, i64 30}
!24 = !{!12, !15, i64 31}
!25 = !{!12, !15, i64 32}
!26 = !{!12, !14, i64 36}
!27 = !{!12, !14, i64 40}


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

@_ZTV24Animation_SystemShutdown = external dso_local unnamed_addr constant { [10 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24Animation_SystemShutdownC2Ev(ptr noundef nonnull align 8 dereferenceable(44) %0) unnamed_addr #0 align 2 {
  tail call void @_ZN13AnimationBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(13) %0)
  store ptr getelementptr inbounds inrange(-16, 64) (i8, ptr @_ZTV24Animation_SystemShutdown, i64 16), ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 16
  store double 6.000000e-01, ptr %2, align 8, !tbaa !8
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  store <8 x i8> <i8 -1, i8 0, i8 0, i8 -1, i8 -82, i8 11, i8 0, i8 1>, ptr %3, align 8, !tbaa !16
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  store i8 1, ptr %4, align 8, !tbaa !17
  %5 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 0, ptr %5, align 4, !tbaa !18
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  store i32 11, ptr %6, align 8, !tbaa !19
  ret void
}

declare void @_ZN13AnimationBaseC2Ev(ptr noundef nonnull align 8 dereferenceable(13)) unnamed_addr #1

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 = { "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, !14, i64 16}
!9 = !{!"_ZTS24Animation_SystemShutdown", !10, i64 0, !14, i64 16, !15, i64 24, !15, i64 27, !13, i64 30, !13, i64 31, !13, i64 32, !11, i64 36, !11, i64 40}
!10 = !{!"_ZTS13AnimationBase", !11, i64 8, !13, i64 12}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"bool", !12, i64 0}
!14 = !{!"double", !12, i64 0}
!15 = !{!"_ZTS7Point3d", !12, i64 0, !12, i64 1, !12, i64 2}
!16 = !{!12, !12, i64 0}
!17 = !{!9, !13, i64 32}
!18 = !{!9, !11, i64 36}
!19 = !{!9, !11, i64 40}


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