def match_to_int(match):
    """Returns trace line number matches as integers for sorting.
    Maps other matches to negative integers.
    """
    # Hard coded string are necessary since each trace must have the address
    # accessed, which is printed before trace lines.
    if match == "use-after-poison" or match == "unknown-crash":
        return -2
    elif match == "READ":
        return -1
    # Cutting off non-integer part of match
    return int(match[1:-1])