# DigActivity_View_DigActivityPopupHelper_956.luac
; fn @DigActivityPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=32 consts=15 upvals=1 protos=5
;   K[0]='DigActivityPopupHelper'
;   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]='DigActivityPopupHelper'
;   K[11]='Init'
;   K[12]='_OnStateChanged'
;   K[13]='_OnSceneChange'
;   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('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('DigActivityPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('DigActivityPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('DigActivityPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('DigActivityPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('DigActivityPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('DigActivityPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('DigActivityPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('_OnSceneChange')] = R1
0028  GETTABUP  R0 = _ENV[K10('DigActivityPopupHelper')]
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]='DigActivityPopupHelper'
  ;   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('DigActivityPopupHelper')]
  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=24 consts=11 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='DigActivityDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   K[8]='EEventType'
  ;   K[9]='ChangeGameMode'
  ;   K[10]='_OnSceneChange'
  ;   upvals: _ENV
  ;   locals: self(0-24), (for generator)(7-16), (for state)(7-16), (for control)(7-16), _(8-14), activityDefinition(8-14)
  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('DigActivityDefinition')]
  0006  CALL      R1 = call(R1, 3 args, 1 rets)
  0007  JMP       (jump)   -> 14
  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  TFORCALL  tforcall R1
  0015  TFORLOOP  tforloop R3(sBx=-8)   -> 8
  0016  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0017  GETTABLE  R1 = R1[K5('AddListener')]
  0018  GETTABUP  R2 = _ENV[K8('EEventType')]
  0019  GETTABLE  R2 = R2[K9('ChangeGameMode')]
  0020  MOVE      R3 = R0
  0021  GETTABLE  R4 = R0[K10('_OnSceneChange')]
  0022  CALL      R1 = call(R1, 0 args, 3 rets)
  0023  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; fn ?  line 25-28 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 [_OnSceneChange] ----------
  ; fn ?  line 30-33 np=1 va=0 ms=5 code=22 consts=7 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='SceneManager'
  ;   K[2]='GetGameMode'
  ;   K[3]='EGameMode'
  ;   K[4]='Board'
  ;   K[5]='Main'
  ;   K[6]='SetNeedCheckPopup'
  ;   upvals: _ENV
  ;   locals: self(0-22), canPop(18-22)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('SceneManager')]
  0002  SELF      R2 = R1[K2('GetGameMode')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  GETTABUP  R2 = _ENV[K3('EGameMode')]
  0005  GETTABLE  R2 = R2[K4('Board')]
  0006  EQ        if R1 eq R2   -> -130550
  0007  JMP       (jump)   -> 17
  0008  GETTABUP  R1 = _ENV[K0('GM')]
  0009  GETTABLE  R1 = R1[K1('SceneManager')]
  0010  SELF      R2 = R1[K2('GetGameMode')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  GETTABUP  R2 = _ENV[K3('EGameMode')]
  0013  GETTABLE  R2 = R2[K5('Main')]
  0014  EQ        if R1 eq R2   -> -130542
  0015  JMP       (jump)   -> 17
  0016  LOADBOOL  R1 = false
  0017  LOADBOOL  R1 = true
  0018  SELF      R3 = R0[K6('SetNeedCheckPopup')] (self)
  0019  MOVE      R4 = R0
  0020  CALL      R2 = call(R2, 0 args, 2 rets)
  0021  RETURN    return R0..R-1
; ---------- proto4 [CheckPopup] ----------
  ; fn ?  line 35-62 np=1 va=0 ms=12 code=68 consts=13 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='DigActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Ended'
  ;   K[8]='HasWindowOpenedOnce'
  ;   K[9]='Started'
  ;   K[10]='HasFinishedAllRound'
  ;   K[11]='EndWindowPrefabName'
  ;   K[12]='StartWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-68), (for generator)(3-39), (for state)(3-39), (for control)(3-39), activityType(4-37), activityDefinition(4-37), args(7-37), model(12-37), state(14-37), (for generator)(42-67), (for state)(42-67), (for control)(42-67), activityType(43-65), activityDefinition(43-65), model(48-65), state(50-65)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('DigActivityDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 37
  0004  NEWTABLE  R6 = {} (1 items)
  0005  MOVE      R7 = R0
  0006  SETLIST   setlist R6[B=1,C=1]
  0007  GETTABUP  R7 = _ENV[K2('GM')]
  0008  GETTABLE  R7 = R7[K3('ActivityManager')]
  0009  SELF      R8 = R7[K4('GetModel')] (self)
  0010  MOVE      R9 = R0
  0011  CALL      R7 = call(R7, 1 args, 2 rets)
  0012  SELF      R9 = R7[K5('GetState')] (self)
  0013  CALL      R8 = call(R8, 1 args, 1 rets)
  0014  GETTABUP  R9 = _ENV[K6('ActivityState')]
  0015  GETTABLE  R9 = R9[K7('Ended')]
  0016  EQ        if R0 eq R9   -> -126949
  0017  JMP       (jump)   -> 37
  0018  SELF      R10 = R7[K8('HasWindowOpenedOnce')] (self)
  0019  GETTABUP  R11 = _ENV[K6('ActivityState')]
  0020  GETTABLE  R11 = R11[K7('Ended')]
  0021  CALL      R9 = call(R9, 1 args, 2 rets)
  0022  TEST      if not R9 then   -> -131047
  0023  JMP       (jump)   -> 37
  0024  SELF      R10 = R7[K8('HasWindowOpenedOnce')] (self)
  0025  GETTABUP  R11 = _ENV[K6('ActivityState')]
  0026  GETTABLE  R11 = R11[K9('Started')]
  0027  CALL      R9 = call(R9, 1 args, 2 rets)
  0028  TEST      if not R9 then   -> -131042
  0029  JMP       (jump)   -> 37
  0030  SELF      R10 = R7[K10('HasFinishedAllRound')] (self)
  0031  CALL      R9 = call(R9, 1 args, 1 rets)
  0032  TEST      if not R9 then   -> -131037
  0033  JMP       (jump)   -> 37
  0034  GETTABLE  R9 = R5[K11('EndWindowPrefabName')]
  0035  MOVE      R10 = R0
  0036  RETURN    return R9..R8
  0037  TFORCALL  tforcall R1
  0038  TFORLOOP  tforloop R3(sBx=-35)   -> 4
  0039  GETTABUP  R1 = _ENV[K0('pairs')]
  0040  GETTABUP  R2 = _ENV[K1('DigActivityDefinition')]
  0041  CALL      R1 = call(R1, 3 args, 1 rets)
  0042  JMP       (jump)   -> 65
  0043  GETTABUP  R6 = _ENV[K2('GM')]
  0044  GETTABLE  R6 = R6[K3('ActivityManager')]
  0045  SELF      R7 = R6[K4('GetModel')] (self)
  0046  MOVE      R8 = R0
  0047  CALL      R6 = call(R6, 1 args, 2 rets)
  0048  SELF      R8 = R6[K5('GetState')] (self)
  0049  CALL      R7 = call(R7, 1 args, 1 rets)
  0050  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0051  GETTABLE  R8 = R8[K9('Started')]
  0052  EQ        if R0 eq R8   -> -127426
  0053  JMP       (jump)   -> 65
  0054  SELF      R9 = R6[K8('HasWindowOpenedOnce')] (self)
  0055  GETTABUP  R10 = _ENV[K6('ActivityState')]
  0056  GETTABLE  R10 = R10[K9('Started')]
  0057  CALL      R8 = call(R8, 1 args, 2 rets)
  0058  TEST      if not R8 then   -> -131011
  0059  JMP       (jump)   -> 65
  0060  GETTABLE  R8 = R5[K12('StartWindowPrefabName')]
  0061  NEWTABLE  R9 = {} (1 items)
  0062  MOVE      R10 = R0
  0063  SETLIST   setlist R9[B=1,C=1]
  0064  RETURN    return R8..R7
  0065  TFORCALL  tforcall R1
  0066  TFORLOOP  tforloop R3(sBx=-24)   -> 43
  0067  RETURN    return R0..R-1
