"""D3: the settings deserializer's atom -> field-index map, and the real
destination of maximumTradePileSize.

ESTABLISHED SO FAR THIS RUN:
  FUN_180173e00 copies response+0x28..+0xc0 to the stack and passes it to
  model->vt+0x988 (FUN_18011dc50). So applier index [N] == response+0x28+4N.
  applier[10] -> model+0x1fd2e IS_TRADING_ENABLED  => response+0x50
  applier[7]  -> model+0x1fd28 (=60 live)          => response+0x44
  applier[0]  -> FUN_18011f380(model+0x15f00, v)   => response+0x28
  Separately vt+0x998 gets response+0xc8..0xd4, and reads +8 -> model+0x1fd1c
  (TRADE_PILE_SIZE) => response+0xd0, and +0xc -> model+0x1fd20 => response+0xd4.

HYPOTHESIS: the atom that writes response+0x50 is `tradingEnabled`, and
`maximumTradePileSize` writes response+0x28 -- which is NOT model+0x1fd1c. If so,
the historical probe "served maximumTradePileSize=77, no int gate field carries
77" looked in the wrong place: 77 goes into FUN_18011f380, not into any 0x1fd
field.

CONTROL: the deserializer must also show an arm writing response+0xd0, and that
arm's atom is the true TRADE_PILE_SIZE lever. Finding response+0x50 but not
response+0xd0 would mean the offset arithmetic is off and neither answer counts.

Prints FUN_18013c6d0 IN FULL with len(src), plus FUN_18011f380.
"""
import traceback

try:
    for label, a in [
        ("FUN_18013c6d0  settings deserializer", 0x18013C6D0),
        ("FUN_18011f380  maximumTradePileSize consumer", 0x18011F380),
        ("FUN_180174630  massinfo deserializer (caller)", 0x180174630),
    ]:
        src = dec(a, 600)
        print("=" * 78)
        print("### %s  @ %#x   len(src)=%d" % (label, a, len(src)))
        print("=" * 78)
        print(src)
        print()
except Exception:
    traceback.print_exc()
