static MegasasCmd *megasas_lookup_frame(MegasasState *s,

    target_phys_addr_t frame)

{

    MegasasCmd *cmd = NULL;

    int num = 0, index;



    index = s->reply_queue_head;



    while (num < s->fw_cmds) {

        if (s->frames[index].pa && s->frames[index].pa == frame) {

            cmd = &s->frames[index];

            break;

        }

        index = megasas_next_index(s, index, s->fw_cmds);

        num++;

    }



    return cmd;

}

static MegasasCmd *megasas_lookup_frame(MegasasState *s,

    target_phys_addr_t frame)

{

    MegasasCmd *cmd = NULL;

    int num = 0, index;



    index = s->reply_queue_head;



    while (num < s->fw_cmds) {

        if (s->frames[index].pa && s->frames[index].pa == frame) {

            cmd = &s->frames[index];

            break;

        }

        index = megasas_next_index(s, index, s->fw_cmds);

        num++;

    }



    return cmd;

}

static MegasasCmd *FUNC_0(MegasasState *s,

    target_phys_addr_t frame)

{

    MegasasCmd *cmd = NULL;

    int VAR_0 = 0, VAR_1;



    VAR_1 = s->reply_queue_head;



    while (VAR_0 < s->fw_cmds) {

        if (s->frames[VAR_1].pa && s->frames[VAR_1].pa == frame) {

            cmd = &s->frames[VAR_1];

            break;

        }

        VAR_1 = megasas_next_index(s, VAR_1, s->fw_cmds);

        VAR_0++;

    }



    return cmd;

}

static MegasasCmd *FUNC_0(MegasasState *s,
target_phys_addr_t frame)
{ MegasasCmd *cmd = NULL; int VAR_0 = 0, VAR_1; VAR_1 = s->reply_queue_head; while (VAR_0 < s->fw_cmds) { if (s->frames[VAR_1].pa && s->frames[VAR_1].pa == frame) { cmd = &s->frames[VAR_1]; break; } VAR_1 = megasas_next_index(s, VAR_1, s->fw_cmds); VAR_0++; } return cmd; }