"""Resolve the two things the flag table cannot answer on its own.

1. The arms my line-attribution left blank (0xfa enableOfflineDraftMode,
   0xfd enableObjectives, 0x1c0 maximumTradePileSize, 0x2f5) -- almost certainly
   `case X: case Y:` fallthroughs, but "almost certainly" is how this repo has
   been wrong before, so print the raw tail and read it.

2. The JSON TYPE `value` must have. `type` (0x354) goes through FUN_1801c7aa0 and
   is used as a char*, so it is a string. `value` (0x377) goes through
   FUN_1801c79d0 and is then converted by FUN_1800d7af0 / FUN_1800d7ad0. Whether
   the wire wants "1" or 1 depends on which getter FUN_1801c79d0 is, and feeding
   the wrong one at a scalar getter is the documented freeze at 0x1801c7f1a.
"""
src = dec(0x18013C6D0)
i = src.find("case 0x98")
print("=" * 78)
print("RAW SWITCH TAIL (from case 0x98 to end; %d of %d chars)" % (len(src) - i, len(src)))
print("=" * 78)
print(src[i:])

for va, why in ((0x1801C79D0, "getter used for `value` (0x377)"),
                (0x1801C7AA0, "CONTROL: getter used for `type` (0x354), known string"),
                (0x1800D7AF0, "converter applied to value -> int/bool"),
                (0x1800D7AD0, "converter applied to value -> short")):
    print("\n" + "=" * 78)
    print("%#x  %s" % (va, why))
    print("=" * 78)
    print(dec(va))
