#include "game_types.h"

/* Sub_0800D580 @ 0x0800D580 (real 64B) -- flag OR plus 2/3 select into p[2]/p[3]. Mirrors src/matched/Sub_0800D580.c. */
/* ORs 0x2000 into the word at base+0x9A4, then selects p[2] = 3/2 by the
   byte at +0x1C47 and pins p[3] = -1. */
void Sub_0800D580(int *p)
{
    int *t = *(int **)0x02000134;
    *(int *)((char *)t + 0x9A4) |= 0x2000;
    p[2] = *(unsigned char *)((char *)t + 0x1C47) == 0 ? 3 : 2;
    p[3] = -1;
}
