int main()

{

    int rt, rs;

    int achi, acli;

    int dsp;

    int acho, aclo;

    int resulth, resultl;

    int resdsp;



    achi = 0x05;

    acli = 0xB4CB;

    rs  = 0xFF06;

    rt  = 0xCB00;

    resulth = 0x04;

    resultl = 0x947438CB;



    __asm

        ("mthi %2, $ac1\n\t"

         "mtlo %3, $ac1\n\t"

         "maq_s.w.phr $ac1, %4, %5\n\t"

         "mfhi %0, $ac1\n\t"

         "mflo %1, $ac1\n\t"

         : "=r"(acho), "=r"(aclo)

         : "r"(achi), "r"(acli), "r"(rs), "r"(rt)

        );

    assert(resulth == acho);

    assert(resultl == aclo);



    achi = 0x06;

    acli = 0xB4CB;

    rs  = 0x8000;

    rt  = 0x8000;

    resulth = 0x6;

    resultl = 0x8000b4ca;

    resdsp = 1;



    __asm

        ("mthi %3, $ac1\n\t"

         "mtlo %4, $ac1\n\t"

         "maq_s.w.phr $ac1, %5, %6\n\t"

         "mfhi %0, $ac1\n\t"

         "mflo %1, $ac1\n\t"

         "rddsp %2\n\t"

         : "=r"(acho), "=r"(aclo), "=r"(dsp)

         : "r"(achi), "r"(acli), "r"(rs), "r"(rt)

        );

    assert(resulth == acho);

    assert(resultl == aclo);

    assert(((dsp >> 17) & 0x01) == resdsp);



    return 0;

}

int main()

{

    int rt, rs;

    int achi, acli;

    int dsp;

    int acho, aclo;

    int resulth, resultl;

    int resdsp;



    achi = 0x05;

    acli = 0xB4CB;

    rs  = 0xFF06;

    rt  = 0xCB00;

    resulth = 0x04;

    resultl = 0x947438CB;



    __asm

        ("mthi %2, $ac1\n\t"

         "mtlo %3, $ac1\n\t"

         "maq_s.w.phr $ac1, %4, %5\n\t"

         "mfhi %0, $ac1\n\t"

         "mflo %1, $ac1\n\t"

         : "=r"(acho), "=r"(aclo)

         : "r"(achi), "r"(acli), "r"(rs), "r"(rt)

        );

    assert(resulth == acho);

    assert(resultl == aclo);



    achi = 0x06;

    acli = 0xB4CB;

    rs  = 0x8000;

    rt  = 0x8000;

    resulth = 0x6;

    resultl = 0x8000b4ca;

    resdsp = 1;



    __asm

        ("mthi %3, $ac1\n\t"

         "mtlo %4, $ac1\n\t"

         "maq_s.w.phr $ac1, %5, %6\n\t"

         "mfhi %0, $ac1\n\t"

         "mflo %1, $ac1\n\t"

         "rddsp %2\n\t"

         : "=r"(acho), "=r"(aclo), "=r"(dsp)

         : "r"(achi), "r"(acli), "r"(rs), "r"(rt)

        );

    assert(resulth == acho);

    assert(resultl == aclo);

    assert(((dsp >> 17) & 0x01) == resdsp);



    return 0;

}

int FUNC_0()

{

    int VAR_0, VAR_1;

    int VAR_2, VAR_3;

    int VAR_4;

    int VAR_5, VAR_6;

    int VAR_7, VAR_8;

    int VAR_9;



    VAR_2 = 0x05;

    VAR_3 = 0xB4CB;

    VAR_1  = 0xFF06;

    VAR_0  = 0xCB00;

    VAR_7 = 0x04;

    VAR_8 = 0x947438CB;



    __asm

        ("mthi %2, $ac1\n\t"

         "mtlo %3, $ac1\n\t"

         "maq_s.w.phr $ac1, %4, %5\n\t"

         "mfhi %0, $ac1\n\t"

         "mflo %1, $ac1\n\t"

         : "=r"(VAR_5), "=r"(VAR_6)

         : "r"(VAR_2), "r"(VAR_3), "r"(VAR_1), "r"(VAR_0)

        );

    assert(VAR_7 == VAR_5);

    assert(VAR_8 == VAR_6);



    VAR_2 = 0x06;

    VAR_3 = 0xB4CB;

    VAR_1  = 0x8000;

    VAR_0  = 0x8000;

    VAR_7 = 0x6;

    VAR_8 = 0x8000b4ca;

    VAR_9 = 1;



    __asm

        ("mthi %3, $ac1\n\t"

         "mtlo %4, $ac1\n\t"

         "maq_s.w.phr $ac1, %5, %6\n\t"

         "mfhi %0, $ac1\n\t"

         "mflo %1, $ac1\n\t"

         "rddsp %2\n\t"

         : "=r"(VAR_5), "=r"(VAR_6), "=r"(VAR_4)

         : "r"(VAR_2), "r"(VAR_3), "r"(VAR_1), "r"(VAR_0)

        );

    assert(VAR_7 == VAR_5);

    assert(VAR_8 == VAR_6);

    assert(((VAR_4 >> 17) & 0x01) == VAR_9);



    return 0;

}

int FUNC_0()
{ int VAR_0, VAR_1; int VAR_2, VAR_3; int VAR_4; int VAR_5, VAR_6; int VAR_7, VAR_8; int VAR_9; VAR_2 = 0x05; VAR_3 = 0xB4CB; VAR_1  = 0xFF06; VAR_0  = 0xCB00; VAR_7 = 0x04; VAR_8 = 0x947438CB; __asm
("mthi %2, $ac1\n\t"
"mtlo %3, $ac1\n\t"
"maq_s.w.phr $ac1, %4, %5\n\t"
"mfhi %0, $ac1\n\t"
"mflo %1, $ac1\n\t"
: "=r"(VAR_5), "=r"(VAR_6)
: "r"(VAR_2), "r"(VAR_3), "r"(VAR_1), "r"(VAR_0)
); assert(VAR_7 == VAR_5); assert(VAR_8 == VAR_6); VAR_2 = 0x06; VAR_3 = 0xB4CB; VAR_1  = 0x8000; VAR_0  = 0x8000; VAR_7 = 0x6; VAR_8 = 0x8000b4ca; VAR_9 = 1; __asm
("mthi %3, $ac1\n\t"
"mtlo %4, $ac1\n\t"
"maq_s.w.phr $ac1, %5, %6\n\t"
"mfhi %0, $ac1\n\t"
"mflo %1, $ac1\n\t"
"rddsp %2\n\t"
: "=r"(VAR_5), "=r"(VAR_6), "=r"(VAR_4)
: "r"(VAR_2), "r"(VAR_3), "r"(VAR_1), "r"(VAR_0)
); assert(VAR_7 == VAR_5); assert(VAR_8 == VAR_6); assert(((VAR_4 >> 17) & 0x01) == VAR_9); return 0; }