; 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_Bob = type { %struct.sig_dsp_Signal, %struct.sig_dsp_FourPoleFilter_Inputs, %struct.sig_dsp_FourPoleFilter_Outputs, [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], [4 x float], float, float, i8, float }
%struct.sig_dsp_Signal = type { ptr, ptr }
%struct.sig_dsp_FourPoleFilter_Inputs = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sig_dsp_FourPoleFilter_Outputs = type { ptr, ptr, ptr }
%struct.sig_AudioSettings = type { float, i64, i64 }
%struct.sig_SignalContext = type { ptr, ptr, ptr, ptr, ptr }
%struct.sig_dsp_ConstantValue = type { %struct.sig_dsp_Signal, %struct.sig_dsp_Signal_SingleMonoOutput }
%struct.sig_dsp_Signal_SingleMonoOutput = type { ptr }

; 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_Bob_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_Bob_generate)
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %7, i32 0, i32 3
  %9 = getelementptr inbounds [4 x float], ptr %8, i64 0, i64 3
  store float 0.000000e+00, ptr %9, align 4, !tbaa !9
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %10, i32 0, i32 3
  %12 = getelementptr inbounds [4 x float], ptr %11, i64 0, i64 2
  store float 0.000000e+00, ptr %12, align 8, !tbaa !9
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %13, i32 0, i32 3
  %15 = getelementptr inbounds [4 x float], ptr %14, i64 0, i64 1
  store float 0.000000e+00, ptr %15, align 4, !tbaa !9
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %16, i32 0, i32 3
  %18 = getelementptr inbounds [4 x float], ptr %17, i64 0, i64 0
  store float 0.000000e+00, ptr %18, align 8, !tbaa !9
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %19, i32 0, i32 9
  store float 3.000000e+00, ptr %20, align 8, !tbaa !11
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %21, i32 0, i32 9
  %23 = load float, ptr %22, align 8, !tbaa !11
  %24 = fdiv float 1.000000e+00, %23
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %25, i32 0, i32 10
  store float %24, ptr %26, align 4, !tbaa !16
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %27, i32 0, i32 11
  store i8 2, ptr %28, align 8, !tbaa !17
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %29, i32 0, i32 11
  %31 = load i8, ptr %30, align 8, !tbaa !17
  %32 = uitofp i8 %31 to float
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %struct.sig_dsp_Signal, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !18
  %37 = getelementptr inbounds %struct.sig_AudioSettings, ptr %36, i32 0, i32 0
  %38 = load float, ptr %37, align 8, !tbaa !19
  %39 = fmul float %32, %38
  %40 = fdiv float 1.000000e+00, %39
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %41, i32 0, i32 12
  store float %40, ptr %42, align 4, !tbaa !22
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.sig_SignalContext, ptr %43, i32 0, i32 3
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !25
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %49, i32 0, i32 1
  %51 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %50, i32 0, i32 0
  store ptr %48, ptr %51, align 8, !tbaa !28
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.sig_SignalContext, ptr %52, i32 0, i32 3
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %54, i32 0, i32 1
  %56 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !25
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %58, i32 0, i32 1
  %60 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %59, i32 0, i32 1
  store ptr %57, ptr %60, align 8, !tbaa !29
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.sig_SignalContext, ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %63, i32 0, i32 1
  %65 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8, !tbaa !25
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %67, i32 0, i32 1
  %69 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %68, i32 0, i32 2
  store ptr %66, ptr %69, align 8, !tbaa !30
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.sig_SignalContext, ptr %70, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !23
  %73 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %72, i32 0, i32 1
  %74 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !25
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %76, i32 0, i32 1
  %78 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %77, i32 0, i32 3
  store ptr %75, ptr %78, align 8, !tbaa !31
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.sig_SignalContext, ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %81, i32 0, i32 1
  %83 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !25
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %85, i32 0, i32 1
  %87 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %86, i32 0, i32 4
  store ptr %84, ptr %87, align 8, !tbaa !32
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.sig_SignalContext, ptr %88, i32 0, i32 3
  %90 = load ptr, ptr %89, align 8, !tbaa !23
  %91 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %90, i32 0, i32 1
  %92 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %94, i32 0, i32 1
  %96 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %95, i32 0, i32 5
  store ptr %93, ptr %96, align 8, !tbaa !33
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.sig_SignalContext, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !23
  %100 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %99, i32 0, i32 1
  %101 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !25
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %103, i32 0, i32 1
  %105 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %104, i32 0, i32 6
  store ptr %102, ptr %105, align 8, !tbaa !34
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.sig_SignalContext, ptr %106, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !35
  %109 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !25
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.sig_dsp_Bob, ptr %112, i32 0, i32 1
  %114 = getelementptr inbounds %struct.sig_dsp_FourPoleFilter_Inputs, ptr %113, i32 0, i32 7
  store ptr %111, ptr %114, align 8, !tbaa !36
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_Bob_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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 200}
!12 = !{!"sig_dsp_Bob", !13, i64 0, !14, i64 16, !15, i64 80, !7, i64 104, !7, i64 120, !7, i64 136, !7, i64 152, !7, i64 168, !7, i64 184, !10, i64 200, !10, i64 204, !7, i64 208, !10, i64 212}
!13 = !{!"sig_dsp_Signal", !6, i64 0, !6, i64 8}
!14 = !{!"sig_dsp_FourPoleFilter_Inputs", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!15 = !{!"sig_dsp_FourPoleFilter_Outputs", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!12, !10, i64 204}
!17 = !{!12, !7, i64 208}
!18 = !{!12, !6, i64 0}
!19 = !{!20, !10, i64 0}
!20 = !{!"sig_AudioSettings", !10, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"long", !7, i64 0}
!22 = !{!12, !10, i64 212}
!23 = !{!24, !6, i64 24}
!24 = !{!"sig_SignalContext", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!25 = !{!26, !6, i64 16}
!26 = !{!"sig_dsp_ConstantValue", !13, i64 0, !27, i64 16}
!27 = !{!"sig_dsp_Signal_SingleMonoOutput", !6, i64 0}
!28 = !{!12, !6, i64 16}
!29 = !{!12, !6, i64 24}
!30 = !{!12, !6, i64 32}
!31 = !{!12, !6, i64 40}
!32 = !{!12, !6, i64 48}
!33 = !{!12, !6, i64 56}
!34 = !{!12, !6, i64 64}
!35 = !{!24, !6, i64 32}
!36 = !{!12, !6, i64 72}


; 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_Bob_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_Bob_generate)
  %3 = getelementptr inbounds i8, ptr %0, i64 104
  %4 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  store <2 x float> <float 3.000000e+00, float 0x3FD5555560000000>, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 208
  store i8 2, ptr %5, align 8, !tbaa !9
  %6 = load ptr, ptr %0, align 8, !tbaa !15
  %7 = load float, ptr %6, align 8, !tbaa !16
  %8 = fmul float %7, 2.000000e+00
  %9 = fdiv float 1.000000e+00, %8
  %10 = getelementptr inbounds i8, ptr %0, i64 212
  store float %9, ptr %10, align 4, !tbaa !19
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = insertelement <4 x ptr> poison, ptr %14, i64 0
  %17 = shufflevector <4 x ptr> %16, <4 x ptr> poison, <4 x i32> zeroinitializer
  store <4 x ptr> %17, ptr %15, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %14, ptr %18, align 8, !tbaa !26
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %14, ptr %19, align 8, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %14, ptr %20, align 8, !tbaa !28
  %21 = getelementptr inbounds i8, ptr %1, i64 32
  %22 = load ptr, ptr %21, align 8, !tbaa !29
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !22
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %24, ptr %25, align 8, !tbaa !30
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 208}
!10 = !{!"sig_dsp_Bob", !11, i64 0, !13, i64 16, !14, i64 80, !7, i64 104, !7, i64 120, !7, i64 136, !7, i64 152, !7, i64 168, !7, i64 184, !6, i64 200, !6, i64 204, !7, i64 208, !6, i64 212}
!11 = !{!"sig_dsp_Signal", !12, i64 0, !12, i64 8}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"sig_dsp_FourPoleFilter_Inputs", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56}
!14 = !{!"sig_dsp_FourPoleFilter_Outputs", !12, i64 0, !12, i64 8, !12, i64 16}
!15 = !{!10, !12, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"sig_AudioSettings", !6, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!10, !6, i64 212}
!20 = !{!21, !12, i64 24}
!21 = !{!"sig_SignalContext", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!22 = !{!23, !12, i64 16}
!23 = !{!"sig_dsp_ConstantValue", !11, i64 0, !24, i64 16}
!24 = !{!"sig_dsp_Signal_SingleMonoOutput", !12, i64 0}
!25 = !{!12, !12, i64 0}
!26 = !{!10, !12, i64 48}
!27 = !{!10, !12, i64 56}
!28 = !{!10, !12, i64 64}
!29 = !{!21, !12, i64 32}
!30 = !{!10, !12, i64 72}


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