# ExtraBoardActivity_View_ExtraBoardActivityEndWindow_1013.luac
; fn @ExtraBoardActivityEndWindow.lua  line 0-0 np=0 va=1 ms=3 code=21 consts=11 upvals=1 protos=3
;   K[0]='ExtraBoardActivityEndWindow'
;   K[1]='setmetatable'
;   K[2]='bIgnoreCloseByState'
;   K[3]=true
;   K[4]='disableEffectWhenCloseView'
;   K[5]='disableSpriteRendererWhenCloseView'
;   K[6]='ExtraBoardActivityBaseWindow'
;   K[7]='__index'
;   K[8]='BeforeOpenCheck'
;   K[9]='Init'
;   K[10]='UpdateSortingOrder'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('bIgnoreCloseByState')] = K3(true)
0003  SETTABLE  R1[K4('disableEffectWhenCloseView')] = K3(true)
0004  SETTABLE  R1[K5('disableSpriteRendererWhenCloseView')] = K3(true)
0005  GETTABUP  R2 = _ENV[K6('ExtraBoardActivityBaseWindow')]
0006  CALL      R0 = call(R0, 1 args, 2 rets)
0007  SETTABUP  _ENV[K0('ExtraBoardActivityEndWindow')] = R0
0008  GETTABUP  R0 = _ENV[K0('ExtraBoardActivityEndWindow')]
0009  GETTABUP  R1 = _ENV[K0('ExtraBoardActivityEndWindow')]
0010  SETTABLE  R0[K7('__index')] = R1
0011  GETTABUP  R0 = _ENV[K0('ExtraBoardActivityEndWindow')]
0012  CLOSURE   R1 = closure proto0
0013  SETTABLE  R0[K8('BeforeOpenCheck')] = R1
0014  GETTABUP  R0 = _ENV[K0('ExtraBoardActivityEndWindow')]
0015  CLOSURE   R1 = closure proto1
0016  SETTABLE  R0[K9('Init')] = R1
0017  GETTABUP  R0 = _ENV[K0('ExtraBoardActivityEndWindow')]
0018  CLOSURE   R1 = closure proto2
0019  SETTABLE  R0[K10('UpdateSortingOrder')] = R1
0020  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 9-18 np=1 va=0 ms=10 code=26 consts=8 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='ExtraBoardActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Ended'
  ;   upvals: _ENV
  ;   locals: self(0-26), model(1-26), (for generator)(4-23), (for state)(4-23), (for control)(4-23), activityType(5-21), _(5-21)
  0000  LOADNIL   R1..R1 = nil
  0001  GETTABUP  R2 = _ENV[K0('pairs')]
  0002  GETTABUP  R3 = _ENV[K1('ExtraBoardActivityDefinition')]
  0003  CALL      R2 = call(R2, 3 args, 1 rets)
  0004  JMP       (jump)   -> 21
  0005  GETTABUP  R7 = _ENV[K2('GM')]
  0006  GETTABLE  R7 = R7[K3('ActivityManager')]
  0007  SELF      R8 = R7[K4('GetModel')] (self)
  0008  MOVE      R9 = R0
  0009  CALL      R7 = call(R7, 1 args, 2 rets)
  0010  MOVE      R1 = R0
  0011  TEST      if not R1 then   -> -131059
  0012  JMP       (jump)   -> 21
  0013  SELF      R8 = R1[K5('GetState')] (self)
  0014  CALL      R7 = call(R7, 1 args, 1 rets)
  0015  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0016  GETTABLE  R8 = R8[K7('Ended')]
  0017  EQ        if R0 eq R8   -> -127461
  0018  JMP       (jump)   -> 21
  0019  LOADBOOL  R7 = true
  0020  RETURN    return R7..R6
  0021  TFORCALL  tforcall R2
  0022  TFORLOOP  tforloop R4(sBx=-18)   -> 5
  0023  LOADBOOL  R2 = false
  0024  RETURN    return R2..R1
  0025  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 21-35 np=3 va=0 ms=10 code=55 consts=22 upvals=1 protos=0
  ;   K[0]='ExtraBoardActivityBaseWindow'
  ;   K[1]='Init'
  ;   K[2]='m_model'
  ;   K[3]='IsMaxLevel'
  ;   K[4]='string'
  ;   K[5]='lower'
  ;   K[6]='_victory_desc'
  ;   K[7]='m_titleText'
  ;   K[8]='text'
  ;   K[9]='GM'
  ;   K[10]='GameTextModel'
  ;   K[11]='GetText'
  ;   K[12]='extraboard_victory_title'
  ;   K[13]='extraboard_fail_title'
  ;   K[14]='m_descText'
  ;   K[15]='extraboard_fail_desc'
  ;   K[16]='UIUtil'
  ;   K[17]='SetActive'
  ;   K[18]='m_victoryGo'
  ;   K[19]='m_failGo'
  ;   K[20]=nil
  ;   K[21]='UpdateSortingOrder'
  ;   upvals: _ENV
  ;   locals: self(0-55), activityType(0-55), bUserClick(0-55), bMaxLevel(9-55), prefix(13-55), victoryDesc(16-55)
  0000  GETTABUP  R3 = _ENV[K0('ExtraBoardActivityBaseWindow')]
  0001  GETTABLE  R3 = R3[K1('Init')]
  0002  MOVE      R4 = R0
  0003  MOVE      R5 = R0
  0004  MOVE      R6 = R0
  0005  CALL      R3 = call(R3, 0 args, 3 rets)
  0006  GETTABLE  R3 = R0[K2('m_model')]
  0007  SELF      R4 = R3[K3('IsMaxLevel')] (self)
  0008  CALL      R3 = call(R3, 1 args, 1 rets)
  0009  GETTABUP  R4 = _ENV[K4('string')]
  0010  GETTABLE  R4 = R4[K5('lower')]
  0011  MOVE      R5 = R0
  0012  CALL      R4 = call(R4, 1 args, 1 rets)
  0013  MOVE      R5 = R0
  0014  LOADK     R6 = K6 '_victory_desc'
  0015  CONCAT    R5 = concat(R5..R5)
  0016  GETTABLE  R6 = R0[K7('m_titleText')]
  0017  GETTABUP  R7 = _ENV[K9('GM')]
  0018  GETTABLE  R7 = R7[K10('GameTextModel')]
  0019  SELF      R8 = R7[K11('GetText')] (self)
  0020  TEST      if not R3 then   -> -131050
  0021  JMP       (jump)   -> 25
  0022  LOADK     R9 = K12 'extraboard_victory_title'
  0023  TEST      if not R9 then   -> -131046
  0024  JMP       (jump)   -> 26
  0025  LOADK     R9 = K13 'extraboard_fail_title'
  0026  CALL      R7 = call(R7, 1 args, 2 rets)
  0027  SETTABLE  R6[K8('text')] = R7
  0028  GETTABLE  R6 = R0[K14('m_descText')]
  0029  GETTABUP  R7 = _ENV[K9('GM')]
  0030  GETTABLE  R7 = R7[K10('GameTextModel')]
  0031  SELF      R8 = R7[K11('GetText')] (self)
  0032  TEST      if not R3 then   -> -131038
  0033  JMP       (jump)   -> 36
  0034  TESTSET   if R1 then R9   -> -128475
  0035  JMP       (jump)   -> 37
  0036  LOADK     R9 = K15 'extraboard_fail_desc'
  0037  CALL      R7 = call(R7, 1 args, 2 rets)
  0038  SETTABLE  R6[K8('text')] = R7
  0039  GETTABUP  R6 = _ENV[K16('UIUtil')]
  0040  GETTABLE  R6 = R6[K17('SetActive')]
  0041  GETTABLE  R7 = R0[K18('m_victoryGo')]
  0042  MOVE      R8 = R0
  0043  CALL      R6 = call(R6, 0 args, 2 rets)
  0044  GETTABLE  R6 = R0[K19('m_failGo')]
  0045  EQ        if R1 eq K20(nil)   -> -127677
  0046  JMP       (jump)   -> 52
  0047  GETTABUP  R6 = _ENV[K16('UIUtil')]
  0048  GETTABLE  R6 = R6[K17('SetActive')]
  0049  GETTABLE  R7 = R0[K19('m_failGo')]
  0050  NOT       R8 = not R0
  0051  CALL      R6 = call(R6, 0 args, 2 rets)
  0052  SELF      R7 = R0[K21('UpdateSortingOrder')] (self)
  0053  CALL      R6 = call(R6, 0 args, 1 rets)
  0054  RETURN    return R0..R-1
; ---------- proto2 [UpdateSortingOrder] ----------
  ; fn ?  line 37-48 np=1 va=0 ms=10 code=28 consts=11 upvals=1 protos=0
  ;   K[0]=3
  ;   K[1]='GetSortingOrder'
  ;   K[2]='m_contentCanvas'
  ;   K[3]='sortingOrder'
  ;   K[4]='m_victoryGo'
  ;   K[5]='GetComponentsInChildren'
  ;   K[6]='typeof'
  ;   K[7]='Renderer'
  ;   K[8]=0
  ;   K[9]='Length'
  ;   K[10]=1
  ;   upvals: _ENV
  ;   locals: self(0-28), sortingOrderLength(1-28), baseSortingOrder(3-28), arrRenderer(13-28), (for index)(17-27), (for limit)(17-27), (for step)(17-27), i(18-26)
  0000  LOADK     R1 = K0 3
  0001  SELF      R3 = R0[K1('GetSortingOrder')] (self)
  0002  CALL      R2 = call(R2, 1 args, 1 rets)
  0003  GETTABLE  R3 = R0[K2('m_contentCanvas')]
  0004  ADD       R4 = R1 add R2
  0005  SETTABLE  R3[K3('sortingOrder')] = R4
  0006  GETTABLE  R3 = R0[K4('m_victoryGo')]
  0007  SELF      R4 = R3[K5('GetComponentsInChildren')] (self)
  0008  GETTABUP  R5 = _ENV[K6('typeof')]
  0009  GETTABUP  R6 = _ENV[K7('Renderer')]
  0010  CALL      R5 = call(R5, 1 args, 1 rets)
  0011  LOADBOOL  R6 = true
  0012  CALL      R3 = call(R3, 1 args, 3 rets)
  0013  LOADK     R4 = K8 0
  0014  GETTABLE  R5 = R3[K9('Length')]
  0015  SUB       R5 = K10(1) sub R5
  0016  LOADK     R6 = K10 1
  0017  FORPREP   forprep R4(sBx=8)   -> 26
  0018  GETTABLE  R8 = R3[R7]
  0019  GETTABLE  R9 = R3[R7]
  0020  GETTABLE  R9 = R9[K3('sortingOrder')]
  0021  TEST      if not R9 then   -> -131048
  0022  JMP       (jump)   -> 24
  0023  LOADK     R9 = K8 0
  0024  ADD       R9 = R2 add R9
  0025  SETTABLE  R8[K3('sortingOrder')] = R9
  0026  FORLOOP   forloop R4(sBx=-9)   -> 18
  0027  RETURN    return R0..R-1
