static int get_pci_config_device(QEMUFile *f, void *pv, size_t size)

{

    PCIDevice *s = container_of(pv, PCIDevice, config);

    uint8_t config[size];

    int i;



    qemu_get_buffer(f, config, size);

    for (i = 0; i < size; ++i)

        if ((config[i] ^ s->config[i]) & s->cmask[i] & ~s->wmask[i])

            return -EINVAL;

    memcpy(s->config, config, size);



    pci_update_mappings(s);



    return 0;

}

static int get_pci_config_device(QEMUFile *f, void *pv, size_t size)

{

    PCIDevice *s = container_of(pv, PCIDevice, config);

    uint8_t config[size];

    int i;



    qemu_get_buffer(f, config, size);

    for (i = 0; i < size; ++i)

        if ((config[i] ^ s->config[i]) & s->cmask[i] & ~s->wmask[i])

            return -EINVAL;

    memcpy(s->config, config, size);



    pci_update_mappings(s);



    return 0;

}

    uint8_t config[size];     qemu_get_buffer(f, config, size);     for (i = 0; i < size; ++i)     memcpy(s->config, config, size);
static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)

{

    PCIDevice *s = container_of(VAR_1, PCIDevice, config);

    uint8_t config[VAR_2];

    int VAR_3;



    qemu_get_buffer(VAR_0, config, VAR_2);

    for (VAR_3 = 0; VAR_3 < VAR_2; ++VAR_3)

        if ((config[VAR_3] ^ s->config[VAR_3]) & s->cmask[VAR_3] & ~s->wmask[VAR_3])

            return -EINVAL;

    memcpy(s->config, config, VAR_2);



    pci_update_mappings(s);



    return 0;

}

static int FUNC_0(QEMUFile *VAR_0, void *VAR_1, size_t VAR_2)
{ PCIDevice *s = container_of(VAR_1, PCIDevice, config); uint8_t config[VAR_2]; int VAR_3; qemu_get_buffer(VAR_0, config, VAR_2); for (VAR_3 = 0; VAR_3 < VAR_2; ++VAR_3) if ((config[VAR_3] ^ s->config[VAR_3]) & s->cmask[VAR_3] & ~s->wmask[VAR_3])
return -EINVAL; memcpy(s->config, config, VAR_2); pci_update_mappings(s); return 0; }