# AlbumActivity_View_AlbumRewardPopupHelper_1111.luac
; fn @AlbumRewardPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=29 consts=14 upvals=1 protos=4
;   K[0]='AlbumRewardPopupHelper'
;   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]='AlbumRewardPopupHelper'
;   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('AlbumRewardPopupHelper')] = R0
0013  GETTABUP  R0 = _ENV[K0('AlbumRewardPopupHelper')]
0014  GETTABUP  R1 = _ENV[K0('AlbumRewardPopupHelper')]
0015  SETTABLE  R0[K8('__index')] = R1
0016  GETTABUP  R0 = _ENV[K0('AlbumRewardPopupHelper')]
0017  CLOSURE   R1 = closure proto0
0018  SETTABLE  R0[K9('Create')] = R1
0019  GETTABUP  R0 = _ENV[K10('AlbumRewardPopupHelper')]
0020  CLOSURE   R1 = closure proto1
0021  SETTABLE  R0[K11('Init')] = R1
0022  GETTABUP  R0 = _ENV[K10('AlbumRewardPopupHelper')]
0023  CLOSURE   R1 = closure proto2
0024  SETTABLE  R0[K12('_OnStateChanged')] = R1
0025  GETTABUP  R0 = _ENV[K10('AlbumRewardPopupHelper')]
0026  CLOSURE   R1 = closure proto3
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]='AlbumRewardPopupHelper'
  ;   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('AlbumRewardPopupHelper')]
  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-19 np=1 va=0 ms=5 code=12 consts=7 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='EventDispatcher'
  ;   K[3]='AddListener'
  ;   K[4]='EEventType'
  ;   K[5]='AlbumRewardPopStateChanged'
  ;   K[6]='_OnStateChanged'
  ;   upvals: _ENV
  ;   locals: self(0-12)
  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('AlbumRewardPopStateChanged')]
  0008  MOVE      R3 = R0
  0009  GETTABLE  R4 = R0[K6('_OnStateChanged')]
  0010  CALL      R1 = call(R1, 0 args, 3 rets)
  0011  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; fn ?  line 21-24 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 26-51 np=1 va=0 ms=13 code=45 consts=15 upvals=1 protos=1
  ;   K[0]='pairs'
  ;   K[1]='AlbumActivityDefinition'
  ;   K[2]=1
  ;   K[3]='table'
  ;   K[4]='sort'
  ;   K[5]='ipairs'
  ;   K[6]='GM'
  ;   K[7]='ActivityManager'
  ;   K[8]='GetModel'
  ;   K[9]='GetState'
  ;   K[10]='ActivityState'
  ;   K[11]='Released'
  ;   K[12]='NeedPopAcquiredCardAnimWindow'
  ;   K[13]='GetPopAnimInfoAndReset'
  ;   K[14]='SkipGachaWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-45), arrType(1-45), (for generator)(4-10), (for state)(4-10), (for control)(4-10), activityType(5-8), _(5-8), activityDefinition(16-45), (for generator)(19-44), (for state)(19-44), (for control)(19-44), _(20-42), activityType(20-42), model(27-42), state(29-42), params(39-42)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  GETTABUP  R2 = _ENV[K0('pairs')]
  0002  GETTABUP  R3 = _ENV[K1('AlbumActivityDefinition')]
  0003  CALL      R2 = call(R2, 3 args, 1 rets)
  0004  JMP       (jump)   -> 8
  0005  LEN       R7 = len R0
  0006  ADD       R7 = K2(1) add R7
  0007  SETTABLE  R1[R7] = R5
  0008  TFORCALL  tforcall R2
  0009  TFORLOOP  tforloop R4(sBx=-5)   -> 5
  0010  GETTABUP  R2 = _ENV[K3('table')]
  0011  GETTABLE  R2 = R2[K4('sort')]
  0012  MOVE      R3 = R0
  0013  CLOSURE   R4 = closure proto0
  0014  CALL      R2 = call(R2, 0 args, 2 rets)
  0015  LOADNIL   R2..R2 = nil
  0016  GETTABUP  R3 = _ENV[K5('ipairs')]
  0017  MOVE      R4 = R0
  0018  CALL      R3 = call(R3, 3 args, 1 rets)
  0019  JMP       (jump)   -> 42
  0020  GETTABUP  R8 = _ENV[K1('AlbumActivityDefinition')]
  0021  GETTABLE  R2 = R8[R7]
  0022  GETTABUP  R8 = _ENV[K6('GM')]
  0023  GETTABLE  R8 = R8[K7('ActivityManager')]
  0024  SELF      R9 = R8[K8('GetModel')] (self)
  0025  MOVE      R10 = R0
  0026  CALL      R8 = call(R8, 1 args, 2 rets)
  0027  SELF      R10 = R8[K9('GetState')] (self)
  0028  CALL      R9 = call(R9, 1 args, 1 rets)
  0029  GETTABUP  R10 = _ENV[K10('ActivityState')]
  0030  GETTABLE  R10 = R10[K11('Released')]
  0031  EQ        if R1 eq R10   -> -126421
  0032  JMP       (jump)   -> 42
  0033  SELF      R11 = R8[K12('NeedPopAcquiredCardAnimWindow')] (self)
  0034  CALL      R10 = call(R10, 1 args, 1 rets)
  0035  TEST      if not R10 then   -> -131035
  0036  JMP       (jump)   -> 42
  0037  SELF      R11 = R8[K13('GetPopAnimInfoAndReset')] (self)
  0038  CALL      R10 = call(R10, 1 args, 1 rets)
  0039  GETTABLE  R11 = R2[K14('SkipGachaWindowPrefabName')]
  0040  MOVE      R12 = R0
  0041  RETURN    return R11..R10
  0042  TFORCALL  tforcall R3
  0043  TFORLOOP  tforloop R5(sBx=-24)   -> 20
  0044  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 31-39 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
