def parse_state_setup(setup):
    """Parse state setup to name, and tuples with parameters for step."""
    split = [part.split() for part in setup.split('\n')]
    name = split[0][-1][0]
    if_zero = (
        [param[-1][:-1] if param[-1][:-1].isalpha() else int(param[-1][0])
         for param in split[2:5]])
    if_one = (
        [param[-1][:-1] if param[-1][:-1].isalpha() else int(param[-1][0])
         for param in split[6:9]])
    return name, (if_zero, if_one)