#include <stdio.h>
#include <stdint.h>

extern int32_t sp;
extern int32_t stack;

void emit()
{
    putchar(*(&stack + --sp));
}

void sub()
{
    int32_t *st = &stack;
    st[sp - 2] -= st[sp - 1];
    --sp;
}

void cswap()
{
    int32_t *st = &stack;
    --sp;
    if (st[sp]) {
        int32_t tmp = st[sp - 1];
        st[sp - 1] = st[sp - 2];
        st[sp - 2] = tmp;
    }
}

void eq()
{
    int32_t *st = &stack;
    --sp;
    st[sp - 1] = st[sp - 1] == st[sp];
}