# Model_Bundle_BundleNormalModel_126.luac
; fn @BundleNormalModel.lua  line 0-0 np=0 va=1 ms=3 code=18 consts=7 upvals=1 protos=3
;   K[0]='BundleNormalModel'
;   K[1]='setmetatable'
;   K[2]='BundleActivityBaseModel'
;   K[3]='__index'
;   K[4]='GetCurBundleData'
;   K[5]='BuyBundle'
;   K[6]='GetCurBundleGemByDataGroup'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('BundleActivityBaseModel')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('BundleNormalModel')] = R0
0005  GETTABUP  R0 = _ENV[K0('BundleNormalModel')]
0006  GETTABUP  R1 = _ENV[K0('BundleNormalModel')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('BundleNormalModel')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('GetCurBundleData')] = R1
0011  GETTABUP  R0 = _ENV[K0('BundleNormalModel')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('BuyBundle')] = R1
0014  GETTABUP  R0 = _ENV[K0('BundleNormalModel')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('GetCurBundleGemByDataGroup')] = R1
0017  RETURN    return R0..R-1
; ---------- proto0 [GetCurBundleData] ----------
  ; fn ?  line 5-7 np=2 va=0 ms=6 code=7 consts=3 upvals=0 protos=0
  ;   K[0]='GetConfigData'
  ;   K[1]='GetBundleIds'
  ;   K[2]=1
  ;   locals: self(0-7), dataGroup(0-7)
  0000  SELF      R3 = R1[K0('GetConfigData')] (self)
  0001  SELF      R5 = R1[K1('GetBundleIds')] (self)
  0002  CALL      R4 = call(R4, 1 args, 1 rets)
  0003  GETTABLE  R4 = R4[K2(1)]
  0004  TAILCALL  tailcall(R2, 0)
  0005  RETURN    return R2..R1
  0006  RETURN    return R0..R-1
; ---------- proto1 [BuyBundle] ----------
  ; fn ?  line 9-12 np=3 va=0 ms=9 code=11 consts=5 upvals=1 protos=0
  ;   K[0]='GetCurBundleData'
  ;   K[1]='GM'
  ;   K[2]='BundleManager'
  ;   K[3]='Buy'
  ;   K[4]='m_bundleType'
  ;   upvals: _ENV
  ;   locals: self(0-11), dataGroup(0-11), callback(0-11), bundleData(3-11)
  0000  SELF      R4 = R0[K0('GetCurBundleData')] (self)
  0001  MOVE      R5 = R0
  0002  CALL      R3 = call(R3, 1 args, 2 rets)
  0003  GETTABUP  R4 = _ENV[K1('GM')]
  0004  GETTABLE  R4 = R4[K2('BundleManager')]
  0005  SELF      R5 = R4[K3('Buy')] (self)
  0006  GETTABLE  R6 = R0[K4('m_bundleType')]
  0007  MOVE      R7 = R0
  0008  MOVE      R8 = R0
  0009  CALL      R4 = call(R4, 0 args, 4 rets)
  0010  RETURN    return R0..R-1
; ---------- proto2 [GetCurBundleGemByDataGroup] ----------
  ; fn ?  line 14-31 np=2 va=0 ms=12 code=33 consts=8 upvals=1 protos=0
  ;   K[0]=0
  ;   K[1]='GetCurBundleData'
  ;   K[2]='GetGoods'
  ;   K[3]='pairs'
  ;   K[4]='PROPERTY_TYPE'
  ;   K[5]='EPropertyType'
  ;   K[6]='Gem'
  ;   K[7]='PROPERTY_COUNT'
  ;   upvals: _ENV
  ;   locals: self(0-33), dataGroup(0-33), bundleData(7-33), gemNum(10-30), goods(12-30), (for generator)(17-29), (for state)(17-29), (for control)(17-29), _(18-27), v(18-27)
  0000  TEST      if not R1 then   -> -131069
  0001  JMP       (jump)   -> 4
  0002  LOADK     R2 = K0 0
  0003  RETURN    return R2..R1
  0004  SELF      R3 = R0[K1('GetCurBundleData')] (self)
  0005  MOVE      R4 = R0
  0006  CALL      R2 = call(R2, 1 args, 2 rets)
  0007  TEST      if not R2 then   -> -131063
  0008  JMP       (jump)   -> 30
  0009  LOADK     R3 = K0 0
  0010  SELF      R5 = R2[K2('GetGoods')] (self)
  0011  CALL      R4 = call(R4, 1 args, 1 rets)
  0012  GETTABUP  R5 = _ENV[K3('pairs')]
  0013  TESTSET   if R1 then R6   -> -129008
  0014  JMP       (jump)   -> 16
  0015  NEWTABLE  R6 = {} (0 items)
  0016  CALL      R5 = call(R5, 3 args, 1 rets)
  0017  JMP       (jump)   -> 27
  0018  GETTABUP  R10 = _ENV[K4('PROPERTY_TYPE')]
  0019  GETTABLE  R10 = R9[R10]
  0020  GETTABUP  R11 = _ENV[K5('EPropertyType')]
  0021  GETTABLE  R11 = R11[K6('Gem')]
  0022  EQ        if R0 eq R11   -> -125917
  0023  JMP       (jump)   -> 27
  0024  GETTABUP  R10 = _ENV[K7('PROPERTY_COUNT')]
  0025  GETTABLE  R10 = R9[R10]
  0026  ADD       R3 = R10 add R3
  0027  TFORCALL  tforcall R5
  0028  TFORLOOP  tforloop R7(sBx=-11)   -> 18
  0029  RETURN    return R3..R2
  0030  LOADK     R3 = K0 0
  0031  RETURN    return R3..R2
  0032  RETURN    return R0..R-1
