# DeliveryProgress_View_DeliveryProgressActivityPopupHelper_1510.luac
; fn @DeliveryProgressActivityPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=46 consts=18 upvals=1 protos=7
;   K[0]='DeliveryProgressActivityPopupHelper'
;   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]='DeliveryProgressActivityPopupHelper'
;   K[11]='Init'
;   K[12]='_OnStateChanged'
;   K[13]='_OnScoreChanged'
;   K[14]='CheckPopup'
;   K[15]='DeliveryProgressActivityRewardPopupHelper'
;   K[16]='setmetatable'
;   K[17]='DeliveryProgressActivityRewardPopupHelper'
;   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('DeliveryProgressActivityPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('DeliveryProgressActivityPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('DeliveryProgressActivityPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('DeliveryProgressActivityPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('DeliveryProgressActivityPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('DeliveryProgressActivityPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('DeliveryProgressActivityPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('_OnScoreChanged')] = R1
0028  GETTABUP  R0 = _ENV[K10('DeliveryProgressActivityPopupHelper')]
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('DeliveryProgressActivityPopupHelper')]
0034  CALL      R0 = call(R0, 1 args, 2 rets)
0035  SETTABUP  _ENV[K15('DeliveryProgressActivityRewardPopupHelper')] = R0
0036  GETTABUP  R0 = _ENV[K15('DeliveryProgressActivityRewardPopupHelper')]
0037  GETTABUP  R1 = _ENV[K15('DeliveryProgressActivityRewardPopupHelper')]
0038  SETTABLE  R0[K8('__index')] = R1
0039  GETTABUP  R0 = _ENV[K15('DeliveryProgressActivityRewardPopupHelper')]
0040  CLOSURE   R1 = closure proto5
0041  SETTABLE  R0[K9('Create')] = R1
0042  GETTABUP  R0 = _ENV[K17('DeliveryProgressActivityRewardPopupHelper')]
0043  CLOSURE   R1 = closure proto6
0044  SETTABLE  R0[K14('CheckPopup')] = R1
0045  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]='DeliveryProgressActivityPopupHelper'
  ;   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('DeliveryProgressActivityPopupHelper')]
  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-22 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]='DeliveryProgressActivityDefinition'
  ;   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('DeliveryProgressActivityDefinition')]
  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 24-26 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 28-30 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 32-58 np=1 va=0 ms=12 code=68 consts=16 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='DeliveryProgressActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetProgressHelper'
  ;   K[6]='GetState'
  ;   K[7]='ActivityState'
  ;   K[8]='Ended'
  ;   K[9]='HasWindowOpenedOnce'
  ;   K[10]='Started'
  ;   K[11]='HasFinishedAllLevel'
  ;   K[12]='OpenFinishSuccessWindow'
  ;   K[13]='OpenFinishFailWindow'
  ;   K[14]='TryOpenAutoClaimedTaskRewardsWindow'
  ;   K[15]='OpenStartWindow'
  ;   upvals: _ENV
  ;   locals: self(0-68), (for generator)(3-67), (for state)(3-67), (for control)(3-67), activityType(4-65), definition(4-65), model(9-65), progressHelper(11-65), state(13-65)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('DeliveryProgressActivityDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 65
  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('GetProgressHelper')] (self)
  0010  CALL      R7 = call(R7, 1 args, 1 rets)
  0011  SELF      R9 = R6[K6('GetState')] (self)
  0012  CALL      R8 = call(R8, 1 args, 1 rets)
  0013  GETTABUP  R9 = _ENV[K7('ActivityState')]
  0014  GETTABLE  R9 = R9[K8('Ended')]
  0015  EQ        if R0 eq R9   -> -126950
  0016  JMP       (jump)   -> 43
  0017  SELF      R10 = R6[K9('HasWindowOpenedOnce')] (self)
  0018  GETTABUP  R11 = _ENV[K7('ActivityState')]
  0019  GETTABLE  R11 = R11[K10('Started')]
  0020  CALL      R9 = call(R9, 1 args, 2 rets)
  0021  TEST      if not R9 then   -> -131049
  0022  JMP       (jump)   -> 65
  0023  SELF      R10 = R6[K9('HasWindowOpenedOnce')] (self)
  0024  GETTABUP  R11 = _ENV[K7('ActivityState')]
  0025  GETTABLE  R11 = R11[K8('Ended')]
  0026  CALL      R9 = call(R9, 1 args, 2 rets)
  0027  TEST      if not R9 then   -> -131042
  0028  JMP       (jump)   -> 65
  0029  SELF      R10 = R7[K11('HasFinishedAllLevel')] (self)
  0030  CALL      R9 = call(R9, 1 args, 1 rets)
  0031  TEST      if not R9 then   -> -131039
  0032  JMP       (jump)   -> 37
  0033  SELF      R10 = R6[K12('OpenFinishSuccessWindow')] (self)
  0034  LOADBOOL  R11 = true
  0035  CALL      R9 = call(R9, 0 args, 2 rets)
  0036  JMP       (jump)   -> 40
  0037  SELF      R10 = R6[K13('OpenFinishFailWindow')] (self)
  0038  LOADBOOL  R11 = true
  0039  CALL      R9 = call(R9, 0 args, 2 rets)
  0040  LOADBOOL  R9 = true
  0041  RETURN    return R9..R8
  0042  JMP       (jump)   -> 65
  0043  SELF      R10 = R6[K14('TryOpenAutoClaimedTaskRewardsWindow')] (self)
  0044  CALL      R9 = call(R9, 1 args, 1 rets)
  0045  TEST      if not R9 then   -> -131025
  0046  JMP       (jump)   -> 50
  0047  LOADBOOL  R9 = true
  0048  RETURN    return R9..R8
  0049  JMP       (jump)   -> 65
  0050  GETTABUP  R9 = _ENV[K7('ActivityState')]
  0051  GETTABLE  R9 = R9[K10('Started')]
  0052  EQ        if R0 eq R9   -> -126913
  0053  JMP       (jump)   -> 65
  0054  SELF      R10 = R6[K9('HasWindowOpenedOnce')] (self)
  0055  GETTABUP  R11 = _ENV[K7('ActivityState')]
  0056  GETTABLE  R11 = R11[K10('Started')]
  0057  CALL      R9 = call(R9, 1 args, 2 rets)
  0058  TEST      if not R9 then   -> -131011
  0059  JMP       (jump)   -> 65
  0060  SELF      R10 = R6[K15('OpenStartWindow')] (self)
  0061  LOADBOOL  R11 = true
  0062  CALL      R9 = call(R9, 0 args, 2 rets)
  0063  LOADBOOL  R9 = true
  0064  RETURN    return R9..R8
  0065  TFORCALL  tforcall R1
  0066  TFORLOOP  tforloop R3(sBx=-63)   -> 4
  0067  RETURN    return R0..R-1
; ---------- proto5 [Create] ----------
  ; fn ?  line 64-68 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='DeliveryProgressActivityRewardPopupHelper'
  ;   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('DeliveryProgressActivityRewardPopupHelper')]
  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 70-87 np=1 va=0 ms=12 code=39 consts=13 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='DeliveryProgressActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetProgressHelper'
  ;   K[6]='GetState'
  ;   K[7]='ActivityState'
  ;   K[8]='Started'
  ;   K[9]='Ended'
  ;   K[10]='TryAcquireAllQuestReward'
  ;   K[11]='CanAcquireReward'
  ;   K[12]='OpenMainWindow'
  ;   upvals: _ENV
  ;   locals: self(0-39), (for generator)(3-38), (for state)(3-38), (for control)(3-38), activityType(4-36), definition(4-36), model(9-36), progressHelper(11-36), state(13-36)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('DeliveryProgressActivityDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 36
  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('GetProgressHelper')] (self)
  0010  CALL      R7 = call(R7, 1 args, 1 rets)
  0011  SELF      R9 = R6[K6('GetState')] (self)
  0012  CALL      R8 = call(R8, 1 args, 1 rets)
  0013  GETTABUP  R9 = _ENV[K7('ActivityState')]
  0014  GETTABLE  R9 = R9[K8('Started')]
  0015  EQ        if R1 eq R9   -> -126950
  0016  JMP       (jump)   -> 21
  0017  GETTABUP  R9 = _ENV[K7('ActivityState')]
  0018  GETTABLE  R9 = R9[K9('Ended')]
  0019  EQ        if R0 eq R9   -> -126946
  0020  JMP       (jump)   -> 36
  0021  GETTABUP  R9 = _ENV[K7('ActivityState')]
  0022  GETTABLE  R9 = R9[K9('Ended')]
  0023  EQ        if R0 eq R9   -> -126942
  0024  JMP       (jump)   -> 27
  0025  SELF      R10 = R6[K10('TryAcquireAllQuestReward')] (self)
  0026  CALL      R9 = call(R9, 0 args, 1 rets)
  0027  SELF      R10 = R7[K11('CanAcquireReward')] (self)
  0028  CALL      R9 = call(R9, 1 args, 1 rets)
  0029  TEST      if not R9 then   -> -131041
  0030  JMP       (jump)   -> 36
  0031  SELF      R10 = R6[K12('OpenMainWindow')] (self)
  0032  LOADBOOL  R11 = true
  0033  CALL      R9 = call(R9, 0 args, 2 rets)
  0034  LOADBOOL  R9 = true
  0035  RETURN    return R9..R8
  0036  TFORCALL  tforcall R1
  0037  TFORLOOP  tforloop R3(sBx=-34)   -> 4
  0038  RETURN    return R0..R-1
