static void tgen_brcond(TCGContext *s, TCGType type, TCGCond c,

                        TCGReg r1, TCGArg c2, int c2const, TCGLabel *l)

{

    int cc;



    if (facilities & FACILITY_GEN_INST_EXT) {

        bool is_unsigned = is_unsigned_cond(c);

        bool in_range;

        S390Opcode opc;



        cc = tcg_cond_to_s390_cond[c];



        if (!c2const) {

            opc = (type == TCG_TYPE_I32

                   ? (is_unsigned ? RIE_CLRJ : RIE_CRJ)

                   : (is_unsigned ? RIE_CLGRJ : RIE_CGRJ));

            tgen_compare_branch(s, opc, cc, r1, c2, l);

            return;

        }



        /* COMPARE IMMEDIATE AND BRANCH RELATIVE has an 8-bit immediate field.

           If the immediate we've been given does not fit that range, we'll

           fall back to separate compare and branch instructions using the

           larger comparison range afforded by COMPARE IMMEDIATE.  */

        if (type == TCG_TYPE_I32) {

            if (is_unsigned) {

                opc = RIE_CLIJ;

                in_range = (uint32_t)c2 == (uint8_t)c2;

            } else {

                opc = RIE_CIJ;

                in_range = (int32_t)c2 == (int8_t)c2;

            }

        } else {

            if (is_unsigned) {

                opc = RIE_CLGIJ;

                in_range = (uint64_t)c2 == (uint8_t)c2;

            } else {

                opc = RIE_CGIJ;

                in_range = (int64_t)c2 == (int8_t)c2;

            }

        }

        if (in_range) {

            tgen_compare_imm_branch(s, opc, cc, r1, c2, l);

            return;

        }

    }



    cc = tgen_cmp(s, type, c, r1, c2, c2const, false);

    tgen_branch(s, cc, l);

}

static void tgen_brcond(TCGContext *s, TCGType type, TCGCond c,

                        TCGReg r1, TCGArg c2, int c2const, TCGLabel *l)

{

    int cc;



    if (facilities & FACILITY_GEN_INST_EXT) {

        bool is_unsigned = is_unsigned_cond(c);

        bool in_range;

        S390Opcode opc;



        cc = tcg_cond_to_s390_cond[c];



        if (!c2const) {

            opc = (type == TCG_TYPE_I32

                   ? (is_unsigned ? RIE_CLRJ : RIE_CRJ)

                   : (is_unsigned ? RIE_CLGRJ : RIE_CGRJ));

            tgen_compare_branch(s, opc, cc, r1, c2, l);

            return;

        }



        







        if (type == TCG_TYPE_I32) {

            if (is_unsigned) {

                opc = RIE_CLIJ;

                in_range = (uint32_t)c2 == (uint8_t)c2;

            } else {

                opc = RIE_CIJ;

                in_range = (int32_t)c2 == (int8_t)c2;

            }

        } else {

            if (is_unsigned) {

                opc = RIE_CLGIJ;

                in_range = (uint64_t)c2 == (uint8_t)c2;

            } else {

                opc = RIE_CGIJ;

                in_range = (int64_t)c2 == (int8_t)c2;

            }

        }

        if (in_range) {

            tgen_compare_imm_branch(s, opc, cc, r1, c2, l);

            return;

        }

    }



    cc = tgen_cmp(s, type, c, r1, c2, c2const, false);

    tgen_branch(s, cc, l);

}

static void FUNC_0(TCGContext *VAR_0, TCGType VAR_1, TCGCond VAR_2,

                        TCGReg VAR_3, TCGArg VAR_4, int VAR_5, TCGLabel *VAR_6)

{

    int VAR_7;



    if (facilities & FACILITY_GEN_INST_EXT) {

        bool is_unsigned = is_unsigned_cond(VAR_2);

        bool in_range;

        S390Opcode opc;



        VAR_7 = tcg_cond_to_s390_cond[VAR_2];



        if (!VAR_5) {

            opc = (VAR_1 == TCG_TYPE_I32

                   ? (is_unsigned ? RIE_CLRJ : RIE_CRJ)

                   : (is_unsigned ? RIE_CLGRJ : RIE_CGRJ));

            tgen_compare_branch(VAR_0, opc, VAR_7, VAR_3, VAR_4, VAR_6);

            return;

        }



        







        if (VAR_1 == TCG_TYPE_I32) {

            if (is_unsigned) {

                opc = RIE_CLIJ;

                in_range = (uint32_t)VAR_4 == (uint8_t)VAR_4;

            } else {

                opc = RIE_CIJ;

                in_range = (int32_t)VAR_4 == (int8_t)VAR_4;

            }

        } else {

            if (is_unsigned) {

                opc = RIE_CLGIJ;

                in_range = (uint64_t)VAR_4 == (uint8_t)VAR_4;

            } else {

                opc = RIE_CGIJ;

                in_range = (int64_t)VAR_4 == (int8_t)VAR_4;

            }

        }

        if (in_range) {

            tgen_compare_imm_branch(VAR_0, opc, VAR_7, VAR_3, VAR_4, VAR_6);

            return;

        }

    }



    VAR_7 = tgen_cmp(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, false);

    tgen_branch(VAR_0, VAR_7, VAR_6);

}

static void FUNC_0(TCGContext *VAR_0, TCGType VAR_1, TCGCond VAR_2,
TCGReg VAR_3, TCGArg VAR_4, int VAR_5, TCGLabel *VAR_6)
{ int VAR_7; if (facilities & FACILITY_GEN_INST_EXT) { bool is_unsigned = is_unsigned_cond(VAR_2); bool in_range; S390Opcode opc; VAR_7 = tcg_cond_to_s390_cond[VAR_2]; if (!VAR_5) { opc = (VAR_1 == TCG_TYPE_I32
? (is_unsigned ? RIE_CLRJ : RIE_CRJ)
: (is_unsigned ? RIE_CLGRJ : RIE_CGRJ)); tgen_compare_branch(VAR_0, opc, VAR_7, VAR_3, VAR_4, VAR_6); return; } if (VAR_1 == TCG_TYPE_I32) { if (is_unsigned) { opc = RIE_CLIJ; in_range = (uint32_t)VAR_4 == (uint8_t)VAR_4; } else { opc = RIE_CIJ; in_range = (int32_t)VAR_4 == (int8_t)VAR_4; } } else { if (is_unsigned) { opc = RIE_CLGIJ; in_range = (uint64_t)VAR_4 == (uint8_t)VAR_4; } else { opc = RIE_CGIJ; in_range = (int64_t)VAR_4 == (int8_t)VAR_4; } } if (in_range) { tgen_compare_imm_branch(VAR_0, opc, VAR_7, VAR_3, VAR_4, VAR_6); return; } } VAR_7 = tgen_cmp(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, false); tgen_branch(VAR_0, VAR_7, VAR_6); }