# LineRaceActivity_View_LineRaceActivityPopupHelper_1970.luac
; fn @LineRaceActivityPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=32 consts=15 upvals=1 protos=5
;   K[0]='LineRaceActivityPopupHelper'
;   K[1]='setmetatable'
;   K[2]='canPopScene'
;   K[3]='EPopupScene'
;   K[4]='Main'
;   K[5]=true
;   K[6]='Board'
;   K[7]='BasePopupHelper'
;   K[8]='__index'
;   K[9]='Create'
;   K[10]='LineRaceActivityPopupHelper'
;   K[11]='Init'
;   K[12]='_SetNeedCheckPopup'
;   K[13]='CheckPopup'
;   K[14]='_CanPopupDailyPopup'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  NEWTABLE  R2 = {} (0 items)
0003  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0004  GETTABLE  R3 = R3[K4('Main')]
0005  SETTABLE  R2[R3] = K5(true)
0006  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0007  GETTABLE  R3 = R3[K6('Board')]
0008  SETTABLE  R2[R3] = K5(true)
0009  SETTABLE  R1[K2('canPopScene')] = R2
0010  GETTABUP  R2 = _ENV[K7('BasePopupHelper')]
0011  CALL      R0 = call(R0, 1 args, 2 rets)
0012  SETTABUP  _ENV[K0('LineRaceActivityPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('LineRaceActivityPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('LineRaceActivityPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('LineRaceActivityPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('LineRaceActivityPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('LineRaceActivityPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_SetNeedCheckPopup')] = R1
0025  GETTABUP  R0 = _ENV[K10('LineRaceActivityPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('CheckPopup')] = R1
0028  GETTABUP  R0 = _ENV[K10('LineRaceActivityPopupHelper')]
0029  CLOSURE   R1 = closure proto4
0030  SETTABLE  R0[K14('_CanPopupDailyPopup')] = R1
0031  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 10-14 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='LineRaceActivityPopupHelper'
  ;   K[2]='Init'
  ;   upvals: _ENV
  ;   locals: helper(4-8)
  0000  GETTABUP  R0 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R1 = {} (0 items)
  0002  GETTABUP  R2 = _ENV[K1('LineRaceActivityPopupHelper')]
  0003  CALL      R0 = call(R0, 1 args, 2 rets)
  0004  SELF      R2 = R0[K2('Init')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
  0007  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 16-23 np=1 va=0 ms=10 code=30 consts=11 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='LineRaceActivityDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_SetNeedCheckPopup'
  ;   K[8]='FailEvent'
  ;   K[9]='EEventType'
  ;   K[10]='ActivityRaceCompleted'
  ;   upvals: _ENV
  ;   locals: self(0-30), (for generator)(7-22), (for state)(7-22), (for control)(7-22), _(8-20), definition(8-20)
  0000  GETTABUP  R1 = _ENV[K0('BasePopupHelper')]
  0001  GETTABLE  R1 = R1[K1('Init')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABUP  R1 = _ENV[K2('pairs')]
  0005  GETTABUP  R2 = _ENV[K3('LineRaceActivityDefinition')]
  0006  CALL      R1 = call(R1, 3 args, 1 rets)
  0007  JMP       (jump)   -> 20
  0008  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0009  GETTABLE  R6 = R6[K5('AddListener')]
  0010  GETTABLE  R7 = R5[K6('StateChangedEvent')]
  0011  MOVE      R8 = R0
  0012  GETTABLE  R9 = R0[K7('_SetNeedCheckPopup')]
  0013  CALL      R6 = call(R6, 0 args, 3 rets)
  0014  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0015  GETTABLE  R6 = R6[K5('AddListener')]
  0016  GETTABLE  R7 = R5[K8('FailEvent')]
  0017  MOVE      R8 = R0
  0018  GETTABLE  R9 = R0[K7('_SetNeedCheckPopup')]
  0019  CALL      R6 = call(R6, 0 args, 3 rets)
  0020  TFORCALL  tforcall R1
  0021  TFORLOOP  tforloop R3(sBx=-14)   -> 8
  0022  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0023  GETTABLE  R1 = R1[K5('AddListener')]
  0024  GETTABUP  R2 = _ENV[K9('EEventType')]
  0025  GETTABLE  R2 = R2[K10('ActivityRaceCompleted')]
  0026  MOVE      R3 = R0
  0027  GETTABLE  R4 = R0[K7('_SetNeedCheckPopup')]
  0028  CALL      R1 = call(R1, 0 args, 3 rets)
  0029  RETURN    return R0..R-1
; ---------- proto2 [_SetNeedCheckPopup] ----------
  ; fn ?  line 25-27 np=1 va=0 ms=4 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='SetNeedCheckPopup'
  ;   locals: self(0-4)
  0000  SELF      R2 = R0[K0('SetNeedCheckPopup')] (self)
  0001  LOADBOOL  R3 = true
  0002  CALL      R1 = call(R1, 0 args, 2 rets)
  0003  RETURN    return R0..R-1
; ---------- proto3 [CheckPopup] ----------
  ; fn ?  line 29-71 np=1 va=0 ms=12 code=113 consts=20 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='LineRaceActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetId'
  ;   K[6]='GetState'
  ;   K[7]='ActivityState'
  ;   K[8]='Started'
  ;   K[9]='HasWindowOpenedOnce'
  ;   K[10]='StartWindowPrefabName'
  ;   K[11]='NeedPopFailWindow'
  ;   K[12]='MainWindowPrefabName'
  ;   K[13]='_CanPopupDailyPopup'
  ;   K[14]='HasNetwork'
  ;   K[15]='CanClaimReward'
  ;   K[16]='Ended'
  ;   K[17]='TryCheckFail'
  ;   K[18]='IsEndWindowSkippedByAway'
  ;   K[19]='EndWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-113), model(1-113), args(1-113), (for generator)(4-112), (for state)(4-112), (for control)(4-112), activityType(5-110), definition(5-110), state(20-110)
  0000  LOADNIL   R1..R1 = nil
  0001  GETTABUP  R3 = _ENV[K0('pairs')]
  0002  GETTABUP  R4 = _ENV[K1('LineRaceActivityDefinition')]
  0003  CALL      R3 = call(R3, 3 args, 1 rets)
  0004  JMP       (jump)   -> 110
  0005  GETTABUP  R8 = _ENV[K2('GM')]
  0006  GETTABLE  R8 = R8[K3('ActivityManager')]
  0007  SELF      R9 = R8[K4('GetModel')] (self)
  0008  MOVE      R10 = R0
  0009  CALL      R8 = call(R8, 1 args, 2 rets)
  0010  MOVE      R1 = R0
  0011  NEWTABLE  R8 = {} (3 items)
  0012  MOVE      R9 = R0
  0013  SELF      R11 = R1[K5('GetId')] (self)
  0014  CALL      R10 = call(R10, 1 args, 1 rets)
  0015  LOADBOOL  R11 = true
  0016  SETLIST   setlist R8[B=1,C=3]
  0017  MOVE      R2 = R0
  0018  SELF      R9 = R1[K6('GetState')] (self)
  0019  CALL      R8 = call(R8, 1 args, 1 rets)
  0020  GETTABUP  R9 = _ENV[K7('ActivityState')]
  0021  GETTABLE  R9 = R9[K8('Started')]
  0022  EQ        if R0 eq R9   -> -126943
  0023  JMP       (jump)   -> 63
  0024  SELF      R10 = R1[K9('HasWindowOpenedOnce')] (self)
  0025  GETTABUP  R11 = _ENV[K7('ActivityState')]
  0026  GETTABLE  R11 = R11[K8('Started')]
  0027  CALL      R9 = call(R9, 1 args, 2 rets)
  0028  TEST      if not R9 then   -> -131041
  0029  JMP       (jump)   -> 34
  0030  GETTABLE  R9 = R7[K10('StartWindowPrefabName')]
  0031  MOVE      R10 = R0
  0032  RETURN    return R9..R8
  0033  JMP       (jump)   -> 110
  0034  SELF      R10 = R1[K11('NeedPopFailWindow')] (self)
  0035  CALL      R9 = call(R9, 1 args, 1 rets)
  0036  TEST      if not R9 then   -> -131034
  0037  JMP       (jump)   -> 42
  0038  GETTABLE  R9 = R7[K12('MainWindowPrefabName')]
  0039  MOVE      R10 = R0
  0040  RETURN    return R9..R8
  0041  JMP       (jump)   -> 110
  0042  SELF      R10 = R0[K13('_CanPopupDailyPopup')] (self)
  0043  MOVE      R11 = R0
  0044  CALL      R9 = call(R9, 1 args, 2 rets)
  0045  TEST      if not R9 then   -> -131025
  0046  JMP       (jump)   -> 51
  0047  GETTABLE  R9 = R7[K10('StartWindowPrefabName')]
  0048  MOVE      R10 = R0
  0049  RETURN    return R9..R8
  0050  JMP       (jump)   -> 110
  0051  SELF      R10 = R1[K14('HasNetwork')] (self)
  0052  CALL      R9 = call(R9, 1 args, 1 rets)
  0053  TEST      if not R9 then   -> -131017
  0054  JMP       (jump)   -> 110
  0055  SELF      R10 = R1[K15('CanClaimReward')] (self)
  0056  CALL      R9 = call(R9, 1 args, 1 rets)
  0057  TEST      if not R9 then   -> -131013
  0058  JMP       (jump)   -> 110
  0059  GETTABLE  R9 = R7[K12('MainWindowPrefabName')]
  0060  MOVE      R10 = R0
  0061  RETURN    return R9..R8
  0062  JMP       (jump)   -> 110
  0063  GETTABUP  R9 = _ENV[K7('ActivityState')]
  0064  GETTABLE  R9 = R9[K16('Ended')]
  0065  EQ        if R0 eq R9   -> -126900
  0066  JMP       (jump)   -> 110
  0067  SELF      R10 = R1[K9('HasWindowOpenedOnce')] (self)
  0068  GETTABUP  R11 = _ENV[K7('ActivityState')]
  0069  GETTABLE  R11 = R11[K8('Started')]
  0070  CALL      R9 = call(R9, 1 args, 2 rets)
  0071  TEST      if not R9 then   -> -130999
  0072  JMP       (jump)   -> 110
  0073  SELF      R10 = R1[K9('HasWindowOpenedOnce')] (self)
  0074  GETTABUP  R11 = _ENV[K7('ActivityState')]
  0075  GETTABLE  R11 = R11[K16('Ended')]
  0076  CALL      R9 = call(R9, 1 args, 2 rets)
  0077  TEST      if not R9 then   -> -130992
  0078  JMP       (jump)   -> 110
  0079  SELF      R10 = R1[K17('TryCheckFail')] (self)
  0080  CALL      R9 = call(R9, 0 args, 1 rets)
  0081  SELF      R10 = R1[K11('NeedPopFailWindow')] (self)
  0082  CALL      R9 = call(R9, 1 args, 1 rets)
  0083  TEST      if not R9 then   -> -130987
  0084  JMP       (jump)   -> 88
  0085  GETTABLE  R9 = R7[K12('MainWindowPrefabName')]
  0086  MOVE      R10 = R0
  0087  RETURN    return R9..R8
  0088  SELF      R10 = R1[K14('HasNetwork')] (self)
  0089  CALL      R9 = call(R9, 1 args, 1 rets)
  0090  TEST      if not R9 then   -> -130980
  0091  JMP       (jump)   -> 99
  0092  SELF      R10 = R1[K15('CanClaimReward')] (self)
  0093  CALL      R9 = call(R9, 1 args, 1 rets)
  0094  TEST      if not R9 then   -> -130976
  0095  JMP       (jump)   -> 99
  0096  GETTABLE  R9 = R7[K12('MainWindowPrefabName')]
  0097  MOVE      R10 = R0
  0098  RETURN    return R9..R8
  0099  SELF      R10 = R1[K15('CanClaimReward')] (self)
  0100  CALL      R9 = call(R9, 1 args, 1 rets)
  0101  TEST      if not R9 then   -> -130968
  0102  JMP       (jump)   -> 110
  0103  SELF      R10 = R1[K18('IsEndWindowSkippedByAway')] (self)
  0104  CALL      R9 = call(R9, 1 args, 1 rets)
  0105  TEST      if not R9 then   -> -130964
  0106  JMP       (jump)   -> 110
  0107  GETTABLE  R9 = R7[K19('EndWindowPrefabName')]
  0108  MOVE      R10 = R0
  0109  RETURN    return R9..R8
  0110  TFORCALL  tforcall R3
  0111  TFORLOOP  tforloop R5(sBx=-107)   -> 5
  0112  RETURN    return R0..R-1
; ---------- proto4 [_CanPopupDailyPopup] ----------
  ; fn ?  line 73-90 np=2 va=0 ms=6 code=33 consts=11 upvals=1 protos=0
  ;   K[0]='IsDeadline'
  ;   K[1]='IsInRace'
  ;   K[2]='GM'
  ;   K[3]='GameModel'
  ;   K[4]='GetServerTime'
  ;   K[5]='PlayerPrefs'
  ;   K[6]='GetInt'
  ;   K[7]='EPlayerPrefKey'
  ;   K[8]='LineRaceDailyOpenTime'
  ;   K[9]=0
  ;   K[10]='Sec2Day'
  ;   upvals: _ENV
  ;   locals: self(0-33), model(0-33), serverTime(16-33), openTime(22-33)
  0000  SELF      R3 = R1[K0('IsDeadline')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  TEST      if not R2 then   -> -131068
  0003  JMP       (jump)   -> 6
  0004  LOADBOOL  R2 = false
  0005  RETURN    return R2..R1
  0006  SELF      R3 = R1[K1('IsInRace')] (self)
  0007  CALL      R2 = call(R2, 1 args, 1 rets)
  0008  TEST      if not R2 then   -> -131062
  0009  JMP       (jump)   -> 12
  0010  LOADBOOL  R2 = false
  0011  RETURN    return R2..R1
  0012  GETTABUP  R2 = _ENV[K2('GM')]
  0013  GETTABLE  R2 = R2[K3('GameModel')]
  0014  SELF      R3 = R2[K4('GetServerTime')] (self)
  0015  CALL      R2 = call(R2, 1 args, 1 rets)
  0016  GETTABUP  R3 = _ENV[K5('PlayerPrefs')]
  0017  GETTABLE  R3 = R3[K6('GetInt')]
  0018  GETTABUP  R4 = _ENV[K7('EPlayerPrefKey')]
  0019  GETTABLE  R4 = R4[K8('LineRaceDailyOpenTime')]
  0020  LOADK     R5 = K9 0
  0021  CALL      R3 = call(R3, 1 args, 2 rets)
  0022  GETTABUP  R4 = _ENV[K10('Sec2Day')]
  0023  IDIV      R4 = R4 idiv R2
  0024  GETTABUP  R5 = _ENV[K10('Sec2Day')]
  0025  IDIV      R5 = R5 idiv R3
  0026  LT        if R0 lt R4   -> -128480
  0027  JMP       (jump)   -> 30
  0028  LOADBOOL  R4 = true
  0029  RETURN    return R4..R3
  0030  LOADBOOL  R4 = false
  0031  RETURN    return R4..R3
  0032  RETURN    return R0..R-1
