<commit_before>
import logging

l = logging.getLogger('angr.analyses.disassembly_utils')

import capstone as cs

INS_GROUP_INFO = {
    'X86': {
        cs.x86.X86_GRP_CALL: 'call',
        cs.x86.X86_GRP_JUMP: 'branch',
        cs.x86.X86_GRP_RET: 'return',
    },
    'AMD64': {
        cs.x86.X86_GRP_CALL: 'call',
        cs.x86.X86_GRP_JUMP: 'branch',
        cs.x86.X86_GRP_RET: 'return',
    },
}

try:
    INS_GROUP_INFO['MIPS32'] = {
        cs.mips.MIPS_GRP_CALL: 'call',
        cs.mips.MIPS_GRP_JUMP: 'branch',
        cs.mips.MIPS_GRP_RET: 'return',
    }
except AttributeError:
    # The installed capstone is too old - it does not support cs.mips.MIPS_GRP_*
    l.warning('Your version of capstone does not support MIPS instruction groups.')


INS_INFO = {
    'MIPS32': {
        cs.mips.MIPS_INS_JAL: 'call',
        cs.mips.MIPS_INS_BAL: 'branch',
    }
}


def decode_instruction(arch, instr):
    # this is clearly architecture specific

    arch_name = arch.name

    insn_info = None

    info = INS_GROUP_INFO.get(arch_name, None)
    if info is not None:
        for group in instr.insn.insn.groups:<commit_msg>for the love of god be quiet about my version of capstone<commit_after>import capstone as cs
import logging

from ..misc.ux import once

l = logging.getLogger('angr.analyses.disassembly_utils')


INS_GROUP_INFO = {
    'X86': {
        cs.x86.X86_GRP_CALL: 'call',
        cs.x86.X86_GRP_JUMP: 'branch',
        cs.x86.X86_GRP_RET: 'return',
    },
    'AMD64': {
        cs.x86.X86_GRP_CALL: 'call',
        cs.x86.X86_GRP_JUMP: 'branch',
        cs.x86.X86_GRP_RET: 'return',
    },
}

try:
    INS_GROUP_INFO['MIPS32'] = {
        cs.mips.MIPS_GRP_CALL: 'call',
        cs.mips.MIPS_GRP_JUMP: 'branch',
        cs.mips.MIPS_GRP_RET: 'return',
    }
except AttributeError:
    # The installed capstone is too old - it does not support cs.mips.MIPS_GRP_*
    pass


INS_INFO = {
    'MIPS32': {
        cs.mips.MIPS_INS_JAL: 'call',
        cs.mips.MIPS_INS_BAL: 'branch',
    }
}


def decode_instruction(arch, instr):
    # this is clearly architecture specific

    arch_name = arch.name
    if arch_name == 'MIPS32' and once('mips-instruction-groups'):
        l.warning('Your version of capstone does not support MIPS instruction groups.')

    insn_info = None

    info = INS_GROUP_INFO.get(arch_name, None)
    if info is not None:
        for group in instr.insn.insn.groups:
{'fraction_non_alphanumeric': 0.11983471074380166, 'fraction_numerical': 0.02727272727272727, 'mean_word_length': 2.6905487804878048, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '345128', 'n_tokens_mistral': 981, 'n_tokens_neox': 898, 'n_words': 189}