void lance_init(NICInfo *nd, int irq, uint32_t leaddr, uint32_t ledaddr)

{

    LANCEState *s;

    int lance_io_memory, ledma_io_memory;



    s = qemu_mallocz(sizeof(LANCEState));

    if (!s)

        return;



    s->irq = irq;



    lance_io_memory = cpu_register_io_memory(0, lance_mem_read, lance_mem_write, s);

    cpu_register_physical_memory(leaddr, 4, lance_io_memory);



    ledma_io_memory = cpu_register_io_memory(0, ledma_mem_read, ledma_mem_write, s);

    cpu_register_physical_memory(ledaddr, 16, ledma_io_memory);



    memcpy(s->macaddr, nd->macaddr, 6);



    lance_reset(s);



    s->vc = qemu_new_vlan_client(nd->vlan, lance_receive, s);



    snprintf(s->vc->info_str, sizeof(s->vc->info_str),

             "lance macaddr=%02x:%02x:%02x:%02x:%02x:%02x",

             s->macaddr[0],

             s->macaddr[1],

             s->macaddr[2],

             s->macaddr[3],

             s->macaddr[4],

             s->macaddr[5]);



    register_savevm("lance", leaddr, 1, lance_save, lance_load, s);

    qemu_register_reset(lance_reset, s);

}

void lance_init(NICInfo *nd, int irq, uint32_t leaddr, uint32_t ledaddr)

{

    LANCEState *s;

    int lance_io_memory, ledma_io_memory;



    s = qemu_mallocz(sizeof(LANCEState));

    if (!s)

        return;



    s->irq = irq;



    lance_io_memory = cpu_register_io_memory(0, lance_mem_read, lance_mem_write, s);

    cpu_register_physical_memory(leaddr, 4, lance_io_memory);



    ledma_io_memory = cpu_register_io_memory(0, ledma_mem_read, ledma_mem_write, s);

    cpu_register_physical_memory(ledaddr, 16, ledma_io_memory);



    memcpy(s->macaddr, nd->macaddr, 6);



    lance_reset(s);



    s->vc = qemu_new_vlan_client(nd->vlan, lance_receive, s);



    snprintf(s->vc->info_str, sizeof(s->vc->info_str),

             "lance macaddr=%02x:%02x:%02x:%02x:%02x:%02x",

             s->macaddr[0],

             s->macaddr[1],

             s->macaddr[2],

             s->macaddr[3],

             s->macaddr[4],

             s->macaddr[5]);



    register_savevm("lance", leaddr, 1, lance_save, lance_load, s);

    qemu_register_reset(lance_reset, s);

}

    s->vc = qemu_new_vlan_client(nd->vlan, lance_receive, s);
void FUNC_0(NICInfo *VAR_0, int VAR_1, uint32_t VAR_2, uint32_t VAR_3)

{

    LANCEState *s;

    int VAR_4, VAR_5;



    s = qemu_mallocz(sizeof(LANCEState));

    if (!s)

        return;



    s->VAR_1 = VAR_1;



    VAR_4 = cpu_register_io_memory(0, lance_mem_read, lance_mem_write, s);

    cpu_register_physical_memory(VAR_2, 4, VAR_4);



    VAR_5 = cpu_register_io_memory(0, ledma_mem_read, ledma_mem_write, s);

    cpu_register_physical_memory(VAR_3, 16, VAR_5);



    memcpy(s->macaddr, VAR_0->macaddr, 6);



    lance_reset(s);



    s->vc = qemu_new_vlan_client(VAR_0->vlan, lance_receive, s);



    snprintf(s->vc->info_str, sizeof(s->vc->info_str),

             "lance macaddr=%02x:%02x:%02x:%02x:%02x:%02x",

             s->macaddr[0],

             s->macaddr[1],

             s->macaddr[2],

             s->macaddr[3],

             s->macaddr[4],

             s->macaddr[5]);



    register_savevm("lance", VAR_2, 1, lance_save, lance_load, s);

    qemu_register_reset(lance_reset, s);

}

void FUNC_0(NICInfo *VAR_0, int VAR_1, uint32_t VAR_2, uint32_t VAR_3)
{ LANCEState *s; int VAR_4, VAR_5; s = qemu_mallocz(sizeof(LANCEState)); if (!s)
return; s->VAR_1 = VAR_1; VAR_4 = cpu_register_io_memory(0, lance_mem_read, lance_mem_write, s); cpu_register_physical_memory(VAR_2, 4, VAR_4); VAR_5 = cpu_register_io_memory(0, ledma_mem_read, ledma_mem_write, s); cpu_register_physical_memory(VAR_3, 16, VAR_5); memcpy(s->macaddr, VAR_0->macaddr, 6); lance_reset(s); s->vc = qemu_new_vlan_client(VAR_0->vlan, lance_receive, s); snprintf(s->vc->info_str, sizeof(s->vc->info_str),
"lance macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
s->macaddr[0],
s->macaddr[1],
s->macaddr[2],
s->macaddr[3],
s->macaddr[4],
s->macaddr[5]); register_savevm("lance", VAR_2, 1, lance_save, lance_load, s); qemu_register_reset(lance_reset, s); }