/* This file is autogenerated by scripts/decodetree.py.  */

typedef struct {
    int index;
} arg_cmjt;

typedef struct {
    int urlist;
    int spimm;
} arg_cmpp;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#ifdef __clang__
#  pragma GCC diagnostic ignored "-Wtypedef-redefinition"
#endif

typedef arg_empty arg_illegal;
static bool trans_illegal(DisasContext *ctx, arg_illegal *a);
typedef arg_i arg_addi;
static bool trans_addi(DisasContext *ctx, arg_addi *a);
typedef arg_i arg_lq;
static bool trans_lq(DisasContext *ctx, arg_lq *a);
typedef arg_i arg_c_fld;
static bool trans_c_fld(DisasContext *ctx, arg_c_fld *a);
typedef arg_i arg_lw;
static bool trans_lw(DisasContext *ctx, arg_lw *a);
typedef arg_s arg_sq;
static bool trans_sq(DisasContext *ctx, arg_sq *a);
typedef arg_s arg_c_fsd;
static bool trans_c_fsd(DisasContext *ctx, arg_c_fsd *a);
typedef arg_s arg_sw;
static bool trans_sw(DisasContext *ctx, arg_sw *a);
typedef arg_i arg_ld;
static bool trans_ld(DisasContext *ctx, arg_ld *a);
typedef arg_i arg_c_flw;
static bool trans_c_flw(DisasContext *ctx, arg_c_flw *a);
typedef arg_s arg_sd;
static bool trans_sd(DisasContext *ctx, arg_sd *a);
typedef arg_s arg_c_fsw;
static bool trans_c_fsw(DisasContext *ctx, arg_c_fsw *a);
typedef arg_u arg_lui;
static bool trans_lui(DisasContext *ctx, arg_lui *a);
typedef arg_shift arg_srli;
static bool trans_srli(DisasContext *ctx, arg_srli *a);
typedef arg_shift arg_srai;
static bool trans_srai(DisasContext *ctx, arg_srai *a);
typedef arg_i arg_andi;
static bool trans_andi(DisasContext *ctx, arg_andi *a);
typedef arg_r arg_sub;
static bool trans_sub(DisasContext *ctx, arg_sub *a);
typedef arg_r arg_xor;
static bool trans_xor(DisasContext *ctx, arg_xor *a);
typedef arg_r arg_or;
static bool trans_or(DisasContext *ctx, arg_or *a);
typedef arg_r arg_and;
static bool trans_and(DisasContext *ctx, arg_and *a);
typedef arg_j arg_jal;
static bool trans_jal(DisasContext *ctx, arg_jal *a);
typedef arg_b arg_beq;
static bool trans_beq(DisasContext *ctx, arg_beq *a);
typedef arg_b arg_bne;
static bool trans_bne(DisasContext *ctx, arg_bne *a);
typedef arg_empty arg_c64_illegal;
static bool trans_c64_illegal(DisasContext *ctx, arg_c64_illegal *a);
typedef arg_i arg_addiw;
static bool trans_addiw(DisasContext *ctx, arg_addiw *a);
typedef arg_r arg_subw;
static bool trans_subw(DisasContext *ctx, arg_subw *a);
typedef arg_r arg_addw;
static bool trans_addw(DisasContext *ctx, arg_addw *a);
typedef arg_shift arg_slli;
static bool trans_slli(DisasContext *ctx, arg_slli *a);
typedef arg_i arg_jalr;
static bool trans_jalr(DisasContext *ctx, arg_jalr *a);
typedef arg_empty arg_ebreak;
static bool trans_ebreak(DisasContext *ctx, arg_ebreak *a);
typedef arg_r arg_add;
static bool trans_add(DisasContext *ctx, arg_add *a);
typedef arg_cmpp arg_cm_push;
static bool trans_cm_push(DisasContext *ctx, arg_cm_push *a);
typedef arg_cmpp arg_cm_pop;
static bool trans_cm_pop(DisasContext *ctx, arg_cm_pop *a);
typedef arg_cmpp arg_cm_popret;
static bool trans_cm_popret(DisasContext *ctx, arg_cm_popret *a);
typedef arg_cmpp arg_cm_popretz;
static bool trans_cm_popretz(DisasContext *ctx, arg_cm_popretz *a);
typedef arg_r2_s arg_cm_mva01s;
static bool trans_cm_mva01s(DisasContext *ctx, arg_cm_mva01s *a);
typedef arg_r2_s arg_cm_mvsa01;
static bool trans_cm_mvsa01(DisasContext *ctx, arg_cm_mvsa01 *a);
typedef arg_cmjt arg_cm_jalt;
static bool trans_cm_jalt(DisasContext *ctx, arg_cm_jalt *a);
typedef arg_r2 arg_c_zext_b;
static bool trans_c_zext_b(DisasContext *ctx, arg_c_zext_b *a);
typedef arg_r2 arg_c_sext_b;
static bool trans_c_sext_b(DisasContext *ctx, arg_c_sext_b *a);
typedef arg_r2 arg_c_zext_h;
static bool trans_c_zext_h(DisasContext *ctx, arg_c_zext_h *a);
typedef arg_r2 arg_c_sext_h;
static bool trans_c_sext_h(DisasContext *ctx, arg_c_sext_h *a);
typedef arg_r2 arg_c_zext_w;
static bool trans_c_zext_w(DisasContext *ctx, arg_c_zext_w *a);
typedef arg_r2 arg_c_not;
static bool trans_c_not(DisasContext *ctx, arg_c_not *a);
typedef arg_r arg_c_mul;
static bool trans_c_mul(DisasContext *ctx, arg_c_mul *a);
typedef arg_i arg_c_lbu;
static bool trans_c_lbu(DisasContext *ctx, arg_c_lbu *a);
typedef arg_i arg_c_lhu;
static bool trans_c_lhu(DisasContext *ctx, arg_c_lhu *a);
typedef arg_i arg_c_lh;
static bool trans_c_lh(DisasContext *ctx, arg_c_lh *a);
typedef arg_s arg_c_sb;
static bool trans_c_sb(DisasContext *ctx, arg_c_sb *a);
typedef arg_s arg_c_sh;
static bool trans_c_sh(DisasContext *ctx, arg_c_sh *a);

#pragma GCC diagnostic pop

static void decode_insn16_extract_c_addi16sp(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = 2;
    a->rs1 = 2;
    a->imm = ex_shift_4(ctx, deposit32(deposit32(deposit32(deposit32(extract32(insn, 6, 1), 1, 31, extract32(insn, 2, 1)), 2, 30, extract32(insn, 5, 1)), 3, 29, extract32(insn, 3, 2)), 5, 27, sextract32(insn, 12, 1)));
}

static void decode_insn16_extract_c_addi4spn(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->rs1 = 2;
    a->imm = ex_shift_2(ctx, deposit32(deposit32(deposit32(extract32(insn, 6, 1), 1, 31, extract32(insn, 5, 1)), 2, 30, extract32(insn, 11, 2)), 4, 28, extract32(insn, 7, 4)));
}

static void decode_insn16_extract_c_andi(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->imm = deposit32(extract32(insn, 2, 5), 5, 27, sextract32(insn, 12, 1));
}

static void decode_insn16_extract_c_jalr(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rs1 = extract32(insn, 7, 5);
    a->imm = 0;
}

static void decode_insn16_extract_c_ldsp(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = 2;
    a->imm = ex_shift_3(ctx, deposit32(deposit32(extract32(insn, 5, 2), 2, 30, extract32(insn, 12, 1)), 3, 29, extract32(insn, 2, 3)));
}

static void decode_insn16_extract_c_li(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = 0;
    a->imm = deposit32(extract32(insn, 2, 5), 5, 27, sextract32(insn, 12, 1));
}

static void decode_insn16_extract_c_lqsp(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = 2;
    a->imm = ex_shift_4(ctx, deposit32(deposit32(extract32(insn, 6, 1), 1, 31, extract32(insn, 12, 1)), 2, 30, extract32(insn, 2, 4)));
}

static void decode_insn16_extract_c_lui(DisasContext *ctx, arg_u *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->imm = ex_shift_12(ctx, deposit32(extract32(insn, 2, 5), 5, 27, sextract32(insn, 12, 1)));
}

static void decode_insn16_extract_c_lwsp(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = 2;
    a->imm = ex_shift_2(ctx, deposit32(deposit32(extract32(insn, 4, 3), 3, 29, extract32(insn, 12, 1)), 4, 28, extract32(insn, 2, 2)));
}

static void decode_insn16_extract_c_mv(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = extract32(insn, 2, 5);
    a->imm = 0;
}

static void decode_insn16_extract_c_sdsp(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = 2;
    a->rs2 = extract32(insn, 2, 5);
    a->imm = ex_shift_3(ctx, deposit32(extract32(insn, 10, 3), 3, 29, extract32(insn, 7, 3)));
}

static void decode_insn16_extract_c_shift(DisasContext *ctx, arg_shift *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->shamt = ex_rvc_shiftri(ctx, deposit32(extract32(insn, 2, 5), 5, 27, extract32(insn, 12, 1)));
}

static void decode_insn16_extract_c_shift2(DisasContext *ctx, arg_shift *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = extract32(insn, 7, 5);
    a->shamt = ex_rvc_shiftli(ctx, deposit32(extract32(insn, 2, 5), 5, 27, extract32(insn, 12, 1)));
}

static void decode_insn16_extract_c_sqsp(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = 2;
    a->rs2 = extract32(insn, 2, 5);
    a->imm = ex_shift_4(ctx, deposit32(extract32(insn, 11, 2), 2, 30, extract32(insn, 7, 4)));
}

static void decode_insn16_extract_c_swsp(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = 2;
    a->rs2 = extract32(insn, 2, 5);
    a->imm = ex_shift_2(ctx, deposit32(extract32(insn, 9, 4), 4, 28, extract32(insn, 7, 2)));
}

static void decode_insn16_extract_cb_z(DisasContext *ctx, arg_b *a, uint16_t insn)
{
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs2 = 0;
    a->imm = ex_shift_1(ctx, deposit32(deposit32(deposit32(deposit32(extract32(insn, 3, 2), 2, 30, extract32(insn, 10, 2)), 4, 28, extract32(insn, 2, 1)), 5, 27, extract32(insn, 5, 2)), 7, 25, sextract32(insn, 12, 1)));
}

static void decode_insn16_extract_ci(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = extract32(insn, 7, 5);
    a->imm = deposit32(extract32(insn, 2, 5), 5, 27, sextract32(insn, 12, 1));
}

static void decode_insn16_extract_cj(DisasContext *ctx, arg_j *a, uint16_t insn)
{
    a->imm = ex_shift_1(ctx, deposit32(deposit32(deposit32(deposit32(deposit32(deposit32(deposit32(extract32(insn, 3, 3), 3, 29, extract32(insn, 11, 1)), 4, 28, extract32(insn, 2, 1)), 5, 27, extract32(insn, 7, 1)), 6, 26, extract32(insn, 6, 1)), 7, 25, extract32(insn, 9, 2)), 9, 23, extract32(insn, 8, 1)), 10, 22, sextract32(insn, 12, 1)));
}

static void decode_insn16_extract_cl_b(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->imm = deposit32(extract32(insn, 6, 1), 1, 31, extract32(insn, 5, 1));
}

static void decode_insn16_extract_cl_d(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->imm = ex_shift_3(ctx, deposit32(extract32(insn, 10, 3), 3, 29, extract32(insn, 5, 2)));
}

static void decode_insn16_extract_cl_h(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->imm = ex_shift_1(ctx, extract32(insn, 5, 1));
}

static void decode_insn16_extract_cl_q(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->imm = ex_shift_4(ctx, deposit32(deposit32(extract32(insn, 11, 2), 2, 30, extract32(insn, 5, 2)), 4, 28, extract32(insn, 10, 1)));
}

static void decode_insn16_extract_cl_w(DisasContext *ctx, arg_i *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->imm = ex_shift_2(ctx, deposit32(deposit32(extract32(insn, 6, 1), 1, 31, extract32(insn, 10, 3)), 4, 28, extract32(insn, 5, 1)));
}

static void decode_insn16_extract_cm_jt(DisasContext *ctx, arg_cmjt *a, uint16_t insn)
{
    a->index = extract32(insn, 2, 8);
}

static void decode_insn16_extract_cm_mv(DisasContext *ctx, arg_r2_s *a, uint16_t insn)
{
    a->rs1 = ex_sreg_register(ctx, extract32(insn, 7, 3));
    a->rs2 = ex_sreg_register(ctx, extract32(insn, 2, 3));
}

static void decode_insn16_extract_cm_pp(DisasContext *ctx, arg_cmpp *a, uint16_t insn)
{
    a->urlist = extract32(insn, 4, 4);
    a->spimm = ex_shift_4(ctx, extract32(insn, 2, 2));
}

static void decode_insn16_extract_cr(DisasContext *ctx, arg_r *a, uint16_t insn)
{
    a->rd = extract32(insn, 7, 5);
    a->rs1 = extract32(insn, 7, 5);
    a->rs2 = extract32(insn, 2, 5);
}

static void decode_insn16_extract_cs_2(DisasContext *ctx, arg_r *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs2 = ex_rvc_register(ctx, extract32(insn, 2, 3));
}

static void decode_insn16_extract_cs_b(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs2 = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->imm = deposit32(extract32(insn, 6, 1), 1, 31, extract32(insn, 5, 1));
}

static void decode_insn16_extract_cs_d(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs2 = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->imm = ex_shift_3(ctx, deposit32(extract32(insn, 10, 3), 3, 29, extract32(insn, 5, 2)));
}

static void decode_insn16_extract_cs_h(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs2 = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->imm = ex_shift_1(ctx, extract32(insn, 5, 1));
}

static void decode_insn16_extract_cs_q(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs2 = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->imm = ex_shift_4(ctx, deposit32(deposit32(extract32(insn, 11, 2), 2, 30, extract32(insn, 5, 2)), 4, 28, extract32(insn, 10, 1)));
}

static void decode_insn16_extract_cs_w(DisasContext *ctx, arg_s *a, uint16_t insn)
{
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs2 = ex_rvc_register(ctx, extract32(insn, 2, 3));
    a->imm = ex_shift_2(ctx, deposit32(deposit32(extract32(insn, 6, 1), 1, 31, extract32(insn, 10, 3)), 4, 28, extract32(insn, 5, 1)));
}

static void decode_insn16_extract_cu(DisasContext *ctx, arg_r2 *a, uint16_t insn)
{
    a->rd = ex_rvc_register(ctx, extract32(insn, 7, 3));
    a->rs1 = ex_rvc_register(ctx, extract32(insn, 7, 3));
}

static void decode_insn16_extract_decode_insn16_Fmt_34(DisasContext *ctx, arg_empty *a, uint16_t insn)
{
}

static bool decode_insn16(DisasContext *ctx, uint16_t insn)
{
    union {
        arg_b f_b;
        arg_cmjt f_cmjt;
        arg_cmpp f_cmpp;
        arg_empty f_empty;
        arg_i f_i;
        arg_j f_j;
        arg_r f_r;
        arg_r2 f_r2;
        arg_r2_s f_r2_s;
        arg_s f_s;
        arg_shift f_shift;
        arg_u f_u;
    } u;

    switch (insn & 0xe003) {
    case 0x0000:
        /* 000..... ......00 */
        if ((insn & 0x1fe0) == 0x0000) {
            /* 00000000 000...00 */
            /* ../git/target/riscv/insn16.decode:115 */
            decode_insn16_extract_decode_insn16_Fmt_34(ctx, &u.f_empty, insn);
            if (trans_illegal(ctx, &u.f_empty)) return true;
        }
        /* ../git/target/riscv/insn16.decode:116 */
        decode_insn16_extract_c_addi4spn(ctx, &u.f_i, insn);
        if (trans_addi(ctx, &u.f_i)) return true;
        break;
    case 0x0001:
        /* 000..... ......01 */
        /* ../git/target/riscv/insn16.decode:140 */
        decode_insn16_extract_ci(ctx, &u.f_i, insn);
        if (trans_addi(ctx, &u.f_i)) return true;
        break;
    case 0x0002:
        /* 000..... ......10 */
        /* ../git/target/riscv/insn16.decode:168 */
        decode_insn16_extract_c_shift2(ctx, &u.f_shift, insn);
        if (trans_slli(ctx, &u.f_shift)) return true;
        break;
    case 0x2000:
        /* 001..... ......00 */
        /* ../git/target/riscv/insn16.decode:119 */
        decode_insn16_extract_cl_q(ctx, &u.f_i, insn);
        if (trans_lq(ctx, &u.f_i)) return true;
        /* ../git/target/riscv/insn16.decode:120 */
        decode_insn16_extract_cl_d(ctx, &u.f_i, insn);
        if (trans_c_fld(ctx, &u.f_i)) return true;
        break;
    case 0x2001:
        /* 001..... ......01 */
        if ((insn & 0x0f80) == 0x0000) {
            /* 001.0000 0.....01 */
            /* ../git/target/riscv/insn16.decode:160 */
            decode_insn16_extract_decode_insn16_Fmt_34(ctx, &u.f_empty, insn);
            if (trans_c64_illegal(ctx, &u.f_empty)) return true;
        }
        /* ../git/target/riscv/insn16.decode:161 */
        decode_insn16_extract_ci(ctx, &u.f_i, insn);
        if (trans_addiw(ctx, &u.f_i)) return true;
        /* ../git/target/riscv/insn16.decode:162 */
        decode_insn16_extract_cj(ctx, &u.f_j, insn);
        u.f_j.rd = 1;
        if (trans_jal(ctx, &u.f_j)) return true;
        break;
    case 0x2002:
        /* 001..... ......10 */
        /* ../git/target/riscv/insn16.decode:170 */
        decode_insn16_extract_c_lqsp(ctx, &u.f_i, insn);
        if (trans_lq(ctx, &u.f_i)) return true;
        /* ../git/target/riscv/insn16.decode:171 */
        decode_insn16_extract_c_ldsp(ctx, &u.f_i, insn);
        if (trans_c_fld(ctx, &u.f_i)) return true;
        break;
    case 0x4000:
        /* 010..... ......00 */
        /* ../git/target/riscv/insn16.decode:122 */
        decode_insn16_extract_cl_w(ctx, &u.f_i, insn);
        if (trans_lw(ctx, &u.f_i)) return true;
        break;
    case 0x4001:
        /* 010..... ......01 */
        /* ../git/target/riscv/insn16.decode:141 */
        decode_insn16_extract_c_li(ctx, &u.f_i, insn);
        if (trans_addi(ctx, &u.f_i)) return true;
        break;
    case 0x4002:
        /* 010..... ......10 */
        if ((insn & 0x0f80) == 0x0000) {
            /* 010.0000 0.....10 */
            /* ../git/target/riscv/insn16.decode:174 */
            decode_insn16_extract_decode_insn16_Fmt_34(ctx, &u.f_empty, insn);
            if (trans_illegal(ctx, &u.f_empty)) return true;
        }
        /* ../git/target/riscv/insn16.decode:175 */
        decode_insn16_extract_c_lwsp(ctx, &u.f_i, insn);
        if (trans_lw(ctx, &u.f_i)) return true;
        break;
    case 0x6000:
        /* 011..... ......00 */
        /* ../git/target/riscv/insn16.decode:131 */
        decode_insn16_extract_cl_d(ctx, &u.f_i, insn);
        if (trans_ld(ctx, &u.f_i)) return true;
        /* ../git/target/riscv/insn16.decode:132 */
        decode_insn16_extract_cl_w(ctx, &u.f_i, insn);
        if (trans_c_flw(ctx, &u.f_i)) return true;
        break;
    case 0x6001:
        /* 011..... ......01 */
        if ((insn & 0x107c) == 0x0000) {
            /* 0110.... .0000001 */
            /* ../git/target/riscv/insn16.decode:143 */
            decode_insn16_extract_decode_insn16_Fmt_34(ctx, &u.f_empty, insn);
            if (trans_illegal(ctx, &u.f_empty)) return true;
        }
        if ((insn & 0x0f80) == 0x0100) {
            /* 011.0001 0.....01 */
            /* ../git/target/riscv/insn16.decode:144 */
            decode_insn16_extract_c_addi16sp(ctx, &u.f_i, insn);
            if (trans_addi(ctx, &u.f_i)) return true;
        }
        /* ../git/target/riscv/insn16.decode:145 */
        decode_insn16_extract_c_lui(ctx, &u.f_u, insn);
        if (trans_lui(ctx, &u.f_u)) return true;
        break;
    case 0x6002:
        /* 011..... ......10 */
        if ((insn & 0x0f80) == 0x0000) {
            /* 011.0000 0.....10 */
            /* ../git/target/riscv/insn16.decode:207 */
            decode_insn16_extract_decode_insn16_Fmt_34(ctx, &u.f_empty, insn);
            if (trans_c64_illegal(ctx, &u.f_empty)) return true;
        }
        /* ../git/target/riscv/insn16.decode:208 */
        decode_insn16_extract_c_ldsp(ctx, &u.f_i, insn);
        if (trans_ld(ctx, &u.f_i)) return true;
        /* ../git/target/riscv/insn16.decode:209 */
        decode_insn16_extract_c_lwsp(ctx, &u.f_i, insn);
        if (trans_c_flw(ctx, &u.f_i)) return true;
        break;
    case 0x8000:
        /* 100..... ......00 */
        switch ((insn >> 10) & 0x7) {
        case 0x0:
            /* 100000.. ......00 */
            /* ../git/target/riscv/insn16.decode:224 */
            decode_insn16_extract_cl_b(ctx, &u.f_i, insn);
            if (trans_c_lbu(ctx, &u.f_i)) return true;
            break;
        case 0x1:
            /* 100001.. ......00 */
            decode_insn16_extract_cl_h(ctx, &u.f_i, insn);
            switch ((insn >> 6) & 0x1) {
            case 0x0:
                /* 100001.. .0....00 */
                /* ../git/target/riscv/insn16.decode:225 */
                if (trans_c_lhu(ctx, &u.f_i)) return true;
                break;
            case 0x1:
                /* 100001.. .1....00 */
                /* ../git/target/riscv/insn16.decode:226 */
                if (trans_c_lh(ctx, &u.f_i)) return true;
                break;
            }
            break;
        case 0x2:
            /* 100010.. ......00 */
            /* ../git/target/riscv/insn16.decode:227 */
            decode_insn16_extract_cs_b(ctx, &u.f_s, insn);
            if (trans_c_sb(ctx, &u.f_s)) return true;
            break;
        case 0x3:
            /* 100011.. ......00 */
            decode_insn16_extract_cs_h(ctx, &u.f_s, insn);
            switch ((insn >> 6) & 0x1) {
            case 0x0:
                /* 100011.. .0....00 */
                /* ../git/target/riscv/insn16.decode:228 */
                if (trans_c_sh(ctx, &u.f_s)) return true;
                break;
            }
            break;
        }
        break;
    case 0x8001:
        /* 100..... ......01 */
        switch ((insn >> 10) & 0x3) {
        case 0x0:
            /* 100.00.. ......01 */
            /* ../git/target/riscv/insn16.decode:147 */
            decode_insn16_extract_c_shift(ctx, &u.f_shift, insn);
            if (trans_srli(ctx, &u.f_shift)) return true;
            break;
        case 0x1:
            /* 100.01.. ......01 */
            /* ../git/target/riscv/insn16.decode:148 */
            decode_insn16_extract_c_shift(ctx, &u.f_shift, insn);
            if (trans_srai(ctx, &u.f_shift)) return true;
            break;
        case 0x2:
            /* 100.10.. ......01 */
            /* ../git/target/riscv/insn16.decode:149 */
            decode_insn16_extract_c_andi(ctx, &u.f_i, insn);
            if (trans_andi(ctx, &u.f_i)) return true;
            break;
        case 0x3:
            /* 100.11.. ......01 */
            switch (insn & 0x1060) {
            case 0x0000:
                /* 100011.. .00...01 */
                /* ../git/target/riscv/insn16.decode:150 */
                decode_insn16_extract_cs_2(ctx, &u.f_r, insn);
                if (trans_sub(ctx, &u.f_r)) return true;
                break;
            case 0x0020:
                /* 100011.. .01...01 */
                /* ../git/target/riscv/insn16.decode:151 */
                decode_insn16_extract_cs_2(ctx, &u.f_r, insn);
                if (trans_xor(ctx, &u.f_r)) return true;
                break;
            case 0x0040:
                /* 100011.. .10...01 */
                /* ../git/target/riscv/insn16.decode:152 */
                decode_insn16_extract_cs_2(ctx, &u.f_r, insn);
                if (trans_or(ctx, &u.f_r)) return true;
                break;
            case 0x0060:
                /* 100011.. .11...01 */
                /* ../git/target/riscv/insn16.decode:153 */
                decode_insn16_extract_cs_2(ctx, &u.f_r, insn);
                if (trans_and(ctx, &u.f_r)) return true;
                break;
            case 0x1000:
                /* 100111.. .00...01 */
                /* ../git/target/riscv/insn16.decode:164 */
                decode_insn16_extract_cs_2(ctx, &u.f_r, insn);
                if (trans_subw(ctx, &u.f_r)) return true;
                break;
            case 0x1020:
                /* 100111.. .01...01 */
                /* ../git/target/riscv/insn16.decode:165 */
                decode_insn16_extract_cs_2(ctx, &u.f_r, insn);
                if (trans_addw(ctx, &u.f_r)) return true;
                break;
            case 0x1040:
                /* 100111.. .10...01 */
                /* ../git/target/riscv/insn16.decode:223 */
                decode_insn16_extract_cs_2(ctx, &u.f_r, insn);
                if (trans_c_mul(ctx, &u.f_r)) return true;
                break;
            case 0x1060:
                /* 100111.. .11...01 */
                decode_insn16_extract_cu(ctx, &u.f_r2, insn);
                switch ((insn >> 2) & 0x7) {
                case 0x0:
                    /* 100111.. .1100001 */
                    /* ../git/target/riscv/insn16.decode:217 */
                    if (trans_c_zext_b(ctx, &u.f_r2)) return true;
                    break;
                case 0x1:
                    /* 100111.. .1100101 */
                    /* ../git/target/riscv/insn16.decode:218 */
                    if (trans_c_sext_b(ctx, &u.f_r2)) return true;
                    break;
                case 0x2:
                    /* 100111.. .1101001 */
                    /* ../git/target/riscv/insn16.decode:219 */
                    if (trans_c_zext_h(ctx, &u.f_r2)) return true;
                    break;
                case 0x3:
                    /* 100111.. .1101101 */
                    /* ../git/target/riscv/insn16.decode:220 */
                    if (trans_c_sext_h(ctx, &u.f_r2)) return true;
                    break;
                case 0x4:
                    /* 100111.. .1110001 */
                    /* ../git/target/riscv/insn16.decode:221 */
                    if (trans_c_zext_w(ctx, &u.f_r2)) return true;
                    break;
                case 0x5:
                    /* 100111.. .1110101 */
                    /* ../git/target/riscv/insn16.decode:222 */
                    if (trans_c_not(ctx, &u.f_r2)) return true;
                    break;
                }
                break;
            }
            break;
        }
        break;
    case 0x8002:
        /* 100..... ......10 */
        switch ((insn >> 12) & 0x1) {
        case 0x0:
            /* 1000.... ......10 */
            if ((insn & 0x0ffc) == 0x0000) {
                /* 10000000 00000010 */
                /* ../git/target/riscv/insn16.decode:178 */
                decode_insn16_extract_decode_insn16_Fmt_34(ctx, &u.f_empty, insn);
                if (trans_illegal(ctx, &u.f_empty)) return true;
            }
            if ((insn & 0x007c) == 0x0000) {
                /* 1000.... .0000010 */
                /* ../git/target/riscv/insn16.decode:179 */
                decode_insn16_extract_c_jalr(ctx, &u.f_i, insn);
                u.f_i.rd = 0;
                if (trans_jalr(ctx, &u.f_i)) return true;
            }
            /* ../git/target/riscv/insn16.decode:180 */
            decode_insn16_extract_c_mv(ctx, &u.f_i, insn);
            if (trans_addi(ctx, &u.f_i)) return true;
            break;
        case 0x1:
            /* 1001.... ......10 */
            if ((insn & 0x0ffc) == 0x0000) {
                /* 10010000 00000010 */
                /* ../git/target/riscv/insn16.decode:183 */
                decode_insn16_extract_decode_insn16_Fmt_34(ctx, &u.f_empty, insn);
                if (trans_ebreak(ctx, &u.f_empty)) return true;
            }
            if ((insn & 0x007c) == 0x0000) {
                /* 1001.... .0000010 */
                /* ../git/target/riscv/insn16.decode:184 */
                decode_insn16_extract_c_jalr(ctx, &u.f_i, insn);
                u.f_i.rd = 1;
                if (trans_jalr(ctx, &u.f_i)) return true;
            }
            /* ../git/target/riscv/insn16.decode:185 */
            decode_insn16_extract_cr(ctx, &u.f_r, insn);
            if (trans_add(ctx, &u.f_r)) return true;
            break;
        }
        break;
    case 0xa000:
        /* 101..... ......00 */
        /* ../git/target/riscv/insn16.decode:124 */
        decode_insn16_extract_cs_q(ctx, &u.f_s, insn);
        if (trans_sq(ctx, &u.f_s)) return true;
        /* ../git/target/riscv/insn16.decode:125 */
        decode_insn16_extract_cs_d(ctx, &u.f_s, insn);
        if (trans_c_fsd(ctx, &u.f_s)) return true;
        break;
    case 0xa001:
        /* 101..... ......01 */
        /* ../git/target/riscv/insn16.decode:154 */
        decode_insn16_extract_cj(ctx, &u.f_j, insn);
        u.f_j.rd = 0;
        if (trans_jal(ctx, &u.f_j)) return true;
        break;
    case 0xa002:
        /* 101..... ......10 */
        /* ../git/target/riscv/insn16.decode:188 */
        decode_insn16_extract_c_sqsp(ctx, &u.f_s, insn);
        if (trans_sq(ctx, &u.f_s)) return true;
        /* ../git/target/riscv/insn16.decode:189 */
        decode_insn16_extract_c_sdsp(ctx, &u.f_s, insn);
        if (trans_c_fsd(ctx, &u.f_s)) return true;
        switch ((insn >> 10) & 0x7) {
        case 0x0:
            /* 101000.. ......10 */
            /* ../git/target/riscv/insn16.decode:200 */
            decode_insn16_extract_cm_jt(ctx, &u.f_cmjt, insn);
            if (trans_cm_jalt(ctx, &u.f_cmjt)) return true;
            break;
        case 0x3:
            /* 101011.. ......10 */
            decode_insn16_extract_cm_mv(ctx, &u.f_r2_s, insn);
            switch ((insn >> 5) & 0x3) {
            case 0x1:
                /* 101011.. .01...10 */
                /* ../git/target/riscv/insn16.decode:198 */
                if (trans_cm_mvsa01(ctx, &u.f_r2_s)) return true;
                break;
            case 0x3:
                /* 101011.. .11...10 */
                /* ../git/target/riscv/insn16.decode:197 */
                if (trans_cm_mva01s(ctx, &u.f_r2_s)) return true;
                break;
            }
            break;
        case 0x6:
            /* 101110.. ......10 */
            decode_insn16_extract_cm_pp(ctx, &u.f_cmpp, insn);
            switch ((insn >> 8) & 0x3) {
            case 0x0:
                /* 10111000 ......10 */
                /* ../git/target/riscv/insn16.decode:193 */
                if (trans_cm_push(ctx, &u.f_cmpp)) return true;
                break;
            case 0x2:
                /* 10111010 ......10 */
                /* ../git/target/riscv/insn16.decode:194 */
                if (trans_cm_pop(ctx, &u.f_cmpp)) return true;
                break;
            }
            break;
        case 0x7:
            /* 101111.. ......10 */
            decode_insn16_extract_cm_pp(ctx, &u.f_cmpp, insn);
            switch ((insn >> 8) & 0x3) {
            case 0x0:
                /* 10111100 ......10 */
                /* ../git/target/riscv/insn16.decode:196 */
                if (trans_cm_popretz(ctx, &u.f_cmpp)) return true;
                break;
            case 0x2:
                /* 10111110 ......10 */
                /* ../git/target/riscv/insn16.decode:195 */
                if (trans_cm_popret(ctx, &u.f_cmpp)) return true;
                break;
            }
            break;
        }
        break;
    case 0xc000:
        /* 110..... ......00 */
        /* ../git/target/riscv/insn16.decode:127 */
        decode_insn16_extract_cs_w(ctx, &u.f_s, insn);
        if (trans_sw(ctx, &u.f_s)) return true;
        break;
    case 0xc001:
        /* 110..... ......01 */
        /* ../git/target/riscv/insn16.decode:155 */
        decode_insn16_extract_cb_z(ctx, &u.f_b, insn);
        if (trans_beq(ctx, &u.f_b)) return true;
        break;
    case 0xc002:
        /* 110..... ......10 */
        /* ../git/target/riscv/insn16.decode:203 */
        decode_insn16_extract_c_swsp(ctx, &u.f_s, insn);
        if (trans_sw(ctx, &u.f_s)) return true;
        break;
    case 0xe000:
        /* 111..... ......00 */
        /* ../git/target/riscv/insn16.decode:135 */
        decode_insn16_extract_cs_d(ctx, &u.f_s, insn);
        if (trans_sd(ctx, &u.f_s)) return true;
        /* ../git/target/riscv/insn16.decode:136 */
        decode_insn16_extract_cs_w(ctx, &u.f_s, insn);
        if (trans_c_fsw(ctx, &u.f_s)) return true;
        break;
    case 0xe001:
        /* 111..... ......01 */
        /* ../git/target/riscv/insn16.decode:156 */
        decode_insn16_extract_cb_z(ctx, &u.f_b, insn);
        if (trans_bne(ctx, &u.f_b)) return true;
        break;
    case 0xe002:
        /* 111..... ......10 */
        /* ../git/target/riscv/insn16.decode:212 */
        decode_insn16_extract_c_sdsp(ctx, &u.f_s, insn);
        if (trans_sd(ctx, &u.f_s)) return true;
        /* ../git/target/riscv/insn16.decode:213 */
        decode_insn16_extract_c_swsp(ctx, &u.f_s, insn);
        if (trans_c_fsw(ctx, &u.f_s)) return true;
        break;
    }
    return false;
}
