static int32_t parse_gain(const char *gain)

{

    char *fraction;

    int  scale = 10000;

    int32_t mb = 0;

    int db;



    if (!gain)

        return INT32_MIN;



    gain += strspn(gain, " \t");



    db = strtol(gain, &fraction, 0);

    if (*fraction++ == '.') {

        while (av_isdigit(*fraction) && scale) {

            mb += scale * (*fraction - '0');

            scale /= 10;

            fraction++;

        }

    }



    if (abs(db) > (INT32_MAX - mb) / 100000)

        return INT32_MIN;



    return db * 100000 + FFSIGN(db) * mb;

}

static int32_t parse_gain(const char *gain)

{

    char *fraction;

    int  scale = 10000;

    int32_t mb = 0;

    int db;



    if (!gain)

        return INT32_MIN;



    gain += strspn(gain, " \t");



    db = strtol(gain, &fraction, 0);

    if (*fraction++ == '.') {

        while (av_isdigit(*fraction) && scale) {

            mb += scale * (*fraction - '0');

            scale /= 10;

            fraction++;

        }

    }



    if (abs(db) > (INT32_MAX - mb) / 100000)

        return INT32_MIN;



    return db * 100000 + FFSIGN(db) * mb;

}

static int32_t FUNC_0(const char *gain)

{

    char *VAR_0;

    int  VAR_1 = 10000;

    int32_t mb = 0;

    int VAR_2;



    if (!gain)

        return INT32_MIN;



    gain += strspn(gain, " \t");



    VAR_2 = strtol(gain, &VAR_0, 0);

    if (*VAR_0++ == '.') {

        while (av_isdigit(*VAR_0) && VAR_1) {

            mb += VAR_1 * (*VAR_0 - '0');

            VAR_1 /= 10;

            VAR_0++;

        }

    }



    if (abs(VAR_2) > (INT32_MAX - mb) / 100000)

        return INT32_MIN;



    return VAR_2 * 100000 + FFSIGN(VAR_2) * mb;

}

static int32_t FUNC_0(const char *gain)
{ char *VAR_0; int  VAR_1 = 10000; int32_t mb = 0; int VAR_2; if (!gain)
return INT32_MIN; gain += strspn(gain, " \t"); VAR_2 = strtol(gain, &VAR_0, 0); if (*VAR_0++ == '.') { while (av_isdigit(*VAR_0) && VAR_1) { mb += VAR_1 * (*VAR_0 - '0'); VAR_1 /= 10; VAR_0++; } } if (abs(VAR_2) > (INT32_MAX - mb) / 100000)
return INT32_MIN; return VAR_2 * 100000 + FFSIGN(VAR_2) * mb; }