# SurpriseChest_Model_SurpriseChestData_769.luac
; fn @SurpriseChestData.lua  line 0-0 np=0 va=1 ms=2 code=27 consts=10 upvals=1 protos=7
;   K[0]='SurpriseChestData'
;   K[1]='__index'
;   K[2]='Create'
;   K[3]='SurpriseChestData'
;   K[4]='_Init'
;   K[5]='CheckOrderScoreRange'
;   K[6]='GetUICode'
;   K[7]='RandomSelectRewards'
;   K[8]='GetValidRewards'
;   K[9]='ToSerilization'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('SurpriseChestData')] = R0
0002  GETTABUP  R0 = _ENV[K0('SurpriseChestData')]
0003  GETTABUP  R1 = _ENV[K0('SurpriseChestData')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('SurpriseChestData')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Create')] = R1
0008  GETTABUP  R0 = _ENV[K3('SurpriseChestData')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K4('_Init')] = R1
0011  GETTABUP  R0 = _ENV[K3('SurpriseChestData')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K5('CheckOrderScoreRange')] = R1
0014  GETTABUP  R0 = _ENV[K3('SurpriseChestData')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K6('GetUICode')] = R1
0017  GETTABUP  R0 = _ENV[K3('SurpriseChestData')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K7('RandomSelectRewards')] = R1
0020  GETTABUP  R0 = _ENV[K3('SurpriseChestData')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K8('GetValidRewards')] = R1
0023  GETTABUP  R0 = _ENV[K3('SurpriseChestData')]
0024  CLOSURE   R1 = closure proto6
0025  SETTABLE  R0[K9('ToSerilization')] = R1
0026  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 11-16 np=1 va=0 ms=4 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='SurpriseChestData'
  ;   K[2]='_Init'
  ;   upvals: _ENV
  ;   locals: config(0-8), instance(4-8)
  0000  GETTABUP  R1 = _ENV[K0('setmetatable')]
  0001  MOVE      R2 = R0
  0002  GETTABUP  R3 = _ENV[K1('SurpriseChestData')]
  0003  CALL      R1 = call(R1, 1 args, 2 rets)
  0004  SELF      R3 = R1[K2('_Init')] (self)
  0005  CALL      R2 = call(R2, 0 args, 1 rets)
  0006  RETURN    return R1..R0
  0007  RETURN    return R0..R-1
; ---------- proto1 [_Init] ----------
  ; fn ?  line 18-22 np=1 va=0 ms=4 code=12 consts=5 upvals=1 protos=0
  ;   K[0]='Table'
  ;   K[1]='IsEmpty'
  ;   K[2]='rewardsWeight'
  ;   K[3]='RewardApi'
  ;   K[4]='CryptRewards'
  ;   upvals: _ENV
  ;   locals: self(0-12)
  0000  GETTABUP  R1 = _ENV[K0('Table')]
  0001  GETTABLE  R1 = R1[K1('IsEmpty')]
  0002  GETTABLE  R2 = R0[K2('rewardsWeight')]
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131065
  0005  JMP       (jump)   -> 11
  0006  GETTABUP  R1 = _ENV[K3('RewardApi')]
  0007  GETTABLE  R1 = R1[K4('CryptRewards')]
  0008  GETTABLE  R2 = R0[K2('rewardsWeight')]
  0009  LOADBOOL  R3 = true
  0010  CALL      R1 = call(R1, 0 args, 2 rets)
  0011  RETURN    return R0..R-1
; ---------- proto2 [CheckOrderScoreRange] ----------
  ; fn ?  line 24-28 np=2 va=0 ms=5 code=17 consts=5 upvals=1 protos=0
  ;   K[0]='score_min'
  ;   K[1]=0
  ;   K[2]='score_max'
  ;   K[3]='math'
  ;   K[4]='maxinteger'
  ;   upvals: _ENV
  ;   locals: self(0-17), score(0-17), score_min(4-17), score_max(9-17)
  0000  GETTABLE  R2 = R0[K0('score_min')]
  0001  TEST      if not R2 then   -> -131068
  0002  JMP       (jump)   -> 4
  0003  LOADK     R2 = K1 0
  0004  GETTABLE  R3 = R0[K2('score_max')]
  0005  TEST      if not R3 then   -> -131064
  0006  JMP       (jump)   -> 9
  0007  GETTABUP  R3 = _ENV[K3('math')]
  0008  GETTABLE  R3 = R3[K4('maxinteger')]
  0009  LT        if R0 lt R1   -> -130036
  0010  JMP       (jump)   -> 13
  0011  LE        if R1 le R3   -> -130544
  0012  JMP       (jump)   -> 14
  0013  LOADBOOL  R4 = false
  0014  LOADBOOL  R4 = true
  0015  RETURN    return R4..R3
  0016  RETURN    return R0..R-1
; ---------- proto3 [GetUICode] ----------
  ; fn ?  line 30-32 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='uiCode'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('uiCode')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto4 [RandomSelectRewards] ----------
  ; fn ?  line 34-47 np=1 va=0 ms=7 code=29 consts=11 upvals=1 protos=0
  ;   K[0]='GetValidRewards'
  ;   K[1]='Table'
  ;   K[2]='IsEmpty'
  ;   K[3]='RewardApi'
  ;   K[4]='FilterRewards'
  ;   K[5]='ERewardScene'
  ;   K[6]='Other'
  ;   K[7]='Weight'
  ;   K[8]='ListWeightSelectOne'
  ;   K[9]='table'
  ;   K[10]='insert'
  ;   upvals: _ENV
  ;   locals: self(0-29), rewardsWeightPairs(2-29), arrRewards(18-29), target(22-29)
  0000  SELF      R2 = R0[K0('GetValidRewards')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  GETTABUP  R2 = _ENV[K1('Table')]
  0003  GETTABLE  R2 = R2[K2('IsEmpty')]
  0004  MOVE      R3 = R0
  0005  CALL      R2 = call(R2, 1 args, 1 rets)
  0006  TEST      if not R2 then   -> -131064
  0007  JMP       (jump)   -> 9
  0008  RETURN    return R0..R-1
  0009  GETTABUP  R2 = _ENV[K3('RewardApi')]
  0010  GETTABLE  R2 = R2[K4('FilterRewards')]
  0011  MOVE      R3 = R0
  0012  GETTABUP  R4 = _ENV[K5('ERewardScene')]
  0013  GETTABLE  R4 = R4[K6('Other')]
  0014  LOADK     R5 = K7 'Weight'
  0015  CALL      R2 = call(R2, 1 args, 3 rets)
  0016  MOVE      R1 = R0
  0017  NEWTABLE  R2 = {} (0 items)
  0018  GETTABUP  R3 = _ENV[K1('Table')]
  0019  GETTABLE  R3 = R3[K8('ListWeightSelectOne')]
  0020  MOVE      R4 = R0
  0021  CALL      R3 = call(R3, 1 args, 1 rets)
  0022  GETTABUP  R4 = _ENV[K9('table')]
  0023  GETTABLE  R4 = R4[K10('insert')]
  0024  MOVE      R5 = R0
  0025  MOVE      R6 = R0
  0026  CALL      R4 = call(R4, 0 args, 2 rets)
  0027  RETURN    return R2..R1
  0028  RETURN    return R0..R-1
; ---------- proto5 [GetValidRewards] ----------
  ; fn ?  line 49-51 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='rewardsWeight'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('rewardsWeight')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto6 [ToSerilization] ----------
  ; fn ?  line 53-63 np=2 va=0 ms=6 code=15 consts=4 upvals=1 protos=0
  ;   K[0]='rewardsWeight'
  ;   K[1]='ActivityTokenHelper'
  ;   K[2]='GetRatioRewards'
  ;   K[3]='uiCode'
  ;   upvals: _ENV
  ;   locals: self(0-15), orderScore(0-15), realRewards(1-15)
  0000  GETTABLE  R2 = R0[K0('rewardsWeight')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 9
  0003  GETTABUP  R3 = _ENV[K1('ActivityTokenHelper')]
  0004  GETTABLE  R3 = R3[K2('GetRatioRewards')]
  0005  MOVE      R4 = R0
  0006  MOVE      R5 = R0
  0007  CALL      R3 = call(R3, 1 args, 2 rets)
  0008  MOVE      R2 = R0
  0009  NEWTABLE  R3 = {} (0 items)
  0010  SETTABLE  R3[K0('rewardsWeight')] = R2
  0011  GETTABLE  R4 = R0[K3('uiCode')]
  0012  SETTABLE  R3[K3('uiCode')] = R4
  0013  RETURN    return R3..R2
  0014  RETURN    return R0..R-1
