static int get_high_utility_cell(elbg_data *elbg)

{

    int i=0;

    /* Using linear search, do binary if it ever turns to be speed critical */

    int r = av_lfg_get(elbg->rand_state)%elbg->utility_inc[elbg->numCB-1] + 1;

    while (elbg->utility_inc[i] < r)

        i++;



    av_assert2(elbg->cells[i]);



    return i;

}

static int get_high_utility_cell(elbg_data *elbg)

{

    int i=0;

    

    int r = av_lfg_get(elbg->rand_state)%elbg->utility_inc[elbg->numCB-1] + 1;

    while (elbg->utility_inc[i] < r)

        i++;



    av_assert2(elbg->cells[i]);



    return i;

}

    int r = av_lfg_get(elbg->rand_state)%elbg->utility_inc[elbg->numCB-1] + 1;     while (elbg->utility_inc[i] < r)
static int FUNC_0(elbg_data *VAR_0)

{

    int VAR_1=0;

    

    int VAR_2 = av_lfg_get(VAR_0->rand_state)%VAR_0->utility_inc[VAR_0->numCB-1] + 1;

    while (VAR_0->utility_inc[VAR_1] < VAR_2)

        VAR_1++;



    av_assert2(VAR_0->cells[VAR_1]);



    return VAR_1;

}

static int FUNC_0(elbg_data *VAR_0)
{ int VAR_1=0; int VAR_2 = av_lfg_get(VAR_0->rand_state)%VAR_0->utility_inc[VAR_0->numCB-1] + 1; while (VAR_0->utility_inc[VAR_1] < VAR_2)
VAR_1++; av_assert2(VAR_0->cells[VAR_1]); return VAR_1; }