; 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_TwoOpFM = type { %struct.sig_dsp_Signal, %struct.sig_dsp_TwoOpFM_Inputs, %struct.sig_dsp_TwoOpFM_Outputs, ptr, ptr, ptr, ptr }
%struct.sig_dsp_Signal = type { ptr, ptr }
%struct.sig_dsp_TwoOpFM_Inputs = type { ptr, ptr, ptr, ptr }
%struct.sig_dsp_TwoOpFM_Outputs = type { ptr, ptr }
%struct.sig_dsp_Oscillator = type { %struct.sig_dsp_Signal, %struct.sig_dsp_Oscillator_Inputs, %struct.sig_dsp_Oscillator_Outputs, float }
%struct.sig_dsp_Oscillator_Inputs = type { ptr, ptr, ptr, ptr }
%struct.sig_dsp_Oscillator_Outputs = type { ptr, ptr }
%struct.sig_dsp_BinaryOp = type { %struct.sig_dsp_Signal, %struct.sig_dsp_BinaryOp_Inputs, %struct.sig_dsp_Signal_SingleMonoOutput }
%struct.sig_dsp_BinaryOp_Inputs = type { 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_TwoOpFM_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_TwoOpFM_generate)
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %7, i32 0, i32 5
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds %struct.sig_dsp_Oscillator, ptr %9, i32 0, i32 2
  %11 = getelementptr inbounds %struct.sig_dsp_Oscillator_Outputs, ptr %10, i32 0, i32 0
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %13, i32 0, i32 4
  %15 = load ptr, ptr %14, align 8, !tbaa !19
  %16 = getelementptr inbounds %struct.sig_dsp_BinaryOp, ptr %15, i32 0, i32 1
  %17 = getelementptr inbounds %struct.sig_dsp_BinaryOp_Inputs, ptr %16, i32 0, i32 0
  store ptr %12, ptr %17, align 8, !tbaa !20
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %18, i32 0, i32 3
  %20 = load ptr, ptr %19, align 8, !tbaa !24
  %21 = getelementptr inbounds %struct.sig_dsp_BinaryOp, ptr %20, i32 0, i32 2
  %22 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !25
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %24, i32 0, i32 5
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.sig_dsp_Oscillator, ptr %26, i32 0, i32 1
  %28 = getelementptr inbounds %struct.sig_dsp_Oscillator_Inputs, ptr %27, i32 0, i32 0
  store ptr %23, ptr %28, align 8, !tbaa !26
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %29, i32 0, i32 4
  %31 = load ptr, ptr %30, align 8, !tbaa !19
  %32 = getelementptr inbounds %struct.sig_dsp_BinaryOp, ptr %31, i32 0, i32 2
  %33 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !25
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %35, i32 0, i32 6
  %37 = load ptr, ptr %36, align 8, !tbaa !27
  %38 = getelementptr inbounds %struct.sig_dsp_Oscillator, ptr %37, i32 0, i32 1
  %39 = getelementptr inbounds %struct.sig_dsp_Oscillator_Inputs, ptr %38, i32 0, i32 1
  store ptr %34, ptr %39, align 8, !tbaa !28
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.sig_SignalContext, ptr %40, i32 0, i32 4
  %42 = load ptr, ptr %41, align 8, !tbaa !29
  %43 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %42, i32 0, i32 1
  %44 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !31
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %46, i32 0, i32 6
  %48 = load ptr, ptr %47, align 8, !tbaa !27
  %49 = getelementptr inbounds %struct.sig_dsp_Oscillator, ptr %48, i32 0, i32 1
  %50 = getelementptr inbounds %struct.sig_dsp_Oscillator_Inputs, ptr %49, i32 0, i32 2
  store ptr %45, ptr %50, align 8, !tbaa !33
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %51, i32 0, i32 6
  %53 = load ptr, ptr %52, align 8, !tbaa !27
  %54 = getelementptr inbounds %struct.sig_dsp_Oscillator, ptr %53, i32 0, i32 2
  %55 = getelementptr inbounds %struct.sig_dsp_Oscillator_Outputs, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !14
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %57, i32 0, i32 2
  %59 = getelementptr inbounds %struct.sig_dsp_TwoOpFM_Outputs, ptr %58, i32 0, i32 0
  store ptr %56, ptr %59, align 8, !tbaa !34
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %60, i32 0, i32 5
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.sig_dsp_Oscillator, ptr %62, i32 0, i32 2
  %64 = getelementptr inbounds %struct.sig_dsp_Oscillator_Outputs, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !14
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.sig_dsp_TwoOpFM_Outputs, ptr %67, i32 0, i32 1
  store ptr %65, ptr %68, align 8, !tbaa !35
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.sig_SignalContext, ptr %69, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !36
  %72 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %71, i32 0, i32 1
  %73 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !31
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %75, i32 0, i32 1
  %77 = getelementptr inbounds %struct.sig_dsp_TwoOpFM_Inputs, ptr %76, i32 0, i32 0
  store ptr %74, ptr %77, align 8, !tbaa !37
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.sig_SignalContext, ptr %78, i32 0, i32 3
  %80 = load ptr, ptr %79, align 8, !tbaa !36
  %81 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %80, i32 0, i32 1
  %82 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !31
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %84, i32 0, i32 1
  %86 = getelementptr inbounds %struct.sig_dsp_TwoOpFM_Inputs, ptr %85, i32 0, i32 1
  store ptr %83, ptr %86, align 8, !tbaa !38
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.sig_SignalContext, ptr %87, i32 0, i32 3
  %89 = load ptr, ptr %88, align 8, !tbaa !36
  %90 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %89, i32 0, i32 1
  %91 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !31
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %93, i32 0, i32 1
  %95 = getelementptr inbounds %struct.sig_dsp_TwoOpFM_Inputs, ptr %94, i32 0, i32 2
  store ptr %92, ptr %95, align 8, !tbaa !39
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.sig_SignalContext, ptr %96, i32 0, i32 3
  %98 = load ptr, ptr %97, align 8, !tbaa !36
  %99 = getelementptr inbounds %struct.sig_dsp_ConstantValue, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.sig_dsp_Signal_SingleMonoOutput, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !31
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.sig_dsp_TwoOpFM, ptr %102, i32 0, i32 1
  %104 = getelementptr inbounds %struct.sig_dsp_TwoOpFM_Inputs, ptr %103, i32 0, i32 3
  store ptr %101, ptr %104, align 8, !tbaa !40
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_TwoOpFM_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, !6, i64 80}
!10 = !{!"sig_dsp_TwoOpFM", !11, i64 0, !12, i64 16, !13, i64 48, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!11 = !{!"sig_dsp_Signal", !6, i64 0, !6, i64 8}
!12 = !{!"sig_dsp_TwoOpFM_Inputs", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"sig_dsp_TwoOpFM_Outputs", !6, i64 0, !6, i64 8}
!14 = !{!15, !6, i64 48}
!15 = !{!"sig_dsp_Oscillator", !11, i64 0, !16, i64 16, !17, i64 48, !18, i64 64}
!16 = !{!"sig_dsp_Oscillator_Inputs", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"sig_dsp_Oscillator_Outputs", !6, i64 0, !6, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!10, !6, i64 72}
!20 = !{!21, !6, i64 16}
!21 = !{!"sig_dsp_BinaryOp", !11, i64 0, !22, i64 16, !23, i64 32}
!22 = !{!"sig_dsp_BinaryOp_Inputs", !6, i64 0, !6, i64 8}
!23 = !{!"sig_dsp_Signal_SingleMonoOutput", !6, i64 0}
!24 = !{!10, !6, i64 64}
!25 = !{!21, !6, i64 32}
!26 = !{!15, !6, i64 16}
!27 = !{!10, !6, i64 88}
!28 = !{!15, !6, i64 24}
!29 = !{!30, !6, i64 32}
!30 = !{!"sig_SignalContext", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!31 = !{!32, !6, i64 16}
!32 = !{!"sig_dsp_ConstantValue", !11, i64 0, !23, i64 16}
!33 = !{!15, !6, i64 32}
!34 = !{!10, !6, i64 48}
!35 = !{!10, !6, i64 56}
!36 = !{!30, !6, i64 24}
!37 = !{!10, !6, i64 16}
!38 = !{!10, !6, i64 24}
!39 = !{!10, !6, i64 32}
!40 = !{!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_TwoOpFM_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_TwoOpFM_generate)
  %3 = getelementptr inbounds i8, ptr %0, i64 80
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 48
  %6 = load ptr, ptr %5, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load ptr, ptr %7, align 8, !tbaa !18
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %6, ptr %9, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  %11 = load ptr, ptr %10, align 8, !tbaa !23
  %12 = getelementptr inbounds i8, ptr %11, i64 32
  %13 = load ptr, ptr %12, align 8, !tbaa !24
  %14 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %13, ptr %14, align 8, !tbaa !25
  %15 = getelementptr inbounds i8, ptr %8, i64 32
  %16 = load ptr, ptr %15, align 8, !tbaa !24
  %17 = getelementptr inbounds i8, ptr %0, i64 88
  %18 = load ptr, ptr %17, align 8, !tbaa !26
  %19 = getelementptr inbounds i8, ptr %18, i64 24
  store ptr %16, ptr %19, align 8, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %1, i64 32
  %21 = load ptr, ptr %20, align 8, !tbaa !28
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !30
  %24 = getelementptr inbounds i8, ptr %18, i64 32
  store ptr %23, ptr %24, align 8, !tbaa !32
  %25 = getelementptr inbounds i8, ptr %18, i64 48
  %26 = load ptr, ptr %25, align 8, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %26, ptr %27, align 8, !tbaa !33
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %6, ptr %28, align 8, !tbaa !34
  %29 = getelementptr inbounds i8, ptr %1, i64 24
  %30 = load ptr, ptr %29, align 8, !tbaa !35
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %32 = load ptr, ptr %31, align 8, !tbaa !30
  %33 = getelementptr inbounds i8, ptr %0, i64 16
  %34 = insertelement <4 x ptr> poison, ptr %32, i64 0
  %35 = shufflevector <4 x ptr> %34, <4 x ptr> poison, <4 x i32> zeroinitializer
  store <4 x ptr> %35, ptr %33, align 8, !tbaa !36
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @sig_dsp_TwoOpFM_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, !8, i64 80}
!6 = !{!"sig_dsp_TwoOpFM", !7, i64 0, !11, i64 16, !12, i64 48, !8, i64 64, !8, i64 72, !8, i64 80, !8, i64 88}
!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_TwoOpFM_Inputs", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!12 = !{!"sig_dsp_TwoOpFM_Outputs", !8, i64 0, !8, i64 8}
!13 = !{!14, !8, i64 48}
!14 = !{!"sig_dsp_Oscillator", !7, i64 0, !15, i64 16, !16, i64 48, !17, i64 64}
!15 = !{!"sig_dsp_Oscillator_Inputs", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!16 = !{!"sig_dsp_Oscillator_Outputs", !8, i64 0, !8, i64 8}
!17 = !{!"float", !9, i64 0}
!18 = !{!6, !8, i64 72}
!19 = !{!20, !8, i64 16}
!20 = !{!"sig_dsp_BinaryOp", !7, i64 0, !21, i64 16, !22, i64 32}
!21 = !{!"sig_dsp_BinaryOp_Inputs", !8, i64 0, !8, i64 8}
!22 = !{!"sig_dsp_Signal_SingleMonoOutput", !8, i64 0}
!23 = !{!6, !8, i64 64}
!24 = !{!20, !8, i64 32}
!25 = !{!14, !8, i64 16}
!26 = !{!6, !8, i64 88}
!27 = !{!14, !8, i64 24}
!28 = !{!29, !8, i64 32}
!29 = !{!"sig_SignalContext", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32}
!30 = !{!31, !8, i64 16}
!31 = !{!"sig_dsp_ConstantValue", !7, i64 0, !22, i64 16}
!32 = !{!14, !8, i64 32}
!33 = !{!6, !8, i64 48}
!34 = !{!6, !8, i64 56}
!35 = !{!29, !8, i64 24}
!36 = !{!8, !8, i64 0}


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