/* GENERATED by test/duckvep/conformance/generate_so_metadata.pl from
 * test/duckvep/conformance/data/so_consequences.tsv (VEP metadata) and
 * test/duckvep/conformance/data/so_bit_bindings.tsv (stable public bit bindings).
 * Do not hand-edit. */
enum { DUCKVEP_GENERATED_SO_BINDING_COUNT = 41u };
static const struct duckvep_so_metadata k_so[DUCKVEP_SO_BIT_COUNT] = {
    [DUCKVEP_SO_UPSTREAM_GENE] = { "upstream_gene_variant", DUCKVEP_IMPACT_MODIFIER, 32u, 3u },
    [DUCKVEP_SO_DOWNSTREAM_GENE] = { "downstream_gene_variant", DUCKVEP_IMPACT_MODIFIER, 33u, 3u },
    [DUCKVEP_SO_INTRON] = { "intron_variant", DUCKVEP_IMPACT_MODIFIER, 28u, 3u },
    [DUCKVEP_SO_5_PRIME_UTR] = { "5_prime_UTR_variant", DUCKVEP_IMPACT_MODIFIER, 25u, 3u },
    [DUCKVEP_SO_3_PRIME_UTR] = { "3_prime_UTR_variant", DUCKVEP_IMPACT_MODIFIER, 26u, 3u },
    [DUCKVEP_SO_NON_CODING_TRANSCRIPT_EXON] = { "non_coding_transcript_exon_variant", DUCKVEP_IMPACT_MODIFIER, 27u, 3u },
    [DUCKVEP_SO_NON_CODING_TRANSCRIPT] = { "non_coding_transcript_variant", DUCKVEP_IMPACT_MODIFIER, 30u, 3u },
    [DUCKVEP_SO_SPLICE_REGION] = { "splice_region_variant", DUCKVEP_IMPACT_LOW, 16u, 3u },
    [DUCKVEP_SO_SPLICE_DONOR] = { "splice_donor_variant", DUCKVEP_IMPACT_HIGH, 3u, 3u },
    [DUCKVEP_SO_SPLICE_ACCEPTOR] = { "splice_acceptor_variant", DUCKVEP_IMPACT_HIGH, 2u, 3u },
    [DUCKVEP_SO_SPLICE_DONOR_5TH_BASE] = { "splice_donor_5th_base_variant", DUCKVEP_IMPACT_LOW, 15u, 3u },
    [DUCKVEP_SO_CODING_SEQUENCE] = { "coding_sequence_variant", DUCKVEP_IMPACT_MODIFIER, 23u, 3u },
    [DUCKVEP_SO_SYNONYMOUS] = { "synonymous_variant", DUCKVEP_IMPACT_LOW, 22u, 3u },
    [DUCKVEP_SO_MISSENSE] = { "missense_variant", DUCKVEP_IMPACT_MODERATE, 13u, 3u },
    [DUCKVEP_SO_STOP_GAINED] = { "stop_gained", DUCKVEP_IMPACT_HIGH, 4u, 3u },
    [DUCKVEP_SO_STOP_LOST] = { "stop_lost", DUCKVEP_IMPACT_HIGH, 6u, 3u },
    [DUCKVEP_SO_START_LOST] = { "start_lost", DUCKVEP_IMPACT_HIGH, 7u, 3u },
    [DUCKVEP_SO_STOP_RETAINED] = { "stop_retained_variant", DUCKVEP_IMPACT_LOW, 21u, 3u },
    [DUCKVEP_SO_INCOMPLETE_TERMINAL_CODON] = { "incomplete_terminal_codon_variant", DUCKVEP_IMPACT_LOW, 19u, 3u },
    [DUCKVEP_SO_SPLICE_DONOR_REGION] = { "splice_donor_region_variant", DUCKVEP_IMPACT_LOW, 17u, 3u },
    [DUCKVEP_SO_SPLICE_POLYPYRIMIDINE] = { "splice_polypyrimidine_tract_variant", DUCKVEP_IMPACT_LOW, 18u, 3u },
    [DUCKVEP_SO_NMD_TRANSCRIPT] = { "NMD_transcript_variant", DUCKVEP_IMPACT_MODIFIER, 29u, 3u },
    [DUCKVEP_SO_MATURE_MIRNA] = { "mature_miRNA_variant", DUCKVEP_IMPACT_MODIFIER, 24u, 2u },
    [DUCKVEP_SO_FRAMESHIFT] = { "frameshift_variant", DUCKVEP_IMPACT_HIGH, 5u, 3u },
    [DUCKVEP_SO_INFRAME_DELETION] = { "inframe_deletion", DUCKVEP_IMPACT_MODERATE, 12u, 3u },
    [DUCKVEP_SO_TRANSCRIPT_ABLATION] = { "transcript_ablation", DUCKVEP_IMPACT_HIGH, 1u, 1u },
    [DUCKVEP_SO_TRANSCRIPT_AMPLIFICATION] = { "transcript_amplification", DUCKVEP_IMPACT_HIGH, 8u, 1u },
    [DUCKVEP_SO_FEATURE_ELONGATION] = { "feature_elongation", DUCKVEP_IMPACT_HIGH, 9u, 3u },
    [DUCKVEP_SO_FEATURE_TRUNCATION] = { "feature_truncation", DUCKVEP_IMPACT_HIGH, 10u, 3u },
    [DUCKVEP_SO_CODING_TRANSCRIPT] = { "coding_transcript_variant", DUCKVEP_IMPACT_MODIFIER, 31u, 3u },
    [DUCKVEP_SO_INFRAME_INSERTION] = { "inframe_insertion", DUCKVEP_IMPACT_MODERATE, 11u, 3u },
    [DUCKVEP_SO_PROTEIN_ALTERING] = { "protein_altering_variant", DUCKVEP_IMPACT_MODERATE, 14u, 3u },
    [DUCKVEP_SO_START_RETAINED] = { "start_retained_variant", DUCKVEP_IMPACT_LOW, 20u, 3u },
    [DUCKVEP_SO_INTERGENIC] = { "intergenic_variant", DUCKVEP_IMPACT_MODIFIER, 40u, 4u },
    [DUCKVEP_SO_TFBS_ABLATION] = { "TFBS_ablation", DUCKVEP_IMPACT_MODERATE, 34u, 2u },
    [DUCKVEP_SO_TFBS_AMPLIFICATION] = { "TFBS_amplification", DUCKVEP_IMPACT_MODIFIER, 35u, 2u },
    [DUCKVEP_SO_TF_BINDING_SITE] = { "TF_binding_site_variant", DUCKVEP_IMPACT_MODIFIER, 36u, 2u },
    [DUCKVEP_SO_REGULATORY_REGION_ABLATION] = { "regulatory_region_ablation", DUCKVEP_IMPACT_MODIFIER, 37u, 2u },
    [DUCKVEP_SO_REGULATORY_REGION_AMPLIFICATION] = { "regulatory_region_amplification", DUCKVEP_IMPACT_MODIFIER, 38u, 2u },
    [DUCKVEP_SO_REGULATORY_REGION] = { "regulatory_region_variant", DUCKVEP_IMPACT_MODIFIER, 39u, 2u },
    [DUCKVEP_SO_SEQUENCE_VARIANT] = { "sequence_variant", DUCKVEP_IMPACT_MODIFIER, 41u, 4u },
};

/* Maximum impact is a hot numeric-output projection. Generate one
 * mask per non-default impact from the same pinned metadata so the
 * runtime does not rescan every set SO bit. */
static const uint64_t k_so_impact_high_mask =
    DUCKVEP_SO(DUCKVEP_SO_SPLICE_DONOR) |
    DUCKVEP_SO(DUCKVEP_SO_SPLICE_ACCEPTOR) |
    DUCKVEP_SO(DUCKVEP_SO_STOP_GAINED) |
    DUCKVEP_SO(DUCKVEP_SO_STOP_LOST) |
    DUCKVEP_SO(DUCKVEP_SO_START_LOST) |
    DUCKVEP_SO(DUCKVEP_SO_FRAMESHIFT) |
    DUCKVEP_SO(DUCKVEP_SO_TRANSCRIPT_ABLATION) |
    DUCKVEP_SO(DUCKVEP_SO_TRANSCRIPT_AMPLIFICATION) |
    DUCKVEP_SO(DUCKVEP_SO_FEATURE_ELONGATION) |
    DUCKVEP_SO(DUCKVEP_SO_FEATURE_TRUNCATION);
static const uint64_t k_so_impact_moderate_mask =
    DUCKVEP_SO(DUCKVEP_SO_MISSENSE) |
    DUCKVEP_SO(DUCKVEP_SO_INFRAME_DELETION) |
    DUCKVEP_SO(DUCKVEP_SO_INFRAME_INSERTION) |
    DUCKVEP_SO(DUCKVEP_SO_PROTEIN_ALTERING) |
    DUCKVEP_SO(DUCKVEP_SO_TFBS_ABLATION);
static const uint64_t k_so_impact_low_mask =
    DUCKVEP_SO(DUCKVEP_SO_SPLICE_REGION) |
    DUCKVEP_SO(DUCKVEP_SO_SPLICE_DONOR_5TH_BASE) |
    DUCKVEP_SO(DUCKVEP_SO_SYNONYMOUS) |
    DUCKVEP_SO(DUCKVEP_SO_STOP_RETAINED) |
    DUCKVEP_SO(DUCKVEP_SO_INCOMPLETE_TERMINAL_CODON) |
    DUCKVEP_SO(DUCKVEP_SO_SPLICE_DONOR_REGION) |
    DUCKVEP_SO(DUCKVEP_SO_SPLICE_POLYPYRIMIDINE) |
    DUCKVEP_SO(DUCKVEP_SO_START_RETAINED);

static const duckvep_so_bit_t k_so_render_order[DUCKVEP_SO_BIT_COUNT] = {
    DUCKVEP_SO_TRANSCRIPT_ABLATION,
    DUCKVEP_SO_SPLICE_ACCEPTOR,
    DUCKVEP_SO_SPLICE_DONOR,
    DUCKVEP_SO_STOP_GAINED,
    DUCKVEP_SO_FRAMESHIFT,
    DUCKVEP_SO_STOP_LOST,
    DUCKVEP_SO_START_LOST,
    DUCKVEP_SO_TRANSCRIPT_AMPLIFICATION,
    DUCKVEP_SO_FEATURE_ELONGATION,
    DUCKVEP_SO_FEATURE_TRUNCATION,
    DUCKVEP_SO_INFRAME_INSERTION,
    DUCKVEP_SO_INFRAME_DELETION,
    DUCKVEP_SO_MISSENSE,
    DUCKVEP_SO_PROTEIN_ALTERING,
    DUCKVEP_SO_SPLICE_DONOR_5TH_BASE,
    DUCKVEP_SO_SPLICE_REGION,
    DUCKVEP_SO_SPLICE_DONOR_REGION,
    DUCKVEP_SO_SPLICE_POLYPYRIMIDINE,
    DUCKVEP_SO_INCOMPLETE_TERMINAL_CODON,
    DUCKVEP_SO_START_RETAINED,
    DUCKVEP_SO_STOP_RETAINED,
    DUCKVEP_SO_SYNONYMOUS,
    DUCKVEP_SO_CODING_SEQUENCE,
    DUCKVEP_SO_MATURE_MIRNA,
    DUCKVEP_SO_5_PRIME_UTR,
    DUCKVEP_SO_3_PRIME_UTR,
    DUCKVEP_SO_NON_CODING_TRANSCRIPT_EXON,
    DUCKVEP_SO_INTRON,
    DUCKVEP_SO_NMD_TRANSCRIPT,
    DUCKVEP_SO_NON_CODING_TRANSCRIPT,
    DUCKVEP_SO_CODING_TRANSCRIPT,
    DUCKVEP_SO_UPSTREAM_GENE,
    DUCKVEP_SO_DOWNSTREAM_GENE,
    DUCKVEP_SO_TFBS_ABLATION,
    DUCKVEP_SO_TFBS_AMPLIFICATION,
    DUCKVEP_SO_TF_BINDING_SITE,
    DUCKVEP_SO_REGULATORY_REGION_ABLATION,
    DUCKVEP_SO_REGULATORY_REGION_AMPLIFICATION,
    DUCKVEP_SO_REGULATORY_REGION,
    DUCKVEP_SO_INTERGENIC,
    DUCKVEP_SO_SEQUENCE_VARIANT,
};
