# Model_UserData_EnergyModel_75.luac
; fn @EnergyModel.lua  line 0-0 np=0 va=1 ms=5 code=104 consts=53 upvals=1 protos=29
;   K[0]='energyValue'
;   K[1]='generateTime'
;   K[2]='infiniteTime'
;   K[3]='EnergyType'
;   K[4]='Main'
;   K[5]='1'
;   K[6]='Event'
;   K[7]='2'
;   K[8]='EnergyModel'
;   K[9]='__index'
;   K[10]='MaxEnergy'
;   K[11]=100
;   K[12]='TimePerEnergy'
;   K[13]=120
;   K[14]='Init'
;   K[15]='LateInit'
;   K[16]='GetData'
;   K[17]='PropertyType2EnergyType'
;   K[18]='EnergyModel'
;   K[19]='EnergyType2PropertyType'
;   K[20]='EnergyModel'
;   K[21]='PropertyType2InfiniteEnergyType'
;   K[22]='EnergyModel'
;   K[23]='InfiniteEnergyType2PropertyType'
;   K[24]='EnergyModel'
;   K[25]='GetEnergy'
;   K[26]='SetEnergy'
;   K[27]='GetGenerationTime'
;   K[28]='SetGenerationTime'
;   K[29]='GetEnergyInfiniteTime'
;   K[30]='AddEnergyInfiniteTime'
;   K[31]='IsEnergyInfinite'
;   K[32]='HasEnoughEnergy'
;   K[33]='ResetEnergy'
;   K[34]='EnergyModel'
;   K[35]='Destroy'
;   K[36]='_CheckDefaultValue'
;   K[37]='_GetPropertyType'
;   K[38]='_RestoreEnergy'
;   K[39]='EnergyModel'
;   K[40]='IsEnergyFull'
;   K[41]='EnergyModel'
;   K[42]='GetRestoreOneRestDuration'
;   K[43]='EnergyModel'
;   K[44]='GetEnergyFullDuration'
;   K[45]='EnergyModel'
;   K[46]='SubtractEnergy'
;   K[47]='AddEnergy'
;   K[48]='EnergyModel'
;   K[49]='FromSyncData'
;   K[50]='UpdatePerSecond'
;   K[51]='OnLackEnergy'
;   K[52]='OnEnergyConsumed'
;   upvals: _ENV
;   locals: Energy_DBKey(1-104), GenerationTime_DBKey(2-104), InfiniteTime_DBKey(3-104)
0000  LOADK     R0 = K0 'energyValue'
0001  LOADK     R1 = K1 'generateTime'
0002  LOADK     R2 = K2 'infiniteTime'
0003  NEWTABLE  R3 = {} (0 items)
0004  SETTABLE  R3[K4('Main')] = K5('1')
0005  SETTABLE  R3[K6('Event')] = K7('2')
0006  SETTABUP  _ENV[K3('EnergyType')] = R3
0007  NEWTABLE  R3 = {} (0 items)
0008  SETTABUP  _ENV[K8('EnergyModel')] = R3
0009  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0010  GETTABUP  R4 = _ENV[K8('EnergyModel')]
0011  SETTABLE  R3[K9('__index')] = R4
0012  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0013  SETTABLE  R3[K10('MaxEnergy')] = K11(100)
0014  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0015  SETTABLE  R3[K12('TimePerEnergy')] = K13(120)
0016  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0017  CLOSURE   R4 = closure proto0
0018  SETTABLE  R3[K14('Init')] = R4
0019  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0020  CLOSURE   R4 = closure proto1
0021  SETTABLE  R3[K15('LateInit')] = R4
0022  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0023  CLOSURE   R4 = closure proto2
0024  SETTABLE  R3[K16('GetData')] = R4
0025  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0026  CLOSURE   R4 = closure proto3
0027  SETTABLE  R3[K17('PropertyType2EnergyType')] = R4
0028  GETTABUP  R3 = _ENV[K18('EnergyModel')]
0029  CLOSURE   R4 = closure proto4
0030  SETTABLE  R3[K19('EnergyType2PropertyType')] = R4
0031  GETTABUP  R3 = _ENV[K20('EnergyModel')]
0032  CLOSURE   R4 = closure proto5
0033  SETTABLE  R3[K21('PropertyType2InfiniteEnergyType')] = R4
0034  GETTABUP  R3 = _ENV[K22('EnergyModel')]
0035  CLOSURE   R4 = closure proto6
0036  SETTABLE  R3[K23('InfiniteEnergyType2PropertyType')] = R4
0037  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0038  CLOSURE   R4 = closure proto7
0039  SETTABLE  R3[K25('GetEnergy')] = R4
0040  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0041  CLOSURE   R4 = closure proto8
0042  SETTABLE  R3[K26('SetEnergy')] = R4
0043  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0044  CLOSURE   R4 = closure proto9
0045  SETTABLE  R3[K27('GetGenerationTime')] = R4
0046  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0047  CLOSURE   R4 = closure proto10
0048  SETTABLE  R3[K28('SetGenerationTime')] = R4
0049  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0050  CLOSURE   R4 = closure proto11
0051  SETTABLE  R3[K29('GetEnergyInfiniteTime')] = R4
0052  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0053  CLOSURE   R4 = closure proto12
0054  SETTABLE  R3[K30('AddEnergyInfiniteTime')] = R4
0055  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0056  CLOSURE   R4 = closure proto13
0057  SETTABLE  R3[K31('IsEnergyInfinite')] = R4
0058  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0059  CLOSURE   R4 = closure proto14
0060  SETTABLE  R3[K32('HasEnoughEnergy')] = R4
0061  GETTABUP  R3 = _ENV[K24('EnergyModel')]
0062  CLOSURE   R4 = closure proto15
0063  SETTABLE  R3[K33('ResetEnergy')] = R4
0064  GETTABUP  R3 = _ENV[K34('EnergyModel')]
0065  CLOSURE   R4 = closure proto16
0066  SETTABLE  R3[K35('Destroy')] = R4
0067  GETTABUP  R3 = _ENV[K34('EnergyModel')]
0068  CLOSURE   R4 = closure proto17
0069  SETTABLE  R3[K36('_CheckDefaultValue')] = R4
0070  GETTABUP  R3 = _ENV[K34('EnergyModel')]
0071  CLOSURE   R4 = closure proto18
0072  SETTABLE  R3[K37('_GetPropertyType')] = R4
0073  GETTABUP  R3 = _ENV[K34('EnergyModel')]
0074  CLOSURE   R4 = closure proto19
0075  SETTABLE  R3[K38('_RestoreEnergy')] = R4
0076  GETTABUP  R3 = _ENV[K39('EnergyModel')]
0077  CLOSURE   R4 = closure proto20
0078  SETTABLE  R3[K40('IsEnergyFull')] = R4
0079  GETTABUP  R3 = _ENV[K41('EnergyModel')]
0080  CLOSURE   R4 = closure proto21
0081  SETTABLE  R3[K42('GetRestoreOneRestDuration')] = R4
0082  GETTABUP  R3 = _ENV[K43('EnergyModel')]
0083  CLOSURE   R4 = closure proto22
0084  SETTABLE  R3[K44('GetEnergyFullDuration')] = R4
0085  GETTABUP  R3 = _ENV[K45('EnergyModel')]
0086  CLOSURE   R4 = closure proto23
0087  SETTABLE  R3[K46('SubtractEnergy')] = R4
0088  GETTABUP  R3 = _ENV[K8('EnergyModel')]
0089  CLOSURE   R4 = closure proto24
0090  SETTABLE  R3[K47('AddEnergy')] = R4
0091  GETTABUP  R3 = _ENV[K48('EnergyModel')]
0092  CLOSURE   R4 = closure proto25
0093  SETTABLE  R3[K49('FromSyncData')] = R4
0094  GETTABUP  R3 = _ENV[K48('EnergyModel')]
0095  CLOSURE   R4 = closure proto26
0096  SETTABLE  R3[K50('UpdatePerSecond')] = R4
0097  GETTABUP  R3 = _ENV[K48('EnergyModel')]
0098  CLOSURE   R4 = closure proto27
0099  SETTABLE  R3[K51('OnLackEnergy')] = R4
0100  GETTABUP  R3 = _ENV[K48('EnergyModel')]
0101  CLOSURE   R4 = closure proto28
0102  SETTABLE  R3[K52('OnEnergyConsumed')] = R4
0103  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 17-19 np=1 va=0 ms=4 code=8 consts=6 upvals=1 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='GM'
  ;   K[2]='DBTableManager'
  ;   K[3]='GetTable'
  ;   K[4]='EDBTableConfigs'
  ;   K[5]='Energy'
  ;   upvals: _ENV
  ;   locals: self(0-8)
  0000  GETTABUP  R1 = _ENV[K1('GM')]
  0001  GETTABLE  R1 = R1[K2('DBTableManager')]
  0002  SELF      R2 = R1[K3('GetTable')] (self)
  0003  GETTABUP  R3 = _ENV[K4('EDBTableConfigs')]
  0004  GETTABLE  R3 = R3[K5('Energy')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  SETTABLE  R0[K0('m_dbTable')] = R1
  0007  RETURN    return R0..R-1
; ---------- proto1 [LateInit] ----------
  ; fn ?  line 21-26 np=1 va=0 ms=5 code=13 consts=8 upvals=1 protos=0
  ;   K[0]='m_bStartRestore'
  ;   K[1]=true
  ;   K[2]='_CheckDefaultValue'
  ;   K[3]='_RestoreEnergy'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='EEventType'
  ;   K[7]='LoginFinished'
  ;   upvals: _ENV
  ;   locals: self(0-13)
  0000  SETTABLE  R0[K0('m_bStartRestore')] = K1(true)
  0001  SELF      R2 = R0[K2('_CheckDefaultValue')] (self)
  0002  CALL      R1 = call(R1, 0 args, 1 rets)
  0003  SELF      R2 = R0[K3('_RestoreEnergy')] (self)
  0004  CALL      R1 = call(R1, 0 args, 1 rets)
  0005  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0006  GETTABLE  R1 = R1[K5('AddListener')]
  0007  GETTABUP  R2 = _ENV[K6('EEventType')]
  0008  GETTABLE  R2 = R2[K7('LoginFinished')]
  0009  MOVE      R3 = R0
  0010  GETTABLE  R4 = R0[K3('_RestoreEnergy')]
  0011  CALL      R1 = call(R1, 0 args, 3 rets)
  0012  RETURN    return R0..R-1
; ---------- proto2 [GetData] ----------
  ; fn ?  line 28-30 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_dbTable'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_dbTable')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto3 [PropertyType2EnergyType] ----------
  ; fn ?  line 32-40 np=1 va=0 ms=5 code=17 consts=7 upvals=1 protos=0
  ;   K[0]='EnergyModel'
  ;   K[1]='m_mapPropertyType2EnergyType'
  ;   K[2]=nil
  ;   K[3]='EPropertyType'
  ;   K[4]='Energy'
  ;   K[5]='EnergyType'
  ;   K[6]='Main'
  ;   upvals: _ENV
  ;   locals: pType(0-17)
  0000  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0001  GETTABLE  R1 = R1[K1('m_mapPropertyType2EnergyType')]
  0002  EQ        if R0 eq K2(nil)   -> -130298
  0003  JMP       (jump)   -> 12
  0004  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0005  NEWTABLE  R2 = {} (0 items)
  0006  GETTABUP  R3 = _ENV[K3('EPropertyType')]
  0007  GETTABLE  R3 = R3[K4('Energy')]
  0008  GETTABUP  R4 = _ENV[K5('EnergyType')]
  0009  GETTABLE  R4 = R4[K6('Main')]
  0010  SETTABLE  R2[R3] = R4
  0011  SETTABLE  R1[K1('m_mapPropertyType2EnergyType')] = R2
  0012  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0013  GETTABLE  R1 = R1[K1('m_mapPropertyType2EnergyType')]
  0014  GETTABLE  R1 = R1[R0]
  0015  RETURN    return R1..R0
  0016  RETURN    return R0..R-1
; ---------- proto4 [EnergyType2PropertyType] ----------
  ; fn ?  line 42-51 np=1 va=0 ms=7 code=16 consts=6 upvals=1 protos=0
  ;   K[0]='EnergyModel'
  ;   K[1]='PropertyType2EnergyType'
  ;   K[2]='EPropertyType'
  ;   K[3]='Energy'
  ;   K[4]='pairs'
  ;   K[5]='m_mapPropertyType2EnergyType'
  ;   upvals: _ENV
  ;   locals: eType(0-16), (for generator)(9-15), (for state)(9-15), (for control)(9-15), k(10-13), v(10-13)
  0000  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0001  GETTABLE  R1 = R1[K1('PropertyType2EnergyType')]
  0002  GETTABUP  R2 = _ENV[K2('EPropertyType')]
  0003  GETTABLE  R2 = R2[K3('Energy')]
  0004  CALL      R1 = call(R1, 0 args, 1 rets)
  0005  GETTABUP  R1 = _ENV[K4('pairs')]
  0006  GETTABUP  R2 = _ENV[K0('EnergyModel')]
  0007  GETTABLE  R2 = R2[K5('m_mapPropertyType2EnergyType')]
  0008  CALL      R1 = call(R1, 3 args, 1 rets)
  0009  JMP       (jump)   -> 13
  0010  EQ        if R0 eq R0   -> -128500
  0011  JMP       (jump)   -> 13
  0012  RETURN    return R4..R3
  0013  TFORCALL  tforcall R1
  0014  TFORLOOP  tforloop R3(sBx=-5)   -> 10
  0015  RETURN    return R0..R-1
; ---------- proto5 [PropertyType2InfiniteEnergyType] ----------
  ; fn ?  line 53-60 np=1 va=0 ms=3 code=12 consts=3 upvals=1 protos=0
  ;   K[0]='EnergyModel'
  ;   K[1]='m_mapPropertyType2InfiniteEnergyType'
  ;   K[2]=nil
  ;   upvals: _ENV
  ;   locals: pType(0-12)
  0000  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0001  GETTABLE  R1 = R1[K1('m_mapPropertyType2InfiniteEnergyType')]
  0002  EQ        if R0 eq K2(nil)   -> -130298
  0003  JMP       (jump)   -> 7
  0004  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0005  NEWTABLE  R2 = {} (0 items)
  0006  SETTABLE  R1[K1('m_mapPropertyType2InfiniteEnergyType')] = R2
  0007  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0008  GETTABLE  R1 = R1[K1('m_mapPropertyType2InfiniteEnergyType')]
  0009  GETTABLE  R1 = R1[R0]
  0010  RETURN    return R1..R0
  0011  RETURN    return R0..R-1
; ---------- proto6 [InfiniteEnergyType2PropertyType] ----------
  ; fn ?  line 62-71 np=1 va=0 ms=7 code=16 consts=6 upvals=1 protos=0
  ;   K[0]='EnergyModel'
  ;   K[1]='PropertyType2InfiniteEnergyType'
  ;   K[2]='EPropertyType'
  ;   K[3]='EnergyInfiniteTime'
  ;   K[4]='pairs'
  ;   K[5]='m_mapPropertyType2InfiniteEnergyType'
  ;   upvals: _ENV
  ;   locals: iType(0-16), (for generator)(9-15), (for state)(9-15), (for control)(9-15), k(10-13), v(10-13)
  0000  GETTABUP  R1 = _ENV[K0('EnergyModel')]
  0001  GETTABLE  R1 = R1[K1('PropertyType2InfiniteEnergyType')]
  0002  GETTABUP  R2 = _ENV[K2('EPropertyType')]
  0003  GETTABLE  R2 = R2[K3('EnergyInfiniteTime')]
  0004  CALL      R1 = call(R1, 0 args, 1 rets)
  0005  GETTABUP  R1 = _ENV[K4('pairs')]
  0006  GETTABUP  R2 = _ENV[K0('EnergyModel')]
  0007  GETTABLE  R2 = R2[K5('m_mapPropertyType2InfiniteEnergyType')]
  0008  CALL      R1 = call(R1, 3 args, 1 rets)
  0009  JMP       (jump)   -> 13
  0010  EQ        if R0 eq R0   -> -128500
  0011  JMP       (jump)   -> 13
  0012  RETURN    return R4..R3
  0013  TFORCALL  tforcall R1
  0014  TFORLOOP  tforloop R3(sBx=-5)   -> 10
  0015  RETURN    return R0..R-1
; ---------- proto7 [GetEnergy] ----------
  ; fn ?  line 73-76 np=2 va=0 ms=6 code=18 consts=7 upvals=2 protos=0
  ;   K[0]='Log'
  ;   K[1]='Assert'
  ;   K[2]=nil
  ;   K[3]='energy type can not be nil'
  ;   K[4]='m_dbTable'
  ;   K[5]='GetValue'
  ;   K[6]=0
  ;   upvals: _ENV, Energy_DBKey
  ;   locals: self(0-18), type(0-18)
  0000  GETTABUP  R2 = _ENV[K0('Log')]
  0001  GETTABLE  R2 = R2[K1('Assert')]
  0002  EQ        if R0 eq K2(nil)   -> -130298
  0003  JMP       (jump)   -> 5
  0004  LOADBOOL  R3 = false
  0005  LOADBOOL  R3 = true
  0006  LOADK     R4 = K3 'energy type can not be nil'
  0007  CALL      R2 = call(R2, 0 args, 2 rets)
  0008  GETTABLE  R2 = R0[K4('m_dbTable')]
  0009  SELF      R3 = R2[K5('GetValue')] (self)
  0010  MOVE      R4 = R0
  0011  GETUPVAL  R5 = _ENV
  0012  CALL      R2 = call(R2, 1 args, 3 rets)
  0013  TEST      if not R2 then   -> -131056
  0014  JMP       (jump)   -> 16
  0015  LOADK     R2 = K6 0
  0016  RETURN    return R2..R1
  0017  RETURN    return R0..R-1
; ---------- proto8 [SetEnergy] ----------
  ; fn ?  line 78-82 np=3 va=0 ms=9 code=19 consts=9 upvals=2 protos=0
  ;   K[0]='GetEnergy'
  ;   K[1]='GetData'
  ;   K[2]='Set'
  ;   K[3]='EventDispatcher'
  ;   K[4]='DispatchEvent'
  ;   K[5]='EEventType'
  ;   K[6]='EnergyChanged'
  ;   K[7]='type'
  ;   K[8]='prevEnergy'
  ;   upvals: Energy_DBKey, _ENV
  ;   locals: self(0-19), type(0-19), energy(0-19), prevEnergy(3-19)
  0000  SELF      R4 = R0[K0('GetEnergy')] (self)
  0001  MOVE      R5 = R0
  0002  CALL      R3 = call(R3, 1 args, 2 rets)
  0003  SELF      R5 = R0[K1('GetData')] (self)
  0004  CALL      R4 = call(R4, 1 args, 1 rets)
  0005  SELF      R5 = R4[K2('Set')] (self)
  0006  MOVE      R6 = R0
  0007  GETUPVAL  R7 = Energy_DBKey
  0008  MOVE      R8 = R0
  0009  CALL      R4 = call(R4, 0 args, 4 rets)
  0010  GETTABUP  R4 = _ENV[K3('EventDispatcher')]
  0011  GETTABLE  R4 = R4[K4('DispatchEvent')]
  0012  GETTABUP  R5 = _ENV[K5('EEventType')]
  0013  GETTABLE  R5 = R5[K6('EnergyChanged')]
  0014  NEWTABLE  R6 = {} (0 items)
  0015  SETTABLE  R6[K7('type')] = R1
  0016  SETTABLE  R6[K8('prevEnergy')] = R3
  0017  CALL      R4 = call(R4, 0 args, 2 rets)
  0018  RETURN    return R0..R-1
; ---------- proto9 [GetGenerationTime] ----------
  ; fn ?  line 84-86 np=2 va=0 ms=6 code=10 consts=3 upvals=1 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='GetValue'
  ;   K[2]=0
  ;   upvals: GenerationTime_DBKey
  ;   locals: self(0-10), type(0-10)
  0000  GETTABLE  R2 = R0[K0('m_dbTable')]
  0001  SELF      R3 = R2[K1('GetValue')] (self)
  0002  MOVE      R4 = R0
  0003  GETUPVAL  R5 = GenerationTime_DBKey
  0004  CALL      R2 = call(R2, 1 args, 3 rets)
  0005  TEST      if not R2 then   -> -131064
  0006  JMP       (jump)   -> 8
  0007  LOADK     R2 = K2 0
  0008  RETURN    return R2..R1
  0009  RETURN    return R0..R-1
; ---------- proto10 [SetGenerationTime] ----------
  ; fn ?  line 88-90 np=3 va=0 ms=8 code=8 consts=2 upvals=1 protos=0
  ;   K[0]='GetData'
  ;   K[1]='Set'
  ;   upvals: GenerationTime_DBKey
  ;   locals: self(0-8), type(0-8), time(0-8)
  0000  SELF      R4 = R0[K0('GetData')] (self)
  0001  CALL      R3 = call(R3, 1 args, 1 rets)
  0002  SELF      R4 = R3[K1('Set')] (self)
  0003  MOVE      R5 = R0
  0004  GETUPVAL  R6 = GenerationTime_DBKey
  0005  MOVE      R7 = R0
  0006  CALL      R3 = call(R3, 0 args, 4 rets)
  0007  RETURN    return R0..R-1
; ---------- proto11 [GetEnergyInfiniteTime] ----------
  ; fn ?  line 92-94 np=2 va=0 ms=6 code=7 consts=2 upvals=1 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='GetValue'
  ;   upvals: InfiniteTime_DBKey
  ;   locals: self(0-7), type(0-7)
  0000  GETTABLE  R2 = R0[K0('m_dbTable')]
  0001  SELF      R3 = R2[K1('GetValue')] (self)
  0002  MOVE      R4 = R0
  0003  GETUPVAL  R5 = InfiniteTime_DBKey
  0004  TAILCALL  tailcall(R2, 0)
  0005  RETURN    return R2..R1
  0006  RETURN    return R0..R-1
; ---------- proto12 [AddEnergyInfiniteTime] ----------
  ; fn ?  line 96-105 np=3 va=0 ms=9 code=41 consts=17 upvals=2 protos=0
  ;   K[0]=0
  ;   K[1]='GM'
  ;   K[2]='BIManager'
  ;   K[3]='LogErrorInfo'
  ;   K[4]='EBIType'
  ;   K[5]='AddInfiniteEnergyError'
  ;   K[6]='t'
  ;   K[7]='d'
  ;   K[8]='math'
  ;   K[9]='max'
  ;   K[10]='GetEnergyInfiniteTime'
  ;   K[11]='GameModel'
  ;   K[12]='GetServerTime'
  ;   K[13]='LogAction'
  ;   K[14]='AddInfiniteEnergy'
  ;   K[15]='m_dbTable'
  ;   K[16]='Set'
  ;   upvals: _ENV, InfiniteTime_DBKey
  ;   locals: self(0-41), type(0-41), delta(0-41), curTime(25-41)
  0000  LE        if R0 le K0(0)   -> -129790
  0001  JMP       (jump)   -> 12
  0002  GETTABUP  R3 = _ENV[K1('GM')]
  0003  GETTABLE  R3 = R3[K2('BIManager')]
  0004  SELF      R4 = R3[K3('LogErrorInfo')] (self)
  0005  GETTABUP  R5 = _ENV[K4('EBIType')]
  0006  GETTABLE  R5 = R5[K5('AddInfiniteEnergyError')]
  0007  NEWTABLE  R6 = {} (0 items)
  0008  SETTABLE  R6[K6('t')] = R1
  0009  SETTABLE  R6[K7('d')] = R2
  0010  CALL      R3 = call(R3, 0 args, 3 rets)
  0011  RETURN    return R0..R-1
  0012  GETTABUP  R3 = _ENV[K8('math')]
  0013  GETTABLE  R3 = R3[K9('max')]
  0014  SELF      R5 = R0[K10('GetEnergyInfiniteTime')] (self)
  0015  MOVE      R6 = R0
  0016  CALL      R4 = call(R4, 1 args, 2 rets)
  0017  TEST      if not R4 then   -> -131052
  0018  JMP       (jump)   -> 20
  0019  LOADK     R4 = K0 0
  0020  GETTABUP  R5 = _ENV[K1('GM')]
  0021  GETTABLE  R5 = R5[K11('GameModel')]
  0022  SELF      R6 = R5[K12('GetServerTime')] (self)
  0023  CALL      R5 = call(R5, -1 args, 1 rets)
  0024  CALL      R3 = call(R3, 1 args, -1 rets)
  0025  GETTABUP  R4 = _ENV[K1('GM')]
  0026  GETTABLE  R4 = R4[K2('BIManager')]
  0027  SELF      R5 = R4[K13('LogAction')] (self)
  0028  GETTABUP  R6 = _ENV[K4('EBIType')]
  0029  GETTABLE  R6 = R6[K14('AddInfiniteEnergy')]
  0030  NEWTABLE  R7 = {} (0 items)
  0031  SETTABLE  R7[K6('t')] = R1
  0032  SETTABLE  R7[K7('d')] = R2
  0033  CALL      R4 = call(R4, 0 args, 3 rets)
  0034  GETTABLE  R4 = R0[K15('m_dbTable')]
  0035  SELF      R5 = R4[K16('Set')] (self)
  0036  MOVE      R6 = R0
  0037  GETUPVAL  R7 = _ENV
  0038  ADD       R8 = R2 add R3
  0039  CALL      R4 = call(R4, 0 args, 4 rets)
  0040  RETURN    return R0..R-1
; ---------- proto13 [IsEnergyInfinite] ----------
  ; fn ?  line 107-109 np=2 va=0 ms=5 code=16 consts=5 upvals=1 protos=0
  ;   K[0]='GetEnergyInfiniteTime'
  ;   K[1]=0
  ;   K[2]='GM'
  ;   K[3]='GameModel'
  ;   K[4]='GetServerTime'
  ;   upvals: _ENV
  ;   locals: self(0-16), type(0-16)
  0000  SELF      R3 = R0[K0('GetEnergyInfiniteTime')] (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  LOADK     R2 = K1 0
  0006  GETTABUP  R3 = _ENV[K2('GM')]
  0007  GETTABLE  R3 = R3[K3('GameModel')]
  0008  SELF      R4 = R3[K4('GetServerTime')] (self)
  0009  CALL      R3 = call(R3, 1 args, 1 rets)
  0010  LT        if R1 lt R2   -> -129522
  0011  JMP       (jump)   -> 13
  0012  LOADBOOL  R2 = false
  0013  LOADBOOL  R2 = true
  0014  RETURN    return R2..R1
  0015  RETURN    return R0..R-1
; ---------- proto14 [HasEnoughEnergy] ----------
  ; fn ?  line 111-113 np=3 va=0 ms=6 code=14 consts=2 upvals=0 protos=0
  ;   K[0]='IsEnergyInfinite'
  ;   K[1]='GetEnergy'
  ;   locals: self(0-14), type(0-14), count(0-14)
  0000  SELF      R4 = R0[K0('IsEnergyInfinite')] (self)
  0001  MOVE      R5 = R0
  0002  CALL      R3 = call(R3, 1 args, 2 rets)
  0003  TEST      if not R3 then   -> -131066
  0004  JMP       (jump)   -> 12
  0005  SELF      R4 = R0[K1('GetEnergy')] (self)
  0006  MOVE      R5 = R0
  0007  CALL      R3 = call(R3, 1 args, 2 rets)
  0008  LE        if R1 le R3   -> -130035
  0009  JMP       (jump)   -> 11
  0010  LOADBOOL  R3 = false
  0011  LOADBOOL  R3 = true
  0012  RETURN    return R3..R2
  0013  RETURN    return R0..R-1
; ---------- proto15 [ResetEnergy] ----------
  ; fn ?  line 116-118 np=2 va=0 ms=6 code=6 consts=3 upvals=1 protos=0
  ;   K[0]='SetEnergy'
  ;   K[1]='EnergyModel'
  ;   K[2]='MaxEnergy'
  ;   upvals: _ENV
  ;   locals: self(0-6), type(0-6)
  0000  SELF      R3 = R0[K0('SetEnergy')] (self)
  0001  MOVE      R4 = R0
  0002  GETTABUP  R5 = _ENV[K1('EnergyModel')]
  0003  GETTABLE  R5 = R5[K2('MaxEnergy')]
  0004  CALL      R2 = call(R2, 0 args, 3 rets)
  0005  RETURN    return R0..R-1
; ---------- proto16 [Destroy] ----------
  ; fn ?  line 120-122 np=1 va=0 ms=3 code=5 consts=2 upvals=1 protos=0
  ;   K[0]='EventDispatcher'
  ;   K[1]='RemoveTarget'
  ;   upvals: _ENV
  ;   locals: self(0-5)
  0000  GETTABUP  R1 = _ENV[K0('EventDispatcher')]
  0001  GETTABLE  R1 = R1[K1('RemoveTarget')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  RETURN    return R0..R-1
; ---------- proto17 [_CheckDefaultValue] ----------
  ; fn ?  line 125-132 np=1 va=0 ms=9 code=16 consts=5 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='EnergyType'
  ;   K[2]='m_dbTable'
  ;   K[3]='HasRow'
  ;   K[4]='ResetEnergy'
  ;   upvals: _ENV
  ;   locals: self(0-16), (for generator)(3-15), (for state)(3-15), (for control)(3-15), _(4-13), type(4-13)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('EnergyType')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 13
  0004  GETTABLE  R6 = R0[K2('m_dbTable')]
  0005  SELF      R7 = R6[K3('HasRow')] (self)
  0006  MOVE      R8 = R0
  0007  CALL      R6 = call(R6, 1 args, 2 rets)
  0008  TEST      if not R6 then   -> -131061
  0009  JMP       (jump)   -> 13
  0010  SELF      R7 = R0[K4('ResetEnergy')] (self)
  0011  MOVE      R8 = R0
  0012  CALL      R6 = call(R6, 0 args, 2 rets)
  0013  TFORCALL  tforcall R1
  0014  TFORLOOP  tforloop R3(sBx=-11)   -> 4
  0015  RETURN    return R0..R-1
; ---------- proto18 [_GetPropertyType] ----------
  ; fn ?  line 134-139 np=2 va=0 ms=3 code=11 consts=5 upvals=1 protos=0
  ;   K[0]='EnergyType'
  ;   K[1]='Event'
  ;   K[2]='EPropertyType'
  ;   K[3]='EventEnergy'
  ;   K[4]='Energy'
  ;   upvals: _ENV
  ;   locals: self(0-11), energyType(0-11)
  0000  GETTABUP  R2 = _ENV[K0('EnergyType')]
  0001  GETTABLE  R2 = R2[K1('Event')]
  0002  EQ        if R0 eq R2   -> -130554
  0003  JMP       (jump)   -> 7
  0004  GETTABUP  R2 = _ENV[K2('EPropertyType')]
  0005  GETTABLE  R2 = R2[K3('EventEnergy')]
  0006  RETURN    return R2..R1
  0007  GETTABUP  R2 = _ENV[K2('EPropertyType')]
  0008  GETTABLE  R2 = R2[K4('Energy')]
  0009  RETURN    return R2..R1
  0010  RETURN    return R0..R-1
; ---------- proto19 [_RestoreEnergy] ----------
  ; fn ?  line 141-181 np=2 va=0 ms=21 code=110 consts=37 upvals=1 protos=0
  ;   K[0]='bSuccess'
  ;   K[1]='GM'
  ;   K[2]='GameModel'
  ;   K[3]='GetServerTime'
  ;   K[4]='pairs'
  ;   K[5]='EnergyType'
  ;   K[6]='GetEnergy'
  ;   K[7]='EnergyModel'
  ;   K[8]='MaxEnergy'
  ;   K[9]='GetGenerationTime'
  ;   K[10]=0
  ;   K[11]='SetGenerationTime'
  ;   K[12]='TimePerEnergy'
  ;   K[13]='math'
  ;   K[14]='max'
  ;   K[15]='floor'
  ;   K[16]='min'
  ;   K[17]='GameConfig'
  ;   K[18]='IsTestMode'
  ;   K[19]='UIManager'
  ;   K[20]='ShowTestPrompt'
  ;   K[21]='体力类型 '
  ;   K[22]=' 时间回退'
  ;   K[23]='秒，体力相关数值修正'
  ;   K[24]='SetEnergy'
  ;   K[25]='type'
  ;   K[26]='EnergyType2PropertyType'
  ;   K[27]='count'
  ;   K[28]='EventDispatcher'
  ;   K[29]='DispatchEvent'
  ;   K[30]='EEventType'
  ;   K[31]='EnergyRestored'
  ;   K[32]='BIManager'
  ;   K[33]='LogAcquire'
  ;   K[34]='_GetPropertyType'
  ;   K[35]='EBIType'
  ;   K[36]='EnergyRestore'
  ;   upvals: _ENV
  ;   locals: self(0-110), message(0-110), curTime(10-110), (for generator)(13-109), (for state)(13-109), (for control)(13-109), key(14-107), type(14-107), curEnergy(17-107), recordTime(24-107), gapTime(32-107), addedEnergy(35-107), newEnergy(41-107), generationTime(78-107), msg(90-107)
  0000  TEST      if not R1 then   -> -131070
  0001  JMP       (jump)   -> 6
  0002  GETTABLE  R2 = R1[K0('bSuccess')]
  0003  TEST      if not R2 then   -> -131066
  0004  JMP       (jump)   -> 6
  0005  RETURN    return R0..R-1
  0006  GETTABUP  R2 = _ENV[K1('GM')]
  0007  GETTABLE  R2 = R2[K2('GameModel')]
  0008  SELF      R3 = R2[K3('GetServerTime')] (self)
  0009  CALL      R2 = call(R2, 1 args, 1 rets)
  0010  GETTABUP  R3 = _ENV[K4('pairs')]
  0011  GETTABUP  R4 = _ENV[K5('EnergyType')]
  0012  CALL      R3 = call(R3, 3 args, 1 rets)
  0013  JMP       (jump)   -> 107
  0014  SELF      R9 = R0[K6('GetEnergy')] (self)
  0015  MOVE      R10 = R0
  0016  CALL      R8 = call(R8, 1 args, 2 rets)
  0017  GETTABUP  R9 = _ENV[K7('EnergyModel')]
  0018  GETTABLE  R9 = R9[K8('MaxEnergy')]
  0019  LT        if R0 lt R9   -> -126946
  0020  JMP       (jump)   -> 107
  0021  SELF      R10 = R0[K9('GetGenerationTime')] (self)
  0022  MOVE      R11 = R0
  0023  CALL      R9 = call(R9, 1 args, 2 rets)
  0024  EQ        if R0 eq K10(0)   -> -126172
  0025  JMP       (jump)   -> 31
  0026  MOVE      R9 = R0
  0027  SELF      R11 = R0[K11('SetGenerationTime')] (self)
  0028  MOVE      R12 = R0
  0029  MOVE      R13 = R0
  0030  CALL      R10 = call(R10, 0 args, 3 rets)
  0031  SUB       R10 = R9 sub R2
  0032  GETTABUP  R11 = _ENV[K7('EnergyModel')]
  0033  GETTABLE  R11 = R11[K12('TimePerEnergy')]
  0034  IDIV      R11 = R11 idiv R10
  0035  GETTABUP  R12 = _ENV[K13('math')]
  0036  GETTABLE  R12 = R12[K14('max')]
  0037  LOADK     R13 = K10 0
  0038  MOVE      R14 = R0
  0039  CALL      R12 = call(R12, 1 args, 2 rets)
  0040  ADD       R12 = R12 add R8
  0041  GETTABUP  R13 = _ENV[K13('math')]
  0042  GETTABLE  R13 = R13[K15('floor')]
  0043  GETTABUP  R14 = _ENV[K13('math')]
  0044  GETTABLE  R14 = R14[K16('min')]
  0045  MOVE      R15 = R0
  0046  GETTABUP  R16 = _ENV[K7('EnergyModel')]
  0047  GETTABLE  R16 = R16[K8('MaxEnergy')]
  0048  CALL      R14 = call(R14, -1 args, 2 rets)
  0049  CALL      R13 = call(R13, 1 args, -1 rets)
  0050  MOVE      R12 = R0
  0051  LT        if R0 lt K10(0)   -> -125121
  0052  JMP       (jump)   -> 68
  0053  GETTABUP  R13 = _ENV[K17('GameConfig')]
  0054  GETTABLE  R13 = R13[K18('IsTestMode')]
  0055  CALL      R13 = call(R13, 1 args, 0 rets)
  0056  TEST      if not R13 then   -> -131014
  0057  JMP       (jump)   -> 68
  0058  GETTABUP  R13 = _ENV[K1('GM')]
  0059  GETTABLE  R13 = R13[K19('UIManager')]
  0060  SELF      R14 = R13[K20('ShowTestPrompt')] (self)
  0061  LOADK     R15 = K21 '体力类型 '
  0062  MOVE      R16 = R0
  0063  LOADK     R17 = K22 ' 时间回退'
  0064  MOVE      R18 = R0
  0065  LOADK     R19 = K23 '秒，体力相关数值修正'
  0066  CONCAT    R15 = concat(R15..R15)
  0067  CALL      R13 = call(R13, 0 args, 2 rets)
  0068  EQ        if R1 eq K10(0)   -> -125104
  0069  JMP       (jump)   -> 107
  0070  SELF      R14 = R0[K24('SetEnergy')] (self)
  0071  MOVE      R15 = R0
  0072  MOVE      R16 = R0
  0073  CALL      R13 = call(R13, 0 args, 3 rets)
  0074  GETTABUP  R13 = _ENV[K7('EnergyModel')]
  0075  GETTABLE  R13 = R13[K12('TimePerEnergy')]
  0076  MUL       R13 = R13 mul R11
  0077  ADD       R13 = R13 add R9
  0078  SELF      R15 = R0[K11('SetGenerationTime')] (self)
  0079  MOVE      R16 = R0
  0080  MOVE      R17 = R0
  0081  CALL      R14 = call(R14, 0 args, 3 rets)
  0082  NEWTABLE  R14 = {} (0 items)
  0083  GETTABUP  R15 = _ENV[K7('EnergyModel')]
  0084  GETTABLE  R15 = R15[K26('EnergyType2PropertyType')]
  0085  MOVE      R16 = R0
  0086  CALL      R15 = call(R15, 1 args, 1 rets)
  0087  SETTABLE  R14[K25('type')] = R15
  0088  SUB       R15 = R8 sub R12
  0089  SETTABLE  R14[K27('count')] = R15
  0090  GETTABUP  R15 = _ENV[K28('EventDispatcher')]
  0091  GETTABLE  R15 = R15[K29('DispatchEvent')]
  0092  GETTABUP  R16 = _ENV[K30('EEventType')]
  0093  GETTABLE  R16 = R16[K31('EnergyRestored')]
  0094  MOVE      R17 = R0
  0095  CALL      R15 = call(R15, 0 args, 2 rets)
  0096  GETTABUP  R15 = _ENV[K1('GM')]
  0097  GETTABLE  R15 = R15[K32('BIManager')]
  0098  SELF      R16 = R15[K33('LogAcquire')] (self)
  0099  SELF      R18 = R0[K34('_GetPropertyType')] (self)
  0100  MOVE      R19 = R0
  0101  CALL      R17 = call(R17, 1 args, 2 rets)
  0102  SUB       R18 = R8 sub R12
  0103  GETTABUP  R19 = _ENV[K35('EBIType')]
  0104  GETTABLE  R19 = R19[K36('EnergyRestore')]
  0105  LOADBOOL  R20 = true
  0106  CALL      R15 = call(R15, 0 args, 5 rets)
  0107  TFORCALL  tforcall R3
  0108  TFORLOOP  tforloop R5(sBx=-95)   -> 14
  0109  RETURN    return R0..R-1
; ---------- proto20 [IsEnergyFull] ----------
  ; fn ?  line 183-185 np=2 va=0 ms=5 code=11 consts=3 upvals=1 protos=0
  ;   K[0]='GetEnergy'
  ;   K[1]='EnergyModel'
  ;   K[2]='MaxEnergy'
  ;   upvals: _ENV
  ;   locals: self(0-11), type(0-11)
  0000  SELF      R3 = R0[K0('GetEnergy')] (self)
  0001  MOVE      R4 = R0
  0002  CALL      R2 = call(R2, 1 args, 2 rets)
  0003  GETTABUP  R3 = _ENV[K1('EnergyModel')]
  0004  GETTABLE  R3 = R3[K2('MaxEnergy')]
  0005  LE        if R1 le R2   -> -129527
  0006  JMP       (jump)   -> 8
  0007  LOADBOOL  R2 = false
  0008  LOADBOOL  R2 = true
  0009  RETURN    return R2..R1
  0010  RETURN    return R0..R-1
; ---------- proto21 [GetRestoreOneRestDuration] ----------
  ; fn ?  line 187-189 np=2 va=0 ms=5 code=13 consts=6 upvals=1 protos=0
  ;   K[0]='GetGenerationTime'
  ;   K[1]='EnergyModel'
  ;   K[2]='TimePerEnergy'
  ;   K[3]='GM'
  ;   K[4]='GameModel'
  ;   K[5]='GetServerTime'
  ;   upvals: _ENV
  ;   locals: self(0-13), type(0-13)
  0000  SELF      R3 = R0[K0('GetGenerationTime')] (self)
  0001  MOVE      R4 = R0
  0002  CALL      R2 = call(R2, 1 args, 2 rets)
  0003  GETTABUP  R3 = _ENV[K1('EnergyModel')]
  0004  GETTABLE  R3 = R3[K2('TimePerEnergy')]
  0005  ADD       R2 = R3 add R2
  0006  GETTABUP  R3 = _ENV[K3('GM')]
  0007  GETTABLE  R3 = R3[K4('GameModel')]
  0008  SELF      R4 = R3[K5('GetServerTime')] (self)
  0009  CALL      R3 = call(R3, 1 args, 1 rets)
  0010  SUB       R2 = R3 sub R2
  0011  RETURN    return R2..R1
  0012  RETURN    return R0..R-1
; ---------- proto22 [GetEnergyFullDuration] ----------
  ; fn ?  line 191-196 np=2 va=0 ms=7 code=23 consts=7 upvals=1 protos=0
  ;   K[0]='IsEnergyFull'
  ;   K[1]='GetRestoreOneRestDuration'
  ;   K[2]='EnergyModel'
  ;   K[3]='MaxEnergy'
  ;   K[4]='GetEnergy'
  ;   K[5]=1
  ;   K[6]='TimePerEnergy'
  ;   upvals: _ENV
  ;   locals: self(0-23), type(0-23)
  0000  SELF      R3 = R0[K0('IsEnergyFull')] (self)
  0001  MOVE      R4 = R0
  0002  CALL      R2 = call(R2, 1 args, 2 rets)
  0003  TEST      if not R2 then   -> -131067
  0004  JMP       (jump)   -> 7
  0005  LOADNIL   R2..R2 = nil
  0006  RETURN    return R2..R1
  0007  SELF      R3 = R0[K1('GetRestoreOneRestDuration')] (self)
  0008  MOVE      R4 = R0
  0009  CALL      R2 = call(R2, 1 args, 2 rets)
  0010  GETTABUP  R3 = _ENV[K2('EnergyModel')]
  0011  GETTABLE  R3 = R3[K3('MaxEnergy')]
  0012  SELF      R5 = R0[K4('GetEnergy')] (self)
  0013  MOVE      R6 = R0
  0014  CALL      R4 = call(R4, 1 args, 2 rets)
  0015  SUB       R3 = R4 sub R3
  0016  SUB       R3 = K5(1) sub R3
  0017  GETTABUP  R4 = _ENV[K2('EnergyModel')]
  0018  GETTABLE  R4 = R4[K6('TimePerEnergy')]
  0019  MUL       R3 = R4 mul R3
  0020  ADD       R2 = R3 add R2
  0021  RETURN    return R2..R1
  0022  RETURN    return R0..R-1
; ---------- proto23 [SubtractEnergy] ----------
  ; fn ?  line 198-227 np=4 va=0 ms=11 code=73 consts=25 upvals=1 protos=0
  ;   K[0]=0
  ;   K[1]='Log'
  ;   K[2]='Error'
  ;   K[3]='SubtractEnergy cost < 0'
  ;   K[4]='IsEnergyInfinite'
  ;   K[5]='GetEnergy'
  ;   K[6]='SubtractEnergy cost > curEnergy'
  ;   K[7]='SetEnergy'
  ;   K[8]='EnergyModel'
  ;   K[9]='MaxEnergy'
  ;   K[10]='SetGenerationTime'
  ;   K[11]='GM'
  ;   K[12]='GameModel'
  ;   K[13]='GetServerTime'
  ;   K[14]='EnergyType'
  ;   K[15]='Main'
  ;   K[16]='EBIType'
  ;   K[17]='UndoSellItem'
  ;   K[18]='BIManager'
  ;   K[19]='ChangeNumber'
  ;   K[20]='EBISyncKey'
  ;   K[21]='ConsumedEnergy'
  ;   K[22]='MainBoardModel'
  ;   K[23]='GetOrderModel'
  ;   K[24]='AddOrderGroupConsumeEnergy'
  ;   upvals: _ENV
  ;   locals: self(0-73), type(0-73), cost(0-73), scene(0-73), curEnergy(19-73), newEnergy(28-73), orderModel(66-69)
  0000  LT        if R0 lt K0(0)   -> -129790
  0001  JMP       (jump)   -> 8
  0002  GETTABUP  R4 = _ENV[K1('Log')]
  0003  GETTABLE  R4 = R4[K2('Error')]
  0004  LOADK     R5 = K3 'SubtractEnergy cost < 0'
  0005  CALL      R4 = call(R4, 0 args, 1 rets)
  0006  LOADBOOL  R4 = false
  0007  RETURN    return R4..R3
  0008  SELF      R5 = R0[K4('IsEnergyInfinite')] (self)
  0009  MOVE      R6 = R0
  0010  CALL      R4 = call(R4, 1 args, 2 rets)
  0011  TEST      if not R4 then   -> -131059
  0012  JMP       (jump)   -> 16
  0013  LOADBOOL  R4 = true
  0014  LOADK     R5 = K0 0
  0015  RETURN    return R4..R3
  0016  SELF      R5 = R0[K5('GetEnergy')] (self)
  0017  MOVE      R6 = R0
  0018  CALL      R4 = call(R4, 1 args, 2 rets)
  0019  LT        if R0 lt R2   -> -129001
  0020  JMP       (jump)   -> 27
  0021  GETTABUP  R5 = _ENV[K1('Log')]
  0022  GETTABLE  R5 = R5[K2('Error')]
  0023  LOADK     R6 = K6 'SubtractEnergy cost > curEnergy'
  0024  CALL      R5 = call(R5, 0 args, 1 rets)
  0025  LOADBOOL  R5 = false
  0026  RETURN    return R5..R4
  0027  SUB       R5 = R2 sub R4
  0028  SELF      R7 = R0[K7('SetEnergy')] (self)
  0029  MOVE      R8 = R0
  0030  MOVE      R9 = R0
  0031  CALL      R6 = call(R6, 0 args, 3 rets)
  0032  GETTABUP  R6 = _ENV[K8('EnergyModel')]
  0033  GETTABLE  R6 = R6[K9('MaxEnergy')]
  0034  LE        if R0 le R4   -> -127960
  0035  JMP       (jump)   -> 47
  0036  GETTABUP  R6 = _ENV[K8('EnergyModel')]
  0037  GETTABLE  R6 = R6[K9('MaxEnergy')]
  0038  LT        if R0 lt R6   -> -128466
  0039  JMP       (jump)   -> 47
  0040  SELF      R7 = R0[K10('SetGenerationTime')] (self)
  0041  MOVE      R8 = R0
  0042  GETTABUP  R9 = _ENV[K11('GM')]
  0043  GETTABLE  R9 = R9[K12('GameModel')]
  0044  SELF      R10 = R9[K13('GetServerTime')] (self)
  0045  CALL      R9 = call(R9, -1 args, 1 rets)
  0046  CALL      R6 = call(R6, 0 args, -1 rets)
  0047  GETTABUP  R6 = _ENV[K14('EnergyType')]
  0048  GETTABLE  R6 = R6[K15('Main')]
  0049  EQ        if R0 eq R6   -> -130503
  0050  JMP       (jump)   -> 69
  0051  GETTABUP  R6 = _ENV[K16('EBIType')]
  0052  GETTABLE  R6 = R6[K17('UndoSellItem')]
  0053  EQ        if R1 eq R6   -> -129475
  0054  JMP       (jump)   -> 69
  0055  GETTABUP  R6 = _ENV[K11('GM')]
  0056  GETTABLE  R6 = R6[K18('BIManager')]
  0057  SELF      R7 = R6[K19('ChangeNumber')] (self)
  0058  GETTABUP  R8 = _ENV[K20('EBISyncKey')]
  0059  GETTABLE  R8 = R8[K21('ConsumedEnergy')]
  0060  MOVE      R9 = R0
  0061  CALL      R6 = call(R6, 0 args, 3 rets)
  0062  GETTABUP  R6 = _ENV[K11('GM')]
  0063  GETTABLE  R6 = R6[K22('MainBoardModel')]
  0064  SELF      R7 = R6[K23('GetOrderModel')] (self)
  0065  CALL      R6 = call(R6, 1 args, 1 rets)
  0066  SELF      R8 = R6[K24('AddOrderGroupConsumeEnergy')] (self)
  0067  MOVE      R9 = R0
  0068  CALL      R7 = call(R7, 0 args, 2 rets)
  0069  LOADBOOL  R6 = true
  0070  MOVE      R7 = R0
  0071  RETURN    return R6..R5
  0072  RETURN    return R0..R-1
; ---------- proto24 [AddEnergy] ----------
  ; fn ?  line 229-238 np=4 va=0 ms=10 code=27 consts=13 upvals=1 protos=0
  ;   K[0]='GetEnergy'
  ;   K[1]='math'
  ;   K[2]='min'
  ;   K[3]='EnergyModel'
  ;   K[4]='MaxEnergy'
  ;   K[5]='SetEnergy'
  ;   K[6]='EventDispatcher'
  ;   K[7]='DispatchEvent'
  ;   K[8]='EEventType'
  ;   K[9]='OnAddEnergy'
  ;   K[10]='val'
  ;   K[11]='cur'
  ;   K[12]='type'
  ;   upvals: _ENV
  ;   locals: self(0-27), type(0-27), value(0-27), allowOverfull(0-27), curEnergy(3-27), newEnergy(4-27)
  0000  SELF      R5 = R0[K0('GetEnergy')] (self)
  0001  MOVE      R6 = R0
  0002  CALL      R4 = call(R4, 1 args, 2 rets)
  0003  ADD       R5 = R2 add R4
  0004  TEST      if not R3 then   -> -131065
  0005  JMP       (jump)   -> 13
  0006  GETTABUP  R6 = _ENV[K1('math')]
  0007  GETTABLE  R6 = R6[K2('min')]
  0008  MOVE      R7 = R0
  0009  GETTABUP  R8 = _ENV[K3('EnergyModel')]
  0010  GETTABLE  R8 = R8[K4('MaxEnergy')]
  0011  CALL      R6 = call(R6, 1 args, 2 rets)
  0012  MOVE      R5 = R0
  0013  SELF      R7 = R0[K5('SetEnergy')] (self)
  0014  MOVE      R8 = R0
  0015  MOVE      R9 = R0
  0016  CALL      R6 = call(R6, 0 args, 3 rets)
  0017  GETTABUP  R6 = _ENV[K6('EventDispatcher')]
  0018  GETTABLE  R6 = R6[K7('DispatchEvent')]
  0019  GETTABUP  R7 = _ENV[K8('EEventType')]
  0020  GETTABLE  R7 = R7[K9('OnAddEnergy')]
  0021  NEWTABLE  R8 = {} (0 items)
  0022  SETTABLE  R8[K10('val')] = R2
  0023  SETTABLE  R8[K11('cur')] = R5
  0024  SETTABLE  R8[K12('type')] = R1
  0025  CALL      R6 = call(R6, 0 args, 2 rets)
  0026  RETURN    return R0..R-1
; ---------- proto25 [FromSyncData] ----------
  ; fn ?  line 240-242 np=2 va=0 ms=5 code=5 consts=2 upvals=0 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='FromArr'
  ;   locals: self(0-5), dataArr(0-5)
  0000  GETTABLE  R2 = R0[K0('m_dbTable')]
  0001  SELF      R3 = R2[K1('FromArr')] (self)
  0002  MOVE      R4 = R0
  0003  CALL      R2 = call(R2, 0 args, 2 rets)
  0004  RETURN    return R0..R-1
; ---------- proto26 [UpdatePerSecond] ----------
  ; fn ?  line 244-250 np=1 va=0 ms=3 code=7 consts=2 upvals=0 protos=0
  ;   K[0]='m_bStartRestore'
  ;   K[1]='_RestoreEnergy'
  ;   locals: self(0-7)
  0000  GETTABLE  R1 = R0[K0('m_bStartRestore')]
  0001  TEST      if not R1 then   -> -131068
  0002  JMP       (jump)   -> 4
  0003  RETURN    return R0..R-1
  0004  SELF      R2 = R0[K1('_RestoreEnergy')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
; ---------- proto27 [OnLackEnergy] ----------
  ; fn ?  line 252-267 np=2 va=0 ms=8 code=47 consts=26 upvals=1 protos=0
  ;   K[0]='IsAutoRun'
  ;   K[1]='PROPERTY_TYPE'
  ;   K[2]='EPropertyType'
  ;   K[3]='Energy'
  ;   K[4]='PROPERTY_COUNT'
  ;   K[5]=400
  ;   K[6]='RewardApi'
  ;   K[7]='CryptRewards'
  ;   K[8]='AcquireRewardsLogic'
  ;   K[9]='EPropertySource'
  ;   K[10]='Give'
  ;   K[11]='EBIType'
  ;   K[12]='Test'
  ;   K[13]='ERewardScene'
  ;   K[14]='Other'
  ;   K[15]='TutorialHelper'
  ;   K[16]='GetHudButton'
  ;   K[17]='ESceneViewHudButtonKey'
  ;   K[18]='SyncToModelValue'
  ;   K[19]='EventDispatcher'
  ;   K[20]='DispatchEvent'
  ;   K[21]='EEventType'
  ;   K[22]='RefreshPrompt'
  ;   K[23]='GM'
  ;   K[24]='ShopModel'
  ;   K[25]='OpenEnergyWindow'
  ;   upvals: _ENV
  ;   locals: self(0-47), type(0-47), rewards(13-40)
  0000  GETTABUP  R2 = _ENV[K0('IsAutoRun')]
  0001  CALL      R2 = call(R2, 1 args, 0 rets)
  0002  TEST      if not R2 then   -> -131068
  0003  JMP       (jump)   -> 40
  0004  NEWTABLE  R2 = {} (1 items)
  0005  NEWTABLE  R3 = {} (0 items)
  0006  GETTABUP  R4 = _ENV[K1('PROPERTY_TYPE')]
  0007  GETTABUP  R5 = _ENV[K2('EPropertyType')]
  0008  GETTABLE  R5 = R5[K3('Energy')]
  0009  SETTABLE  R3[R4] = R5
  0010  GETTABUP  R4 = _ENV[K4('PROPERTY_COUNT')]
  0011  SETTABLE  R3[R4] = K5(400)
  0012  SETLIST   setlist R2[B=1,C=1]
  0013  GETTABUP  R3 = _ENV[K6('RewardApi')]
  0014  GETTABLE  R3 = R3[K7('CryptRewards')]
  0015  MOVE      R4 = R0
  0016  CALL      R3 = call(R3, 0 args, 1 rets)
  0017  GETTABUP  R3 = _ENV[K6('RewardApi')]
  0018  GETTABLE  R3 = R3[K8('AcquireRewardsLogic')]
  0019  MOVE      R4 = R0
  0020  GETTABUP  R5 = _ENV[K9('EPropertySource')]
  0021  GETTABLE  R5 = R5[K10('Give')]
  0022  GETTABUP  R6 = _ENV[K11('EBIType')]
  0023  GETTABLE  R6 = R6[K12('Test')]
  0024  GETTABUP  R7 = _ENV[K13('ERewardScene')]
  0025  GETTABLE  R7 = R7[K14('Other')]
  0026  CALL      R3 = call(R3, 0 args, 4 rets)
  0027  GETTABUP  R3 = _ENV[K15('TutorialHelper')]
  0028  GETTABLE  R3 = R3[K16('GetHudButton')]
  0029  GETTABUP  R4 = _ENV[K17('ESceneViewHudButtonKey')]
  0030  GETTABLE  R4 = R4[K3('Energy')]
  0031  CALL      R3 = call(R3, 1 args, 1 rets)
  0032  SELF      R4 = R3[K18('SyncToModelValue')] (self)
  0033  CALL      R3 = call(R3, 0 args, 1 rets)
  0034  GETTABUP  R3 = _ENV[K19('EventDispatcher')]
  0035  GETTABLE  R3 = R3[K20('DispatchEvent')]
  0036  GETTABUP  R4 = _ENV[K21('EEventType')]
  0037  GETTABLE  R4 = R4[K22('RefreshPrompt')]
  0038  CALL      R3 = call(R3, 0 args, 1 rets)
  0039  RETURN    return R0..R-1
  0040  GETTABUP  R2 = _ENV[K23('GM')]
  0041  GETTABLE  R2 = R2[K24('ShopModel')]
  0042  SELF      R3 = R2[K25('OpenEnergyWindow')] (self)
  0043  MOVE      R4 = R0
  0044  LOADBOOL  R5 = true
  0045  CALL      R2 = call(R2, 0 args, 3 rets)
  0046  RETURN    return R0..R-1
; ---------- proto28 [OnEnergyConsumed] ----------
  ; fn ?  line 269-271 np=3 va=0 ms=8 code=13 consts=9 upvals=1 protos=0
  ;   K[0]='EventDispatcher'
  ;   K[1]='DispatchEvent'
  ;   K[2]='EEventType'
  ;   K[3]='CosumeEnergy'
  ;   K[4]='pos'
  ;   K[5]='GetPosition'
  ;   K[6]='num'
  ;   K[7]='gameMode'
  ;   K[8]='itemModel'
  ;   upvals: _ENV
  ;   locals: itemModel(0-13), nCostEnergy(0-13), gameMode(0-13)
  0000  GETTABUP  R3 = _ENV[K0('EventDispatcher')]
  0001  GETTABLE  R3 = R3[K1('DispatchEvent')]
  0002  GETTABUP  R4 = _ENV[K2('EEventType')]
  0003  GETTABLE  R4 = R4[K3('CosumeEnergy')]
  0004  NEWTABLE  R5 = {} (0 items)
  0005  SELF      R7 = R0[K5('GetPosition')] (self)
  0006  CALL      R6 = call(R6, 1 args, 1 rets)
  0007  SETTABLE  R5[K4('pos')] = R6
  0008  SETTABLE  R5[K6('num')] = R1
  0009  SETTABLE  R5[K7('gameMode')] = R2
  0010  SETTABLE  R5[K8('itemModel')] = R0
  0011  CALL      R3 = call(R3, 0 args, 2 rets)
  0012  RETURN    return R0..R-1
