static void tcg_out_qemu_ld_slow_path (TCGContext *s, TCGLabelQemuLdst *label)

{

    int s_bits;

    int ir;

    int opc = label->opc;

    int mem_index = label->mem_index;

    int data_reg = label->datalo_reg;

    int data_reg2 = label->datahi_reg;

    int addr_reg = label->addrlo_reg;

    uint8_t *raddr = label->raddr;

    uint8_t **label_ptr = &label->label_ptr[0];



    s_bits = opc & 3;



    /* resolve label address */

    reloc_pc14 (label_ptr[0], (tcg_target_long) s->code_ptr);



    /* slow path */

    ir = 3;

    tcg_out_mov (s, TCG_TYPE_I32, ir++, TCG_AREG0);

#if TARGET_LONG_BITS == 32

    tcg_out_mov (s, TCG_TYPE_I32, ir++, addr_reg);

#else

#ifdef TCG_TARGET_CALL_ALIGN_ARGS

    ir |= 1;

#endif

    tcg_out_mov (s, TCG_TYPE_I32, ir++, label->addrhi_reg);

    tcg_out_mov (s, TCG_TYPE_I32, ir++, addr_reg);

#endif

    tcg_out_movi (s, TCG_TYPE_I32, ir, mem_index);

    tcg_out_call (s, (tcg_target_long) qemu_ld_helpers[s_bits], 1);

    tcg_out32 (s, B | 8);

    tcg_out32 (s, (tcg_target_long) raddr);

    switch (opc) {

    case 0|4:

        tcg_out32 (s, EXTSB | RA (data_reg) | RS (3));

        break;

    case 1|4:

        tcg_out32 (s, EXTSH | RA (data_reg) | RS (3));

        break;

    case 0:

    case 1:

    case 2:

        if (data_reg != 3)

            tcg_out_mov (s, TCG_TYPE_I32, data_reg, 3);

        break;

    case 3:

        if (data_reg == 3) {

            if (data_reg2 == 4) {

                tcg_out_mov (s, TCG_TYPE_I32, 0, 4);

                tcg_out_mov (s, TCG_TYPE_I32, 4, 3);

                tcg_out_mov (s, TCG_TYPE_I32, 3, 0);

            }

            else {

                tcg_out_mov (s, TCG_TYPE_I32, data_reg2, 3);

                tcg_out_mov (s, TCG_TYPE_I32, 3, 4);

            }

        }

        else {

            if (data_reg != 4) tcg_out_mov (s, TCG_TYPE_I32, data_reg, 4);

            if (data_reg2 != 3) tcg_out_mov (s, TCG_TYPE_I32, data_reg2, 3);

        }

        break;

    }

    /* Jump to the code corresponding to next IR of qemu_st */

    tcg_out_b (s, 0, (tcg_target_long) raddr);

}

static void tcg_out_qemu_ld_slow_path (TCGContext *s, TCGLabelQemuLdst *label)

{

    int s_bits;

    int ir;

    int opc = label->opc;

    int mem_index = label->mem_index;

    int data_reg = label->datalo_reg;

    int data_reg2 = label->datahi_reg;

    int addr_reg = label->addrlo_reg;

    uint8_t *raddr = label->raddr;

    uint8_t **label_ptr = &label->label_ptr[0];



    s_bits = opc & 3;



    

    reloc_pc14 (label_ptr[0], (tcg_target_long) s->code_ptr);



    

    ir = 3;

    tcg_out_mov (s, TCG_TYPE_I32, ir++, TCG_AREG0);

#if TARGET_LONG_BITS == 32

    tcg_out_mov (s, TCG_TYPE_I32, ir++, addr_reg);

#else

#ifdef TCG_TARGET_CALL_ALIGN_ARGS

    ir |= 1;

#endif

    tcg_out_mov (s, TCG_TYPE_I32, ir++, label->addrhi_reg);

    tcg_out_mov (s, TCG_TYPE_I32, ir++, addr_reg);

#endif

    tcg_out_movi (s, TCG_TYPE_I32, ir, mem_index);

    tcg_out_call (s, (tcg_target_long) qemu_ld_helpers[s_bits], 1);

    tcg_out32 (s, B | 8);

    tcg_out32 (s, (tcg_target_long) raddr);

    switch (opc) {

    case 0|4:

        tcg_out32 (s, EXTSB | RA (data_reg) | RS (3));

        break;

    case 1|4:

        tcg_out32 (s, EXTSH | RA (data_reg) | RS (3));

        break;

    case 0:

    case 1:

    case 2:

        if (data_reg != 3)

            tcg_out_mov (s, TCG_TYPE_I32, data_reg, 3);

        break;

    case 3:

        if (data_reg == 3) {

            if (data_reg2 == 4) {

                tcg_out_mov (s, TCG_TYPE_I32, 0, 4);

                tcg_out_mov (s, TCG_TYPE_I32, 4, 3);

                tcg_out_mov (s, TCG_TYPE_I32, 3, 0);

            }

            else {

                tcg_out_mov (s, TCG_TYPE_I32, data_reg2, 3);

                tcg_out_mov (s, TCG_TYPE_I32, 3, 4);

            }

        }

        else {

            if (data_reg != 4) tcg_out_mov (s, TCG_TYPE_I32, data_reg, 4);

            if (data_reg2 != 3) tcg_out_mov (s, TCG_TYPE_I32, data_reg2, 3);

        }

        break;

    }

    

    tcg_out_b (s, 0, (tcg_target_long) raddr);

}

static void FUNC_0 (TCGContext *VAR_0, TCGLabelQemuLdst *VAR_1)

{

    int VAR_2;

    int VAR_3;

    int VAR_4 = VAR_1->VAR_4;

    int VAR_5 = VAR_1->VAR_5;

    int VAR_6 = VAR_1->datalo_reg;

    int VAR_7 = VAR_1->datahi_reg;

    int VAR_8 = VAR_1->addrlo_reg;

    uint8_t *raddr = VAR_1->raddr;

    uint8_t **label_ptr = &VAR_1->label_ptr[0];



    VAR_2 = VAR_4 & 3;



    

    reloc_pc14 (label_ptr[0], (tcg_target_long) VAR_0->code_ptr);



    

    VAR_3 = 3;

    tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, TCG_AREG0);

#if TARGET_LONG_BITS == 32

    tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, VAR_8);

#else

#ifdef TCG_TARGET_CALL_ALIGN_ARGS

    VAR_3 |= 1;

#endif

    tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, VAR_1->addrhi_reg);

    tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, VAR_8);

#endif

    tcg_out_movi (VAR_0, TCG_TYPE_I32, VAR_3, VAR_5);

    tcg_out_call (VAR_0, (tcg_target_long) qemu_ld_helpers[VAR_2], 1);

    tcg_out32 (VAR_0, B | 8);

    tcg_out32 (VAR_0, (tcg_target_long) raddr);

    switch (VAR_4) {

    case 0|4:

        tcg_out32 (VAR_0, EXTSB | RA (VAR_6) | RS (3));

        break;

    case 1|4:

        tcg_out32 (VAR_0, EXTSH | RA (VAR_6) | RS (3));

        break;

    case 0:

    case 1:

    case 2:

        if (VAR_6 != 3)

            tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_6, 3);

        break;

    case 3:

        if (VAR_6 == 3) {

            if (VAR_7 == 4) {

                tcg_out_mov (VAR_0, TCG_TYPE_I32, 0, 4);

                tcg_out_mov (VAR_0, TCG_TYPE_I32, 4, 3);

                tcg_out_mov (VAR_0, TCG_TYPE_I32, 3, 0);

            }

            else {

                tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_7, 3);

                tcg_out_mov (VAR_0, TCG_TYPE_I32, 3, 4);

            }

        }

        else {

            if (VAR_6 != 4) tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_6, 4);

            if (VAR_7 != 3) tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_7, 3);

        }

        break;

    }

    

    tcg_out_b (VAR_0, 0, (tcg_target_long) raddr);

}

static void FUNC_0 (TCGContext *VAR_0, TCGLabelQemuLdst *VAR_1)
{ int VAR_2; int VAR_3; int VAR_4 = VAR_1->VAR_4; int VAR_5 = VAR_1->VAR_5; int VAR_6 = VAR_1->datalo_reg; int VAR_7 = VAR_1->datahi_reg; int VAR_8 = VAR_1->addrlo_reg; uint8_t *raddr = VAR_1->raddr; uint8_t **label_ptr = &VAR_1->label_ptr[0]; VAR_2 = VAR_4 & 3; reloc_pc14 (label_ptr[0], (tcg_target_long) VAR_0->code_ptr); VAR_3 = 3; tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, TCG_AREG0); #if TARGET_LONG_BITS == 32
tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, VAR_8); #else
#ifdef TCG_TARGET_CALL_ALIGN_ARGS
VAR_3 |= 1; #endif
tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, VAR_1->addrhi_reg); tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_3++, VAR_8); #endif
tcg_out_movi (VAR_0, TCG_TYPE_I32, VAR_3, VAR_5); tcg_out_call (VAR_0, (tcg_target_long) qemu_ld_helpers[VAR_2], 1); tcg_out32 (VAR_0, B | 8); tcg_out32 (VAR_0, (tcg_target_long) raddr); switch (VAR_4) { case 0|4:
tcg_out32 (VAR_0, EXTSB | RA (VAR_6) | RS (3)); break; case 1|4:
tcg_out32 (VAR_0, EXTSH | RA (VAR_6) | RS (3)); break; case 0:
case 1:
case 2:
if (VAR_6 != 3)
tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_6, 3); break; case 3:
if (VAR_6 == 3) { if (VAR_7 == 4) { tcg_out_mov (VAR_0, TCG_TYPE_I32, 0, 4); tcg_out_mov (VAR_0, TCG_TYPE_I32, 4, 3); tcg_out_mov (VAR_0, TCG_TYPE_I32, 3, 0); } else { tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_7, 3); tcg_out_mov (VAR_0, TCG_TYPE_I32, 3, 4); } } else { if (VAR_6 != 4) tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_6, 4); if (VAR_7 != 3) tcg_out_mov (VAR_0, TCG_TYPE_I32, VAR_7, 3); } break; } tcg_out_b (VAR_0, 0, (tcg_target_long) raddr); }