# UI_UIFramework_LeastPriorityPopupHelper_252.luac
; fn @LeastPriorityPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=35 consts=16 upvals=1 protos=6
;   K[0]='LeastPriorityPopupHelper'
;   K[1]='setmetatable'
;   K[2]='canPopScene'
;   K[3]='EPopupScene'
;   K[4]='Main'
;   K[5]=true
;   K[6]='Board'
;   K[7]='BasePopupHelper'
;   K[8]='__index'
;   K[9]='Create'
;   K[10]='LeastPriorityPopupHelper'
;   K[11]='Init'
;   K[12]='_OnChangeGameMode'
;   K[13]='_OnLoginFinished'
;   K[14]='_OnOpenView'
;   K[15]='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('Main')]
0005  SETTABLE  R2[R3] = K5(true)
0006  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0007  GETTABLE  R3 = R3[K6('Board')]
0008  SETTABLE  R2[R3] = K5(true)
0009  SETTABLE  R1[K2('canPopScene')] = R2
0010  GETTABUP  R2 = _ENV[K7('BasePopupHelper')]
0011  CALL      R0 = call(R0, 1 args, 2 rets)
0012  SETTABUP  _ENV[K0('LeastPriorityPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('LeastPriorityPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('LeastPriorityPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('LeastPriorityPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('LeastPriorityPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('LeastPriorityPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnChangeGameMode')] = R1
0025  GETTABUP  R0 = _ENV[K10('LeastPriorityPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('_OnLoginFinished')] = R1
0028  GETTABUP  R0 = _ENV[K10('LeastPriorityPopupHelper')]
0029  CLOSURE   R1 = closure proto4
0030  SETTABLE  R0[K14('_OnOpenView')] = R1
0031  GETTABUP  R0 = _ENV[K10('LeastPriorityPopupHelper')]
0032  CLOSURE   R1 = closure proto5
0033  SETTABLE  R0[K15('CheckPopup')] = R1
0034  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]='LeastPriorityPopupHelper'
  ;   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('LeastPriorityPopupHelper')]
  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=26 consts=11 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='EventDispatcher'
  ;   K[3]='AddListener'
  ;   K[4]='EEventType'
  ;   K[5]='OpenView'
  ;   K[6]='_OnOpenView'
  ;   K[7]='LoginFinished'
  ;   K[8]='_OnLoginFinished'
  ;   K[9]='ChangeGameMode'
  ;   K[10]='_OnChangeGameMode'
  ;   upvals: _ENV
  ;   locals: self(0-26)
  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('OpenView')]
  0008  MOVE      R3 = R0
  0009  GETTABLE  R4 = R0[K6('_OnOpenView')]
  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('LoginFinished')]
  0015  MOVE      R3 = R0
  0016  GETTABLE  R4 = R0[K8('_OnLoginFinished')]
  0017  CALL      R1 = call(R1, 0 args, 3 rets)
  0018  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0019  GETTABLE  R1 = R1[K3('AddListener')]
  0020  GETTABUP  R2 = _ENV[K4('EEventType')]
  0021  GETTABLE  R2 = R2[K9('ChangeGameMode')]
  0022  MOVE      R3 = R0
  0023  GETTABLE  R4 = R0[K10('_OnChangeGameMode')]
  0024  CALL      R1 = call(R1, 0 args, 3 rets)
  0025  RETURN    return R0..R-1
; ---------- proto2 [_OnChangeGameMode] ----------
  ; fn ?  line 22-25 np=1 va=0 ms=2 code=2 consts=2 upvals=0 protos=0
  ;   K[0]='m_skipPopup'
  ;   K[1]=true
  ;   locals: self(0-2)
  0000  SETTABLE  R0[K0('m_skipPopup')] = K1(true)
  0001  RETURN    return R0..R-1
; ---------- proto3 [_OnLoginFinished] ----------
  ; fn ?  line 27-31 np=1 va=0 ms=4 code=10 consts=8 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='UIManager'
  ;   K[2]='GetOpenedViewCountByType'
  ;   K[3]='EViewType'
  ;   K[4]='Window'
  ;   K[5]=0
  ;   K[6]='m_skipPopup'
  ;   K[7]=true
  ;   upvals: _ENV
  ;   locals: self(0-10)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('UIManager')]
  0002  SELF      R2 = R1[K2('GetOpenedViewCountByType')] (self)
  0003  GETTABUP  R3 = _ENV[K3('EViewType')]
  0004  GETTABLE  R3 = R3[K4('Window')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  LT        if R0 lt R1   -> 2569
  0007  JMP       (jump)   -> 9
  0008  SETTABLE  R0[K6('m_skipPopup')] = K7(true)
  0009  RETURN    return R0..R-1
; ---------- proto4 [_OnOpenView] ----------
  ; fn ?  line 33-43 np=2 va=0 ms=4 code=23 consts=8 upvals=1 protos=0
  ;   K[0]='NeedCheckPopup'
  ;   K[1]='name'
  ;   K[2]='UIPrefabConfigName'
  ;   K[3]='OrderDayRefreshWindow'
  ;   K[4]='ScrollBackToOrderWindow'
  ;   K[5]='BaseSceneView'
  ;   K[6]='m_skipPopup'
  ;   K[7]=true
  ;   upvals: _ENV
  ;   locals: self(0-23), msg(0-23)
  0000  SELF      R3 = R0[K0('NeedCheckPopup')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  TEST      if not R2 then   -> -131068
  0003  JMP       (jump)   -> 22
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 22
  0006  GETTABLE  R2 = R1[K1('name')]
  0007  GETTABUP  R3 = _ENV[K2('UIPrefabConfigName')]
  0008  GETTABLE  R3 = R3[K3('OrderDayRefreshWindow')]
  0009  EQ        if R1 eq R3   -> -130034
  0010  JMP       (jump)   -> 22
  0011  GETTABLE  R2 = R1[K1('name')]
  0012  GETTABUP  R3 = _ENV[K2('UIPrefabConfigName')]
  0013  GETTABLE  R3 = R3[K4('ScrollBackToOrderWindow')]
  0014  EQ        if R1 eq R3   -> -130029
  0015  JMP       (jump)   -> 22
  0016  GETTABLE  R2 = R1[K1('name')]
  0017  GETTABUP  R3 = _ENV[K2('UIPrefabConfigName')]
  0018  GETTABLE  R3 = R3[K5('BaseSceneView')]
  0019  EQ        if R1 eq R3   -> -130024
  0020  JMP       (jump)   -> 22
  0021  SETTABLE  R0[K6('m_skipPopup')] = K7(true)
  0022  RETURN    return R0..R-1
; ---------- proto5 [CheckPopup] ----------
  ; fn ?  line 45-61 np=1 va=0 ms=14 code=39 consts=13 upvals=1 protos=0
  ;   K[0]='m_skipPopup'
  ;   K[1]=false
  ;   K[2]='pairs'
  ;   K[3]='FrameDecoActivityDefinition'
  ;   K[4]='GM'
  ;   K[5]='ActivityManager'
  ;   K[6]='GetModel'
  ;   K[7]='GetState'
  ;   K[8]='GetId'
  ;   K[9]='ActivityState'
  ;   K[10]='Started'
  ;   K[11]='CanPopupDailyWindow'
  ;   K[12]='MainWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-39), bSkipPoup(1-39), model(3-39), state(3-39), args(3-39), (for generator)(6-38), (for state)(6-38), (for control)(6-38), activityType(7-36), activityDefinition(7-36)
  0000  GETTABLE  R1 = R0[K0('m_skipPopup')]
  0001  SETTABLE  R0[K0('m_skipPopup')] = K1(false)
  0002  LOADNIL   R2..R2 = nil
  0003  GETTABUP  R5 = _ENV[K2('pairs')]
  0004  GETTABUP  R6 = _ENV[K3('FrameDecoActivityDefinition')]
  0005  CALL      R5 = call(R5, 3 args, 1 rets)
  0006  JMP       (jump)   -> 36
  0007  GETTABUP  R10 = _ENV[K4('GM')]
  0008  GETTABLE  R10 = R10[K5('ActivityManager')]
  0009  SELF      R11 = R10[K6('GetModel')] (self)
  0010  MOVE      R12 = R0
  0011  CALL      R10 = call(R10, 1 args, 2 rets)
  0012  MOVE      R2 = R0
  0013  SELF      R11 = R2[K7('GetState')] (self)
  0014  CALL      R10 = call(R10, 1 args, 1 rets)
  0015  MOVE      R3 = R0
  0016  NEWTABLE  R10 = {} (3 items)
  0017  MOVE      R11 = R0
  0018  SELF      R13 = R2[K8('GetId')] (self)
  0019  CALL      R12 = call(R12, 1 args, 1 rets)
  0020  LOADBOOL  R13 = true
  0021  SETLIST   setlist R10[B=1,C=3]
  0022  MOVE      R4 = R0
  0023  GETTABUP  R10 = _ENV[K9('ActivityState')]
  0024  GETTABLE  R10 = R10[K10('Started')]
  0025  EQ        if R0 eq R10   -> -129499
  0026  JMP       (jump)   -> 36
  0027  TEST      if not R1 then   -> -131042
  0028  JMP       (jump)   -> 36
  0029  SELF      R11 = R2[K11('CanPopupDailyWindow')] (self)
  0030  CALL      R10 = call(R10, 1 args, 1 rets)
  0031  TEST      if not R10 then   -> -131039
  0032  JMP       (jump)   -> 36
  0033  GETTABLE  R10 = R9[K12('MainWindowPrefabName')]
  0034  MOVE      R11 = R0
  0035  RETURN    return R10..R9
  0036  TFORCALL  tforcall R5
  0037  TFORLOOP  tforloop R7(sBx=-31)   -> 7
  0038  RETURN    return R0..R-1
