# Model_UserData_LevelModel_86.luac
; fn @LevelModel.lua  line 0-0 np=0 va=1 ms=2 code=39 consts=13 upvals=1 protos=11
;   K[0]='LevelModel'
;   K[1]='__index'
;   K[2]='Init'
;   K[3]='OnSceneViewLoaded'
;   K[4]='TryLevelUp'
;   K[5]='GetCurrentLevel'
;   K[6]='GetCurrentLevelConfig'
;   K[7]='SyncLevel'
;   K[8]='IfReachMaxLevel'
;   K[9]='CanLevelUp'
;   K[10]='GetLevelUpCost'
;   K[11]='GetLevelUpRewards'
;   K[12]='DoLevelUp'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('LevelModel')] = R0
0002  GETTABUP  R0 = _ENV[K0('LevelModel')]
0003  GETTABUP  R1 = _ENV[K0('LevelModel')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('LevelModel')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Init')] = R1
0008  GETTABUP  R0 = _ENV[K0('LevelModel')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('OnSceneViewLoaded')] = R1
0011  GETTABUP  R0 = _ENV[K0('LevelModel')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('TryLevelUp')] = R1
0014  GETTABUP  R0 = _ENV[K0('LevelModel')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('GetCurrentLevel')] = R1
0017  GETTABUP  R0 = _ENV[K0('LevelModel')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K6('GetCurrentLevelConfig')] = R1
0020  GETTABUP  R0 = _ENV[K0('LevelModel')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K7('SyncLevel')] = R1
0023  GETTABUP  R0 = _ENV[K0('LevelModel')]
0024  CLOSURE   R1 = closure proto6
0025  SETTABLE  R0[K8('IfReachMaxLevel')] = R1
0026  GETTABUP  R0 = _ENV[K0('LevelModel')]
0027  CLOSURE   R1 = closure proto7
0028  SETTABLE  R0[K9('CanLevelUp')] = R1
0029  GETTABUP  R0 = _ENV[K0('LevelModel')]
0030  CLOSURE   R1 = closure proto8
0031  SETTABLE  R0[K10('GetLevelUpCost')] = R1
0032  GETTABUP  R0 = _ENV[K0('LevelModel')]
0033  CLOSURE   R1 = closure proto9
0034  SETTABLE  R0[K11('GetLevelUpRewards')] = R1
0035  GETTABUP  R0 = _ENV[K0('LevelModel')]
0036  CLOSURE   R1 = closure proto10
0037  SETTABLE  R0[K12('DoLevelUp')] = R1
0038  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 4-13 np=1 va=0 ms=6 code=25 consts=13 upvals=1 protos=0
  ;   K[0]='m_curLevel'
  ;   K[1]='GM'
  ;   K[2]='UserModel'
  ;   K[3]='GetInNumber'
  ;   K[4]='EUserSyncDataKey'
  ;   K[5]='UserLevel'
  ;   K[6]=0
  ;   K[7]=1
  ;   K[8]='Set'
  ;   K[9]='CSFirebaseManager'
  ;   K[10]='CrashlyticsSetKeyValue'
  ;   K[11]='level'
  ;   K[12]='GetCurrentLevel'
  ;   upvals: _ENV
  ;   locals: self(0-25)
  0000  GETTABUP  R1 = _ENV[K1('GM')]
  0001  GETTABLE  R1 = R1[K2('UserModel')]
  0002  SELF      R2 = R1[K3('GetInNumber')] (self)
  0003  GETTABUP  R3 = _ENV[K4('EUserSyncDataKey')]
  0004  GETTABLE  R3 = R3[K5('UserLevel')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  SETTABLE  R0[K0('m_curLevel')] = R1
  0007  GETTABLE  R1 = R0[K0('m_curLevel')]
  0008  LE        if R0 le K6(0)   -> -130288
  0009  JMP       (jump)   -> 18
  0010  SETTABLE  R0[K0('m_curLevel')] = K7(1)
  0011  GETTABUP  R1 = _ENV[K1('GM')]
  0012  GETTABLE  R1 = R1[K2('UserModel')]
  0013  SELF      R2 = R1[K8('Set')] (self)
  0014  GETTABUP  R3 = _ENV[K4('EUserSyncDataKey')]
  0015  GETTABLE  R3 = R3[K5('UserLevel')]
  0016  GETTABLE  R4 = R0[K0('m_curLevel')]
  0017  CALL      R1 = call(R1, 0 args, 3 rets)
  0018  GETTABUP  R1 = _ENV[K9('CSFirebaseManager')]
  0019  SELF      R2 = R1[K10('CrashlyticsSetKeyValue')] (self)
  0020  LOADK     R3 = K11 'level'
  0021  SELF      R5 = R0[K12('GetCurrentLevel')] (self)
  0022  CALL      R4 = call(R4, -1 args, 1 rets)
  0023  CALL      R1 = call(R1, 0 args, -1 rets)
  0024  RETURN    return R0..R-1
; ---------- proto1 [OnSceneViewLoaded] ----------
  ; fn ?  line 15-17 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='TryLevelUp'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('TryLevelUp')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto2 [TryLevelUp] ----------
  ; fn ?  line 19-23 np=1 va=0 ms=3 code=7 consts=2 upvals=0 protos=0
  ;   K[0]='CanLevelUp'
  ;   K[1]='DoLevelUp'
  ;   locals: self(0-7)
  0000  SELF      R2 = R0[K0('CanLevelUp')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  TEST      if not R1 then   -> -131068
  0003  JMP       (jump)   -> 6
  0004  SELF      R2 = R0[K1('DoLevelUp')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
; ---------- proto3 [GetCurrentLevel] ----------
  ; fn ?  line 25-27 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_curLevel'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_curLevel')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto4 [GetCurrentLevelConfig] ----------
  ; fn ?  line 29-31 np=1 va=0 ms=3 code=5 consts=2 upvals=1 protos=0
  ;   K[0]='LevelConfig'
  ;   K[1]='m_curLevel'
  ;   upvals: _ENV
  ;   locals: self(0-5)
  0000  GETTABUP  R1 = _ENV[K0('LevelConfig')]
  0001  GETTABLE  R2 = R0[K1('m_curLevel')]
  0002  GETTABLE  R1 = R1[R2]
  0003  RETURN    return R1..R0
  0004  RETURN    return R0..R-1
; ---------- proto5 [SyncLevel] ----------
  ; fn ?  line 33-40 np=2 va=0 ms=6 code=24 consts=12 upvals=1 protos=0
  ;   K[0]='m_curLevel'
  ;   K[1]=0
  ;   K[2]=1
  ;   K[3]='Log'
  ;   K[4]='Info'
  ;   K[5]='LevelModel sync level to '
  ;   K[6]='tostring'
  ;   K[7]='GM'
  ;   K[8]='UserModel'
  ;   K[9]='Set'
  ;   K[10]='EUserSyncDataKey'
  ;   K[11]='UserLevel'
  ;   upvals: _ENV
  ;   locals: self(0-24), level(0-24)
  0000  SETTABLE  R0[K0('m_curLevel')] = R1
  0001  GETTABLE  R2 = R0[K0('m_curLevel')]
  0002  TEST      if not R2 then   -> -131068
  0003  JMP       (jump)   -> 7
  0004  GETTABLE  R2 = R0[K0('m_curLevel')]
  0005  LE        if R0 le K1(0)   -> -129784
  0006  JMP       (jump)   -> 8
  0007  SETTABLE  R0[K0('m_curLevel')] = K2(1)
  0008  GETTABUP  R2 = _ENV[K3('Log')]
  0009  GETTABLE  R2 = R2[K4('Info')]
  0010  LOADK     R3 = K5 'LevelModel sync level to '
  0011  GETTABUP  R4 = _ENV[K6('tostring')]
  0012  GETTABLE  R5 = R0[K0('m_curLevel')]
  0013  CALL      R4 = call(R4, 1 args, 1 rets)
  0014  CONCAT    R3 = concat(R3..R3)
  0015  CALL      R2 = call(R2, 0 args, 1 rets)
  0016  GETTABUP  R2 = _ENV[K7('GM')]
  0017  GETTABLE  R2 = R2[K8('UserModel')]
  0018  SELF      R3 = R2[K9('Set')] (self)
  0019  GETTABUP  R4 = _ENV[K10('EUserSyncDataKey')]
  0020  GETTABLE  R4 = R4[K11('UserLevel')]
  0021  GETTABLE  R5 = R0[K0('m_curLevel')]
  0022  CALL      R2 = call(R2, 0 args, 3 rets)
  0023  RETURN    return R0..R-1
; ---------- proto6 [IfReachMaxLevel] ----------
  ; fn ?  line 42-49 np=2 va=0 ms=4 code=19 consts=3 upvals=1 protos=0
  ;   K[0]='LevelConfig'
  ;   K[1]=nil
  ;   K[2]='GetCurrentLevel'
  ;   upvals: _ENV
  ;   locals: self(0-19), curLevel(0-19)
  0000  GETTABUP  R2 = _ENV[K0('LevelConfig')]
  0001  TEST      if not R2 then   -> -131068
  0002  JMP       (jump)   -> 5
  0003  LOADBOOL  R2 = true
  0004  RETURN    return R2..R1
  0005  EQ        if R0 eq K1(nil)   -> -130296
  0006  JMP       (jump)   -> 11
  0007  SELF      R3 = R0[K2('GetCurrentLevel')] (self)
  0008  CALL      R2 = call(R2, 1 args, 1 rets)
  0009  TESTSET   if R1 then R1   -> -130036
  0010  JMP       (jump)   -> 11
  0011  GETTABUP  R2 = _ENV[K0('LevelConfig')]
  0012  LEN       R2 = len R0
  0013  LE        if R1 le R1   -> -130032
  0014  JMP       (jump)   -> 16
  0015  LOADBOOL  R2 = false
  0016  LOADBOOL  R2 = true
  0017  RETURN    return R2..R1
  0018  RETURN    return R0..R-1
; ---------- proto7 [CanLevelUp] ----------
  ; fn ?  line 51-56 np=1 va=0 ms=5 code=22 consts=8 upvals=1 protos=0
  ;   K[0]='IfReachMaxLevel'
  ;   K[1]='GetCurrentLevel'
  ;   K[2]='GM'
  ;   K[3]='PropertyDataManager'
  ;   K[4]='GetPropertyNum'
  ;   K[5]='EPropertyType'
  ;   K[6]='Experience'
  ;   K[7]='GetLevelUpCost'
  ;   upvals: _ENV
  ;   locals: self(0-22)
  0000  SELF      R2 = R0[K0('IfReachMaxLevel')] (self)
  0001  SELF      R4 = R0[K1('GetCurrentLevel')] (self)
  0002  CALL      R3 = call(R3, -1 args, 1 rets)
  0003  CALL      R1 = call(R1, 1 args, -1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 8
  0006  LOADBOOL  R1 = false
  0007  RETURN    return R1..R0
  0008  GETTABUP  R1 = _ENV[K2('GM')]
  0009  GETTABLE  R1 = R1[K3('PropertyDataManager')]
  0010  SELF      R2 = R1[K4('GetPropertyNum')] (self)
  0011  GETTABUP  R3 = _ENV[K5('EPropertyType')]
  0012  GETTABLE  R3 = R3[K6('Experience')]
  0013  CALL      R1 = call(R1, 1 args, 2 rets)
  0014  SELF      R3 = R0[K7('GetLevelUpCost')] (self)
  0015  CALL      R2 = call(R2, 1 args, 1 rets)
  0016  LE        if R1 le R1   -> -130029
  0017  JMP       (jump)   -> 19
  0018  LOADBOOL  R1 = false
  0019  LOADBOOL  R1 = true
  0020  RETURN    return R1..R0
  0021  RETURN    return R0..R-1
; ---------- proto8 [GetLevelUpCost] ----------
  ; fn ?  line 58-68 np=2 va=0 ms=4 code=23 consts=6 upvals=1 protos=0
  ;   K[0]='LevelConfig'
  ;   K[1]=-1
  ;   K[2]='GetCurrentLevel'
  ;   K[3]=1
  ;   K[4]='Cost'
  ;   K[5]=0
  ;   upvals: _ENV
  ;   locals: self(0-23), uCurLevel(0-23)
  0000  GETTABUP  R2 = _ENV[K0('LevelConfig')]
  0001  TEST      if not R2 then   -> -131068
  0002  JMP       (jump)   -> 5
  0003  LOADK     R2 = K1 -1
  0004  RETURN    return R2..R1
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 10
  0007  SELF      R3 = R0[K2('GetCurrentLevel')] (self)
  0008  CALL      R2 = call(R2, 1 args, 1 rets)
  0009  MOVE      R1 = R0
  0010  LE        if R0 le R1   -> 1549
  0011  JMP       (jump)   -> 20
  0012  GETTABUP  R2 = _ENV[K0('LevelConfig')]
  0013  LEN       R2 = len R0
  0014  LE        if R0 le R2   -> -130542
  0015  JMP       (jump)   -> 20
  0016  GETTABUP  R2 = _ENV[K0('LevelConfig')]
  0017  GETTABLE  R2 = R2[R1]
  0018  GETTABLE  R2 = R2[K4('Cost')]
  0019  RETURN    return R2..R1
  0020  LOADK     R2 = K5 0
  0021  RETURN    return R2..R1
  0022  RETURN    return R0..R-1
; ---------- proto9 [GetLevelUpRewards] ----------
  ; fn ?  line 70-76 np=2 va=0 ms=4 code=18 consts=4 upvals=1 protos=0
  ;   K[0]='GetCurrentLevel'
  ;   K[1]=1
  ;   K[2]='LevelConfig'
  ;   K[3]='Rewards'
  ;   upvals: _ENV
  ;   locals: self(0-18), uCurLevel(0-18)
  0000  TEST      if not R1 then   -> -131069
  0001  JMP       (jump)   -> 5
  0002  SELF      R3 = R0[K0('GetCurrentLevel')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  MOVE      R1 = R0
  0005  LE        if R0 le R1   -> 520
  0006  JMP       (jump)   -> 15
  0007  GETTABUP  R2 = _ENV[K2('LevelConfig')]
  0008  LEN       R2 = len R0
  0009  LE        if R0 le R2   -> -130547
  0010  JMP       (jump)   -> 15
  0011  GETTABUP  R2 = _ENV[K2('LevelConfig')]
  0012  GETTABLE  R2 = R2[R1]
  0013  GETTABLE  R2 = R2[K3('Rewards')]
  0014  RETURN    return R2..R1
  0015  LOADNIL   R2..R2 = nil
  0016  RETURN    return R2..R1
  0017  RETURN    return R0..R-1
; ---------- proto10 [DoLevelUp] ----------
  ; fn ?  line 78-100 np=1 va=0 ms=8 code=74 consts=33 upvals=1 protos=0
  ;   K[0]='Log'
  ;   K[1]='Assert'
  ;   K[2]='CanLevelUp'
  ;   K[3]='LevelModel:DoLevelUp'
  ;   K[4]='GM'
  ;   K[5]='PropertyDataManager'
  ;   K[6]='Consume'
  ;   K[7]='EPropertyType'
  ;   K[8]='Experience'
  ;   K[9]='GetLevelUpCost'
  ;   K[10]='EBIType'
  ;   K[11]='LevelUp'
  ;   K[12]='m_curLevel'
  ;   K[13]='GetLevelUpRewards'
  ;   K[14]='RewardApi'
  ;   K[15]='CryptRewards'
  ;   K[16]=1
  ;   K[17]='UserModel'
  ;   K[18]='Set'
  ;   K[19]='EUserSyncDataKey'
  ;   K[20]='UserLevel'
  ;   K[21]='CSFirebaseManager'
  ;   K[22]='LogLevelUpEvent'
  ;   K[23]='OperBIManager'
  ;   K[24]='TrackLevelUpEvent'
  ;   K[25]='BIManager'
  ;   K[26]='LogAction'
  ;   K[27]='EventDispatcher'
  ;   K[28]='DispatchEvent'
  ;   K[29]='EEventType'
  ;   K[30]='GameModel'
  ;   K[31]='Login'
  ;   K[32]='RefreshSettingStrongTip'
  ;   upvals: _ENV
  ;   locals: self(0-74), arrRewards(26-63)
  0000  GETTABUP  R1 = _ENV[K0('Log')]
  0001  GETTABLE  R1 = R1[K1('Assert')]
  0002  SELF      R3 = R0[K2('CanLevelUp')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  LOADK     R3 = K3 'LevelModel:DoLevelUp'
  0005  CALL      R1 = call(R1, 0 args, 2 rets)
  0006  SELF      R2 = R0[K2('CanLevelUp')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  TEST      if not R1 then   -> -131062
  0009  JMP       (jump)   -> 64
  0010  GETTABUP  R1 = _ENV[K4('GM')]
  0011  GETTABLE  R1 = R1[K5('PropertyDataManager')]
  0012  SELF      R2 = R1[K6('Consume')] (self)
  0013  GETTABUP  R3 = _ENV[K7('EPropertyType')]
  0014  GETTABLE  R3 = R3[K8('Experience')]
  0015  SELF      R5 = R0[K9('GetLevelUpCost')] (self)
  0016  CALL      R4 = call(R4, 1 args, 1 rets)
  0017  GETTABUP  R5 = _ENV[K10('EBIType')]
  0018  GETTABLE  R5 = R5[K11('LevelUp')]
  0019  LOADBOOL  R6 = false
  0020  GETTABLE  R7 = R0[K12('m_curLevel')]
  0021  CALL      R1 = call(R1, 1 args, 6 rets)
  0022  TEST      if not R1 then   -> -131048
  0023  JMP       (jump)   -> 64
  0024  SELF      R2 = R0[K13('GetLevelUpRewards')] (self)
  0025  CALL      R1 = call(R1, 1 args, 1 rets)
  0026  GETTABUP  R2 = _ENV[K14('RewardApi')]
  0027  GETTABLE  R2 = R2[K15('CryptRewards')]
  0028  MOVE      R3 = R0
  0029  LOADBOOL  R4 = true
  0030  CALL      R2 = call(R2, 0 args, 2 rets)
  0031  GETTABLE  R2 = R0[K12('m_curLevel')]
  0032  ADD       R2 = K16(1) add R2
  0033  SETTABLE  R0[K12('m_curLevel')] = R2
  0034  GETTABUP  R2 = _ENV[K4('GM')]
  0035  GETTABLE  R2 = R2[K17('UserModel')]
  0036  SELF      R3 = R2[K18('Set')] (self)
  0037  GETTABUP  R4 = _ENV[K19('EUserSyncDataKey')]
  0038  GETTABLE  R4 = R4[K20('UserLevel')]
  0039  GETTABLE  R5 = R0[K12('m_curLevel')]
  0040  CALL      R2 = call(R2, 0 args, 3 rets)
  0041  GETTABUP  R2 = _ENV[K21('CSFirebaseManager')]
  0042  SELF      R3 = R2[K22('LogLevelUpEvent')] (self)
  0043  GETTABLE  R4 = R0[K12('m_curLevel')]
  0044  CALL      R2 = call(R2, 0 args, 2 rets)
  0045  GETTABUP  R2 = _ENV[K4('GM')]
  0046  GETTABLE  R2 = R2[K23('OperBIManager')]
  0047  SELF      R3 = R2[K24('TrackLevelUpEvent')] (self)
  0048  GETTABLE  R4 = R0[K12('m_curLevel')]
  0049  CALL      R2 = call(R2, 0 args, 2 rets)
  0050  GETTABUP  R2 = _ENV[K4('GM')]
  0051  GETTABLE  R2 = R2[K25('BIManager')]
  0052  SELF      R3 = R2[K26('LogAction')] (self)
  0053  GETTABUP  R4 = _ENV[K10('EBIType')]
  0054  GETTABLE  R4 = R4[K11('LevelUp')]
  0055  GETTABLE  R5 = R0[K12('m_curLevel')]
  0056  CALL      R2 = call(R2, 0 args, 3 rets)
  0057  GETTABUP  R2 = _ENV[K27('EventDispatcher')]
  0058  GETTABLE  R2 = R2[K28('DispatchEvent')]
  0059  GETTABUP  R3 = _ENV[K29('EEventType')]
  0060  GETTABLE  R3 = R3[K11('LevelUp')]
  0061  GETTABLE  R4 = R0[K12('m_curLevel')]
  0062  CALL      R2 = call(R2, 0 args, 2 rets)
  0063  JMP       (jump)   -> 6
  0064  GETTABUP  R1 = _ENV[K4('GM')]
  0065  GETTABLE  R1 = R1[K30('GameModel')]
  0066  SELF      R2 = R1[K31('Login')] (self)
  0067  CALL      R1 = call(R1, 0 args, 1 rets)
  0068  GETTABUP  R1 = _ENV[K27('EventDispatcher')]
  0069  GETTABLE  R1 = R1[K28('DispatchEvent')]
  0070  GETTABUP  R2 = _ENV[K29('EEventType')]
  0071  GETTABLE  R2 = R2[K32('RefreshSettingStrongTip')]
  0072  CALL      R1 = call(R1, 0 args, 1 rets)
  0073  RETURN    return R0..R-1
