# WeeklyRank_View_WeeklyRankPopupHelper_1236.luac
; fn @WeeklyRankPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=32 consts=15 upvals=1 protos=5
;   K[0]='WeeklyRankPopupHelper'
;   K[1]='setmetatable'
;   K[2]='canPopScene'
;   K[3]='EPopupScene'
;   K[4]='Board'
;   K[5]=true
;   K[6]='Main'
;   K[7]='BasePopupHelper'
;   K[8]='__index'
;   K[9]='Create'
;   K[10]='WeeklyRankPopupHelper'
;   K[11]='Init'
;   K[12]='_OnRankChanged'
;   K[13]='_OnStateChanged'
;   K[14]='CheckPopup'
;   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('Board')]
0005  SETTABLE  R2[R3] = K5(true)
0006  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0007  GETTABLE  R3 = R3[K6('Main')]
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('WeeklyRankPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('WeeklyRankPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('WeeklyRankPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('WeeklyRankPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('WeeklyRankPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('WeeklyRankPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnRankChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('WeeklyRankPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('_OnStateChanged')] = R1
0028  GETTABUP  R0 = _ENV[K10('WeeklyRankPopupHelper')]
0029  CLOSURE   R1 = closure proto4
0030  SETTABLE  R0[K14('CheckPopup')] = 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]='WeeklyRankPopupHelper'
  ;   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('WeeklyRankPopupHelper')]
  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=29 consts=11 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='WeeklyRankDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   K[8]='FullRankChangedEvent'
  ;   K[9]='_OnRankChanged'
  ;   K[10]='ScoreChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-29), (for generator)(7-28), (for state)(7-28), (for control)(7-28), _(8-26), activityDefinition(8-26)
  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('WeeklyRankDefinition')]
  0006  CALL      R1 = call(R1, 3 args, 1 rets)
  0007  JMP       (jump)   -> 26
  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('_OnStateChanged')]
  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('FullRankChangedEvent')]
  0017  MOVE      R8 = R0
  0018  GETTABLE  R9 = R0[K9('_OnRankChanged')]
  0019  CALL      R6 = call(R6, 0 args, 3 rets)
  0020  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0021  GETTABLE  R6 = R6[K5('AddListener')]
  0022  GETTABLE  R7 = R5[K10('ScoreChangedEvent')]
  0023  MOVE      R8 = R0
  0024  GETTABLE  R9 = R0[K7('_OnStateChanged')]
  0025  CALL      R6 = call(R6, 0 args, 3 rets)
  0026  TFORCALL  tforcall R1
  0027  TFORLOOP  tforloop R3(sBx=-20)   -> 8
  0028  RETURN    return R0..R-1
; ---------- proto2 [_OnRankChanged] ----------
  ; 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 [_OnStateChanged] ----------
  ; fn ?  line 29-31 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
; ---------- proto4 [CheckPopup] ----------
  ; fn ?  line 33-58 np=1 va=0 ms=13 code=95 consts=23 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='WeeklyRankDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   K[8]='IsInGroup'
  ;   K[9]='CanStartActivityInView'
  ;   K[10]='HasNetwork'
  ;   K[11]='CheckPassActivity'
  ;   K[12]='SceneManager'
  ;   K[13]='GetGameMode'
  ;   K[14]='EGameMode'
  ;   K[15]='Main'
  ;   K[16]='ChangeGameMode'
  ;   K[17]='MainWindowPrefabName'
  ;   K[18]='Ended'
  ;   K[19]='GetSettlementState'
  ;   K[20]='RankSettlementState'
  ;   K[21]='Finished'
  ;   K[22]='IsFinalRewardsTaken'
  ;   upvals: _ENV
  ;   locals: self(0-95), (for generator)(3-94), (for state)(3-94), (for control)(3-94), activityType(4-92), activityDefinition(4-92), model(9-92), state(11-92)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('WeeklyRankDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 92
  0004  GETTABUP  R6 = _ENV[K2('GM')]
  0005  GETTABLE  R6 = R6[K3('ActivityManager')]
  0006  SELF      R7 = R6[K4('GetModel')] (self)
  0007  MOVE      R8 = R0
  0008  CALL      R6 = call(R6, 1 args, 2 rets)
  0009  SELF      R8 = R6[K5('GetState')] (self)
  0010  CALL      R7 = call(R7, 1 args, 1 rets)
  0011  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0012  GETTABLE  R8 = R8[K7('Started')]
  0013  EQ        if R0 eq R8   -> -127465
  0014  JMP       (jump)   -> 53
  0015  SELF      R9 = R6[K8('IsInGroup')] (self)
  0016  CALL      R8 = call(R8, 1 args, 1 rets)
  0017  TEST      if not R8 then   -> -131052
  0018  JMP       (jump)   -> 92
  0019  SELF      R9 = R6[K9('CanStartActivityInView')] (self)
  0020  CALL      R8 = call(R8, 1 args, 1 rets)
  0021  TEST      if not R8 then   -> -131049
  0022  JMP       (jump)   -> 92
  0023  SELF      R9 = R6[K10('HasNetwork')] (self)
  0024  CALL      R8 = call(R8, 1 args, 1 rets)
  0025  TEST      if not R8 then   -> -131045
  0026  JMP       (jump)   -> 92
  0027  SELF      R9 = R6[K11('CheckPassActivity')] (self)
  0028  CALL      R8 = call(R8, 1 args, 1 rets)
  0029  TEST      if not R8 then   -> -131041
  0030  JMP       (jump)   -> 92
  0031  GETTABUP  R8 = _ENV[K2('GM')]
  0032  GETTABLE  R8 = R8[K12('SceneManager')]
  0033  SELF      R9 = R8[K13('GetGameMode')] (self)
  0034  CALL      R8 = call(R8, 1 args, 1 rets)
  0035  GETTABUP  R9 = _ENV[K14('EGameMode')]
  0036  GETTABLE  R9 = R9[K15('Main')]
  0037  EQ        if R1 eq R9   -> -126928
  0038  JMP       (jump)   -> 45
  0039  GETTABUP  R8 = _ENV[K2('GM')]
  0040  GETTABLE  R8 = R8[K12('SceneManager')]
  0041  SELF      R9 = R8[K16('ChangeGameMode')] (self)
  0042  GETTABUP  R10 = _ENV[K14('EGameMode')]
  0043  GETTABLE  R10 = R10[K15('Main')]
  0044  CALL      R8 = call(R8, 0 args, 2 rets)
  0045  GETTABLE  R8 = R5[K17('MainWindowPrefabName')]
  0046  NEWTABLE  R9 = {} (3 items)
  0047  MOVE      R10 = R0
  0048  LOADBOOL  R11 = false
  0049  LOADBOOL  R12 = false
  0050  SETLIST   setlist R9[B=1,C=3]
  0051  RETURN    return R8..R7
  0052  JMP       (jump)   -> 92
  0053  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0054  GETTABLE  R8 = R8[K18('Ended')]
  0055  EQ        if R0 eq R8   -> -127423
  0056  JMP       (jump)   -> 92
  0057  SELF      R9 = R6[K8('IsInGroup')] (self)
  0058  CALL      R8 = call(R8, 1 args, 1 rets)
  0059  TEST      if not R8 then   -> -131011
  0060  JMP       (jump)   -> 92
  0061  SELF      R9 = R6[K19('GetSettlementState')] (self)
  0062  CALL      R8 = call(R8, 1 args, 1 rets)
  0063  GETTABUP  R9 = _ENV[K20('RankSettlementState')]
  0064  GETTABLE  R9 = R9[K21('Finished')]
  0065  EQ        if R0 eq R9   -> -126900
  0066  JMP       (jump)   -> 92
  0067  SELF      R9 = R6[K22('IsFinalRewardsTaken')] (self)
  0068  CALL      R8 = call(R8, 1 args, 1 rets)
  0069  TEST      if not R8 then   -> -131000
  0070  JMP       (jump)   -> 92
  0071  GETTABUP  R8 = _ENV[K2('GM')]
  0072  GETTABLE  R8 = R8[K12('SceneManager')]
  0073  SELF      R9 = R8[K13('GetGameMode')] (self)
  0074  CALL      R8 = call(R8, 1 args, 1 rets)
  0075  GETTABUP  R9 = _ENV[K14('EGameMode')]
  0076  GETTABLE  R9 = R9[K15('Main')]
  0077  EQ        if R1 eq R9   -> -126888
  0078  JMP       (jump)   -> 85
  0079  GETTABUP  R8 = _ENV[K2('GM')]
  0080  GETTABLE  R8 = R8[K12('SceneManager')]
  0081  SELF      R9 = R8[K16('ChangeGameMode')] (self)
  0082  GETTABUP  R10 = _ENV[K14('EGameMode')]
  0083  GETTABLE  R10 = R10[K15('Main')]
  0084  CALL      R8 = call(R8, 0 args, 2 rets)
  0085  GETTABLE  R8 = R5[K17('MainWindowPrefabName')]
  0086  NEWTABLE  R9 = {} (3 items)
  0087  MOVE      R10 = R0
  0088  LOADBOOL  R11 = false
  0089  LOADBOOL  R12 = false
  0090  SETLIST   setlist R9[B=1,C=3]
  0091  RETURN    return R8..R7
  0092  TFORCALL  tforcall R1
  0093  TFORLOOP  tforloop R3(sBx=-90)   -> 4
  0094  RETURN    return R0..R-1
