# DailyActiveQuest_View_DailyActiveQuestPopupHelper_1636.luac
; fn @DailyActiveQuestPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=29 consts=14 upvals=1 protos=4
;   K[0]='DailyActiveQuestPopupHelper'
;   K[1]='setmetatable'
;   K[2]='canPopScene'
;   K[3]='EPopupScene'
;   K[4]='Board'
;   K[5]=true
;   K[6]='Main'
;   K[7]='BasePopupHelper'
;   K[8]='__index'
;   K[9]='Create'
;   K[10]='DailyActiveQuestPopupHelper'
;   K[11]='Init'
;   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  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0007  GETTABLE  R3 = R3[K6('Main')]
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('DailyActiveQuestPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('DailyActiveQuestPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('DailyActiveQuestPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('DailyActiveQuestPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('DailyActiveQuestPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('DailyActiveQuestPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('DailyActiveQuestPopupHelper')]
0026  CLOSURE   R1 = closure proto3
0027  SETTABLE  R0[K13('CheckPopup')] = R1
0028  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 10-14 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='DailyActiveQuestPopupHelper'
  ;   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('DailyActiveQuestPopupHelper')]
  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 16-24 np=1 va=0 ms=10 code=37 consts=12 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='DailyActiveQuestDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   K[8]='NewDayEvent'
  ;   K[9]='EEventType'
  ;   K[10]='ChangeGameMode'
  ;   K[11]='DailyActiveQuestPopupRefresh'
  ;   upvals: _ENV
  ;   locals: self(0-37), (for generator)(7-22), (for state)(7-22), (for control)(7-22), _(8-20), activityDefinition(8-20)
  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('pairs')]
  0005  GETTABUP  R2 = _ENV[K3('DailyActiveQuestDefinition')]
  0006  CALL      R1 = call(R1, 3 args, 1 rets)
  0007  JMP       (jump)   -> 20
  0008  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0009  GETTABLE  R6 = R6[K5('AddListener')]
  0010  GETTABLE  R7 = R5[K6('StateChangedEvent')]
  0011  MOVE      R8 = R0
  0012  GETTABLE  R9 = R0[K7('_OnStateChanged')]
  0013  CALL      R6 = call(R6, 0 args, 3 rets)
  0014  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0015  GETTABLE  R6 = R6[K5('AddListener')]
  0016  GETTABLE  R7 = R5[K8('NewDayEvent')]
  0017  MOVE      R8 = R0
  0018  GETTABLE  R9 = R0[K7('_OnStateChanged')]
  0019  CALL      R6 = call(R6, 0 args, 3 rets)
  0020  TFORCALL  tforcall R1
  0021  TFORLOOP  tforloop R3(sBx=-14)   -> 8
  0022  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0023  GETTABLE  R1 = R1[K5('AddListener')]
  0024  GETTABUP  R2 = _ENV[K9('EEventType')]
  0025  GETTABLE  R2 = R2[K10('ChangeGameMode')]
  0026  MOVE      R3 = R0
  0027  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0028  CALL      R1 = call(R1, 0 args, 3 rets)
  0029  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0030  GETTABLE  R1 = R1[K5('AddListener')]
  0031  GETTABUP  R2 = _ENV[K9('EEventType')]
  0032  GETTABLE  R2 = R2[K11('DailyActiveQuestPopupRefresh')]
  0033  MOVE      R3 = R0
  0034  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0035  CALL      R1 = call(R1, 0 args, 3 rets)
  0036  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; fn ?  line 26-29 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
; ---------- proto3 [CheckPopup] ----------
  ; fn ?  line 31-63 np=1 va=0 ms=14 code=80 consts=22 upvals=1 protos=1
  ;   K[0]='pairs'
  ;   K[1]='DailyActiveQuestDefinition'
  ;   K[2]='table'
  ;   K[3]='insert'
  ;   K[4]='sort'
  ;   K[5]='ipairs'
  ;   K[6]='GM'
  ;   K[7]='ActivityManager'
  ;   K[8]='GetModel'
  ;   K[9]='GetState'
  ;   K[10]='ActivityState'
  ;   K[11]='Ended'
  ;   K[12]='TryRecoverCurDayAllRewards'
  ;   K[13]='CanPopupRewardRecoverWindow'
  ;   K[14]='Started'
  ;   K[15]='RewardRecoverWindowPrefabName'
  ;   K[16]='SceneManager'
  ;   K[17]='GetGameMode'
  ;   K[18]='EGameMode'
  ;   K[19]='Board'
  ;   K[20]='CanPopupMainWindow'
  ;   K[21]='MainWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-80), arrType(1-80), (for generator)(4-12), (for state)(4-12), (for control)(4-12), activityType(5-10), _(5-10), (for generator)(20-79), (for state)(20-79), (for control)(20-79), _(21-77), activityType(21-77), activityDefinition(23-77), model(28-77), state(30-77)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  GETTABUP  R2 = _ENV[K0('pairs')]
  0002  GETTABUP  R3 = _ENV[K1('DailyActiveQuestDefinition')]
  0003  CALL      R2 = call(R2, 3 args, 1 rets)
  0004  JMP       (jump)   -> 10
  0005  GETTABUP  R7 = _ENV[K2('table')]
  0006  GETTABLE  R7 = R7[K3('insert')]
  0007  MOVE      R8 = R0
  0008  MOVE      R9 = R0
  0009  CALL      R7 = call(R7, 0 args, 2 rets)
  0010  TFORCALL  tforcall R2
  0011  TFORLOOP  tforloop R4(sBx=-7)   -> 5
  0012  GETTABUP  R2 = _ENV[K2('table')]
  0013  GETTABLE  R2 = R2[K4('sort')]
  0014  MOVE      R3 = R0
  0015  CLOSURE   R4 = closure proto0
  0016  CALL      R2 = call(R2, 0 args, 2 rets)
  0017  GETTABUP  R2 = _ENV[K5('ipairs')]
  0018  MOVE      R3 = R0
  0019  CALL      R2 = call(R2, 3 args, 1 rets)
  0020  JMP       (jump)   -> 77
  0021  GETTABUP  R7 = _ENV[K1('DailyActiveQuestDefinition')]
  0022  GETTABLE  R7 = R7[R6]
  0023  GETTABUP  R8 = _ENV[K6('GM')]
  0024  GETTABLE  R8 = R8[K7('ActivityManager')]
  0025  SELF      R9 = R8[K8('GetModel')] (self)
  0026  MOVE      R10 = R0
  0027  CALL      R8 = call(R8, 1 args, 2 rets)
  0028  SELF      R10 = R8[K9('GetState')] (self)
  0029  CALL      R9 = call(R9, 1 args, 1 rets)
  0030  GETTABUP  R10 = _ENV[K10('ActivityState')]
  0031  GETTABLE  R10 = R10[K11('Ended')]
  0032  EQ        if R0 eq R10   -> -126420
  0033  JMP       (jump)   -> 36
  0034  SELF      R11 = R8[K12('TryRecoverCurDayAllRewards')] (self)
  0035  CALL      R10 = call(R10, 0 args, 1 rets)
  0036  SELF      R11 = R8[K13('CanPopupRewardRecoverWindow')] (self)
  0037  CALL      R10 = call(R10, 1 args, 1 rets)
  0038  TEST      if not R10 then   -> -131032
  0039  JMP       (jump)   -> 55
  0040  GETTABUP  R10 = _ENV[K10('ActivityState')]
  0041  GETTABLE  R10 = R10[K14('Started')]
  0042  EQ        if R1 eq R10   -> -126410
  0043  JMP       (jump)   -> 48
  0044  GETTABUP  R10 = _ENV[K10('ActivityState')]
  0045  GETTABLE  R10 = R10[K11('Ended')]
  0046  EQ        if R0 eq R10   -> -126406
  0047  JMP       (jump)   -> 55
  0048  GETTABLE  R10 = R7[K15('RewardRecoverWindowPrefabName')]
  0049  NEWTABLE  R11 = {} (2 items)
  0050  MOVE      R12 = R0
  0051  LOADBOOL  R13 = false
  0052  SETLIST   setlist R11[B=1,C=2]
  0053  RETURN    return R10..R9
  0054  JMP       (jump)   -> 77
  0055  GETTABUP  R10 = _ENV[K10('ActivityState')]
  0056  GETTABLE  R10 = R10[K14('Started')]
  0057  EQ        if R0 eq R10   -> -126395
  0058  JMP       (jump)   -> 77
  0059  GETTABUP  R10 = _ENV[K6('GM')]
  0060  GETTABLE  R10 = R10[K16('SceneManager')]
  0061  SELF      R11 = R10[K17('GetGameMode')] (self)
  0062  CALL      R10 = call(R10, 1 args, 1 rets)
  0063  GETTABUP  R11 = _ENV[K18('EGameMode')]
  0064  GETTABLE  R11 = R11[K19('Board')]
  0065  EQ        if R0 eq R11   -> -125874
  0066  JMP       (jump)   -> 77
  0067  SELF      R11 = R8[K20('CanPopupMainWindow')] (self)
  0068  CALL      R10 = call(R10, 1 args, 1 rets)
  0069  TEST      if not R10 then   -> -131001
  0070  JMP       (jump)   -> 77
  0071  GETTABLE  R10 = R7[K21('MainWindowPrefabName')]
  0072  NEWTABLE  R11 = {} (2 items)
  0073  MOVE      R12 = R0
  0074  LOADBOOL  R13 = false
  0075  SETLIST   setlist R11[B=1,C=2]
  0076  RETURN    return R10..R9
  0077  TFORCALL  tforcall R2
  0078  TFORLOOP  tforloop R4(sBx=-58)   -> 21
  0079  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 36-44 np=2 va=0 ms=7 code=30 consts=5 upvals=1 protos=0
    ;   K[0]='GM'
    ;   K[1]='ActivityManager'
    ;   K[2]='GetModel'
    ;   K[3]='GetState'
    ;   K[4]=nil
    ;   upvals: _ENV
    ;   locals: a(0-30), b(0-30), modelA(9-23), modelB(14-23)
    0000  TEST      if not R0 then   -> -131070
    0001  JMP       (jump)   -> 24
    0002  TEST      if not R1 then   -> -131068
    0003  JMP       (jump)   -> 24
    0004  GETTABUP  R2 = _ENV[K0('GM')]
    0005  GETTABLE  R2 = R2[K1('ActivityManager')]
    0006  SELF      R3 = R2[K2('GetModel')] (self)
    0007  MOVE      R4 = R0
    0008  CALL      R2 = call(R2, 1 args, 2 rets)
    0009  GETTABUP  R3 = _ENV[K0('GM')]
    0010  GETTABLE  R3 = R3[K1('ActivityManager')]
    0011  SELF      R4 = R3[K2('GetModel')] (self)
    0012  MOVE      R5 = R0
    0013  CALL      R3 = call(R3, 1 args, 2 rets)
    0014  SELF      R5 = R2[K3('GetState')] (self)
    0015  CALL      R4 = call(R4, 1 args, 1 rets)
    0016  SELF      R6 = R3[K3('GetState')] (self)
    0017  CALL      R5 = call(R5, 1 args, 1 rets)
    0018  LT        if R1 lt R4   -> -128488
    0019  JMP       (jump)   -> 21
    0020  LOADBOOL  R4 = false
    0021  LOADBOOL  R4 = true
    0022  RETURN    return R4..R3
    0023  JMP       (jump)   -> 29
    0024  EQ        if R0 eq K4(nil)   -> -130786
    0025  JMP       (jump)   -> 27
    0026  LOADBOOL  R2 = false
    0027  LOADBOOL  R2 = true
    0028  RETURN    return R2..R1
    0029  RETURN    return R0..R-1
