; LLVM IR from lichen-community-systems/signaletic :: libsignaletic/src (libsignaletic)

; 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.sig_dsp_Comb = type { %struct.sig_dsp_Signal, %struct.sig_dsp_Comb_Inputs, %struct.sig_dsp_Signal_SingleMonoOutput, ptr, float }
%struct.sig_dsp_Signal = type { ptr, ptr }
%struct.sig_dsp_Comb_Inputs = type { ptr, ptr, ptr, ptr }
%struct.sig_dsp_Signal_SingleMonoOutput = type { ptr }
%struct.sig_SignalContext = type { ptr, ptr, ptr, ptr, ptr }
%struct.sig_dsp_ConstantValue = type { %struct.sig_dsp_Signal, %struct.sig_dsp_Signal_SingleMonoOutput }

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_Signal_init(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @sig_dsp_Comb_init(ptr noundef %0, ptr noundef %1) #0 {
  %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, !tbaa !5
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  call void @sig_dsp_Signal_init(ptr noundef %5, ptr noundef %6, ptr noundef @sig_dsp_Comb_generate)
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.sig_dsp_Comb, ptr %7, i32 0, i32 4
  store float 0.000000e+00, ptr %8, align 8, !tbaa !9
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.sig_SignalContext, ptr %9, i32 0, i32 3
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %12 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %11, i32 0, i32 1
  %13 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %12, i32 0, i32 0
  %14 = load ptr, ptr %13, align 8, !tbaa !17
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.sig_dsp_Comb, ptr %15, i32 0, i32 1
  %17 = getelementptr inbounds %struct.sig_dsp_Comb_Inputs, ptr %16, i32 0, i32 0
  store ptr %14, ptr %17, align 8, !tbaa !19
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.sig_SignalContext, ptr %18, i32 0, i32 3
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %20, i32 0, i32 1
  %22 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.sig_dsp_Comb, ptr %24, i32 0, i32 1
  %26 = getelementptr inbounds %struct.sig_dsp_Comb_Inputs, ptr %25, i32 0, i32 1
  store ptr %23, ptr %26, align 8, !tbaa !20
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.sig_SignalContext, ptr %27, i32 0, i32 3
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %29, i32 0, i32 1
  %31 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.sig_dsp_Comb, ptr %33, i32 0, i32 1
  %35 = getelementptr inbounds %struct.sig_dsp_Comb_Inputs, ptr %34, i32 0, i32 2
  store ptr %32, ptr %35, align 8, !tbaa !21
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.sig_SignalContext, ptr %36, i32 0, i32 3
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %38, i32 0, i32 1
  %40 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !17
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.sig_dsp_Comb, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds %struct.sig_dsp_Comb_Inputs, ptr %43, i32 0, i32 3
  store ptr %41, ptr %44, align 8, !tbaa !22
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_Comb_generate(ptr noundef) #0

attributes #0 = { 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/C++ TBAA"}
!9 = !{!10, !14, i64 64}
!10 = !{!"sig_dsp_Comb", !11, i64 0, !12, i64 16, !13, i64 48, !6, i64 56, !14, i64 64}
!11 = !{!"sig_dsp_Signal", !6, i64 0, !6, i64 8}
!12 = !{!"sig_dsp_Comb_Inputs", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"sig_dsp_Signal_SingleMonoOutput", !6, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!16, !6, i64 24}
!16 = !{!"sig_SignalContext", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!17 = !{!18, !6, i64 16}
!18 = !{!"sig_dsp_ConstantValue", !11, i64 0, !13, i64 16}
!19 = !{!10, !6, i64 16}
!20 = !{!10, !6, i64 24}
!21 = !{!10, !6, i64 32}
!22 = !{!10, !6, 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"

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_Signal_init(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @sig_dsp_Comb_init(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  tail call void @sig_dsp_Signal_init(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @sig_dsp_Comb_generate)
  %3 = getelementptr inbounds i8, ptr %0, i64 64
  store float 0.000000e+00, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %1, i64 24
  %5 = load ptr, ptr %4, align 8, !tbaa !14
  %6 = getelementptr inbounds i8, ptr %5, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = insertelement <4 x ptr> poison, ptr %7, i64 0
  %10 = shufflevector <4 x ptr> %9, <4 x ptr> poison, <4 x i32> zeroinitializer
  store <4 x ptr> %10, ptr %8, align 8, !tbaa !18
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_Comb_generate(ptr noundef) #0

attributes #0 = { 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, !13, i64 64}
!6 = !{!"sig_dsp_Comb", !7, i64 0, !11, i64 16, !12, i64 48, !8, i64 56, !13, i64 64}
!7 = !{!"sig_dsp_Signal", !8, i64 0, !8, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"sig_dsp_Comb_Inputs", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!12 = !{!"sig_dsp_Signal_SingleMonoOutput", !8, i64 0}
!13 = !{!"float", !9, i64 0}
!14 = !{!15, !8, i64 24}
!15 = !{!"sig_SignalContext", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32}
!16 = !{!17, !8, i64 16}
!17 = !{!"sig_dsp_ConstantValue", !7, i64 0, !12, i64 16}
!18 = !{!8, !8, i64 0}


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