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

; 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.Point3dhsv = type { i16, i8, i8 }
%struct.Point3d = type { i8, i8, i8 }
%class.Animation_MoodBlobs = type { %class.AnimationBase.base, i32, i8, double, double, double, i32, double, i8, i32, double, i32, %struct.Point3dhsv, %"class.std::vector", double, %struct.Point3d, i8, double, i32, i8, i8, double, double, double }
%class.AnimationBase.base = type <{ ptr, i32, i8 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Point3d, std::allocator<Point3d>>::_Vector_impl" }
%"struct.std::_Vector_base<Point3d, std::allocator<Point3d>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point3d, std::allocator<Point3d>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point3d, std::allocator<Point3d>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19Animation_MoodBlobsC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.Point3dhsv, align 2
  %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 @_ZTV19Animation_MoodBlobs, i32 0, i32 0, i32 2), ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 12
  %7 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 13
  call void @_ZNSt6vectorI7Point3dSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %8 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 15
  %9 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 2
  store i8 0, ptr %9, align 4, !tbaa !11
  %10 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 3
  store double 0.000000e+00, ptr %10, align 8, !tbaa !24
  %11 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 4
  store double 1.000000e+00, ptr %11, align 8, !tbaa !25
  %12 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 5
  store double 0.000000e+00, ptr %12, align 8, !tbaa !26
  %13 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 6
  store i32 1, ptr %13, align 8, !tbaa !27
  %14 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 7
  store double 0.000000e+00, ptr %14, align 8, !tbaa !28
  %15 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 8
  store i8 0, ptr %15, align 8, !tbaa !29
  %16 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 9
  store i32 0, ptr %16, align 4, !tbaa !30
  %17 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 10
  store double 0.000000e+00, ptr %17, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %18 = getelementptr inbounds %struct.Point3dhsv, ptr %3, i32 0, i32 0
  store i16 0, ptr %18, align 2, !tbaa !32
  %19 = getelementptr inbounds %struct.Point3dhsv, ptr %3, i32 0, i32 1
  store i8 0, ptr %19, align 2, !tbaa !33
  %20 = getelementptr inbounds %struct.Point3dhsv, ptr %3, i32 0, i32 2
  store i8 0, ptr %20, align 1, !tbaa !34
  %21 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 2 %3, i64 4, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %22 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 11
  store i32 0, ptr %22, align 8, !tbaa !38
  %23 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 14
  store double 2.000000e+01, ptr %23, align 8, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 3, ptr %4) #5
  %24 = getelementptr inbounds %struct.Point3d, ptr %4, i32 0, i32 0
  store i8 0, ptr %24, align 1, !tbaa !40
  %25 = getelementptr inbounds %struct.Point3d, ptr %4, i32 0, i32 1
  store i8 0, ptr %25, align 1, !tbaa !41
  %26 = getelementptr inbounds %struct.Point3d, ptr %4, i32 0, i32 2
  store i8 -1, ptr %26, align 1, !tbaa !42
  %27 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 1 %4, i64 3, i1 false), !tbaa.struct !43
  call void @llvm.lifetime.end.p0(i64 3, ptr %4) #5
  %28 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 16
  store i8 0, ptr %28, align 1, !tbaa !44
  %29 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 17
  store double 6.000000e+01, ptr %29, align 8, !tbaa !45
  %30 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 18
  store i32 5, ptr %30, align 8, !tbaa !46
  %31 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 19
  store i8 0, ptr %31, align 4, !tbaa !47
  %32 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 20
  store i8 0, ptr %32, align 1, !tbaa !48
  %33 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 21
  store double 0.000000e+00, ptr %33, align 8, !tbaa !49
  %34 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 22
  store double 3.600000e+02, ptr %34, align 8, !tbaa !50
  %35 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 23
  store double 1.000000e+01, ptr %35, align 8, !tbaa !51
  %36 = getelementptr inbounds %class.Animation_MoodBlobs, ptr %5, i32 0, i32 1
  store i32 -1, ptr %36, align 8, !tbaa !52
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI7Point3dSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

; 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) #4

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

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !15, i64 20}
!12 = !{!"_ZTS19Animation_MoodBlobs", !13, i64 0, !14, i64 16, !15, i64 20, !16, i64 24, !16, i64 32, !16, i64 40, !14, i64 48, !16, i64 56, !15, i64 64, !14, i64 68, !16, i64 72, !14, i64 80, !17, i64 84, !19, i64 88, !16, i64 112, !23, i64 120, !15, i64 123, !16, i64 128, !14, i64 136, !15, i64 140, !15, i64 141, !16, i64 144, !16, i64 152, !16, i64 160}
!13 = !{!"_ZTS13AnimationBase", !14, i64 8, !15, i64 12}
!14 = !{!"int", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTS10Point3dhsv", !18, i64 0, !7, i64 2, !7, i64 3}
!18 = !{!"short", !7, i64 0}
!19 = !{!"_ZTSSt6vectorI7Point3dSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseI7Point3dSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI7Point3dSaIS0_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI7Point3dSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTS7Point3d", !7, i64 0, !7, i64 1, !7, i64 2}
!24 = !{!12, !16, i64 24}
!25 = !{!12, !16, i64 32}
!26 = !{!12, !16, i64 40}
!27 = !{!12, !14, i64 48}
!28 = !{!12, !16, i64 56}
!29 = !{!12, !15, i64 64}
!30 = !{!12, !14, i64 68}
!31 = !{!12, !16, i64 72}
!32 = !{!17, !18, i64 0}
!33 = !{!17, !7, i64 2}
!34 = !{!17, !7, i64 3}
!35 = !{i64 0, i64 2, !36, i64 2, i64 1, !37, i64 3, i64 1, !37}
!36 = !{!18, !18, i64 0}
!37 = !{!7, !7, i64 0}
!38 = !{!12, !14, i64 80}
!39 = !{!12, !16, i64 112}
!40 = !{!23, !7, i64 0}
!41 = !{!23, !7, i64 1}
!42 = !{!23, !7, i64 2}
!43 = !{i64 0, i64 1, !37, i64 1, i64 1, !37, i64 2, i64 1, !37}
!44 = !{!12, !15, i64 123}
!45 = !{!12, !16, i64 128}
!46 = !{!12, !14, i64 136}
!47 = !{!12, !15, i64 140}
!48 = !{!12, !15, i64 141}
!49 = !{!12, !16, i64 144}
!50 = !{!12, !16, i64 152}
!51 = !{!12, !16, i64 160}
!52 = !{!12, !14, 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"

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN19Animation_MoodBlobsC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %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 @_ZTV19Animation_MoodBlobs, i64 16), ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 88
  tail call void @_ZNSt6vectorI7Point3dSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %3 = getelementptr inbounds i8, ptr %0, i64 20
  store i8 0, ptr %3, align 4, !tbaa !8
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  store <2 x double> <double 0.000000e+00, double 1.000000e+00>, ptr %4, align 8, !tbaa !23
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  store double 0.000000e+00, ptr %5, align 8, !tbaa !24
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 1, ptr %6, align 8, !tbaa !25
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  store double 0.000000e+00, ptr %7, align 8, !tbaa !26
  %8 = getelementptr inbounds i8, ptr %0, i64 64
  store i8 0, ptr %8, align 8, !tbaa !27
  %9 = getelementptr inbounds i8, ptr %0, i64 68
  %10 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %9, i8 0, i64 20, i1 false)
  store double 2.000000e+01, ptr %10, align 8, !tbaa !28
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  store <4 x i8> <i8 0, i8 0, i8 -1, i8 0>, ptr %11, align 8, !tbaa !29
  %12 = getelementptr inbounds i8, ptr %0, i64 128
  store double 6.000000e+01, ptr %12, align 8, !tbaa !30
  %13 = getelementptr inbounds i8, ptr %0, i64 136
  store i32 5, ptr %13, align 8, !tbaa !31
  %14 = getelementptr inbounds i8, ptr %0, i64 140
  store i8 0, ptr %14, align 4, !tbaa !32
  %15 = getelementptr inbounds i8, ptr %0, i64 141
  store i8 0, ptr %15, align 1, !tbaa !33
  %16 = getelementptr inbounds i8, ptr %0, i64 144
  store <2 x double> <double 0.000000e+00, double 3.600000e+02>, ptr %16, align 8, !tbaa !23
  %17 = getelementptr inbounds i8, ptr %0, i64 160
  store double 1.000000e+01, ptr %17, align 8, !tbaa !34
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 -1, ptr %18, align 8, !tbaa !35
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI7Point3dSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 20}
!9 = !{!"_ZTS19Animation_MoodBlobs", !10, i64 0, !11, i64 16, !13, i64 20, !14, i64 24, !14, i64 32, !14, i64 40, !11, i64 48, !14, i64 56, !13, i64 64, !11, i64 68, !14, i64 72, !11, i64 80, !15, i64 84, !17, i64 88, !14, i64 112, !22, i64 120, !13, i64 123, !14, i64 128, !11, i64 136, !13, i64 140, !13, i64 141, !14, i64 144, !14, i64 152, !14, i64 160}
!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 = !{!"_ZTS10Point3dhsv", !16, i64 0, !12, i64 2, !12, i64 3}
!16 = !{!"short", !12, i64 0}
!17 = !{!"_ZTSSt6vectorI7Point3dSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseI7Point3dSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI7Point3dSaIS0_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI7Point3dSaIS0_EE17_Vector_impl_dataE", !21, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"any pointer", !12, i64 0}
!22 = !{!"_ZTS7Point3d", !12, i64 0, !12, i64 1, !12, i64 2}
!23 = !{!14, !14, i64 0}
!24 = !{!9, !14, i64 40}
!25 = !{!9, !11, i64 48}
!26 = !{!9, !14, i64 56}
!27 = !{!9, !13, i64 64}
!28 = !{!9, !14, i64 112}
!29 = !{!12, !12, i64 0}
!30 = !{!9, !14, i64 128}
!31 = !{!9, !11, i64 136}
!32 = !{!9, !13, i64 140}
!33 = !{!9, !13, i64 141}
!34 = !{!9, !14, i64 160}
!35 = !{!9, !11, i64 16}


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