#include "game_types.h"

/* Sub_080103E4 @ 0x080103E4 (real 94B) -- mode pair-check predicate over base quads. Mirrors src/matched/Sub_080103E4.c. */
/* Returns the mode-gated pair check over the base quads: mode 1 needs
   both the A38 and A48 pairs equal, modes 2-3 only the A38 pair, anything
   else true. (Base arrives directly, unlike the mailbox twins.) */
int Sub_080103E4(int *base)
{
    int mode = *(int *)((char *)base + 0xA34);
    int *q = (int *)((char *)base + 0xA38);
    int *q2 = (int *)((char *)base + 0xA48);
    if (mode == 1)
        return q[0] == q[1] && q2[0] == q2[1];
    if (mode == 2 || mode == 3)
        return q[0] == q[1];
    return 1;
}
