def METHOD_NAME(ast):
    local_files = glob("../**/*.cpp", recursive=True) + \
                  glob("../**/*.h", recursive=True)
    for i in range(len(local_files)):
        local_files[i] = os.path.abspath(local_files[i])
    def make_abs(end_path):
        if end_path[0] != "/":
            for f in local_files:
                if f.endswith(end_path):
                    return f
        return end_path
    lines = []
    last_address = -1
    global_filename_id = 0
    global_filenames = []
    global_addresses = []
    for line in ast.lines:
        include_dirs = {}
        for inc in line.include_directories:
            include_dirs[inc.id] = inc.path
        filenames = {}
        for filename in line.file_names:
            prefix = ""
            if filename.dir_idx != 0:
                prefix = include_dirs[filename.dir_idx] + "/"
            filenames[filename.id] = global_filename_id
            global_filenames.append(make_abs(prefix+filename.filename))
            global_filename_id += 1
        for address, line_num, column, file_id in line.addresses:
            filename = global_filenames[filenames[file_id]]
            assert last_address <= address
            last_address = address
            if line_num != 0:
                global_addresses.append([address, line_num, filenames[file_id]])
    return ASRDebugLines(global_filenames, global_addresses)