# RecipeCollectActivity_View_RecipeCollectActivityStageCell_1901.luac
; fn @RecipeCollectActivityStageCell.lua  line 0-0 np=0 va=1 ms=2 code=39 consts=13 upvals=1 protos=11
;   K[0]='RecipeCollectActivityStageCell'
;   K[1]='__index'
;   K[2]='Init'
;   K[3]='_InitModelData'
;   K[4]='_InitView'
;   K[5]='GetWindow'
;   K[6]='GetModel'
;   K[7]='GetStage'
;   K[8]='_OnUpdateRewards'
;   K[9]='GetTrayCell'
;   K[10]='GetProgress'
;   K[11]='GetTrayCount'
;   K[12]='UpdateTitleText'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('RecipeCollectActivityStageCell')] = R0
0002  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0003  GETTABUP  R1 = _ENV[K0('RecipeCollectActivityStageCell')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Init')] = R1
0008  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('_InitModelData')] = R1
0011  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('_InitView')] = R1
0014  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('GetWindow')] = R1
0017  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K6('GetModel')] = R1
0020  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K7('GetStage')] = R1
0023  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0024  CLOSURE   R1 = closure proto6
0025  SETTABLE  R0[K8('_OnUpdateRewards')] = R1
0026  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0027  CLOSURE   R1 = closure proto7
0028  SETTABLE  R0[K9('GetTrayCell')] = R1
0029  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0030  CLOSURE   R1 = closure proto8
0031  SETTABLE  R0[K10('GetProgress')] = R1
0032  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0033  CLOSURE   R1 = closure proto9
0034  SETTABLE  R0[K11('GetTrayCount')] = R1
0035  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageCell')]
0036  CLOSURE   R1 = closure proto10
0037  SETTABLE  R0[K12('UpdateTitleText')] = R1
0038  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 19-26 np=4 va=0 ms=6 code=8 consts=5 upvals=0 protos=0
  ;   K[0]='m_window'
  ;   K[1]='m_stage'
  ;   K[2]='m_bRecipeUnlock'
  ;   K[3]='_InitModelData'
  ;   K[4]='_InitView'
  ;   locals: self(0-8), window(0-8), stage(0-8), bRecipeUnlock(0-8)
  0000  SETTABLE  R0[K0('m_window')] = R1
  0001  SETTABLE  R0[K1('m_stage')] = R2
  0002  SETTABLE  R0[K2('m_bRecipeUnlock')] = R3
  0003  SELF      R5 = R0[K3('_InitModelData')] (self)
  0004  CALL      R4 = call(R4, 0 args, 1 rets)
  0005  SELF      R5 = R0[K4('_InitView')] (self)
  0006  CALL      R4 = call(R4, 0 args, 1 rets)
  0007  RETURN    return R0..R-1
; ---------- proto1 [_InitModelData] ----------
  ; fn ?  line 28-39 np=1 va=0 ms=10 code=39 consts=14 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='m_stageConfig'
  ;   K[2]='GetStageConfig'
  ;   K[3]='m_stage'
  ;   K[4]='m_trayCount'
  ;   K[5]='GetTrayCount'
  ;   K[6]='m_progress'
  ;   K[7]=0
  ;   K[8]=1
  ;   K[9]='IsTrayOccupied'
  ;   K[10]='m_bRecipeUnlock'
  ;   K[11]='IsNewRecipeUnlock'
  ;   K[12]='m_bRewardClaimed'
  ;   K[13]='IsStageRewardClaimed'
  ;   locals: self(0-39), model(2-39), (for index)(14-34), (for limit)(14-34), (for step)(14-34), tray(15-33)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R3 = R1[K2('GetStageConfig')] (self)
  0003  GETTABLE  R4 = R0[K3('m_stage')]
  0004  CALL      R2 = call(R2, 1 args, 2 rets)
  0005  SETTABLE  R0[K1('m_stageConfig')] = R2
  0006  GETTABLE  R2 = R0[K1('m_stageConfig')]
  0007  SELF      R3 = R2[K5('GetTrayCount')] (self)
  0008  CALL      R2 = call(R2, 1 args, 1 rets)
  0009  SETTABLE  R0[K4('m_trayCount')] = R2
  0010  SETTABLE  R0[K6('m_progress')] = K7(0)
  0011  LOADK     R2 = K8 1
  0012  GETTABLE  R3 = R0[K4('m_trayCount')]
  0013  LOADK     R4 = K8 1
  0014  FORPREP   forprep R2(sBx=18)   -> 33
  0015  SELF      R7 = R1[K9('IsTrayOccupied')] (self)
  0016  GETTABLE  R8 = R0[K3('m_stage')]
  0017  MOVE      R9 = R0
  0018  CALL      R6 = call(R6, 1 args, 3 rets)
  0019  TEST      if not R6 then   -> -131051
  0020  JMP       (jump)   -> 33
  0021  GETTABLE  R6 = R0[K10('m_bRecipeUnlock')]
  0022  TEST      if not R6 then   -> -131048
  0023  JMP       (jump)   -> 30
  0024  SELF      R7 = R1[K11('IsNewRecipeUnlock')] (self)
  0025  GETTABLE  R8 = R0[K3('m_stage')]
  0026  MOVE      R9 = R0
  0027  CALL      R6 = call(R6, 1 args, 3 rets)
  0028  TEST      if not R6 then   -> -131041
  0029  JMP       (jump)   -> 33
  0030  GETTABLE  R6 = R0[K6('m_progress')]
  0031  ADD       R6 = K8(1) add R6
  0032  SETTABLE  R0[K6('m_progress')] = R6
  0033  FORLOOP   forloop R2(sBx=-19)   -> 15
  0034  SELF      R3 = R1[K13('IsStageRewardClaimed')] (self)
  0035  GETTABLE  R4 = R0[K3('m_stage')]
  0036  CALL      R2 = call(R2, 1 args, 2 rets)
  0037  SETTABLE  R0[K12('m_bRewardClaimed')] = R2
  0038  RETURN    return R0..R-1
; ---------- proto2 [_InitView] ----------
  ; fn ?  line 41-56 np=1 va=0 ms=11 code=57 consts=33 upvals=1 protos=0
  ;   K[0]='m_arrTrayCell'
  ;   K[1]=1
  ;   K[2]='m_trayCount'
  ;   K[3]='Object'
  ;   K[4]='Instantiate'
  ;   K[5]='m_trayCellPrefab'
  ;   K[6]='m_trayCellRoot'
  ;   K[7]='GetLuaTable'
  ;   K[8]='Init'
  ;   K[9]='m_bRecipeUnlock'
  ;   K[10]='LayoutRebuilder'
  ;   K[11]='ForceRebuildLayoutImmediate'
  ;   K[12]='m_titleText'
  ;   K[13]='text'
  ;   K[14]='GM'
  ;   K[15]='GameTextModel'
  ;   K[16]='GetText'
  ;   K[17]='recipecollect_text_3'
  ;   K[18]='m_stage'
  ;   K[19]='m_progress'
  ;   K[20]='m_rewardContent'
  ;   K[21]='m_stageConfig'
  ;   K[22]='GetRewards'
  ;   K[23]='ERewardScene'
  ;   K[24]='Other'
  ;   K[25]='AddHandlerAndRecordMap'
  ;   K[26]='event'
  ;   K[27]='SimpleRewardContent'
  ;   K[28]='EventType'
  ;   K[29]='OnUpdateRewards'
  ;   K[30]='obj'
  ;   K[31]='method'
  ;   K[32]='_OnUpdateRewards'
  ;   upvals: _ENV
  ;   locals: self(0-57), (for index)(5-21), (for limit)(5-21), (for step)(5-21), tray(6-20), trayCell(13-20)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  SETTABLE  R0[K0('m_arrTrayCell')] = R1
  0002  LOADK     R1 = K1 1
  0003  GETTABLE  R2 = R0[K2('m_trayCount')]
  0004  LOADK     R3 = K1 1
  0005  FORPREP   forprep R1(sBx=14)   -> 20
  0006  GETTABUP  R5 = _ENV[K3('Object')]
  0007  GETTABLE  R5 = R5[K4('Instantiate')]
  0008  GETTABLE  R6 = R0[K5('m_trayCellPrefab')]
  0009  GETTABLE  R7 = R0[K6('m_trayCellRoot')]
  0010  CALL      R5 = call(R5, 1 args, 2 rets)
  0011  SELF      R6 = R5[K7('GetLuaTable')] (self)
  0012  CALL      R5 = call(R5, 1 args, 1 rets)
  0013  SELF      R7 = R5[K8('Init')] (self)
  0014  MOVE      R8 = R0
  0015  MOVE      R9 = R0
  0016  GETTABLE  R10 = R0[K9('m_bRecipeUnlock')]
  0017  CALL      R6 = call(R6, 0 args, 4 rets)
  0018  GETTABLE  R6 = R0[K0('m_arrTrayCell')]
  0019  SETTABLE  R6[R4] = R5
  0020  FORLOOP   forloop R1(sBx=-15)   -> 6
  0021  GETTABUP  R1 = _ENV[K10('LayoutRebuilder')]
  0022  GETTABLE  R1 = R1[K11('ForceRebuildLayoutImmediate')]
  0023  GETTABLE  R2 = R0[K6('m_trayCellRoot')]
  0024  CALL      R1 = call(R1, 0 args, 1 rets)
  0025  GETTABLE  R1 = R0[K12('m_titleText')]
  0026  GETTABUP  R2 = _ENV[K14('GM')]
  0027  GETTABLE  R2 = R2[K15('GameTextModel')]
  0028  SELF      R3 = R2[K16('GetText')] (self)
  0029  LOADK     R4 = K17 'recipecollect_text_3'
  0030  GETTABLE  R5 = R0[K18('m_stage')]
  0031  GETTABLE  R6 = R0[K19('m_progress')]
  0032  GETTABLE  R7 = R0[K2('m_trayCount')]
  0033  CALL      R2 = call(R2, 1 args, 5 rets)
  0034  SETTABLE  R1[K13('text')] = R2
  0035  GETTABLE  R1 = R0[K20('m_rewardContent')]
  0036  SELF      R2 = R1[K8('Init')] (self)
  0037  GETTABLE  R3 = R0[K21('m_stageConfig')]
  0038  SELF      R4 = R3[K22('GetRewards')] (self)
  0039  CALL      R3 = call(R3, 1 args, 1 rets)
  0040  GETTABUP  R4 = _ENV[K23('ERewardScene')]
  0041  GETTABLE  R4 = R4[K24('Other')]
  0042  CALL      R1 = call(R1, 0 args, 3 rets)
  0043  GETTABUP  R1 = _ENV[K25('AddHandlerAndRecordMap')]
  0044  GETTABLE  R2 = R0[K20('m_rewardContent')]
  0045  GETTABLE  R2 = R2[K26('event')]
  0046  GETTABUP  R3 = _ENV[K27('SimpleRewardContent')]
  0047  GETTABLE  R3 = R3[K28('EventType')]
  0048  GETTABLE  R3 = R3[K29('OnUpdateRewards')]
  0049  NEWTABLE  R4 = {} (0 items)
  0050  SETTABLE  R4[K30('obj')] = R0
  0051  GETTABLE  R5 = R0[K32('_OnUpdateRewards')]
  0052  SETTABLE  R4[K31('method')] = R5
  0053  CALL      R1 = call(R1, 0 args, 3 rets)
  0054  SELF      R2 = R0[K32('_OnUpdateRewards')] (self)
  0055  CALL      R1 = call(R1, 0 args, 1 rets)
  0056  RETURN    return R0..R-1
; ---------- proto3 [GetWindow] ----------
  ; fn ?  line 58-60 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_window'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_window')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto4 [GetModel] ----------
  ; fn ?  line 62-64 np=1 va=0 ms=3 code=6 consts=2 upvals=0 protos=0
  ;   K[0]='GetWindow'
  ;   K[1]='GetModel'
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('GetWindow')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('GetModel')] (self)
  0003  TAILCALL  tailcall(R1, 0)
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
; ---------- proto5 [GetStage] ----------
  ; fn ?  line 66-68 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_stage'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_stage')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto6 [_OnUpdateRewards] ----------
  ; fn ?  line 70-78 np=1 va=0 ms=9 code=18 consts=7 upvals=1 protos=0
  ;   K[0]='ipairs'
  ;   K[1]='m_rewardContent'
  ;   K[2]='GetRewardItems'
  ;   K[3]='SetClaimed'
  ;   K[4]='m_bRewardClaimed'
  ;   K[5]='m_bRecipeUnlock'
  ;   K[6]='SetTipButtonVisible'
  ;   upvals: _ENV
  ;   locals: self(0-18), (for generator)(5-17), (for state)(5-17), (for control)(5-17), _(6-15), rewardItem(6-15)
  0000  GETTABUP  R1 = _ENV[K0('ipairs')]
  0001  GETTABLE  R2 = R0[K1('m_rewardContent')]
  0002  SELF      R3 = R2[K2('GetRewardItems')] (self)
  0003  CALL      R2 = call(R2, -1 args, 1 rets)
  0004  CALL      R1 = call(R1, 3 args, -1 rets)
  0005  JMP       (jump)   -> 15
  0006  SELF      R7 = R5[K3('SetClaimed')] (self)
  0007  GETTABLE  R8 = R0[K4('m_bRewardClaimed')]
  0008  CALL      R6 = call(R6, 0 args, 2 rets)
  0009  GETTABLE  R6 = R0[K5('m_bRecipeUnlock')]
  0010  TEST      if not R6 then   -> -131060
  0011  JMP       (jump)   -> 15
  0012  SELF      R7 = R5[K6('SetTipButtonVisible')] (self)
  0013  LOADBOOL  R8 = false
  0014  CALL      R6 = call(R6, 0 args, 2 rets)
  0015  TFORCALL  tforcall R1
  0016  TFORLOOP  tforloop R3(sBx=-11)   -> 6
  0017  RETURN    return R0..R-1
; ---------- proto7 [GetTrayCell] ----------
  ; fn ?  line 81-83 np=2 va=0 ms=3 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='m_arrTrayCell'
  ;   locals: self(0-4), tray(0-4)
  0000  GETTABLE  R2 = R0[K0('m_arrTrayCell')]
  0001  GETTABLE  R2 = R2[R1]
  0002  RETURN    return R2..R1
  0003  RETURN    return R0..R-1
; ---------- proto8 [GetProgress] ----------
  ; fn ?  line 85-87 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_progress'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_progress')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto9 [GetTrayCount] ----------
  ; fn ?  line 89-91 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_trayCount'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_trayCount')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto10 [UpdateTitleText] ----------
  ; fn ?  line 94-97 np=2 va=0 ms=10 code=17 consts=11 upvals=1 protos=0
  ;   K[0]=0
  ;   K[1]='m_titleText'
  ;   K[2]='text'
  ;   K[3]='GM'
  ;   K[4]='GameTextModel'
  ;   K[5]='GetText'
  ;   K[6]='recipecollect_text_3'
  ;   K[7]='m_stage'
  ;   K[8]='m_progress'
  ;   K[9]='m_stageConfig'
  ;   K[10]='GetTrayCount'
  ;   upvals: _ENV
  ;   locals: self(0-17), deltaProgress(0-17)
  0000  TEST      if not R1 then   -> -131069
  0001  JMP       (jump)   -> 3
  0002  LOADK     R1 = K0 0
  0003  GETTABLE  R2 = R0[K1('m_titleText')]
  0004  GETTABUP  R3 = _ENV[K3('GM')]
  0005  GETTABLE  R3 = R3[K4('GameTextModel')]
  0006  SELF      R4 = R3[K5('GetText')] (self)
  0007  LOADK     R5 = K6 'recipecollect_text_3'
  0008  GETTABLE  R6 = R0[K7('m_stage')]
  0009  GETTABLE  R7 = R0[K8('m_progress')]
  0010  ADD       R7 = R1 add R7
  0011  GETTABLE  R8 = R0[K9('m_stageConfig')]
  0012  SELF      R9 = R8[K10('GetTrayCount')] (self)
  0013  CALL      R8 = call(R8, -1 args, 1 rets)
  0014  CALL      R3 = call(R3, 1 args, -1 rets)
  0015  SETTABLE  R2[K2('text')] = R3
  0016  RETURN    return R0..R-1
