#include "game_types.h"

/* Sub_080048D8 @ 0x080048D8 (real 34B) -- ladder table lookup (table 0x08027CF8+4). Mirrors src/matched/Sub_080048D8.c. */
/* Ladder-table leaf: indexes table 0x08027CFC by the halfword at +136 and the
   level word at +60. (Leading .hword islands in the ROM span are jumped-over
   data, not code.) */
int Sub_080048D8(int *p)
{
    int idx = *(short *)((char *)p + 136);
    int lv = p[15];
    int v = *(int *)((char *)(int *)0x08027CFC + (idx << 3) + ((lv + lv * 2) << 5));
    return v;
}
