gt:         label54: paramList.set(paramInt2, paramUpdateOp1);
context: package org.vidogram.messenger.support.widget;
  
  import java.util.List;
  
  class OpReorderer
  {
    final Callback mCallback;
  
    public OpReorderer(Callback paramCallback)
    {
      this.mCallback = paramCallback;
    }
  
    private int getLastMoveOutOfOrder(List<AdapterHelper.UpdateOp> paramList)
    {
      int i = 0;
      int j = paramList.size() - 1;
      if (j >= 0)
      {
        if (((AdapterHelper.UpdateOp)paramList.get(j)).cmd == 8)
        {
          if (i == 0)
            break label50;
          return j;
        }
        i = 1;
      }
      label50: 
      while (true)
      {
        j -= 1;
        break;
        return -1;
      }
    }
  
    private void swapMoveAdd(List<AdapterHelper.UpdateOp> paramList, int paramInt1, AdapterHelper.UpdateOp paramUpdateOp1, int paramInt2, AdapterHelper.UpdateOp paramUpdateOp2)
    {
      int i = 0;
      if (paramUpdateOp1.itemCount < paramUpdateOp2.positionStart)
        i = -1;
      int j = i;
      if (paramUpdateOp1.positionStart < paramUpdateOp2.positionStart)
        j = i + 1;
      if (paramUpdateOp2.positionStart <= paramUpdateOp1.positionStart)
        paramUpdateOp1.positionStart += paramUpdateOp2.itemCount;
      if (paramUpdateOp2.positionStart <= paramUpdateOp1.itemCount)
        paramUpdateOp1.itemCount += paramUpdateOp2.itemCount;
      paramUpdateOp2.positionStart = (j + paramUpdateOp2.positionStart);
      paramList.set(paramInt1, paramUpdateOp2);
      paramList.set(paramInt2, paramUpdateOp1);
    }
  
    private void swapMoveOp(List<AdapterHelper.UpdateOp> paramList, int paramInt1, int paramInt2)
    {
      AdapterHelper.UpdateOp localUpdateOp1 = (AdapterHelper.UpdateOp)paramList.get(paramInt1);
      AdapterHelper.UpdateOp localUpdateOp2 = (AdapterHelper.UpdateOp)paramList.get(paramInt2);
      switch (localUpdateOp2.cmd)
      {
      case 3:
      default:
        return;
      case 2:
        swapMoveRemove(paramList, paramInt1, localUpdateOp1, paramInt2, localUpdateOp2);
        return;
      case 1:
        swapMoveAdd(paramList, paramInt1, localUpdateOp1, paramInt2, localUpdateOp2);
        return;
      case 4:
      }
      swapMoveUpdate(paramList, paramInt1, localUpdateOp1, paramInt2, localUpdateOp2);
    }
  
    void reorderOps(List<AdapterHelper.UpdateOp> paramList)
    {
      while (true)
      {
        int i = getLastMoveOutOfOrder(paramList);
        if (i == -1)
          break;
        swapMoveOp(paramList, i, i + 1);
      }
    }
  
    void swapMoveRemove(List<AdapterHelper.UpdateOp> paramList, int paramInt1, AdapterHelper.UpdateOp paramUpdateOp1, int paramInt2, AdapterHelper.UpdateOp paramUpdateOp2)
    {
      int j = 0;
      int i;
      if (paramUpdateOp1.positionStart < paramUpdateOp1.itemCount)
      {
        if ((paramUpdateOp2.positionStart != paramUpdateOp1.positionStart) || (paramUpdateOp2.itemCount != paramUpdateOp1.itemCount - paramUpdateOp1.positionStart))
          break label623;
        i = 1;
      }
      while (true)
      {
        label70: AdapterHelper.UpdateOp localUpdateOp;
        if (paramUpdateOp1.itemCount < paramUpdateOp2.positionStart)
        {
          paramUpdateOp2.positionStart -= 1;
          if (paramUpdateOp1.positionStart > paramUpdateOp2.positionStart)
            break label241;
          paramUpdateOp2.positionStart += 1;
          localUpdateOp = null;
        }
        while (true)
        {
          label97: if (i != 0)
          {
            paramList.set(paramInt1, paramUpdateOp2);
            paramList.remove(paramInt2);
            this.mCallback.recycleUpdateOp(paramUpdateOp1);
          }
          label596: label606: 
          while (true)
          {
            return;
            if ((paramUpdateOp2.positionStart != paramUpdateOp1.itemCount + 1) || (paramUpdateOp2.itemCount != paramUpdateOp1.positionStart - paramUpdateOp1.itemCount))
              break label614;
            j = 1;
            i = 1;
            break;
            if (paramUpdateOp1.itemCount >= paramUpdateOp2.positionStart + paramUpdateOp2.itemCount)
              break label70;
            paramUpdateOp2.itemCount -= 1;
            paramUpdateOp1.cmd = 2;
            paramUpdateOp1.itemCount = 1;
            if (paramUpdateOp2.itemCount != 0)
              continue;
            paramList.remove(paramInt2);
            this.mCallback.recycleUpdateOp(paramUpdateOp2);
            return;
            label241: if (paramUpdateOp1.positionStart >= paramUpdateOp2.positionStart + paramUpdateOp2.itemCount)
              break label608;
            int k = paramUpdateOp2.positionStart;
            int m = paramUpdateOp2.itemCount;
            int n = paramUpdateOp1.positionStart;
            localUpdateOp = this.mCallback.obtainUpdateOp(2, paramUpdateOp1.positionStart + 1, k + m - n, null);
            paramUpdateOp2.itemCount = (paramUpdateOp1.positionStart - paramUpdateOp2.positionStart);
            break label97;
            if (j != 0)
            {
              if (localUpdateOp != null)
              {
                if (paramUpdateOp1.positionStart > localUpdateOp.positionStart)
                  paramUpdateOp1.positionStart -= localUpdateOp.itemCount;
                if (paramUpdateOp1.itemCount > localUpdateOp.positionStart)
                  paramUpdateOp1.itemCount -= localUpdateOp.itemCount;
              }
              if (paramUpdateOp1.positionStart > paramUpdateOp2.positionStart)
                paramUpdateOp1.positionStart -= paramUpdateOp2.itemCount;
              if (paramUpdateOp1.itemCount > paramUpdateOp2.positionStart)
                paramUpdateOp1.itemCount -= paramUpdateOp2.itemCount;
              paramList.set(paramInt1, paramUpdateOp2);
              if (paramUpdateOp1.positionStart == paramUpdateOp1.itemCount)
                break label596;
              paramList.set(paramInt2, paramUpdateOp1);
            }
            while (true)
            {
              if (localUpdateOp == null)
                break label606;
              paramList.add(paramInt1, localUpdateOp);
              return;
              if (localUpdateOp != null)
              {
                if (paramUpdateOp1.positionStart >= localUpdateOp.positionStart)
                  paramUpdateOp1.positionStart -= localUpdateOp.itemCount;
                if (paramUpdateOp1.itemCount >= localUpdateOp.positionStart)
                  paramUpdateOp1.itemCount -= localUpdateOp.itemCount;
              }
              if (paramUpdateOp1.positionStart >= paramUpdateOp2.positionStart)
                paramUpdateOp1.positionStart -= paramUpdateOp2.itemCount;
              if (paramUpdateOp1.itemCount < paramUpdateOp2.positionStart)
                break;
              paramUpdateOp1.itemCount -= paramUpdateOp2.itemCount;
              break;
              paramList.remove(paramInt2);
            }
          }
          label608: localUpdateOp = null;
        }
        label614: i = 0;
        j = 1;
        continue;
        label623: i = 0;
      }
    }
  
    void swapMoveUpdate(List<AdapterHelper.UpdateOp> paramList, int paramInt1, AdapterHelper.UpdateOp paramUpdateOp1, int paramInt2, AdapterHelper.UpdateOp paramUpdateOp2)
    {
      Object localObject2 = null;
      Object localObject1;
      if (paramUpdateOp1.itemCount < paramUpdateOp2.positionStart)
      {
        paramUpdateOp2.positionStart -= 1;
        localObject1 = null;
      }
      while (true)
      {
        if (paramUpdateOp1.positionStart <= paramUpdateOp2.positionStart)
        {
          paramUpdateOp2.positionStart += 1;
  