static void patch_reloc(uint8_t *code_ptr, int type,

                        tcg_target_long value, tcg_target_long addend)

{

    value += addend;

    switch (type) {

    case R_SPARC_32:

        if (value != (uint32_t)value)

            tcg_abort();

        *(uint32_t *)code_ptr = value;

        break;

    case R_SPARC_WDISP22:

        value -= (long)code_ptr;

        value >>= 2;

        if (!check_fit(value, 22))

            tcg_abort();

        *(uint32_t *)code_ptr = ((*(uint32_t *)code_ptr) & ~0x3fffff) | value;

        break;

    default:

        tcg_abort();

    }

}

static void patch_reloc(uint8_t *code_ptr, int type,

                        tcg_target_long value, tcg_target_long addend)

{

    value += addend;

    switch (type) {

    case R_SPARC_32:

        if (value != (uint32_t)value)

            tcg_abort();

        *(uint32_t *)code_ptr = value;

        break;

    case R_SPARC_WDISP22:

        value -= (long)code_ptr;

        value >>= 2;

        if (!check_fit(value, 22))

            tcg_abort();

        *(uint32_t *)code_ptr = ((*(uint32_t *)code_ptr) & ~0x3fffff) | value;

        break;

    default:

        tcg_abort();

    }

}

static void FUNC_0(uint8_t *VAR_0, int VAR_1,

                        tcg_target_long VAR_2, tcg_target_long VAR_3)

{

    VAR_2 += VAR_3;

    switch (VAR_1) {

    case R_SPARC_32:

        if (VAR_2 != (uint32_t)VAR_2)

            tcg_abort();

        *(uint32_t *)VAR_0 = VAR_2;

        break;

    case R_SPARC_WDISP22:

        VAR_2 -= (long)VAR_0;

        VAR_2 >>= 2;

        if (!check_fit(VAR_2, 22))

            tcg_abort();

        *(uint32_t *)VAR_0 = ((*(uint32_t *)VAR_0) & ~0x3fffff) | VAR_2;

        break;

    default:

        tcg_abort();

    }

}

static void FUNC_0(uint8_t *VAR_0, int VAR_1,
tcg_target_long VAR_2, tcg_target_long VAR_3)
{ VAR_2 += VAR_3; switch (VAR_1) { case R_SPARC_32:
if (VAR_2 != (uint32_t)VAR_2)
tcg_abort(); *(uint32_t *)VAR_0 = VAR_2; break; case R_SPARC_WDISP22:
VAR_2 -= (long)VAR_0; VAR_2 >>= 2; if (!check_fit(VAR_2, 22))
tcg_abort(); *(uint32_t *)VAR_0 = ((*(uint32_t *)VAR_0) & ~0x3fffff) | VAR_2; break; default:
tcg_abort(); } }