"""D3 Q1/Q4: full decompile of the TO_TRADE_PILE predicate FUN_1801a7260 and its
publisher FUN_18003e370 / filler FUN_1800e2a40.

HYPOTHESIS: FUN_1801a7260 has MORE than the two documented terms (service gate,
item+0x49). Specifically it may consult the pile discriminator item+0x60 (live:
1 for /club, 6 for /purchased) or a pile/state field, which would make the
PURCHASED pile the reason the menu is greyed.

CONTROL: FUN_18003e550 (the listing panel publisher, DURATION/START_PRICE/
ASKING_PRICE) is decompiled in the same batch -- a function known to exist and to
be reachable, so a successful decompile there proves the decompiler is working
and a failure on the target is a real failure, not a harness problem.

Every decompile prints len(src) and is printed IN FULL (absence trap rule).
"""
import traceback

try:
    TARGETS = [
        ("FUN_1801a7260  TO_TRADE_PILE predicate", 0x1801a7260),
        ("FUN_18003e370  eight-flag publisher", 0x18003e370),
        ("FUN_1800e2a40  flag filler", 0x1800e2a40),
        ("FUN_18003e550  CONTROL listing panel publisher", 0x18003e550),
    ]
    for label, a in TARGETS:
        src = dec(a)
        print("=" * 78)
        print("### %s  @ %#x   len(src)=%d" % (label, a, len(src)))
        print("=" * 78)
        print(src)
        print()
except Exception:
    traceback.print_exc()
