; LLVM IR from sp-nitech/SPTK :: third_party/WORLD/fft_world.ll (ZN4sptk5world8bitrv208EPd)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4sptk5world8bitrv208EPd(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds double, ptr %11, i64 2
  %13 = load double, ptr %12, align 8, !tbaa !9
  store double %13, ptr %3, align 8, !tbaa !9
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds double, ptr %14, i64 3
  %16 = load double, ptr %15, align 8, !tbaa !9
  store double %16, ptr %4, align 8, !tbaa !9
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds double, ptr %17, i64 6
  %19 = load double, ptr %18, align 8, !tbaa !9
  store double %19, ptr %5, align 8, !tbaa !9
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds double, ptr %20, i64 7
  %22 = load double, ptr %21, align 8, !tbaa !9
  store double %22, ptr %6, align 8, !tbaa !9
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = getelementptr inbounds double, ptr %23, i64 8
  %25 = load double, ptr %24, align 8, !tbaa !9
  store double %25, ptr %7, align 8, !tbaa !9
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds double, ptr %26, i64 9
  %28 = load double, ptr %27, align 8, !tbaa !9
  store double %28, ptr %8, align 8, !tbaa !9
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds double, ptr %29, i64 12
  %31 = load double, ptr %30, align 8, !tbaa !9
  store double %31, ptr %9, align 8, !tbaa !9
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %32, i64 13
  %34 = load double, ptr %33, align 8, !tbaa !9
  store double %34, ptr %10, align 8, !tbaa !9
  %35 = load double, ptr %7, align 8, !tbaa !9
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds double, ptr %36, i64 2
  store double %35, ptr %37, align 8, !tbaa !9
  %38 = load double, ptr %8, align 8, !tbaa !9
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds double, ptr %39, i64 3
  store double %38, ptr %40, align 8, !tbaa !9
  %41 = load double, ptr %9, align 8, !tbaa !9
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds double, ptr %42, i64 6
  store double %41, ptr %43, align 8, !tbaa !9
  %44 = load double, ptr %10, align 8, !tbaa !9
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds double, ptr %45, i64 7
  store double %44, ptr %46, align 8, !tbaa !9
  %47 = load double, ptr %3, align 8, !tbaa !9
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds double, ptr %48, i64 8
  store double %47, ptr %49, align 8, !tbaa !9
  %50 = load double, ptr %4, align 8, !tbaa !9
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i64 9
  store double %50, ptr %52, align 8, !tbaa !9
  %53 = load double, ptr %5, align 8, !tbaa !9
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %54, i64 12
  store double %53, ptr %55, align 8, !tbaa !9
  %56 = load double, ptr %6, align 8, !tbaa !9
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = getelementptr inbounds double, ptr %57, i64 13
  store double %56, ptr %58, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #2
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = !{!"double", !7, i64 0}


; 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 @_ZN4sptk5world8bitrv208EPd(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 16
  %3 = getelementptr inbounds i8, ptr %0, i64 48
  %4 = getelementptr inbounds i8, ptr %0, i64 64
  %5 = getelementptr inbounds i8, ptr %0, i64 96
  %6 = load <2 x double>, ptr %4, align 8, !tbaa !5
  %7 = load <2 x double>, ptr %5, align 8, !tbaa !5
  %8 = load <2 x double>, ptr %2, align 8, !tbaa !5
  store <2 x double> %6, ptr %2, align 8, !tbaa !5
  store <2 x double> %8, ptr %4, align 8, !tbaa !5
  %9 = load <2 x double>, ptr %3, align 8, !tbaa !5
  store <2 x double> %7, ptr %3, align 8, !tbaa !5
  store <2 x double> %9, ptr %5, align 8, !tbaa !5
  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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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