static void handle_satn_stop(ESPState *s)

{

    if (s->dma && !s->dma_enabled) {

        s->dma_cb = handle_satn_stop;

        return;

    }

    s->cmdlen = get_cmd(s, s->cmdbuf);

    if (s->cmdlen) {

        trace_esp_handle_satn_stop(s->cmdlen);

        s->do_cmd = 1;

        s->rregs[ESP_RSTAT] = STAT_TC | STAT_CD;

        s->rregs[ESP_RINTR] = INTR_BS | INTR_FC;

        s->rregs[ESP_RSEQ] = SEQ_CD;

        esp_raise_irq(s);

    }

}

static void handle_satn_stop(ESPState *s)

{

    if (s->dma && !s->dma_enabled) {

        s->dma_cb = handle_satn_stop;

        return;

    }

    s->cmdlen = get_cmd(s, s->cmdbuf);

    if (s->cmdlen) {

        trace_esp_handle_satn_stop(s->cmdlen);

        s->do_cmd = 1;

        s->rregs[ESP_RSTAT] = STAT_TC | STAT_CD;

        s->rregs[ESP_RINTR] = INTR_BS | INTR_FC;

        s->rregs[ESP_RSEQ] = SEQ_CD;

        esp_raise_irq(s);

    }

}

    s->cmdlen = get_cmd(s, s->cmdbuf);
static void FUNC_0(ESPState *VAR_0)

{

    if (VAR_0->dma && !VAR_0->dma_enabled) {

        VAR_0->dma_cb = FUNC_0;

        return;

    }

    VAR_0->cmdlen = get_cmd(VAR_0, VAR_0->cmdbuf);

    if (VAR_0->cmdlen) {

        trace_esp_handle_satn_stop(VAR_0->cmdlen);

        VAR_0->do_cmd = 1;

        VAR_0->rregs[ESP_RSTAT] = STAT_TC | STAT_CD;

        VAR_0->rregs[ESP_RINTR] = INTR_BS | INTR_FC;

        VAR_0->rregs[ESP_RSEQ] = SEQ_CD;

        esp_raise_irq(VAR_0);

    }

}

static void FUNC_0(ESPState *VAR_0)
{ if (VAR_0->dma && !VAR_0->dma_enabled) { VAR_0->dma_cb = FUNC_0; return; } VAR_0->cmdlen = get_cmd(VAR_0, VAR_0->cmdbuf); if (VAR_0->cmdlen) { trace_esp_handle_satn_stop(VAR_0->cmdlen); VAR_0->do_cmd = 1; VAR_0->rregs[ESP_RSTAT] = STAT_TC | STAT_CD; VAR_0->rregs[ESP_RINTR] = INTR_BS | INTR_FC; VAR_0->rregs[ESP_RSEQ] = SEQ_CD; esp_raise_irq(VAR_0); } }