void nand_setpins(DeviceState *dev, uint8_t cle, uint8_t ale,

                  uint8_t ce, uint8_t wp, uint8_t gnd)

{

    NANDFlashState *s = (NANDFlashState *) dev;

    s->cle = cle;

    s->ale = ale;

    s->ce = ce;

    s->wp = wp;

    s->gnd = gnd;

    if (wp)

        s->status |= NAND_IOSTATUS_UNPROTCT;

    else

        s->status &= ~NAND_IOSTATUS_UNPROTCT;

}

void nand_setpins(DeviceState *dev, uint8_t cle, uint8_t ale,

                  uint8_t ce, uint8_t wp, uint8_t gnd)

{

    NANDFlashState *s = (NANDFlashState *) dev;

    s->cle = cle;

    s->ale = ale;

    s->ce = ce;

    s->wp = wp;

    s->gnd = gnd;

    if (wp)

        s->status |= NAND_IOSTATUS_UNPROTCT;

    else

        s->status &= ~NAND_IOSTATUS_UNPROTCT;

}

    if (wp)
void FUNC_0(DeviceState *VAR_0, uint8_t VAR_1, uint8_t VAR_2,

                  uint8_t VAR_3, uint8_t VAR_4, uint8_t VAR_5)

{

    NANDFlashState *s = (NANDFlashState *) VAR_0;

    s->VAR_1 = VAR_1;

    s->VAR_2 = VAR_2;

    s->VAR_3 = VAR_3;

    s->VAR_4 = VAR_4;

    s->VAR_5 = VAR_5;

    if (VAR_4)

        s->status |= NAND_IOSTATUS_UNPROTCT;

    else

        s->status &= ~NAND_IOSTATUS_UNPROTCT;

}

void FUNC_0(DeviceState *VAR_0, uint8_t VAR_1, uint8_t VAR_2,
uint8_t VAR_3, uint8_t VAR_4, uint8_t VAR_5)
{ NANDFlashState *s = (NANDFlashState *) VAR_0; s->VAR_1 = VAR_1; s->VAR_2 = VAR_2; s->VAR_3 = VAR_3; s->VAR_4 = VAR_4; s->VAR_5 = VAR_5; if (VAR_4)
s->status |= NAND_IOSTATUS_UNPROTCT; else
s->status &= ~NAND_IOSTATUS_UNPROTCT; }