static int32_t parse_gain(const char *gain)

{

    char *fraction;

    int  scale = 10000;

    int32_t mb = 0;

    int sign   = 1;

    int db;



    if (!gain)

        return INT32_MIN;



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



    if (*gain == '-')

        sign = -1;



    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 + sign * mb;

}

static int32_t parse_gain(const char *gain)

{

    char *fraction;

    int  scale = 10000;

    int32_t mb = 0;

    int sign   = 1;

    int db;



    if (!gain)

        return INT32_MIN;



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



    if (*gain == '-')

        sign = -1;



    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 + sign * mb;

}

static int32_t parse_gain(const char *gain)     if (!gain)         return INT32_MIN;     gain += strspn(gain, " \t");     if (*gain == '-')     db = strtol(gain, &fraction, 0);         return INT32_MIN;
static int32_t FUNC_0(const char *gain)

{

    char *VAR_0;

    int  VAR_1 = 10000;

    int32_t mb = 0;

    int VAR_2   = 1;

    int VAR_3;



    if (!gain)

        return INT32_MIN;



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



    if (*gain == '-')

        VAR_2 = -1;



    VAR_3 = 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_3) > (INT32_MAX - mb) / 100000)

        return INT32_MIN;



    return VAR_3 * 100000 + 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   = 1; int VAR_3; if (!gain)
return INT32_MIN; gain += strspn(gain, " \t"); if (*gain == '-')
VAR_2 = -1; VAR_3 = 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_3) > (INT32_MAX - mb) / 100000)
return INT32_MIN; return VAR_3 * 100000 + VAR_2 * mb; }