#!/usr/bin/env python3 """Read-only source grid/dispatcher anchors and bounded ordering fixtures.""" from __future__ import annotations import argparse from dataclasses import dataclass import hashlib import json import math from pathlib import Path import struct from checkpoint_script_state import EXE_SHA256, find_case, read_va from pe_inspect import PE BODIES = ( ('static_dispatcher', 0x47B4B0, 0x47B889, 'da4ca56149636d5fc5059403a0ef81a0007c96972e3c12f2a8dedfa7568dd160'), ('register_cell', 0x479800, 0x47991C, '078ce274b0135b7fb28ada2e1fb171817683d1435a96916e22253466956b0044'), ('polygon_filter', 0x4797A0, 0x4797FD, 'a654906ad9c89a4744e78eee2a1745e59f9978ed4d28948d18e2a14abba2f63a'), ('corner_accessor', 0x477F10, 0x477F5F, 'b5460f170b2315a462700d585b0626321186977a7bc192ede831a1e1ba60677c'), ) SITES = ( ('delta_magnitude', 0x47B4BB, 'ff1504d14800'), ('force_static_processing_field', 0x47B4C9, '8a812c04000084c07515'), ('epsilon_threshold', 0x47B4D7, 'd81d405e4d00dfe0f6c4010f8599030000'), ('dispatcher_call_statistic', 0x47B4E8, '8b15785d6900'), ('candidate_x', 0x47B507, 'd803d95c2434'), ('candidate_y', 0x47B511, 'd84304d95c2438'), ('candidate_z', 0x47B51C, 'd84308d95c243c'), ('radius_getter', 0x47B523, 'ff9060020000'), ('expansion_radius_plus_magnitude', 0x47B529, 'd9542420d844241c'), ('x_upper_uses_max', 0x47B59B, '663bc78944241c7f04897c241c'), ('z_upper_uses_min', 0x47B61B, '663bf8897c2418ddd87c0489442418'), ('wall_grid_cell', 0x47B697, '8b048d249b5000'), ('per_node_collision_gate', 0x47B6B2, '803de5694f0000'), ('allow_lower_edges', 0x47B6F4, 'c705745d690001000000'), ('forward_edges_flag', 0x47B6FE, '8b442470'), ('call_polygon_wrapper', 0x47B72E, 'e87d040000'), ('clear_lower_edges', 0x47B742, 'c705745d690000000000'), ('next_fifo_node', 0x47B74C, '8b6d00'), ('increment_z', 0x47B76A, '4241663b542418'), ('increment_x', 0x47B77F, '4681c704010000'), ('retry_flag_branch', 0x47B799, '8a44241384c00f8597000000'), ('publish_candidate_x', 0x47B7B1, '8903'), ('publish_candidate_yz', 0x47B7B7, '894b04895308'), ('last_accepted_polygon', 0x47B7C0, '8b0d4c5d6900'), ('last_normal_threshold', 0x47B7E3, 'd81d48314a00'), ('normal_callback374', 0x47B80F, 'ff9774030000'), ('normal_callback370', 0x47B82E, 'ff9770030000'), ('retry_delta_x', 0x47B83C, 'd9442434d823'), ('retry_call_same_dispatcher', 0x47B877, '5350e832fcffff'), ('wrapper_stores_last_polygon_and_retry', 0x47BD65, '89354c5d6900c60101'), ('physics_clear_last_polygon', 0x47A038, '891d4c5d6900'), ('physics_face_distance130000', 0x47A03E, 'c7055c5d690000e8fd47'), ('physics_edge_distance_radius', 0x47A062, 'd91de0fb5c00'), ('dynamic_face_distance_minus1', 0x47AB4B, 'c7055c5d6900000080bf'), ('dynamic_reclip_edges_false', 0x47B30B, '6a00'), ('dynamic_reclip_dispatch', 0x47B364, 'e847010000'), ('registration_checkpoint_filter', 0x4791C9, 'e8f2020000'), ('registration_game_filter', 0x4791DB, 'e8c0050000'), ('registration_polygon_order', 0x479479, '83c530'), ('game_polygon_consumer', 0x4797EC, 'ff9234010000'), ('cell_duplicate_polygon_only', 0x47985E, '8b55008b78083b17'), ('cell_fifo_append', 0x47989F, '8958048947048b48048901'), ('wall_normal_strict', 0x4798BD, 'd81d74d94800'), ('corner_records_stride20', 0x477F1C, '8d04808b5124'), ('shape_vertices_pointer', 0x477F29, '8b5168c1e00403c2'), ) SCALE = struct.unpack('