# RecipeCollectActivity_View_RecipeCollectActivityPopupHelper_1884.luac
; fn @RecipeCollectActivityPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=29 consts=14 upvals=1 protos=4
;   K[0]='RecipeCollectActivityPopupHelper'
;   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]='RecipeCollectActivityPopupHelper'
;   K[11]='Init'
;   K[12]='_SetNeedCheckPopup'
;   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('RecipeCollectActivityPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('RecipeCollectActivityPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('RecipeCollectActivityPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('RecipeCollectActivityPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_SetNeedCheckPopup')] = R1
0025  GETTABUP  R0 = _ENV[K10('RecipeCollectActivityPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('CheckPopup')] = R1
0028  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]='RecipeCollectActivityPopupHelper'
  ;   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('RecipeCollectActivityPopupHelper')]
  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]='RecipeCollectActivityDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_SetNeedCheckPopup'
  ;   K[8]='NewRecipeUnlockEvent'
  ;   K[9]='EEventType'
  ;   K[10]='ChangeGameMode'
  ;   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('RecipeCollectActivityDefinition')]
  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('NewRecipeUnlockEvent')]
  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('ChangeGameMode')]
  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-53 np=1 va=0 ms=11 code=71 consts=19 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='RecipeCollectActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   K[8]='SceneManager'
  ;   K[9]='GetGameMode'
  ;   K[10]='EGameMode'
  ;   K[11]='Board'
  ;   K[12]='CanTrigger'
  ;   K[13]='TryTrigger'
  ;   K[14]='OpenMainWindow'
  ;   K[15]='IsTriggered'
  ;   K[16]='HasWindowOpenedOnce'
  ;   K[17]='Ended'
  ;   K[18]='TryPopWindow'
  ;   upvals: _ENV
  ;   locals: self(0-71), (for generator)(3-68), (for state)(3-68), (for control)(3-68), activityType(4-66), definition(4-66), model(9-66), state(11-66)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('RecipeCollectActivityDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 66
  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)   -> 52
  0015  GETTABUP  R8 = _ENV[K2('GM')]
  0016  GETTABLE  R8 = R8[K8('SceneManager')]
  0017  SELF      R9 = R8[K9('GetGameMode')] (self)
  0018  CALL      R8 = call(R8, 1 args, 1 rets)
  0019  GETTABUP  R9 = _ENV[K10('EGameMode')]
  0020  GETTABLE  R9 = R9[K11('Board')]
  0021  EQ        if R0 eq R9   -> -126944
  0022  JMP       (jump)   -> 52
  0023  SELF      R9 = R6[K12('CanTrigger')] (self)
  0024  CALL      R8 = call(R8, 1 args, 1 rets)
  0025  TEST      if not R8 then   -> -131045
  0026  JMP       (jump)   -> 37
  0027  SELF      R9 = R6[K13('TryTrigger')] (self)
  0028  CALL      R8 = call(R8, 1 args, 1 rets)
  0029  TEST      if not R8 then   -> -131041
  0030  JMP       (jump)   -> 37
  0031  SELF      R9 = R6[K14('OpenMainWindow')] (self)
  0032  LOADBOOL  R10 = true
  0033  CALL      R8 = call(R8, 0 args, 2 rets)
  0034  LOADBOOL  R8 = true
  0035  RETURN    return R8..R7
  0036  JMP       (jump)   -> 52
  0037  SELF      R9 = R6[K15('IsTriggered')] (self)
  0038  CALL      R8 = call(R8, 1 args, 1 rets)
  0039  TEST      if not R8 then   -> -131031
  0040  JMP       (jump)   -> 52
  0041  SELF      R9 = R6[K16('HasWindowOpenedOnce')] (self)
  0042  GETTABUP  R10 = _ENV[K6('ActivityState')]
  0043  GETTABLE  R10 = R10[K7('Started')]
  0044  CALL      R8 = call(R8, 1 args, 2 rets)
  0045  TEST      if not R8 then   -> -131024
  0046  JMP       (jump)   -> 52
  0047  SELF      R9 = R6[K14('OpenMainWindow')] (self)
  0048  LOADBOOL  R10 = true
  0049  CALL      R8 = call(R8, 0 args, 2 rets)
  0050  LOADBOOL  R8 = true
  0051  RETURN    return R8..R7
  0052  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0053  GETTABLE  R8 = R8[K7('Started')]
  0054  EQ        if R1 eq R8   -> -127424
  0055  JMP       (jump)   -> 60
  0056  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0057  GETTABLE  R8 = R8[K17('Ended')]
  0058  EQ        if R0 eq R8   -> -127420
  0059  JMP       (jump)   -> 66
  0060  SELF      R9 = R6[K18('TryPopWindow')] (self)
  0061  CALL      R8 = call(R8, 1 args, 1 rets)
  0062  TEST      if not R8 then   -> -131008
  0063  JMP       (jump)   -> 66
  0064  LOADBOOL  R8 = true
  0065  RETURN    return R8..R7
  0066  TFORCALL  tforcall R1
  0067  TFORLOOP  tforloop R3(sBx=-64)   -> 4
  0068  LOADNIL   R1..R1 = nil
  0069  RETURN    return R1..R0
  0070  RETURN    return R0..R-1
