Example: pop_into_stk(-4)  BEFORE: A,B,C,D,TOS  AFTER: A,TOS
428711
void pop_into_stk( int x ) {
    assert x < 0;
    subRef(_ary[_sp+x], _key[_sp+x]);  // Nuke out old stuff
    subRef(_fcn[_sp+x]);
    _ary[_sp+x] = _ary[_sp-1];  // Copy without changing ref cnt
    _fcn[_sp+x] = _fcn[_sp-1];
    _d  [_sp+x] = _d  [_sp-1];
    _str[_sp+x] = _str[_sp-1];
    _sp--;  x++;                // Pop without changing ref cnt
    while( x++ < -1 ) pop();
  }
599806
function skipNewline(text, index, opts) {
  const backwards = opts && opts.backwards;
  if (index === false) {
    return false;
  }

  const atIndex = text.charAt(index);
  if (backwards) {
    if (text.charAt(index - 1) === "\r" && atIndex === "\n") {
      return index - 2;
    }
    if (
      atIndex === "\n" ||
      atIndex === "\r" ||
      atIndex === "\u2028" ||
      atIndex === "\u2029"
    ) {
      return index - 1;
    }
  } else {
    if (atIndex === "\r" && text.charAt(index + 1) === "\n") {
      return index + 2;
    }
    if (
      atIndex === "\n" ||
      atIndex === "\r" ||
      atIndex === "\u2028" ||
      atIndex === "\u2029"
    ) {
      return index + 1;
    }
  }

  return index;
}
1059872
def pout(*args, **kwargs):
    """"""
    if should_msg(kwargs.get("groups", ["normal"])):
        args = indent_text(*args, **kwargs)

        # write to stdout
        sys.stderr.write("".join(args))
        sys.stderr.write("\n")
8453
def _enter(ins):
    
    output = []

    if ins.quad[1] == '__fastcall__':
        return output

    output.append('push ix')
    output.append('ld ix, 0')
    output.append('add ix, sp')

    size_bytes = int(ins.quad[1])

    if size_bytes != 0:
        if size_bytes < 7:
            output.append('ld hl, 0')
            output.extend(['push hl'] * (size_bytes >> 1))

            if size_bytes % 2:  # odd?
                output.append('push hl')
                output.append('inc sp')
        else:
            output.append('ld hl, -%i' % size_bytes)  # "Pushes nn bytes"
            output.append('add hl, sp')
            output.append('ld sp, hl')
            output.append('ld (hl), 0')
            output.append('ld bc, %i' % (size_bytes - 1))
            output.append('ld d, h')
            output.append('ld e, l')
            output.append('inc de')
            output.append('ldir')  # Clear with ZEROs

    return output
924221
function(param_, test) {
  var param = param_.replace(/\s+/g, '')
    , cap;

  if (param === 'even') {
    param = '2n+0';
  } else if (param === 'odd') {
    param = '2n+1';
  } else if (param.indexOf('n') === -1) {
    param = '0n' + param;
  }

  cap = /^([+-])?(\d+)?n([+-])?(\d+)?$/.exec(param);

  return {
    group: cap[1] === '-'
      ? -(cap[2] || 1)
      : +(cap[2] || 1),
    offset: cap[4]
      ? (cap[3] === '-' ? -cap[4] : +cap[4])
      : 0
  };
}
1303406
function positionToOffset(str, desiredLine, desiredCol) {
    if (desiredLine === 1) {
        return desiredCol - 1;
    }
    let line = 1;
    let lastNewLineOffset = -1;
    do {
        if (desiredLine === line) {
            return lastNewLineOffset + 1 + desiredCol - 1;
        }
        lastNewLineOffset = str.indexOf('\n', lastNewLineOffset + 1);
        line++;
    } while (lastNewLineOffset >= 0);
    return -1;
}
1286575
def line_cont_after_delim(ctx, s, line_len=40, delim=(',',),
                          line_cont_token='&'):
    
    last = -1
    s = str(s)
    for i, t in enumerate(s):
        if t in delim:
            if i > line_len:
                if last == -1:
                    raise ValueError(
                        'No delimiter until already past line_len')
                i = last
                return s[:i+1] + line_cont_token + '\n ' + \
                    line_cont_after_delim(
                        ctx, s[i+1:], line_len, delim)
            last = i
    return s
573216
def nf_input_to_cl(inp):
    
    sep = " " if inp.get("separate") else ""
    val = "'%s'" % inp.get("default") if inp.get("default") else "$%s" % inp["name"]
    return "%s%s%s" % (inp["prefix"], sep, val)
224894
def split_pdb_residue(s):
    ''''''
    if s.isdigit():
        return (int(s), ' ')
    else:
        assert(s[:-1].isdigit())
        return ((s[:-1], s[-1]))
80267
def strip_bang(k)
      if k.is_a? Symbol
        k.to_s[0...-1].to_sym
      else
        k.to_s[0...-1]
      end
    end
1368719
def dec2bin(s):
    
    if not isinstance(s, int):
        num = int(s)
    else:
        num = s
    mid = []
    while True:
        if num == 0:
            break
        num, rem = divmod(num, 2)
        mid.append(base[rem])

    return ''.join([str(x) for x in mid[::-1]])
601766
def _clean_key_type(key_name, escape_char=ESCAPE_SEQ):
    

    for i in (2, 1):

        if len(key_name) < i:
            return None, key_name

        type_v = key_name[-i:]

        if type_v in _KEY_SPLIT:
            if len(key_name) <= i:
                return _KEY_SPLIT[type_v], ''

            esc_cnt = 0
            for pos in range(-i - 1, -len(key_name) - 1, -1):
                if key_name[pos] == escape_char:
                    esc_cnt += 1
                else:
                    break

            if esc_cnt % 2 == 0:
                return _KEY_SPLIT[type_v], key_name[:-i]
            else:
                return None, key_name

    return None, key_name
23175
def slice_to(self, s):
        '''
        
        '''
        result = ''
        if self.slice_check():
            result = self.current[self.bra:self.ket]
        return result
1239054
def switch_zeros_of_values(self):
        
        nb_sons = len(self.sons)
        # Need a list for assignment
        new_values = list(self.of_values)
        for i in [0, 1, 2]:
            if new_values[i] == '0':
                new_values[i] = str(nb_sons)
        self.of_values = tuple(new_values)
1196724
def remove_bad():
    
    for line in sys.stdin:
        parts = line.strip().split("\t")
        if len(parts) == 1 and len(line.strip().split()) > 1:
            parts = line.strip().split()
        if line.strip() and len(parts) > 2 and int(parts[2]) > int(parts[1]):
            sys.stdout.write("\t".join(parts) + "\n")
1047604
def _backward_delete_char(text, pos):
    """"""
    if pos == 0:
        return text, pos
    return text[:pos - 1] + text[pos:], pos - 1
714544
def skip_optional_do_after_expression
      skip_tkspace(false)
      tk = get_tk
      case tk
      when TkLPAREN, TkfLPAREN
        end_token = TkRPAREN
      else
        end_token = TkNL
      end

      nest = 0
      @scanner.instance_eval{@continue = false}

      loop do
        puts("\nWhile: #{tk}, #{@scanner.continue} " +
          "#{@scanner.lex_state} #{nest}") if $DEBUG
        case tk
        when TkSEMICOLON
          break
        when TkLPAREN, TkfLPAREN
          nest += 1
        when TkDO
          break if nest.zero?
        when end_token
          if end_token == TkRPAREN
            nest -= 1
            break if @scanner.lex_state == EXPR_END and nest.zero?
          else
            break unless @scanner.continue
          end
        end
        tk = get_tk
      end
      skip_tkspace(false)
      if peek_tk.kind_of? TkDO
        get_tk
      end
    end