# Model_Bundle_BundleMultiTierModel_128.luac
; fn @BundleMultiTierModel.lua  line 0-0 np=0 va=1 ms=5 code=59 consts=26 upvals=1 protos=15
;   K[0]='CurGearBundleId'
;   K[1]='curGearBundleId'
;   K[2]='MissedNum'
;   K[3]='missedNum'
;   K[4]='LastGear'
;   K[5]='lastGear'
;   K[6]='defaultOrder'
;   K[7]='BundleMultiTierModel'
;   K[8]='setmetatable'
;   K[9]='BundleActivityBaseModel'
;   K[10]='__index'
;   K[11]='Init'
;   K[12]='GetShopContainerConfig'
;   K[13]='BuyBundle'
;   K[14]='_OnPurchaseFinished'
;   K[15]='GetCurBundleGemByDataGroup'
;   K[16]='GetCurBundleDatas'
;   K[17]='OnBundleStateChanged'
;   K[18]='_AdjustGear'
;   K[19]='SetLastBoughtGear'
;   K[20]='GetLastBoughtGear'
;   K[21]='SetMissedNum'
;   K[22]='GetMissedNum'
;   K[23]='_OnPropertyAcquired'
;   K[24]='_GetBundleIndex'
;   K[25]='_GetCurGearIndex'
;   upvals: _ENV
;   locals: DBKey(4-59), defaultOrderConfType(5-59)
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABLE  R0[K0('CurGearBundleId')] = K1('curGearBundleId')
0002  SETTABLE  R0[K2('MissedNum')] = K3('missedNum')
0003  SETTABLE  R0[K4('LastGear')] = K5('lastGear')
0004  LOADK     R1 = K6 'defaultOrder'
0005  GETTABUP  R2 = _ENV[K8('setmetatable')]
0006  NEWTABLE  R3 = {} (0 items)
0007  GETTABUP  R4 = _ENV[K9('BundleActivityBaseModel')]
0008  CALL      R2 = call(R2, 1 args, 2 rets)
0009  SETTABUP  _ENV[K7('BundleMultiTierModel')] = R2
0010  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0011  GETTABUP  R3 = _ENV[K7('BundleMultiTierModel')]
0012  SETTABLE  R2[K10('__index')] = R3
0013  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0014  CLOSURE   R3 = closure proto0
0015  SETTABLE  R2[K11('Init')] = R3
0016  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0017  CLOSURE   R3 = closure proto1
0018  SETTABLE  R2[K12('GetShopContainerConfig')] = R3
0019  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0020  CLOSURE   R3 = closure proto2
0021  SETTABLE  R2[K13('BuyBundle')] = R3
0022  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0023  CLOSURE   R3 = closure proto3
0024  SETTABLE  R2[K14('_OnPurchaseFinished')] = R3
0025  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0026  CLOSURE   R3 = closure proto4
0027  SETTABLE  R2[K15('GetCurBundleGemByDataGroup')] = R3
0028  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0029  CLOSURE   R3 = closure proto5
0030  SETTABLE  R2[K16('GetCurBundleDatas')] = R3
0031  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0032  CLOSURE   R3 = closure proto6
0033  SETTABLE  R2[K17('OnBundleStateChanged')] = R3
0034  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0035  CLOSURE   R3 = closure proto7
0036  SETTABLE  R2[K18('_AdjustGear')] = R3
0037  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0038  CLOSURE   R3 = closure proto8
0039  SETTABLE  R2[K19('SetLastBoughtGear')] = R3
0040  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0041  CLOSURE   R3 = closure proto9
0042  SETTABLE  R2[K20('GetLastBoughtGear')] = R3
0043  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0044  CLOSURE   R3 = closure proto10
0045  SETTABLE  R2[K21('SetMissedNum')] = R3
0046  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0047  CLOSURE   R3 = closure proto11
0048  SETTABLE  R2[K22('GetMissedNum')] = R3
0049  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0050  CLOSURE   R3 = closure proto12
0051  SETTABLE  R2[K23('_OnPropertyAcquired')] = R3
0052  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0053  CLOSURE   R3 = closure proto13
0054  SETTABLE  R2[K24('_GetBundleIndex')] = R3
0055  GETTABUP  R2 = _ENV[K7('BundleMultiTierModel')]
0056  CLOSURE   R3 = closure proto14
0057  SETTABLE  R2[K25('_GetCurGearIndex')] = R3
0058  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 16-20 np=1 va=1 ms=5 code=13 consts=7 upvals=1 protos=0
  ;   K[0]='BundleActivityBaseModel'
  ;   K[1]='Init'
  ;   K[2]='EventDispatcher'
  ;   K[3]='AddListener'
  ;   K[4]='EEventType'
  ;   K[5]='PropertyAcquired'
  ;   K[6]='_OnPropertyAcquired'
  ;   upvals: _ENV
  ;   locals: self(0-13)
  0000  GETTABUP  R1 = _ENV[K0('BundleActivityBaseModel')]
  0001  GETTABLE  R1 = R1[K1('Init')]
  0002  MOVE      R2 = R0
  0003  VARARG    R3 = vararg(0)
  0004  CALL      R1 = call(R1, 0 args, -1 rets)
  0005  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0006  GETTABLE  R1 = R1[K3('AddListener')]
  0007  GETTABUP  R2 = _ENV[K4('EEventType')]
  0008  GETTABLE  R2 = R2[K5('PropertyAcquired')]
  0009  MOVE      R3 = R0
  0010  GETTABLE  R4 = R0[K6('_OnPropertyAcquired')]
  0011  CALL      R1 = call(R1, 0 args, 3 rets)
  0012  RETURN    return R0..R-1
; ---------- proto1 [GetShopContainerConfig] ----------
  ; fn ?  line 23-30 np=1 va=0 ms=3 code=8 consts=4 upvals=1 protos=1
  ;   K[0]='shopType'
  ;   K[1]='EShopType'
  ;   K[2]='MultiTierBundle'
  ;   K[3]='checkFun'
  ;   upvals: _ENV
  ;   locals: self(0-8)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  GETTABUP  R2 = _ENV[K1('EShopType')]
  0002  GETTABLE  R2 = R2[K2('MultiTierBundle')]
  0003  SETTABLE  R1[K0('shopType')] = R2
  0004  CLOSURE   R2 = closure proto0
  0005  SETTABLE  R1[K3('checkFun')] = R2
  0006  RETURN    return R1..R0
  0007  RETURN    return R0..R-1
  ; ---------- proto0 [checkFun] ----------
    ; fn ?  line 26-28 np=1 va=0 ms=4 code=12 consts=3 upvals=2 protos=0
    ;   K[0]='GetBundleState'
    ;   K[1]='EBundleState'
    ;   K[2]='Opening'
    ;   upvals: self, _ENV
    ;   locals: dataGroup(0-12)
    0000  GETUPVAL  R1 = self
    0001  SELF      R2 = R1[K0('GetBundleState')] (self)
    0002  MOVE      R3 = R0
    0003  CALL      R1 = call(R1, 1 args, 2 rets)
    0004  GETTABUP  R2 = _ENV[K1('EBundleState')]
    0005  GETTABLE  R2 = R2[K2('Opening')]
    0006  EQ        if R1 eq R2   -> -130550
    0007  JMP       (jump)   -> 9
    0008  LOADBOOL  R1 = false
    0009  LOADBOOL  R1 = true
    0010  RETURN    return R1..R0
    0011  RETURN    return R0..R-1
; ---------- proto2 [BuyBundle] ----------
  ; fn ?  line 32-34 np=3 va=0 ms=8 code=8 consts=4 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='BundleManager'
  ;   K[2]='Buy'
  ;   K[3]='m_bundleType'
  ;   upvals: _ENV
  ;   locals: self(0-8), bundleData(0-8), callback(0-8)
  0000  GETTABUP  R3 = _ENV[K0('GM')]
  0001  GETTABLE  R3 = R3[K1('BundleManager')]
  0002  SELF      R4 = R3[K2('Buy')] (self)
  0003  GETTABLE  R5 = R0[K3('m_bundleType')]
  0004  MOVE      R6 = R0
  0005  MOVE      R7 = R0
  0006  CALL      R3 = call(R3, 0 args, 4 rets)
  0007  RETURN    return R0..R-1
; ---------- proto3 [_OnPurchaseFinished] ----------
  ; fn ?  line 36-45 np=3 va=0 ms=11 code=20 consts=7 upvals=1 protos=0
  ;   K[0]='BundleActivityBaseModel'
  ;   K[1]='_OnPurchaseFinished'
  ;   K[2]='GetGroupId'
  ;   K[3]='SetLastBoughtGear'
  ;   K[4]='_GetBundleIndex'
  ;   K[5]='SetMissedNum'
  ;   K[6]=0
  ;   upvals: _ENV
  ;   locals: self(0-20), dataGroup(0-20), bundleId(0-20), groupId(8-20)
  0000  GETTABUP  R3 = _ENV[K0('BundleActivityBaseModel')]
  0001  GETTABLE  R3 = R3[K1('_OnPurchaseFinished')]
  0002  MOVE      R4 = R0
  0003  MOVE      R5 = R0
  0004  MOVE      R6 = R0
  0005  CALL      R3 = call(R3, 0 args, 3 rets)
  0006  SELF      R4 = R1[K2('GetGroupId')] (self)
  0007  CALL      R3 = call(R3, 1 args, 1 rets)
  0008  SELF      R5 = R0[K3('SetLastBoughtGear')] (self)
  0009  MOVE      R6 = R0
  0010  SELF      R8 = R0[K4('_GetBundleIndex')] (self)
  0011  MOVE      R9 = R0
  0012  MOVE      R10 = R0
  0013  CALL      R7 = call(R7, -1 args, 3 rets)
  0014  CALL      R4 = call(R4, 0 args, -1 rets)
  0015  SELF      R5 = R0[K5('SetMissedNum')] (self)
  0016  MOVE      R6 = R0
  0017  LOADK     R7 = K6 0
  0018  CALL      R4 = call(R4, 0 args, 3 rets)
  0019  RETURN    return R0..R-1
; ---------- proto4 [GetCurBundleGemByDataGroup] ----------
  ; fn ?  line 48-68 np=2 va=0 ms=18 code=48 consts=12 upvals=1 protos=0
  ;   K[0]='GetCurBundleDatas'
  ;   K[1]='ipairs'
  ;   K[2]=0
  ;   K[3]='GetGoods'
  ;   K[4]='pairs'
  ;   K[5]='PROPERTY_TYPE'
  ;   K[6]='EPropertyType'
  ;   K[7]='Gem'
  ;   K[8]='PROPERTY_COUNT'
  ;   K[9]=nil
  ;   K[10]='math'
  ;   K[11]='min'
  ;   upvals: _ENV
  ;   locals: self(0-48), dataGroup(0-48), arrBundles(6-48), gemNum(7-48), (for generator)(10-43), (for state)(10-43), (for control)(10-43), _(11-41), bundleData(11-41), tempGemNum(12-41), goods(14-41), (for generator)(19-31), (for state)(19-31), (for control)(19-31), _(20-29), v(20-29)
  0000  SELF      R3 = R0[K0('GetCurBundleDatas')] (self)
  0001  MOVE      R4 = R0
  0002  CALL      R2 = call(R2, 1 args, 2 rets)
  0003  TEST      if not R2 then   -> -131066
  0004  JMP       (jump)   -> 6
  0005  NEWTABLE  R2 = {} (0 items)
  0006  LOADNIL   R3..R3 = nil
  0007  GETTABUP  R4 = _ENV[K1('ipairs')]
  0008  MOVE      R5 = R0
  0009  CALL      R4 = call(R4, 3 args, 1 rets)
  0010  JMP       (jump)   -> 41
  0011  LOADK     R9 = K2 0
  0012  SELF      R11 = R8[K3('GetGoods')] (self)
  0013  CALL      R10 = call(R10, 1 args, 1 rets)
  0014  GETTABUP  R11 = _ENV[K4('pairs')]
  0015  TESTSET   if R1 then R12   -> -125934
  0016  JMP       (jump)   -> 18
  0017  NEWTABLE  R12 = {} (0 items)
  0018  CALL      R11 = call(R11, 3 args, 1 rets)
  0019  JMP       (jump)   -> 29
  0020  GETTABUP  R16 = _ENV[K5('PROPERTY_TYPE')]
  0021  GETTABLE  R16 = R15[R16]
  0022  GETTABUP  R17 = _ENV[K6('EPropertyType')]
  0023  GETTABLE  R17 = R17[K7('Gem')]
  0024  EQ        if R0 eq R17   -> -122837
  0025  JMP       (jump)   -> 29
  0026  GETTABUP  R16 = _ENV[K8('PROPERTY_COUNT')]
  0027  GETTABLE  R16 = R15[R16]
  0028  ADD       R9 = R16 add R9
  0029  TFORCALL  tforcall R11
  0030  TFORLOOP  tforloop R13(sBx=-11)   -> 20
  0031  EQ        if R0 eq K9(nil)   -> -129238
  0032  JMP       (jump)   -> 35
  0033  MOVE      R3 = R0
  0034  JMP       (jump)   -> 41
  0035  GETTABUP  R11 = _ENV[K10('math')]
  0036  GETTABLE  R11 = R11[K11('min')]
  0037  MOVE      R12 = R0
  0038  MOVE      R13 = R0
  0039  CALL      R11 = call(R11, 1 args, 2 rets)
  0040  MOVE      R3 = R0
  0041  TFORCALL  tforcall R4
  0042  TFORLOOP  tforloop R6(sBx=-32)   -> 11
  0043  TESTSET   if R1 then R4   -> -129490
  0044  JMP       (jump)   -> 46
  0045  LOADK     R4 = K2 0
  0046  RETURN    return R4..R3
  0047  RETURN    return R0..R-1
; ---------- proto5 [GetCurBundleDatas] ----------
  ; fn ?  line 71-81 np=2 va=0 ms=15 code=27 consts=9 upvals=1 protos=0
  ;   K[0]='GetBundleIds'
  ;   K[1]='_GetCurGearIndex'
  ;   K[2]='ipairs'
  ;   K[3]='math'
  ;   K[4]='abs'
  ;   K[5]=1
  ;   K[6]='table'
  ;   K[7]='insert'
  ;   K[8]='GetConfigData'
  ;   upvals: _ENV
  ;   locals: self(0-27), dataGroup(0-27), bundleIds(2-27), bundleDatas(3-27), curGearIndex(6-27), (for generator)(9-25), (for state)(9-25), (for control)(9-25), i(10-23), _(10-23)
  0000  SELF      R3 = R1[K0('GetBundleIds')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  NEWTABLE  R3 = {} (0 items)
  0003  SELF      R5 = R0[K1('_GetCurGearIndex')] (self)
  0004  MOVE      R6 = R0
  0005  CALL      R4 = call(R4, 1 args, 2 rets)
  0006  GETTABUP  R5 = _ENV[K2('ipairs')]
  0007  MOVE      R6 = R0
  0008  CALL      R5 = call(R5, 3 args, 1 rets)
  0009  JMP       (jump)   -> 23
  0010  GETTABUP  R10 = _ENV[K3('math')]
  0011  GETTABLE  R10 = R10[K4('abs')]
  0012  SUB       R11 = R4 sub R8
  0013  CALL      R10 = call(R10, 1 args, 1 rets)
  0014  LE        if R0 le K5(1)   -> -125675
  0015  JMP       (jump)   -> 23
  0016  GETTABUP  R10 = _ENV[K6('table')]
  0017  GETTABLE  R10 = R10[K7('insert')]
  0018  MOVE      R11 = R0
  0019  SELF      R13 = R1[K8('GetConfigData')] (self)
  0020  GETTABLE  R14 = R2[R8]
  0021  CALL      R12 = call(R12, -1 args, 2 rets)
  0022  CALL      R10 = call(R10, 0 args, -1 rets)
  0023  TFORCALL  tforcall R5
  0024  TFORLOOP  tforloop R7(sBx=-15)   -> 10
  0025  RETURN    return R3..R2
  0026  RETURN    return R0..R-1
; ---------- proto6 [OnBundleStateChanged] ----------
  ; fn ?  line 83-93 np=3 va=0 ms=10 code=28 consts=10 upvals=1 protos=0
  ;   K[0]='BundleActivityBaseModel'
  ;   K[1]='OnBundleStateChanged'
  ;   K[2]='GetBundleState'
  ;   K[3]='EBundleState'
  ;   K[4]='Opening'
  ;   K[5]='_AdjustGear'
  ;   K[6]='GetGroupId'
  ;   K[7]='SetMissedNum'
  ;   K[8]='GetMissedNum'
  ;   K[9]=1
  ;   upvals: _ENV
  ;   locals: self(0-28), dataGroup(0-28), bTrigger(0-28), groupId(20-27)
  0000  GETTABUP  R3 = _ENV[K0('BundleActivityBaseModel')]
  0001  GETTABLE  R3 = R3[K1('OnBundleStateChanged')]
  0002  MOVE      R4 = R0
  0003  MOVE      R5 = R0
  0004  MOVE      R6 = R0
  0005  CALL      R3 = call(R3, 0 args, 3 rets)
  0006  TEST      if not R2 then   -> -131064
  0007  JMP       (jump)   -> 27
  0008  SELF      R4 = R0[K2('GetBundleState')] (self)
  0009  MOVE      R5 = R0
  0010  CALL      R3 = call(R3, 1 args, 2 rets)
  0011  GETTABUP  R4 = _ENV[K3('EBundleState')]
  0012  GETTABLE  R4 = R4[K4('Opening')]
  0013  EQ        if R0 eq R4   -> -129517
  0014  JMP       (jump)   -> 27
  0015  SELF      R4 = R0[K5('_AdjustGear')] (self)
  0016  MOVE      R5 = R0
  0017  CALL      R3 = call(R3, 0 args, 2 rets)
  0018  SELF      R4 = R1[K6('GetGroupId')] (self)
  0019  CALL      R3 = call(R3, 1 args, 1 rets)
  0020  SELF      R5 = R0[K7('SetMissedNum')] (self)
  0021  MOVE      R6 = R0
  0022  SELF      R8 = R0[K8('GetMissedNum')] (self)
  0023  MOVE      R9 = R0
  0024  CALL      R7 = call(R7, 1 args, 2 rets)
  0025  ADD       R7 = K9(1) add R7
  0026  CALL      R4 = call(R4, 0 args, 3 rets)
  0027  RETURN    return R0..R-1
; ---------- proto7 [_AdjustGear] ----------
  ; fn ?  line 101-120 np=2 va=0 ms=12 code=46 consts=12 upvals=1 protos=0
  ;   K[0]='GetGroupId'
  ;   K[1]='GetBundleIds'
  ;   K[2]='_GetCurGearIndex'
  ;   K[3]='GetLastBoughtGear'
  ;   K[4]=0
  ;   K[5]=1
  ;   K[6]='GetMissedNum'
  ;   K[7]=2
  ;   K[8]='SetMissedNum'
  ;   K[9]='_SetBundleDBData'
  ;   K[10]='CurGearBundleId'
  ;   K[11]='SetLastBoughtGear'
  ;   upvals: DBKey
  ;   locals: self(0-46), dataGroup(0-46), groupId(2-46), bundleIds(4-46), curGearIndex(7-46), lastBoughtGear(10-46), targetGearIndex(11-46)
  0000  SELF      R3 = R1[K0('GetGroupId')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  SELF      R4 = R1[K1('GetBundleIds')] (self)
  0003  CALL      R3 = call(R3, 1 args, 1 rets)
  0004  SELF      R5 = R0[K2('_GetCurGearIndex')] (self)
  0005  MOVE      R6 = R0
  0006  CALL      R4 = call(R4, 1 args, 2 rets)
  0007  SELF      R6 = R0[K3('GetLastBoughtGear')] (self)
  0008  MOVE      R7 = R0
  0009  CALL      R5 = call(R5, 1 args, 2 rets)
  0010  MOVE      R6 = R0
  0011  EQ        if R1 eq K4(0)   -> -128239
  0012  JMP       (jump)   -> 17
  0013  LT        if R0 lt R5   -> -129004
  0014  JMP       (jump)   -> 17
  0015  ADD       R6 = K5(1) add R6
  0016  JMP       (jump)   -> 33
  0017  EQ        if R1 eq K4(0)   -> -128233
  0018  JMP       (jump)   -> 23
  0019  LT        if R0 lt R4   -> -128487
  0020  JMP       (jump)   -> 23
  0021  SUB       R6 = K5(1) sub R6
  0022  JMP       (jump)   -> 33
  0023  SELF      R8 = R0[K6('GetMissedNum')] (self)
  0024  MOVE      R9 = R0
  0025  CALL      R7 = call(R7, 1 args, 2 rets)
  0026  LE        if R0 le R7   -> 3619
  0027  JMP       (jump)   -> 33
  0028  SUB       R6 = K5(1) sub R6
  0029  SELF      R8 = R0[K8('SetMissedNum')] (self)
  0030  MOVE      R9 = R0
  0031  LOADK     R10 = K4 0
  0032  CALL      R7 = call(R7, 0 args, 3 rets)
  0033  GETTABLE  R7 = R3[R6]
  0034  TEST      if not R7 then   -> -131036
  0035  JMP       (jump)   -> 41
  0036  SELF      R8 = R0[K9('_SetBundleDBData')] (self)
  0037  MOVE      R9 = R0
  0038  GETTABUP  R10 = DBKey[K10('CurGearBundleId')]
  0039  GETTABLE  R11 = R3[R6]
  0040  CALL      R7 = call(R7, 0 args, 4 rets)
  0041  SELF      R8 = R0[K11('SetLastBoughtGear')] (self)
  0042  MOVE      R9 = R0
  0043  LOADK     R10 = K4 0
  0044  CALL      R7 = call(R7, 0 args, 3 rets)
  0045  RETURN    return R0..R-1
; ---------- proto8 [SetLastBoughtGear] ----------
  ; fn ?  line 123-125 np=3 va=0 ms=9 code=8 consts=3 upvals=2 protos=0
  ;   K[0]='_SetBundleDBData'
  ;   K[1]='LastGear'
  ;   K[2]='tostring'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-8), groupId(0-8), gear(0-8)
  0000  SELF      R4 = R0[K0('_SetBundleDBData')] (self)
  0001  MOVE      R5 = R0
  0002  GETTABUP  R6 = DBKey[K1('LastGear')]
  0003  GETTABUP  R7 = _ENV[K2('tostring')]
  0004  MOVE      R8 = R0
  0005  CALL      R7 = call(R7, -1 args, 1 rets)
  0006  CALL      R3 = call(R3, 0 args, -1 rets)
  0007  RETURN    return R0..R-1
; ---------- proto9 [GetLastBoughtGear] ----------
  ; fn ?  line 127-129 np=2 va=0 ms=7 code=11 consts=4 upvals=2 protos=0
  ;   K[0]='tonumber'
  ;   K[1]='_GetBundleDBData'
  ;   K[2]='LastGear'
  ;   K[3]=0
  ;   upvals: _ENV, DBKey
  ;   locals: self(0-11), groupId(0-11)
  0000  GETTABUP  R2 = _ENV[K0('tonumber')]
  0001  SELF      R4 = R0[K1('_GetBundleDBData')] (self)
  0002  MOVE      R5 = R0
  0003  GETTABUP  R6 = DBKey[K2('LastGear')]
  0004  CALL      R3 = call(R3, -1 args, 3 rets)
  0005  CALL      R2 = call(R2, 1 args, -1 rets)
  0006  TEST      if not R2 then   -> -131063
  0007  JMP       (jump)   -> 9
  0008  LOADK     R2 = K3 0
  0009  RETURN    return R2..R1
  0010  RETURN    return R0..R-1
; ---------- proto10 [SetMissedNum] ----------
  ; fn ?  line 132-134 np=3 va=0 ms=9 code=8 consts=3 upvals=2 protos=0
  ;   K[0]='_SetBundleDBData'
  ;   K[1]='MissedNum'
  ;   K[2]='tostring'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-8), groupId(0-8), time(0-8)
  0000  SELF      R4 = R0[K0('_SetBundleDBData')] (self)
  0001  MOVE      R5 = R0
  0002  GETTABUP  R6 = DBKey[K1('MissedNum')]
  0003  GETTABUP  R7 = _ENV[K2('tostring')]
  0004  MOVE      R8 = R0
  0005  CALL      R7 = call(R7, -1 args, 1 rets)
  0006  CALL      R3 = call(R3, 0 args, -1 rets)
  0007  RETURN    return R0..R-1
; ---------- proto11 [GetMissedNum] ----------
  ; fn ?  line 136-138 np=2 va=0 ms=7 code=11 consts=4 upvals=2 protos=0
  ;   K[0]='tonumber'
  ;   K[1]='_GetBundleDBData'
  ;   K[2]='MissedNum'
  ;   K[3]=0
  ;   upvals: _ENV, DBKey
  ;   locals: self(0-11), groupId(0-11)
  0000  GETTABUP  R2 = _ENV[K0('tonumber')]
  0001  SELF      R4 = R0[K1('_GetBundleDBData')] (self)
  0002  MOVE      R5 = R0
  0003  GETTABUP  R6 = DBKey[K2('MissedNum')]
  0004  CALL      R3 = call(R3, -1 args, 3 rets)
  0005  CALL      R2 = call(R2, 1 args, -1 rets)
  0006  TEST      if not R2 then   -> -131063
  0007  JMP       (jump)   -> 9
  0008  LOADK     R2 = K3 0
  0009  RETURN    return R2..R1
  0010  RETURN    return R0..R-1
; ---------- proto12 [_OnPropertyAcquired] ----------
  ; fn ?  line 140-155 np=2 va=0 ms=16 code=38 consts=14 upvals=1 protos=0
  ;   K[0]=nil
  ;   K[1]='Table'
  ;   K[2]='IsEmpty'
  ;   K[3]='arrProperties'
  ;   K[4]='ipairs'
  ;   K[5]='PROPERTY_TYPE'
  ;   K[6]='EPropertyType'
  ;   K[7]='Energy'
  ;   K[8]='PROPERTY_COUNT'
  ;   K[9]=0
  ;   K[10]='pairs'
  ;   K[11]='m_dataGroups'
  ;   K[12]='SetMissedNum'
  ;   K[13]='GetGroupId'
  ;   upvals: _ENV
  ;   locals: self(0-38), msg(0-38), (for generator)(12-37), (for state)(12-37), (for control)(12-37), _(13-35), property(13-35), (for generator)(26-34), (for state)(26-34), (for control)(26-34), _(27-32), dataGroup(27-32)
  0000  EQ        if R1 eq K0(nil)   -> -130302
  0001  JMP       (jump)   -> 8
  0002  GETTABUP  R2 = _ENV[K1('Table')]
  0003  GETTABLE  R2 = R2[K2('IsEmpty')]
  0004  GETTABLE  R3 = R1[K3('arrProperties')]
  0005  CALL      R2 = call(R2, 1 args, 1 rets)
  0006  TEST      if not R2 then   -> -131064
  0007  JMP       (jump)   -> 9
  0008  RETURN    return R0..R-1
  0009  GETTABUP  R2 = _ENV[K4('ipairs')]
  0010  GETTABLE  R3 = R1[K3('arrProperties')]
  0011  CALL      R2 = call(R2, 3 args, 1 rets)
  0012  JMP       (jump)   -> 35
  0013  GETTABUP  R7 = _ENV[K5('PROPERTY_TYPE')]
  0014  GETTABLE  R7 = R6[R7]
  0015  GETTABUP  R8 = _ENV[K6('EPropertyType')]
  0016  GETTABLE  R8 = R8[K7('Energy')]
  0017  EQ        if R0 eq R8   -> -127461
  0018  JMP       (jump)   -> 35
  0019  GETTABUP  R7 = _ENV[K8('PROPERTY_COUNT')]
  0020  GETTABLE  R7 = R6[R7]
  0021  LT        if R0 lt R7   -> 4638
  0022  JMP       (jump)   -> 35
  0023  GETTABUP  R7 = _ENV[K10('pairs')]
  0024  GETTABLE  R8 = R0[K11('m_dataGroups')]
  0025  CALL      R7 = call(R7, 3 args, 1 rets)
  0026  JMP       (jump)   -> 32
  0027  SELF      R13 = R0[K12('SetMissedNum')] (self)
  0028  SELF      R15 = R11[K13('GetGroupId')] (self)
  0029  CALL      R14 = call(R14, 1 args, 1 rets)
  0030  LOADK     R15 = K9 0
  0031  CALL      R12 = call(R12, 0 args, 3 rets)
  0032  TFORCALL  tforcall R7
  0033  TFORLOOP  tforloop R9(sBx=-7)   -> 27
  0034  JMP       (jump)   -> 37
  0035  TFORCALL  tforcall R2
  0036  TFORLOOP  tforloop R4(sBx=-24)   -> 13
  0037  RETURN    return R0..R-1
; ---------- proto13 [_GetBundleIndex] ----------
  ; fn ?  line 157-163 np=3 va=0 ms=9 code=11 consts=2 upvals=1 protos=0
  ;   K[0]='ipairs'
  ;   K[1]='GetBundleIds'
  ;   upvals: _ENV
  ;   locals: self(0-11), dataGroup(0-11), bdId(0-11), (for generator)(4-10), (for state)(4-10), (for control)(4-10), index(5-8), bundleId(5-8)
  0000  GETTABUP  R3 = _ENV[K0('ipairs')]
  0001  SELF      R5 = R1[K1('GetBundleIds')] (self)
  0002  CALL      R4 = call(R4, -1 args, 1 rets)
  0003  CALL      R3 = call(R3, 3 args, -1 rets)
  0004  JMP       (jump)   -> 8
  0005  EQ        if R0 eq R2   -> -127479
  0006  JMP       (jump)   -> 8
  0007  RETURN    return R6..R5
  0008  TFORCALL  tforcall R3
  0009  TFORLOOP  tforloop R5(sBx=-5)   -> 5
  0010  RETURN    return R0..R-1
; ---------- proto14 [_GetCurGearIndex] ----------
  ; fn ?  line 165-178 np=2 va=0 ms=9 code=54 consts=17 upvals=3 protos=0
  ;   K[0]='GetGroupId'
  ;   K[1]='_GetBundleDBData'
  ;   K[2]='CurGearBundleId'
  ;   K[3]='StringUtil'
  ;   K[4]='IsNilOrEmpty'
  ;   K[5]='_GetBundleIndex'
  ;   K[6]=nil
  ;   K[7]='GetGeneralConfig'
  ;   K[8]='EConfigParamType'
  ;   K[9]='String'
  ;   K[10]='math'
  ;   K[11]='ceil'
  ;   K[12]='GetBundleIds'
  ;   K[13]=2
  ;   K[14]='max'
  ;   K[15]='min'
  ;   K[16]=1
  ;   upvals: DBKey, _ENV, defaultOrderConfType
  ;   locals: self(0-54), dataGroup(0-54), groupId(2-54), curGearBundleId(6-54), curGearIndex(37-54)
  0000  SELF      R3 = R1[K0('GetGroupId')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  SELF      R4 = R0[K1('_GetBundleDBData')] (self)
  0003  MOVE      R5 = R0
  0004  GETTABUP  R6 = DBKey[K2('CurGearBundleId')]
  0005  CALL      R3 = call(R3, 1 args, 3 rets)
  0006  GETTABUP  R4 = _ENV[K3('StringUtil')]
  0007  GETTABLE  R4 = R4[K4('IsNilOrEmpty')]
  0008  MOVE      R5 = R0
  0009  CALL      R4 = call(R4, 1 args, 1 rets)
  0010  TEST      if not R4 then   -> -131059
  0011  JMP       (jump)   -> 18
  0012  SELF      R5 = R0[K5('_GetBundleIndex')] (self)
  0013  MOVE      R6 = R0
  0014  MOVE      R7 = R0
  0015  CALL      R4 = call(R4, 1 args, 3 rets)
  0016  EQ        if R0 eq K6(nil)   -> -128744
  0017  JMP       (jump)   -> 24
  0018  SELF      R5 = R1[K7('GetGeneralConfig')] (self)
  0019  GETUPVAL  R6 = DBKey
  0020  GETTABUP  R7 = _ENV[K8('EConfigParamType')]
  0021  GETTABLE  R7 = R7[K9('String')]
  0022  CALL      R4 = call(R4, 1 args, 3 rets)
  0023  MOVE      R3 = R0
  0024  SELF      R5 = R0[K5('_GetBundleIndex')] (self)
  0025  MOVE      R6 = R0
  0026  MOVE      R7 = R0
  0027  CALL      R4 = call(R4, 1 args, 3 rets)
  0028  TEST      if not R4 then   -> -131041
  0029  JMP       (jump)   -> 37
  0030  GETTABUP  R4 = _ENV[K10('math')]
  0031  GETTABLE  R4 = R4[K11('ceil')]
  0032  SELF      R6 = R1[K12('GetBundleIds')] (self)
  0033  CALL      R5 = call(R5, 1 args, 1 rets)
  0034  LEN       R5 = len R0
  0035  DIV       R5 = K13(2) div R5
  0036  CALL      R4 = call(R4, 1 args, 1 rets)
  0037  GETTABUP  R5 = _ENV[K10('math')]
  0038  GETTABLE  R5 = R5[K14('max')]
  0039  MOVE      R6 = R0
  0040  LOADK     R7 = K13 2
  0041  CALL      R5 = call(R5, 1 args, 2 rets)
  0042  MOVE      R4 = R0
  0043  GETTABUP  R5 = _ENV[K10('math')]
  0044  GETTABLE  R5 = R5[K15('min')]
  0045  MOVE      R6 = R0
  0046  SELF      R8 = R1[K12('GetBundleIds')] (self)
  0047  CALL      R7 = call(R7, 1 args, 1 rets)
  0048  LEN       R7 = len R0
  0049  SUB       R7 = K16(1) sub R7
  0050  CALL      R5 = call(R5, 1 args, 2 rets)
  0051  MOVE      R4 = R0
  0052  RETURN    return R4..R3
  0053  RETURN    return R0..R-1
