static void sync_c0_tcstatus(CPUMIPSState *cpu, int tc,

                             target_ulong v)

{

    uint32_t status;

    uint32_t tcu, tmx, tasid, tksu;

    uint32_t mask = ((1 << CP0St_CU3)

                       | (1 << CP0St_CU2)

                       | (1 << CP0St_CU1)

                       | (1 << CP0St_CU0)

                       | (1 << CP0St_MX)

                       | (3 << CP0St_KSU));



    tcu = (v >> CP0TCSt_TCU0) & 0xf;

    tmx = (v >> CP0TCSt_TMX) & 0x1;

    tasid = v & 0xff;

    tksu = (v >> CP0TCSt_TKSU) & 0x3;



    status = tcu << CP0St_CU0;

    status |= tmx << CP0St_MX;

    status |= tksu << CP0St_KSU;



    cpu->CP0_Status &= ~mask;

    cpu->CP0_Status |= status;



    /* Sync the TASID with EntryHi.  */

    cpu->CP0_EntryHi &= ~0xff;

    cpu->CP0_EntryHi = tasid;



    compute_hflags(cpu);

}

static void sync_c0_tcstatus(CPUMIPSState *cpu, int tc,

                             target_ulong v)

{

    uint32_t status;

    uint32_t tcu, tmx, tasid, tksu;

    uint32_t mask = ((1 << CP0St_CU3)

                       | (1 << CP0St_CU2)

                       | (1 << CP0St_CU1)

                       | (1 << CP0St_CU0)

                       | (1 << CP0St_MX)

                       | (3 << CP0St_KSU));



    tcu = (v >> CP0TCSt_TCU0) & 0xf;

    tmx = (v >> CP0TCSt_TMX) & 0x1;

    tasid = v & 0xff;

    tksu = (v >> CP0TCSt_TKSU) & 0x3;



    status = tcu << CP0St_CU0;

    status |= tmx << CP0St_MX;

    status |= tksu << CP0St_KSU;



    cpu->CP0_Status &= ~mask;

    cpu->CP0_Status |= status;



    

    cpu->CP0_EntryHi &= ~0xff;

    cpu->CP0_EntryHi = tasid;



    compute_hflags(cpu);

}

    uint32_t mask = ((1 << CP0St_CU3)
static void FUNC_0(CPUMIPSState *VAR_0, int VAR_1,

                             target_ulong VAR_2)

{

    uint32_t status;

    uint32_t tcu, tmx, tasid, tksu;

    uint32_t mask = ((1 << CP0St_CU3)

                       | (1 << CP0St_CU2)

                       | (1 << CP0St_CU1)

                       | (1 << CP0St_CU0)

                       | (1 << CP0St_MX)

                       | (3 << CP0St_KSU));



    tcu = (VAR_2 >> CP0TCSt_TCU0) & 0xf;

    tmx = (VAR_2 >> CP0TCSt_TMX) & 0x1;

    tasid = VAR_2 & 0xff;

    tksu = (VAR_2 >> CP0TCSt_TKSU) & 0x3;



    status = tcu << CP0St_CU0;

    status |= tmx << CP0St_MX;

    status |= tksu << CP0St_KSU;



    VAR_0->CP0_Status &= ~mask;

    VAR_0->CP0_Status |= status;



    

    VAR_0->CP0_EntryHi &= ~0xff;

    VAR_0->CP0_EntryHi = tasid;



    compute_hflags(VAR_0);

}

static void FUNC_0(CPUMIPSState *VAR_0, int VAR_1,
target_ulong VAR_2)
{ uint32_t status; uint32_t tcu, tmx, tasid, tksu; uint32_t mask = ((1 << CP0St_CU3)
| (1 << CP0St_CU2)
| (1 << CP0St_CU1)
| (1 << CP0St_CU0)
| (1 << CP0St_MX)
| (3 << CP0St_KSU)); tcu = (VAR_2 >> CP0TCSt_TCU0) & 0xf; tmx = (VAR_2 >> CP0TCSt_TMX) & 0x1; tasid = VAR_2 & 0xff; tksu = (VAR_2 >> CP0TCSt_TKSU) & 0x3; status = tcu << CP0St_CU0; status |= tmx << CP0St_MX; status |= tksu << CP0St_KSU; VAR_0->CP0_Status &= ~mask; VAR_0->CP0_Status |= status; VAR_0->CP0_EntryHi &= ~0xff; VAR_0->CP0_EntryHi = tasid; compute_hflags(VAR_0); }