# ExtraBoardBp_View_ExtraBoardBpActivityMainEntry_1597.luac
; fn @ExtraBoardBpActivityMainEntry.lua  line 0-0 np=0 va=1 ms=3 code=36 consts=13 upvals=1 protos=9
;   K[0]='ExtraBoardBpActivityMainEntry'
;   K[1]='setmetatable'
;   K[2]='HudGeneralButton'
;   K[3]='__index'
;   K[4]='Awake'
;   K[5]='Init'
;   K[6]='_InitModelData'
;   K[7]='_TryAddListeners'
;   K[8]='GetModel'
;   K[9]='OnBtnClicked'
;   K[10]='UpdatePerSecond'
;   K[11]='_OnStateChanged'
;   K[12]='_UpdateRedPoint'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('HudGeneralButton')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('ExtraBoardBpActivityMainEntry')] = R0
0005  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0006  GETTABUP  R1 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Awake')] = R1
0011  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('Init')] = R1
0014  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('_InitModelData')] = R1
0017  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K7('_TryAddListeners')] = R1
0020  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K8('GetModel')] = R1
0023  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0024  CLOSURE   R1 = closure proto5
0025  SETTABLE  R0[K9('OnBtnClicked')] = R1
0026  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0027  CLOSURE   R1 = closure proto6
0028  SETTABLE  R0[K10('UpdatePerSecond')] = R1
0029  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0030  CLOSURE   R1 = closure proto7
0031  SETTABLE  R0[K11('_OnStateChanged')] = R1
0032  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityMainEntry')]
0033  CLOSURE   R1 = closure proto8
0034  SETTABLE  R0[K12('_UpdateRedPoint')] = R1
0035  RETURN    return R0..R-1
; ---------- proto0 [Awake] ----------
  ; fn ?  line 10-15 np=1 va=0 ms=3 code=9 consts=4 upvals=1 protos=0
  ;   K[0]='HudGeneralButton'
  ;   K[1]='Awake'
  ;   K[2]='_InitModelData'
  ;   K[3]='_TryAddListeners'
  ;   upvals: _ENV
  ;   locals: self(0-9)
  0000  GETTABUP  R1 = _ENV[K0('HudGeneralButton')]
  0001  GETTABLE  R1 = R1[K1('Awake')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  SELF      R2 = R0[K2('_InitModelData')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  SELF      R2 = R0[K3('_TryAddListeners')] (self)
  0007  CALL      R1 = call(R1, 0 args, 1 rets)
  0008  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 18-25 np=2 va=0 ms=4 code=8 consts=4 upvals=0 protos=0
  ;   K[0]='m_model'
  ;   K[1]='_InitModelData'
  ;   K[2]='_TryAddListeners'
  ;   K[3]='UpdatePerSecond'
  ;   locals: self(0-8), model(0-8)
  0000  SETTABLE  R0[K0('m_model')] = R1
  0001  SELF      R3 = R0[K1('_InitModelData')] (self)
  0002  CALL      R2 = call(R2, 0 args, 1 rets)
  0003  SELF      R3 = R0[K2('_TryAddListeners')] (self)
  0004  CALL      R2 = call(R2, 0 args, 1 rets)
  0005  SELF      R3 = R0[K3('UpdatePerSecond')] (self)
  0006  CALL      R2 = call(R2, 0 args, 1 rets)
  0007  RETURN    return R0..R-1
; ---------- proto2 [_InitModelData] ----------
  ; fn ?  line 27-29 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='_UpdateRedPoint'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('_UpdateRedPoint')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto3 [_TryAddListeners] ----------
  ; fn ?  line 31-42 np=1 va=0 ms=7 code=36 consts=13 upvals=1 protos=0
  ;   K[0]='GetModel'
  ;   K[1]=nil
  ;   K[2]='gameObject'
  ;   K[3]='activeInHierarchy'
  ;   K[4]='GetActivityDefinition'
  ;   K[5]='EventDispatcher'
  ;   K[6]='AddListener'
  ;   K[7]='StateChangedEvent'
  ;   K[8]='_OnStateChanged'
  ;   K[9]='BuyTicketSuccessEvent'
  ;   K[10]='_UpdateRedPoint'
  ;   K[11]='QuestCompletedEvent'
  ;   K[12]='RewardAcquiredEvent'
  ;   upvals: _ENV
  ;   locals: self(0-36), model(2-36), activityDefinition(11-36)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  EQ        if R1 eq K1(nil)   -> -130299
  0003  JMP       (jump)   -> 8
  0004  GETTABLE  R2 = R0[K2('gameObject')]
  0005  GETTABLE  R2 = R2[K3('activeInHierarchy')]
  0006  TEST      if not R2 then   -> -131063
  0007  JMP       (jump)   -> 9
  0008  RETURN    return R0..R-1
  0009  SELF      R3 = R1[K4('GetActivityDefinition')] (self)
  0010  CALL      R2 = call(R2, 1 args, 1 rets)
  0011  GETTABUP  R3 = _ENV[K5('EventDispatcher')]
  0012  GETTABLE  R3 = R3[K6('AddListener')]
  0013  GETTABLE  R4 = R2[K7('StateChangedEvent')]
  0014  MOVE      R5 = R0
  0015  GETTABLE  R6 = R0[K8('_OnStateChanged')]
  0016  CALL      R3 = call(R3, 0 args, 3 rets)
  0017  GETTABUP  R3 = _ENV[K5('EventDispatcher')]
  0018  GETTABLE  R3 = R3[K6('AddListener')]
  0019  GETTABLE  R4 = R2[K9('BuyTicketSuccessEvent')]
  0020  MOVE      R5 = R0
  0021  GETTABLE  R6 = R0[K10('_UpdateRedPoint')]
  0022  CALL      R3 = call(R3, 0 args, 3 rets)
  0023  GETTABUP  R3 = _ENV[K5('EventDispatcher')]
  0024  GETTABLE  R3 = R3[K6('AddListener')]
  0025  GETTABLE  R4 = R2[K11('QuestCompletedEvent')]
  0026  MOVE      R5 = R0
  0027  GETTABLE  R6 = R0[K10('_UpdateRedPoint')]
  0028  CALL      R3 = call(R3, 0 args, 3 rets)
  0029  GETTABUP  R3 = _ENV[K5('EventDispatcher')]
  0030  GETTABLE  R3 = R3[K6('AddListener')]
  0031  GETTABLE  R4 = R2[K12('RewardAcquiredEvent')]
  0032  MOVE      R5 = R0
  0033  GETTABLE  R6 = R0[K10('_UpdateRedPoint')]
  0034  CALL      R3 = call(R3, 0 args, 3 rets)
  0035  RETURN    return R0..R-1
; ---------- proto4 [GetModel] ----------
  ; fn ?  line 44-46 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_model'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto5 [OnBtnClicked] ----------
  ; fn ?  line 48-50 np=1 va=0 ms=3 code=5 consts=2 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='OnEntryClicked'
  ;   locals: self(0-5)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('OnEntryClicked')] (self)
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  RETURN    return R0..R-1
; ---------- proto6 [UpdatePerSecond] ----------
  ; fn ?  line 53-67 np=1 va=0 ms=10 code=44 consts=18 upvals=1 protos=0
  ;   K[0]='GetModel'
  ;   K[1]=nil
  ;   K[2]='GetNextStateTime'
  ;   K[3]='GetState'
  ;   K[4]='ActivityState'
  ;   K[5]='Ended'
  ;   K[6]='Released'
  ;   K[7]='m_countDownText'
  ;   K[8]='text'
  ;   K[9]='GM'
  ;   K[10]='GameTextModel'
  ;   K[11]='GetText'
  ;   K[12]='countdown_finished'
  ;   K[13]='GameModel'
  ;   K[14]='GetServerTime'
  ;   K[15]='TimeUtil'
  ;   K[16]='ParseTimeDescription'
  ;   K[17]=2
  ;   upvals: _ENV
  ;   locals: self(0-44), model(2-44), nextStateTime(7-44), delta(34-43)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  EQ        if R0 eq K1(nil)   -> -130299
  0003  JMP       (jump)   -> 5
  0004  RETURN    return R0..R-1
  0005  SELF      R3 = R1[K2('GetNextStateTime')] (self)
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  SELF      R4 = R1[K3('GetState')] (self)
  0008  CALL      R3 = call(R3, 1 args, 1 rets)
  0009  GETTABUP  R4 = _ENV[K4('ActivityState')]
  0010  GETTABLE  R4 = R4[K5('Ended')]
  0011  EQ        if R1 eq R4   -> -129519
  0012  JMP       (jump)   -> 19
  0013  SELF      R4 = R1[K3('GetState')] (self)
  0014  CALL      R3 = call(R3, 1 args, 1 rets)
  0015  GETTABUP  R4 = _ENV[K4('ActivityState')]
  0016  GETTABLE  R4 = R4[K6('Released')]
  0017  EQ        if R0 eq R4   -> -129513
  0018  JMP       (jump)   -> 27
  0019  GETTABLE  R3 = R0[K7('m_countDownText')]
  0020  GETTABUP  R4 = _ENV[K9('GM')]
  0021  GETTABLE  R4 = R4[K10('GameTextModel')]
  0022  SELF      R5 = R4[K11('GetText')] (self)
  0023  LOADK     R6 = K12 'countdown_finished'
  0024  CALL      R4 = call(R4, 1 args, 2 rets)
  0025  SETTABLE  R3[K8('text')] = R4
  0026  JMP       (jump)   -> 43
  0027  EQ        if R1 eq K1(nil)   -> -129762
  0028  JMP       (jump)   -> 43
  0029  GETTABUP  R3 = _ENV[K9('GM')]
  0030  GETTABLE  R3 = R3[K13('GameModel')]
  0031  SELF      R4 = R3[K14('GetServerTime')] (self)
  0032  CALL      R3 = call(R3, 1 args, 1 rets)
  0033  SUB       R3 = R3 sub R2
  0034  GETTABLE  R4 = R0[K7('m_countDownText')]
  0035  GETTABUP  R5 = _ENV[K15('TimeUtil')]
  0036  GETTABLE  R5 = R5[K16('ParseTimeDescription')]
  0037  MOVE      R6 = R0
  0038  LOADK     R7 = K17 2
  0039  LOADBOOL  R8 = false
  0040  LOADBOOL  R9 = false
  0041  CALL      R5 = call(R5, 1 args, 4 rets)
  0042  SETTABLE  R4[K8('text')] = R5
  0043  RETURN    return R0..R-1
; ---------- proto7 [_OnStateChanged] ----------
  ; fn ?  line 69-71 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='_UpdateRedPoint'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('_UpdateRedPoint')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto8 [_UpdateRedPoint] ----------
  ; fn ?  line 73-84 np=1 va=0 ms=6 code=20 consts=9 upvals=1 protos=0
  ;   K[0]='GetModel'
  ;   K[1]=nil
  ;   K[2]='GetRedPointNum'
  ;   K[3]='UIUtil'
  ;   K[4]='SetActive'
  ;   K[5]='m_exclamationGo'
  ;   K[6]=0
  ;   K[7]='m_redPoinNumText'
  ;   K[8]='text'
  ;   upvals: _ENV
  ;   locals: self(0-20), model(2-20), redPointNum(7-20)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  EQ        if R0 eq K1(nil)   -> -130299
  0003  JMP       (jump)   -> 5
  0004  RETURN    return R0..R-1
  0005  SELF      R3 = R1[K2('GetRedPointNum')] (self)
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  GETTABUP  R3 = _ENV[K3('UIUtil')]
  0008  GETTABLE  R3 = R3[K4('SetActive')]
  0009  GETTABLE  R4 = R0[K5('m_exclamationGo')]
  0010  LT        if R1 lt R2   -> 3086
  0011  JMP       (jump)   -> 13
  0012  LOADBOOL  R5 = false
  0013  LOADBOOL  R5 = true
  0014  CALL      R3 = call(R3, 0 args, 2 rets)
  0015  LT        if R0 lt R2   -> 3091
  0016  JMP       (jump)   -> 19
  0017  GETTABLE  R3 = R0[K7('m_redPoinNumText')]
  0018  SETTABLE  R3[K8('text')] = R2
  0019  RETURN    return R0..R-1
