# UI_Window_Discoveries_DiscoveriesChain_709.luac
; fn @DiscoveriesChain.lua  line 0-0 np=0 va=1 ms=2 code=24 consts=8 upvals=1 protos=6
;   K[0]='DiscoveriesChain'
;   K[1]='__index'
;   K[2]='Init'
;   K[3]='OnDestroy'
;   K[4]='_UpdateTitle'
;   K[5]='GetPosY'
;   K[6]='GetHeight'
;   K[7]='GetCellTb'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('DiscoveriesChain')] = R0
0002  GETTABUP  R0 = _ENV[K0('DiscoveriesChain')]
0003  GETTABUP  R1 = _ENV[K0('DiscoveriesChain')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('DiscoveriesChain')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Init')] = R1
0008  GETTABUP  R0 = _ENV[K0('DiscoveriesChain')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K3('OnDestroy')] = R1
0011  GETTABUP  R0 = _ENV[K0('DiscoveriesChain')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K4('_UpdateTitle')] = R1
0014  GETTABUP  R0 = _ENV[K0('DiscoveriesChain')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K5('GetPosY')] = R1
0017  GETTABUP  R0 = _ENV[K0('DiscoveriesChain')]
0018  CLOSURE   R1 = closure proto4
0019  SETTABLE  R0[K6('GetHeight')] = R1
0020  GETTABUP  R0 = _ENV[K0('DiscoveriesChain')]
0021  CLOSURE   R1 = closure proto5
0022  SETTABLE  R0[K7('GetCellTb')] = R1
0023  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 9-36 np=4 va=0 ms=16 code=98 consts=35 upvals=1 protos=0
  ;   K[0]='m_list'
  ;   K[1]='m_transform'
  ;   K[2]='gameObject'
  ;   K[3]='transform'
  ;   K[4]='m_bookOrderId'
  ;   K[5]='m_title'
  ;   K[6]='GM'
  ;   K[7]='GameTextModel'
  ;   K[8]='GetText'
  ;   K[9]='chain_'
  ;   K[10]='_name'
  ;   K[11]='ItemDataModel'
  ;   K[12]='GetDiscoveriesItemsByOrder'
  ;   K[13]=1
  ;   K[14]='GameObject'
  ;   K[15]='Instantiate'
  ;   K[16]='m_item'
  ;   K[17]='m_content'
  ;   K[18]='GetLuaTable'
  ;   K[19]='SetActive'
  ;   K[20]='Init'
  ;   K[21]=4
  ;   K[22]=0
  ;   K[23]='sizeDelta'
  ;   K[24]='Vector2'
  ;   K[25]='x'
  ;   K[26]='math'
  ;   K[27]='ceil'
  ;   K[28]=189
  ;   K[29]=75
  ;   K[30]='_UpdateTitle'
  ;   K[31]='EventDispatcher'
  ;   K[32]='AddListener'
  ;   K[33]='EEventType'
  ;   K[34]='DiscoveriesUpdate'
  ;   upvals: _ENV
  ;   locals: self(0-98), id(0-98), title(0-98), index(0-98), items(23-98), count(24-98), (for index)(27-62), (for limit)(27-62), (for step)(27-62), i(28-61), go(37-41), (for index)(66-74), (for limit)(66-74), (for step)(66-74), i(67-73)
  0000  GETTABLE  R4 = R0[K0('m_list')]
  0001  TEST      if not R4 then   -> -131068
  0002  JMP       (jump)   -> 8
  0003  NEWTABLE  R4 = {} (0 items)
  0004  SETTABLE  R0[K0('m_list')] = R4
  0005  GETTABLE  R4 = R0[K2('gameObject')]
  0006  GETTABLE  R4 = R4[K3('transform')]
  0007  SETTABLE  R0[K1('m_transform')] = R4
  0008  SETTABLE  R0[K4('m_bookOrderId')] = R1
  0009  GETTABUP  R4 = _ENV[K6('GM')]
  0010  GETTABLE  R4 = R4[K7('GameTextModel')]
  0011  SELF      R5 = R4[K8('GetText')] (self)
  0012  LOADK     R6 = K9 'chain_'
  0013  MOVE      R7 = R0
  0014  LOADK     R8 = K10 '_name'
  0015  CONCAT    R6 = concat(R6..R6)
  0016  CALL      R4 = call(R4, 1 args, 2 rets)
  0017  SETTABLE  R0[K5('m_title')] = R4
  0018  GETTABUP  R4 = _ENV[K6('GM')]
  0019  GETTABLE  R4 = R4[K11('ItemDataModel')]
  0020  SELF      R5 = R4[K12('GetDiscoveriesItemsByOrder')] (self)
  0021  MOVE      R6 = R0
  0022  CALL      R4 = call(R4, 1 args, 2 rets)
  0023  LEN       R5 = len R0
  0024  LOADK     R6 = K13 1
  0025  MOVE      R7 = R0
  0026  LOADK     R8 = K13 1
  0027  FORPREP   forprep R6(sBx=33)   -> 61
  0028  GETTABLE  R10 = R0[K0('m_list')]
  0029  GETTABLE  R10 = R10[R9]
  0030  TEST      if not R10 then   -> -131039
  0031  JMP       (jump)   -> 41
  0032  GETTABUP  R10 = _ENV[K14('GameObject')]
  0033  GETTABLE  R10 = R10[K15('Instantiate')]
  0034  GETTABLE  R11 = R0[K16('m_item')]
  0035  GETTABLE  R12 = R0[K17('m_content')]
  0036  CALL      R10 = call(R10, 1 args, 2 rets)
  0037  GETTABLE  R11 = R0[K0('m_list')]
  0038  SELF      R13 = R10[K18('GetLuaTable')] (self)
  0039  CALL      R12 = call(R12, 1 args, 1 rets)
  0040  SETTABLE  R11[R9] = R12
  0041  GETTABLE  R10 = R0[K0('m_list')]
  0042  GETTABLE  R10 = R10[R9]
  0043  GETTABLE  R10 = R10[K2('gameObject')]
  0044  SELF      R11 = R10[K19('SetActive')] (self)
  0045  LOADBOOL  R12 = true
  0046  CALL      R10 = call(R10, 0 args, 2 rets)
  0047  GETTABLE  R10 = R0[K0('m_list')]
  0048  GETTABLE  R10 = R10[R9]
  0049  SELF      R11 = R10[K20('Init')] (self)
  0050  GETTABLE  R12 = R0[K4('m_bookOrderId')]
  0051  MOVE      R13 = R0
  0052  GETTABLE  R14 = R4[R9]
  0053  MOD       R15 = K21(4) mod R9
  0054  EQ        if R1 eq K22(0)   -> -123058
  0055  JMP       (jump)   -> 58
  0056  EQ        if R0 eq R5   -> -126401
  0057  JMP       (jump)   -> 59
  0058  LOADBOOL  R15 = false
  0059  LOADBOOL  R15 = true
  0060  CALL      R10 = call(R10, 0 args, 5 rets)
  0061  FORLOOP   forloop R6(sBx=-34)   -> 28
  0062  ADD       R6 = K13(1) add R5
  0063  GETTABLE  R7 = R0[K0('m_list')]
  0064  LEN       R7 = len R0
  0065  LOADK     R8 = K13 1
  0066  FORPREP   forprep R6(sBx=6)   -> 73
  0067  GETTABLE  R10 = R0[K0('m_list')]
  0068  GETTABLE  R10 = R10[R9]
  0069  GETTABLE  R10 = R10[K2('gameObject')]
  0070  SELF      R11 = R10[K19('SetActive')] (self)
  0071  LOADBOOL  R12 = false
  0072  CALL      R10 = call(R10, 0 args, 2 rets)
  0073  FORLOOP   forloop R6(sBx=-7)   -> 67
  0074  GETTABLE  R6 = R0[K1('m_transform')]
  0075  GETTABUP  R7 = _ENV[K24('Vector2')]
  0076  GETTABLE  R8 = R0[K1('m_transform')]
  0077  GETTABLE  R8 = R8[K23('sizeDelta')]
  0078  GETTABLE  R8 = R8[K25('x')]
  0079  GETTABUP  R9 = _ENV[K26('math')]
  0080  GETTABLE  R9 = R9[K27('ceil')]
  0081  DIV       R10 = K21(4) div R5
  0082  CALL      R9 = call(R9, 1 args, 1 rets)
  0083  MUL       R9 = K28(189) mul R9
  0084  ADD       R9 = R9 add K29(75)
  0085  CALL      R7 = call(R7, 1 args, 2 rets)
  0086  SETTABLE  R6[K23('sizeDelta')] = R7
  0087  SELF      R7 = R0[K30('_UpdateTitle')] (self)
  0088  CALL      R6 = call(R6, 0 args, 1 rets)
  0089  GETTABUP  R6 = _ENV[K31('EventDispatcher')]
  0090  GETTABLE  R6 = R6[K32('AddListener')]
  0091  GETTABUP  R7 = _ENV[K33('EEventType')]
  0092  GETTABLE  R7 = R7[K34('DiscoveriesUpdate')]
  0093  MOVE      R8 = R0
  0094  GETTABLE  R9 = R0[K30('_UpdateTitle')]
  0095  LOADBOOL  R10 = true
  0096  CALL      R6 = call(R6, 0 args, 4 rets)
  0097  RETURN    return R0..R-1
; ---------- proto1 [OnDestroy] ----------
  ; fn ?  line 38-40 np=1 va=0 ms=3 code=5 consts=2 upvals=1 protos=0
  ;   K[0]='EventDispatcher'
  ;   K[1]='RemoveTarget'
  ;   upvals: _ENV
  ;   locals: self(0-5)
  0000  GETTABUP  R1 = _ENV[K0('EventDispatcher')]
  0001  GETTABLE  R1 = R1[K1('RemoveTarget')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  RETURN    return R0..R-1
; ---------- proto2 [_UpdateTitle] ----------
  ; fn ?  line 42-54 np=1 va=0 ms=11 code=32 consts=15 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ItemDataModel'
  ;   K[2]='GetDiscoveriesItemsByOrder'
  ;   K[3]='m_bookOrderId'
  ;   K[4]=0
  ;   K[5]=1
  ;   K[6]='GetUnlockState'
  ;   K[7]='EItemUnlockState'
  ;   K[8]='Rewarded'
  ;   K[9]='m_name'
  ;   K[10]='text'
  ;   K[11]='m_title'
  ;   K[12]=' ('
  ;   K[13]='/'
  ;   K[14]=')'
  ;   upvals: _ENV
  ;   locals: self(0-32), items(5-32), count(6-32), num(7-32), (for index)(10-22), (for limit)(10-22), (for step)(10-22), i(11-21)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('ItemDataModel')]
  0002  SELF      R2 = R1[K2('GetDiscoveriesItemsByOrder')] (self)
  0003  GETTABLE  R3 = R0[K3('m_bookOrderId')]
  0004  CALL      R1 = call(R1, 1 args, 2 rets)
  0005  LEN       R2 = len R0
  0006  LOADK     R3 = K4 0
  0007  LOADK     R4 = K5 1
  0008  MOVE      R5 = R0
  0009  LOADK     R6 = K5 1
  0010  FORPREP   forprep R4(sBx=10)   -> 21
  0011  GETTABUP  R8 = _ENV[K0('GM')]
  0012  GETTABLE  R8 = R8[K1('ItemDataModel')]
  0013  SELF      R9 = R8[K6('GetUnlockState')] (self)
  0014  GETTABLE  R10 = R1[R7]
  0015  CALL      R8 = call(R8, 1 args, 2 rets)
  0016  GETTABUP  R9 = _ENV[K7('EItemUnlockState')]
  0017  GETTABLE  R9 = R9[K8('Rewarded')]
  0018  EQ        if R0 eq R9   -> -126947
  0019  JMP       (jump)   -> 21
  0020  ADD       R3 = K5(1) add R3
  0021  FORLOOP   forloop R4(sBx=-11)   -> 11
  0022  GETTABLE  R4 = R0[K9('m_name')]
  0023  GETTABLE  R5 = R0[K11('m_title')]
  0024  LOADK     R6 = K12 ' ('
  0025  MOVE      R7 = R0
  0026  LOADK     R8 = K13 '/'
  0027  MOVE      R9 = R0
  0028  LOADK     R10 = K14 ')'
  0029  CONCAT    R5 = concat(R5..R5)
  0030  SETTABLE  R4[K10('text')] = R5
  0031  RETURN    return R0..R-1
; ---------- proto3 [GetPosY] ----------
  ; fn ?  line 56-58 np=1 va=0 ms=2 code=6 consts=3 upvals=0 protos=0
  ;   K[0]='m_transform'
  ;   K[1]='localPosition'
  ;   K[2]='y'
  ;   locals: self(0-6)
  0000  GETTABLE  R1 = R0[K0('m_transform')]
  0001  GETTABLE  R1 = R1[K1('localPosition')]
  0002  GETTABLE  R1 = R1[K2('y')]
  0003  UNM       R1 = unm R0
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
; ---------- proto4 [GetHeight] ----------
  ; fn ?  line 60-62 np=1 va=0 ms=2 code=5 consts=3 upvals=0 protos=0
  ;   K[0]='m_transform'
  ;   K[1]='rect'
  ;   K[2]='height'
  ;   locals: self(0-5)
  0000  GETTABLE  R1 = R0[K0('m_transform')]
  0001  GETTABLE  R1 = R1[K1('rect')]
  0002  GETTABLE  R1 = R1[K2('height')]
  0003  RETURN    return R1..R0
  0004  RETURN    return R0..R-1
; ---------- proto5 [GetCellTb] ----------
  ; fn ?  line 64-66 np=2 va=0 ms=3 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='m_list'
  ;   locals: self(0-4), index(0-4)
  0000  GETTABLE  R2 = R0[K0('m_list')]
  0001  GETTABLE  R2 = R2[R1]
  0002  RETURN    return R2..R1
  0003  RETURN    return R0..R-1
