static const char *read_ts(const char *buf, int *ts_start, int *ts_end,

                           int *x1, int *y1, int *x2, int *y2)

{

    int i, hs, ms, ss, he, me, se;



    for (i=0; i<2; i++) {

        /* try to read timestamps in either the first or second line */

        int c = sscanf(buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d"

                       "%*[ ]X1:%u X2:%u Y1:%u Y2:%u",

                       &hs, &ms, &ss, ts_start, &he, &me, &se, ts_end,

                       x1, x2, y1, y2);

        buf += strcspn(buf, "\n") + 1;

        if (c >= 8) {

            *ts_start = 100*(ss + 60*(ms + 60*hs)) + *ts_start/10;

            *ts_end   = 100*(se + 60*(me + 60*he)) + *ts_end  /10;

            return buf;

        }

    }

    return NULL;

}

static const char *read_ts(const char *buf, int *ts_start, int *ts_end,

                           int *x1, int *y1, int *x2, int *y2)

{

    int i, hs, ms, ss, he, me, se;



    for (i=0; i<2; i++) {

        

        int c = sscanf(buf, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d"

                       "%*[ ]X1:%u X2:%u Y1:%u Y2:%u",

                       &hs, &ms, &ss, ts_start, &he, &me, &se, ts_end,

                       x1, x2, y1, y2);

        buf += strcspn(buf, "\n") + 1;

        if (c >= 8) {

            *ts_start = 100*(ss + 60*(ms + 60*hs)) + *ts_start/10;

            *ts_end   = 100*(se + 60*(me + 60*he)) + *ts_end  /10;

            return buf;

        }

    }

    return NULL;

}

        buf += strcspn(buf, "\n") + 1;
static const char *FUNC_0(const char *VAR_0, int *VAR_1, int *VAR_2,

                           int *VAR_3, int *VAR_4, int *VAR_5, int *VAR_6)

{

    int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13;



    for (VAR_7=0; VAR_7<2; VAR_7++) {

        

        int VAR_14 = sscanf(VAR_0, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d"

                       "%*[ ]X1:%u X2:%u Y1:%u Y2:%u",

                       &VAR_8, &VAR_9, &VAR_10, VAR_1, &VAR_11, &VAR_12, &VAR_13, VAR_2,

                       VAR_3, VAR_5, VAR_4, VAR_6);

        VAR_0 += strcspn(VAR_0, "\n") + 1;

        if (VAR_14 >= 8) {

            *VAR_1 = 100*(VAR_10 + 60*(VAR_9 + 60*VAR_8)) + *VAR_1/10;

            *VAR_2   = 100*(VAR_13 + 60*(VAR_12 + 60*VAR_11)) + *VAR_2  /10;

            return VAR_0;

        }

    }

    return NULL;

}

static const char *FUNC_0(const char *VAR_0, int *VAR_1, int *VAR_2,
int *VAR_3, int *VAR_4, int *VAR_5, int *VAR_6)
{ int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13; for (VAR_7=0; VAR_7<2; VAR_7++) { int VAR_14 = sscanf(VAR_0, "%d:%2d:%2d%*1[,.]%3d --> %d:%2d:%2d%*1[,.]%3d"
"%*[ ]X1:%u X2:%u Y1:%u Y2:%u",
&VAR_8, &VAR_9, &VAR_10, VAR_1, &VAR_11, &VAR_12, &VAR_13, VAR_2,
VAR_3, VAR_5, VAR_4, VAR_6); VAR_0 += strcspn(VAR_0, "\n") + 1; if (VAR_14 >= 8) { *VAR_1 = 100*(VAR_10 + 60*(VAR_9 + 60*VAR_8)) + *VAR_1/10; *VAR_2   = 100*(VAR_13 + 60*(VAR_12 + 60*VAR_11)) + *VAR_2  /10; return VAR_0; } } return NULL; }