# PassActivity_Common_View_PassActivityViewHelper_825.luac
; fn @PassActivityViewHelper.lua  line 0-0 np=0 va=1 ms=2 code=18 consts=7 upvals=1 protos=5
;   K[0]='PassActivityViewHelper'
;   K[1]='SetViewChain'
;   K[2]='ContinueViewChain'
;   K[3]='PassActivityViewHelper'
;   K[4]='TryGiveExtraRewards'
;   K[5]='ContinueEndChain'
;   K[6]='OpenBuyTicketWindow'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('PassActivityViewHelper')] = R0
0002  GETTABUP  R0 = _ENV[K0('PassActivityViewHelper')]
0003  CLOSURE   R1 = closure proto0
0004  SETTABLE  R0[K1('SetViewChain')] = R1
0005  GETTABUP  R0 = _ENV[K0('PassActivityViewHelper')]
0006  CLOSURE   R1 = closure proto1
0007  SETTABLE  R0[K2('ContinueViewChain')] = R1
0008  GETTABUP  R0 = _ENV[K3('PassActivityViewHelper')]
0009  CLOSURE   R1 = closure proto2
0010  SETTABLE  R0[K4('TryGiveExtraRewards')] = R1
0011  GETTABUP  R0 = _ENV[K3('PassActivityViewHelper')]
0012  CLOSURE   R1 = closure proto3
0013  SETTABLE  R0[K5('ContinueEndChain')] = R1
0014  GETTABUP  R0 = _ENV[K3('PassActivityViewHelper')]
0015  CLOSURE   R1 = closure proto4
0016  SETTABLE  R0[K6('OpenBuyTicketWindow')] = R1
0017  RETURN    return R0..R-1
; ---------- proto0 [SetViewChain] ----------
  ; fn ?  line 5-7 np=1 va=0 ms=2 code=3 consts=2 upvals=1 protos=0
  ;   K[0]='PassActivityViewHelper'
  ;   K[1]='s_showMainWindow'
  ;   upvals: _ENV
  ;   locals: showMainWindow(0-3)
  0000  GETTABUP  R1 = _ENV[K0('PassActivityViewHelper')]
  0001  SETTABLE  R1[K1('s_showMainWindow')] = R0
  0002  RETURN    return R0..R-1
; ---------- proto1 [ContinueViewChain] ----------
  ; fn ?  line 9-37 np=1 va=0 ms=8 code=50 consts=18 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ActivityManager'
  ;   K[2]='GetModel'
  ;   K[3]='GetState'
  ;   K[4]='ActivityState'
  ;   K[5]='Started'
  ;   K[6]='PassActivityDefinition'
  ;   K[7]='PassActivityViewHelper'
  ;   K[8]='s_showMainWindow'
  ;   K[9]='CanOpenBuyTicketPopupWindow'
  ;   K[10]='UIManager'
  ;   K[11]='OpenView'
  ;   K[12]='BuyTicketPopupWindowPrefabName'
  ;   K[13]='GetOpenedViewByName'
  ;   K[14]='MainWindowPrefabName'
  ;   K[15]=nil
  ;   K[16]='OnGetFocus'
  ;   K[17]='TryGiveExtraRewards'
  ;   upvals: _ENV
  ;   locals: activityType(0-50), model(5-50), activityDefinition(14-50), mainWindow(34-45)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('ActivityManager')]
  0002  SELF      R2 = R1[K2('GetModel')] (self)
  0003  MOVE      R3 = R0
  0004  CALL      R1 = call(R1, 1 args, 2 rets)
  0005  SELF      R3 = R1[K3('GetState')] (self)
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  GETTABUP  R3 = _ENV[K4('ActivityState')]
  0008  GETTABLE  R3 = R3[K5('Started')]
  0009  EQ        if R1 eq R3   -> -130034
  0010  JMP       (jump)   -> 12
  0011  RETURN    return R0..R-1
  0012  GETTABUP  R2 = _ENV[K6('PassActivityDefinition')]
  0013  GETTABLE  R2 = R2[R0]
  0014  GETTABUP  R3 = _ENV[K7('PassActivityViewHelper')]
  0015  GETTABLE  R3 = R3[K8('s_showMainWindow')]
  0016  TEST      if not R3 then   -> -131054
  0017  JMP       (jump)   -> 45
  0018  SELF      R4 = R1[K9('CanOpenBuyTicketPopupWindow')] (self)
  0019  CALL      R3 = call(R3, 1 args, 1 rets)
  0020  TEST      if not R3 then   -> -131050
  0021  JMP       (jump)   -> 29
  0022  GETTABUP  R3 = _ENV[K0('GM')]
  0023  GETTABLE  R3 = R3[K10('UIManager')]
  0024  SELF      R4 = R3[K11('OpenView')] (self)
  0025  GETTABLE  R5 = R2[K12('BuyTicketPopupWindowPrefabName')]
  0026  MOVE      R6 = R0
  0027  CALL      R3 = call(R3, 0 args, 3 rets)
  0028  RETURN    return R0..R-1
  0029  GETTABUP  R3 = _ENV[K0('GM')]
  0030  GETTABLE  R3 = R3[K10('UIManager')]
  0031  SELF      R4 = R3[K13('GetOpenedViewByName')] (self)
  0032  GETTABLE  R5 = R2[K14('MainWindowPrefabName')]
  0033  CALL      R3 = call(R3, 1 args, 2 rets)
  0034  EQ        if R0 eq K15(nil)   -> -129229
  0035  JMP       (jump)   -> 43
  0036  GETTABUP  R4 = _ENV[K0('GM')]
  0037  GETTABLE  R4 = R4[K10('UIManager')]
  0038  SELF      R5 = R4[K11('OpenView')] (self)
  0039  GETTABLE  R6 = R2[K14('MainWindowPrefabName')]
  0040  MOVE      R7 = R0
  0041  CALL      R4 = call(R4, 0 args, 3 rets)
  0042  JMP       (jump)   -> 45
  0043  SELF      R5 = R3[K16('OnGetFocus')] (self)
  0044  CALL      R4 = call(R4, 0 args, 1 rets)
  0045  GETTABUP  R3 = _ENV[K7('PassActivityViewHelper')]
  0046  GETTABLE  R3 = R3[K17('TryGiveExtraRewards')]
  0047  MOVE      R4 = R0
  0048  CALL      R3 = call(R3, 0 args, 1 rets)
  0049  RETURN    return R0..R-1
; ---------- proto2 [TryGiveExtraRewards] ----------
  ; fn ?  line 39-47 np=1 va=0 ms=4 code=11 consts=5 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='UIManager'
  ;   K[2]='GetOpenedViewByName'
  ;   K[3]='MainWindowPrefabName'
  ;   K[4]='TryClaimExtraRewards'
  ;   upvals: _ENV
  ;   locals: activityDefinition(0-11), mainWindow(5-11)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('UIManager')]
  0002  SELF      R2 = R1[K2('GetOpenedViewByName')] (self)
  0003  GETTABLE  R3 = R0[K3('MainWindowPrefabName')]
  0004  CALL      R1 = call(R1, 1 args, 2 rets)
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 8
  0007  RETURN    return R0..R-1
  0008  SELF      R3 = R1[K4('TryClaimExtraRewards')] (self)
  0009  CALL      R2 = call(R2, 0 args, 1 rets)
  0010  RETURN    return R0..R-1
; ---------- proto3 [ContinueEndChain] ----------
  ; fn ?  line 49-66 np=1 va=0 ms=9 code=38 consts=14 upvals=1 protos=0
  ;   K[0]='PassActivityDefinition'
  ;   K[1]='GM'
  ;   K[2]='ActivityManager'
  ;   K[3]='GetModel'
  ;   K[4]='GetState'
  ;   K[5]='ActivityState'
  ;   K[6]='Released'
  ;   K[7]='CanOpenBuyTicketPopupWindow'
  ;   K[8]='UIManager'
  ;   K[9]='OpenView'
  ;   K[10]='BuyTicketPopupWindowPrefabName'
  ;   K[11]='GetCanTakeRewards'
  ;   K[12]=0
  ;   K[13]='RewardRecoverWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: activityType(0-38), activityDefinition(2-38), model(7-38), canTakeRewards(27-38)
  0000  GETTABUP  R1 = _ENV[K0('PassActivityDefinition')]
  0001  GETTABLE  R1 = R1[R0]
  0002  GETTABUP  R2 = _ENV[K1('GM')]
  0003  GETTABLE  R2 = R2[K2('ActivityManager')]
  0004  SELF      R3 = R2[K3('GetModel')] (self)
  0005  MOVE      R4 = R0
  0006  CALL      R2 = call(R2, 1 args, 2 rets)
  0007  SELF      R4 = R2[K4('GetState')] (self)
  0008  CALL      R3 = call(R3, 1 args, 1 rets)
  0009  GETTABUP  R4 = _ENV[K5('ActivityState')]
  0010  GETTABLE  R4 = R4[K6('Released')]
  0011  EQ        if R0 eq R4   -> -129519
  0012  JMP       (jump)   -> 14
  0013  RETURN    return R0..R-1
  0014  SELF      R4 = R2[K7('CanOpenBuyTicketPopupWindow')] (self)
  0015  CALL      R3 = call(R3, 1 args, 1 rets)
  0016  TEST      if not R3 then   -> -131054
  0017  JMP       (jump)   -> 25
  0018  GETTABUP  R3 = _ENV[K1('GM')]
  0019  GETTABLE  R3 = R3[K8('UIManager')]
  0020  SELF      R4 = R3[K9('OpenView')] (self)
  0021  GETTABLE  R5 = R1[K10('BuyTicketPopupWindowPrefabName')]
  0022  MOVE      R6 = R0
  0023  CALL      R3 = call(R3, 0 args, 3 rets)
  0024  RETURN    return R0..R-1
  0025  SELF      R4 = R2[K11('GetCanTakeRewards')] (self)
  0026  CALL      R3 = call(R3, 1 args, 1 rets)
  0027  LEN       R4 = len R0
  0028  EQ        if R1 eq K12(0)   -> -128726
  0029  JMP       (jump)   -> 37
  0030  GETTABUP  R4 = _ENV[K1('GM')]
  0031  GETTABLE  R4 = R4[K8('UIManager')]
  0032  SELF      R5 = R4[K9('OpenView')] (self)
  0033  GETTABLE  R6 = R1[K13('RewardRecoverWindowPrefabName')]
  0034  MOVE      R7 = R0
  0035  MOVE      R8 = R0
  0036  CALL      R4 = call(R4, 0 args, 4 rets)
  0037  RETURN    return R0..R-1
; ---------- proto4 [OpenBuyTicketWindow] ----------
  ; fn ?  line 68-79 np=3 va=0 ms=12 code=39 consts=12 upvals=1 protos=0
  ;   K[0]='PassActivityDefinition'
  ;   K[1]='GM'
  ;   K[2]='ActivityManager'
  ;   K[3]='GetModel'
  ;   K[4]=nil
  ;   K[5]='CanBuyMaxTicket'
  ;   K[6]='GetBuyTicketWindowByCurState'
  ;   K[7]='StringUtil'
  ;   K[8]='IsNilOrEmpty'
  ;   K[9]='UIManager'
  ;   K[10]='OpenView'
  ;   K[11]='BuyTicketWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: activityType(0-39), ext(0-39), callback(0-39), activityDefinition(2-39), activityModel(7-39), viewName(15-29)
  0000  GETTABUP  R3 = _ENV[K0('PassActivityDefinition')]
  0001  GETTABLE  R3 = R3[R0]
  0002  GETTABUP  R4 = _ENV[K1('GM')]
  0003  GETTABLE  R4 = R4[K2('ActivityManager')]
  0004  SELF      R5 = R4[K3('GetModel')] (self)
  0005  MOVE      R6 = R0
  0006  CALL      R4 = call(R4, 1 args, 2 rets)
  0007  EQ        if R1 eq K4(nil)   -> -128755
  0008  JMP       (jump)   -> 30
  0009  SELF      R6 = R4[K5('CanBuyMaxTicket')] (self)
  0010  CALL      R5 = call(R5, 1 args, 1 rets)
  0011  TEST      if not R5 then   -> -131059
  0012  JMP       (jump)   -> 30
  0013  SELF      R6 = R4[K6('GetBuyTicketWindowByCurState')] (self)
  0014  CALL      R5 = call(R5, 1 args, 1 rets)
  0015  GETTABUP  R6 = _ENV[K7('StringUtil')]
  0016  GETTABLE  R6 = R6[K8('IsNilOrEmpty')]
  0017  MOVE      R7 = R0
  0018  CALL      R6 = call(R6, 1 args, 1 rets)
  0019  TEST      if not R6 then   -> -131050
  0020  JMP       (jump)   -> 38
  0021  GETTABUP  R6 = _ENV[K1('GM')]
  0022  GETTABLE  R6 = R6[K9('UIManager')]
  0023  SELF      R7 = R6[K10('OpenView')] (self)
  0024  MOVE      R8 = R0
  0025  MOVE      R9 = R0
  0026  MOVE      R10 = R0
  0027  MOVE      R11 = R0
  0028  CALL      R6 = call(R6, 0 args, 5 rets)
  0029  JMP       (jump)   -> 38
  0030  GETTABUP  R5 = _ENV[K1('GM')]
  0031  GETTABLE  R5 = R5[K9('UIManager')]
  0032  SELF      R6 = R5[K10('OpenView')] (self)
  0033  GETTABLE  R7 = R3[K11('BuyTicketWindowPrefabName')]
  0034  MOVE      R8 = R0
  0035  MOVE      R9 = R0
  0036  MOVE      R10 = R0
  0037  CALL      R5 = call(R5, 0 args, 5 rets)
  0038  RETURN    return R0..R-1
