"""DIMENSION 1 / query 3: the CONSUMERS.

ESTABLISHED so far: FUN_1800150d0 builds the display-group vector; the group
key is the displayGroup.value STRING compared at group+0x70 by FUN_180014380;
the 0x1a8 pack model carries id at +0x70, assetId at +0xac, group ordinal at
+0x94, sortPriority at +0x1a0, coins price at +0xa0.

HYPOTHESIS: one of the other FUN_180014380 callers (FUN_180014580,
FUN_180014b60, FUN_180014df0) or the other 0x1a8 push_back callers
(FUN_180014610, FUN_1800147f0) is the "which pack does this group tile open"
resolver, and it keys on a field that collides between our two GOLD packs.

CONTROL: FUN_1800080c0 must turn out to be a string compare (it is used as the
group-name equality test in FUN_180014380 whose result we have already
confirmed live: three distinct names produced three distinct groups). If it
decompiles as something other than a compare, the whole reading is wrong.
"""
import traceback

OUT = "/tmp/claude-1000/-home-alex-Documents-OpenFUT/8e521ca1-ca3e-4138-bb96-df1744dd1d30/scratchpad/store/q3_out.txt"
buf = []
def P(*a):
    s = " ".join(str(x) for x in a)
    buf.append(s)
    print(s)

def C(a, label, show_callers=True):
    P("=" * 78)
    P(label, hex(a))
    P("=" * 78)
    s = dec(a)
    P("len(src) =", len(s))
    P(s)
    if show_callers:
        P("--- callers ---")
        for ent, nm in callers(a):
            P("   %-30s %s" % (nm, hex(ent)))

try:
    C(0x1800080c0, "CONTROL: FUN_1800080c0 (expected string compare)", False)
    for a, lbl in ((0x180014580, "FUN_180014580"),
                   (0x180014b60, "FUN_180014b60"),
                   (0x180014df0, "FUN_180014df0"),
                   (0x180014610, "FUN_180014610"),
                   (0x1800147f0, "FUN_1800147f0")):
        C(a, lbl)
except Exception:
    P(traceback.format_exc())

open(OUT, "w").write("\n".join(buf))
print("WROTE", OUT)
