# PairRaceActivity_View_PairRaceActivityBaseWindow_1833.luac
; fn @PairRaceActivityBaseWindow.lua  line 0-0 np=0 va=1 ms=3 code=29 consts=13 upvals=1 protos=6
;   K[0]='PairRaceActivityBaseWindow'
;   K[1]='setmetatable'
;   K[2]='m_bCloseWhenFinish'
;   K[3]=true
;   K[4]='m_bCheckBeforeOpen'
;   K[5]='BaseWindow'
;   K[6]='__index'
;   K[7]='BeforeOpenCheck'
;   K[8]='Init'
;   K[9]='UpdatePerSecond'
;   K[10]='_OnStateChanged'
;   K[11]='_IsModelIdChanged'
;   K[12]='IsActivityValid'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('m_bCloseWhenFinish')] = K3(true)
0003  SETTABLE  R1[K4('m_bCheckBeforeOpen')] = K3(true)
0004  GETTABUP  R2 = _ENV[K5('BaseWindow')]
0005  CALL      R0 = call(R0, 1 args, 2 rets)
0006  SETTABUP  _ENV[K0('PairRaceActivityBaseWindow')] = R0
0007  GETTABUP  R0 = _ENV[K0('PairRaceActivityBaseWindow')]
0008  GETTABUP  R1 = _ENV[K0('PairRaceActivityBaseWindow')]
0009  SETTABLE  R0[K6('__index')] = R1
0010  GETTABUP  R0 = _ENV[K0('PairRaceActivityBaseWindow')]
0011  CLOSURE   R1 = closure proto0
0012  SETTABLE  R0[K7('BeforeOpenCheck')] = R1
0013  GETTABUP  R0 = _ENV[K0('PairRaceActivityBaseWindow')]
0014  CLOSURE   R1 = closure proto1
0015  SETTABLE  R0[K8('Init')] = R1
0016  GETTABUP  R0 = _ENV[K0('PairRaceActivityBaseWindow')]
0017  CLOSURE   R1 = closure proto2
0018  SETTABLE  R0[K9('UpdatePerSecond')] = R1
0019  GETTABUP  R0 = _ENV[K0('PairRaceActivityBaseWindow')]
0020  CLOSURE   R1 = closure proto3
0021  SETTABLE  R0[K10('_OnStateChanged')] = R1
0022  GETTABUP  R0 = _ENV[K0('PairRaceActivityBaseWindow')]
0023  CLOSURE   R1 = closure proto4
0024  SETTABLE  R0[K11('_IsModelIdChanged')] = R1
0025  GETTABUP  R0 = _ENV[K0('PairRaceActivityBaseWindow')]
0026  CLOSURE   R1 = closure proto5
0027  SETTABLE  R0[K12('IsActivityValid')] = R1
0028  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 14-23 np=3 va=0 ms=7 code=30 consts=10 upvals=1 protos=0
  ;   K[0]='m_bCheckBeforeOpen'
  ;   K[1]='GM'
  ;   K[2]='ActivityManager'
  ;   K[3]='GetModel'
  ;   K[4]='GetState'
  ;   K[5]=nil
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   K[8]='Ended'
  ;   K[9]='GetId'
  ;   upvals: _ENV
  ;   locals: self(0-30), activityType(0-30), id(0-30), model(10-30), state(12-30)
  0000  GETTABLE  R3 = R0[K0('m_bCheckBeforeOpen')]
  0001  TEST      if not R3 then   -> -131068
  0002  JMP       (jump)   -> 5
  0003  LOADBOOL  R3 = true
  0004  RETURN    return R3..R2
  0005  GETTABUP  R3 = _ENV[K1('GM')]
  0006  GETTABLE  R3 = R3[K2('ActivityManager')]
  0007  SELF      R4 = R3[K3('GetModel')] (self)
  0008  MOVE      R5 = R0
  0009  CALL      R3 = call(R3, 1 args, 2 rets)
  0010  SELF      R5 = R3[K4('GetState')] (self)
  0011  CALL      R4 = call(R4, 1 args, 1 rets)
  0012  EQ        if R1 eq K5(nil)   -> -129261
  0013  JMP       (jump)   -> 26
  0014  GETTABUP  R5 = _ENV[K6('ActivityState')]
  0015  GETTABLE  R5 = R5[K7('Started')]
  0016  EQ        if R1 eq R5   -> -129001
  0017  JMP       (jump)   -> 22
  0018  GETTABUP  R5 = _ENV[K6('ActivityState')]
  0019  GETTABLE  R5 = R5[K8('Ended')]
  0020  EQ        if R0 eq R5   -> -128997
  0021  JMP       (jump)   -> 26
  0022  SELF      R6 = R3[K9('GetId')] (self)
  0023  CALL      R5 = call(R5, 1 args, 1 rets)
  0024  EQ        if R1 eq R2   -> -128484
  0025  JMP       (jump)   -> 27
  0026  LOADBOOL  R5 = false
  0027  LOADBOOL  R5 = true
  0028  RETURN    return R5..R4
  0029  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 25-39 np=4 va=0 ms=8 code=41 consts=22 upvals=1 protos=0
  ;   K[0]='m_activityType'
  ;   K[1]='m_model'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='m_id'
  ;   K[6]='m_activityDefinition'
  ;   K[7]='GetActivityDefinition'
  ;   K[8]='m_bCheckBeforeOpen'
  ;   K[9]='SetWindowOpened'
  ;   K[10]='LogWindowAction'
  ;   K[11]='EBIType'
  ;   K[12]='UIActionType'
  ;   K[13]='Open'
  ;   K[14]='EBIReferType'
  ;   K[15]='AutoPopup'
  ;   K[16]='UserClick'
  ;   K[17]='EventDispatcher'
  ;   K[18]='AddListener'
  ;   K[19]='StateChangedEvent'
  ;   K[20]='_OnStateChanged'
  ;   K[21]='UpdatePerSecond'
  ;   upvals: _ENV
  ;   locals: self(0-41), activityType(0-41), id(0-41), bAutoPop(0-41)
  0000  SETTABLE  R0[K0('m_activityType')] = R1
  0001  GETTABUP  R4 = _ENV[K2('GM')]
  0002  GETTABLE  R4 = R4[K3('ActivityManager')]
  0003  SELF      R5 = R4[K4('GetModel')] (self)
  0004  MOVE      R6 = R0
  0005  CALL      R4 = call(R4, 1 args, 2 rets)
  0006  SETTABLE  R0[K1('m_model')] = R4
  0007  SETTABLE  R0[K5('m_id')] = R2
  0008  GETTABLE  R4 = R0[K1('m_model')]
  0009  SELF      R5 = R4[K7('GetActivityDefinition')] (self)
  0010  CALL      R4 = call(R4, 1 args, 1 rets)
  0011  SETTABLE  R0[K6('m_activityDefinition')] = R4
  0012  GETTABLE  R4 = R0[K8('m_bCheckBeforeOpen')]
  0013  TEST      if not R4 then   -> -131057
  0014  JMP       (jump)   -> 18
  0015  GETTABLE  R4 = R0[K1('m_model')]
  0016  SELF      R5 = R4[K9('SetWindowOpened')] (self)
  0017  CALL      R4 = call(R4, 0 args, 1 rets)
  0018  SELF      R5 = R0[K10('LogWindowAction')] (self)
  0019  GETTABUP  R6 = _ENV[K11('EBIType')]
  0020  GETTABLE  R6 = R6[K12('UIActionType')]
  0021  GETTABLE  R6 = R6[K13('Open')]
  0022  TEST      if not R3 then   -> -131048
  0023  JMP       (jump)   -> 28
  0024  GETTABUP  R7 = _ENV[K14('EBIReferType')]
  0025  GETTABLE  R7 = R7[K15('AutoPopup')]
  0026  TEST      if not R7 then   -> -131043
  0027  JMP       (jump)   -> 30
  0028  GETTABUP  R7 = _ENV[K14('EBIReferType')]
  0029  GETTABLE  R7 = R7[K16('UserClick')]
  0030  CALL      R4 = call(R4, 0 args, 3 rets)
  0031  GETTABUP  R4 = _ENV[K17('EventDispatcher')]
  0032  GETTABLE  R4 = R4[K18('AddListener')]
  0033  GETTABLE  R5 = R0[K6('m_activityDefinition')]
  0034  GETTABLE  R5 = R5[K19('StateChangedEvent')]
  0035  MOVE      R6 = R0
  0036  GETTABLE  R7 = R0[K20('_OnStateChanged')]
  0037  CALL      R4 = call(R4, 0 args, 3 rets)
  0038  SELF      R5 = R0[K21('UpdatePerSecond')] (self)
  0039  CALL      R4 = call(R4, 0 args, 1 rets)
  0040  RETURN    return R0..R-1
; ---------- proto2 [UpdatePerSecond] ----------
  ; fn ?  line 41-51 np=1 va=0 ms=8 code=40 consts=19 upvals=1 protos=0
  ;   K[0]='UIUtil'
  ;   K[1]='IsEmptyComponent'
  ;   K[2]='m_countDownText'
  ;   K[3]='IsActivityValid'
  ;   K[4]='text'
  ;   K[5]='GM'
  ;   K[6]='GameTextModel'
  ;   K[7]='GetText'
  ;   K[8]='countdown_finished'
  ;   K[9]='math'
  ;   K[10]='max'
  ;   K[11]=0
  ;   K[12]='m_model'
  ;   K[13]='GetEndTime'
  ;   K[14]='GameModel'
  ;   K[15]='GetServerTime'
  ;   K[16]='TimeUtil'
  ;   K[17]='ParseTimeDescription'
  ;   K[18]=2
  ;   upvals: _ENV
  ;   locals: self(0-40), leftDuration(30-39)
  0000  GETTABUP  R1 = _ENV[K0('UIUtil')]
  0001  GETTABLE  R1 = R1[K1('IsEmptyComponent')]
  0002  GETTABLE  R2 = R0[K2('m_countDownText')]
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131065
  0005  JMP       (jump)   -> 39
  0006  SELF      R2 = R0[K3('IsActivityValid')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  TEST      if not R1 then   -> -131061
  0009  JMP       (jump)   -> 18
  0010  GETTABLE  R1 = R0[K2('m_countDownText')]
  0011  GETTABUP  R2 = _ENV[K5('GM')]
  0012  GETTABLE  R2 = R2[K6('GameTextModel')]
  0013  SELF      R3 = R2[K7('GetText')] (self)
  0014  LOADK     R4 = K8 'countdown_finished'
  0015  CALL      R2 = call(R2, 1 args, 2 rets)
  0016  SETTABLE  R1[K4('text')] = R2
  0017  JMP       (jump)   -> 39
  0018  GETTABUP  R1 = _ENV[K9('math')]
  0019  GETTABLE  R1 = R1[K10('max')]
  0020  LOADK     R2 = K11 0
  0021  GETTABLE  R3 = R0[K12('m_model')]
  0022  SELF      R4 = R3[K13('GetEndTime')] (self)
  0023  CALL      R3 = call(R3, 1 args, 1 rets)
  0024  GETTABUP  R4 = _ENV[K5('GM')]
  0025  GETTABLE  R4 = R4[K14('GameModel')]
  0026  SELF      R5 = R4[K15('GetServerTime')] (self)
  0027  CALL      R4 = call(R4, 1 args, 1 rets)
  0028  SUB       R3 = R4 sub R3
  0029  CALL      R1 = call(R1, 1 args, 2 rets)
  0030  GETTABLE  R2 = R0[K2('m_countDownText')]
  0031  GETTABUP  R3 = _ENV[K16('TimeUtil')]
  0032  GETTABLE  R3 = R3[K17('ParseTimeDescription')]
  0033  MOVE      R4 = R0
  0034  LOADK     R5 = K18 2
  0035  LOADBOOL  R6 = false
  0036  LOADBOOL  R7 = false
  0037  CALL      R3 = call(R3, 1 args, 4 rets)
  0038  SETTABLE  R2[K4('text')] = R3
  0039  RETURN    return R0..R-1
; ---------- proto3 [_OnStateChanged] ----------
  ; fn ?  line 53-55 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='Close'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('Close')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto4 [_IsModelIdChanged] ----------
  ; fn ?  line 57-59 np=1 va=0 ms=4 code=10 consts=3 upvals=0 protos=0
  ;   K[0]='m_id'
  ;   K[1]='m_model'
  ;   K[2]='GetId'
  ;   locals: self(0-10)
  0000  GETTABLE  R1 = R0[K0('m_id')]
  0001  GETTABLE  R2 = R0[K1('m_model')]
  0002  SELF      R3 = R2[K2('GetId')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  EQ        if R0 eq R2   -> -130552
  0005  JMP       (jump)   -> 7
  0006  LOADBOOL  R1 = false
  0007  LOADBOOL  R1 = true
  0008  RETURN    return R1..R0
  0009  RETURN    return R0..R-1
; ---------- proto5 [IsActivityValid] ----------
  ; fn ?  line 62-68 np=1 va=0 ms=3 code=15 consts=3 upvals=0 protos=0
  ;   K[0]='m_model'
  ;   K[1]='IsActivityOpen'
  ;   K[2]='_IsModelIdChanged'
  ;   locals: self(0-15)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  TEST      if not R1 then   -> -131068
  0002  JMP       (jump)   -> 5
  0003  LOADBOOL  R1 = false
  0004  RETURN    return R1..R0
  0005  GETTABLE  R1 = R0[K0('m_model')]
  0006  SELF      R2 = R1[K1('IsActivityOpen')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  TEST      if not R1 then   -> -131062
  0009  JMP       (jump)   -> 13
  0010  SELF      R2 = R0[K2('_IsModelIdChanged')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  NOT       R1 = not R0
  0013  RETURN    return R1..R0
  0014  RETURN    return R0..R-1
