static void omap_inth_sir_update(struct omap_intr_handler_s *s, int is_fiq)

{

    int i, j, sir_intr, p_intr, p, f;

    uint32_t level;

    sir_intr = 0;

    p_intr = 255;



    /* Find the interrupt line with the highest dynamic priority.

     * Note: 0 denotes the hightest priority.

     * If all interrupts have the same priority, the default order is IRQ_N,

     * IRQ_N-1,...,IRQ_0. */

    for (j = 0; j < s->nbanks; ++j) {

        level = s->bank[j].irqs & ~s->bank[j].mask &

                (is_fiq ? s->bank[j].fiq : ~s->bank[j].fiq);

        for (f = ffs(level), i = f - 1, level >>= f - 1; f; i += f,

                        level >>= f) {

            p = s->bank[j].priority[i];

            if (p <= p_intr) {

                p_intr = p;

                sir_intr = 32 * j + i;

            }

            f = ffs(level >> 1);

        }

    }

    s->sir_intr[is_fiq] = sir_intr;

}

static void omap_inth_sir_update(struct omap_intr_handler_s *s, int is_fiq)

{

    int i, j, sir_intr, p_intr, p, f;

    uint32_t level;

    sir_intr = 0;

    p_intr = 255;



    







    for (j = 0; j < s->nbanks; ++j) {

        level = s->bank[j].irqs & ~s->bank[j].mask &

                (is_fiq ? s->bank[j].fiq : ~s->bank[j].fiq);

        for (f = ffs(level), i = f - 1, level >>= f - 1; f; i += f,

                        level >>= f) {

            p = s->bank[j].priority[i];

            if (p <= p_intr) {

                p_intr = p;

                sir_intr = 32 * j + i;

            }

            f = ffs(level >> 1);

        }

    }

    s->sir_intr[is_fiq] = sir_intr;

}

static void FUNC_0(struct omap_intr_handler_s *VAR_0, int VAR_1)

{

    int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7;

    uint32_t level;

    VAR_4 = 0;

    VAR_5 = 255;



    







    for (VAR_3 = 0; VAR_3 < VAR_0->nbanks; ++VAR_3) {

        level = VAR_0->bank[VAR_3].irqs & ~VAR_0->bank[VAR_3].mask &

                (VAR_1 ? VAR_0->bank[VAR_3].fiq : ~VAR_0->bank[VAR_3].fiq);

        for (VAR_7 = ffs(level), VAR_2 = VAR_7 - 1, level >>= VAR_7 - 1; VAR_7; VAR_2 += VAR_7,

                        level >>= VAR_7) {

            VAR_6 = VAR_0->bank[VAR_3].priority[VAR_2];

            if (VAR_6 <= VAR_5) {

                VAR_5 = VAR_6;

                VAR_4 = 32 * VAR_3 + VAR_2;

            }

            VAR_7 = ffs(level >> 1);

        }

    }

    VAR_0->VAR_4[VAR_1] = VAR_4;

}

static void FUNC_0(struct omap_intr_handler_s *VAR_0, int VAR_1)
{ int VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7; uint32_t level; VAR_4 = 0; VAR_5 = 255; for (VAR_3 = 0; VAR_3 < VAR_0->nbanks; ++VAR_3) { level = VAR_0->bank[VAR_3].irqs & ~VAR_0->bank[VAR_3].mask &
(VAR_1 ? VAR_0->bank[VAR_3].fiq : ~VAR_0->bank[VAR_3].fiq); for (VAR_7 = ffs(level), VAR_2 = VAR_7 - 1, level >>= VAR_7 - 1; VAR_7; VAR_2 += VAR_7, level >>= VAR_7) { VAR_6 = VAR_0->bank[VAR_3].priority[VAR_2]; if (VAR_6 <= VAR_5) { VAR_5 = VAR_6; VAR_4 = 32 * VAR_3 + VAR_2; } VAR_7 = ffs(level >> 1); } } VAR_0->VAR_4[VAR_1] = VAR_4; }