def extract_include_paths(args):
    """
    Extract include paths from command-line arguments.
    Recognizes two argument "-I path" and one argument "-Ipath".
    """
    prefixes = ["-I", "-isystem"]

    include_paths = []
    prefix = ""
    for a in args:
        if a in prefixes:
            prefix = a
        elif prefix in prefixes:
            include_paths += [a]
            prefix = ""
        elif a[0:2] == "-I":
            include_paths += [a[2:]]
    return include_paths