def optimizeJumps(irdata):
    # For jump offsets of more than +-32767, a longer form of the jump instruction
    # is required. This function finds the optimal jump widths by optimistically
    # starting with everything narrow and then iteratively marking instructions
    # as wide if their offset is too large (in rare cases, this can in turn cause
    # other jumps to become wide, hence iterating until convergence)
    instrs = irdata.flat_instructions
    jump_instrs = [ins for ins in instrs if isinstance(ins, ir.LazyJumpBase)]

    while 1:
        done = True
        posd, _ = _calcMinimumPositions(instrs)

        for ins in jump_instrs:
            if ins.min < ins.max and ins.widenIfNecessary(irdata.labels, posd):
                done = False
        if done:
            break

    for ins in jump_instrs:
        assert(ins.max <= ins.min)
        ins.max = ins.min
dataset/ETHPy150Open ajinabraham/Mobile-Security-Framework-MobSF/StaticAnalyzer/tools/enjarify/enjarify/jvm/optimization/jumps.py/optimizeJumps/swapped operands of `<=`