# GemChain_View_GemChainPopupHelper_1417.luac
; fn @GemChainPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=29 consts=14 upvals=1 protos=4
;   K[0]='GemChainPopupHelper'
;   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]='GemChainPopupHelper'
;   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('GemChainPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('GemChainPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('GemChainPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('GemChainPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('GemChainPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('GemChainPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('GemChainPopupHelper')]
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]='GemChainPopupHelper'
  ;   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('GemChainPopupHelper')]
  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-21 np=1 va=0 ms=5 code=19 consts=8 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='EventDispatcher'
  ;   K[3]='AddListener'
  ;   K[4]='EEventType'
  ;   K[5]='GemChainStateChanged'
  ;   K[6]='_OnStateChanged'
  ;   K[7]='BuyEnergySuccess'
  ;   upvals: _ENV
  ;   locals: self(0-19)
  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('EventDispatcher')]
  0005  GETTABLE  R1 = R1[K3('AddListener')]
  0006  GETTABUP  R2 = _ENV[K4('EEventType')]
  0007  GETTABLE  R2 = R2[K5('GemChainStateChanged')]
  0008  MOVE      R3 = R0
  0009  GETTABLE  R4 = R0[K6('_OnStateChanged')]
  0010  CALL      R1 = call(R1, 0 args, 3 rets)
  0011  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0012  GETTABLE  R1 = R1[K3('AddListener')]
  0013  GETTABUP  R2 = _ENV[K4('EEventType')]
  0014  GETTABLE  R2 = R2[K7('BuyEnergySuccess')]
  0015  MOVE      R3 = R0
  0016  GETTABLE  R4 = R0[K6('_OnStateChanged')]
  0017  CALL      R1 = call(R1, 0 args, 3 rets)
  0018  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; fn ?  line 23-25 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 27-43 np=1 va=0 ms=9 code=48 consts=18 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ActivityManager'
  ;   K[2]='GetModel'
  ;   K[3]='ActivityType'
  ;   K[4]='GemChain'
  ;   K[5]='IsActive'
  ;   K[6]='HasWindowOpenedOnce'
  ;   K[7]='ActivityState'
  ;   K[8]='Started'
  ;   K[9]='UIPrefabConfigName'
  ;   K[10]='GemChainWindow'
  ;   K[11]='CanRecoverRewards'
  ;   K[12]='ClaimRecoverRewards'
  ;   K[13]=1
  ;   K[14]='AnimatedRewardWindow'
  ;   K[15]='gem_chain_title'
  ;   K[16]='ERewardScene'
  ;   K[17]='Other'
  ;   upvals: _ENV
  ;   locals: self(0-48), model(6-48), arrRecoverRewards(30-45)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('ActivityManager')]
  0002  SELF      R2 = R1[K2('GetModel')] (self)
  0003  GETTABUP  R3 = _ENV[K3('ActivityType')]
  0004  GETTABLE  R3 = R3[K4('GemChain')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  SELF      R3 = R1[K5('IsActive')] (self)
  0007  CALL      R2 = call(R2, 1 args, 1 rets)
  0008  TEST      if not R2 then   -> -131062
  0009  JMP       (jump)   -> 24
  0010  SELF      R3 = R1[K6('HasWindowOpenedOnce')] (self)
  0011  GETTABUP  R4 = _ENV[K7('ActivityState')]
  0012  GETTABLE  R4 = R4[K8('Started')]
  0013  CALL      R2 = call(R2, 1 args, 2 rets)
  0014  TEST      if not R2 then   -> -131055
  0015  JMP       (jump)   -> 24
  0016  GETTABUP  R2 = _ENV[K9('UIPrefabConfigName')]
  0017  GETTABLE  R2 = R2[K10('GemChainWindow')]
  0018  NEWTABLE  R3 = {} (2 items)
  0019  LOADBOOL  R4 = false
  0020  LOADBOOL  R5 = true
  0021  SETLIST   setlist R3[B=1,C=2]
  0022  RETURN    return R2..R1
  0023  JMP       (jump)   -> 45
  0024  SELF      R3 = R1[K11('CanRecoverRewards')] (self)
  0025  CALL      R2 = call(R2, 1 args, 1 rets)
  0026  TEST      if not R2 then   -> -131044
  0027  JMP       (jump)   -> 45
  0028  SELF      R3 = R1[K12('ClaimRecoverRewards')] (self)
  0029  CALL      R2 = call(R2, 1 args, 1 rets)
  0030  TEST      if not R2 then   -> -131040
  0031  JMP       (jump)   -> 45
  0032  GETTABLE  R3 = R2[K13(1)]
  0033  TEST      if not R3 then   -> -131037
  0034  JMP       (jump)   -> 45
  0035  GETTABUP  R3 = _ENV[K9('UIPrefabConfigName')]
  0036  GETTABLE  R3 = R3[K14('AnimatedRewardWindow')]
  0037  NEWTABLE  R4 = {} (4 items)
  0038  MOVE      R5 = R0
  0039  LOADK     R6 = K15 'gem_chain_title'
  0040  LOADBOOL  R7 = true
  0041  GETTABUP  R8 = _ENV[K16('ERewardScene')]
  0042  GETTABLE  R8 = R8[K17('Other')]
  0043  SETLIST   setlist R4[B=1,C=4]
  0044  RETURN    return R3..R2
  0045  LOADNIL   R2..R2 = nil
  0046  RETURN    return R2..R1
  0047  RETURN    return R0..R-1
