static int print_size(DeviceState *dev, Property *prop, char *dest, size_t len)

{

    uint64_t *ptr = qdev_get_prop_ptr(dev, prop);

    char suffixes[] = {'T', 'G', 'M', 'K', 'B'};

    int i = 0;

    uint64_t div;



    for (div = 1ULL << 40; !(*ptr / div) ; div >>= 10) {

        i++;

    }

    return snprintf(dest, len, "%0.03f%c", (double)*ptr/div, suffixes[i]);

}

static int print_size(DeviceState *dev, Property *prop, char *dest, size_t len)

{

    uint64_t *ptr = qdev_get_prop_ptr(dev, prop);

    char suffixes[] = {'T', 'G', 'M', 'K', 'B'};

    int i = 0;

    uint64_t div;



    for (div = 1ULL << 40; !(*ptr / div) ; div >>= 10) {

        i++;

    }

    return snprintf(dest, len, "%0.03f%c", (double)*ptr/div, suffixes[i]);

}

static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)

{

    uint64_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1);

    char VAR_4[] = {'T', 'G', 'M', 'K', 'B'};

    int VAR_5 = 0;

    uint64_t div;



    for (div = 1ULL << 40; !(*ptr / div) ; div >>= 10) {

        VAR_5++;

    }

    return snprintf(VAR_2, VAR_3, "%0.03f%c", (double)*ptr/div, VAR_4[VAR_5]);

}

static int FUNC_0(DeviceState *VAR_0, Property *VAR_1, char *VAR_2, size_t VAR_3)
{ uint64_t *ptr = qdev_get_prop_ptr(VAR_0, VAR_1); char VAR_4[] = {'T', 'G', 'M', 'K', 'B'}; int VAR_5 = 0; uint64_t div; for (div = 1ULL << 40; !(*ptr / div) ; div >>= 10) { VAR_5++; } return snprintf(VAR_2, VAR_3, "%0.03f%c", (double)*ptr/div, VAR_4[VAR_5]); }