static void tgen_ext16u(TCGContext *s, TCGType type, TCGReg dest, TCGReg src)

{

    if (facilities & FACILITY_EXT_IMM) {

        tcg_out_insn(s, RRE, LLGHR, dest, src);

        return;

    }



    if (dest == src) {

        tcg_out_movi(s, type, TCG_TMP0, 0xffff);

        src = TCG_TMP0;

    } else {

        tcg_out_movi(s, type, dest, 0xffff);

    }

    if (type == TCG_TYPE_I32) {

        tcg_out_insn(s, RR, NR, dest, src);

    } else {

        tcg_out_insn(s, RRE, NGR, dest, src);

    }

}

static void tgen_ext16u(TCGContext *s, TCGType type, TCGReg dest, TCGReg src)

{

    if (facilities & FACILITY_EXT_IMM) {

        tcg_out_insn(s, RRE, LLGHR, dest, src);

        return;

    }



    if (dest == src) {

        tcg_out_movi(s, type, TCG_TMP0, 0xffff);

        src = TCG_TMP0;

    } else {

        tcg_out_movi(s, type, dest, 0xffff);

    }

    if (type == TCG_TYPE_I32) {

        tcg_out_insn(s, RR, NR, dest, src);

    } else {

        tcg_out_insn(s, RRE, NGR, dest, src);

    }

}

static void FUNC_0(TCGContext *VAR_0, TCGType VAR_1, TCGReg VAR_2, TCGReg VAR_3)

{

    if (facilities & FACILITY_EXT_IMM) {

        tcg_out_insn(VAR_0, RRE, LLGHR, VAR_2, VAR_3);

        return;

    }



    if (VAR_2 == VAR_3) {

        tcg_out_movi(VAR_0, VAR_1, TCG_TMP0, 0xffff);

        VAR_3 = TCG_TMP0;

    } else {

        tcg_out_movi(VAR_0, VAR_1, VAR_2, 0xffff);

    }

    if (VAR_1 == TCG_TYPE_I32) {

        tcg_out_insn(VAR_0, RR, NR, VAR_2, VAR_3);

    } else {

        tcg_out_insn(VAR_0, RRE, NGR, VAR_2, VAR_3);

    }

}

static void FUNC_0(TCGContext *VAR_0, TCGType VAR_1, TCGReg VAR_2, TCGReg VAR_3)
{ if (facilities & FACILITY_EXT_IMM) { tcg_out_insn(VAR_0, RRE, LLGHR, VAR_2, VAR_3); return; } if (VAR_2 == VAR_3) { tcg_out_movi(VAR_0, VAR_1, TCG_TMP0, 0xffff); VAR_3 = TCG_TMP0; } else { tcg_out_movi(VAR_0, VAR_1, VAR_2, 0xffff); } if (VAR_1 == TCG_TYPE_I32) { tcg_out_insn(VAR_0, RR, NR, VAR_2, VAR_3); } else { tcg_out_insn(VAR_0, RRE, NGR, VAR_2, VAR_3); } }