def single_step(s, x86_64=False):
    i = fetch_instruction(s, x86_64)
    if i is None:
        return []

    #if i.address == 0x400a78:
    #    raise InvalidWrite(s, 0xc01db33f, 0xc01db33f)

    # yes, this is not thread-safe. it should only be used for something like
    # selecting best path though, so it doesn't really matter/is fuzzy anyway.
    if i.address in _hit_count:
        hc = _hit_count[i.address] = _hit_count[i.address] + 1
    else:
        hc = _hit_count[i.address] = 1

    if i.address in s.symbols:
        symbol = s.symbols[i.address]
        if s.symbols[i.address] in s.function_hooks:
            ss = s.function_hooks[symbol](s)
            for s in ss:

                # any state needing more than 60 seconds in it's last solver
                # invocation needs to be concretised.
                if s.solver.solve_time() > 30:
                    s.log.warning('concretising (last solve took: {}s)', s.solver.solve_time)
                    s.solver.concretise()

                # remove temporary registers
                s.clear_il_state()

            return ss
        else:
            s.log.function_call(None, symbol)

    s.log.native_instruction(hc, i, x86_64)

    max_il_index = len(i.il_instructions)

    states = [s]
    exit_states = []

    while len(states) > 0:
        s = states.pop()

        if s.il_index >= max_il_index:

            # any state needing more than 60 seconds in it's last solver
            # invocation needs to be concretised.
            if s.solver.solve_time() > 30:
                s.log.warning('concretising (last solve took: {}s)'.format(s.solver.solve_time()))
                s.solver.concretise()

            # remove temporary registers
            s.clear_il_state()

            exit_states.append(s)
            continue

        ri = i.il_instructions[s.il_index]
        s.il_index += 1

        s.log.reil_instruction(ri)

        states += reil_single_step(ri, s)

    return exit_states
dataset/ETHPy150Open c01db33f/concolica/emulator.py/single_step/original