# BlockActivity_View_BlockPopupHelper_1523.luac
; fn @BlockPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=29 consts=14 upvals=1 protos=4
;   K[0]='BlockPopupHelper'
;   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]='BlockPopupHelper'
;   K[11]='Init'
;   K[12]='_OnStateChanged'
;   K[13]='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('BlockPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('BlockPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('BlockPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('BlockPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('BlockPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('BlockPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('BlockPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('CheckPopup')] = R1
0028  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 9-13 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='BlockPopupHelper'
  ;   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('BlockPopupHelper')]
  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 15-20 np=1 va=0 ms=10 code=17 consts=8 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='BlockActivityDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   upvals: _ENV
  ;   locals: self(0-17), (for generator)(7-16), (for state)(7-16), (for control)(7-16), _(8-14), definition(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('BlockActivityDefinition')]
  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  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; fn ?  line 22-24 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 26-53 np=1 va=0 ms=12 code=66 consts=16 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='BlockActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   K[8]='HasWindowOpenedOnce'
  ;   K[9]='StartWindowPrefabName'
  ;   K[10]='Ended'
  ;   K[11]='HasFinishedAllRound'
  ;   K[12]='GetBlockToken'
  ;   K[13]=0
  ;   K[14]='MainWindowPrefabName'
  ;   K[15]='EndWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-66), model(1-66), state(1-66), args(1-66), (for generator)(4-65), (for state)(4-65), (for control)(4-65), activityType(5-63), activityDefinition(5-63)
  0000  LOADNIL   R1..R1 = nil
  0001  GETTABUP  R4 = _ENV[K0('pairs')]
  0002  GETTABUP  R5 = _ENV[K1('BlockActivityDefinition')]
  0003  CALL      R4 = call(R4, 3 args, 1 rets)
  0004  JMP       (jump)   -> 63
  0005  GETTABUP  R9 = _ENV[K2('GM')]
  0006  GETTABLE  R9 = R9[K3('ActivityManager')]
  0007  SELF      R10 = R9[K4('GetModel')] (self)
  0008  MOVE      R11 = R0
  0009  CALL      R9 = call(R9, 1 args, 2 rets)
  0010  MOVE      R1 = R0
  0011  SELF      R10 = R1[K5('GetState')] (self)
  0012  CALL      R9 = call(R9, 1 args, 1 rets)
  0013  MOVE      R2 = R0
  0014  NEWTABLE  R9 = {} (1 items)
  0015  MOVE      R10 = R0
  0016  SETLIST   setlist R9[B=1,C=1]
  0017  MOVE      R3 = R0
  0018  GETTABUP  R9 = _ENV[K6('ActivityState')]
  0019  GETTABLE  R9 = R9[K7('Started')]
  0020  EQ        if R0 eq R9   -> -130017
  0021  JMP       (jump)   -> 32
  0022  SELF      R10 = R1[K8('HasWindowOpenedOnce')] (self)
  0023  GETTABUP  R11 = _ENV[K6('ActivityState')]
  0024  GETTABLE  R11 = R11[K7('Started')]
  0025  CALL      R9 = call(R9, 1 args, 2 rets)
  0026  TEST      if not R9 then   -> -131043
  0027  JMP       (jump)   -> 63
  0028  GETTABLE  R9 = R8[K9('StartWindowPrefabName')]
  0029  MOVE      R10 = R0
  0030  RETURN    return R9..R8
  0031  JMP       (jump)   -> 63
  0032  GETTABUP  R9 = _ENV[K6('ActivityState')]
  0033  GETTABLE  R9 = R9[K10('Ended')]
  0034  EQ        if R0 eq R9   -> -130003
  0035  JMP       (jump)   -> 63
  0036  SELF      R10 = R1[K8('HasWindowOpenedOnce')] (self)
  0037  GETTABUP  R11 = _ENV[K6('ActivityState')]
  0038  GETTABLE  R11 = R11[K7('Started')]
  0039  CALL      R9 = call(R9, 1 args, 2 rets)
  0040  TEST      if not R9 then   -> -131030
  0041  JMP       (jump)   -> 63
  0042  SELF      R10 = R1[K8('HasWindowOpenedOnce')] (self)
  0043  GETTABUP  R11 = _ENV[K6('ActivityState')]
  0044  GETTABLE  R11 = R11[K10('Ended')]
  0045  CALL      R9 = call(R9, 1 args, 2 rets)
  0046  TEST      if not R9 then   -> -131023
  0047  JMP       (jump)   -> 63
  0048  SELF      R10 = R1[K11('HasFinishedAllRound')] (self)
  0049  CALL      R9 = call(R9, 1 args, 1 rets)
  0050  TEST      if not R9 then   -> -131019
  0051  JMP       (jump)   -> 63
  0052  SELF      R10 = R1[K12('GetBlockToken')] (self)
  0053  CALL      R9 = call(R9, 1 args, 1 rets)
  0054  LT        if R0 lt R9   -> 6721
  0055  JMP       (jump)   -> 60
  0056  GETTABLE  R9 = R8[K14('MainWindowPrefabName')]
  0057  MOVE      R10 = R0
  0058  RETURN    return R9..R8
  0059  JMP       (jump)   -> 63
  0060  GETTABLE  R9 = R8[K15('EndWindowPrefabName')]
  0061  MOVE      R10 = R0
  0062  RETURN    return R9..R8
  0063  TFORCALL  tforcall R4
  0064  TFORLOOP  tforloop R6(sBx=-60)   -> 5
  0065  RETURN    return R0..R-1
