static void set_sar(TiffContext *s, unsigned tag, unsigned num, unsigned den)

{

    int offset = tag == TIFF_YRES ? 2 : 0;

    s->res[offset++] = num;

    s->res[offset]   = den;

    if (s->res[0] && s->res[1] && s->res[2] && s->res[3])

        av_reduce(&s->avctx->sample_aspect_ratio.num, &s->avctx->sample_aspect_ratio.den,

                  s->res[2] * (uint64_t)s->res[1], s->res[0] * (uint64_t)s->res[3], INT32_MAX);

}

static void set_sar(TiffContext *s, unsigned tag, unsigned num, unsigned den)

{

    int offset = tag == TIFF_YRES ? 2 : 0;

    s->res[offset++] = num;

    s->res[offset]   = den;

    if (s->res[0] && s->res[1] && s->res[2] && s->res[3])

        av_reduce(&s->avctx->sample_aspect_ratio.num, &s->avctx->sample_aspect_ratio.den,

                  s->res[2] * (uint64_t)s->res[1], s->res[0] * (uint64_t)s->res[3], INT32_MAX);

}

    if (s->res[0] && s->res[1] && s->res[2] && s->res[3])                   s->res[2] * (uint64_t)s->res[1], s->res[0] * (uint64_t)s->res[3], INT32_MAX);
static void FUNC_0(TiffContext *VAR_0, unsigned VAR_1, unsigned VAR_2, unsigned VAR_3)

{

    int VAR_4 = VAR_1 == TIFF_YRES ? 2 : 0;

    VAR_0->res[VAR_4++] = VAR_2;

    VAR_0->res[VAR_4]   = VAR_3;

    if (VAR_0->res[0] && VAR_0->res[1] && VAR_0->res[2] && VAR_0->res[3])

        av_reduce(&VAR_0->avctx->sample_aspect_ratio.VAR_2, &VAR_0->avctx->sample_aspect_ratio.VAR_3,

                  VAR_0->res[2] * (uint64_t)VAR_0->res[1], VAR_0->res[0] * (uint64_t)VAR_0->res[3], INT32_MAX);

}

static void FUNC_0(TiffContext *VAR_0, unsigned VAR_1, unsigned VAR_2, unsigned VAR_3)
{ int VAR_4 = VAR_1 == TIFF_YRES ? 2 : 0; VAR_0->res[VAR_4++] = VAR_2; VAR_0->res[VAR_4]   = VAR_3; if (VAR_0->res[0] && VAR_0->res[1] && VAR_0->res[2] && VAR_0->res[3])
av_reduce(&VAR_0->avctx->sample_aspect_ratio.VAR_2, &VAR_0->avctx->sample_aspect_ratio.VAR_3,
VAR_0->res[2] * (uint64_t)VAR_0->res[1], VAR_0->res[0] * (uint64_t)VAR_0->res[3], INT32_MAX); }