int main(int argc, char** argv)

{

    FILE *f= fopen(argv[1], "rb+");

    int count= atoi(argv[2]);

    int maxburst= atoi(argv[3]);

    int length;



    srand (time (0));



    fseek(f, 0, SEEK_END);

    length= ftell(f);

    fseek(f, 0, SEEK_SET);



    while(count--){

        int burst= 1 + random() * (uint64_t) (abs(maxburst)-1) / RAND_MAX;

        int pos= random() * (uint64_t) length / RAND_MAX;

        fseek(f, pos, SEEK_SET);



        if(maxburst<0) burst= -maxburst;



        if(pos + burst > length)

            continue;



        while(burst--){

            int val= random() * 256ULL / RAND_MAX;



            if(maxburst<0) val=0;



            fwrite(&val, 1, 1, f);

        }

    }



    return 0;

}

int main(int argc, char** argv)

{

    FILE *f= fopen(argv[1], "rb+");

    int count= atoi(argv[2]);

    int maxburst= atoi(argv[3]);

    int length;



    srand (time (0));



    fseek(f, 0, SEEK_END);

    length= ftell(f);

    fseek(f, 0, SEEK_SET);



    while(count--){

        int burst= 1 + random() * (uint64_t) (abs(maxburst)-1) / RAND_MAX;

        int pos= random() * (uint64_t) length / RAND_MAX;

        fseek(f, pos, SEEK_SET);



        if(maxburst<0) burst= -maxburst;



        if(pos + burst > length)

            continue;



        while(burst--){

            int val= random() * 256ULL / RAND_MAX;



            if(maxburst<0) val=0;



            fwrite(&val, 1, 1, f);

        }

    }



    return 0;

}

int FUNC_0(int VAR_0, char** VAR_1)

{

    FILE *f= fopen(VAR_1[1], "rb+");

    int VAR_2= atoi(VAR_1[2]);

    int VAR_3= atoi(VAR_1[3]);

    int VAR_4;



    srand (time (0));



    fseek(f, 0, SEEK_END);

    VAR_4= ftell(f);

    fseek(f, 0, SEEK_SET);



    while(VAR_2--){

        int VAR_5= 1 + random() * (uint64_t) (abs(VAR_3)-1) / RAND_MAX;

        int VAR_6= random() * (uint64_t) VAR_4 / RAND_MAX;

        fseek(f, VAR_6, SEEK_SET);



        if(VAR_3<0) VAR_5= -VAR_3;



        if(VAR_6 + VAR_5 > VAR_4)

            continue;



        while(VAR_5--){

            int VAR_7= random() * 256ULL / RAND_MAX;



            if(VAR_3<0) VAR_7=0;



            fwrite(&VAR_7, 1, 1, f);

        }

    }



    return 0;

}

int FUNC_0(int VAR_0, char** VAR_1)
{ FILE *f= fopen(VAR_1[1], "rb+"); int VAR_2= atoi(VAR_1[2]); int VAR_3= atoi(VAR_1[3]); int VAR_4; srand (time (0)); fseek(f, 0, SEEK_END); VAR_4= ftell(f); fseek(f, 0, SEEK_SET); while(VAR_2--){ int VAR_5= 1 + random() * (uint64_t) (abs(VAR_3)-1) / RAND_MAX; int VAR_6= random() * (uint64_t) VAR_4 / RAND_MAX; fseek(f, VAR_6, SEEK_SET); if(VAR_3<0) VAR_5= -VAR_3; if(VAR_6 + VAR_5 > VAR_4)
continue; while(VAR_5--){ int VAR_7= random() * 256ULL / RAND_MAX; if(VAR_3<0) VAR_7=0; fwrite(&VAR_7, 1, 1, f); } } return 0; }