static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd,

                         tcg_target_long value)

{

    AArch64Insn insn;



    if (type == TCG_TYPE_I32) {

        value = (uint32_t)value;

    }



    /* count trailing zeros in 16 bit steps, mapping 64 to 0. Emit the

       first MOVZ with the half-word immediate skipping the zeros, with a shift

       (LSL) equal to this number. Then all next instructions use MOVKs.

       Zero the processed half-word in the value, continue until empty.

       We build the final result 16bits at a time with up to 4 instructions,

       but do not emit instructions for 16bit zero holes. */

    insn = I3405_MOVZ;

    do {

        unsigned shift = ctz64(value) & (63 & -16);

        tcg_out_insn_3405(s, insn, shift >= 32, rd, value >> shift, shift);

        value &= ~(0xffffUL << shift);

        insn = I3405_MOVK;

    } while (value);

}

static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd,

                         tcg_target_long value)

{

    AArch64Insn insn;



    if (type == TCG_TYPE_I32) {

        value = (uint32_t)value;

    }



    











    insn = I3405_MOVZ;

    do {

        unsigned shift = ctz64(value) & (63 & -16);

        tcg_out_insn_3405(s, insn, shift >= 32, rd, value >> shift, shift);

        value &= ~(0xffffUL << shift);

        insn = I3405_MOVK;

    } while (value);

}

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

                         tcg_target_long VAR_3)

{

    AArch64Insn insn;



    if (VAR_1 == TCG_TYPE_I32) {

        VAR_3 = (uint32_t)VAR_3;

    }



    











    insn = I3405_MOVZ;

    do {

        unsigned VAR_4 = ctz64(VAR_3) & (63 & -16);

        tcg_out_insn_3405(VAR_0, insn, VAR_4 >= 32, VAR_2, VAR_3 >> VAR_4, VAR_4);

        VAR_3 &= ~(0xffffUL << VAR_4);

        insn = I3405_MOVK;

    } while (VAR_3);

}

static void FUNC_0(TCGContext *VAR_0, TCGType VAR_1, TCGReg VAR_2,
tcg_target_long VAR_3)
{ AArch64Insn insn; if (VAR_1 == TCG_TYPE_I32) { VAR_3 = (uint32_t)VAR_3; } insn = I3405_MOVZ; do { unsigned VAR_4 = ctz64(VAR_3) & (63 & -16); tcg_out_insn_3405(VAR_0, insn, VAR_4 >= 32, VAR_2, VAR_3 >> VAR_4, VAR_4); VAR_3 &= ~(0xffffUL << VAR_4); insn = I3405_MOVK; } while (VAR_3); }