'The implementation here is simple - just perform a pattern matching of all different architectures we support,
and then perform a vote.'

def _reconnoiter(self):

    strides = self.project.loader.main_object.memory.stride_repr
    votes = defaultdict(int)
    for arch in all_arches:
        regexes = set()
        for ins_regex in set(arch.function_prologs).union(arch.function_epilogs):
            r = re.compile(ins_regex)
            regexes.add(r)
        for (start_, _, data) in strides:
            for regex in regexes:
                for mo in regex.finditer(data):
                    position = (mo.start() + start_)
                    if ((position % arch.instruction_alignment) == 0):
                        votes[(arch.name, arch.memory_endness)] += 1
        l.debug('%s    %s    hits    %d    times', arch.name, arch.memory_endness, votes[(arch.name, arch.memory_endness)])
    (arch_name, endianness, hits) = sorted([(k[0], k[1], v) for (k, v) in votes.iteritems()], key=(lambda x: x[2]), reverse=True)[0]
    if (hits < (self.cookiesize * 2)):
        arch_name = 'DATA'
        endianness = ''
    self.arch = arch_name
    self.endianness = endianness
    self.votes = votes
    l.debug('The    architecture    should    be    %s    with    %s', self.arch, self.endianness)
