static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, bool is64)

{

    TCGReg datalo, datahi, addrlo;

    TCGReg addrhi __attribute__((unused));

    TCGMemOpIdx oi;

    TCGMemOp opc;

#if defined(CONFIG_SOFTMMU)

    int mem_index;

    TCGMemOp s_bits;

    tcg_insn_unit *label_ptr[2];

#endif



    datalo = *args++;

    datahi = (TCG_TARGET_REG_BITS == 32 && is64 ? *args++ : 0);

    addrlo = *args++;

    addrhi = (TARGET_LONG_BITS > TCG_TARGET_REG_BITS ? *args++ : 0);

    oi = *args++;

    opc = get_memop(oi);



#if defined(CONFIG_SOFTMMU)

    mem_index = get_mmuidx(oi);

    s_bits = opc & MO_SIZE;



    tcg_out_tlb_load(s, addrlo, addrhi, mem_index, s_bits,

                     label_ptr, offsetof(CPUTLBEntry, addr_read));



    /* TLB Hit.  */

    tcg_out_qemu_ld_direct(s, datalo, datahi, TCG_REG_L1, -1, 0, 0, opc);



    /* Record the current context of a load into ldst label */

    add_qemu_ldst_label(s, true, oi, datalo, datahi, addrlo, addrhi,

                        s->code_ptr, label_ptr);

#else

    {

        int32_t offset = GUEST_BASE;

        TCGReg base = addrlo;

        int index = -1;

        int seg = 0;



        /* For a 32-bit guest, the high 32 bits may contain garbage.

           We can do this with the ADDR32 prefix if we're not using

           a guest base, or when using segmentation.  Otherwise we

           need to zero-extend manually.  */

        if (GUEST_BASE == 0 || guest_base_flags) {

            seg = guest_base_flags;

            offset = 0;

            if (TCG_TARGET_REG_BITS > TARGET_LONG_BITS) {

                seg |= P_ADDR32;

            }

        } else if (TCG_TARGET_REG_BITS == 64) {

            if (TARGET_LONG_BITS == 32) {

                tcg_out_ext32u(s, TCG_REG_L0, base);

                base = TCG_REG_L0;

            }

            if (offset != GUEST_BASE) {

                tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_L1, GUEST_BASE);

                index = TCG_REG_L1;

                offset = 0;

            }

        }



        tcg_out_qemu_ld_direct(s, datalo, datahi,

                               base, index, offset, seg, opc);

    }

#endif

}

static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, bool is64)

{

    TCGReg datalo, datahi, addrlo;

    TCGReg addrhi __attribute__((unused));

    TCGMemOpIdx oi;

    TCGMemOp opc;

#if defined(CONFIG_SOFTMMU)

    int mem_index;

    TCGMemOp s_bits;

    tcg_insn_unit *label_ptr[2];

#endif



    datalo = *args++;

    datahi = (TCG_TARGET_REG_BITS == 32 && is64 ? *args++ : 0);

    addrlo = *args++;

    addrhi = (TARGET_LONG_BITS > TCG_TARGET_REG_BITS ? *args++ : 0);

    oi = *args++;

    opc = get_memop(oi);



#if defined(CONFIG_SOFTMMU)

    mem_index = get_mmuidx(oi);

    s_bits = opc & MO_SIZE;



    tcg_out_tlb_load(s, addrlo, addrhi, mem_index, s_bits,

                     label_ptr, offsetof(CPUTLBEntry, addr_read));



    

    tcg_out_qemu_ld_direct(s, datalo, datahi, TCG_REG_L1, -1, 0, 0, opc);



    

    add_qemu_ldst_label(s, true, oi, datalo, datahi, addrlo, addrhi,

                        s->code_ptr, label_ptr);

#else

    {

        int32_t offset = GUEST_BASE;

        TCGReg base = addrlo;

        int index = -1;

        int seg = 0;



        







        if (GUEST_BASE == 0 || guest_base_flags) {

            seg = guest_base_flags;

            offset = 0;

            if (TCG_TARGET_REG_BITS > TARGET_LONG_BITS) {

                seg |= P_ADDR32;

            }

        } else if (TCG_TARGET_REG_BITS == 64) {

            if (TARGET_LONG_BITS == 32) {

                tcg_out_ext32u(s, TCG_REG_L0, base);

                base = TCG_REG_L0;

            }

            if (offset != GUEST_BASE) {

                tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_L1, GUEST_BASE);

                index = TCG_REG_L1;

                offset = 0;

            }

        }



        tcg_out_qemu_ld_direct(s, datalo, datahi,

                               base, index, offset, seg, opc);

    }

#endif

}

static void FUNC_0(TCGContext *VAR_0, const TCGArg *VAR_1, bool VAR_2)

{

    TCGReg datalo, datahi, addrlo;

    TCGReg addrhi __attribute__((unused));

    TCGMemOpIdx oi;

    TCGMemOp opc;

#if defined(CONFIG_SOFTMMU)

    int mem_index;

    TCGMemOp s_bits;

    tcg_insn_unit *label_ptr[2];

#endif



    datalo = *VAR_1++;

    datahi = (TCG_TARGET_REG_BITS == 32 && VAR_2 ? *VAR_1++ : 0);

    addrlo = *VAR_1++;

    addrhi = (TARGET_LONG_BITS > TCG_TARGET_REG_BITS ? *VAR_1++ : 0);

    oi = *VAR_1++;

    opc = get_memop(oi);



#if defined(CONFIG_SOFTMMU)

    mem_index = get_mmuidx(oi);

    s_bits = opc & MO_SIZE;



    tcg_out_tlb_load(VAR_0, addrlo, addrhi, mem_index, s_bits,

                     label_ptr, offsetof(CPUTLBEntry, addr_read));



    

    tcg_out_qemu_ld_direct(VAR_0, datalo, datahi, TCG_REG_L1, -1, 0, 0, opc);



    

    add_qemu_ldst_label(VAR_0, true, oi, datalo, datahi, addrlo, addrhi,

                        VAR_0->code_ptr, label_ptr);

#else

    {

        int32_t offset = GUEST_BASE;

        TCGReg base = addrlo;

        int VAR_3 = -1;

        int VAR_4 = 0;



        







        if (GUEST_BASE == 0 || guest_base_flags) {

            VAR_4 = guest_base_flags;

            offset = 0;

            if (TCG_TARGET_REG_BITS > TARGET_LONG_BITS) {

                VAR_4 |= P_ADDR32;

            }

        } else if (TCG_TARGET_REG_BITS == 64) {

            if (TARGET_LONG_BITS == 32) {

                tcg_out_ext32u(VAR_0, TCG_REG_L0, base);

                base = TCG_REG_L0;

            }

            if (offset != GUEST_BASE) {

                tcg_out_movi(VAR_0, TCG_TYPE_I64, TCG_REG_L1, GUEST_BASE);

                VAR_3 = TCG_REG_L1;

                offset = 0;

            }

        }



        tcg_out_qemu_ld_direct(VAR_0, datalo, datahi,

                               base, VAR_3, offset, VAR_4, opc);

    }

#endif

}

static void FUNC_0(TCGContext *VAR_0, const TCGArg *VAR_1, bool VAR_2)
{ TCGReg datalo, datahi, addrlo; TCGReg addrhi __attribute__((unused)); TCGMemOpIdx oi; TCGMemOp opc; #if defined(CONFIG_SOFTMMU)
int mem_index; TCGMemOp s_bits; tcg_insn_unit *label_ptr[2]; #endif
datalo = *VAR_1++; datahi = (TCG_TARGET_REG_BITS == 32 && VAR_2 ? *VAR_1++ : 0); addrlo = *VAR_1++; addrhi = (TARGET_LONG_BITS > TCG_TARGET_REG_BITS ? *VAR_1++ : 0); oi = *VAR_1++; opc = get_memop(oi); #if defined(CONFIG_SOFTMMU)
mem_index = get_mmuidx(oi); s_bits = opc & MO_SIZE; tcg_out_tlb_load(VAR_0, addrlo, addrhi, mem_index, s_bits,
label_ptr, offsetof(CPUTLBEntry, addr_read)); tcg_out_qemu_ld_direct(VAR_0, datalo, datahi, TCG_REG_L1, -1, 0, 0, opc); add_qemu_ldst_label(VAR_0, true, oi, datalo, datahi, addrlo, addrhi,
VAR_0->code_ptr, label_ptr); #else
{ int32_t offset = GUEST_BASE; TCGReg base = addrlo; int VAR_3 = -1; int VAR_4 = 0; if (GUEST_BASE == 0 || guest_base_flags) { VAR_4 = guest_base_flags; offset = 0; if (TCG_TARGET_REG_BITS > TARGET_LONG_BITS) { VAR_4 |= P_ADDR32; } } else if (TCG_TARGET_REG_BITS == 64) { if (TARGET_LONG_BITS == 32) { tcg_out_ext32u(VAR_0, TCG_REG_L0, base); base = TCG_REG_L0; } if (offset != GUEST_BASE) { tcg_out_movi(VAR_0, TCG_TYPE_I64, TCG_REG_L1, GUEST_BASE); VAR_3 = TCG_REG_L1; offset = 0; } } tcg_out_qemu_ld_direct(VAR_0, datalo, datahi,
base, VAR_3, offset, VAR_4, opc); } #endif
}