# UI_SubView_TabView_TabView_344.luac
; fn @TabView.lua  line 0-0 np=0 va=1 ms=2 code=24 consts=8 upvals=1 protos=6
;   K[0]='TabView'
;   K[1]='__index'
;   K[2]='Init'
;   K[3]='OnTabButtonClicked'
;   K[4]='UpdateHighlightState'
;   K[5]='GetTabSize'
;   K[6]='GetTabButton'
;   K[7]='UpdateExclaimation'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('TabView')] = R0
0002  GETTABUP  R0 = _ENV[K0('TabView')]
0003  GETTABUP  R1 = _ENV[K0('TabView')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('TabView')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Init')] = R1
0008  GETTABUP  R0 = _ENV[K0('TabView')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('OnTabButtonClicked')] = R1
0011  GETTABUP  R0 = _ENV[K0('TabView')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('UpdateHighlightState')] = R1
0014  GETTABUP  R0 = _ENV[K0('TabView')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('GetTabSize')] = R1
0017  GETTABUP  R0 = _ENV[K0('TabView')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K6('GetTabButton')] = R1
0020  GETTABUP  R0 = _ENV[K0('TabView')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K7('UpdateExclaimation')] = R1
0023  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 7-24 np=4 va=0 ms=12 code=38 consts=12 upvals=1 protos=0
  ;   K[0]='m_callback'
  ;   K[1]='m_tipCallback'
  ;   K[2]='m_arrTabButtons'
  ;   K[3]='m_tabSize'
  ;   K[4]='tonumber'
  ;   K[5]='m_strTabSize'
  ;   K[6]=1
  ;   K[7]='m_tab'
  ;   K[8]='GetLuaTable'
  ;   K[9]='Init'
  ;   K[10]='OnTabButtonClicked'
  ;   K[11]='UpdateExclaimation'
  ;   upvals: _ENV
  ;   locals: self(0-38), tabButtonClickCallback(0-38), initTabKey(0-38), tipCallback(0-38), tabButton(9-38), (for index)(12-29), (for limit)(12-29), (for step)(12-29), index(13-28)
  0000  SETTABLE  R0[K0('m_callback')] = R1
  0001  SETTABLE  R0[K1('m_tipCallback')] = R3
  0002  NEWTABLE  R4 = {} (0 items)
  0003  SETTABLE  R0[K2('m_arrTabButtons')] = R4
  0004  GETTABUP  R4 = _ENV[K4('tonumber')]
  0005  GETTABLE  R5 = R0[K5('m_strTabSize')]
  0006  CALL      R4 = call(R4, 1 args, 1 rets)
  0007  SETTABLE  R0[K3('m_tabSize')] = R4
  0008  LOADNIL   R4..R4 = nil
  0009  LOADK     R5 = K6 1
  0010  GETTABLE  R6 = R0[K3('m_tabSize')]
  0011  LOADK     R7 = K6 1
  0012  FORPREP   forprep R5(sBx=15)   -> 28
  0013  LOADK     R9 = K7 'm_tab'
  0014  MOVE      R10 = R0
  0015  CONCAT    R9 = concat(R9..R9)
  0016  GETTABLE  R9 = R0[R9]
  0017  SELF      R10 = R9[K8('GetLuaTable')] (self)
  0018  CALL      R9 = call(R9, 1 args, 1 rets)
  0019  MOVE      R4 = R0
  0020  SELF      R10 = R4[K9('Init')] (self)
  0021  MOVE      R11 = R0
  0022  CALL      R9 = call(R9, 0 args, 2 rets)
  0023  GETTABLE  R9 = R0[K2('m_arrTabButtons')]
  0024  GETTABLE  R10 = R0[K2('m_arrTabButtons')]
  0025  LEN       R10 = len R0
  0026  ADD       R10 = K6(1) add R10
  0027  SETTABLE  R9[R10] = R4
  0028  FORLOOP   forloop R5(sBx=-16)   -> 13
  0029  SELF      R6 = R0[K10('OnTabButtonClicked')] (self)
  0030  MOVE      R7 = R0
  0031  CALL      R5 = call(R5, 0 args, 2 rets)
  0032  GETTABLE  R5 = R0[K1('m_tipCallback')]
  0033  TEST      if not R5 then   -> -131037
  0034  JMP       (jump)   -> 37
  0035  SELF      R6 = R0[K11('UpdateExclaimation')] (self)
  0036  CALL      R5 = call(R5, 0 args, 1 rets)
  0037  RETURN    return R0..R-1
; ---------- proto1 [OnTabButtonClicked] ----------
  ; fn ?  line 26-35 np=2 va=0 ms=4 code=10 consts=3 upvals=0 protos=0
  ;   K[0]='m_lastClickedTabkey'
  ;   K[1]='m_callback'
  ;   K[2]='UpdateHighlightState'
  ;   locals: self(0-10), tabKey(0-10)
  0000  SETTABLE  R0[K0('m_lastClickedTabkey')] = R1
  0001  GETTABLE  R2 = R0[K1('m_callback')]
  0002  MOVE      R3 = R0
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  TEST      if not R2 then   -> -131065
  0005  JMP       (jump)   -> 7
  0006  RETURN    return R0..R-1
  0007  SELF      R3 = R0[K2('UpdateHighlightState')] (self)
  0008  CALL      R2 = call(R2, 0 args, 1 rets)
  0009  RETURN    return R0..R-1
; ---------- proto2 [UpdateHighlightState] ----------
  ; fn ?  line 37-41 np=1 va=0 ms=10 code=16 consts=5 upvals=1 protos=0
  ;   K[0]='ipairs'
  ;   K[1]='m_arrTabButtons'
  ;   K[2]='SetHighlightActive'
  ;   K[3]='GetTabKey'
  ;   K[4]='m_lastClickedTabkey'
  ;   upvals: _ENV
  ;   locals: self(0-16), (for generator)(3-15), (for state)(3-15), (for control)(3-15), _(4-13), button(4-13)
  0000  GETTABUP  R1 = _ENV[K0('ipairs')]
  0001  GETTABLE  R2 = R0[K1('m_arrTabButtons')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 13
  0004  SELF      R7 = R5[K2('SetHighlightActive')] (self)
  0005  SELF      R9 = R5[K3('GetTabKey')] (self)
  0006  CALL      R8 = call(R8, 1 args, 1 rets)
  0007  GETTABLE  R9 = R0[K4('m_lastClickedTabkey')]
  0008  EQ        if R1 eq R9   -> -126957
  0009  JMP       (jump)   -> 11
  0010  LOADBOOL  R8 = false
  0011  LOADBOOL  R8 = true
  0012  CALL      R6 = call(R6, 0 args, 2 rets)
  0013  TFORCALL  tforcall R1
  0014  TFORLOOP  tforloop R3(sBx=-11)   -> 4
  0015  RETURN    return R0..R-1
; ---------- proto3 [GetTabSize] ----------
  ; fn ?  line 43-45 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_tabSize'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_tabSize')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto4 [GetTabButton] ----------
  ; fn ?  line 47-49 np=2 va=0 ms=4 code=8 consts=2 upvals=0 protos=0
  ;   K[0]='m_tab'
  ;   K[1]='GetLuaTable'
  ;   locals: self(0-8), index(0-8)
  0000  LOADK     R2 = K0 'm_tab'
  0001  MOVE      R3 = R0
  0002  CONCAT    R2 = concat(R2..R2)
  0003  GETTABLE  R2 = R0[R2]
  0004  SELF      R3 = R2[K1('GetLuaTable')] (self)
  0005  TAILCALL  tailcall(R2, 0)
  0006  RETURN    return R2..R1
  0007  RETURN    return R0..R-1
; ---------- proto5 [UpdateExclaimation] ----------
  ; fn ?  line 51-64 np=2 va=0 ms=11 code=30 consts=9 upvals=1 protos=0
  ;   K[0]='m_tipCallback'
  ;   K[1]='Log'
  ;   K[2]='Error'
  ;   K[3]='没有注册红点刷新函数'
  ;   K[4]=1
  ;   K[5]='m_tabSize'
  ;   K[6]='GetTabButton'
  ;   K[7]='GetTabKey'
  ;   K[8]='SetTipVisible'
  ;   upvals: _ENV
  ;   locals: self(0-30), tabKey(0-30), (for index)(11-29), (for limit)(11-29), (for step)(11-29), index(12-28), tabBtn(15-28), tipVisible(25-28)
  0000  GETTABLE  R2 = R0[K0('m_tipCallback')]
  0001  TEST      if not R2 then   -> -131068
  0002  JMP       (jump)   -> 8
  0003  GETTABUP  R2 = _ENV[K1('Log')]
  0004  GETTABLE  R2 = R2[K2('Error')]
  0005  LOADK     R3 = K3 '没有注册红点刷新函数'
  0006  CALL      R2 = call(R2, 0 args, 1 rets)
  0007  RETURN    return R0..R-1
  0008  LOADK     R2 = K4 1
  0009  GETTABLE  R3 = R0[K5('m_tabSize')]
  0010  LOADK     R4 = K4 1
  0011  FORPREP   forprep R2(sBx=16)   -> 28
  0012  SELF      R7 = R0[K6('GetTabButton')] (self)
  0013  MOVE      R8 = R0
  0014  CALL      R6 = call(R6, 1 args, 2 rets)
  0015  TEST      if not R1 then   -> -131055
  0016  JMP       (jump)   -> 21
  0017  SELF      R8 = R6[K7('GetTabKey')] (self)
  0018  CALL      R7 = call(R7, 1 args, 1 rets)
  0019  EQ        if R0 eq R1   -> -127466
  0020  JMP       (jump)   -> 28
  0021  GETTABLE  R7 = R0[K0('m_tipCallback')]
  0022  SELF      R9 = R6[K7('GetTabKey')] (self)
  0023  CALL      R8 = call(R8, -1 args, 1 rets)
  0024  CALL      R7 = call(R7, 1 args, -1 rets)
  0025  SELF      R9 = R6[K8('SetTipVisible')] (self)
  0026  MOVE      R10 = R0
  0027  CALL      R8 = call(R8, 0 args, 2 rets)
  0028  FORLOOP   forloop R2(sBx=-17)   -> 12
  0029  RETURN    return R0..R-1
