static int ffm_write_write_index(int fd, int64_t pos)

{

    uint8_t buf[8];

    int i;



    for(i=0;i<8;i++)

        buf[i] = (pos >> (56 - i * 8)) & 0xff;

    lseek(fd, 8, SEEK_SET);

    if (write(fd, buf, 8) != 8)

        return AVERROR(EIO);

    return 8;

}

static int ffm_write_write_index(int fd, int64_t pos)

{

    uint8_t buf[8];

    int i;



    for(i=0;i<8;i++)

        buf[i] = (pos >> (56 - i * 8)) & 0xff;

    lseek(fd, 8, SEEK_SET);

    if (write(fd, buf, 8) != 8)

        return AVERROR(EIO);

    return 8;

}

static int FUNC_0(int VAR_0, int64_t VAR_1)

{

    uint8_t buf[8];

    int VAR_2;



    for(VAR_2=0;VAR_2<8;VAR_2++)

        buf[VAR_2] = (VAR_1 >> (56 - VAR_2 * 8)) & 0xff;

    lseek(VAR_0, 8, SEEK_SET);

    if (write(VAR_0, buf, 8) != 8)

        return AVERROR(EIO);

    return 8;

}

static int FUNC_0(int VAR_0, int64_t VAR_1)
{ uint8_t buf[8]; int VAR_2; for(VAR_2=0;VAR_2<8;VAR_2++) buf[VAR_2] = (VAR_1 >> (56 - VAR_2 * 8)) & 0xff; lseek(VAR_0, 8, SEEK_SET); if (write(VAR_0, buf, 8) != 8)
return AVERROR(EIO); return 8; }