; 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_OnePole = type { %struct.sig_dsp_Signal, %struct.sig_dsp_OnePole_Inputs, %struct.sig_dsp_OnePole_Parameters, %struct.sig_dsp_Signal_SingleMonoOutput, float, float, i32, float, float }
%struct.sig_dsp_Signal = type { ptr, ptr }
%struct.sig_dsp_OnePole_Inputs = type { ptr, ptr }
%struct.sig_dsp_OnePole_Parameters = type { i32 }
%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_OnePole_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_OnePole_generate)
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %7, i32 0, i32 2
  %9 = getelementptr inbounds %struct.sig_dsp_OnePole_Parameters, ptr %8, i32 0, i32 0
  store i32 1, ptr %9, align 8, !tbaa !9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %10, i32 0, i32 5
  store float 0.000000e+00, ptr %11, align 4, !tbaa !17
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %12, i32 0, i32 4
  store float 1.000000e+00, ptr %13, align 8, !tbaa !18
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %14, i32 0, i32 7
  store float 0.000000e+00, ptr %15, align 4, !tbaa !19
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %16, i32 0, i32 6
  store i32 2, ptr %17, align 8, !tbaa !20
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %18, i32 0, i32 8
  store float 0.000000e+00, ptr %19, align 8, !tbaa !21
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.sig_SignalContext, ptr %20, i32 0, i32 3
  %22 = load ptr, ptr %21, align 8, !tbaa !22
  %23 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %22, i32 0, i32 1
  %24 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !24
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %26, i32 0, i32 1
  %28 = getelementptr inbounds %struct.sig_dsp_OnePole_Inputs, ptr %27, i32 0, i32 0
  store ptr %25, ptr %28, align 8, !tbaa !26
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.sig_SignalContext, ptr %29, i32 0, i32 3
  %31 = load ptr, ptr %30, align 8, !tbaa !22
  %32 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !24
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.sig_dsp_OnePole, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds %struct.sig_dsp_OnePole_Inputs, ptr %36, i32 0, i32 1
  store ptr %34, ptr %37, align 8, !tbaa !27
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_OnePole_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 32}
!10 = !{!"sig_dsp_OnePole", !11, i64 0, !12, i64 16, !13, i64 32, !15, i64 40, !16, i64 48, !16, i64 52, !14, i64 56, !16, i64 60, !16, i64 64}
!11 = !{!"sig_dsp_Signal", !6, i64 0, !6, i64 8}
!12 = !{!"sig_dsp_OnePole_Inputs", !6, i64 0, !6, i64 8}
!13 = !{!"sig_dsp_OnePole_Parameters", !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"sig_dsp_Signal_SingleMonoOutput", !6, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!10, !16, i64 52}
!18 = !{!10, !16, i64 48}
!19 = !{!10, !16, i64 60}
!20 = !{!10, !14, i64 56}
!21 = !{!10, !16, i64 64}
!22 = !{!23, !6, i64 24}
!23 = !{!"sig_SignalContext", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!24 = !{!25, !6, i64 16}
!25 = !{!"sig_dsp_ConstantValue", !11, i64 0, !15, i64 16}
!26 = !{!10, !6, i64 16}
!27 = !{!10, !6, i64 24}


; 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_OnePole_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_OnePole_generate)
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 1, ptr %3, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 48
  store <2 x float> <float 1.000000e+00, float 0.000000e+00>, ptr %4, align 8, !tbaa !16
  %5 = getelementptr inbounds i8, ptr %0, i64 60
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 2, ptr %6, align 8, !tbaa !17
  store <2 x float> zeroinitializer, ptr %5, align 4, !tbaa !16
  %7 = getelementptr inbounds i8, ptr %1, i64 24
  %8 = load ptr, ptr %7, align 8, !tbaa !18
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  %10 = load ptr, ptr %9, align 8, !tbaa !20
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %10, ptr %11, align 8, !tbaa !22
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %10, ptr %12, align 8, !tbaa !23
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_OnePole_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 32}
!6 = !{!"sig_dsp_OnePole", !7, i64 0, !11, i64 16, !12, i64 32, !14, i64 40, !15, i64 48, !15, i64 52, !13, i64 56, !15, i64 60, !15, 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_OnePole_Inputs", !8, i64 0, !8, i64 8}
!12 = !{!"sig_dsp_OnePole_Parameters", !13, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"sig_dsp_Signal_SingleMonoOutput", !8, i64 0}
!15 = !{!"float", !9, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!6, !13, i64 56}
!18 = !{!19, !8, i64 24}
!19 = !{!"sig_SignalContext", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32}
!20 = !{!21, !8, i64 16}
!21 = !{!"sig_dsp_ConstantValue", !7, i64 0, !14, i64 16}
!22 = !{!6, !8, i64 16}
!23 = !{!6, !8, i64 24}


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