def get_function_addr(self, function_ea):
        if function_ea == -1:
            return

        f_start = function_ea
        f_end = self.proxy.GetFunctionAttr(function_ea, 4) #FUNCATTR_END)

        edges = set()
        boundaries = set((f_start,))

        for head in self.proxy.Heads(f_start, f_end):
            if self.proxy.isCode( self.proxy.GetFlags( head ) ):
                refs = self.proxy.CodeRefsFrom(head, 0)
                refs = set(filter(lambda x: f_start >= x and x<=f_end, refs))

                #print head, f_end, refs, self.proxy.GetMnem(head), self.proxy.GetOpnd(head, 0), self.proxy.GetOpnd(head, 1)

                if refs:
                    next_head = self.proxy.NextHead(head, f_end)
                    if self.proxy.isFlow(self.proxy.GetFlags(next_head)):
                        refs.add(next_head)

                    # Update the boundaries found so far.
                    boundaries.update(refs)

                    # For each of the references found, and edge is
                    # created.
                    for r in refs:
                    # If the flow could also come from the address
                    # previous to the destination of the branching
                    # an edge is created.
                        if self.proxy.isFlow(self.proxy.GetFlags(r)):
                            edges.add((self.proxy.PrevHead(r, f_start), r))
                        edges.add((head, r))


        #print edges, boundaries
        # Let's build the list of (startEA, startEA) couples
        # for each basic block
        sorted_boundaries = sorted(boundaries, reverse = True)
        end_addr = self.proxy.PrevHead(f_end, f_start)
        bb_addr = []
        for begin_addr in sorted_boundaries:
            bb_addr.append((begin_addr, end_addr))
            # search the next end_addr which could be
            # farther than just the previous head
            # if data are interlaced in the code
            # WARNING: it assumes it won't epicly fail ;)
            end_addr = self.proxy.PrevHead(begin_addr, f_start)
            while not self.proxy.isCode(self.proxy.GetFlags(end_addr)):
                end_addr = self.proxy.PrevHead(end_addr, f_start)
        # And finally return the result
        bb_addr.reverse()
        #print bb_addr, sorted(edges)
dataset/ETHPy150Open AndroBugs/AndroBugs_Framework/tools/modified/androguard/core/binaries/idapipe.py/IDAPipe.get_function_addr/swapped operands of `>=`