|
|
@ -61,15 +61,16 @@ int main() { |
|
|
|
|
|
|
|
auto start_time = clock(); |
|
|
|
|
|
|
|
// auto a = Analyse(RawCode::from_common_code("1a9bf0c"));
|
|
|
|
auto a = Analyse(RawCode::from_common_code("1a9bf0c")); |
|
|
|
// auto a = Analyse(RawCode::from_common_code("4fea134"));
|
|
|
|
auto a = Analyse(RawCode::from_common_code("A5D3AF")); |
|
|
|
// auto a = Analyse(RawCode::from_common_code("A5D3AF"));
|
|
|
|
|
|
|
|
|
|
|
|
// a.build();
|
|
|
|
auto ret = a.build_until([](uint64_t code) { |
|
|
|
return ((code >> (3 * 0xD)) & 0b111) == B_2x2; |
|
|
|
}); |
|
|
|
// auto ret = a.build_until([](uint64_t code) {
|
|
|
|
// return ((code >> (3 * 0xD)) & 0b111) == B_2x2;
|
|
|
|
// });
|
|
|
|
auto ret = a.build_resolve(); |
|
|
|
// for (const auto &r : ret) {
|
|
|
|
// std::cout << r << std::endl;
|
|
|
|
// }
|
|
|
@ -79,11 +80,15 @@ int main() { |
|
|
|
std::cerr << (clock() - start_time) * 1000000 / CLOCKS_PER_SEC << "us" << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
auto g = Graph(); |
|
|
|
start_time = clock(); |
|
|
|
auto svg_ret = a.backtrack(ret); |
|
|
|
std::cerr << (clock() - start_time) * 1000000 / CLOCKS_PER_SEC << "us" << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
auto g = Graph(); |
|
|
|
auto svg_data = g.svg_demo(svg_ret); |
|
|
|
|
|
|
|
std::cout << svg_data << std::endl; |
|
|
|
// std::cout << svg_data << std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
// std::cout << a.layer_export(81).size() << std::endl;
|
|
|
|