static void up_heap(uint32_t val, uint32_t *heap, uint32_t *weights)

{

    uint32_t initial_val = heap[val];



    while (weights[initial_val] < weights[heap[val >> 1]]) {

        heap[val] = heap[val >> 1];

        val     >>= 1;

    }



    heap[val] = initial_val;

}

static void up_heap(uint32_t val, uint32_t *heap, uint32_t *weights)

{

    uint32_t initial_val = heap[val];



    while (weights[initial_val] < weights[heap[val >> 1]]) {

        heap[val] = heap[val >> 1];

        val     >>= 1;

    }



    heap[val] = initial_val;

}

static void up_heap(uint32_t val, uint32_t *heap, uint32_t *weights)     uint32_t initial_val = heap[val];     while (weights[initial_val] < weights[heap[val >> 1]]) {         heap[val] = heap[val >> 1];         val     >>= 1;     heap[val] = initial_val;     uint32_t initial_val = heap[val];     heap[val] = initial_val;
static void FUNC_0(uint32_t VAR_0, uint32_t *VAR_1, uint32_t *VAR_2)

{

    uint32_t initial_val = VAR_1[VAR_0];



    while (VAR_2[initial_val] < VAR_2[VAR_1[VAR_0 >> 1]]) {

        VAR_1[VAR_0] = VAR_1[VAR_0 >> 1];

        VAR_0     >>= 1;

    }



    VAR_1[VAR_0] = initial_val;

}

static void FUNC_0(uint32_t VAR_0, uint32_t *VAR_1, uint32_t *VAR_2)
{ uint32_t initial_val = VAR_1[VAR_0]; while (VAR_2[initial_val] < VAR_2[VAR_1[VAR_0 >> 1]]) { VAR_1[VAR_0] = VAR_1[VAR_0 >> 1]; VAR_0     >>= 1; } VAR_1[VAR_0] = initial_val; }