static int no_run_in (HWVoiceIn *hw)

{

    NoVoiceIn *no = (NoVoiceIn *) hw;

    int live = audio_pcm_hw_get_live_in (hw);

    int dead = hw->samples - live;

    int samples = 0;



    if (dead) {

        int64_t now = qemu_get_clock (vm_clock);

        int64_t ticks = now - no->old_ticks;

        int64_t bytes =

            muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ());



        no->old_ticks = now;

        bytes = audio_MIN (bytes, INT_MAX);

        samples = bytes >> hw->info.shift;

        samples = audio_MIN (samples, dead);

    }

    return samples;

}

static int no_run_in (HWVoiceIn *hw)

{

    NoVoiceIn *no = (NoVoiceIn *) hw;

    int live = audio_pcm_hw_get_live_in (hw);

    int dead = hw->samples - live;

    int samples = 0;



    if (dead) {

        int64_t now = qemu_get_clock (vm_clock);

        int64_t ticks = now - no->old_ticks;

        int64_t bytes =

            muldiv64 (ticks, hw->info.bytes_per_second, get_ticks_per_sec ());



        no->old_ticks = now;

        bytes = audio_MIN (bytes, INT_MAX);

        samples = bytes >> hw->info.shift;

        samples = audio_MIN (samples, dead);

    }

    return samples;

}

static int FUNC_0 (HWVoiceIn *VAR_0)

{

    NoVoiceIn *no = (NoVoiceIn *) VAR_0;

    int VAR_1 = audio_pcm_hw_get_live_in (VAR_0);

    int VAR_2 = VAR_0->VAR_3 - VAR_1;

    int VAR_3 = 0;



    if (VAR_2) {

        int64_t now = qemu_get_clock (vm_clock);

        int64_t ticks = now - no->old_ticks;

        int64_t bytes =

            muldiv64 (ticks, VAR_0->info.bytes_per_second, get_ticks_per_sec ());



        no->old_ticks = now;

        bytes = audio_MIN (bytes, INT_MAX);

        VAR_3 = bytes >> VAR_0->info.shift;

        VAR_3 = audio_MIN (VAR_3, VAR_2);

    }

    return VAR_3;

}

static int FUNC_0 (HWVoiceIn *VAR_0)
{ NoVoiceIn *no = (NoVoiceIn *) VAR_0; int VAR_1 = audio_pcm_hw_get_live_in (VAR_0); int VAR_2 = VAR_0->VAR_3 - VAR_1; int VAR_3 = 0; if (VAR_2) { int64_t now = qemu_get_clock (vm_clock); int64_t ticks = now - no->old_ticks; int64_t bytes =
muldiv64 (ticks, VAR_0->info.bytes_per_second, get_ticks_per_sec ()); no->old_ticks = now; bytes = audio_MIN (bytes, INT_MAX); VAR_3 = bytes >> VAR_0->info.shift; VAR_3 = audio_MIN (VAR_3, VAR_2); } return VAR_3; }