# DoubleWheelActivity_Model_DoubleWheelActivityConfig_1990.luac
; fn @DoubleWheelActivityConfig.lua  line 0-0 np=0 va=1 ms=2 code=39 consts=14 upvals=1 protos=11
;   K[0]='DoubleWheelActivityConfig'
;   K[1]='__index'
;   K[2]='Create'
;   K[3]='DoubleWheelActivityConfig'
;   K[4]='_Init'
;   K[5]='GetWheelIndex'
;   K[6]='GetTokenNeeded'
;   K[7]='GetBestRewardIndex'
;   K[8]='GetPopCount'
;   K[9]='GetIAPType'
;   K[10]='GetInitToken'
;   K[11]='GetRewardCount'
;   K[12]='GetRewardConfig'
;   K[13]='GetContentConfig'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('DoubleWheelActivityConfig')] = R0
0002  GETTABUP  R0 = _ENV[K0('DoubleWheelActivityConfig')]
0003  GETTABUP  R1 = _ENV[K0('DoubleWheelActivityConfig')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('DoubleWheelActivityConfig')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Create')] = R1
0008  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K4('_Init')] = R1
0011  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K5('GetWheelIndex')] = R1
0014  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K6('GetTokenNeeded')] = R1
0017  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K7('GetBestRewardIndex')] = R1
0020  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K8('GetPopCount')] = R1
0023  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0024  CLOSURE   R1 = closure proto6
0025  SETTABLE  R0[K9('GetIAPType')] = R1
0026  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0027  CLOSURE   R1 = closure proto7
0028  SETTABLE  R0[K10('GetInitToken')] = R1
0029  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0030  CLOSURE   R1 = closure proto8
0031  SETTABLE  R0[K11('GetRewardCount')] = R1
0032  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0033  CLOSURE   R1 = closure proto9
0034  SETTABLE  R0[K12('GetRewardConfig')] = R1
0035  GETTABUP  R0 = _ENV[K3('DoubleWheelActivityConfig')]
0036  CLOSURE   R1 = closure proto10
0037  SETTABLE  R0[K13('GetContentConfig')] = R1
0038  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 13-18 np=1 va=0 ms=4 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='DoubleWheelActivityConfig'
  ;   K[2]='_Init'
  ;   upvals: _ENV
  ;   locals: rawConfig(0-8), instance(4-8)
  0000  GETTABUP  R1 = _ENV[K0('setmetatable')]
  0001  MOVE      R2 = R0
  0002  GETTABUP  R3 = _ENV[K1('DoubleWheelActivityConfig')]
  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 20-55 np=1 va=0 ms=15 code=66 consts=16 upvals=1 protos=1
  ;   K[0]='popCount'
  ;   K[1]=nil
  ;   K[2]='table'
  ;   K[3]='sort'
  ;   K[4]='DoubleWheelActivityModel'
  ;   K[5]='RewardConfigKey'
  ;   K[6]='Table'
  ;   K[7]='IsEmpty'
  ;   K[8]='ipairs'
  ;   K[9]='DoubleWheelActivityRewardConfig'
  ;   K[10]='Create'
  ;   K[11]='insert'
  ;   K[12]='arrRewardConfig'
  ;   K[13]='ContentConfigKey'
  ;   K[14]='DoubleWheelActivityContentConfig'
  ;   K[15]='arrContentConfig'
  ;   upvals: _ENV
  ;   locals: self(0-66), sortByRewardIndex(8-66), arrRewardConfig(9-66), arrRewardRawConfig(12-66), (for generator)(21-33), (for state)(21-33), (for control)(21-33), _(22-31), rewardRawConfig(22-31), rewardConfig(26-31), arrContentConfig(40-66), arrContentRawConfig(43-66), (for generator)(52-64), (for state)(52-64), (for control)(52-64), _(53-62), contentRawConfig(53-62), contentConfig(57-62)
  0000  GETTABLE  R1 = R0[K0('popCount')]
  0001  EQ        if R1 eq K1(nil)   -> -130300
  0002  JMP       (jump)   -> 7
  0003  GETTABUP  R1 = _ENV[K2('table')]
  0004  GETTABLE  R1 = R1[K3('sort')]
  0005  GETTABLE  R2 = R0[K0('popCount')]
  0006  CALL      R1 = call(R1, 0 args, 1 rets)
  0007  CLOSURE   R1 = closure proto0
  0008  NEWTABLE  R2 = {} (0 items)
  0009  GETTABUP  R3 = _ENV[K4('DoubleWheelActivityModel')]
  0010  GETTABLE  R3 = R3[K5('RewardConfigKey')]
  0011  GETTABLE  R3 = R0[R3]
  0012  GETTABUP  R4 = _ENV[K6('Table')]
  0013  GETTABLE  R4 = R4[K7('IsEmpty')]
  0014  MOVE      R5 = R0
  0015  CALL      R4 = call(R4, 1 args, 1 rets)
  0016  TEST      if not R4 then   -> -131053
  0017  JMP       (jump)   -> 38
  0018  GETTABUP  R4 = _ENV[K8('ipairs')]
  0019  MOVE      R5 = R0
  0020  CALL      R4 = call(R4, 3 args, 1 rets)
  0021  JMP       (jump)   -> 31
  0022  GETTABUP  R9 = _ENV[K9('DoubleWheelActivityRewardConfig')]
  0023  GETTABLE  R9 = R9[K10('Create')]
  0024  MOVE      R10 = R0
  0025  CALL      R9 = call(R9, 1 args, 1 rets)
  0026  GETTABUP  R10 = _ENV[K2('table')]
  0027  GETTABLE  R10 = R10[K11('insert')]
  0028  MOVE      R11 = R0
  0029  MOVE      R12 = R0
  0030  CALL      R10 = call(R10, 0 args, 2 rets)
  0031  TFORCALL  tforcall R4
  0032  TFORLOOP  tforloop R6(sBx=-11)   -> 22
  0033  GETTABUP  R4 = _ENV[K2('table')]
  0034  GETTABLE  R4 = R4[K3('sort')]
  0035  MOVE      R5 = R0
  0036  MOVE      R6 = R0
  0037  CALL      R4 = call(R4, 0 args, 2 rets)
  0038  SETTABLE  R0[K12('arrRewardConfig')] = R2
  0039  NEWTABLE  R4 = {} (0 items)
  0040  GETTABUP  R5 = _ENV[K4('DoubleWheelActivityModel')]
  0041  GETTABLE  R5 = R5[K13('ContentConfigKey')]
  0042  GETTABLE  R5 = R0[R5]
  0043  GETTABUP  R6 = _ENV[K6('Table')]
  0044  GETTABLE  R6 = R6[K7('IsEmpty')]
  0045  MOVE      R7 = R0
  0046  CALL      R6 = call(R6, 1 args, 1 rets)
  0047  TEST      if not R6 then   -> -131022
  0048  JMP       (jump)   -> 64
  0049  GETTABUP  R6 = _ENV[K8('ipairs')]
  0050  MOVE      R7 = R0
  0051  CALL      R6 = call(R6, 3 args, 1 rets)
  0052  JMP       (jump)   -> 62
  0053  GETTABUP  R11 = _ENV[K14('DoubleWheelActivityContentConfig')]
  0054  GETTABLE  R11 = R11[K10('Create')]
  0055  MOVE      R12 = R0
  0056  CALL      R11 = call(R11, 1 args, 1 rets)
  0057  GETTABUP  R12 = _ENV[K2('table')]
  0058  GETTABLE  R12 = R12[K11('insert')]
  0059  MOVE      R13 = R0
  0060  MOVE      R14 = R0
  0061  CALL      R12 = call(R12, 0 args, 2 rets)
  0062  TFORCALL  tforcall R6
  0063  TFORLOOP  tforloop R8(sBx=-11)   -> 53
  0064  SETTABLE  R0[K15('arrContentConfig')] = R4
  0065  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 28-30 np=2 va=0 ms=5 code=10 consts=1 upvals=0 protos=0
    ;   K[0]='GetIndex'
    ;   locals: configA(0-10), configB(0-10)
    0000  SELF      R3 = R0[K0('GetIndex')] (self)
    0001  CALL      R2 = call(R2, 1 args, 1 rets)
    0002  SELF      R4 = R1[K0('GetIndex')] (self)
    0003  CALL      R3 = call(R3, 1 args, 1 rets)
    0004  LT        if R1 lt R3   -> -130039
    0005  JMP       (jump)   -> 7
    0006  LOADBOOL  R2 = false
    0007  LOADBOOL  R2 = true
    0008  RETURN    return R2..R1
    0009  RETURN    return R0..R-1
; ---------- proto2 [GetWheelIndex] ----------
  ; fn ?  line 57-59 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='wheelIndex'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('wheelIndex')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto3 [GetTokenNeeded] ----------
  ; fn ?  line 61-63 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='tokenNeed'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('tokenNeed')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto4 [GetBestRewardIndex] ----------
  ; fn ?  line 65-67 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='bestIndex'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('bestIndex')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto5 [GetPopCount] ----------
  ; fn ?  line 69-71 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='popCount'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('popCount')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto6 [GetIAPType] ----------
  ; fn ?  line 73-75 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='payID'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('payID')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto7 [GetInitToken] ----------
  ; fn ?  line 77-79 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='initToken'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('initToken')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto8 [GetRewardCount] ----------
  ; fn ?  line 81-83 np=1 va=0 ms=2 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='arrRewardConfig'
  ;   locals: self(0-4)
  0000  GETTABLE  R1 = R0[K0('arrRewardConfig')]
  0001  LEN       R1 = len R0
  0002  RETURN    return R1..R0
  0003  RETURN    return R0..R-1
; ---------- proto9 [GetRewardConfig] ----------
  ; fn ?  line 86-88 np=2 va=0 ms=3 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='arrRewardConfig'
  ;   locals: self(0-4), rewardIndex(0-4)
  0000  GETTABLE  R2 = R0[K0('arrRewardConfig')]
  0001  GETTABLE  R2 = R2[R1]
  0002  RETURN    return R2..R1
  0003  RETURN    return R0..R-1
; ---------- proto10 [GetContentConfig] ----------
  ; fn ?  line 91-98 np=2 va=0 ms=9 code=18 consts=4 upvals=1 protos=0
  ;   K[0]='ipairs'
  ;   K[1]='arrContentConfig'
  ;   K[2]='GetRoundMin'
  ;   K[3]='GetRoundMax'
  ;   upvals: _ENV
  ;   locals: self(0-18), roundIndex(0-18), (for generator)(3-15), (for state)(3-15), (for control)(3-15), _(4-13), contentConfig(4-13)
  0000  GETTABUP  R2 = _ENV[K0('ipairs')]
  0001  GETTABLE  R3 = R0[K1('arrContentConfig')]
  0002  CALL      R2 = call(R2, 3 args, 1 rets)
  0003  JMP       (jump)   -> 13
  0004  SELF      R8 = R6[K2('GetRoundMin')] (self)
  0005  CALL      R7 = call(R7, 1 args, 1 rets)
  0006  LE        if R0 le R1   -> -127479
  0007  JMP       (jump)   -> 13
  0008  SELF      R8 = R6[K3('GetRoundMax')] (self)
  0009  CALL      R7 = call(R7, 1 args, 1 rets)
  0010  LE        if R0 le R7   -> -130541
  0011  JMP       (jump)   -> 13
  0012  RETURN    return R6..R5
  0013  TFORCALL  tforcall R2
  0014  TFORLOOP  tforloop R4(sBx=-11)   -> 4
  0015  LOADNIL   R2..R2 = nil
  0016  RETURN    return R2..R1
  0017  RETURN    return R0..R-1
