static inline int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr,

                               int selector)

{

    SegmentCache *dt;

    int index;

    uint8_t *ptr;



    if (selector & 0x4)

        dt = &env->ldt;

    else

        dt = &env->gdt;

    index = selector & ~7;

    if ((index + 7) > dt->limit)

        return -1;

    ptr = dt->base + index;

    *e1_ptr = ldl_kernel(ptr);

    *e2_ptr = ldl_kernel(ptr + 4);

    return 0;

}

static inline int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr,

                               int selector)

{

    SegmentCache *dt;

    int index;

    uint8_t *ptr;



    if (selector & 0x4)

        dt = &env->ldt;

    else

        dt = &env->gdt;

    index = selector & ~7;

    if ((index + 7) > dt->limit)

        return -1;

    ptr = dt->base + index;

    *e1_ptr = ldl_kernel(ptr);

    *e2_ptr = ldl_kernel(ptr + 4);

    return 0;

}

static inline int FUNC_0(uint32_t *VAR_0, uint32_t *VAR_1,

                               int VAR_2)

{

    SegmentCache *dt;

    int VAR_3;

    uint8_t *ptr;



    if (VAR_2 & 0x4)

        dt = &env->ldt;

    else

        dt = &env->gdt;

    VAR_3 = VAR_2 & ~7;

    if ((VAR_3 + 7) > dt->limit)

        return -1;

    ptr = dt->base + VAR_3;

    *VAR_0 = ldl_kernel(ptr);

    *VAR_1 = ldl_kernel(ptr + 4);

    return 0;

}

static inline int FUNC_0(uint32_t *VAR_0, uint32_t *VAR_1,
int VAR_2)
{ SegmentCache *dt; int VAR_3; uint8_t *ptr; if (VAR_2 & 0x4)
dt = &env->ldt; else
dt = &env->gdt; VAR_3 = VAR_2 & ~7; if ((VAR_3 + 7) > dt->limit)
return -1; ptr = dt->base + VAR_3; *VAR_0 = ldl_kernel(ptr); *VAR_1 = ldl_kernel(ptr + 4); return 0; }