# NewRecipeReward_View_NewRecipeRewardPopupHelper_1431.luac
; fn @NewRecipeRewardPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=29 consts=14 upvals=1 protos=5
;   K[0]='NewRecipeRewardPopupHelper'
;   K[1]='setmetatable'
;   K[2]='canPopScene'
;   K[3]='EPopupScene'
;   K[4]='Board'
;   K[5]=true
;   K[6]='BasePopupHelper'
;   K[7]='__index'
;   K[8]='Create'
;   K[9]='NewRecipeRewardPopupHelper'
;   K[10]='Init'
;   K[11]='OnGameModeChanged'
;   K[12]='OnStateChanged'
;   K[13]='CheckPopup'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  NEWTABLE  R2 = {} (0 items)
0003  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0004  GETTABLE  R3 = R3[K4('Board')]
0005  SETTABLE  R2[R3] = K5(true)
0006  SETTABLE  R1[K2('canPopScene')] = R2
0007  GETTABUP  R2 = _ENV[K6('BasePopupHelper')]
0008  CALL      R0 = call(R0, 1 args, 2 rets)
0009  SETTABUP  _ENV[K0('NewRecipeRewardPopupHelper')] = R0
0010  GETTABUP  R0 = _ENV[K0('NewRecipeRewardPopupHelper')]
0011  GETTABUP  R1 = _ENV[K0('NewRecipeRewardPopupHelper')]
0012  SETTABLE  R0[K7('__index')] = R1
0013  GETTABUP  R0 = _ENV[K0('NewRecipeRewardPopupHelper')]
0014  CLOSURE   R1 = closure proto0
0015  SETTABLE  R0[K8('Create')] = R1
0016  GETTABUP  R0 = _ENV[K9('NewRecipeRewardPopupHelper')]
0017  CLOSURE   R1 = closure proto1
0018  SETTABLE  R0[K10('Init')] = R1
0019  GETTABUP  R0 = _ENV[K9('NewRecipeRewardPopupHelper')]
0020  CLOSURE   R1 = closure proto2
0021  SETTABLE  R0[K11('OnGameModeChanged')] = R1
0022  GETTABUP  R0 = _ENV[K9('NewRecipeRewardPopupHelper')]
0023  CLOSURE   R1 = closure proto3
0024  SETTABLE  R0[K12('OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K9('NewRecipeRewardPopupHelper')]
0026  CLOSURE   R1 = closure proto4
0027  SETTABLE  R0[K13('CheckPopup')] = R1
0028  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 9-13 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='NewRecipeRewardPopupHelper'
  ;   K[2]='Init'
  ;   upvals: _ENV
  ;   locals: helper(4-8)
  0000  GETTABUP  R0 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R1 = {} (0 items)
  0002  GETTABUP  R2 = _ENV[K1('NewRecipeRewardPopupHelper')]
  0003  CALL      R0 = call(R0, 1 args, 2 rets)
  0004  SELF      R2 = R0[K2('Init')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
  0007  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 15-20 np=1 va=0 ms=5 code=19 consts=9 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='EventDispatcher'
  ;   K[3]='AddListener'
  ;   K[4]='EEventType'
  ;   K[5]='ChangeGameMode'
  ;   K[6]='OnGameModeChanged'
  ;   K[7]='NewRecipeRewardStateChanged'
  ;   K[8]='OnStateChanged'
  ;   upvals: _ENV
  ;   locals: self(0-19)
  0000  GETTABUP  R1 = _ENV[K0('BasePopupHelper')]
  0001  GETTABLE  R1 = R1[K1('Init')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0005  GETTABLE  R1 = R1[K3('AddListener')]
  0006  GETTABUP  R2 = _ENV[K4('EEventType')]
  0007  GETTABLE  R2 = R2[K5('ChangeGameMode')]
  0008  MOVE      R3 = R0
  0009  GETTABLE  R4 = R0[K6('OnGameModeChanged')]
  0010  CALL      R1 = call(R1, 0 args, 3 rets)
  0011  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0012  GETTABLE  R1 = R1[K3('AddListener')]
  0013  GETTABUP  R2 = _ENV[K4('EEventType')]
  0014  GETTABLE  R2 = R2[K7('NewRecipeRewardStateChanged')]
  0015  MOVE      R3 = R0
  0016  GETTABLE  R4 = R0[K8('OnStateChanged')]
  0017  CALL      R1 = call(R1, 0 args, 3 rets)
  0018  RETURN    return R0..R-1
; ---------- proto2 [OnGameModeChanged] ----------
  ; fn ?  line 22-26 np=2 va=0 ms=5 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='EGameMode'
  ;   K[1]='Board'
  ;   K[2]='SetNeedCheckPopup'
  ;   upvals: _ENV
  ;   locals: self(0-8), gameMode(0-8)
  0000  GETTABUP  R2 = _ENV[K0('EGameMode')]
  0001  GETTABLE  R2 = R2[K1('Board')]
  0002  EQ        if R0 eq R2   -> -130554
  0003  JMP       (jump)   -> 7
  0004  SELF      R3 = R0[K2('SetNeedCheckPopup')] (self)
  0005  LOADBOOL  R4 = true
  0006  CALL      R2 = call(R2, 0 args, 2 rets)
  0007  RETURN    return R0..R-1
; ---------- proto3 [OnStateChanged] ----------
  ; fn ?  line 28-30 np=1 va=0 ms=4 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='SetNeedCheckPopup'
  ;   locals: self(0-4)
  0000  SELF      R2 = R0[K0('SetNeedCheckPopup')] (self)
  0001  LOADBOOL  R3 = true
  0002  CALL      R1 = call(R1, 0 args, 2 rets)
  0003  RETURN    return R0..R-1
; ---------- proto4 [CheckPopup] ----------
  ; fn ?  line 32-66 np=1 va=0 ms=18 code=70 consts=23 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='SceneManager'
  ;   K[2]='GetGameMode'
  ;   K[3]='EGameMode'
  ;   K[4]='Board'
  ;   K[5]='ActivityManager'
  ;   K[6]='GetModel'
  ;   K[7]='ActivityType'
  ;   K[8]='NewRecipeReward'
  ;   K[9]='IsActivityOpen'
  ;   K[10]='HasWindowOpenedOnce'
  ;   K[11]='ActivityState'
  ;   K[12]='Started'
  ;   K[13]='ItemDataModel'
  ;   K[14]='MainBoardModel'
  ;   K[15]='GetOrders'
  ;   K[16]='pairs'
  ;   K[17]='ipairs'
  ;   K[18]='GetRequirements'
  ;   K[19]='IsDishes'
  ;   K[20]='IsUnlocked'
  ;   K[21]='UIPrefabConfigName'
  ;   K[22]='NewRecipeRewardHelpWindow'
  ;   upvals: _ENV
  ;   locals: self(0-70), model(15-70), hasNewRecipes(28-70), itemDataModel(30-70), orders(34-70), (for generator)(37-61), (for state)(37-61), (for control)(37-61), _(38-59), order(38-59), (for generator)(42-57), (for state)(42-57), (for control)(42-57), _(43-55), requirement(43-55)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('SceneManager')]
  0002  SELF      R2 = R1[K2('GetGameMode')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  GETTABUP  R2 = _ENV[K3('EGameMode')]
  0005  GETTABLE  R2 = R2[K4('Board')]
  0006  EQ        if R1 eq R2   -> -130550
  0007  JMP       (jump)   -> 9
  0008  RETURN    return R0..R-1
  0009  GETTABUP  R1 = _ENV[K0('GM')]
  0010  GETTABLE  R1 = R1[K5('ActivityManager')]
  0011  SELF      R2 = R1[K6('GetModel')] (self)
  0012  GETTABUP  R3 = _ENV[K7('ActivityType')]
  0013  GETTABLE  R3 = R3[K8('NewRecipeReward')]
  0014  CALL      R1 = call(R1, 1 args, 2 rets)
  0015  SELF      R3 = R1[K9('IsActivityOpen')] (self)
  0016  CALL      R2 = call(R2, 1 args, 1 rets)
  0017  TEST      if not R2 then   -> -131052
  0018  JMP       (jump)   -> 20
  0019  RETURN    return R0..R-1
  0020  SELF      R3 = R1[K10('HasWindowOpenedOnce')] (self)
  0021  GETTABUP  R4 = _ENV[K11('ActivityState')]
  0022  GETTABLE  R4 = R4[K12('Started')]
  0023  CALL      R2 = call(R2, 1 args, 2 rets)
  0024  TEST      if not R2 then   -> -131046
  0025  JMP       (jump)   -> 27
  0026  RETURN    return R0..R-1
  0027  LOADBOOL  R2 = false
  0028  GETTABUP  R3 = _ENV[K0('GM')]
  0029  GETTABLE  R3 = R3[K13('ItemDataModel')]
  0030  GETTABUP  R4 = _ENV[K0('GM')]
  0031  GETTABLE  R4 = R4[K14('MainBoardModel')]
  0032  SELF      R5 = R4[K15('GetOrders')] (self)
  0033  CALL      R4 = call(R4, 1 args, 1 rets)
  0034  GETTABUP  R5 = _ENV[K16('pairs')]
  0035  MOVE      R6 = R0
  0036  CALL      R5 = call(R5, 3 args, 1 rets)
  0037  JMP       (jump)   -> 59
  0038  GETTABUP  R10 = _ENV[K17('ipairs')]
  0039  SELF      R12 = R9[K18('GetRequirements')] (self)
  0040  CALL      R11 = call(R11, -1 args, 1 rets)
  0041  CALL      R10 = call(R10, 3 args, -1 rets)
  0042  JMP       (jump)   -> 55
  0043  SELF      R16 = R3[K19('IsDishes')] (self)
  0044  MOVE      R17 = R0
  0045  CALL      R15 = call(R15, 1 args, 2 rets)
  0046  TEST      if not R15 then   -> -131024
  0047  JMP       (jump)   -> 55
  0048  SELF      R16 = R3[K20('IsUnlocked')] (self)
  0049  MOVE      R17 = R0
  0050  CALL      R15 = call(R15, 1 args, 2 rets)
  0051  TEST      if not R15 then   -> -131018
  0052  JMP       (jump)   -> 55
  0053  LOADBOOL  R2 = true
  0054  JMP       (jump)   -> 57
  0055  TFORCALL  tforcall R10
  0056  TFORLOOP  tforloop R12(sBx=-14)   -> 43
  0057  TEST      if not R2 then   -> -131012
  0058  JMP       (jump)   -> 61
  0059  TFORCALL  tforcall R5
  0060  TFORLOOP  tforloop R7(sBx=-23)   -> 38
  0061  TEST      if not R2 then   -> -131009
  0062  JMP       (jump)   -> 69
  0063  GETTABUP  R5 = _ENV[K21('UIPrefabConfigName')]
  0064  GETTABLE  R5 = R5[K22('NewRecipeRewardHelpWindow')]
  0065  NEWTABLE  R6 = {} (1 items)
  0066  LOADBOOL  R7 = true
  0067  SETLIST   setlist R6[B=1,C=1]
  0068  RETURN    return R5..R4
  0069  RETURN    return R0..R-1
