# GemChain_Model_GemChainModel_1415.luac
; fn @GemChainModel.lua  line 0-0 np=0 va=1 ms=3 code=60 consts=24 upvals=1 protos=16
;   K[0]='GemChainModel'
;   K[1]='setmetatable'
;   K[2]='BaseActivityModel'
;   K[3]='__index'
;   K[4]='Step'
;   K[5]='step'
;   K[6]='HasRecovered'
;   K[7]='hasRecov'
;   K[8]='Init'
;   K[9]='_LoadOtherServerConfig'
;   K[10]='_CheckConfigValid'
;   K[11]='GetResourceLabels'
;   K[12]='_OnStateChanged'
;   K[13]='CanRecoverRewards'
;   K[14]='_HasPayed'
;   K[15]='_HasRecovered'
;   K[16]='_SetRecovered'
;   K[17]='ClaimRecoverRewards'
;   K[18]='IsActive'
;   K[19]='GetConfigs'
;   K[20]='GetCurrentStep'
;   K[21]='GetStepConfig'
;   K[22]='GetLastPayStep'
;   K[23]='BuyStep'
;   upvals: _ENV
;   locals: DBKey(11-60)
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('BaseActivityModel')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('GemChainModel')] = R0
0005  GETTABUP  R0 = _ENV[K0('GemChainModel')]
0006  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  NEWTABLE  R0 = {} (0 items)
0009  SETTABLE  R0[K4('Step')] = K5('step')
0010  SETTABLE  R0[K6('HasRecovered')] = K7('hasRecov')
0011  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0012  CLOSURE   R2 = closure proto0
0013  SETTABLE  R1[K8('Init')] = R2
0014  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0015  CLOSURE   R2 = closure proto1
0016  SETTABLE  R1[K9('_LoadOtherServerConfig')] = R2
0017  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0018  CLOSURE   R2 = closure proto2
0019  SETTABLE  R1[K10('_CheckConfigValid')] = R2
0020  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0021  CLOSURE   R2 = closure proto3
0022  SETTABLE  R1[K11('GetResourceLabels')] = R2
0023  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0024  CLOSURE   R2 = closure proto4
0025  SETTABLE  R1[K12('_OnStateChanged')] = R2
0026  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0027  CLOSURE   R2 = closure proto5
0028  SETTABLE  R1[K13('CanRecoverRewards')] = R2
0029  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0030  CLOSURE   R2 = closure proto6
0031  SETTABLE  R1[K14('_HasPayed')] = R2
0032  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0033  CLOSURE   R2 = closure proto7
0034  SETTABLE  R1[K15('_HasRecovered')] = R2
0035  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0036  CLOSURE   R2 = closure proto8
0037  SETTABLE  R1[K16('_SetRecovered')] = R2
0038  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0039  CLOSURE   R2 = closure proto9
0040  SETTABLE  R1[K17('ClaimRecoverRewards')] = R2
0041  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0042  CLOSURE   R2 = closure proto10
0043  SETTABLE  R1[K18('IsActive')] = R2
0044  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0045  CLOSURE   R2 = closure proto11
0046  SETTABLE  R1[K19('GetConfigs')] = R2
0047  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0048  CLOSURE   R2 = closure proto12
0049  SETTABLE  R1[K20('GetCurrentStep')] = R2
0050  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0051  CLOSURE   R2 = closure proto13
0052  SETTABLE  R1[K21('GetStepConfig')] = R2
0053  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0054  CLOSURE   R2 = closure proto14
0055  SETTABLE  R1[K22('GetLastPayStep')] = R2
0056  GETTABUP  R1 = _ENV[K0('GemChainModel')]
0057  CLOSURE   R2 = closure proto15
0058  SETTABLE  R1[K23('BuyStep')] = R2
0059  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 10-14 np=2 va=0 ms=6 code=8 consts=4 upvals=1 protos=0
  ;   K[0]='BaseActivityModel'
  ;   K[1]='Init'
  ;   K[2]='ActivityType'
  ;   K[3]='GemChain'
  ;   upvals: _ENV
  ;   locals: self(0-8), virtualDBTable(0-8)
  0000  GETTABUP  R2 = _ENV[K0('BaseActivityModel')]
  0001  GETTABLE  R2 = R2[K1('Init')]
  0002  MOVE      R3 = R0
  0003  GETTABUP  R4 = _ENV[K2('ActivityType')]
  0004  GETTABLE  R4 = R4[K3('GemChain')]
  0005  MOVE      R5 = R0
  0006  CALL      R2 = call(R2, 0 args, 3 rets)
  0007  RETURN    return R0..R-1
; ---------- proto1 [_LoadOtherServerConfig] ----------
  ; fn ?  line 16-36 np=2 va=0 ms=12 code=28 consts=9 upvals=1 protos=1
  ;   K[0]='bundleContentChain'
  ;   K[1]='ipairs'
  ;   K[2]='BundleChainServerConfigData'
  ;   K[3]='Create'
  ;   K[4]='table'
  ;   K[5]='sort'
  ;   K[6]='m_config'
  ;   K[7]='arrConfigData'
  ;   K[8]='_CheckConfigValid'
  ;   upvals: _ENV
  ;   locals: self(0-28), config(0-28), arrConfig(4-28), arrConfigData(5-28), (for generator)(8-17), (for state)(8-17), (for control)(8-17), i(9-15), data(9-15)
  0000  GETTABLE  R2 = R1[K0('bundleContentChain')]
  0001  TEST      if not R2 then   -> -131068
  0002  JMP       (jump)   -> 4
  0003  NEWTABLE  R2 = {} (0 items)
  0004  NEWTABLE  R3 = {} (0 items)
  0005  GETTABUP  R4 = _ENV[K1('ipairs')]
  0006  MOVE      R5 = R0
  0007  CALL      R4 = call(R4, 3 args, 1 rets)
  0008  JMP       (jump)   -> 15
  0009  GETTABUP  R9 = _ENV[K2('BundleChainServerConfigData')]
  0010  GETTABLE  R9 = R9[K3('Create')]
  0011  MOVE      R10 = R0
  0012  MOVE      R11 = R0
  0013  CALL      R9 = call(R9, 1 args, 2 rets)
  0014  SETTABLE  R3[R7] = R9
  0015  TFORCALL  tforcall R4
  0016  TFORLOOP  tforloop R6(sBx=-8)   -> 9
  0017  GETTABUP  R4 = _ENV[K4('table')]
  0018  GETTABLE  R4 = R4[K5('sort')]
  0019  MOVE      R5 = R0
  0020  CLOSURE   R6 = closure proto0
  0021  CALL      R4 = call(R4, 0 args, 2 rets)
  0022  GETTABLE  R4 = R0[K6('m_config')]
  0023  SETTABLE  R4[K7('arrConfigData')] = R3
  0024  SELF      R5 = R0[K8('_CheckConfigValid')] (self)
  0025  MOVE      R6 = R0
  0026  CALL      R4 = call(R4, 0 args, 2 rets)
  0027  RETURN    return R0..R-1
  ; ---------- proto0 [arrConfigData] ----------
    ; fn ?  line 28-30 np=2 va=0 ms=5 code=10 consts=1 upvals=0 protos=0
    ;   K[0]='GetStep'
    ;   locals: a(0-10), b(0-10)
    0000  SELF      R3 = R0[K0('GetStep')] (self)
    0001  CALL      R2 = call(R2, 1 args, 1 rets)
    0002  SELF      R4 = R1[K0('GetStep')] (self)
    0003  CALL      R3 = call(R3, 1 args, 1 rets)
    0004  LT        if R1 lt R3   -> -130039
    0005  JMP       (jump)   -> 7
    0006  LOADBOOL  R2 = false
    0007  LOADBOOL  R2 = true
    0008  RETURN    return R2..R1
    0009  RETURN    return R0..R-1
; ---------- proto2 [_CheckConfigValid] ----------
  ; fn ?  line 38-84 np=2 va=0 ms=12 code=99 consts=24 upvals=1 protos=0
  ;   K[0]='m_config'
  ;   K[1]='arrConfigData'
  ;   K[2]=1
  ;   K[3]='Log'
  ;   K[4]='Error'
  ;   K[5]='钻石链式配置为空！'
  ;   K[6]='GetStartTime'
  ;   K[7]=86400
  ;   K[8]=0
  ;   K[9]='钻石链式开启时间不为 UTC 0 点！'
  ;   K[10]='GetEndTime'
  ;   K[11]='钻石链式持续时间不为 24 小时！'
  ;   K[12]='ipairs'
  ;   K[13]='GetGoods'
  ;   K[14]='GetPrice'
  ;   K[15]=2
  ;   K[16]='钻石链式每个付费项之后至少要有两个免费项'
  ;   K[17]='PROPERTY_TYPE'
  ;   K[18]='EPropertyType'
  ;   K[19]='Energy'
  ;   K[20]='钻石链式付费项必须包含体力奖励，且位于第一位'
  ;   K[21]=4
  ;   K[22]='钻石链式每个项最多含有3种奖励'
  ;   K[23]='GetLastPayStep'
  ;   upvals: _ENV
  ;   locals: self(0-99), config(0-99), freeCount(31-99), hasPay(32-99), (for generator)(36-86), (for state)(36-86), (for control)(36-86), index(37-84), configData(37-84), arrRewards(39-84), lastPayStep(88-99)
  0000  GETTABLE  R2 = R0[K0('m_config')]
  0001  GETTABLE  R2 = R2[K1('arrConfigData')]
  0002  GETTABLE  R2 = R2[K2(1)]
  0003  TEST      if not R2 then   -> -131066
  0004  JMP       (jump)   -> 9
  0005  GETTABUP  R2 = _ENV[K3('Log')]
  0006  GETTABLE  R2 = R2[K4('Error')]
  0007  LOADK     R3 = K5 '钻石链式配置为空！'
  0008  CALL      R2 = call(R2, 0 args, 1 rets)
  0009  SELF      R3 = R0[K6('GetStartTime')] (self)
  0010  CALL      R2 = call(R2, 1 args, 1 rets)
  0011  MOD       R2 = K7(86400) mod R2
  0012  EQ        if R1 eq K8(0)   -> -129770
  0013  JMP       (jump)   -> 18
  0014  GETTABUP  R2 = _ENV[K3('Log')]
  0015  GETTABLE  R2 = R2[K4('Error')]
  0016  LOADK     R3 = K9 '钻石链式开启时间不为 UTC 0 点！'
  0017  CALL      R2 = call(R2, 0 args, 1 rets)
  0018  SELF      R3 = R0[K10('GetEndTime')] (self)
  0019  LOADBOOL  R4 = true
  0020  CALL      R2 = call(R2, 1 args, 2 rets)
  0021  SELF      R4 = R0[K6('GetStartTime')] (self)
  0022  CALL      R3 = call(R3, 1 args, 1 rets)
  0023  SUB       R2 = R3 sub R2
  0024  EQ        if R1 eq K7(86400)   -> -129759
  0025  JMP       (jump)   -> 30
  0026  GETTABUP  R2 = _ENV[K3('Log')]
  0027  GETTABLE  R2 = R2[K4('Error')]
  0028  LOADK     R3 = K11 '钻石链式持续时间不为 24 小时！'
  0029  CALL      R2 = call(R2, 0 args, 1 rets)
  0030  LOADK     R2 = K8 0
  0031  LOADBOOL  R3 = false
  0032  GETTABUP  R4 = _ENV[K12('ipairs')]
  0033  GETTABLE  R5 = R0[K0('m_config')]
  0034  GETTABLE  R5 = R5[K1('arrConfigData')]
  0035  CALL      R4 = call(R4, 3 args, 1 rets)
  0036  JMP       (jump)   -> 84
  0037  SELF      R10 = R8[K13('GetGoods')] (self)
  0038  CALL      R9 = call(R9, 1 args, 1 rets)
  0039  SELF      R11 = R8[K14('GetPrice')] (self)
  0040  CALL      R10 = call(R10, 1 args, 1 rets)
  0041  TEST      if not R10 then   -> -131029
  0042  JMP       (jump)   -> 47
  0043  SELF      R11 = R8[K14('GetPrice')] (self)
  0044  CALL      R10 = call(R10, 1 args, 1 rets)
  0045  EQ        if R0 eq K8(0)   -> -125641
  0046  JMP       (jump)   -> 49
  0047  ADD       R2 = K2(1) add R2
  0048  JMP       (jump)   -> 75
  0049  TEST      if not R3 then   -> -131021
  0050  JMP       (jump)   -> 57
  0051  LT        if R0 lt K15(2)   -> -129724
  0052  JMP       (jump)   -> 57
  0053  GETTABUP  R10 = _ENV[K3('Log')]
  0054  GETTABLE  R10 = R10[K4('Error')]
  0055  LOADK     R11 = K16 '钻石链式每个付费项之后至少要有两个免费项'
  0056  CALL      R10 = call(R10, 0 args, 1 rets)
  0057  LOADBOOL  R3 = true
  0058  LOADK     R2 = K8 0
  0059  TEST      if not R9 then   -> -131011
  0060  JMP       (jump)   -> 71
  0061  GETTABLE  R10 = R9[K2(1)]
  0062  TEST      if not R10 then   -> -131008
  0063  JMP       (jump)   -> 71
  0064  GETTABLE  R10 = R9[K2(1)]
  0065  GETTABUP  R11 = _ENV[K17('PROPERTY_TYPE')]
  0066  GETTABLE  R10 = R10[R11]
  0067  GETTABUP  R11 = _ENV[K18('EPropertyType')]
  0068  GETTABLE  R11 = R11[K19('Energy')]
  0069  EQ        if R1 eq R11   -> -125870
  0070  JMP       (jump)   -> 75
  0071  GETTABUP  R10 = _ENV[K3('Log')]
  0072  GETTABLE  R10 = R10[K4('Error')]
  0073  LOADK     R11 = K20 '钻石链式付费项必须包含体力奖励，且位于第一位'
  0074  CALL      R10 = call(R10, 0 args, 1 rets)
  0075  TEST      if not R9 then   -> -130995
  0076  JMP       (jump)   -> 80
  0077  GETTABLE  R10 = R9[K21(4)]
  0078  TEST      if not R10 then   -> -130992
  0079  JMP       (jump)   -> 84
  0080  GETTABUP  R10 = _ENV[K3('Log')]
  0081  GETTABLE  R10 = R10[K4('Error')]
  0082  LOADK     R11 = K22 '钻石链式每个项最多含有3种奖励'
  0083  CALL      R10 = call(R10, 0 args, 1 rets)
  0084  TFORCALL  tforcall R4
  0085  TFORLOOP  tforloop R6(sBx=-49)   -> 37
  0086  SELF      R5 = R0[K23('GetLastPayStep')] (self)
  0087  CALL      R4 = call(R4, 1 args, 1 rets)
  0088  GETTABLE  R5 = R0[K0('m_config')]
  0089  GETTABLE  R5 = R5[K1('arrConfigData')]
  0090  LEN       R5 = len R0
  0091  SUB       R5 = R4 sub R5
  0092  LT        if R0 lt K15(2)   -> -128147
  0093  JMP       (jump)   -> 98
  0094  GETTABUP  R5 = _ENV[K3('Log')]
  0095  GETTABLE  R5 = R5[K4('Error')]
  0096  LOADK     R6 = K16 '钻石链式每个付费项之后至少要有两个免费项'
  0097  CALL      R5 = call(R5, 0 args, 1 rets)
  0098  RETURN    return R0..R-1
; ---------- proto3 [GetResourceLabels] ----------
  ; fn ?  line 86-88 np=1 va=0 ms=3 code=6 consts=2 upvals=1 protos=0
  ;   K[0]='AddressableLabel'
  ;   K[1]='GemChain'
  ;   upvals: _ENV
  ;   locals: self(0-6)
  0000  NEWTABLE  R1 = {} (1 items)
  0001  GETTABUP  R2 = _ENV[K0('AddressableLabel')]
  0002  GETTABLE  R2 = R2[K1('GemChain')]
  0003  SETLIST   setlist R1[B=1,C=1]
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
; ---------- proto4 [_OnStateChanged] ----------
  ; fn ?  line 90-94 np=1 va=0 ms=3 code=10 consts=6 upvals=1 protos=0
  ;   K[0]='BaseActivityModel'
  ;   K[1]='_OnStateChanged'
  ;   K[2]='EventDispatcher'
  ;   K[3]='DispatchEvent'
  ;   K[4]='EEventType'
  ;   K[5]='GemChainStateChanged'
  ;   upvals: _ENV
  ;   locals: self(0-10)
  0000  GETTABUP  R1 = _ENV[K0('BaseActivityModel')]
  0001  GETTABLE  R1 = R1[K1('_OnStateChanged')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0005  GETTABLE  R1 = R1[K3('DispatchEvent')]
  0006  GETTABUP  R2 = _ENV[K4('EEventType')]
  0007  GETTABLE  R2 = R2[K5('GemChainStateChanged')]
  0008  CALL      R1 = call(R1, 0 args, 1 rets)
  0009  RETURN    return R0..R-1
; ---------- proto5 [CanRecoverRewards] ----------
  ; fn ?  line 96-110 np=1 va=0 ms=3 code=23 consts=5 upvals=1 protos=0
  ;   K[0]='_HasRecovered'
  ;   K[1]='GetState'
  ;   K[2]='ActivityState'
  ;   K[3]='Ended'
  ;   K[4]='_HasPayed'
  ;   upvals: _ENV
  ;   locals: self(0-23)
  0000  SELF      R2 = R0[K0('_HasRecovered')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  TEST      if not R1 then   -> -131068
  0003  JMP       (jump)   -> 6
  0004  LOADBOOL  R1 = false
  0005  RETURN    return R1..R0
  0006  SELF      R2 = R0[K1('GetState')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  GETTABUP  R2 = _ENV[K2('ActivityState')]
  0009  GETTABLE  R2 = R2[K3('Ended')]
  0010  EQ        if R1 eq R2   -> -130546
  0011  JMP       (jump)   -> 14
  0012  LOADBOOL  R1 = false
  0013  RETURN    return R1..R0
  0014  SELF      R2 = R0[K4('_HasPayed')] (self)
  0015  CALL      R1 = call(R1, 1 args, 1 rets)
  0016  TEST      if not R1 then   -> -131053
  0017  JMP       (jump)   -> 20
  0018  LOADBOOL  R1 = false
  0019  RETURN    return R1..R0
  0020  LOADBOOL  R1 = true
  0021  RETURN    return R1..R0
  0022  RETURN    return R0..R-1
; ---------- proto6 [_HasPayed] ----------
  ; fn ?  line 112-129 np=1 va=0 ms=12 code=26 consts=5 upvals=0 protos=0
  ;   K[0]='GetCurrentStep'
  ;   K[1]=1
  ;   K[2]='GetStepConfig'
  ;   K[3]='GetPrice'
  ;   K[4]=0
  ;   locals: self(0-26), currentStep(2-26), config(3-26), price(3-26), hasPayed(4-26), (for index)(7-24), (for limit)(7-24), (for step)(7-24), step(8-23)
  0000  SELF      R2 = R0[K0('GetCurrentStep')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  LOADNIL   R2..R2 = nil
  0003  LOADBOOL  R4 = false
  0004  LOADK     R5 = K1 1
  0005  SUB       R6 = K1(1) sub R1
  0006  LOADK     R7 = K1 1
  0007  FORPREP   forprep R5(sBx=15)   -> 23
  0008  SELF      R10 = R0[K2('GetStepConfig')] (self)
  0009  MOVE      R11 = R0
  0010  CALL      R9 = call(R9, 1 args, 2 rets)
  0011  MOVE      R2 = R0
  0012  TEST      if not R2 then   -> -131058
  0013  JMP       (jump)   -> 24
  0014  SELF      R10 = R2[K3('GetPrice')] (self)
  0015  CALL      R9 = call(R9, 1 args, 1 rets)
  0016  MOVE      R3 = R0
  0017  TEST      if not R3 then   -> -131053
  0018  JMP       (jump)   -> 23
  0019  LT        if R0 lt R3   -> 2072
  0020  JMP       (jump)   -> 23
  0021  LOADBOOL  R4 = true
  0022  JMP       (jump)   -> 24
  0023  FORLOOP   forloop R5(sBx=-16)   -> 8
  0024  RETURN    return R4..R3
  0025  RETURN    return R0..R-1
; ---------- proto7 [_HasRecovered] ----------
  ; fn ?  line 131-133 np=1 va=0 ms=5 code=11 consts=5 upvals=2 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='GetInNumber'
  ;   K[2]='HasRecovered'
  ;   K[3]='DB_VALUE_KEY'
  ;   K[4]=1
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-11)
  0000  GETTABLE  R1 = R0[K0('m_dbTable')]
  0001  SELF      R2 = R1[K1('GetInNumber')] (self)
  0002  GETTABUP  R3 = DBKey[K2('HasRecovered')]
  0003  GETTABUP  R4 = _ENV[K3('DB_VALUE_KEY')]
  0004  CALL      R1 = call(R1, 1 args, 3 rets)
  0005  EQ        if R1 eq K4(1)   -> -130293
  0006  JMP       (jump)   -> 8
  0007  LOADBOOL  R1 = false
  0008  LOADBOOL  R1 = true
  0009  RETURN    return R1..R0
  0010  RETURN    return R0..R-1
; ---------- proto8 [_SetRecovered] ----------
  ; fn ?  line 135-137 np=1 va=0 ms=6 code=7 consts=5 upvals=2 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='Set'
  ;   K[2]='HasRecovered'
  ;   K[3]='DB_VALUE_KEY'
  ;   K[4]=1
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-7)
  0000  GETTABLE  R1 = R0[K0('m_dbTable')]
  0001  SELF      R2 = R1[K1('Set')] (self)
  0002  GETTABUP  R3 = DBKey[K2('HasRecovered')]
  0003  GETTABUP  R4 = _ENV[K3('DB_VALUE_KEY')]
  0004  LOADK     R5 = K4 1
  0005  CALL      R1 = call(R1, 0 args, 4 rets)
  0006  RETURN    return R0..R-1
; ---------- proto9 [ClaimRecoverRewards] ----------
  ; fn ?  line 139-168 np=1 va=0 ms=15 code=50 consts=13 upvals=1 protos=0
  ;   K[0]='_SetRecovered'
  ;   K[1]='_HasPayed'
  ;   K[2]='m_config'
  ;   K[3]='arrConfigData'
  ;   K[4]='GetCurrentStep'
  ;   K[5]=1
  ;   K[6]='GetStepConfig'
  ;   K[7]='GetPrice'
  ;   K[8]=0
  ;   K[9]='Table'
  ;   K[10]='ListMerge'
  ;   K[11]='GetGoods'
  ;   K[12]='BuyStep'
  ;   upvals: _ENV
  ;   locals: self(0-50), hasPayed(4-50), arrRecoverRewards(9-50), configs(14-50), config(15-50), price(15-50), currentStep(17-50), (for index)(20-48), (for limit)(20-48), (for step)(20-48), step(21-47)
  0000  SELF      R2 = R0[K0('_SetRecovered')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  SELF      R2 = R0[K1('_HasPayed')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131065
  0005  JMP       (jump)   -> 8
  0006  NEWTABLE  R2 = {} (0 items)
  0007  RETURN    return R2..R1
  0008  NEWTABLE  R2 = {} (0 items)
  0009  GETTABLE  R3 = R0[K2('m_config')]
  0010  GETTABLE  R3 = R3[K3('arrConfigData')]
  0011  TEST      if not R3 then   -> -131058
  0012  JMP       (jump)   -> 14
  0013  NEWTABLE  R3 = {} (0 items)
  0014  LOADNIL   R4..R4 = nil
  0015  SELF      R7 = R0[K4('GetCurrentStep')] (self)
  0016  CALL      R6 = call(R6, 1 args, 1 rets)
  0017  MOVE      R7 = R0
  0018  LEN       R8 = len R0
  0019  LOADK     R9 = K5 1
  0020  FORPREP   forprep R7(sBx=26)   -> 47
  0021  SELF      R12 = R0[K6('GetStepConfig')] (self)
  0022  MOVE      R13 = R0
  0023  CALL      R11 = call(R11, 1 args, 2 rets)
  0024  MOVE      R4 = R0
  0025  TEST      if not R4 then   -> -131045
  0026  JMP       (jump)   -> 48
  0027  SELF      R12 = R4[K7('GetPrice')] (self)
  0028  CALL      R11 = call(R11, 1 args, 1 rets)
  0029  MOVE      R5 = R0
  0030  TEST      if not R5 then   -> -131040
  0031  JMP       (jump)   -> 48
  0032  EQ        if R0 eq K8(0)   -> -128214
  0033  JMP       (jump)   -> 48
  0034  GETTABUP  R11 = _ENV[K9('Table')]
  0035  GETTABLE  R11 = R11[K10('ListMerge')]
  0036  MOVE      R12 = R0
  0037  SELF      R14 = R4[K11('GetGoods')] (self)
  0038  CALL      R13 = call(R13, -1 args, 1 rets)
  0039  CALL      R11 = call(R11, 1 args, -1 rets)
  0040  MOVE      R2 = R0
  0041  SELF      R12 = R0[K12('BuyStep')] (self)
  0042  MOVE      R13 = R0
  0043  LOADBOOL  R14 = true
  0044  CALL      R11 = call(R11, 0 args, 3 rets)
  0045  JMP       (jump)   -> 47
  0046  JMP       (jump)   -> 48
  0047  FORLOOP   forloop R7(sBx=-27)   -> 21
  0048  RETURN    return R2..R1
  0049  RETURN    return R0..R-1
; ---------- proto10 [IsActive] ----------
  ; fn ?  line 170-177 np=1 va=0 ms=4 code=20 consts=8 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ShopModel'
  ;   K[2]='IsEnergyFreeRefill'
  ;   K[3]='EnergyType'
  ;   K[4]='Main'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   upvals: _ENV
  ;   locals: self(0-20)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('ShopModel')]
  0002  SELF      R2 = R1[K2('IsEnergyFreeRefill')] (self)
  0003  GETTABUP  R3 = _ENV[K3('EnergyType')]
  0004  GETTABLE  R3 = R3[K4('Main')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  TEST      if not R1 then   -> -131064
  0007  JMP       (jump)   -> 10
  0008  LOADBOOL  R1 = false
  0009  RETURN    return R1..R0
  0010  SELF      R2 = R0[K5('GetState')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  GETTABUP  R2 = _ENV[K6('ActivityState')]
  0013  GETTABLE  R2 = R2[K7('Started')]
  0014  EQ        if R1 eq R2   -> -130542
  0015  JMP       (jump)   -> 17
  0016  LOADBOOL  R1 = false
  0017  LOADBOOL  R1 = true
  0018  RETURN    return R1..R0
  0019  RETURN    return R0..R-1
; ---------- proto11 [GetConfigs] ----------
  ; fn ?  line 179-181 np=1 va=0 ms=2 code=10 consts=2 upvals=0 protos=0
  ;   K[0]='m_config'
  ;   K[1]='arrConfigData'
  ;   locals: self(0-10)
  0000  GETTABLE  R1 = R0[K0('m_config')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 7
  0003  GETTABLE  R1 = R0[K0('m_config')]
  0004  GETTABLE  R1 = R1[K1('arrConfigData')]
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 8
  0007  NEWTABLE  R1 = {} (0 items)
  0008  RETURN    return R1..R0
  0009  RETURN    return R0..R-1
; ---------- proto12 [GetCurrentStep] ----------
  ; fn ?  line 183-203 np=1 va=0 ms=8 code=35 consts=13 upvals=2 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='GetInNumber'
  ;   K[2]='Step'
  ;   K[3]='DB_VALUE_KEY'
  ;   K[4]=1
  ;   K[5]='m_config'
  ;   K[6]='arrConfigData'
  ;   K[7]='Table'
  ;   K[8]='IsEmpty'
  ;   K[9]='Log'
  ;   K[10]='Error'
  ;   K[11]='[GemChain]GetCurChainEnergyStep错误，配置不存在'
  ;   K[12]='Set'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-35), step(5-35), arrConfigData(11-35)
  0000  GETTABLE  R1 = R0[K0('m_dbTable')]
  0001  SELF      R2 = R1[K1('GetInNumber')] (self)
  0002  GETTABUP  R3 = DBKey[K2('Step')]
  0003  GETTABUP  R4 = _ENV[K3('DB_VALUE_KEY')]
  0004  CALL      R1 = call(R1, 1 args, 3 rets)
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 9
  0007  LOADK     R2 = K4 1
  0008  RETURN    return R2..R1
  0009  GETTABLE  R2 = R0[K5('m_config')]
  0010  GETTABLE  R2 = R2[K6('arrConfigData')]
  0011  GETTABUP  R3 = _ENV[K7('Table')]
  0012  GETTABLE  R3 = R3[K8('IsEmpty')]
  0013  MOVE      R4 = R0
  0014  CALL      R3 = call(R3, 1 args, 1 rets)
  0015  TEST      if not R3 then   -> -131055
  0016  JMP       (jump)   -> 23
  0017  GETTABUP  R3 = _ENV[K9('Log')]
  0018  GETTABLE  R3 = R3[K10('Error')]
  0019  LOADK     R4 = K11 '[GemChain]GetCurChainEnergyStep错误，配置不存在'
  0020  CALL      R3 = call(R3, 0 args, 1 rets)
  0021  LOADK     R3 = K4 1
  0022  RETURN    return R3..R2
  0023  LEN       R3 = len R0
  0024  LT        if R0 lt R1   -> -129509
  0025  JMP       (jump)   -> 33
  0026  LEN       R1 = len R0
  0027  GETTABLE  R3 = R0[K0('m_dbTable')]
  0028  SELF      R4 = R3[K12('Set')] (self)
  0029  GETTABUP  R5 = DBKey[K2('Step')]
  0030  GETTABUP  R6 = _ENV[K3('DB_VALUE_KEY')]
  0031  MOVE      R7 = R0
  0032  CALL      R3 = call(R3, 0 args, 4 rets)
  0033  RETURN    return R1..R0
  0034  RETURN    return R0..R-1
; ---------- proto13 [GetStepConfig] ----------
  ; fn ?  line 205-221 np=2 va=0 ms=8 code=35 consts=9 upvals=1 protos=0
  ;   K[0]='m_config'
  ;   K[1]='arrConfigData'
  ;   K[2]='GetLastPayStep'
  ;   K[3]=1
  ;   K[4]='Log'
  ;   K[5]='Assert'
  ;   K[6]='逻辑错误2'
  ;   K[7]='Error'
  ;   K[8]='逻辑错误3'
  ;   upvals: _ENV
  ;   locals: self(0-35), step(0-35), arrConfig(5-35), delta(17-28), lastPayStep(19-28)
  0000  GETTABLE  R2 = R0[K0('m_config')]
  0001  GETTABLE  R2 = R2[K1('arrConfigData')]
  0002  TEST      if not R2 then   -> -131067
  0003  JMP       (jump)   -> 5
  0004  NEWTABLE  R2 = {} (0 items)
  0005  GETTABLE  R3 = R2[R1]
  0006  TEST      if not R3 then   -> -131064
  0007  JMP       (jump)   -> 10
  0008  GETTABLE  R3 = R2[R1]
  0009  RETURN    return R3..R2
  0010  TEST      if not R1 then   -> -131060
  0011  JMP       (jump)   -> 28
  0012  LEN       R3 = len R0
  0013  LT        if R0 lt R1   -> -129520
  0014  JMP       (jump)   -> 28
  0015  LEN       R3 = len R0
  0016  SUB       R3 = R3 sub R1
  0017  SELF      R5 = R0[K2('GetLastPayStep')] (self)
  0018  CALL      R4 = call(R4, 1 args, 1 rets)
  0019  ADD       R5 = R3 add R4
  0020  SUB       R1 = K3(1) sub R5
  0021  GETTABUP  R5 = _ENV[K4('Log')]
  0022  GETTABLE  R5 = R5[K5('Assert')]
  0023  GETTABLE  R6 = R2[R1]
  0024  LOADK     R7 = K6 '逻辑错误2'
  0025  CALL      R5 = call(R5, 0 args, 2 rets)
  0026  GETTABLE  R5 = R2[R1]
  0027  RETURN    return R5..R4
  0028  GETTABUP  R3 = _ENV[K4('Log')]
  0029  GETTABLE  R3 = R3[K7('Error')]
  0030  LOADK     R4 = K8 '逻辑错误3'
  0031  CALL      R3 = call(R3, 0 args, 1 rets)
  0032  GETTABLE  R3 = R2[K3(1)]
  0033  RETURN    return R3..R2
  0034  RETURN    return R0..R-1
; ---------- proto14 [GetLastPayStep] ----------
  ; fn ?  line 223-233 np=1 va=0 ms=8 code=28 consts=9 upvals=1 protos=0
  ;   K[0]='m_config'
  ;   K[1]='arrConfigData'
  ;   K[2]=1
  ;   K[3]=-1
  ;   K[4]='GetPrice'
  ;   K[5]=0
  ;   K[6]='Log'
  ;   K[7]='Error'
  ;   K[8]='钻石链式没有任何付费节点！'
  ;   upvals: _ENV
  ;   locals: self(0-28), arrConfig(5-28), (for index)(8-21), (for limit)(8-21), (for step)(8-21), i(9-20)
  0000  GETTABLE  R1 = R0[K0('m_config')]
  0001  GETTABLE  R1 = R1[K1('arrConfigData')]
  0002  TEST      if not R1 then   -> -131067
  0003  JMP       (jump)   -> 5
  0004  NEWTABLE  R1 = {} (0 items)
  0005  LEN       R2 = len R0
  0006  LOADK     R3 = K2 1
  0007  LOADK     R4 = K3 -1
  0008  FORPREP   forprep R2(sBx=11)   -> 20
  0009  GETTABLE  R6 = R1[R5]
  0010  SELF      R7 = R6[K4('GetPrice')] (self)
  0011  CALL      R6 = call(R6, 1 args, 1 rets)
  0012  TEST      if not R6 then   -> -131058
  0013  JMP       (jump)   -> 20
  0014  GETTABLE  R6 = R1[R5]
  0015  SELF      R7 = R6[K4('GetPrice')] (self)
  0016  CALL      R6 = call(R6, 1 args, 1 rets)
  0017  LT        if R0 lt R6   -> 2585
  0018  JMP       (jump)   -> 20
  0019  RETURN    return R5..R4
  0020  FORLOOP   forloop R2(sBx=-12)   -> 9
  0021  GETTABUP  R2 = _ENV[K6('Log')]
  0022  GETTABLE  R2 = R2[K7('Error')]
  0023  LOADK     R3 = K8 '钻石链式没有任何付费节点！'
  0024  CALL      R2 = call(R2, 0 args, 1 rets)
  0025  LOADK     R2 = K2 1
  0026  RETURN    return R2..R1
  0027  RETURN    return R0..R-1
; ---------- proto15 [BuyStep] ----------
  ; fn ?  line 235-280 np=3 va=0 ms=15 code=101 consts=46 upvals=2 protos=0
  ;   K[0]='IsActive'
  ;   K[1]='Log'
  ;   K[2]='Error'
  ;   K[3]='[钻石链式礼包]功能未开启'
  ;   K[4]='GetCurrentStep'
  ;   K[5]='[钻石链式礼包]step不一致，当前'
  ;   K[6]=', 目标'
  ;   K[7]='m_config'
  ;   K[8]='arrConfigData'
  ;   K[9]='[钻石链式礼包]逻辑有误'
  ;   K[10]='math'
  ;   K[11]='ceil'
  ;   K[12]='GetPrice'
  ;   K[13]='GM'
  ;   K[14]='PropertyDataManager'
  ;   K[15]='Consume'
  ;   K[16]='EPropertyType'
  ;   K[17]='Gem'
  ;   K[18]='EBIType'
  ;   K[19]='GemChain'
  ;   K[20]='[钻石链式礼包]钻石不足'
  ;   K[21]='GetGoods'
  ;   K[22]='RewardApi'
  ;   K[23]='AcquireRewardsLogic'
  ;   K[24]='EPropertySource'
  ;   K[25]='Buy'
  ;   K[26]='ERewardScene'
  ;   K[27]='Other'
  ;   K[28]='EGameMode'
  ;   K[29]='Board'
  ;   K[30]='CacheItemType'
  ;   K[31]='Stack'
  ;   K[32]=1
  ;   K[33]='GetLastPayStep'
  ;   K[34]='m_dbTable'
  ;   K[35]='Set'
  ;   K[36]='Step'
  ;   K[37]='DB_VALUE_KEY'
  ;   K[38]=0
  ;   K[39]='EventDispatcher'
  ;   K[40]='DispatchEvent'
  ;   K[41]='EEventType'
  ;   K[42]='BuyEnergySuccess'
  ;   K[43]='buyGemCost'
  ;   K[44]='delay'
  ;   K[45]=2.5
  ;   upvals: _ENV, DBKey
  ;   locals: self(0-101), step(0-101), recover(0-101), curStep(14-101), arrConfigData(28-101), configData(29-101), price(42-101), reward(61-101), nextStep(76-101)
  0000  SELF      R4 = R0[K0('IsActive')] (self)
  0001  CALL      R3 = call(R3, 1 args, 1 rets)
  0002  TEST      if not R3 then   -> -131067
  0003  JMP       (jump)   -> 12
  0004  TEST      if not R2 then   -> -131065
  0005  JMP       (jump)   -> 12
  0006  GETTABUP  R3 = _ENV[K1('Log')]
  0007  GETTABLE  R3 = R3[K2('Error')]
  0008  LOADK     R4 = K3 '[钻石链式礼包]功能未开启'
  0009  CALL      R3 = call(R3, 0 args, 1 rets)
  0010  LOADBOOL  R3 = false
  0011  RETURN    return R3..R2
  0012  SELF      R4 = R0[K4('GetCurrentStep')] (self)
  0013  CALL      R3 = call(R3, 1 args, 1 rets)
  0014  EQ        if R1 eq R1   -> -129519
  0015  JMP       (jump)   -> 26
  0016  GETTABUP  R4 = _ENV[K1('Log')]
  0017  GETTABLE  R4 = R4[K2('Error')]
  0018  LOADK     R5 = K5 '[钻石链式礼包]step不一致，当前'
  0019  MOVE      R6 = R0
  0020  LOADK     R7 = K6 ', 目标'
  0021  MOVE      R8 = R0
  0022  CONCAT    R5 = concat(R5..R5)
  0023  CALL      R4 = call(R4, 0 args, 1 rets)
  0024  LOADBOOL  R4 = false
  0025  RETURN    return R4..R3
  0026  GETTABLE  R4 = R0[K7('m_config')]
  0027  GETTABLE  R4 = R4[K8('arrConfigData')]
  0028  GETTABLE  R5 = R4[R3]
  0029  TEST      if not R5 then   -> -131040
  0030  JMP       (jump)   -> 37
  0031  GETTABUP  R6 = _ENV[K1('Log')]
  0032  GETTABLE  R6 = R6[K2('Error')]
  0033  LOADK     R7 = K9 '[钻石链式礼包]逻辑有误'
  0034  CALL      R6 = call(R6, 0 args, 1 rets)
  0035  LOADBOOL  R6 = false
  0036  RETURN    return R6..R5
  0037  GETTABUP  R6 = _ENV[K10('math')]
  0038  GETTABLE  R6 = R6[K11('ceil')]
  0039  SELF      R8 = R5[K12('GetPrice')] (self)
  0040  CALL      R7 = call(R7, -1 args, 1 rets)
  0041  CALL      R6 = call(R6, 1 args, -1 rets)
  0042  GETTABUP  R7 = _ENV[K13('GM')]
  0043  GETTABLE  R7 = R7[K14('PropertyDataManager')]
  0044  SELF      R8 = R7[K15('Consume')] (self)
  0045  GETTABUP  R9 = _ENV[K16('EPropertyType')]
  0046  GETTABLE  R9 = R9[K17('Gem')]
  0047  MOVE      R10 = R0
  0048  GETTABUP  R11 = _ENV[K18('EBIType')]
  0049  GETTABLE  R11 = R11[K19('GemChain')]
  0050  CALL      R7 = call(R7, 1 args, 4 rets)
  0051  TEST      if not R7 then   -> -131018
  0052  JMP       (jump)   -> 59
  0053  GETTABUP  R7 = _ENV[K1('Log')]
  0054  GETTABLE  R7 = R7[K2('Error')]
  0055  LOADK     R8 = K20 '[钻石链式礼包]钻石不足'
  0056  CALL      R7 = call(R7, 0 args, 1 rets)
  0057  LOADBOOL  R7 = false
  0058  RETURN    return R7..R6
  0059  SELF      R8 = R5[K21('GetGoods')] (self)
  0060  CALL      R7 = call(R7, 1 args, 1 rets)
  0061  GETTABUP  R8 = _ENV[K22('RewardApi')]
  0062  GETTABLE  R8 = R8[K23('AcquireRewardsLogic')]
  0063  MOVE      R9 = R0
  0064  GETTABUP  R10 = _ENV[K24('EPropertySource')]
  0065  GETTABLE  R10 = R10[K25('Buy')]
  0066  GETTABUP  R11 = _ENV[K18('EBIType')]
  0067  GETTABLE  R11 = R11[K19('GemChain')]
  0068  GETTABUP  R12 = _ENV[K26('ERewardScene')]
  0069  GETTABLE  R12 = R12[K27('Other')]
  0070  GETTABUP  R13 = _ENV[K28('EGameMode')]
  0071  GETTABLE  R13 = R13[K29('Board')]
  0072  GETTABUP  R14 = _ENV[K30('CacheItemType')]
  0073  GETTABLE  R14 = R14[K31('Stack')]
  0074  CALL      R8 = call(R8, 0 args, 6 rets)
  0075  ADD       R8 = K32(1) add R3
  0076  LEN       R9 = len R0
  0077  LT        if R0 lt R8   -> -126377
  0078  JMP       (jump)   -> 82
  0079  SELF      R10 = R0[K33('GetLastPayStep')] (self)
  0080  CALL      R9 = call(R9, 1 args, 1 rets)
  0081  MOVE      R8 = R0
  0082  GETTABLE  R9 = R0[K34('m_dbTable')]
  0083  SELF      R10 = R9[K35('Set')] (self)
  0084  GETTABUP  R11 = DBKey[K36('Step')]
  0085  GETTABUP  R12 = _ENV[K37('DB_VALUE_KEY')]
  0086  MOVE      R13 = R0
  0087  CALL      R9 = call(R9, 0 args, 4 rets)
  0088  LT        if R0 lt R6   -> 19552
  0089  JMP       (jump)   -> 98
  0090  GETTABUP  R9 = _ENV[K39('EventDispatcher')]
  0091  GETTABLE  R9 = R9[K40('DispatchEvent')]
  0092  GETTABUP  R10 = _ENV[K41('EEventType')]
  0093  GETTABLE  R10 = R10[K42('BuyEnergySuccess')]
  0094  NEWTABLE  R11 = {} (0 items)
  0095  SETTABLE  R11[K43('buyGemCost')] = R6
  0096  SETTABLE  R11[K44('delay')] = K45(2.5)
  0097  CALL      R9 = call(R9, 0 args, 2 rets)
  0098  LOADBOOL  R9 = true
  0099  RETURN    return R9..R8
  0100  RETURN    return R0..R-1
