# CoinRaceActivity_View_CoinRaceEntry_895.luac
; fn @CoinRaceEntry.lua  line 0-0 np=0 va=1 ms=3 code=24 consts=9 upvals=1 protos=5
;   K[0]='CoinRaceEntry'
;   K[1]='setmetatable'
;   K[2]='HudGeneralButton'
;   K[3]='__index'
;   K[4]='Init'
;   K[5]='OnDestroy'
;   K[6]='UpdatePerSecond'
;   K[7]='OnBtnClicked'
;   K[8]='_UpdateRankText'
;   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('CoinRaceEntry')] = R0
0005  GETTABUP  R0 = _ENV[K0('CoinRaceEntry')]
0006  GETTABUP  R1 = _ENV[K0('CoinRaceEntry')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('CoinRaceEntry')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Init')] = R1
0011  GETTABUP  R0 = _ENV[K0('CoinRaceEntry')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('OnDestroy')] = R1
0014  GETTABUP  R0 = _ENV[K0('CoinRaceEntry')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('UpdatePerSecond')] = R1
0017  GETTABUP  R0 = _ENV[K0('CoinRaceEntry')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K7('OnBtnClicked')] = R1
0020  GETTABUP  R0 = _ENV[K0('CoinRaceEntry')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K8('_UpdateRankText')] = R1
0023  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 4-26 np=2 va=0 ms=7 code=49 consts=23 upvals=1 protos=0
  ;   K[0]='m_model'
  ;   K[1]=nil
  ;   K[2]='m_activityType'
  ;   K[3]='GetType'
  ;   K[4]='m_activityDefinition'
  ;   K[5]='GetActivityDefinition'
  ;   K[6]='m_spineAnimation'
  ;   K[7]='Init'
  ;   K[8]='m_lastUpdateTime'
  ;   K[9]=0
  ;   K[10]='_UpdateRankText'
  ;   K[11]='UpdatePerSecond'
  ;   K[12]='EventDispatcher'
  ;   K[13]='AddListener'
  ;   K[14]='EEventType'
  ;   K[15]='ChangeGameModeFinished'
  ;   K[16]='AddHandlerAndRecordMap'
  ;   K[17]='event'
  ;   K[18]='RaceEventType'
  ;   K[19]='OpenMainWindow'
  ;   K[20]='obj'
  ;   K[21]='method'
  ;   K[22]='ScoreChanged'
  ;   upvals: _ENV
  ;   locals: self(0-49), model(0-49)
  0000  SETTABLE  R0[K0('m_model')] = R1
  0001  GETTABLE  R2 = R0[K0('m_model')]
  0002  EQ        if R0 eq K1(nil)   -> -129787
  0003  JMP       (jump)   -> 5
  0004  RETURN    return R0..R-1
  0005  GETTABLE  R2 = R0[K0('m_model')]
  0006  SELF      R3 = R2[K3('GetType')] (self)
  0007  CALL      R2 = call(R2, 1 args, 1 rets)
  0008  SETTABLE  R0[K2('m_activityType')] = R2
  0009  GETTABLE  R2 = R0[K0('m_model')]
  0010  SELF      R3 = R2[K5('GetActivityDefinition')] (self)
  0011  CALL      R2 = call(R2, 1 args, 1 rets)
  0012  SETTABLE  R0[K4('m_activityDefinition')] = R2
  0013  GETTABLE  R2 = R0[K6('m_spineAnimation')]
  0014  SELF      R3 = R2[K7('Init')] (self)
  0015  CALL      R2 = call(R2, 0 args, 1 rets)
  0016  SETTABLE  R0[K8('m_lastUpdateTime')] = K9(0)
  0017  SELF      R3 = R0[K10('_UpdateRankText')] (self)
  0018  CALL      R2 = call(R2, 0 args, 1 rets)
  0019  SELF      R3 = R0[K11('UpdatePerSecond')] (self)
  0020  CALL      R2 = call(R2, 0 args, 1 rets)
  0021  GETTABUP  R2 = _ENV[K12('EventDispatcher')]
  0022  GETTABLE  R2 = R2[K13('AddListener')]
  0023  GETTABUP  R3 = _ENV[K14('EEventType')]
  0024  GETTABLE  R3 = R3[K15('ChangeGameModeFinished')]
  0025  MOVE      R4 = R0
  0026  GETTABLE  R5 = R0[K10('_UpdateRankText')]
  0027  CALL      R2 = call(R2, 0 args, 3 rets)
  0028  GETTABUP  R2 = _ENV[K16('AddHandlerAndRecordMap')]
  0029  GETTABLE  R3 = R0[K0('m_model')]
  0030  GETTABLE  R3 = R3[K17('event')]
  0031  GETTABUP  R4 = _ENV[K18('RaceEventType')]
  0032  GETTABLE  R4 = R4[K19('OpenMainWindow')]
  0033  NEWTABLE  R5 = {} (0 items)
  0034  SETTABLE  R5[K20('obj')] = R0
  0035  GETTABLE  R6 = R0[K10('_UpdateRankText')]
  0036  SETTABLE  R5[K21('method')] = R6
  0037  CALL      R2 = call(R2, 0 args, 3 rets)
  0038  GETTABUP  R2 = _ENV[K16('AddHandlerAndRecordMap')]
  0039  GETTABLE  R3 = R0[K0('m_model')]
  0040  GETTABLE  R3 = R3[K17('event')]
  0041  GETTABUP  R4 = _ENV[K18('RaceEventType')]
  0042  GETTABLE  R4 = R4[K22('ScoreChanged')]
  0043  NEWTABLE  R5 = {} (0 items)
  0044  SETTABLE  R5[K20('obj')] = R0
  0045  GETTABLE  R6 = R0[K10('_UpdateRankText')]
  0046  SETTABLE  R5[K21('method')] = R6
  0047  CALL      R2 = call(R2, 0 args, 3 rets)
  0048  RETURN    return R0..R-1
; ---------- proto1 [OnDestroy] ----------
  ; fn ?  line 28-34 np=1 va=0 ms=4 code=17 consts=8 upvals=1 protos=0
  ;   K[0]='EventDispatcher'
  ;   K[1]='RemoveTarget'
  ;   K[2]='m_model'
  ;   K[3]=nil
  ;   K[4]='RemoveAllHandlers'
  ;   K[5]='event'
  ;   K[6]='HudGeneralButton'
  ;   K[7]='OnDestroy'
  ;   upvals: _ENV
  ;   locals: self(0-17)
  0000  GETTABUP  R1 = _ENV[K0('EventDispatcher')]
  0001  GETTABLE  R1 = R1[K1('RemoveTarget')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABLE  R1 = R0[K2('m_model')]
  0005  EQ        if R1 eq K3(nil)   -> -130294
  0006  JMP       (jump)   -> 12
  0007  GETTABUP  R1 = _ENV[K4('RemoveAllHandlers')]
  0008  GETTABLE  R2 = R0[K2('m_model')]
  0009  GETTABLE  R2 = R2[K5('event')]
  0010  MOVE      R3 = R0
  0011  CALL      R1 = call(R1, 0 args, 2 rets)
  0012  GETTABUP  R1 = _ENV[K6('HudGeneralButton')]
  0013  GETTABLE  R1 = R1[K7('OnDestroy')]
  0014  MOVE      R2 = R0
  0015  CALL      R1 = call(R1, 0 args, 1 rets)
  0016  RETURN    return R0..R-1
; ---------- proto2 [UpdatePerSecond] ----------
  ; fn ?  line 36-56 np=1 va=0 ms=9 code=47 consts=17 upvals=1 protos=0
  ;   K[0]='m_model'
  ;   K[1]=nil
  ;   K[2]='GetNextStateTime'
  ;   K[3]='GM'
  ;   K[4]='GameModel'
  ;   K[5]='GetServerTime'
  ;   K[6]='m_countDownText'
  ;   K[7]='text'
  ;   K[8]='TimeUtil'
  ;   K[9]='ParseTimeDescription'
  ;   K[10]=2
  ;   K[11]='gameObject'
  ;   K[12]='activeSelf'
  ;   K[13]='SetActive'
  ;   K[14]='m_lastUpdateTime'
  ;   K[15]=120
  ;   K[16]='_UpdateRankText'
  ;   upvals: _ENV
  ;   locals: self(0-47), nextTime(7-47), delta(17-26), serTime(39-47)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  EQ        if R0 eq K1(nil)   -> -130300
  0002  JMP       (jump)   -> 4
  0003  RETURN    return R0..R-1
  0004  GETTABLE  R1 = R0[K0('m_model')]
  0005  SELF      R2 = R1[K2('GetNextStateTime')] (self)
  0006  CALL      R1 = call(R1, 1 args, 1 rets)
  0007  EQ        if R1 eq K1(nil)   -> -130294
  0008  JMP       (jump)   -> 27
  0009  GETTABLE  R2 = R0[K0('m_model')]
  0010  SELF      R3 = R2[K2('GetNextStateTime')] (self)
  0011  CALL      R2 = call(R2, 1 args, 1 rets)
  0012  GETTABUP  R3 = _ENV[K3('GM')]
  0013  GETTABLE  R3 = R3[K4('GameModel')]
  0014  SELF      R4 = R3[K5('GetServerTime')] (self)
  0015  CALL      R3 = call(R3, 1 args, 1 rets)
  0016  SUB       R2 = R3 sub R2
  0017  GETTABLE  R3 = R0[K6('m_countDownText')]
  0018  GETTABUP  R4 = _ENV[K8('TimeUtil')]
  0019  GETTABLE  R4 = R4[K9('ParseTimeDescription')]
  0020  MOVE      R5 = R0
  0021  LOADK     R6 = K10 2
  0022  LOADBOOL  R7 = false
  0023  LOADBOOL  R8 = false
  0024  CALL      R4 = call(R4, 1 args, 4 rets)
  0025  SETTABLE  R3[K7('text')] = R4
  0026  JMP       (jump)   -> 35
  0027  GETTABLE  R2 = R0[K11('gameObject')]
  0028  GETTABLE  R2 = R2[K12('activeSelf')]
  0029  TEST      if not R2 then   -> -131041
  0030  JMP       (jump)   -> 35
  0031  GETTABLE  R2 = R0[K11('gameObject')]
  0032  SELF      R3 = R2[K13('SetActive')] (self)
  0033  LOADBOOL  R4 = false
  0034  CALL      R2 = call(R2, 0 args, 2 rets)
  0035  GETTABUP  R2 = _ENV[K3('GM')]
  0036  GETTABLE  R2 = R2[K4('GameModel')]
  0037  SELF      R3 = R2[K5('GetServerTime')] (self)
  0038  CALL      R2 = call(R2, 1 args, 1 rets)
  0039  GETTABLE  R3 = R0[K14('m_lastUpdateTime')]
  0040  SUB       R3 = R3 sub R2
  0041  LT        if R0 lt R3   -> 7726
  0042  JMP       (jump)   -> 46
  0043  SETTABLE  R0[K14('m_lastUpdateTime')] = R2
  0044  SELF      R4 = R0[K16('_UpdateRankText')] (self)
  0045  CALL      R3 = call(R3, 0 args, 1 rets)
  0046  RETURN    return R0..R-1
; ---------- proto3 [OnBtnClicked] ----------
  ; fn ?  line 58-72 np=1 va=0 ms=8 code=40 consts=13 upvals=1 protos=0
  ;   K[0]='m_model'
  ;   K[1]='GetState'
  ;   K[2]='ActivityState'
  ;   K[3]='Preparing'
  ;   K[4]='GM'
  ;   K[5]='UIManager'
  ;   K[6]='OpenView'
  ;   K[7]='m_activityDefinition'
  ;   K[8]='NoticeWindowPrefabName'
  ;   K[9]='m_activityType'
  ;   K[10]='Started'
  ;   K[11]='IsInRace'
  ;   K[12]='TryOpenMainWindow'
  ;   upvals: _ENV
  ;   locals: self(0-40), state(3-40)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  SELF      R2 = R1[K1('GetState')] (self)
  0002  CALL      R1 = call(R1, 1 args, 1 rets)
  0003  GETTABUP  R2 = _ENV[K2('ActivityState')]
  0004  GETTABLE  R2 = R2[K3('Preparing')]
  0005  EQ        if R0 eq R2   -> -130551
  0006  JMP       (jump)   -> 17
  0007  GETTABUP  R2 = _ENV[K4('GM')]
  0008  GETTABLE  R2 = R2[K5('UIManager')]
  0009  SELF      R3 = R2[K6('OpenView')] (self)
  0010  GETTABLE  R4 = R0[K7('m_activityDefinition')]
  0011  GETTABLE  R4 = R4[K8('NoticeWindowPrefabName')]
  0012  GETTABLE  R5 = R0[K9('m_activityType')]
  0013  LOADBOOL  R6 = false
  0014  LOADBOOL  R7 = false
  0015  CALL      R2 = call(R2, 0 args, 5 rets)
  0016  JMP       (jump)   -> 39
  0017  GETTABUP  R2 = _ENV[K2('ActivityState')]
  0018  GETTABLE  R2 = R2[K10('Started')]
  0019  EQ        if R0 eq R2   -> -130537
  0020  JMP       (jump)   -> 39
  0021  GETTABLE  R2 = R0[K0('m_model')]
  0022  SELF      R3 = R2[K11('IsInRace')] (self)
  0023  CALL      R2 = call(R2, 1 args, 1 rets)
  0024  TEST      if not R2 then   -> -131046
  0025  JMP       (jump)   -> 30
  0026  GETTABLE  R2 = R0[K0('m_model')]
  0027  SELF      R3 = R2[K12('TryOpenMainWindow')] (self)
  0028  CALL      R2 = call(R2, 0 args, 1 rets)
  0029  JMP       (jump)   -> 39
  0030  GETTABUP  R2 = _ENV[K4('GM')]
  0031  GETTABLE  R2 = R2[K5('UIManager')]
  0032  SELF      R3 = R2[K6('OpenView')] (self)
  0033  GETTABLE  R4 = R0[K7('m_activityDefinition')]
  0034  GETTABLE  R4 = R4[K8('NoticeWindowPrefabName')]
  0035  GETTABLE  R5 = R0[K9('m_activityType')]
  0036  LOADBOOL  R6 = false
  0037  LOADBOOL  R7 = true
  0038  CALL      R2 = call(R2, 0 args, 5 rets)
  0039  RETURN    return R0..R-1
; ---------- proto4 [_UpdateRankText] ----------
  ; fn ?  line 74-103 np=1 va=0 ms=7 code=51 consts=16 upvals=1 protos=0
  ;   K[0]='m_model'
  ;   K[1]=nil
  ;   K[2]='m_exclamationGo'
  ;   K[3]='SetActive'
  ;   K[4]='CanShowExclaimation'
  ;   K[5]='HasNetwork'
  ;   K[6]='IsInRace'
  ;   K[7]=1
  ;   K[8]='GetMyRank'
  ;   K[9]=0
  ;   K[10]='m_rank'
  ;   K[11]='m_spineAnimation'
  ;   K[12]='SetSkin'
  ;   K[13]='tostring'
  ;   K[14]='PlayAnimation'
  ;   K[15]='idle'
  ;   upvals: _ENV
  ;   locals: self(0-51), rank(28-51)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  EQ        if R0 eq K1(nil)   -> -130300
  0002  JMP       (jump)   -> 4
  0003  RETURN    return R0..R-1
  0004  GETTABLE  R1 = R0[K2('m_exclamationGo')]
  0005  SELF      R2 = R1[K3('SetActive')] (self)
  0006  GETTABLE  R3 = R0[K0('m_model')]
  0007  SELF      R4 = R3[K4('CanShowExclaimation')] (self)
  0008  CALL      R3 = call(R3, -1 args, 1 rets)
  0009  CALL      R1 = call(R1, 0 args, -1 rets)
  0010  GETTABLE  R1 = R0[K0('m_model')]
  0011  SELF      R2 = R1[K5('HasNetwork')] (self)
  0012  CALL      R1 = call(R1, 1 args, 1 rets)
  0013  TEST      if not R1 then   -> -131056
  0014  JMP       (jump)   -> 16
  0015  RETURN    return R0..R-1
  0016  GETTABLE  R1 = R0[K0('m_model')]
  0017  SELF      R2 = R1[K6('IsInRace')] (self)
  0018  CALL      R1 = call(R1, 1 args, 1 rets)
  0019  TEST      if not R1 then   -> -131050
  0020  JMP       (jump)   -> 24
  0021  LOADK     R1 = K7 1
  0022  TEST      if not R1 then   -> -131047
  0023  JMP       (jump)   -> 28
  0024  GETTABLE  R1 = R0[K0('m_model')]
  0025  SELF      R2 = R1[K8('GetMyRank')] (self)
  0026  LOADBOOL  R3 = true
  0027  CALL      R1 = call(R1, 1 args, 2 rets)
  0028  EQ        if R1 eq K1(nil)   -> -130273
  0029  JMP       (jump)   -> 35
  0030  EQ        if R1 eq K9(0)   -> -130263
  0031  JMP       (jump)   -> 35
  0032  GETTABLE  R2 = R0[K10('m_rank')]
  0033  EQ        if R0 eq R2   -> -130523
  0034  JMP       (jump)   -> 36
  0035  RETURN    return R0..R-1
  0036  GETTABLE  R2 = R0[K11('m_spineAnimation')]
  0037  SELF      R3 = R2[K12('SetSkin')] (self)
  0038  GETTABUP  R4 = _ENV[K13('tostring')]
  0039  MOVE      R5 = R0
  0040  CALL      R4 = call(R4, -1 args, 1 rets)
  0041  CALL      R2 = call(R2, 0 args, -1 rets)
  0042  GETTABLE  R2 = R0[K11('m_spineAnimation')]
  0043  SELF      R3 = R2[K14('PlayAnimation')] (self)
  0044  LOADK     R4 = K15 'idle'
  0045  LOADNIL   R5..R5 = nil
  0046  LOADBOOL  R6 = true
  0047  CALL      R2 = call(R2, 0 args, 4 rets)
  0048  SETTABLE  R0[K10('m_rank')] = R1
  0049  SETTABLE  R0[K10('m_rank')] = R1
  0050  RETURN    return R0..R-1
