# ProgressActivity_Model_ProgressActivityPopupHelper_967.luac
; fn @ProgressActivityPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=46 consts=18 upvals=1 protos=7
;   K[0]='ProgressActivityPopupHelper'
;   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]='ProgressActivityPopupHelper'
;   K[11]='Init'
;   K[12]='_OnStateChanged'
;   K[13]='_OnScoreChanged'
;   K[14]='CheckPopup'
;   K[15]='ProgressActivityRewardPopupHelper'
;   K[16]='setmetatable'
;   K[17]='ProgressActivityRewardPopupHelper'
;   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('ProgressActivityPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('ProgressActivityPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('ProgressActivityPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('ProgressActivityPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('ProgressActivityPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('ProgressActivityPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('ProgressActivityPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('_OnScoreChanged')] = R1
0028  GETTABUP  R0 = _ENV[K10('ProgressActivityPopupHelper')]
0029  CLOSURE   R1 = closure proto4
0030  SETTABLE  R0[K14('CheckPopup')] = R1
0031  GETTABUP  R0 = _ENV[K16('setmetatable')]
0032  NEWTABLE  R1 = {} (0 items)
0033  GETTABUP  R2 = _ENV[K10('ProgressActivityPopupHelper')]
0034  CALL      R0 = call(R0, 1 args, 2 rets)
0035  SETTABUP  _ENV[K15('ProgressActivityRewardPopupHelper')] = R0
0036  GETTABUP  R0 = _ENV[K15('ProgressActivityRewardPopupHelper')]
0037  GETTABUP  R1 = _ENV[K15('ProgressActivityRewardPopupHelper')]
0038  SETTABLE  R0[K8('__index')] = R1
0039  GETTABUP  R0 = _ENV[K15('ProgressActivityRewardPopupHelper')]
0040  CLOSURE   R1 = closure proto5
0041  SETTABLE  R0[K9('Create')] = R1
0042  GETTABUP  R0 = _ENV[K17('ProgressActivityRewardPopupHelper')]
0043  CLOSURE   R1 = closure proto6
0044  SETTABLE  R0[K14('CheckPopup')] = R1
0045  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 11-15 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='ProgressActivityPopupHelper'
  ;   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('ProgressActivityPopupHelper')]
  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 17-23 np=1 va=0 ms=10 code=23 consts=10 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='ProgressActivityDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   K[8]='ScoreChangedEvent'
  ;   K[9]='_OnScoreChanged'
  ;   upvals: _ENV
  ;   locals: self(0-23), (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('ProgressActivityDefinition')]
  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('_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('ScoreChangedEvent')]
  0017  MOVE      R8 = R0
  0018  GETTABLE  R9 = R0[K9('_OnScoreChanged')]
  0019  CALL      R6 = call(R6, 0 args, 3 rets)
  0020  TFORCALL  tforcall R1
  0021  TFORLOOP  tforloop R3(sBx=-14)   -> 8
  0022  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; 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 [_OnScoreChanged] ----------
  ; 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-51 np=1 va=0 ms=14 code=65 consts=16 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='ProgressActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   K[8]='HasWindowOpenedOnce'
  ;   K[9]='MainWindowPrefabName'
  ;   K[10]='Ended'
  ;   K[11]='GetLevel'
  ;   K[12]='GetLevelConfigs'
  ;   K[13]=nil
  ;   K[14]='IsEndWindowSkippedByAway'
  ;   K[15]='FinishFailWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-65), (for generator)(3-64), (for state)(3-64), (for control)(3-64), activityType(4-62), definition(4-62), model(9-62), state(11-62), level(46-62), levelConfig(49-62)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('ProgressActivityDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 62
  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)   -> 28
  0015  SELF      R9 = R6[K8('HasWindowOpenedOnce')] (self)
  0016  GETTABUP  R10 = _ENV[K6('ActivityState')]
  0017  GETTABLE  R10 = R10[K7('Started')]
  0018  CALL      R8 = call(R8, 1 args, 2 rets)
  0019  TEST      if not R8 then   -> -131050
  0020  JMP       (jump)   -> 62
  0021  GETTABLE  R8 = R5[K9('MainWindowPrefabName')]
  0022  NEWTABLE  R9 = {} (2 items)
  0023  MOVE      R10 = R0
  0024  LOADBOOL  R11 = true
  0025  SETLIST   setlist R9[B=1,C=2]
  0026  RETURN    return R8..R7
  0027  JMP       (jump)   -> 62
  0028  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0029  GETTABLE  R8 = R8[K10('Ended')]
  0030  EQ        if R0 eq R8   -> -127448
  0031  JMP       (jump)   -> 62
  0032  SELF      R9 = R6[K8('HasWindowOpenedOnce')] (self)
  0033  GETTABUP  R10 = _ENV[K6('ActivityState')]
  0034  GETTABLE  R10 = R10[K7('Started')]
  0035  CALL      R8 = call(R8, 1 args, 2 rets)
  0036  TEST      if not R8 then   -> -131034
  0037  JMP       (jump)   -> 62
  0038  SELF      R9 = R6[K8('HasWindowOpenedOnce')] (self)
  0039  GETTABUP  R10 = _ENV[K6('ActivityState')]
  0040  GETTABLE  R10 = R10[K10('Ended')]
  0041  CALL      R8 = call(R8, 1 args, 2 rets)
  0042  TEST      if not R8 then   -> -131027
  0043  JMP       (jump)   -> 62
  0044  SELF      R9 = R6[K11('GetLevel')] (self)
  0045  CALL      R8 = call(R8, 1 args, 1 rets)
  0046  SELF      R10 = R6[K12('GetLevelConfigs')] (self)
  0047  CALL      R9 = call(R9, 1 args, 1 rets)
  0048  GETTABLE  R9 = R9[R8]
  0049  EQ        if R1 eq K13(nil)   -> -126144
  0050  JMP       (jump)   -> 62
  0051  SELF      R11 = R6[K14('IsEndWindowSkippedByAway')] (self)
  0052  CALL      R10 = call(R10, 1 args, 1 rets)
  0053  TEST      if not R10 then   -> -131016
  0054  JMP       (jump)   -> 62
  0055  GETTABLE  R10 = R5[K15('FinishFailWindowPrefabName')]
  0056  NEWTABLE  R11 = {} (2 items)
  0057  MOVE      R12 = R0
  0058  LOADBOOL  R13 = true
  0059  SETLIST   setlist R11[B=1,C=2]
  0060  LOADBOOL  R12 = true
  0061  RETURN    return R10..R9
  0062  TFORCALL  tforcall R1
  0063  TFORLOOP  tforloop R3(sBx=-60)   -> 4
  0064  RETURN    return R0..R-1
; ---------- proto5 [Create] ----------
  ; fn ?  line 56-60 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='ProgressActivityRewardPopupHelper'
  ;   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('ProgressActivityRewardPopupHelper')]
  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
; ---------- proto6 [CheckPopup] ----------
  ; fn ?  line 62-72 np=1 va=0 ms=12 code=32 consts=11 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='ProgressActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   K[8]='Ended'
  ;   K[9]='CanAcquireReward'
  ;   K[10]='MainWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-32), (for generator)(3-31), (for state)(3-31), (for control)(3-31), activityType(4-29), definition(4-29), model(9-29), state(11-29)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('ProgressActivityDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 29
  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 R1 eq R8   -> -127465
  0014  JMP       (jump)   -> 19
  0015  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0016  GETTABLE  R8 = R8[K8('Ended')]
  0017  EQ        if R0 eq R8   -> -127461
  0018  JMP       (jump)   -> 29
  0019  SELF      R9 = R6[K9('CanAcquireReward')] (self)
  0020  CALL      R8 = call(R8, 1 args, 1 rets)
  0021  TEST      if not R8 then   -> -131049
  0022  JMP       (jump)   -> 29
  0023  GETTABLE  R8 = R5[K10('MainWindowPrefabName')]
  0024  NEWTABLE  R9 = {} (2 items)
  0025  MOVE      R10 = R0
  0026  LOADBOOL  R11 = true
  0027  SETLIST   setlist R9[B=1,C=2]
  0028  RETURN    return R8..R7
  0029  TFORCALL  tforcall R1
  0030  TFORLOOP  tforloop R3(sBx=-27)   -> 4
  0031  RETURN    return R0..R-1
