; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/audiosource/speech/soloud_speech.ll (ZN6SoLoud6SpeechC2Ev)

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

@_ZTVN6SoLoud6SpeechE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6darrayC1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud6SpeechC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  call void @_ZN6SoLoud11AudioSourceC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %5)
  store ptr getelementptr inbounds inrange(-16, 32) ({ [6 x ptr] }, ptr @_ZTVN6SoLoud6SpeechE, i32 0, i32 0, i32 2), ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds %"class.SoLoud::Speech", ptr %5, i32 0, i32 7
  invoke void @_ZN6darrayC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %6)
          to label %7 unwind label %14

7:                                                ; preds = %1
  %8 = getelementptr inbounds %"class.SoLoud::AudioSource", ptr %5, i32 0, i32 2
  store float 1.102500e+04, ptr %8, align 4, !tbaa !11
  %9 = getelementptr inbounds %"class.SoLoud::Speech", ptr %5, i32 0, i32 5
  store i32 0, ptr %9, align 8, !tbaa !16
  %10 = getelementptr inbounds %"class.SoLoud::Speech", ptr %5, i32 0, i32 1
  store i32 1330, ptr %10, align 8, !tbaa !19
  %11 = getelementptr inbounds %"class.SoLoud::Speech", ptr %5, i32 0, i32 2
  store float 1.000000e+01, ptr %11, align 4, !tbaa !20
  %12 = getelementptr inbounds %"class.SoLoud::Speech", ptr %5, i32 0, i32 3
  store float 5.000000e-01, ptr %12, align 8, !tbaa !21
  %13 = getelementptr inbounds %"class.SoLoud::Speech", ptr %5, i32 0, i32 4
  store i32 3, ptr %13, align 4, !tbaa !22
  ret void

14:                                               ; preds = %1
  %15 = landingpad { ptr, i32 }
          cleanup
  %16 = extractvalue { ptr, i32 } %15, 0
  store ptr %16, ptr %3, align 8
  %17 = extractvalue { ptr, i32 } %15, 1
  store i32 %17, ptr %4, align 4
  call void @_ZN6SoLoud11AudioSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %5) #3
  br label %18

18:                                               ; preds = %14
  %19 = load ptr, ptr %3, align 8
  %20 = load i32, ptr %4, align 4
  %21 = insertvalue { ptr, i32 } poison, ptr %19, 0
  %22 = insertvalue { ptr, i32 } %21, i32 %20, 1
  resume { ptr, i32 } %22
}

declare void @_ZN6SoLoud11AudioSourceC2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #0

; Function Attrs: nounwind
declare void @_ZN6SoLoud11AudioSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #2

attributes #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 = { 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 #2 = { nounwind "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 = { 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, !14, i64 12}
!12 = !{!"_ZTSN6SoLoud11AudioSourceE", !13, i64 8, !14, i64 12, !14, i64 16, !13, i64 20, !13, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !13, i64 40, !14, i64 44, !7, i64 48, !6, i64 112, !6, i64 120, !6, i64 128, !13, i64 136, !15, i64 144}
!13 = !{!"int", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!17, !13, i64 168}
!17 = !{!"_ZTSN6SoLoud6SpeechE", !12, i64 0, !13, i64 152, !14, i64 156, !14, i64 160, !13, i64 164, !13, i64 168, !18, i64 176}
!18 = !{!"_ZTS6darray", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!19 = !{!17, !13, i64 152}
!20 = !{!17, !14, i64 156}
!21 = !{!17, !14, i64 160}
!22 = !{!17, !13, i64 164}


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

@_ZTVN6SoLoud6SpeechE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

declare void @_ZN6darrayC1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6SoLoud6SpeechC2Ev(ptr noundef nonnull align 8 dereferenceable(200) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN6SoLoud11AudioSourceC2Ev(ptr noundef nonnull align 8 dereferenceable(152) %0)
  store ptr getelementptr inbounds inrange(-16, 32) (i8, ptr @_ZTVN6SoLoud6SpeechE, i64 16), ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 176
  invoke void @_ZN6darrayC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %2)
          to label %3 unwind label %9

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 12
  store float 1.102500e+04, ptr %4, align 4, !tbaa !8
  %5 = getelementptr inbounds i8, ptr %0, i64 168
  store i32 0, ptr %5, align 8, !tbaa !15
  %6 = getelementptr inbounds i8, ptr %0, i64 152
  store i32 1330, ptr %6, align 8, !tbaa !18
  %7 = getelementptr inbounds i8, ptr %0, i64 156
  store <2 x float> <float 1.000000e+01, float 5.000000e-01>, ptr %7, align 4, !tbaa !19
  %8 = getelementptr inbounds i8, ptr %0, i64 164
  store i32 3, ptr %8, align 4, !tbaa !20
  ret void

9:                                                ; preds = %1
  %10 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN6SoLoud11AudioSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(152) %0) #3
  resume { ptr, i32 } %10
}

declare void @_ZN6SoLoud11AudioSourceC2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #0

; Function Attrs: nounwind
declare void @_ZN6SoLoud11AudioSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #2

attributes #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 = { 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 #2 = { nounwind "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 = { 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, !12, i64 12}
!9 = !{!"_ZTSN6SoLoud11AudioSourceE", !10, i64 8, !12, i64 12, !12, i64 16, !10, i64 20, !10, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !10, i64 40, !12, i64 44, !11, i64 48, !13, i64 112, !13, i64 120, !13, i64 128, !10, i64 136, !14, i64 144}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"float", !11, i64 0}
!13 = !{!"any pointer", !11, i64 0}
!14 = !{!"double", !11, i64 0}
!15 = !{!16, !10, i64 168}
!16 = !{!"_ZTSN6SoLoud6SpeechE", !9, i64 0, !10, i64 152, !12, i64 156, !12, i64 160, !10, i64 164, !10, i64 168, !17, i64 176}
!17 = !{!"_ZTS6darray", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!18 = !{!16, !10, i64 152}
!19 = !{!12, !12, i64 0}
!20 = !{!16, !10, i64 164}


; Effective O3 passes: EarlyCSEPass,InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass