static void write_dt(void *ptr, unsigned long addr, unsigned long limit,

                     int flags)

{

    unsigned int e1, e2;

    uint32_t *p;

    e1 = (addr << 16) | (limit & 0xffff);

    e2 = ((addr >> 16) & 0xff) | (addr & 0xff000000) | (limit & 0x000f0000);

    e2 |= flags;

    p = ptr;

    p[0] = tswapl(e1);

    p[1] = tswapl(e2);

}

static void write_dt(void *ptr, unsigned long addr, unsigned long limit,

                     int flags)

{

    unsigned int e1, e2;

    uint32_t *p;

    e1 = (addr << 16) | (limit & 0xffff);

    e2 = ((addr >> 16) & 0xff) | (addr & 0xff000000) | (limit & 0x000f0000);

    e2 |= flags;

    p = ptr;

    p[0] = tswapl(e1);

    p[1] = tswapl(e2);

}

static void FUNC_0(void *VAR_0, unsigned long VAR_1, unsigned long VAR_2,

                     int VAR_3)

{

    unsigned int VAR_4, VAR_5;

    uint32_t *p;

    VAR_4 = (VAR_1 << 16) | (VAR_2 & 0xffff);

    VAR_5 = ((VAR_1 >> 16) & 0xff) | (VAR_1 & 0xff000000) | (VAR_2 & 0x000f0000);

    VAR_5 |= VAR_3;

    p = VAR_0;

    p[0] = tswapl(VAR_4);

    p[1] = tswapl(VAR_5);

}

static void FUNC_0(void *VAR_0, unsigned long VAR_1, unsigned long VAR_2,
int VAR_3)
{ unsigned int VAR_4, VAR_5; uint32_t *p; VAR_4 = (VAR_1 << 16) | (VAR_2 & 0xffff); VAR_5 = ((VAR_1 >> 16) & 0xff) | (VAR_1 & 0xff000000) | (VAR_2 & 0x000f0000); VAR_5 |= VAR_3; p = VAR_0; p[0] = tswapl(VAR_4); p[1] = tswapl(VAR_5); }