# Model_DataBalanceModel_1.luac
; fn @DataBalanceModel.lua  line 0-0 np=0 va=1 ms=2 code=47 consts=16 upvals=1 protos=13
;   K[0]='DataBalanceModel'
;   K[1]='__index'
;   K[2]='Init'
;   K[3]='CalculateDiff'
;   K[4]='_GetBalanceDiffMap'
;   K[5]='_GetUserCurDataMap'
;   K[6]='_GetShouldHaveDataMap'
;   K[7]='_AddRewards'
;   K[8]='NeedBalance'
;   K[9]='Balance'
;   K[10]='_BalanceMoreItems'
;   K[11]='_RemoveItem'
;   K[12]='_BeforeRemoveCookItem'
;   K[13]='_AddItems'
;   K[14]='DataBalanceHelper'
;   K[15]='IsNeedBalanceCode'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('DataBalanceModel')] = R0
0002  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0003  GETTABUP  R1 = _ENV[K0('DataBalanceModel')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Init')] = R1
0008  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('CalculateDiff')] = R1
0011  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('_GetBalanceDiffMap')] = R1
0014  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('_GetUserCurDataMap')] = R1
0017  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K6('_GetShouldHaveDataMap')] = R1
0020  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K7('_AddRewards')] = R1
0023  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0024  CLOSURE   R1 = closure proto6
0025  SETTABLE  R0[K8('NeedBalance')] = R1
0026  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0027  CLOSURE   R1 = closure proto7
0028  SETTABLE  R0[K9('Balance')] = R1
0029  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0030  CLOSURE   R1 = closure proto8
0031  SETTABLE  R0[K10('_BalanceMoreItems')] = R1
0032  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0033  CLOSURE   R1 = closure proto9
0034  SETTABLE  R0[K11('_RemoveItem')] = R1
0035  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0036  CLOSURE   R1 = closure proto10
0037  SETTABLE  R0[K12('_BeforeRemoveCookItem')] = R1
0038  GETTABUP  R0 = _ENV[K0('DataBalanceModel')]
0039  CLOSURE   R1 = closure proto11
0040  SETTABLE  R0[K13('_AddItems')] = R1
0041  NEWTABLE  R0 = {} (0 items)
0042  SETTABUP  _ENV[K14('DataBalanceHelper')] = R0
0043  GETTABUP  R0 = _ENV[K14('DataBalanceHelper')]
0044  CLOSURE   R1 = closure proto12
0045  SETTABLE  R0[K15('IsNeedBalanceCode')] = R1
0046  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 4-6 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto1 [CalculateDiff] ----------
  ; fn ?  line 8-42 np=1 va=0 ms=13 code=107 consts=35 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='TaskManager'
  ;   K[2]='IsVersionRevert'
  ;   K[3]='MiscModel'
  ;   K[4]='Get'
  ;   K[5]='EMiscKey'
  ;   K[6]='DataBalanceVersion'
  ;   K[7]='GameConfig'
  ;   K[8]='GetCurrentVersion'
  ;   K[9]='StringUtil'
  ;   K[10]='rFindChar'
  ;   K[11]='.'
  ;   K[12]='string'
  ;   K[13]='sub'
  ;   K[14]=1
  ;   K[15]='DataBalanceDiff'
  ;   K[16]='Log'
  ;   K[17]='Info'
  ;   K[18]='投放兼容：读取之前存储的差异信息为 '
  ;   K[19]='ItemUtility'
  ;   K[20]='String2Map'
  ;   K[21]='m_diffMap'
  ;   K[22]='pairs'
  ;   K[23]='tonumber'
  ;   K[24]=nil
  ;   K[25]=0
  ;   K[26]='_GetBalanceDiffMap'
  ;   K[27]='Map2String'
  ;   K[28]='Set'
  ;   K[29]='next'
  ;   K[30]='BIManager'
  ;   K[31]='LogAction'
  ;   K[32]='EBIType'
  ;   K[33]='DataBalanceInfo'
  ;   K[34]='投放兼容：新计算差异信息为 '
  ;   upvals: _ENV
  ;   locals: self(0-107), cacheVersion(13-107), curVersion(16-107), index(21-107), diffString(38-66), map(48-66), (for generator)(53-66), (for state)(53-66), (for control)(53-66), key(54-64), value(54-64), diffString(74-106)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('TaskManager')]
  0002  SELF      R2 = R1[K2('IsVersionRevert')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 7
  0006  RETURN    return R0..R-1
  0007  GETTABUP  R1 = _ENV[K0('GM')]
  0008  GETTABLE  R1 = R1[K3('MiscModel')]
  0009  SELF      R2 = R1[K4('Get')] (self)
  0010  GETTABUP  R3 = _ENV[K5('EMiscKey')]
  0011  GETTABLE  R3 = R3[K6('DataBalanceVersion')]
  0012  CALL      R1 = call(R1, 1 args, 2 rets)
  0013  GETTABUP  R2 = _ENV[K7('GameConfig')]
  0014  GETTABLE  R2 = R2[K8('GetCurrentVersion')]
  0015  CALL      R2 = call(R2, 1 args, 0 rets)
  0016  GETTABUP  R3 = _ENV[K9('StringUtil')]
  0017  GETTABLE  R3 = R3[K10('rFindChar')]
  0018  MOVE      R4 = R0
  0019  LOADK     R5 = K11 '.'
  0020  CALL      R3 = call(R3, 1 args, 2 rets)
  0021  TEST      if not R3 then   -> -131049
  0022  JMP       (jump)   -> 30
  0023  GETTABUP  R4 = _ENV[K12('string')]
  0024  GETTABLE  R4 = R4[K13('sub')]
  0025  MOVE      R5 = R0
  0026  LOADK     R6 = K14 1
  0027  SUB       R7 = K14(1) sub R3
  0028  CALL      R4 = call(R4, 1 args, 3 rets)
  0029  MOVE      R2 = R0
  0030  EQ        if R0 eq R2   -> -130526
  0031  JMP       (jump)   -> 67
  0032  GETTABUP  R4 = _ENV[K0('GM')]
  0033  GETTABLE  R4 = R4[K3('MiscModel')]
  0034  SELF      R5 = R4[K4('Get')] (self)
  0035  GETTABUP  R6 = _ENV[K5('EMiscKey')]
  0036  GETTABLE  R6 = R6[K15('DataBalanceDiff')]
  0037  CALL      R4 = call(R4, 1 args, 2 rets)
  0038  GETTABUP  R5 = _ENV[K16('Log')]
  0039  GETTABLE  R5 = R5[K17('Info')]
  0040  LOADK     R6 = K18 '投放兼容：读取之前存储的差异信息为 '
  0041  MOVE      R7 = R0
  0042  CONCAT    R6 = concat(R6..R6)
  0043  CALL      R5 = call(R5, 0 args, 1 rets)
  0044  GETTABUP  R5 = _ENV[K19('ItemUtility')]
  0045  GETTABLE  R5 = R5[K20('String2Map')]
  0046  MOVE      R6 = R0
  0047  CALL      R5 = call(R5, 1 args, 1 rets)
  0048  NEWTABLE  R6 = {} (0 items)
  0049  SETTABLE  R0[K21('m_diffMap')] = R6
  0050  GETTABUP  R6 = _ENV[K22('pairs')]
  0051  MOVE      R7 = R0
  0052  CALL      R6 = call(R6, 3 args, 1 rets)
  0053  JMP       (jump)   -> 64
  0054  GETTABUP  R11 = _ENV[K23('tonumber')]
  0055  MOVE      R12 = R0
  0056  CALL      R11 = call(R11, 1 args, 1 rets)
  0057  MOVE      R10 = R0
  0058  EQ        if R1 eq K24(nil)   -> -125612
  0059  JMP       (jump)   -> 64
  0060  EQ        if R1 eq K25(0)   -> -125609
  0061  JMP       (jump)   -> 64
  0062  GETTABLE  R11 = R0[K21('m_diffMap')]
  0063  SETTABLE  R11[R9] = R10
  0064  TFORCALL  tforcall R6
  0065  TFORLOOP  tforloop R8(sBx=-12)   -> 54
  0066  JMP       (jump)   -> 106
  0067  SELF      R5 = R0[K26('_GetBalanceDiffMap')] (self)
  0068  CALL      R4 = call(R4, 1 args, 1 rets)
  0069  SETTABLE  R0[K21('m_diffMap')] = R4
  0070  GETTABUP  R4 = _ENV[K19('ItemUtility')]
  0071  GETTABLE  R4 = R4[K27('Map2String')]
  0072  GETTABLE  R5 = R0[K21('m_diffMap')]
  0073  CALL      R4 = call(R4, 1 args, 1 rets)
  0074  GETTABUP  R5 = _ENV[K0('GM')]
  0075  GETTABLE  R5 = R5[K3('MiscModel')]
  0076  SELF      R6 = R5[K28('Set')] (self)
  0077  GETTABUP  R7 = _ENV[K5('EMiscKey')]
  0078  GETTABLE  R7 = R7[K15('DataBalanceDiff')]
  0079  MOVE      R8 = R0
  0080  CALL      R5 = call(R5, 0 args, 3 rets)
  0081  GETTABUP  R5 = _ENV[K0('GM')]
  0082  GETTABLE  R5 = R5[K3('MiscModel')]
  0083  SELF      R6 = R5[K28('Set')] (self)
  0084  GETTABUP  R7 = _ENV[K5('EMiscKey')]
  0085  GETTABLE  R7 = R7[K6('DataBalanceVersion')]
  0086  MOVE      R8 = R0
  0087  CALL      R5 = call(R5, 0 args, 3 rets)
  0088  GETTABUP  R5 = _ENV[K29('next')]
  0089  GETTABLE  R6 = R0[K21('m_diffMap')]
  0090  CALL      R5 = call(R5, 1 args, 1 rets)
  0091  EQ        if R1 eq K24(nil)   -> -128139
  0092  JMP       (jump)   -> 100
  0093  GETTABUP  R5 = _ENV[K0('GM')]
  0094  GETTABLE  R5 = R5[K30('BIManager')]
  0095  SELF      R6 = R5[K31('LogAction')] (self)
  0096  GETTABUP  R7 = _ENV[K32('EBIType')]
  0097  GETTABLE  R7 = R7[K33('DataBalanceInfo')]
  0098  MOVE      R8 = R0
  0099  CALL      R5 = call(R5, 0 args, 3 rets)
  0100  GETTABUP  R5 = _ENV[K16('Log')]
  0101  GETTABLE  R5 = R5[K17('Info')]
  0102  LOADK     R6 = K34 '投放兼容：新计算差异信息为 '
  0103  MOVE      R7 = R0
  0104  CONCAT    R6 = concat(R6..R6)
  0105  CALL      R5 = call(R5, 0 args, 1 rets)
  0106  RETURN    return R0..R-1
; ---------- proto2 [_GetBalanceDiffMap] ----------
  ; fn ?  line 44-66 np=1 va=0 ms=11 code=32 consts=4 upvals=1 protos=0
  ;   K[0]='_GetShouldHaveDataMap'
  ;   K[1]='_GetUserCurDataMap'
  ;   K[2]='pairs'
  ;   K[3]=0
  ;   upvals: _ENV
  ;   locals: self(0-32), shouldHaveDataMap(2-32), userCurDataMap(4-32), diff(5-32), cur(6-32), (for generator)(9-20), (for state)(9-20), (for control)(9-20), key(10-18), value(10-18), (for generator)(23-30), (for state)(23-30), (for control)(23-30), key(24-28), value(24-28)
  0000  SELF      R2 = R0[K0('_GetShouldHaveDataMap')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R3 = R0[K1('_GetUserCurDataMap')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  NEWTABLE  R3 = {} (0 items)
  0005  LOADNIL   R4..R4 = nil
  0006  GETTABUP  R5 = _ENV[K2('pairs')]
  0007  MOVE      R6 = R0
  0008  CALL      R5 = call(R5, 3 args, 1 rets)
  0009  JMP       (jump)   -> 18
  0010  GETTABLE  R10 = R2[R8]
  0011  TESTSET   if R1 then R4   -> -125938
  0012  JMP       (jump)   -> 14
  0013  LOADK     R4 = K3 0
  0014  EQ        if R1 eq R9   -> -128999
  0015  JMP       (jump)   -> 18
  0016  SUB       R10 = R9 sub R4
  0017  SETTABLE  R3[R8] = R10
  0018  TFORCALL  tforcall R5
  0019  TFORLOOP  tforloop R7(sBx=-10)   -> 10
  0020  GETTABUP  R5 = _ENV[K2('pairs')]
  0021  MOVE      R6 = R0
  0022  CALL      R5 = call(R5, 3 args, 1 rets)
  0023  JMP       (jump)   -> 28
  0024  GETTABLE  R10 = R1[R8]
  0025  TEST      if not R10 then   -> -131044
  0026  JMP       (jump)   -> 28
  0027  SETTABLE  R3[R8] = R9
  0028  TFORCALL  tforcall R5
  0029  TFORLOOP  tforloop R7(sBx=-6)   -> 24
  0030  RETURN    return R3..R2
  0031  RETURN    return R0..R-1
; ---------- proto3 [_GetUserCurDataMap] ----------
  ; fn ?  line 68-83 np=1 va=0 ms=14 code=33 consts=7 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='MainBoardModel'
  ;   K[2]='GetCodeCountMap'
  ;   K[3]='pairs'
  ;   K[4]='DataBalanceHelper'
  ;   K[5]='IsNeedBalanceCode'
  ;   K[6]=0
  ;   upvals: _ENV
  ;   locals: self(0-33), userCurDataMap(1-33), codeCountMap(8-33), needBalance(9-33), chain(9-33), count(9-33), (for generator)(12-31), (for state)(12-31), (for control)(12-31), itemCode(13-29), itemCount(13-29)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  GETTABUP  R2 = _ENV[K0('GM')]
  0002  GETTABLE  R2 = R2[K1('MainBoardModel')]
  0003  SELF      R3 = R2[K2('GetCodeCountMap')] (self)
  0004  LOADBOOL  R4 = true
  0005  LOADBOOL  R5 = true
  0006  LOADBOOL  R6 = true
  0007  CALL      R2 = call(R2, 1 args, 4 rets)
  0008  LOADNIL   R3..R3 = nil
  0009  GETTABUP  R6 = _ENV[K3('pairs')]
  0010  MOVE      R7 = R0
  0011  CALL      R6 = call(R6, 3 args, 1 rets)
  0012  JMP       (jump)   -> 29
  0013  GETTABUP  R11 = _ENV[K4('DataBalanceHelper')]
  0014  GETTABLE  R11 = R11[K5('IsNeedBalanceCode')]
  0015  MOVE      R12 = R0
  0016  CALL      R11 = call(R11, 3 args, 1 rets)
  0017  MOVE      R5 = R0
  0018  MOVE      R4 = R0
  0019  MOVE      R3 = R0
  0020  TEST      if not R3 then   -> -131050
  0021  JMP       (jump)   -> 29
  0022  GETTABLE  R11 = R1[R4]
  0023  TEST      if not R11 then   -> -131046
  0024  JMP       (jump)   -> 26
  0025  LOADK     R11 = K6 0
  0026  MUL       R12 = R10 mul R5
  0027  ADD       R11 = R12 add R11
  0028  SETTABLE  R1[R4] = R11
  0029  TFORCALL  tforcall R6
  0030  TFORLOOP  tforloop R8(sBx=-18)   -> 13
  0031  RETURN    return R1..R0
  0032  RETURN    return R0..R-1
; ---------- proto4 [_GetShouldHaveDataMap] ----------
  ; fn ?  line 85-134 np=1 va=0 ms=26 code=130 consts=24 upvals=1 protos=0
  ;   K[0]='require'
  ;   K[1]='Data.Config.BoardModelConfig'
  ;   K[2]='ipairs'
  ;   K[3]='DataBalanceHelper'
  ;   K[4]='IsNeedBalanceCode'
  ;   K[5]=0
  ;   K[6]='GM'
  ;   K[7]='TaskManager'
  ;   K[8]='GetOngoingChapterId'
  ;   K[9]='ChapterDataModel'
  ;   K[10]='GetChapterSequence'
  ;   K[11]=1
  ;   K[12]='_AddRewards'
  ;   K[13]='GetChapterUnlockRewards'
  ;   K[14]='tostring'
  ;   K[15]='Data.Config.Mainline.'
  ;   K[16]='.TaskConfig_'
  ;   K[17]='Rewards'
  ;   K[18]='GetCurChapterFinishedTaskRewards'
  ;   K[19]='MainBoardModel'
  ;   K[20]='GetOrderModel'
  ;   K[21]='GetOrderGroupInfo'
  ;   K[22]='Data.Config.OrderGroupConfig_'
  ;   K[23]='GetCurChapterFinishedGroupRewards'
  ;   upvals: _ENV
  ;   locals: self(0-130), shouldHaveDataMap(1-130), needBalance(2-130), chain(2-130), count(2-130), configs(5-130), (for generator)(8-32), (for state)(8-32), (for control)(8-32), _(9-30), config(9-30), (for generator)(12-30), (for state)(12-30), (for control)(12-30), _(13-28), code(13-28), taskChapter(36-130), chapters(40-130), (for index)(43-53), (for limit)(43-53), (for step)(43-53), i(44-52), configs(54-130), chapterName(54-130), (for index)(57-85), (for limit)(57-85), (for step)(57-85), i(58-84), (for generator)(77-84), (for state)(77-84), (for control)(77-84), _(78-82), config(78-82), orderModel(96-130), orderCId(98-130), orderGId(98-130), (for index)(101-123), (for limit)(101-123), (for step)(101-123), i(102-122), (for generator)(115-122), (for state)(115-122), (for control)(115-122), _(116-120), config(116-120)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  LOADNIL   R2..R2 = nil
  0002  GETTABUP  R5 = _ENV[K0('require')]
  0003  LOADK     R6 = K1 'Data.Config.BoardModelConfig'
  0004  CALL      R5 = call(R5, 1 args, 1 rets)
  0005  GETTABUP  R6 = _ENV[K2('ipairs')]
  0006  MOVE      R7 = R0
  0007  CALL      R6 = call(R6, 3 args, 1 rets)
  0008  JMP       (jump)   -> 30
  0009  GETTABUP  R11 = _ENV[K2('ipairs')]
  0010  MOVE      R12 = R0
  0011  CALL      R11 = call(R11, 3 args, 1 rets)
  0012  JMP       (jump)   -> 28
  0013  GETTABUP  R16 = _ENV[K3('DataBalanceHelper')]
  0014  GETTABLE  R16 = R16[K4('IsNeedBalanceCode')]
  0015  MOVE      R17 = R0
  0016  CALL      R16 = call(R16, 3 args, 1 rets)
  0017  MOVE      R4 = R0
  0018  MOVE      R3 = R0
  0019  MOVE      R2 = R0
  0020  TEST      if not R2 then   -> -131050
  0021  JMP       (jump)   -> 28
  0022  GETTABLE  R16 = R1[R3]
  0023  TEST      if not R16 then   -> -131046
  0024  JMP       (jump)   -> 26
  0025  LOADK     R16 = K5 0
  0026  ADD       R16 = R4 add R16
  0027  SETTABLE  R1[R3] = R16
  0028  TFORCALL  tforcall R11
  0029  TFORLOOP  tforloop R13(sBx=-17)   -> 13
  0030  TFORCALL  tforcall R6
  0031  TFORLOOP  tforloop R8(sBx=-23)   -> 9
  0032  GETTABUP  R6 = _ENV[K6('GM')]
  0033  GETTABLE  R6 = R6[K7('TaskManager')]
  0034  SELF      R7 = R6[K8('GetOngoingChapterId')] (self)
  0035  CALL      R6 = call(R6, 1 args, 1 rets)
  0036  GETTABUP  R7 = _ENV[K6('GM')]
  0037  GETTABLE  R7 = R7[K9('ChapterDataModel')]
  0038  SELF      R8 = R7[K10('GetChapterSequence')] (self)
  0039  CALL      R7 = call(R7, 1 args, 1 rets)
  0040  LOADK     R8 = K11 1
  0041  MOVE      R9 = R0
  0042  LOADK     R10 = K11 1
  0043  FORPREP   forprep R8(sBx=8)   -> 52
  0044  SELF      R13 = R0[K12('_AddRewards')] (self)
  0045  MOVE      R14 = R0
  0046  GETTABUP  R15 = _ENV[K6('GM')]
  0047  GETTABLE  R15 = R15[K9('ChapterDataModel')]
  0048  SELF      R16 = R15[K13('GetChapterUnlockRewards')] (self)
  0049  MOVE      R17 = R0
  0050  CALL      R15 = call(R15, -1 args, 2 rets)
  0051  CALL      R12 = call(R12, 0 args, -1 rets)
  0052  FORLOOP   forloop R8(sBx=-9)   -> 44
  0053  LOADNIL   R8..R8 = nil
  0054  LOADK     R10 = K11 1
  0055  SUB       R11 = K11(1) sub R6
  0056  LOADK     R12 = K11 1
  0057  FORPREP   forprep R10(sBx=26)   -> 84
  0058  GETTABUP  R14 = _ENV[K14('tostring')]
  0059  GETTABLE  R15 = R7[R13]
  0060  CALL      R14 = call(R14, 1 args, 1 rets)
  0061  MOVE      R9 = R0
  0062  GETTABUP  R14 = _ENV[K0('require')]
  0063  LOADK     R15 = K15 'Data.Config.Mainline.'
  0064  MOVE      R16 = R0
  0065  LOADK     R17 = K16 '.TaskConfig_'
  0066  MOVE      R18 = R0
  0067  CONCAT    R15 = concat(R15..R15)
  0068  CALL      R14 = call(R14, 1 args, 1 rets)
  0069  MOVE      R8 = R0
  0070  TEST      if not R8 then   -> -130999
  0071  JMP       (jump)   -> 74
  0072  NEWTABLE  R14 = {} (0 items)
  0073  MOVE      R8 = R0
  0074  GETTABUP  R14 = _ENV[K2('ipairs')]
  0075  MOVE      R15 = R0
  0076  CALL      R14 = call(R14, 3 args, 1 rets)
  0077  JMP       (jump)   -> 82
  0078  SELF      R20 = R0[K12('_AddRewards')] (self)
  0079  MOVE      R21 = R0
  0080  GETTABLE  R22 = R18[K17('Rewards')]
  0081  CALL      R19 = call(R19, 0 args, 3 rets)
  0082  TFORCALL  tforcall R14
  0083  TFORLOOP  tforloop R16(sBx=-6)   -> 78
  0084  FORLOOP   forloop R10(sBx=-27)   -> 58
  0085  SELF      R11 = R0[K12('_AddRewards')] (self)
  0086  MOVE      R12 = R0
  0087  GETTABUP  R13 = _ENV[K6('GM')]
  0088  GETTABLE  R13 = R13[K7('TaskManager')]
  0089  SELF      R14 = R13[K18('GetCurChapterFinishedTaskRewards')] (self)
  0090  CALL      R13 = call(R13, -1 args, 1 rets)
  0091  CALL      R10 = call(R10, 0 args, -1 rets)
  0092  GETTABUP  R10 = _ENV[K6('GM')]
  0093  GETTABLE  R10 = R10[K19('MainBoardModel')]
  0094  SELF      R11 = R10[K20('GetOrderModel')] (self)
  0095  CALL      R10 = call(R10, 1 args, 1 rets)
  0096  SELF      R12 = R10[K21('GetOrderGroupInfo')] (self)
  0097  CALL      R11 = call(R11, 2 args, 1 rets)
  0098  LOADK     R13 = K11 1
  0099  SUB       R14 = K11(1) sub R11
  0100  LOADK     R15 = K11 1
  0101  FORPREP   forprep R13(sBx=20)   -> 122
  0102  GETTABUP  R17 = _ENV[K0('require')]
  0103  LOADK     R18 = K22 'Data.Config.OrderGroupConfig_'
  0104  MOVE      R19 = R0
  0105  CONCAT    R18 = concat(R18..R18)
  0106  CALL      R17 = call(R17, 1 args, 1 rets)
  0107  MOVE      R8 = R0
  0108  TEST      if not R8 then   -> -130961
  0109  JMP       (jump)   -> 112
  0110  NEWTABLE  R17 = {} (0 items)
  0111  MOVE      R8 = R0
  0112  GETTABUP  R17 = _ENV[K2('ipairs')]
  0113  MOVE      R18 = R0
  0114  CALL      R17 = call(R17, 3 args, 1 rets)
  0115  JMP       (jump)   -> 120
  0116  SELF      R23 = R0[K12('_AddRewards')] (self)
  0117  MOVE      R24 = R0
  0118  GETTABLE  R25 = R21[K17('Rewards')]
  0119  CALL      R22 = call(R22, 0 args, 3 rets)
  0120  TFORCALL  tforcall R17
  0121  TFORLOOP  tforloop R19(sBx=-6)   -> 116
  0122  FORLOOP   forloop R13(sBx=-21)   -> 102
  0123  SELF      R14 = R0[K12('_AddRewards')] (self)
  0124  MOVE      R15 = R0
  0125  SELF      R17 = R10[K23('GetCurChapterFinishedGroupRewards')] (self)
  0126  CALL      R16 = call(R16, -1 args, 1 rets)
  0127  CALL      R13 = call(R13, 0 args, -1 rets)
  0128  RETURN    return R1..R0
  0129  RETURN    return R0..R-1
; ---------- proto5 [_AddRewards] ----------
  ; fn ?  line 136-147 np=3 va=0 ms=14 code=30 consts=7 upvals=1 protos=0
  ;   K[0]=nil
  ;   K[1]='ipairs'
  ;   K[2]='DataBalanceHelper'
  ;   K[3]='IsNeedBalanceCode'
  ;   K[4]='PROPERTY_TYPE'
  ;   K[5]=0
  ;   K[6]='PROPERTY_COUNT'
  ;   upvals: _ENV
  ;   locals: self(0-30), shouldHaveDataMap(0-30), rewards(0-30), needBalance(4-30), chain(4-30), count(4-30), (for generator)(7-29), (for state)(7-29), (for control)(7-29), _(8-27), reward(8-27)
  0000  EQ        if R0 eq K0(nil)   -> -129790
  0001  JMP       (jump)   -> 3
  0002  RETURN    return R0..R-1
  0003  LOADNIL   R3..R3 = nil
  0004  GETTABUP  R6 = _ENV[K1('ipairs')]
  0005  MOVE      R7 = R0
  0006  CALL      R6 = call(R6, 3 args, 1 rets)
  0007  JMP       (jump)   -> 27
  0008  GETTABUP  R11 = _ENV[K2('DataBalanceHelper')]
  0009  GETTABLE  R11 = R11[K3('IsNeedBalanceCode')]
  0010  GETTABUP  R12 = _ENV[K4('PROPERTY_TYPE')]
  0011  GETTABLE  R12 = R10[R12]
  0012  CALL      R11 = call(R11, 3 args, 1 rets)
  0013  MOVE      R5 = R0
  0014  MOVE      R4 = R0
  0015  MOVE      R3 = R0
  0016  TEST      if not R3 then   -> -131054
  0017  JMP       (jump)   -> 27
  0018  GETTABLE  R11 = R1[R4]
  0019  TEST      if not R11 then   -> -131050
  0020  JMP       (jump)   -> 22
  0021  LOADK     R11 = K5 0
  0022  GETTABUP  R12 = _ENV[K6('PROPERTY_COUNT')]
  0023  GETTABLE  R12 = R10[R12]
  0024  MUL       R12 = R12 mul R5
  0025  ADD       R11 = R12 add R11
  0026  SETTABLE  R1[R4] = R11
  0027  TFORCALL  tforcall R6
  0028  TFORLOOP  tforloop R8(sBx=-21)   -> 8
  0029  RETURN    return R0..R-1
; ---------- proto6 [NeedBalance] ----------
  ; fn ?  line 149-157 np=1 va=0 ms=4 code=23 consts=7 upvals=1 protos=0
  ;   K[0]='m_diffMap'
  ;   K[1]='next'
  ;   K[2]='GM'
  ;   K[3]='ConfigModel'
  ;   K[4]='IsServerControlOpen'
  ;   K[5]='EGeneralConfType'
  ;   K[6]='DataBalance'
  ;   upvals: _ENV
  ;   locals: self(0-23)
  0000  GETTABLE  R1 = R0[K0('m_diffMap')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 8
  0003  GETTABUP  R1 = _ENV[K1('next')]
  0004  GETTABLE  R2 = R0[K0('m_diffMap')]
  0005  CALL      R1 = call(R1, 1 args, 1 rets)
  0006  TEST      if not R1 then   -> -131063
  0007  JMP       (jump)   -> 10
  0008  LOADBOOL  R1 = false
  0009  RETURN    return R1..R0
  0010  GETTABUP  R1 = _ENV[K2('GM')]
  0011  GETTABLE  R1 = R1[K3('ConfigModel')]
  0012  SELF      R2 = R1[K4('IsServerControlOpen')] (self)
  0013  GETTABUP  R3 = _ENV[K5('EGeneralConfType')]
  0014  GETTABLE  R3 = R3[K6('DataBalance')]
  0015  CALL      R1 = call(R1, 1 args, 2 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
; ---------- proto7 [Balance] ----------
  ; fn ?  line 159-204 np=1 va=0 ms=20 code=106 consts=33 upvals=1 protos=0
  ;   K[0]='m_diffMap'
  ;   K[1]='_GetBalanceDiffMap'
  ;   K[2]='next'
  ;   K[3]='GM'
  ;   K[4]='BIManager'
  ;   K[5]='LogErrorInfo'
  ;   K[6]='EBIType'
  ;   K[7]='DataBalanceEffect'
  ;   K[8]='ItemUtility'
  ;   K[9]='Map2String'
  ;   K[10]='MainBoardModel'
  ;   K[11]='GetCodeCountMap'
  ;   K[12]='pairs'
  ;   K[13]=0
  ;   K[14]='_BalanceMoreItems'
  ;   K[15]=1
  ;   K[16]='_RemoveItem'
  ;   K[17]='_AddItems'
  ;   K[18]='EventDispatcher'
  ;   K[19]='DispatchEvent'
  ;   K[20]='EEventType'
  ;   K[21]='ChangeCachedItems'
  ;   K[22]='ItemRetrieved'
  ;   K[23]='event'
  ;   K[24]='Call'
  ;   K[25]='BoardEventType'
  ;   K[26]='BatchRemoveItems'
  ;   K[27]='Removed'
  ;   K[28]='MiscModel'
  ;   K[29]='Set'
  ;   K[30]='EMiscKey'
  ;   K[31]='DataBalanceDiff'
  ;   K[32]=''
  ;   upvals: _ENV
  ;   locals: self(0-106), addChainCount(24-106), removeCodeCount(25-106), userCodeCountMap(32-106), (for generator)(35-54), (for state)(35-54), (for control)(35-54), chain(36-52), diff(36-52), addCodeCount(55-106), boardRemovedItems(56-106), (for generator)(59-72), (for state)(59-72), (for control)(59-72), itemCode(60-70), count(60-70), (for index)(63-70), (for limit)(63-70), (for step)(63-70), i(64-69)
  0000  SELF      R2 = R0[K1('_GetBalanceDiffMap')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SETTABLE  R0[K0('m_diffMap')] = R1
  0003  GETTABLE  R1 = R0[K0('m_diffMap')]
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 11
  0006  GETTABUP  R1 = _ENV[K2('next')]
  0007  GETTABLE  R2 = R0[K0('m_diffMap')]
  0008  CALL      R1 = call(R1, 1 args, 1 rets)
  0009  TEST      if not R1 then   -> -131060
  0010  JMP       (jump)   -> 13
  0011  NEWTABLE  R1 = {} (0 items)
  0012  RETURN    return R1..R0
  0013  GETTABUP  R1 = _ENV[K3('GM')]
  0014  GETTABLE  R1 = R1[K4('BIManager')]
  0015  SELF      R2 = R1[K5('LogErrorInfo')] (self)
  0016  GETTABUP  R3 = _ENV[K6('EBIType')]
  0017  GETTABLE  R3 = R3[K7('DataBalanceEffect')]
  0018  GETTABUP  R4 = _ENV[K8('ItemUtility')]
  0019  GETTABLE  R4 = R4[K9('Map2String')]
  0020  GETTABLE  R5 = R0[K0('m_diffMap')]
  0021  CALL      R4 = call(R4, -1 args, 1 rets)
  0022  CALL      R1 = call(R1, 0 args, -1 rets)
  0023  NEWTABLE  R1 = {} (0 items)
  0024  NEWTABLE  R2 = {} (0 items)
  0025  GETTABUP  R3 = _ENV[K3('GM')]
  0026  GETTABLE  R3 = R3[K10('MainBoardModel')]
  0027  SELF      R4 = R3[K11('GetCodeCountMap')] (self)
  0028  LOADBOOL  R5 = true
  0029  LOADBOOL  R6 = true
  0030  LOADBOOL  R7 = true
  0031  CALL      R3 = call(R3, 1 args, 4 rets)
  0032  GETTABUP  R4 = _ENV[K12('pairs')]
  0033  GETTABLE  R5 = R0[K0('m_diffMap')]
  0034  CALL      R4 = call(R4, 3 args, 1 rets)
  0035  JMP       (jump)   -> 52
  0036  LT        if R0 lt K13(0)   -> -126669
  0037  JMP       (jump)   -> 45
  0038  GETTABLE  R9 = R1[R7]
  0039  TEST      if not R9 then   -> -131030
  0040  JMP       (jump)   -> 42
  0041  LOADK     R9 = K13 0
  0042  SUB       R9 = R8 sub R9
  0043  SETTABLE  R1[R7] = R9
  0044  JMP       (jump)   -> 52
  0045  SELF      R10 = R0[K14('_BalanceMoreItems')] (self)
  0046  MOVE      R11 = R0
  0047  MOVE      R12 = R0
  0048  MOVE      R13 = R0
  0049  MOVE      R14 = R0
  0050  MOVE      R15 = R0
  0051  CALL      R9 = call(R9, 0 args, 6 rets)
  0052  TFORCALL  tforcall R4
  0053  TFORLOOP  tforloop R6(sBx=-18)   -> 36
  0054  NEWTABLE  R4 = {} (0 items)
  0055  NEWTABLE  R5 = {} (0 items)
  0056  GETTABUP  R6 = _ENV[K12('pairs')]
  0057  MOVE      R7 = R0
  0058  CALL      R6 = call(R6, 3 args, 1 rets)
  0059  JMP       (jump)   -> 70
  0060  LOADK     R11 = K15 1
  0061  MOVE      R12 = R0
  0062  LOADK     R13 = K15 1
  0063  FORPREP   forprep R11(sBx=5)   -> 69
  0064  SELF      R16 = R0[K16('_RemoveItem')] (self)
  0065  MOVE      R17 = R0
  0066  MOVE      R18 = R0
  0067  MOVE      R19 = R0
  0068  CALL      R15 = call(R15, 0 args, 4 rets)
  0069  FORLOOP   forloop R11(sBx=-6)   -> 64
  0070  TFORCALL  tforcall R6
  0071  TFORLOOP  tforloop R8(sBx=-12)   -> 60
  0072  SELF      R7 = R0[K17('_AddItems')] (self)
  0073  MOVE      R8 = R0
  0074  MOVE      R9 = R0
  0075  CALL      R6 = call(R6, 0 args, 3 rets)
  0076  GETTABUP  R6 = _ENV[K18('EventDispatcher')]
  0077  GETTABLE  R6 = R6[K19('DispatchEvent')]
  0078  GETTABUP  R7 = _ENV[K20('EEventType')]
  0079  GETTABLE  R7 = R7[K21('ChangeCachedItems')]
  0080  CALL      R6 = call(R6, 0 args, 1 rets)
  0081  GETTABUP  R6 = _ENV[K18('EventDispatcher')]
  0082  GETTABLE  R6 = R6[K19('DispatchEvent')]
  0083  GETTABUP  R7 = _ENV[K20('EEventType')]
  0084  GETTABLE  R7 = R7[K22('ItemRetrieved')]
  0085  CALL      R6 = call(R6, 0 args, 1 rets)
  0086  GETTABUP  R6 = _ENV[K3('GM')]
  0087  GETTABLE  R6 = R6[K10('MainBoardModel')]
  0088  GETTABLE  R6 = R6[K23('event')]
  0089  SELF      R7 = R6[K24('Call')] (self)
  0090  GETTABUP  R8 = _ENV[K25('BoardEventType')]
  0091  GETTABLE  R8 = R8[K26('BatchRemoveItems')]
  0092  NEWTABLE  R9 = {} (0 items)
  0093  SETTABLE  R9[K27('Removed')] = R5
  0094  CALL      R6 = call(R6, 0 args, 3 rets)
  0095  NEWTABLE  R6 = {} (0 items)
  0096  SETTABLE  R0[K0('m_diffMap')] = R6
  0097  GETTABUP  R6 = _ENV[K3('GM')]
  0098  GETTABLE  R6 = R6[K28('MiscModel')]
  0099  SELF      R7 = R6[K29('Set')] (self)
  0100  GETTABUP  R8 = _ENV[K30('EMiscKey')]
  0101  GETTABLE  R8 = R8[K31('DataBalanceDiff')]
  0102  LOADK     R9 = K32 ''
  0103  CALL      R6 = call(R6, 0 args, 3 rets)
  0104  RETURN    return R4..R3
  0105  RETURN    return R0..R-1
; ---------- proto8 [_BalanceMoreItems] ----------
  ; fn ?  line 206-231 np=6 va=0 ms=21 code=56 consts=9 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ItemDataModel'
  ;   K[2]='GetChainMaxLevel'
  ;   K[3]=1
  ;   K[4]='ItemUtility'
  ;   K[5]='GetItemType'
  ;   K[6]=nil
  ;   K[7]=0
  ;   K[8]='GetToLevel1Count'
  ;   upvals: _ENV
  ;   locals: self(0-56), chain(0-56), diff(0-56), userCodeCountMap(0-56), addChainCount(0-56), removeCodeCount(0-56), remainDiffCount(1-56), maxLevel(6-56), itemCode(7-56), userCount(7-56), toLevel1Count(7-56), (for index)(10-55), (for limit)(10-55), (for step)(10-55), level(11-54), (for index)(25-54), (for limit)(25-54), (for step)(25-54), i(26-53)
  0000  MOVE      R6 = R0
  0001  GETTABUP  R7 = _ENV[K0('GM')]
  0002  GETTABLE  R7 = R7[K1('ItemDataModel')]
  0003  SELF      R8 = R7[K2('GetChainMaxLevel')] (self)
  0004  MOVE      R9 = R0
  0005  CALL      R7 = call(R7, 1 args, 2 rets)
  0006  LOADNIL   R8..R8 = nil
  0007  LOADK     R11 = K3 1
  0008  MOVE      R12 = R0
  0009  LOADK     R13 = K3 1
  0010  FORPREP   forprep R11(sBx=43)   -> 54
  0011  GETTABUP  R15 = _ENV[K4('ItemUtility')]
  0012  GETTABLE  R15 = R15[K5('GetItemType')]
  0013  MOVE      R16 = R0
  0014  MOVE      R17 = R0
  0015  CALL      R15 = call(R15, 1 args, 2 rets)
  0016  MOVE      R8 = R0
  0017  GETTABLE  R9 = R3[R8]
  0018  EQ        if R1 eq K6(nil)   -> -126182
  0019  JMP       (jump)   -> 54
  0020  LT        if R0 lt R9   -> 3615
  0021  JMP       (jump)   -> 54
  0022  LOADK     R15 = K3 1
  0023  MOVE      R16 = R0
  0024  LOADK     R17 = K3 1
  0025  FORPREP   forprep R15(sBx=27)   -> 53
  0026  GETTABUP  R19 = _ENV[K4('ItemUtility')]
  0027  GETTABLE  R19 = R19[K8('GetToLevel1Count')]
  0028  MOVE      R20 = R0
  0029  CALL      R19 = call(R19, 1 args, 1 rets)
  0030  MOVE      R10 = R0
  0031  LE        if R0 le R6   -> -125913
  0032  JMP       (jump)   -> 44
  0033  GETTABLE  R19 = R5[R8]
  0034  TEST      if not R19 then   -> -131035
  0035  JMP       (jump)   -> 37
  0036  LOADK     R19 = K7 0
  0037  ADD       R19 = K3(1) add R19
  0038  SETTABLE  R5[R8] = R19
  0039  SUB       R6 = R10 sub R6
  0040  EQ        if R0 eq K7(0)   -> -127695
  0041  JMP       (jump)   -> 53
  0042  RETURN    return R0..R-1
  0043  JMP       (jump)   -> 53
  0044  GETTABLE  R19 = R5[R8]
  0045  TEST      if not R19 then   -> -131024
  0046  JMP       (jump)   -> 48
  0047  LOADK     R19 = K7 0
  0048  ADD       R19 = K3(1) add R19
  0049  SETTABLE  R5[R8] = R19
  0050  SUB       R19 = R6 sub R10
  0051  SETTABLE  R4[R1] = R19
  0052  RETURN    return R0..R-1
  0053  FORLOOP   forloop R15(sBx=-28)   -> 26
  0054  FORLOOP   forloop R11(sBx=-44)   -> 11
  0055  RETURN    return R0..R-1
; ---------- proto9 [_RemoveItem] ----------
  ; fn ?  line 234-275 np=4 va=0 ms=19 code=96 consts=23 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='MainBoardModel'
  ;   K[2]='GetCachedItemCount'
  ;   K[3]=1
  ;   K[4]='GetCachedItem'
  ;   K[5]='RemoveCachedItem'
  ;   K[6]='Log'
  ;   K[7]='Info'
  ;   K[8]='投放兼容：从缓存队列移除 '
  ;   K[9]='GetStoredItemCount'
  ;   K[10]='GetStoredItem'
  ;   K[11]='GetCode'
  ;   K[12]='GetStoreModel'
  ;   K[13]='RemoveItem'
  ;   K[14]='_BeforeRemoveCookItem'
  ;   K[15]='投放兼容：从仓库移除 '
  ;   K[16]='GetAllBoardItems'
  ;   K[17]='pairs'
  ;   K[18]='table'
  ;   K[19]='insert'
  ;   K[20]='投放兼容：从棋盘移除 '
  ;   K[21]='Error'
  ;   K[22]='未完成移除，不应该'
  ;   upvals: _ENV
  ;   locals: self(0-96), toRemoveCode(0-96), addCodeCount(0-96), boardRemovedItems(0-96), boardModel(2-96), item(3-96), itemCode(3-96), cacheCount(5-96), (for index)(8-26), (for limit)(8-26), (for step)(8-26), i(9-25), storeCount(28-96), (for index)(31-60), (for limit)(31-60), (for step)(31-60), i(32-59), items(62-96), (for generator)(65-91), (for state)(65-91), (for control)(65-91), item(66-89), _(66-89)
  0000  GETTABUP  R4 = _ENV[K0('GM')]
  0001  GETTABLE  R4 = R4[K1('MainBoardModel')]
  0002  LOADNIL   R5..R5 = nil
  0003  SELF      R8 = R4[K2('GetCachedItemCount')] (self)
  0004  CALL      R7 = call(R7, 1 args, 1 rets)
  0005  LOADK     R8 = K3 1
  0006  MOVE      R9 = R0
  0007  LOADK     R10 = K3 1
  0008  FORPREP   forprep R8(sBx=16)   -> 25
  0009  SELF      R13 = R4[K4('GetCachedItem')] (self)
  0010  MOVE      R14 = R0
  0011  CALL      R12 = call(R12, 1 args, 2 rets)
  0012  MOVE      R6 = R0
  0013  EQ        if R0 eq R1   -> -127984
  0014  JMP       (jump)   -> 25
  0015  SELF      R13 = R4[K5('RemoveCachedItem')] (self)
  0016  MOVE      R14 = R0
  0017  CALL      R12 = call(R12, 0 args, 2 rets)
  0018  GETTABUP  R12 = _ENV[K6('Log')]
  0019  GETTABLE  R12 = R12[K7('Info')]
  0020  LOADK     R13 = K8 '投放兼容：从缓存队列移除 '
  0021  MOVE      R14 = R0
  0022  CONCAT    R13 = concat(R13..R13)
  0023  CALL      R12 = call(R12, 0 args, 1 rets)
  0024  RETURN    return R0..R-1
  0025  FORLOOP   forloop R8(sBx=-17)   -> 9
  0026  SELF      R9 = R4[K9('GetStoredItemCount')] (self)
  0027  CALL      R8 = call(R8, 1 args, 1 rets)
  0028  LOADK     R9 = K3 1
  0029  MOVE      R10 = R0
  0030  LOADK     R11 = K3 1
  0031  FORPREP   forprep R9(sBx=27)   -> 59
  0032  SELF      R14 = R4[K10('GetStoredItem')] (self)
  0033  MOVE      R15 = R0
  0034  CALL      R13 = call(R13, 1 args, 2 rets)
  0035  MOVE      R5 = R0
  0036  SELF      R14 = R5[K11('GetCode')] (self)
  0037  CALL      R13 = call(R13, 1 args, 1 rets)
  0038  EQ        if R0 eq R1   -> -124375
  0039  JMP       (jump)   -> 59
  0040  SELF      R14 = R4[K12('GetStoreModel')] (self)
  0041  CALL      R13 = call(R13, 1 args, 1 rets)
  0042  SELF      R14 = R13[K13('RemoveItem')] (self)
  0043  MOVE      R15 = R0
  0044  CALL      R13 = call(R13, 0 args, 2 rets)
  0045  SELF      R14 = R0[K14('_BeforeRemoveCookItem')] (self)
  0046  MOVE      R15 = R0
  0047  MOVE      R16 = R0
  0048  CALL      R13 = call(R13, 0 args, 3 rets)
  0049  SELF      R14 = R4[K13('RemoveItem')] (self)
  0050  MOVE      R15 = R0
  0051  CALL      R13 = call(R13, 0 args, 2 rets)
  0052  GETTABUP  R13 = _ENV[K6('Log')]
  0053  GETTABLE  R13 = R13[K7('Info')]
  0054  LOADK     R14 = K15 '投放兼容：从仓库移除 '
  0055  MOVE      R15 = R0
  0056  CONCAT    R14 = concat(R14..R14)
  0057  CALL      R13 = call(R13, 0 args, 1 rets)
  0058  RETURN    return R0..R-1
  0059  FORLOOP   forloop R9(sBx=-28)   -> 32
  0060  SELF      R10 = R4[K16('GetAllBoardItems')] (self)
  0061  CALL      R9 = call(R9, 1 args, 1 rets)
  0062  GETTABUP  R10 = _ENV[K17('pairs')]
  0063  MOVE      R11 = R0
  0064  CALL      R10 = call(R10, 3 args, 1 rets)
  0065  JMP       (jump)   -> 89
  0066  SELF      R16 = R13[K11('GetCode')] (self)
  0067  CALL      R15 = call(R15, 1 args, 1 rets)
  0068  EQ        if R0 eq R1   -> -123321
  0069  JMP       (jump)   -> 89
  0070  SELF      R16 = R0[K14('_BeforeRemoveCookItem')] (self)
  0071  MOVE      R17 = R0
  0072  MOVE      R18 = R0
  0073  CALL      R15 = call(R15, 0 args, 3 rets)
  0074  SELF      R16 = R4[K13('RemoveItem')] (self)
  0075  MOVE      R17 = R0
  0076  CALL      R15 = call(R15, 0 args, 2 rets)
  0077  GETTABUP  R15 = _ENV[K18('table')]
  0078  GETTABLE  R15 = R15[K19('insert')]
  0079  MOVE      R16 = R0
  0080  MOVE      R17 = R0
  0081  CALL      R15 = call(R15, 0 args, 2 rets)
  0082  GETTABUP  R15 = _ENV[K6('Log')]
  0083  GETTABLE  R15 = R15[K7('Info')]
  0084  LOADK     R16 = K20 '投放兼容：从棋盘移除 '
  0085  MOVE      R17 = R0
  0086  CONCAT    R16 = concat(R16..R16)
  0087  CALL      R15 = call(R15, 0 args, 1 rets)
  0088  RETURN    return R0..R-1
  0089  TFORCALL  tforcall R10
  0090  TFORLOOP  tforloop R12(sBx=-25)   -> 66
  0091  GETTABUP  R10 = _ENV[K6('Log')]
  0092  GETTABLE  R10 = R10[K21('Error')]
  0093  LOADK     R11 = K22 '未完成移除，不应该'
  0094  CALL      R10 = call(R10, 0 args, 1 rets)
  0095  RETURN    return R0..R-1
; ---------- proto10 [_BeforeRemoveCookItem] ----------
  ; fn ?  line 277-299 np=3 va=0 ms=12 code=58 consts=20 upvals=1 protos=0
  ;   K[0]='GetComponent'
  ;   K[1]='ItemCook'
  ;   K[2]=nil
  ;   K[3]='GetState'
  ;   K[4]='EItemCookState'
  ;   K[5]='Cooked'
  ;   K[6]='Cooking'
  ;   K[7]='GetRecipe'
  ;   K[8]=0
  ;   K[9]=1
  ;   K[10]='Log'
  ;   K[11]='Info'
  ;   K[12]='投放兼容：移除厨具，补菜品 '
  ;   K[13]='GetCurMaterialsArray'
  ;   K[14]='投放兼容：移除厨具，补原材料 '
  ;   K[15]='table'
  ;   K[16]='concat'
  ;   K[17]=','
  ;   K[18]='ipairs'
  ;   K[19]='RemoveInnerMaterials'
  ;   upvals: _ENV
  ;   locals: self(0-58), originItem(0-58), addCodeCount(0-58), cookCmp(3-58), state(8-58), recipe(18-30), matCodes(33-55), (for generator)(46-55), (for state)(46-55), (for control)(46-55), _(47-53), itemCode(47-53)
  0000  SELF      R4 = R1[K0('GetComponent')] (self)
  0001  GETTABUP  R5 = _ENV[K1('ItemCook')]
  0002  CALL      R3 = call(R3, 1 args, 2 rets)
  0003  EQ        if R0 eq K2(nil)   -> -129273
  0004  JMP       (jump)   -> 6
  0005  RETURN    return R0..R-1
  0006  SELF      R5 = R3[K3('GetState')] (self)
  0007  CALL      R4 = call(R4, 1 args, 1 rets)
  0008  GETTABUP  R5 = _ENV[K4('EItemCookState')]
  0009  GETTABLE  R5 = R5[K5('Cooked')]
  0010  EQ        if R1 eq R5   -> -129007
  0011  JMP       (jump)   -> 16
  0012  GETTABUP  R5 = _ENV[K4('EItemCookState')]
  0013  GETTABLE  R5 = R5[K6('Cooking')]
  0014  EQ        if R0 eq R5   -> -129003
  0015  JMP       (jump)   -> 31
  0016  SELF      R6 = R3[K7('GetRecipe')] (self)
  0017  CALL      R5 = call(R5, 1 args, 1 rets)
  0018  GETTABLE  R6 = R2[R5]
  0019  TEST      if not R6 then   -> -131050
  0020  JMP       (jump)   -> 22
  0021  LOADK     R6 = K8 0
  0022  ADD       R6 = K9(1) add R6
  0023  SETTABLE  R2[R5] = R6
  0024  GETTABUP  R6 = _ENV[K10('Log')]
  0025  GETTABLE  R6 = R6[K11('Info')]
  0026  LOADK     R7 = K12 '投放兼容：移除厨具，补菜品 '
  0027  MOVE      R8 = R0
  0028  CONCAT    R7 = concat(R7..R7)
  0029  CALL      R6 = call(R6, 0 args, 1 rets)
  0030  JMP       (jump)   -> 55
  0031  SELF      R6 = R3[K13('GetCurMaterialsArray')] (self)
  0032  CALL      R5 = call(R5, 1 args, 1 rets)
  0033  GETTABUP  R6 = _ENV[K10('Log')]
  0034  GETTABLE  R6 = R6[K11('Info')]
  0035  LOADK     R7 = K14 '投放兼容：移除厨具，补原材料 '
  0036  GETTABUP  R8 = _ENV[K15('table')]
  0037  GETTABLE  R8 = R8[K16('concat')]
  0038  MOVE      R9 = R0
  0039  LOADK     R10 = K17 ','
  0040  CALL      R8 = call(R8, 1 args, 2 rets)
  0041  CONCAT    R7 = concat(R7..R7)
  0042  CALL      R6 = call(R6, 0 args, 1 rets)
  0043  GETTABUP  R6 = _ENV[K18('ipairs')]
  0044  MOVE      R7 = R0
  0045  CALL      R6 = call(R6, 3 args, 1 rets)
  0046  JMP       (jump)   -> 53
  0047  GETTABLE  R11 = R2[R10]
  0048  TEST      if not R11 then   -> -131021
  0049  JMP       (jump)   -> 51
  0050  LOADK     R11 = K8 0
  0051  ADD       R11 = K9(1) add R11
  0052  SETTABLE  R2[R10] = R11
  0053  TFORCALL  tforcall R6
  0054  TFORLOOP  tforloop R8(sBx=-8)   -> 47
  0055  SELF      R6 = R3[K19('RemoveInnerMaterials')] (self)
  0056  CALL      R5 = call(R5, 0 args, 1 rets)
  0057  RETURN    return R0..R-1
; ---------- proto11 [_AddItems] ----------
  ; fn ?  line 301-330 np=3 va=0 ms=20 code=77 consts=20 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='GM'
  ;   K[2]='ItemDataModel'
  ;   K[3]='GetChainMaxLevel'
  ;   K[4]=1
  ;   K[5]=-1
  ;   K[6]='ItemUtility'
  ;   K[7]='GetItemType'
  ;   K[8]='GetToLevel1Count'
  ;   K[9]=0
  ;   K[10]='Log'
  ;   K[11]='Info'
  ;   K[12]='投放兼容：所有补棋子 '
  ;   K[13]='table'
  ;   K[14]='concat'
  ;   K[15]=','
  ;   K[16]='MainBoardModel'
  ;   K[17]='CacheItems'
  ;   K[18]='CacheItemType'
  ;   K[19]='Stack'
  ;   upvals: _ENV
  ;   locals: self(0-77), addChainCount(0-77), addCodeCount(0-77), maxLevel(1-77), diffCount(1-77), itemCode(1-77), toLevel1Count(1-77), addCount(1-77), (for generator)(4-43), (for state)(4-43), (for control)(4-43), chain(5-41), count(5-41), (for index)(15-41), (for limit)(15-41), (for step)(15-41), level(16-40), arrItems(44-77), (for generator)(47-58), (for state)(47-58), (for control)(47-58), code(48-56), count(48-56), (for index)(51-56), (for limit)(51-56), (for step)(51-56), i(52-55)
  0000  LOADNIL   R3..R3 = nil
  0001  GETTABUP  R8 = _ENV[K0('pairs')]
  0002  MOVE      R9 = R0
  0003  CALL      R8 = call(R8, 3 args, 1 rets)
  0004  JMP       (jump)   -> 41
  0005  MOVE      R4 = R0
  0006  GETTABUP  R13 = _ENV[K1('GM')]
  0007  GETTABLE  R13 = R13[K2('ItemDataModel')]
  0008  SELF      R14 = R13[K3('GetChainMaxLevel')] (self)
  0009  MOVE      R15 = R0
  0010  CALL      R13 = call(R13, 1 args, 2 rets)
  0011  MOVE      R3 = R0
  0012  MOVE      R13 = R0
  0013  LOADK     R14 = K4 1
  0014  LOADK     R15 = K5 -1
  0015  FORPREP   forprep R13(sBx=24)   -> 40
  0016  GETTABUP  R17 = _ENV[K6('ItemUtility')]
  0017  GETTABLE  R17 = R17[K7('GetItemType')]
  0018  MOVE      R18 = R0
  0019  MOVE      R19 = R0
  0020  CALL      R17 = call(R17, 1 args, 2 rets)
  0021  MOVE      R5 = R0
  0022  GETTABUP  R17 = _ENV[K6('ItemUtility')]
  0023  GETTABLE  R17 = R17[K8('GetToLevel1Count')]
  0024  MOVE      R18 = R0
  0025  CALL      R17 = call(R17, 1 args, 1 rets)
  0026  MOVE      R6 = R0
  0027  LE        if R0 le R4   -> -127967
  0028  JMP       (jump)   -> 40
  0029  IDIV      R7 = R6 idiv R4
  0030  GETTABLE  R17 = R2[R5]
  0031  TEST      if not R17 then   -> -131038
  0032  JMP       (jump)   -> 34
  0033  LOADK     R17 = K9 0
  0034  ADD       R17 = R7 add R17
  0035  SETTABLE  R2[R5] = R17
  0036  MUL       R17 = R7 mul R6
  0037  SUB       R4 = R17 sub R4
  0038  LE        if R1 le K9(0)   -> -128719
  0039  JMP       (jump)   -> 41
  0040  FORLOOP   forloop R13(sBx=-25)   -> 16
  0041  TFORCALL  tforcall R8
  0042  TFORLOOP  tforloop R10(sBx=-38)   -> 5
  0043  NEWTABLE  R8 = {} (0 items)
  0044  GETTABUP  R9 = _ENV[K0('pairs')]
  0045  MOVE      R10 = R0
  0046  CALL      R9 = call(R9, 3 args, 1 rets)
  0047  JMP       (jump)   -> 56
  0048  LOADK     R14 = K4 1
  0049  MOVE      R15 = R0
  0050  LOADK     R16 = K4 1
  0051  FORPREP   forprep R14(sBx=3)   -> 55
  0052  LEN       R18 = len R0
  0053  ADD       R18 = K4(1) add R18
  0054  SETTABLE  R8[R18] = R12
  0055  FORLOOP   forloop R14(sBx=-4)   -> 52
  0056  TFORCALL  tforcall R9
  0057  TFORLOOP  tforloop R11(sBx=-10)   -> 48
  0058  GETTABUP  R9 = _ENV[K10('Log')]
  0059  GETTABLE  R9 = R9[K11('Info')]
  0060  LOADK     R10 = K12 '投放兼容：所有补棋子 '
  0061  GETTABUP  R11 = _ENV[K13('table')]
  0062  GETTABLE  R11 = R11[K14('concat')]
  0063  MOVE      R12 = R0
  0064  LOADK     R13 = K15 ','
  0065  CALL      R11 = call(R11, 1 args, 2 rets)
  0066  CONCAT    R10 = concat(R10..R10)
  0067  CALL      R9 = call(R9, 0 args, 1 rets)
  0068  GETTABUP  R9 = _ENV[K1('GM')]
  0069  GETTABLE  R9 = R9[K16('MainBoardModel')]
  0070  SELF      R10 = R9[K17('CacheItems')] (self)
  0071  MOVE      R11 = R0
  0072  GETTABUP  R12 = _ENV[K18('CacheItemType')]
  0073  GETTABLE  R12 = R12[K19('Stack')]
  0074  CALL      R9 = call(R9, 0 args, 3 rets)
  0075  RETURN    return R2..R1
  0076  RETURN    return R0..R-1
; ---------- proto12 [IsNeedBalanceCode] ----------
  ; fn ?  line 335-356 np=1 va=0 ms=9 code=50 consts=17 upvals=1 protos=0
  ;   K[0]='StringUtil'
  ;   K[1]='rFindChar'
  ;   K[2]='#'
  ;   K[3]=nil
  ;   K[4]='string'
  ;   K[5]='sub'
  ;   K[6]=1
  ;   K[7]='GM'
  ;   K[8]='ItemDataModel'
  ;   K[9]='GetModelConfig'
  ;   K[10]='ChainId'
  ;   K[11]='ChainLevel'
  ;   K[12]='StartWith'
  ;   K[13]='eq_'
  ;   K[14]='pd_'
  ;   K[15]='ItemUtility'
  ;   K[16]='GetToLevel1Count'
  ;   upvals: _ENV
  ;   locals: code(0-50), index(5-50), config(19-50), chain(24-50), level(25-50), toLevel1Count(45-50)
  0000  GETTABUP  R1 = _ENV[K0('StringUtil')]
  0001  GETTABLE  R1 = R1[K1('rFindChar')]
  0002  MOVE      R2 = R0
  0003  LOADK     R3 = K2 '#'
  0004  CALL      R1 = call(R1, 1 args, 2 rets)
  0005  EQ        if R1 eq K3(nil)   -> -130294
  0006  JMP       (jump)   -> 13
  0007  GETTABUP  R2 = _ENV[K4('string')]
  0008  GETTABLE  R2 = R2[K5('sub')]
  0009  MOVE      R3 = R0
  0010  ADD       R4 = K6(1) add R1
  0011  CALL      R2 = call(R2, 1 args, 2 rets)
  0012  MOVE      R0 = R0
  0013  GETTABUP  R2 = _ENV[K7('GM')]
  0014  GETTABLE  R2 = R2[K8('ItemDataModel')]
  0015  SELF      R3 = R2[K9('GetModelConfig')] (self)
  0016  MOVE      R4 = R0
  0017  LOADBOOL  R5 = true
  0018  CALL      R2 = call(R2, 1 args, 3 rets)
  0019  TEST      if not R2 then   -> -131050
  0020  JMP       (jump)   -> 23
  0021  LOADBOOL  R3 = false
  0022  RETURN    return R3..R2
  0023  GETTABLE  R3 = R2[K10('ChainId')]
  0024  GETTABLE  R4 = R2[K11('ChainLevel')]
  0025  GETTABUP  R5 = _ENV[K0('StringUtil')]
  0026  GETTABLE  R5 = R5[K12('StartWith')]
  0027  MOVE      R6 = R0
  0028  LOADK     R7 = K13 'eq_'
  0029  CALL      R5 = call(R5, 1 args, 2 rets)
  0030  TEST      if not R5 then   -> -131039
  0031  JMP       (jump)   -> 41
  0032  GETTABUP  R5 = _ENV[K0('StringUtil')]
  0033  GETTABLE  R5 = R5[K12('StartWith')]
  0034  MOVE      R6 = R0
  0035  LOADK     R7 = K14 'pd_'
  0036  CALL      R5 = call(R5, 1 args, 2 rets)
  0037  TEST      if not R5 then   -> -131032
  0038  JMP       (jump)   -> 41
  0039  LOADBOOL  R5 = false
  0040  RETURN    return R5..R4
  0041  GETTABUP  R5 = _ENV[K15('ItemUtility')]
  0042  GETTABLE  R5 = R5[K16('GetToLevel1Count')]
  0043  MOVE      R6 = R0
  0044  CALL      R5 = call(R5, 1 args, 1 rets)
  0045  LOADBOOL  R6 = true
  0046  MOVE      R7 = R0
  0047  MOVE      R8 = R0
  0048  RETURN    return R6..R5
  0049  RETURN    return R0..R-1
