static void hdcd_reset(hdcd_state_t *state, unsigned rate)

{

    int i;



    state->window = 0;

    state->readahead = 32;

    state->arg = 0;

    state->control = 0;



    state->running_gain = 0;



    state->sustain = 0;

    state->sustain_reset = rate * 10;



    state->code_counterA = 0;

    state->code_counterA_almost = 0;

    state->code_counterB = 0;

    state->code_counterB_checkfails = 0;

    state->code_counterC = 0;

    state->code_counterC_unmatched = 0;



    state->count_peak_extend = 0;

    state->count_transient_filter = 0;

    for(i = 0; i < 16; i++) state->gain_counts[i] = 0;

    state->max_gain = 0;



    state->count_sustain_expired = -1;

}

static void hdcd_reset(hdcd_state_t *state, unsigned rate)

{

    int i;



    state->window = 0;

    state->readahead = 32;

    state->arg = 0;

    state->control = 0;



    state->running_gain = 0;



    state->sustain = 0;

    state->sustain_reset = rate * 10;



    state->code_counterA = 0;

    state->code_counterA_almost = 0;

    state->code_counterB = 0;

    state->code_counterB_checkfails = 0;

    state->code_counterC = 0;

    state->code_counterC_unmatched = 0;



    state->count_peak_extend = 0;

    state->count_transient_filter = 0;

    for(i = 0; i < 16; i++) state->gain_counts[i] = 0;

    state->max_gain = 0;



    state->count_sustain_expired = -1;

}

static void FUNC_0(hdcd_state_t *VAR_0, unsigned VAR_1)

{

    int VAR_2;



    VAR_0->window = 0;

    VAR_0->readahead = 32;

    VAR_0->arg = 0;

    VAR_0->control = 0;



    VAR_0->running_gain = 0;



    VAR_0->sustain = 0;

    VAR_0->sustain_reset = VAR_1 * 10;



    VAR_0->code_counterA = 0;

    VAR_0->code_counterA_almost = 0;

    VAR_0->code_counterB = 0;

    VAR_0->code_counterB_checkfails = 0;

    VAR_0->code_counterC = 0;

    VAR_0->code_counterC_unmatched = 0;



    VAR_0->count_peak_extend = 0;

    VAR_0->count_transient_filter = 0;

    for(VAR_2 = 0; VAR_2 < 16; VAR_2++) VAR_0->gain_counts[VAR_2] = 0;

    VAR_0->max_gain = 0;



    VAR_0->count_sustain_expired = -1;

}

static void FUNC_0(hdcd_state_t *VAR_0, unsigned VAR_1)
{ int VAR_2; VAR_0->window = 0; VAR_0->readahead = 32; VAR_0->arg = 0; VAR_0->control = 0; VAR_0->running_gain = 0; VAR_0->sustain = 0; VAR_0->sustain_reset = VAR_1 * 10; VAR_0->code_counterA = 0; VAR_0->code_counterA_almost = 0; VAR_0->code_counterB = 0; VAR_0->code_counterB_checkfails = 0; VAR_0->code_counterC = 0; VAR_0->code_counterC_unmatched = 0; VAR_0->count_peak_extend = 0; VAR_0->count_transient_filter = 0; for(VAR_2 = 0; VAR_2 < 16; VAR_2++) VAR_0->gain_counts[VAR_2] = 0; VAR_0->max_gain = 0; VAR_0->count_sustain_expired = -1; }