# DiscoSpin_View_DiscoSpinActivityInfoWindow_1481.luac
; fn @DiscoSpinActivityInfoWindow.lua  line 0-0 np=0 va=1 ms=3 code=21 consts=8 upvals=1 protos=4
;   K[0]='DiscoSpinActivityInfoWindow'
;   K[1]='setmetatable'
;   K[2]='DiscoSpinActivityBaseWindow'
;   K[3]='__index'
;   K[4]='Init'
;   K[5]='_InitView'
;   K[6]='_InitCells'
;   K[7]='OnTestButtonClicked'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('DiscoSpinActivityBaseWindow')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('DiscoSpinActivityInfoWindow')] = R0
0005  GETTABUP  R0 = _ENV[K0('DiscoSpinActivityInfoWindow')]
0006  GETTABUP  R1 = _ENV[K0('DiscoSpinActivityInfoWindow')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('DiscoSpinActivityInfoWindow')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Init')] = R1
0011  GETTABUP  R0 = _ENV[K0('DiscoSpinActivityInfoWindow')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('_InitView')] = R1
0014  GETTABUP  R0 = _ENV[K0('DiscoSpinActivityInfoWindow')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('_InitCells')] = R1
0017  GETTABUP  R0 = _ENV[K0('DiscoSpinActivityInfoWindow')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K7('OnTestButtonClicked')] = R1
0020  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 14-21 np=4 va=0 ms=9 code=23 consts=10 upvals=1 protos=0
  ;   K[0]='DiscoSpinActivityBaseWindow'
  ;   K[1]='Init'
  ;   K[2]='LogWindowAction'
  ;   K[3]='EBIType'
  ;   K[4]='UIActionType'
  ;   K[5]='Open'
  ;   K[6]='EBIReferType'
  ;   K[7]='AutoPopup'
  ;   K[8]='UserClick'
  ;   K[9]='_InitView'
  ;   upvals: _ENV
  ;   locals: self(0-23), activityType(0-23), id(0-23), bAuto(0-23)
  0000  GETTABUP  R4 = _ENV[K0('DiscoSpinActivityBaseWindow')]
  0001  GETTABLE  R4 = R4[K1('Init')]
  0002  MOVE      R5 = R0
  0003  MOVE      R6 = R0
  0004  CALL      R4 = call(R4, 0 args, 2 rets)
  0005  SELF      R5 = R0[K2('LogWindowAction')] (self)
  0006  GETTABUP  R6 = _ENV[K3('EBIType')]
  0007  GETTABLE  R6 = R6[K4('UIActionType')]
  0008  GETTABLE  R6 = R6[K5('Open')]
  0009  NEWTABLE  R7 = {} (1 items)
  0010  TEST      if not R3 then   -> -131060
  0011  JMP       (jump)   -> 16
  0012  GETTABUP  R8 = _ENV[K6('EBIReferType')]
  0013  GETTABLE  R8 = R8[K7('AutoPopup')]
  0014  TEST      if not R8 then   -> -131055
  0015  JMP       (jump)   -> 18
  0016  GETTABUP  R8 = _ENV[K6('EBIReferType')]
  0017  GETTABLE  R8 = R8[K8('UserClick')]
  0018  SETLIST   setlist R7[B=1,C=1]
  0019  CALL      R4 = call(R4, 0 args, 3 rets)
  0020  SELF      R5 = R0[K9('_InitView')] (self)
  0021  CALL      R4 = call(R4, 0 args, 1 rets)
  0022  RETURN    return R0..R-1
; ---------- proto1 [_InitView] ----------
  ; fn ?  line 23-25 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='_InitCells'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('_InitCells')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto2 [_InitCells] ----------
  ; fn ?  line 27-71 np=1 va=0 ms=15 code=79 consts=29 upvals=1 protos=1
  ;   K[0]='GetModel'
  ;   K[1]='GetActivityDefinition'
  ;   K[2]='FixedRewardCount'
  ;   K[3]=1
  ;   K[4]='table'
  ;   K[5]='insert'
  ;   K[6]='sort'
  ;   K[7]='ipairs'
  ;   K[8]='Object'
  ;   K[9]='Instantiate'
  ;   K[10]='m_cellPrefab'
  ;   K[11]='m_contentRectTransform'
  ;   K[12]='GetLuaTable'
  ;   K[13]='Init'
  ;   K[14]='arrIndex'
  ;   K[15]='GameConfig'
  ;   K[16]='IsTestMode'
  ;   K[17]=0
  ;   K[18]='GetProbability'
  ;   K[19]='GetCurrentWeightInfo'
  ;   K[20]='m_testTextProbability'
  ;   K[21]='text'
  ;   K[22]='概率总和：'
  ;   K[23]='string'
  ;   K[24]='format'
  ;   K[25]='%.2f%%'
  ;   K[26]='m_testTextTotalWeight'
  ;   K[27]='weight总和：'
  ;   K[28]='tostring'
  ;   upvals: _ENV
  ;   locals: self(0-79), model(2-79), rewardCount(5-79), arrIndex(6-79), (for index)(9-16), (for limit)(9-16), (for step)(9-16), index(10-15), CompIndex(17-79), cell(23-79), (for generator)(26-41), (for state)(26-41), (for control)(26-41), _(27-39), index(27-39), totalProbability(48-78), (for index)(51-60), (for limit)(51-60), (for step)(51-60), index(52-59), _(62-78), totalWeight(62-78)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R3 = R0[K1('GetActivityDefinition')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  GETTABLE  R2 = R2[K2('FixedRewardCount')]
  0005  NEWTABLE  R3 = {} (0 items)
  0006  LOADK     R4 = K3 1
  0007  MOVE      R5 = R0
  0008  LOADK     R6 = K3 1
  0009  FORPREP   forprep R4(sBx=5)   -> 15
  0010  GETTABUP  R8 = _ENV[K4('table')]
  0011  GETTABLE  R8 = R8[K5('insert')]
  0012  MOVE      R9 = R0
  0013  MOVE      R10 = R0
  0014  CALL      R8 = call(R8, 0 args, 2 rets)
  0015  FORLOOP   forloop R4(sBx=-6)   -> 10
  0016  CLOSURE   R4 = closure proto0
  0017  GETTABUP  R5 = _ENV[K4('table')]
  0018  GETTABLE  R5 = R5[K6('sort')]
  0019  MOVE      R6 = R0
  0020  MOVE      R7 = R0
  0021  CALL      R5 = call(R5, 0 args, 2 rets)
  0022  LOADNIL   R5..R5 = nil
  0023  GETTABUP  R6 = _ENV[K7('ipairs')]
  0024  MOVE      R7 = R0
  0025  CALL      R6 = call(R6, 3 args, 1 rets)
  0026  JMP       (jump)   -> 39
  0027  GETTABUP  R11 = _ENV[K8('Object')]
  0028  GETTABLE  R11 = R11[K9('Instantiate')]
  0029  GETTABLE  R12 = R0[K10('m_cellPrefab')]
  0030  GETTABLE  R13 = R0[K11('m_contentRectTransform')]
  0031  CALL      R11 = call(R11, 1 args, 2 rets)
  0032  SELF      R12 = R11[K12('GetLuaTable')] (self)
  0033  CALL      R11 = call(R11, 1 args, 1 rets)
  0034  MOVE      R5 = R0
  0035  SELF      R12 = R5[K13('Init')] (self)
  0036  MOVE      R13 = R0
  0037  MOVE      R14 = R0
  0038  CALL      R11 = call(R11, 0 args, 3 rets)
  0039  TFORCALL  tforcall R6
  0040  TFORLOOP  tforloop R8(sBx=-14)   -> 27
  0041  SETTABLE  R0[K14('arrIndex')] = R3
  0042  GETTABUP  R6 = _ENV[K15('GameConfig')]
  0043  GETTABLE  R6 = R6[K16('IsTestMode')]
  0044  CALL      R6 = call(R6, 1 args, 0 rets)
  0045  TEST      if not R6 then   -> -131025
  0046  JMP       (jump)   -> 78
  0047  LOADK     R6 = K17 0
  0048  LOADK     R7 = K3 1
  0049  MOVE      R8 = R0
  0050  LOADK     R9 = K3 1
  0051  FORPREP   forprep R7(sBx=7)   -> 59
  0052  SELF      R12 = R1[K18('GetProbability')] (self)
  0053  MOVE      R13 = R0
  0054  CALL      R11 = call(R11, 1 args, 2 rets)
  0055  TEST      if not R11 then   -> -131014
  0056  JMP       (jump)   -> 58
  0057  LOADK     R11 = K17 0
  0058  ADD       R6 = R11 add R6
  0059  FORLOOP   forloop R7(sBx=-8)   -> 52
  0060  SELF      R8 = R1[K19('GetCurrentWeightInfo')] (self)
  0061  CALL      R7 = call(R7, 2 args, 1 rets)
  0062  GETTABLE  R9 = R0[K20('m_testTextProbability')]
  0063  LOADK     R10 = K22 '概率总和：'
  0064  GETTABUP  R11 = _ENV[K23('string')]
  0065  GETTABLE  R11 = R11[K24('format')]
  0066  LOADK     R12 = K25 '%.2f%%'
  0067  MOVE      R13 = R0
  0068  CALL      R11 = call(R11, 1 args, 2 rets)
  0069  CONCAT    R10 = concat(R10..R10)
  0070  SETTABLE  R9[K21('text')] = R10
  0071  GETTABLE  R9 = R0[K26('m_testTextTotalWeight')]
  0072  LOADK     R10 = K27 'weight总和：'
  0073  GETTABUP  R11 = _ENV[K28('tostring')]
  0074  MOVE      R12 = R0
  0075  CALL      R11 = call(R11, 1 args, 1 rets)
  0076  CONCAT    R10 = concat(R10..R10)
  0077  SETTABLE  R9[K21('text')] = R10
  0078  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 36-50 np=2 va=0 ms=8 code=34 consts=2 upvals=1 protos=0
    ;   K[0]='IsRewardTaken'
    ;   K[1]='GetProbability'
    ;   upvals: model
    ;   locals: indexA(0-34), indexB(0-34), bRewardTakenA(8-34), bRewardTakenB(8-34), probabilityA(19-34), probabilityB(19-34)
    0000  GETUPVAL  R2 = model
    0001  SELF      R3 = R2[K0('IsRewardTaken')] (self)
    0002  MOVE      R4 = R0
    0003  CALL      R2 = call(R2, 1 args, 2 rets)
    0004  GETUPVAL  R3 = model
    0005  SELF      R4 = R3[K0('IsRewardTaken')] (self)
    0006  MOVE      R5 = R0
    0007  CALL      R3 = call(R3, 1 args, 2 rets)
    0008  EQ        if R1 eq R3   -> -130035
    0009  JMP       (jump)   -> 11
    0010  RETURN    return R3..R2
    0011  GETUPVAL  R4 = model
    0012  SELF      R5 = R4[K1('GetProbability')] (self)
    0013  MOVE      R6 = R0
    0014  CALL      R4 = call(R4, 1 args, 2 rets)
    0015  GETUPVAL  R5 = model
    0016  SELF      R6 = R5[K1('GetProbability')] (self)
    0017  MOVE      R7 = R0
    0018  CALL      R5 = call(R5, 1 args, 2 rets)
    0019  TEST      if not R2 then   -> -131050
    0020  JMP       (jump)   -> 28
    0021  EQ        if R1 eq R5   -> -128996
    0022  JMP       (jump)   -> 28
    0023  LT        if R1 lt R4   -> -128483
    0024  JMP       (jump)   -> 26
    0025  LOADBOOL  R6 = false
    0026  LOADBOOL  R6 = true
    0027  RETURN    return R6..R5
    0028  LT        if R1 lt R1   -> -131041
    0029  JMP       (jump)   -> 31
    0030  LOADBOOL  R6 = false
    0031  LOADBOOL  R6 = true
    0032  RETURN    return R6..R5
    0033  RETURN    return R0..R-1
; ---------- proto3 [OnTestButtonClicked] ----------
  ; fn ?  line 74-88 np=1 va=0 ms=13 code=45 consts=20 upvals=1 protos=0
  ;   K[0]='GameConfig'
  ;   K[1]='IsTestMode'
  ;   K[2]='ipairs'
  ;   K[3]='arrIndex'
  ;   K[4]='GetModel'
  ;   K[5]='GetProbability'
  ;   K[6]=nil
  ;   K[7]='table'
  ;   K[8]='insert'
  ;   K[9]='string'
  ;   K[10]='format'
  ;   K[11]='%.2f'
  ;   K[12]='PlatformInterface'
  ;   K[13]='SetString2Clipboard'
  ;   K[14]='concat'
  ;   K[15]='+'
  ;   K[16]='GM'
  ;   K[17]='UIManager'
  ;   K[18]='ShowTestPrompt'
  ;   K[19]='复制概率总和算式成功！'
  ;   upvals: _ENV
  ;   locals: self(0-45), arrProbabilityText(7-45), probability(8-45), (for generator)(11-31), (for state)(11-31), (for control)(11-31), _(12-29), index(12-29)
  0000  GETTABUP  R1 = _ENV[K0('GameConfig')]
  0001  GETTABLE  R1 = R1[K1('IsTestMode')]
  0002  CALL      R1 = call(R1, 1 args, 0 rets)
  0003  TEST      if not R1 then   -> -131066
  0004  JMP       (jump)   -> 6
  0005  RETURN    return R0..R-1
  0006  NEWTABLE  R1 = {} (0 items)
  0007  LOADNIL   R2..R2 = nil
  0008  GETTABUP  R3 = _ENV[K2('ipairs')]
  0009  GETTABLE  R4 = R0[K3('arrIndex')]
  0010  CALL      R3 = call(R3, 3 args, 1 rets)
  0011  JMP       (jump)   -> 29
  0012  SELF      R9 = R0[K4('GetModel')] (self)
  0013  CALL      R8 = call(R8, 1 args, 1 rets)
  0014  SELF      R9 = R8[K5('GetProbability')] (self)
  0015  MOVE      R10 = R0
  0016  CALL      R8 = call(R8, 1 args, 2 rets)
  0017  MOVE      R2 = R0
  0018  EQ        if R1 eq K6(nil)   -> -129766
  0019  JMP       (jump)   -> 29
  0020  GETTABUP  R8 = _ENV[K7('table')]
  0021  GETTABLE  R8 = R8[K8('insert')]
  0022  MOVE      R9 = R0
  0023  GETTABUP  R10 = _ENV[K9('string')]
  0024  GETTABLE  R10 = R10[K10('format')]
  0025  LOADK     R11 = K11 '%.2f'
  0026  MOVE      R12 = R0
  0027  CALL      R10 = call(R10, -1 args, 2 rets)
  0028  CALL      R8 = call(R8, 0 args, -1 rets)
  0029  TFORCALL  tforcall R3
  0030  TFORLOOP  tforloop R5(sBx=-19)   -> 12
  0031  GETTABUP  R3 = _ENV[K12('PlatformInterface')]
  0032  GETTABLE  R3 = R3[K13('SetString2Clipboard')]
  0033  GETTABUP  R4 = _ENV[K7('table')]
  0034  GETTABLE  R4 = R4[K14('concat')]
  0035  MOVE      R5 = R0
  0036  LOADK     R6 = K15 '+'
  0037  CALL      R4 = call(R4, -1 args, 2 rets)
  0038  CALL      R3 = call(R3, 0 args, -1 rets)
  0039  GETTABUP  R3 = _ENV[K16('GM')]
  0040  GETTABLE  R3 = R3[K17('UIManager')]
  0041  SELF      R4 = R3[K18('ShowTestPrompt')] (self)
  0042  LOADK     R5 = K19 '复制概率总和算式成功！'
  0043  CALL      R3 = call(R3, 0 args, 2 rets)
  0044  RETURN    return R0..R-1
