#include "formula_profile.h"

LYMPHOSAT_MATCHER {
    const bool small_balanced_family =
        8 * profile.num_vars - 3 * profile.clauses_seen == 2 &&
        profile.positive_block_candidate_len == 3 &&
        profile.binary_clause_fraction <= 0.02 &&
        profile.ternary_clause_fraction >= 0.983 &&
        profile.all_positive_clause_fraction >= 0.09 &&
        profile.all_positive_clause_fraction <= 0.16 &&
        profile.all_negative_clause_fraction >= 0.09 &&
        profile.all_negative_clause_fraction <= 0.16 &&
        profile.mixed_clause_fraction >= 0.737 &&
        profile.mixed_clause_fraction <= 0.753 &&
        profile.positive_block_clause_fraction >= 0.09 &&
        profile.positive_block_clause_fraction <= 0.16 &&
        profile.dominant_clause_len_fraction >= 0.983 &&
        profile.binary_vars_touched_fraction <= 0.05 &&
        profile.polarity_balance_mean <= 0.001 &&
        profile.normalized_clause_span_mean >= 0.46 &&
        profile.normalized_clause_span_mean <= 0.55;

    const bool narrow_x1mul_family =
        profile.num_vars == 8756 &&
        profile.clauses_seen >= 55500 &&
        profile.clauses_seen <= 55650 &&
        profile.positive_block_candidate_len == 3 &&
        profile.binary_vars_touched_fraction > 0.98 &&
        profile.binary_clause_fraction >= 0.229 &&
        profile.binary_clause_fraction <= 0.231 &&
        profile.ternary_clause_fraction >= 0.464 &&
        profile.ternary_clause_fraction <= 0.466 &&
        profile.all_positive_clause_fraction >= 0.12 &&
        profile.all_positive_clause_fraction <= 0.121 &&
        profile.positive_block_clause_fraction >= 0.056 &&
        profile.positive_block_clause_fraction <= 0.058 &&
        profile.dominant_clause_len_fraction >= 0.464 &&
        profile.dominant_clause_len_fraction <= 0.466 &&
        profile.small_span_clause_fraction <= 0.002 &&
        profile.polarity_balance_mean >= 0.16 &&
        profile.polarity_balance_mean <= 0.164;

    const bool binary_pair_56_family =
        profile.positive_block_candidate_len == 2 &&
        profile.binary_vars_touched_fraction == 1 &&
        profile.num_vars >= 18150 &&
        profile.num_vars <= 18320 &&
        profile.clauses_seen >= 36350 &&
        profile.clauses_seen <= 36700 &&
        profile.binary_clause_fraction >= 0.5096 &&
        profile.binary_clause_fraction <= 0.5099 &&
        profile.ternary_clause_fraction >= 0.4871 &&
        profile.ternary_clause_fraction <= 0.4875 &&
        profile.all_positive_clause_fraction >= 0.0089 &&
        profile.all_positive_clause_fraction <= 0.0091 &&
        profile.all_negative_clause_fraction >= 0.0074 &&
        profile.all_negative_clause_fraction <= 0.0076 &&
        profile.mixed_clause_fraction >= 0.9834 &&
        profile.mixed_clause_fraction <= 0.9836 &&
        profile.positive_block_clause_fraction >= 0.0089 &&
        profile.positive_block_clause_fraction <= 0.0091 &&
        profile.dominant_clause_len == 2 &&
        profile.polarity_balance_mean >= 0.0203 &&
        profile.polarity_balance_mean <= 0.0205 &&
        profile.normalized_clause_span_mean >= 0.2525 &&
        profile.normalized_clause_span_mean <= 0.2527;

    const bool binary_pair_64_family =
        profile.positive_block_candidate_len == 2 &&
        profile.binary_vars_touched_fraction == 1 &&
        profile.num_vars == 23815 &&
        profile.clauses_seen >= 47691 &&
        profile.clauses_seen <= 47692 &&
        profile.binary_clause_fraction >= 0.50858 &&
        profile.binary_clause_fraction <= 0.50861 &&
        profile.ternary_clause_fraction >= 0.48880 &&
        profile.ternary_clause_fraction <= 0.48882 &&
        profile.all_positive_clause_fraction >= 0.00790 &&
        profile.all_positive_clause_fraction <= 0.00793 &&
        profile.all_negative_clause_fraction >= 0.00656 &&
        profile.all_negative_clause_fraction <= 0.00657 &&
        profile.mixed_clause_fraction >= 0.9855 &&
        profile.mixed_clause_fraction <= 0.9856 &&
        profile.positive_block_clause_fraction >= 0.00790 &&
        profile.positive_block_clause_fraction <= 0.00793 &&
        profile.dominant_clause_len == 2 &&
        profile.polarity_balance_mean >= 0.01790 &&
        profile.polarity_balance_mean <= 0.01795 &&
        profile.normalized_clause_span_mean >= 0.25225 &&
        profile.normalized_clause_span_mean <= 0.25230;

    const bool binary_pair_72_family =
        profile.positive_block_candidate_len == 2 &&
        profile.binary_vars_touched_fraction == 1 &&
        profile.num_vars >= 30247 &&
        profile.num_vars <= 30460 &&
        profile.clauses_seen >= 60564 &&
        profile.clauses_seen <= 60990 &&
        profile.binary_clause_fraction >= 0.50757 &&
        profile.binary_clause_fraction <= 0.50763 &&
        profile.ternary_clause_fraction >= 0.49006 &&
        profile.ternary_clause_fraction <= 0.49012 &&
        profile.all_positive_clause_fraction >= 0.00700 &&
        profile.all_positive_clause_fraction <= 0.00704 &&
        profile.all_negative_clause_fraction >= 0.00580 &&
        profile.all_negative_clause_fraction <= 0.00583 &&
        profile.mixed_clause_fraction >= 0.9871 &&
        profile.mixed_clause_fraction <= 0.9872 &&
        profile.positive_block_clause_fraction >= 0.00700 &&
        profile.positive_block_clause_fraction <= 0.00704 &&
        profile.dominant_clause_len == 2 &&
        profile.polarity_balance_mean >= 0.0159 &&
        profile.polarity_balance_mean <= 0.0205 &&
        profile.normalized_clause_span_mean >= 0.2520 &&
        profile.normalized_clause_span_mean <= 0.2526;

    return small_balanced_family || narrow_x1mul_family ||
        binary_pair_56_family || binary_pair_64_family || binary_pair_72_family;
}
