# Model_Bundle_BundleOneByOneModel_134.luac
; fn @BundleOneByOneModel.lua  line 0-0 np=0 va=1 ms=3 code=19 consts=8 upvals=1 protos=3
;   K[0]='BundleOneByOneModel'
;   K[1]='setmetatable'
;   K[2]='BundleChainModel'
;   K[3]='__index'
;   K[4]=3
;   K[5]='_LoadLocalConfigs'
;   K[6]='_IsGroupDataEligible'
;   K[7]='_OnBuyFinished'
;   upvals: _ENV
;   locals: BUNDLE_COUNT(9-19)
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('BundleChainModel')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('BundleOneByOneModel')] = R0
0005  GETTABUP  R0 = _ENV[K0('BundleOneByOneModel')]
0006  GETTABUP  R1 = _ENV[K0('BundleOneByOneModel')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  LOADK     R0 = K4 3
0009  GETTABUP  R1 = _ENV[K0('BundleOneByOneModel')]
0010  CLOSURE   R2 = closure proto0
0011  SETTABLE  R1[K5('_LoadLocalConfigs')] = R2
0012  GETTABUP  R1 = _ENV[K0('BundleOneByOneModel')]
0013  CLOSURE   R2 = closure proto1
0014  SETTABLE  R1[K6('_IsGroupDataEligible')] = R2
0015  GETTABUP  R1 = _ENV[K0('BundleOneByOneModel')]
0016  CLOSURE   R2 = closure proto2
0017  SETTABLE  R1[K7('_OnBuyFinished')] = R2
0018  RETURN    return R0..R-1
; ---------- proto0 [_LoadLocalConfigs] ----------
  ; fn ?  line 11-37 np=1 va=1 ms=16 code=86 consts=24 upvals=2 protos=0
  ;   K[0]='BundleChainModel'
  ;   K[1]='_LoadLocalConfigs'
  ;   K[2]='ipairs'
  ;   K[3]='m_dataGroups'
  ;   K[4]=1
  ;   K[5]='GetBundleIds'
  ;   K[6]='GetConfigDataByIndex'
  ;   K[7]='Log'
  ;   K[8]='Assert'
  ;   K[9]='IsFree'
  ;   K[10]='OneByOne礼包 '
  ;   K[11]='GetBundleId'
  ;   K[12]=' 必须全为付费项！'
  ;   K[13]='IsCircle'
  ;   K[14]='Error'
  ;   K[15]='OneByOne礼包禁止配置循环！'
  ;   K[16]='GetDiscountTag'
  ;   K[17]='StringUtil'
  ;   K[18]='IsNilOrEmpty'
  ;   K[19]='tonumber'
  ;   K[20]=nil
  ;   K[21]='OneByOne礼包折扣信息配置错误！'
  ;   K[22]='GetGroupId'
  ;   K[23]=' 必须配置为三轮！'
  ;   upvals: _ENV, BUNDLE_COUNT
  ;   locals: self(0-86), data(6-86), (for generator)(9-85), (for state)(9-85), (for control)(9-85), _(10-83), dataGroup(10-83), (for index)(15-67), (for limit)(15-67), (for step)(15-67), index(16-66), strDiscountInfo(44-66)
  0000  GETTABUP  R1 = _ENV[K0('BundleChainModel')]
  0001  GETTABLE  R1 = R1[K1('_LoadLocalConfigs')]
  0002  MOVE      R2 = R0
  0003  VARARG    R3 = vararg(0)
  0004  CALL      R1 = call(R1, 0 args, -1 rets)
  0005  LOADNIL   R1..R1 = nil
  0006  GETTABUP  R2 = _ENV[K2('ipairs')]
  0007  GETTABLE  R3 = R0[K3('m_dataGroups')]
  0008  CALL      R2 = call(R2, 3 args, 1 rets)
  0009  JMP       (jump)   -> 83
  0010  LOADK     R7 = K4 1
  0011  SELF      R9 = R6[K5('GetBundleIds')] (self)
  0012  CALL      R8 = call(R8, 1 args, 1 rets)
  0013  LEN       R8 = len R0
  0014  LOADK     R9 = K4 1
  0015  FORPREP   forprep R7(sBx=50)   -> 66
  0016  SELF      R12 = R6[K6('GetConfigDataByIndex')] (self)
  0017  MOVE      R13 = R0
  0018  CALL      R11 = call(R11, 1 args, 2 rets)
  0019  MOVE      R1 = R0
  0020  GETTABUP  R11 = _ENV[K7('Log')]
  0021  GETTABLE  R11 = R11[K8('Assert')]
  0022  SELF      R13 = R1[K9('IsFree')] (self)
  0023  CALL      R12 = call(R12, 1 args, 1 rets)
  0024  NOT       R12 = not R0
  0025  LOADK     R13 = K10 'OneByOne礼包 '
  0026  SELF      R15 = R1[K11('GetBundleId')] (self)
  0027  CALL      R14 = call(R14, 1 args, 1 rets)
  0028  LOADK     R15 = K12 ' 必须全为付费项！'
  0029  CONCAT    R13 = concat(R13..R13)
  0030  CALL      R11 = call(R11, 0 args, 2 rets)
  0031  SELF      R12 = R1[K13('IsCircle')] (self)
  0032  CALL      R11 = call(R11, 1 args, 1 rets)
  0033  TEST      if not R11 then   -> -131037
  0034  JMP       (jump)   -> 42
  0035  GETTABUP  R11 = _ENV[K7('Log')]
  0036  GETTABLE  R11 = R11[K14('Error')]
  0037  LOADK     R12 = K15 'OneByOne礼包禁止配置循环！'
  0038  SELF      R14 = R1[K11('GetBundleId')] (self)
  0039  CALL      R13 = call(R13, 1 args, 1 rets)
  0040  CONCAT    R12 = concat(R12..R12)
  0041  CALL      R11 = call(R11, 0 args, 1 rets)
  0042  SELF      R12 = R1[K16('GetDiscountTag')] (self)
  0043  CALL      R11 = call(R11, 1 args, 1 rets)
  0044  EQ        if R0 eq K4(1)   -> -125646
  0045  JMP       (jump)   -> 52
  0046  GETTABUP  R12 = _ENV[K17('StringUtil')]
  0047  GETTABLE  R12 = R12[K18('IsNilOrEmpty')]
  0048  MOVE      R13 = R0
  0049  CALL      R12 = call(R12, 1 args, 1 rets)
  0050  TEST      if not R12 then   -> -131020
  0051  JMP       (jump)   -> 59
  0052  LT        if R0 lt R10   -> 2112
  0053  JMP       (jump)   -> 66
  0054  GETTABUP  R12 = _ENV[K19('tonumber')]
  0055  MOVE      R13 = R0
  0056  CALL      R12 = call(R12, 1 args, 1 rets)
  0057  EQ        if R0 eq K20(nil)   -> -124593
  0058  JMP       (jump)   -> 66
  0059  GETTABUP  R12 = _ENV[K7('Log')]
  0060  GETTABLE  R12 = R12[K14('Error')]
  0061  LOADK     R13 = K21 'OneByOne礼包折扣信息配置错误！'
  0062  SELF      R15 = R1[K11('GetBundleId')] (self)
  0063  CALL      R14 = call(R14, 1 args, 1 rets)
  0064  CONCAT    R13 = concat(R13..R13)
  0065  CALL      R12 = call(R12, 0 args, 1 rets)
  0066  FORLOOP   forloop R7(sBx=-51)   -> 16
  0067  GETTABUP  R7 = _ENV[K7('Log')]
  0068  GETTABLE  R7 = R7[K8('Assert')]
  0069  SELF      R9 = R6[K5('GetBundleIds')] (self)
  0070  CALL      R8 = call(R8, 1 args, 1 rets)
  0071  LEN       R8 = len R0
  0072  GETUPVAL  R9 = _ENV
  0073  EQ        if R1 eq R9   -> -126892
  0074  JMP       (jump)   -> 76
  0075  LOADBOOL  R8 = false
  0076  LOADBOOL  R8 = true
  0077  LOADK     R9 = K10 'OneByOne礼包 '
  0078  SELF      R11 = R6[K22('GetGroupId')] (self)
  0079  CALL      R10 = call(R10, 1 args, 1 rets)
  0080  LOADK     R11 = K23 ' 必须配置为三轮！'
  0081  CONCAT    R9 = concat(R9..R9)
  0082  CALL      R7 = call(R7, 0 args, 2 rets)
  0083  TFORCALL  tforcall R2
  0084  TFORLOOP  tforloop R4(sBx=-75)   -> 10
  0085  RETURN    return R0..R-1
; ---------- proto1 [_IsGroupDataEligible] ----------
  ; fn ?  line 39-51 np=2 va=0 ms=5 code=24 consts=5 upvals=2 protos=0
  ;   K[0]='GetRestDuration'
  ;   K[1]=0
  ;   K[2]='GetCurChainStep'
  ;   K[3]='BundleChainModel'
  ;   K[4]='_IsGroupDataEligible'
  ;   upvals: BUNDLE_COUNT, _ENV
  ;   locals: self(0-24), dataGroup(0-24)
  0000  TEST      if not R1 then   -> -131069
  0001  JMP       (jump)   -> 4
  0002  LOADBOOL  R2 = false
  0003  RETURN    return R2..R1
  0004  SELF      R3 = R0[K0('GetRestDuration')] (self)
  0005  MOVE      R4 = R0
  0006  CALL      R2 = call(R2, 1 args, 2 rets)
  0007  LE        if R0 le R2   -> 523
  0008  JMP       (jump)   -> 17
  0009  SELF      R3 = R0[K2('GetCurChainStep')] (self)
  0010  MOVE      R4 = R0
  0011  CALL      R2 = call(R2, 1 args, 2 rets)
  0012  GETUPVAL  R3 = BUNDLE_COUNT
  0013  LE        if R0 le R3   -> -130030
  0014  JMP       (jump)   -> 17
  0015  LOADBOOL  R2 = true
  0016  RETURN    return R2..R1
  0017  GETTABUP  R2 = _ENV[K3('BundleChainModel')]
  0018  GETTABLE  R2 = R2[K4('_IsGroupDataEligible')]
  0019  MOVE      R3 = R0
  0020  MOVE      R4 = R0
  0021  TAILCALL  tailcall(R2, 0)
  0022  RETURN    return R2..R1
  0023  RETURN    return R0..R-1
; ---------- proto2 [_OnBuyFinished] ----------
  ; fn ?  line 53-65 np=3 va=0 ms=6 code=20 consts=6 upvals=0 protos=0
  ;   K[0]='GetCurChainStep'
  ;   K[1]=2
  ;   K[2]='_RecordBuyNumData'
  ;   K[3]='HasPurchaseFinished'
  ;   K[4]='OnBundleStateChanged'
  ;   K[5]='_FinishAndEnterBuyCD'
  ;   locals: self(0-20), dataGroup(0-20), bundleId(0-20)
  0000  SELF      R4 = R0[K0('GetCurChainStep')] (self)
  0001  MOVE      R5 = R0
  0002  CALL      R3 = call(R3, 1 args, 2 rets)
  0003  EQ        if R0 eq K1(2)   -> -129274
  0004  JMP       (jump)   -> 8
  0005  SELF      R4 = R0[K2('_RecordBuyNumData')] (self)
  0006  MOVE      R5 = R0
  0007  CALL      R3 = call(R3, 0 args, 2 rets)
  0008  SELF      R4 = R0[K3('HasPurchaseFinished')] (self)
  0009  MOVE      R5 = R0
  0010  CALL      R3 = call(R3, 1 args, 2 rets)
  0011  TEST      if not R3 then   -> -131059
  0012  JMP       (jump)   -> 19
  0013  SELF      R4 = R0[K4('OnBundleStateChanged')] (self)
  0014  MOVE      R5 = R0
  0015  CALL      R3 = call(R3, 0 args, 2 rets)
  0016  SELF      R4 = R0[K5('_FinishAndEnterBuyCD')] (self)
  0017  MOVE      R5 = R0
  0018  CALL      R3 = call(R3, 0 args, 2 rets)
  0019  RETURN    return R0..R-1
