int ide_get_geometry(BusState *bus, int unit,

                     int16_t *cyls, int8_t *heads, int8_t *secs)

{

    IDEState *s = &DO_UPCAST(IDEBus, qbus, bus)->ifs[unit];



    if (s->drive_kind != IDE_HD || !s->bs) {

        return -1;

    }



    *cyls = s->cylinders;

    *heads = s->heads;

    *secs = s->sectors;

    return 0;

}

int ide_get_geometry(BusState *bus, int unit,

                     int16_t *cyls, int8_t *heads, int8_t *secs)

{

    IDEState *s = &DO_UPCAST(IDEBus, qbus, bus)->ifs[unit];



    if (s->drive_kind != IDE_HD || !s->bs) {

        return -1;

    }



    *cyls = s->cylinders;

    *heads = s->heads;

    *secs = s->sectors;

    return 0;

}

int FUNC_0(BusState *VAR_0, int VAR_1,

                     int16_t *VAR_2, int8_t *VAR_3, int8_t *VAR_4)

{

    IDEState *s = &DO_UPCAST(IDEBus, qbus, VAR_0)->ifs[VAR_1];



    if (s->drive_kind != IDE_HD || !s->bs) {

        return -1;

    }



    *VAR_2 = s->cylinders;

    *VAR_3 = s->VAR_3;

    *VAR_4 = s->sectors;

    return 0;

}

int FUNC_0(BusState *VAR_0, int VAR_1,
int16_t *VAR_2, int8_t *VAR_3, int8_t *VAR_4)
{ IDEState *s = &DO_UPCAST(IDEBus, qbus, VAR_0)->ifs[VAR_1]; if (s->drive_kind != IDE_HD || !s->bs) { return -1; } *VAR_2 = s->cylinders; *VAR_3 = s->VAR_3; *VAR_4 = s->sectors; return 0; }