gt:           if (localUpdateOp.cmd == 1)
context: package org.vidogram.messenger.support.widget;
  
  import android.support.v4.f.f.a;
  import android.support.v4.f.f.b;
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.List;
  
  class AdapterHelper
    implements OpReorderer.Callback
  {
    private static final boolean DEBUG = false;
    static final int POSITION_TYPE_INVISIBLE = 0;
    static final int POSITION_TYPE_NEW_OR_LAID_OUT = 1;
    private static final String TAG = "AHT";
    final Callback mCallback;
    final boolean mDisableRecycler;
    private int mExistingUpdateTypes = 0;
    Runnable mOnItemProcessedCallback;
    final OpReorderer mOpReorderer;
    final ArrayList<UpdateOp> mPendingUpdates = new ArrayList();
    final ArrayList<UpdateOp> mPostponedList = new ArrayList();
    private f.a<UpdateOp> mUpdateOpPool = new f.b(30);
  
    AdapterHelper(Callback paramCallback)
    {
      this(paramCallback, false);
    }
  
    AdapterHelper(Callback paramCallback, boolean paramBoolean)
    {
      this.mCallback = paramCallback;
      this.mDisableRecycler = paramBoolean;
      this.mOpReorderer = new OpReorderer(this);
    }
  
    private void applyAdd(UpdateOp paramUpdateOp)
    {
      postponeAndUpdateViewHolders(paramUpdateOp);
    }
  
    private void applyMove(UpdateOp paramUpdateOp)
    {
      postponeAndUpdateViewHolders(paramUpdateOp);
    }
  
    private void applyRemove(UpdateOp paramUpdateOp)
    {
      int i2 = paramUpdateOp.positionStart;
      int k = paramUpdateOp.positionStart + paramUpdateOp.itemCount;
      int j = -1;
      int i = paramUpdateOp.positionStart;
      int n = 0;
      if (i < k)
        if ((this.mCallback.findViewHolder(i) != null) || (canFindInPreLayout(i)))
        {
          if (j != 0)
            break label216;
          dispatchAndUpdateViewHolders(obtainUpdateOp(2, i2, n, null));
        }
      label211: label216: for (int m = 1; ; m = 0)
      {
        j = 1;
        if (m != 0)
        {
          m = i - n;
          i = k - n;
          k = 1;
          label97: n = k;
          k = i;
          i = m + 1;
          break;
          if (j != 1)
            break label211;
          postponeAndUpdateViewHolders(obtainUpdateOp(2, i2, n, null));
        }
        for (j = 1; ; j = 0)
        {
          int i1 = 0;
          m = j;
          j = i1;
          break;
          n += 1;
          m = i;
          i = k;
          k = n;
          break label97;
          UpdateOp localUpdateOp = paramUpdateOp;
          if (n != paramUpdateOp.itemCount)
          {
            recycleUpdateOp(paramUpdateOp);
            localUpdateOp = obtainUpdateOp(2, i2, n, null);
          }
          if (j == 0)
          {
            dispatchAndUpdateViewHolders(localUpdateOp);
            return;
          }
          postponeAndUpdateViewHolders(localUpdateOp);
          return;
        }
      }
    }
  
    private void applyUpdate(UpdateOp paramUpdateOp)
    {
      int k = paramUpdateOp.positionStart;
      int i2 = paramUpdateOp.positionStart;
      int i3 = paramUpdateOp.itemCount;
      int i = paramUpdateOp.positionStart;
      int i1 = -1;
      int j = 0;
      if (i < i2 + i3)
      {
        int m;
        int n;
        if ((this.mCallback.findViewHolder(i) != null) || (canFindInPreLayout(i)))
        {
          m = j;
          n = k;
          if (i1 == 0)
          {
            dispatchAndUpdateViewHolders(obtainUpdateOp(4, k, j, paramUpdateOp.payload));
            m = 0;
            n = i;
          }
          k = n;
        }
        for (j = 1; ; j = 0)
        {
          i += 1;
          m += 1;
          i1 = j;
          j = m;
          break;
          m = j;
          n = k;
          if (i1 == 1)
          {
            postponeAndUpdateViewHolders(obtainUpdateOp(4, k, j, paramUpdateOp.payload));
            m = 0;
            n = i;
          }
          k = n;
        }
      }
      Object localObject = paramUpdateOp;
      if (j != paramUpdateOp.itemCount)
      {
        localObject = paramUpdateOp.payload;
        recycleUpdateOp(paramUpdateOp);
        localObject = obtainUpdateOp(4, k, j, localObject);
      }
      if (i1 == 0)
      {
        dispatchAndUpdateViewHolders((UpdateOp)localObject);
        return;
      }
      postponeAndUpdateViewHolders((UpdateOp)localObject);
    }
  
    private boolean canFindInPreLayout(int paramInt)
    {
      int k = this.mPostponedList.size();
      int i = 0;
      while (i < k)
      {
        UpdateOp localUpdateOp = (UpdateOp)this.mPostponedList.get(i);
        if (localUpdateOp.cmd == 8)
        {
          if (findPositionOffset(localUpdateOp.itemCount, i + 1) == paramInt)
            return true;
        }
        else if (localUpdateOp.cmd == 1)
        {
          int m = localUpdateOp.positionStart;
          int n = localUpdateOp.itemCount;
          int j = localUpdateOp.positionStart;
          while (j < m + n)
          {
            if (findPositionOffset(j, i + 1) == paramInt)
              return true;
            j += 1;
          }
        }
        i += 1;
      }
      return false;
    }
  
    private void dispatchAndUpdateViewHolders(UpdateOp paramUpdateOp)
    {
      if ((paramUpdateOp.cmd == 1) || (paramUpdateOp.cmd == 8))
        throw new IllegalArgumentException("should not dispatch add or move for pre layout");
      int i1 = updatePositionWithPostponed(paramUpdateOp.positionStart, paramUpdateOp.cmd);
      int j = paramUpdateOp.positionStart;
      int k;
      int n;
      int m;
      label112: int i2;
      switch (paramUpdateOp.cmd)
      {
      case 3:
      default:
        throw new IllegalArgumentException("op should be remove or update." + paramUpdateOp);
      case 4:
        k = 1;
        n = 1;
        m = 1;
        if (m >= paramUpdateOp.itemCount)
          break label298;
        i2 = updatePositionWithPostponed(paramUpdateOp.positionStart + k * m, paramUpdateOp.cmd);
        switch (paramUpdateOp.cmd)
        {
        case 3:
        default:
          i = 0;
          label174: if (i == 0);
        case 4:
        case 2:
        }
      case 2:
      }
      for (int i = n + 1; ; i = n)
      {
        m += 1;
        n = i;
        break label112;
        k = 0;
        break;
        if (i2 == i1 + 1)
        {
          i = 1;
          break label174;
        }
        i = 0;
        break label174;
        if (i2 == i1)
        {
          i = 1;
          break label174;
        }
        i = 0;
        break label174;
        localObject = obtainUpdateOp(paramUpdateOp.cmd, i1, n, paramUpdateOp.payload);
        dispatchFirstPassAndUpdateViewHolders((UpdateOp)localObject, j);
        recycleUpdateOp((UpdateOp)localObject);
        i = j;
        if (paramUpdateOp.cmd == 4)
          i = j + n;
        n = 1;
        i1 = i2;
        j = i;
      }
      label298: Object localObject = paramUpdateOp.payload;
      recycleUpdateOp(paramUpdateOp);
      if (n > 0)
      {
        paramUpdateOp = obtainUpdateOp(paramUpdateOp.cmd, i1, n, localObject);
        dispatchFirstPassAndUpdateViewHolders(paramUpdateOp, j);
        recycleUpdateOp(paramUpdateOp);
      }
    }
  
    private void postponeAndUpdateViewHolders(UpdateOp paramUpdateOp)
    {
      this.mPostponedList.add(paramUpdateOp);
      switch (paramUpdateOp.cmd)
      {
      case 3:
      case 5:
      case 6:
      case 7:
      default:
        throw new IllegalArgumentException("Unknown update op type for " + paramUpdateOp);
      case 1:
        this.mCallback.offsetPositionsForAdd(paramUpdateOp.positionStart, paramUpdateOp.itemCount);
        return;
      case 8:
        this.mCallback.offsetPositionsForMove(paramUpdateOp.positionStart, paramUpdateOp.itemCount);
        return;
      case 2:
        this.mCallback.offsetPositionsForRemovingLaidOutOrNewView(paramUpdateOp.positionStart, paramUpdateOp.itemCount);
        return;
      case 4:
      }
      this.mCallback.markViewHoldersUpdated(paramUpdateOp.positionStart, paramUpdateOp.itemCount, paramUpdateOp.payload);
    }
  
    private int updatePositionWithPostponed(int paramInt1, int paramInt2)
    {
      int j = this.mPostponedList.size() - 1;
      UpdateOp localUpdateOp;
      if (j >= 0)
      {
        localUpdateOp = (UpdateOp)this.mPostponedList.get(j);
        int k;
        int i;
        if (localUpdateOp.cmd == 8)
          if (localUpdateOp.positionStart < localUpdateOp.itemCount)
          {
            k = localUpdateOp.positionStart;
            i = localUpdateOp.itemCount;
            label66: if ((paramInt1 < k) || (paramInt1 > i))
              break label201;
            if (k != localUpdateOp.positionStart)
              break label157;
            if (paramInt2 != 1)
              break label137;
            localUpdateOp.itemCount += 1;
            label104: paramInt1 += 1;
            label108: i = paramInt1;
          }
        while (true)
        {
          j -= 1;
          paramInt1 = i;
          break;
          k = localUpdateOp.itemCount;
          i = localUpdateOp.positionStart;
          break label66;
          label137: if (paramInt2 != 2)
            break label104;
          localUpdateOp.itemCount -= 1;
          break label104;
          label157: if (paramInt2 == 1)
            localUpdateOp.positionStart += 1;
          while (true)
          {
            paramInt1 -= 1;
            break;
            if (paramInt2 != 2)
              continue;
            localUpdateOp.positionStart -= 1;
          }
          label201: if (paramInt1 < localUpdateOp.positionStart)
          {
            if (paramInt2 == 1)
            {
              localUpdateOp.positionStart += 1;
              localUpdateOp.itemCount += 1;
              break label108;
            }
            if (paramInt2 == 2)
            {
              localUpdateOp.positionStart -= 1;
              localUpdateOp.itemCount -= 1;
            }
          }
          break label108;
          if (localUpdateOp.positionStart <= paramInt1)
          {
  