static void print_type_size(Visitor *v, uint64_t *obj, const char *name,

                           Error **errp)

{

    StringOutputVisitor *sov = DO_UPCAST(StringOutputVisitor, visitor, v);

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

    uint64_t div, val;

    char *out;

    int i;



    if (!sov->human) {

        out = g_strdup_printf("%llu", (long long) *obj);

        string_output_set(sov, out);

        return;

    }



    val = *obj;



    /* Compute floor(log2(val)).  */

    i = 64 - clz64(val);



    /* Find the power of 1024 that we'll display as the units.  */

    i /= 10;

    if (i >= ARRAY_SIZE(suffixes)) {

        i = ARRAY_SIZE(suffixes) - 1;

    }

    div = 1ULL << (i * 10);



    out = g_strdup_printf("%0.03f%c", (double)val/div, suffixes[i]);

    string_output_set(sov, out);

}

static void print_type_size(Visitor *v, uint64_t *obj, const char *name,

                           Error **errp)

{

    StringOutputVisitor *sov = DO_UPCAST(StringOutputVisitor, visitor, v);

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

    uint64_t div, val;

    char *out;

    int i;



    if (!sov->human) {

        out = g_strdup_printf("%llu", (long long) *obj);

        string_output_set(sov, out);

        return;

    }



    val = *obj;



    

    i = 64 - clz64(val);



    

    i /= 10;

    if (i >= ARRAY_SIZE(suffixes)) {

        i = ARRAY_SIZE(suffixes) - 1;

    }

    div = 1ULL << (i * 10);



    out = g_strdup_printf("%0.03f%c", (double)val/div, suffixes[i]);

    string_output_set(sov, out);

}

    static const char suffixes[] = { 'B', 'K', 'M', 'G', 'T' };         out = g_strdup_printf("%llu", (long long) *obj);     i = 64 - clz64(val);     i /= 10;     if (i >= ARRAY_SIZE(suffixes)) {         i = ARRAY_SIZE(suffixes) - 1;     out = g_strdup_printf("%0.03f%c", (double)val/div, suffixes[i]);
static void FUNC_0(Visitor *VAR_0, uint64_t *VAR_1, const char *VAR_2,

                           Error **VAR_3)

{

    StringOutputVisitor *sov = DO_UPCAST(StringOutputVisitor, visitor, VAR_0);

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

    uint64_t div, val;

    char *VAR_5;

    int VAR_6;



    if (!sov->human) {

        VAR_5 = g_strdup_printf("%llu", (long long) *VAR_1);

        string_output_set(sov, VAR_5);

        return;

    }



    val = *VAR_1;



    

    VAR_6 = 64 - clz64(val);



    

    VAR_6 /= 10;

    if (VAR_6 >= ARRAY_SIZE(VAR_4)) {

        VAR_6 = ARRAY_SIZE(VAR_4) - 1;

    }

    div = 1ULL << (VAR_6 * 10);



    VAR_5 = g_strdup_printf("%0.03f%c", (double)val/div, VAR_4[VAR_6]);

    string_output_set(sov, VAR_5);

}

static void FUNC_0(Visitor *VAR_0, uint64_t *VAR_1, const char *VAR_2,
Error **VAR_3)
{ StringOutputVisitor *sov = DO_UPCAST(StringOutputVisitor, visitor, VAR_0); static const char VAR_4[] = { 'B', 'K', 'M', 'G', 'T' }; uint64_t div, val; char *VAR_5; int VAR_6; if (!sov->human) { VAR_5 = g_strdup_printf("%llu", (long long) *VAR_1); string_output_set(sov, VAR_5); return; } val = *VAR_1; VAR_6 = 64 - clz64(val); VAR_6 /= 10; if (VAR_6 >= ARRAY_SIZE(VAR_4)) { VAR_6 = ARRAY_SIZE(VAR_4) - 1; } div = 1ULL << (VAR_6 * 10); VAR_5 = g_strdup_printf("%0.03f%c", (double)val/div, VAR_4[VAR_6]); string_output_set(sov, VAR_5); }