; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/core (soloud_audiosource)

; 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.SoLoud::AudioSource" = type { ptr, i32, float, float, i32, i32, float, float, float, i32, float, [8 x ptr], ptr, ptr, ptr, i32, double }
%"class.SoLoud::AudioSourceInstance3dData" = type <{ [3 x float], [3 x float], float, float, float, i32, float, [4 x i8], ptr, ptr, i32, float, float, [8 x float], i32, i32, [4 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN6SoLoud25AudioSourceInstance3dData4initERNS_11AudioSourceE(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef nonnull align 8 dereferenceable(152) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %6, i32 0, i32 9
  %8 = load i32, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 5
  store i32 %8, ptr %9, align 4, !tbaa !14
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %10, i32 0, i32 8
  %12 = load float, ptr %11, align 4, !tbaa !16
  %13 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 4
  store float %12, ptr %13, align 8, !tbaa !17
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %14, i32 0, i32 10
  %16 = load float, ptr %15, align 4, !tbaa !18
  %17 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 6
  store float %16, ptr %17, align 8, !tbaa !19
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %18, i32 0, i32 7
  %20 = load float, ptr %19, align 8, !tbaa !20
  %21 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 3
  store float %20, ptr %21, align 4, !tbaa !21
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %22, i32 0, i32 6
  %24 = load float, ptr %23, align 4, !tbaa !22
  %25 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 2
  store float %24, ptr %25, align 8, !tbaa !23
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %26, i32 0, i32 13
  %28 = load ptr, ptr %27, align 8, !tbaa !24
  %29 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 8
  store ptr %28, ptr %29, align 8, !tbaa !25
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %30, i32 0, i32 15
  %32 = load i32, ptr %31, align 8, !tbaa !26
  %33 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 10
  store i32 %32, ptr %33, align 8, !tbaa !27
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %34, i32 0, i32 14
  %36 = load ptr, ptr %35, align 8, !tbaa !28
  %37 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 9
  store ptr %36, ptr %37, align 8, !tbaa !29
  %38 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 12
  store float 1.000000e+00, ptr %38, align 8, !tbaa !30
  %39 = getelementptr inbounds %"class.SoLoud::AudioSourceInstance3dData", ptr %5, i32 0, i32 11
  store float 1.000000e+00, ptr %39, align 4, !tbaa !31
  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, !11, i64 40}
!10 = !{!"_ZTSN6SoLoud11AudioSourceE", !11, i64 8, !12, i64 12, !12, i64 16, !11, i64 20, !11, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !11, i64 40, !12, i64 44, !7, i64 48, !6, i64 112, !6, i64 120, !6, i64 128, !11, i64 136, !13, i64 144}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !11, i64 36}
!15 = !{!"_ZTSN6SoLoud25AudioSourceInstance3dDataE", !7, i64 0, !7, i64 12, !12, i64 24, !12, i64 28, !12, i64 32, !11, i64 36, !12, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !12, i64 68, !12, i64 72, !7, i64 76, !11, i64 108, !11, i64 112}
!16 = !{!10, !12, i64 36}
!17 = !{!15, !12, i64 32}
!18 = !{!10, !12, i64 44}
!19 = !{!15, !12, i64 40}
!20 = !{!10, !12, i64 32}
!21 = !{!15, !12, i64 28}
!22 = !{!10, !12, i64 28}
!23 = !{!15, !12, i64 24}
!24 = !{!10, !6, i64 120}
!25 = !{!15, !6, i64 48}
!26 = !{!10, !11, i64 136}
!27 = !{!15, !11, i64 64}
!28 = !{!10, !6, i64 128}
!29 = !{!15, !6, i64 56}
!30 = !{!15, !12, i64 72}
!31 = !{!15, !12, i64 68}


; 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 @_ZN6SoLoud25AudioSourceInstance3dData4initERNS_11AudioSourceE(ptr nocapture noundef nonnull writeonly align 8 dereferenceable(116) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(152) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 40
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 36
  store i32 %4, ptr %5, align 4, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %1, i64 36
  %7 = load float, ptr %6, align 4, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  store float %7, ptr %8, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %1, i64 44
  %10 = load float, ptr %9, align 4, !tbaa !17
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  store float %10, ptr %11, align 8, !tbaa !18
  %12 = getelementptr inbounds i8, ptr %1, i64 28
  %13 = getelementptr inbounds i8, ptr %0, i64 24
  %14 = load <2 x float>, ptr %12, align 4, !tbaa !19
  store <2 x float> %14, ptr %13, align 8, !tbaa !19
  %15 = getelementptr inbounds i8, ptr %1, i64 120
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  %17 = getelementptr inbounds i8, ptr %1, i64 136
  %18 = load i32, ptr %17, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %18, ptr %19, align 8, !tbaa !21
  %20 = load <2 x ptr>, ptr %15, align 8, !tbaa !22
  store <2 x ptr> %20, ptr %16, align 8, !tbaa !22
  %21 = getelementptr inbounds i8, ptr %0, i64 68
  store <2 x float> <float 1.000000e+00, float 1.000000e+00>, ptr %21, align 4, !tbaa !19
  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, !7, i64 40}
!6 = !{!"_ZTSN6SoLoud11AudioSourceE", !7, i64 8, !10, i64 12, !10, i64 16, !7, i64 20, !7, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !10, i64 44, !8, i64 48, !11, i64 112, !11, i64 120, !11, i64 128, !7, i64 136, !12, i64 144}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!14, !7, i64 36}
!14 = !{!"_ZTSN6SoLoud25AudioSourceInstance3dDataE", !8, i64 0, !8, i64 12, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 36, !10, i64 40, !11, i64 48, !11, i64 56, !7, i64 64, !10, i64 68, !10, i64 72, !8, i64 76, !7, i64 108, !7, i64 112}
!15 = !{!6, !10, i64 36}
!16 = !{!14, !10, i64 32}
!17 = !{!6, !10, i64 44}
!18 = !{!14, !10, i64 40}
!19 = !{!10, !10, i64 0}
!20 = !{!6, !7, i64 136}
!21 = !{!14, !7, i64 64}
!22 = !{!11, !11, i64 0}


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