# FrameDecoActivity_View_FrameDecoActivityPopupHelper_1739.luac
; fn @FrameDecoActivityPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=29 consts=14 upvals=1 protos=4
;   K[0]='FrameDecoActivityPopupHelper'
;   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]='FrameDecoActivityPopupHelper'
;   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('FrameDecoActivityPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('FrameDecoActivityPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('FrameDecoActivityPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('FrameDecoActivityPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('FrameDecoActivityPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('FrameDecoActivityPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_SetNeedCheckPopup')] = R1
0025  GETTABUP  R0 = _ENV[K10('FrameDecoActivityPopupHelper')]
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]='FrameDecoActivityPopupHelper'
  ;   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('FrameDecoActivityPopupHelper')]
  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]='FrameDecoActivityDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_SetNeedCheckPopup'
  ;   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('FrameDecoActivityDefinition')]
  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('_SetNeedCheckPopup')]
  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 [_SetNeedCheckPopup] ----------
  ; 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-55 np=1 va=0 ms=14 code=83 consts=21 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='FrameDecoActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='GetId'
  ;   K[7]='ActivityState'
  ;   K[8]='Started'
  ;   K[9]='TutorialModel'
  ;   K[10]='TryPopupTargetTutorial'
  ;   K[11]='ETutorialId'
  ;   K[12]='FrameDecoStart'
  ;   K[13]='HasWindowOpenedOnce'
  ;   K[14]='StartWindowPrefabName'
  ;   K[15]='Ended'
  ;   K[16]='GetCurrentStage'
  ;   K[17]='HasClaimedAllRewards'
  ;   K[18]='CanClaimRewardsInStage'
  ;   K[19]='MainWindowPrefabName'
  ;   K[20]='EndWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-83), model(1-83), state(1-83), args(1-83), curStage(1-83), (for generator)(4-82), (for state)(4-82), (for control)(4-82), activityType(5-80), activityDefinition(5-80)
  0000  LOADNIL   R1..R1 = nil
  0001  GETTABUP  R5 = _ENV[K0('pairs')]
  0002  GETTABUP  R6 = _ENV[K1('FrameDecoActivityDefinition')]
  0003  CALL      R5 = call(R5, 3 args, 1 rets)
  0004  JMP       (jump)   -> 80
  0005  GETTABUP  R10 = _ENV[K2('GM')]
  0006  GETTABLE  R10 = R10[K3('ActivityManager')]
  0007  SELF      R11 = R10[K4('GetModel')] (self)
  0008  MOVE      R12 = R0
  0009  CALL      R10 = call(R10, 1 args, 2 rets)
  0010  MOVE      R1 = R0
  0011  SELF      R11 = R1[K5('GetState')] (self)
  0012  CALL      R10 = call(R10, 1 args, 1 rets)
  0013  MOVE      R2 = R0
  0014  NEWTABLE  R10 = {} (3 items)
  0015  MOVE      R11 = R0
  0016  SELF      R13 = R1[K6('GetId')] (self)
  0017  CALL      R12 = call(R12, 1 args, 1 rets)
  0018  LOADBOOL  R13 = true
  0019  SETLIST   setlist R10[B=1,C=3]
  0020  MOVE      R3 = R0
  0021  GETTABUP  R10 = _ENV[K7('ActivityState')]
  0022  GETTABLE  R10 = R10[K8('Started')]
  0023  EQ        if R0 eq R10   -> -130013
  0024  JMP       (jump)   -> 45
  0025  GETTABUP  R10 = _ENV[K2('GM')]
  0026  GETTABLE  R10 = R10[K9('TutorialModel')]
  0027  SELF      R11 = R10[K10('TryPopupTargetTutorial')] (self)
  0028  GETTABUP  R12 = _ENV[K11('ETutorialId')]
  0029  GETTABLE  R12 = R12[K12('FrameDecoStart')]
  0030  CALL      R10 = call(R10, 1 args, 2 rets)
  0031  TEST      if not R10 then   -> -131039
  0032  JMP       (jump)   -> 35
  0033  LOADBOOL  R10 = true
  0034  RETURN    return R10..R9
  0035  SELF      R11 = R1[K13('HasWindowOpenedOnce')] (self)
  0036  GETTABUP  R12 = _ENV[K7('ActivityState')]
  0037  GETTABLE  R12 = R12[K8('Started')]
  0038  CALL      R10 = call(R10, 1 args, 2 rets)
  0039  TEST      if not R10 then   -> -131030
  0040  JMP       (jump)   -> 80
  0041  GETTABLE  R10 = R9[K14('StartWindowPrefabName')]
  0042  MOVE      R11 = R0
  0043  RETURN    return R10..R9
  0044  JMP       (jump)   -> 80
  0045  GETTABUP  R10 = _ENV[K7('ActivityState')]
  0046  GETTABLE  R10 = R10[K15('Ended')]
  0047  EQ        if R0 eq R10   -> -129989
  0048  JMP       (jump)   -> 80
  0049  SELF      R11 = R1[K13('HasWindowOpenedOnce')] (self)
  0050  GETTABUP  R12 = _ENV[K7('ActivityState')]
  0051  GETTABLE  R12 = R12[K8('Started')]
  0052  CALL      R10 = call(R10, 1 args, 2 rets)
  0053  TEST      if not R10 then   -> -131017
  0054  JMP       (jump)   -> 80
  0055  SELF      R11 = R1[K13('HasWindowOpenedOnce')] (self)
  0056  GETTABUP  R12 = _ENV[K7('ActivityState')]
  0057  GETTABLE  R12 = R12[K15('Ended')]
  0058  CALL      R10 = call(R10, 1 args, 2 rets)
  0059  TEST      if not R10 then   -> -131010
  0060  JMP       (jump)   -> 80
  0061  SELF      R11 = R1[K16('GetCurrentStage')] (self)
  0062  CALL      R10 = call(R10, 1 args, 1 rets)
  0063  MOVE      R4 = R0
  0064  SELF      R11 = R1[K17('HasClaimedAllRewards')] (self)
  0065  CALL      R10 = call(R10, 1 args, 1 rets)
  0066  TEST      if not R10 then   -> -131003
  0067  JMP       (jump)   -> 77
  0068  SELF      R11 = R1[K18('CanClaimRewardsInStage')] (self)
  0069  MOVE      R12 = R0
  0070  CALL      R10 = call(R10, 1 args, 2 rets)
  0071  TEST      if not R10 then   -> -130999
  0072  JMP       (jump)   -> 77
  0073  GETTABLE  R10 = R9[K19('MainWindowPrefabName')]
  0074  MOVE      R11 = R0
  0075  RETURN    return R10..R9
  0076  JMP       (jump)   -> 80
  0077  GETTABLE  R10 = R9[K20('EndWindowPrefabName')]
  0078  MOVE      R11 = R0
  0079  RETURN    return R10..R9
  0080  TFORCALL  tforcall R5
  0081  TFORLOOP  tforloop R7(sBx=-77)   -> 5
  0082  RETURN    return R0..R-1
