# Model_UserData_PDItemSPModel_91.luac
; fn @PDItemSPModel.lua  line 0-0 np=0 va=1 ms=2 code=18 consts=6 upvals=1 protos=4
;   K[0]='PDItemSPModel'
;   K[1]='__index'
;   K[2]='LoadFileConfig'
;   K[3]='OnSyncDataFinished'
;   K[4]='_Save'
;   K[5]='OnPDCreated'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('PDItemSPModel')] = R0
0002  GETTABUP  R0 = _ENV[K0('PDItemSPModel')]
0003  GETTABUP  R1 = _ENV[K0('PDItemSPModel')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('PDItemSPModel')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('LoadFileConfig')] = R1
0008  GETTABUP  R0 = _ENV[K0('PDItemSPModel')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('OnSyncDataFinished')] = R1
0011  GETTABUP  R0 = _ENV[K0('PDItemSPModel')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('_Save')] = R1
0014  GETTABUP  R0 = _ENV[K0('PDItemSPModel')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('OnPDCreated')] = R1
0017  RETURN    return R0..R-1
; ---------- proto0 [LoadFileConfig] ----------
  ; fn ?  line 10-26 np=1 va=0 ms=11 code=36 consts=8 upvals=1 protos=0
  ;   K[0]='m_mapConfigs'
  ;   K[1]='m_mapMaxIndex'
  ;   K[2]='require'
  ;   K[3]='Data.Config.PDItemSPConfig'
  ;   K[4]='ipairs'
  ;   K[5]='PD'
  ;   K[6]='Index'
  ;   K[7]=nil
  ;   upvals: _ENV
  ;   locals: self(0-36), configs(7-36), pd(8-36), index(8-36), (for generator)(11-35), (for state)(11-35), (for control)(11-35), _(12-33), config(12-33)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  SETTABLE  R0[K0('m_mapConfigs')] = R1
  0002  NEWTABLE  R1 = {} (0 items)
  0003  SETTABLE  R0[K1('m_mapMaxIndex')] = R1
  0004  GETTABUP  R1 = _ENV[K2('require')]
  0005  LOADK     R2 = K3 'Data.Config.PDItemSPConfig'
  0006  CALL      R1 = call(R1, 1 args, 1 rets)
  0007  LOADNIL   R2..R2 = nil
  0008  GETTABUP  R4 = _ENV[K4('ipairs')]
  0009  MOVE      R5 = R0
  0010  CALL      R4 = call(R4, 3 args, 1 rets)
  0011  JMP       (jump)   -> 33
  0012  GETTABLE  R2 = R8[K5('PD')]
  0013  GETTABLE  R3 = R8[K6('Index')]
  0014  GETTABLE  R9 = R0[K0('m_mapConfigs')]
  0015  GETTABLE  R9 = R9[R2]
  0016  EQ        if R0 eq K7(nil)   -> -126183
  0017  JMP       (jump)   -> 24
  0018  GETTABLE  R9 = R0[K0('m_mapConfigs')]
  0019  NEWTABLE  R10 = {} (0 items)
  0020  SETTABLE  R9[R2] = R10
  0021  GETTABLE  R9 = R0[K1('m_mapMaxIndex')]
  0022  SETTABLE  R9[R2] = R3
  0023  JMP       (jump)   -> 30
  0024  GETTABLE  R9 = R0[K1('m_mapMaxIndex')]
  0025  GETTABLE  R9 = R9[R2]
  0026  LT        if R0 lt R3   -> -126433
  0027  JMP       (jump)   -> 30
  0028  GETTABLE  R9 = R0[K1('m_mapMaxIndex')]
  0029  SETTABLE  R9[R2] = R3
  0030  GETTABLE  R9 = R0[K0('m_mapConfigs')]
  0031  GETTABLE  R9 = R9[R2]
  0032  SETTABLE  R9[R3] = R8
  0033  TFORCALL  tforcall R4
  0034  TFORLOOP  tforloop R6(sBx=-23)   -> 12
  0035  RETURN    return R0..R-1
; ---------- proto1 [OnSyncDataFinished] ----------
  ; fn ?  line 28-40 np=1 va=0 ms=12 code=35 consts=14 upvals=1 protos=0
  ;   K[0]='m_mapCreatedNumber'
  ;   K[1]='GM'
  ;   K[2]='MiscModel'
  ;   K[3]='Get'
  ;   K[4]='EMiscKey'
  ;   K[5]='PDItemSPIndex'
  ;   K[6]='StringUtil'
  ;   K[7]='Split'
  ;   K[8]=';'
  ;   K[9]='ipairs'
  ;   K[10]='-'
  ;   K[11]=1
  ;   K[12]='tonumber'
  ;   K[13]=2
  ;   upvals: _ENV
  ;   locals: self(0-35), cache(8-35), strArray(13-35), (for generator)(16-34), (for state)(16-34), (for control)(16-34), _(17-32), str(17-32), innerArray(22-32), pd(23-32), number(26-32)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  SETTABLE  R0[K0('m_mapCreatedNumber')] = R1
  0002  GETTABUP  R1 = _ENV[K1('GM')]
  0003  GETTABLE  R1 = R1[K2('MiscModel')]
  0004  SELF      R2 = R1[K3('Get')] (self)
  0005  GETTABUP  R3 = _ENV[K4('EMiscKey')]
  0006  GETTABLE  R3 = R3[K5('PDItemSPIndex')]
  0007  CALL      R1 = call(R1, 1 args, 2 rets)
  0008  GETTABUP  R2 = _ENV[K6('StringUtil')]
  0009  GETTABLE  R2 = R2[K7('Split')]
  0010  MOVE      R3 = R0
  0011  LOADK     R4 = K8 ';'
  0012  CALL      R2 = call(R2, 1 args, 2 rets)
  0013  GETTABUP  R3 = _ENV[K9('ipairs')]
  0014  MOVE      R4 = R0
  0015  CALL      R3 = call(R3, 3 args, 1 rets)
  0016  JMP       (jump)   -> 32
  0017  GETTABUP  R8 = _ENV[K6('StringUtil')]
  0018  GETTABLE  R8 = R8[K7('Split')]
  0019  MOVE      R9 = R0
  0020  LOADK     R10 = K10 '-'
  0021  CALL      R8 = call(R8, 1 args, 2 rets)
  0022  GETTABLE  R9 = R8[K11(1)]
  0023  GETTABUP  R10 = _ENV[K12('tonumber')]
  0024  GETTABLE  R11 = R8[K13(2)]
  0025  CALL      R10 = call(R10, 1 args, 1 rets)
  0026  TEST      if not R9 then   -> -131044
  0027  JMP       (jump)   -> 32
  0028  TEST      if not R10 then   -> -131042
  0029  JMP       (jump)   -> 32
  0030  GETTABLE  R11 = R0[K0('m_mapCreatedNumber')]
  0031  SETTABLE  R11[R9] = R10
  0032  TFORCALL  tforcall R3
  0033  TFORLOOP  tforloop R5(sBx=-17)   -> 17
  0034  RETURN    return R0..R-1
; ---------- proto2 [_Save] ----------
  ; fn ?  line 42-51 np=1 va=0 ms=12 code=32 consts=14 upvals=1 protos=0
  ;   K[0]=''
  ;   K[1]='pairs'
  ;   K[2]='m_mapCreatedNumber'
  ;   K[3]='-'
  ;   K[4]=';'
  ;   K[5]=0
  ;   K[6]='string'
  ;   K[7]='sub'
  ;   K[8]=1
  ;   K[9]='GM'
  ;   K[10]='MiscModel'
  ;   K[11]='Set'
  ;   K[12]='EMiscKey'
  ;   K[13]='PDItemSPIndex'
  ;   upvals: _ENV
  ;   locals: self(0-32), cacheStr(1-32), (for generator)(4-13), (for state)(4-13), (for control)(4-13), pd(5-11), number(5-11)
  0000  LOADK     R1 = K0 ''
  0001  GETTABUP  R2 = _ENV[K1('pairs')]
  0002  GETTABLE  R3 = R0[K2('m_mapCreatedNumber')]
  0003  CALL      R2 = call(R2, 3 args, 1 rets)
  0004  JMP       (jump)   -> 11
  0005  MOVE      R7 = R0
  0006  MOVE      R8 = R0
  0007  LOADK     R9 = K3 '-'
  0008  MOVE      R10 = R0
  0009  LOADK     R11 = K4 ';'
  0010  CONCAT    R1 = concat(R1..R7)
  0011  TFORCALL  tforcall R2
  0012  TFORLOOP  tforloop R4(sBx=-8)   -> 5
  0013  LEN       R2 = len R0
  0014  LT        if R0 lt R2   -> 2578
  0015  JMP       (jump)   -> 24
  0016  GETTABUP  R2 = _ENV[K6('string')]
  0017  GETTABLE  R2 = R2[K7('sub')]
  0018  MOVE      R3 = R0
  0019  LOADK     R4 = K8 1
  0020  LEN       R5 = len R0
  0021  SUB       R5 = K8(1) sub R5
  0022  CALL      R2 = call(R2, 1 args, 3 rets)
  0023  MOVE      R1 = R0
  0024  GETTABUP  R2 = _ENV[K9('GM')]
  0025  GETTABLE  R2 = R2[K10('MiscModel')]
  0026  SELF      R3 = R2[K11('Set')] (self)
  0027  GETTABUP  R4 = _ENV[K12('EMiscKey')]
  0028  GETTABLE  R4 = R4[K13('PDItemSPIndex')]
  0029  MOVE      R5 = R0
  0030  CALL      R2 = call(R2, 0 args, 3 rets)
  0031  RETURN    return R0..R-1
; ---------- proto3 [OnPDCreated] ----------
  ; fn ?  line 53-79 np=2 va=0 ms=11 code=72 consts=17 upvals=1 protos=0
  ;   K[0]='m_mapCreatedNumber'
  ;   K[1]='m_mapConfigs'
  ;   K[2]='Log'
  ;   K[3]='Error'
  ;   K[4]='PDItemSPModel 执行时序出问题，初始化完成前创建棋子！'
  ;   K[5]='Info'
  ;   K[6]='母棋子特殊处理：无该母棋子配置，无需记录。'
  ;   K[7]=0
  ;   K[8]='m_mapMaxIndex'
  ;   K[9]='母棋子特殊处理：个数已超配置最大index，无需记录。'
  ;   K[10]=1
  ;   K[11]='_Save'
  ;   K[12]='母棋子特殊处理：第'
  ;   K[13]='个，替换配置。'
  ;   K[14]='StartTapeItems'
  ;   K[15]='InitialNumber'
  ;   K[16]='个，无配置。'
  ;   upvals: _ENV
  ;   locals: self(0-72), pdCode(0-72), curNumer(27-72), maxNumber(32-72), newNumber(42-72), config(49-72)
  0000  GETTABLE  R2 = R0[K0('m_mapCreatedNumber')]
  0001  TEST      if not R2 then   -> -131069
  0002  JMP       (jump)   -> 6
  0003  GETTABLE  R2 = R0[K1('m_mapConfigs')]
  0004  TEST      if not R2 then   -> -131065
  0005  JMP       (jump)   -> 11
  0006  GETTABUP  R2 = _ENV[K2('Log')]
  0007  GETTABLE  R2 = R2[K3('Error')]
  0008  LOADK     R3 = K4 'PDItemSPModel 执行时序出问题，初始化完成前创建棋子！'
  0009  CALL      R2 = call(R2, 0 args, 1 rets)
  0010  RETURN    return R0..R-1
  0011  GETTABLE  R2 = R0[K1('m_mapConfigs')]
  0012  GETTABLE  R2 = R2[R1]
  0013  TEST      if not R2 then   -> -131056
  0014  JMP       (jump)   -> 22
  0015  GETTABUP  R2 = _ENV[K2('Log')]
  0016  GETTABLE  R2 = R2[K5('Info')]
  0017  LOADK     R3 = K6 '母棋子特殊处理：无该母棋子配置，无需记录。'
  0018  MOVE      R4 = R0
  0019  CONCAT    R3 = concat(R3..R3)
  0020  CALL      R2 = call(R2, 0 args, 1 rets)
  0021  RETURN    return R0..R-1
  0022  GETTABLE  R2 = R0[K0('m_mapCreatedNumber')]
  0023  GETTABLE  R2 = R2[R1]
  0024  TEST      if not R2 then   -> -131045
  0025  JMP       (jump)   -> 27
  0026  LOADK     R2 = K7 0
  0027  GETTABLE  R3 = R0[K8('m_mapMaxIndex')]
  0028  GETTABLE  R3 = R3[R1]
  0029  TEST      if not R3 then   -> -131040
  0030  JMP       (jump)   -> 32
  0031  LOADK     R3 = K7 0
  0032  LE        if R0 le R2   -> -129500
  0033  JMP       (jump)   -> 41
  0034  GETTABUP  R4 = _ENV[K2('Log')]
  0035  GETTABLE  R4 = R4[K5('Info')]
  0036  LOADK     R5 = K9 '母棋子特殊处理：个数已超配置最大index，无需记录。'
  0037  MOVE      R6 = R0
  0038  CONCAT    R5 = concat(R5..R5)
  0039  CALL      R4 = call(R4, 0 args, 1 rets)
  0040  RETURN    return R0..R-1
  0041  ADD       R4 = K10(1) add R2
  0042  GETTABLE  R5 = R0[K0('m_mapCreatedNumber')]
  0043  SETTABLE  R5[R1] = R4
  0044  SELF      R6 = R0[K11('_Save')] (self)
  0045  CALL      R5 = call(R5, 0 args, 1 rets)
  0046  GETTABLE  R5 = R0[K1('m_mapConfigs')]
  0047  GETTABLE  R5 = R5[R1]
  0048  GETTABLE  R5 = R5[R4]
  0049  TEST      if not R5 then   -> -131021
  0050  JMP       (jump)   -> 63
  0051  GETTABUP  R6 = _ENV[K2('Log')]
  0052  GETTABLE  R6 = R6[K5('Info')]
  0053  LOADK     R7 = K12 '母棋子特殊处理：第'
  0054  MOVE      R8 = R0
  0055  LOADK     R9 = K13 '个，替换配置。'
  0056  MOVE      R10 = R0
  0057  CONCAT    R7 = concat(R7..R7)
  0058  CALL      R6 = call(R6, 0 args, 1 rets)
  0059  GETTABLE  R6 = R5[K14('StartTapeItems')]
  0060  GETTABLE  R7 = R5[K15('InitialNumber')]
  0061  RETURN    return R6..R5
  0062  JMP       (jump)   -> 71
  0063  GETTABUP  R6 = _ENV[K2('Log')]
  0064  GETTABLE  R6 = R6[K5('Info')]
  0065  LOADK     R7 = K12 '母棋子特殊处理：第'
  0066  MOVE      R8 = R0
  0067  LOADK     R9 = K16 '个，无配置。'
  0068  MOVE      R10 = R0
  0069  CONCAT    R7 = concat(R7..R7)
  0070  CALL      R6 = call(R6, 0 args, 1 rets)
  0071  RETURN    return R0..R-1
