/* SPDX-License-Identifier: MIT */ #include "NativeAdrenoVmAlias.h" #include #include #include #include #include #define CHECK(x) do {if(!(x)){std::fprintf(stderr,"line %d: %s\n",__LINE__,#x);std::exit(1);}}while(0) struct Range {uint64_t physical,bytes;}; static uint64_t randomState=0x28372934; static uint64_t next() {randomState^=randomState<<13;randomState^=randomState>>7;randomState^=randomState<<17;return randomState;} static bool oracle(const std::vector &ranges,uint64_t start,uint64_t bytes) { for(const auto &r:ranges)if(start ranges; const unsigned count=profile%65; for(unsigned i=0;i scratch(ranges.size()+2,0xdeadbeef); std::vector selected; size_t n=0; for(size_t i=0;i ranges(65536);std::vector order(ranges.size()); for(size_t i=0;i