# Path: utils.py
# def pairwise(iterable, trailing=True):
# def make_set(v):
# def set_union(*sets):
# def set_intersection(*sets):
# def natural_sort_key(s):
# def repr_stable_dict(d):
# def repr_stable_set(d):
# def repr_stable_seq(d):
# def repr_stable(v):


import sys
import argparse
import yaml
from utils import maybesorted

if args.output:
    out = open(args.output, "w")
else:
    out = sys.stdout


dup_set = set()


def index_by_name(db):
    for addr, props in list(db.items()):
        db[props["label"]] = props


def get_group(funcname):
    if funcname in IGNORE:
        return "_ignore_"
    for name, funcs in GROUPS.items():
        if funcname in funcs:
            return name


def map_group(funcname):
    return get_group(funcname) or funcname


def dump_level(func, props):
    if get_group(props["label"]):
        return

# Path: utils.py
# def pairwise(iterable, trailing=True):
# def make_set(v):
# def set_union(*sets):
# def set_intersection(*sets):
# def natural_sort_key(s):
# def repr_stable_dict(d):
# def repr_stable_set(d):
# def repr_stable_seq(d):
# def repr_stable(v):


# Path: funcdb_dot.py
import sys
import argparse
import yaml
from utils import maybesorted


if args.output:
    out = open(args.output, "w")
else:
    out = sys.stdout


dup_set = set()


def index_by_name(db):
    for addr, props in list(db.items()):
        db[props["label"]] = props


def get_group(funcname):
    if funcname in IGNORE:
        return "_ignore_"
    for name, funcs in GROUPS.items():
        if funcname in funcs:
            return name


def map_group(funcname):
    return get_group(funcname) or funcname


def dump_level(func, props):
    if get_group(props["label"]):
        return

    for propname in ("calls", "func_refs"):