# BakeOut_View_BakeOutRankCell_864.luac
; fn @BakeOutRankCell.lua  line 0-0 np=0 va=1 ms=3 code=37 consts=16 upvals=1 protos=7
;   K[0]='BakeOutRankCell'
;   K[1]='__index'
;   K[2]=1
;   K[3]='ImageFileConfigName'
;   K[4]='medal_bg1'
;   K[5]=2
;   K[6]='medal_bg2'
;   K[7]=3
;   K[8]='medal_bg3'
;   K[9]='Awake'
;   K[10]='OnDestroy'
;   K[11]='_OnChangeProfile'
;   K[12]='UpdateContent'
;   K[13]='UpdateRank'
;   K[14]='GetRank'
;   K[15]='GetPadding'
;   upvals: _ENV
;   locals: mapMedalImageName(15-37)
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('BakeOutRankCell')] = R0
0002  GETTABUP  R0 = _ENV[K0('BakeOutRankCell')]
0003  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  NEWTABLE  R0 = {} (0 items)
0006  GETTABUP  R1 = _ENV[K3('ImageFileConfigName')]
0007  GETTABLE  R1 = R1[K4('medal_bg1')]
0008  SETTABLE  R0[K2(1)] = R1
0009  GETTABUP  R1 = _ENV[K3('ImageFileConfigName')]
0010  GETTABLE  R1 = R1[K6('medal_bg2')]
0011  SETTABLE  R0[K5(2)] = R1
0012  GETTABUP  R1 = _ENV[K3('ImageFileConfigName')]
0013  GETTABLE  R1 = R1[K8('medal_bg3')]
0014  SETTABLE  R0[K7(3)] = R1
0015  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0016  CLOSURE   R2 = closure proto0
0017  SETTABLE  R1[K9('Awake')] = R2
0018  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0019  CLOSURE   R2 = closure proto1
0020  SETTABLE  R1[K10('OnDestroy')] = R2
0021  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0022  CLOSURE   R2 = closure proto2
0023  SETTABLE  R1[K11('_OnChangeProfile')] = R2
0024  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0025  CLOSURE   R2 = closure proto3
0026  SETTABLE  R1[K12('UpdateContent')] = R2
0027  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0028  CLOSURE   R2 = closure proto4
0029  SETTABLE  R1[K13('UpdateRank')] = R2
0030  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0031  CLOSURE   R2 = closure proto5
0032  SETTABLE  R1[K14('GetRank')] = R2
0033  GETTABUP  R1 = _ENV[K0('BakeOutRankCell')]
0034  CLOSURE   R2 = closure proto6
0035  SETTABLE  R1[K15('GetPadding')] = R2
0036  RETURN    return R0..R-1
; ---------- proto0 [Awake] ----------
  ; fn ?  line 11-13 np=1 va=0 ms=5 code=8 consts=5 upvals=1 protos=0
  ;   K[0]='EventDispatcher'
  ;   K[1]='AddListener'
  ;   K[2]='EEventType'
  ;   K[3]='UpdateProfile'
  ;   K[4]='_OnChangeProfile'
  ;   upvals: _ENV
  ;   locals: self(0-8)
  0000  GETTABUP  R1 = _ENV[K0('EventDispatcher')]
  0001  GETTABLE  R1 = R1[K1('AddListener')]
  0002  GETTABUP  R2 = _ENV[K2('EEventType')]
  0003  GETTABLE  R2 = R2[K3('UpdateProfile')]
  0004  MOVE      R3 = R0
  0005  GETTABLE  R4 = R0[K4('_OnChangeProfile')]
  0006  CALL      R1 = call(R1, 0 args, 3 rets)
  0007  RETURN    return R0..R-1
; ---------- proto1 [OnDestroy] ----------
  ; fn ?  line 15-17 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 [_OnChangeProfile] ----------
  ; fn ?  line 19-26 np=1 va=0 ms=7 code=28 consts=17 upvals=1 protos=0
  ;   K[0]='m_userId'
  ;   K[1]='GM'
  ;   K[2]='UserModel'
  ;   K[3]='GetUserId'
  ;   K[4]='ActivityManager'
  ;   K[5]='GetModel'
  ;   K[6]='ActivityType'
  ;   K[7]='BakeOut'
  ;   K[8]='m_nameText'
  ;   K[9]='text'
  ;   K[10]='StringUtil'
  ;   K[11]='GetPlayerNameWithLimit'
  ;   K[12]='UserProfileModel'
  ;   K[13]='GetName'
  ;   K[14]=8
  ;   K[15]='m_userAvatar'
  ;   K[16]='SetMySelf'
  ;   upvals: _ENV
  ;   locals: self(0-28), bakeOutModel(13-27)
  0000  GETTABLE  R1 = R0[K0('m_userId')]
  0001  GETTABUP  R2 = _ENV[K1('GM')]
  0002  GETTABLE  R2 = R2[K2('UserModel')]
  0003  SELF      R3 = R2[K3('GetUserId')] (self)
  0004  CALL      R2 = call(R2, 1 args, 1 rets)
  0005  EQ        if R0 eq R2   -> -130551
  0006  JMP       (jump)   -> 27
  0007  GETTABUP  R1 = _ENV[K1('GM')]
  0008  GETTABLE  R1 = R1[K4('ActivityManager')]
  0009  SELF      R2 = R1[K5('GetModel')] (self)
  0010  GETTABUP  R3 = _ENV[K6('ActivityType')]
  0011  GETTABLE  R3 = R3[K7('BakeOut')]
  0012  CALL      R1 = call(R1, 1 args, 2 rets)
  0013  GETTABLE  R2 = R0[K8('m_nameText')]
  0014  GETTABUP  R3 = _ENV[K10('StringUtil')]
  0015  GETTABLE  R3 = R3[K11('GetPlayerNameWithLimit')]
  0016  GETTABUP  R4 = _ENV[K1('GM')]
  0017  GETTABLE  R4 = R4[K12('UserProfileModel')]
  0018  SELF      R5 = R4[K13('GetName')] (self)
  0019  CALL      R4 = call(R4, 1 args, 1 rets)
  0020  GETTABLE  R5 = R0[K0('m_userId')]
  0021  LOADK     R6 = K14 8
  0022  CALL      R3 = call(R3, 1 args, 3 rets)
  0023  SETTABLE  R2[K9('text')] = R3
  0024  GETTABLE  R2 = R0[K15('m_userAvatar')]
  0025  SELF      R3 = R2[K16('SetMySelf')] (self)
  0026  CALL      R2 = call(R2, 0 args, 1 rets)
  0027  RETURN    return R0..R-1
; ---------- proto3 [UpdateContent] ----------
  ; fn ?  line 28-54 np=4 va=0 ms=13 code=87 consts=38 upvals=2 protos=0
  ;   K[0]='m_window'
  ;   K[1]='m_userId'
  ;   K[2]='userid'
  ;   K[3]='rank'
  ;   K[4]='m_curRank'
  ;   K[5]='m_rankText'
  ;   K[6]='text'
  ;   K[7]=nil
  ;   K[8]='m_rankImg'
  ;   K[9]='gameObject'
  ;   K[10]='SetActive'
  ;   K[11]='SpriteUtil'
  ;   K[12]='SetImage'
  ;   K[13]='m_userAvatar'
  ;   K[14]='SetAvatar'
  ;   K[15]='EAvatarFrame'
  ;   K[16]='Normal'
  ;   K[17]='icon'
  ;   K[18]='badge'
  ;   K[19]='icon_frame'
  ;   K[20]='GM'
  ;   K[21]='UserModel'
  ;   K[22]='GetUserId'
  ;   K[23]='ActivityManager'
  ;   K[24]='GetModel'
  ;   K[25]='ActivityType'
  ;   K[26]='BakeOut'
  ;   K[27]='m_nameText'
  ;   K[28]='StringUtil'
  ;   K[29]='GetPlayerNameWithLimit'
  ;   K[30]='name'
  ;   K[31]=8
  ;   K[32]='m_tokenText'
  ;   K[33]='score'
  ;   K[34]='GetRankReward'
  ;   K[35]='m_rewardNode'
  ;   K[36]='UpdateContent'
  ;   K[37]='rewards'
  ;   upvals: mapMedalImageName, _ENV
  ;   locals: self(0-87), rankData(0-87), force(0-87), window(0-87), bakeOutModel(59-86), reward(75-86)
  0000  SETTABLE  R0[K0('m_window')] = R3
  0001  GETTABLE  R4 = R1[K2('userid')]
  0002  SETTABLE  R0[K1('m_userId')] = R4
  0003  TEST      if not R2 then   -> -131066
  0004  JMP       (jump)   -> 9
  0005  GETTABLE  R4 = R1[K3('rank')]
  0006  GETTABLE  R5 = R0[K4('m_curRank')]
  0007  EQ        if R1 eq R5   -> -129010
  0008  JMP       (jump)   -> 86
  0009  GETTABLE  R4 = R1[K3('rank')]
  0010  SETTABLE  R0[K4('m_curRank')] = R4
  0011  GETTABLE  R4 = R0[K5('m_rankText')]
  0012  GETTABLE  R5 = R1[K3('rank')]
  0013  SETTABLE  R4[K6('text')] = R5
  0014  GETTABLE  R4 = R1[K3('rank')]
  0015  GETTABUP  R4 = mapMedalImageName[R4]
  0016  EQ        if R1 eq K7(nil)   -> -128743
  0017  JMP       (jump)   -> 31
  0018  GETTABLE  R4 = R0[K8('m_rankImg')]
  0019  GETTABLE  R4 = R4[K9('gameObject')]
  0020  SELF      R5 = R4[K10('SetActive')] (self)
  0021  LOADBOOL  R6 = true
  0022  CALL      R4 = call(R4, 0 args, 2 rets)
  0023  GETTABUP  R4 = _ENV[K11('SpriteUtil')]
  0024  GETTABLE  R4 = R4[K12('SetImage')]
  0025  GETTABLE  R5 = R0[K8('m_rankImg')]
  0026  GETTABLE  R6 = R1[K3('rank')]
  0027  GETTABUP  R6 = mapMedalImageName[R6]
  0028  LOADBOOL  R7 = false
  0029  CALL      R4 = call(R4, 0 args, 3 rets)
  0030  JMP       (jump)   -> 36
  0031  GETTABLE  R4 = R0[K8('m_rankImg')]
  0032  GETTABLE  R4 = R4[K9('gameObject')]
  0033  SELF      R5 = R4[K10('SetActive')] (self)
  0034  LOADBOOL  R6 = false
  0035  CALL      R4 = call(R4, 0 args, 2 rets)
  0036  GETTABLE  R4 = R0[K13('m_userAvatar')]
  0037  SELF      R5 = R4[K14('SetAvatar')] (self)
  0038  GETTABUP  R6 = _ENV[K15('EAvatarFrame')]
  0039  GETTABLE  R6 = R6[K16('Normal')]
  0040  GETTABLE  R7 = R1[K17('icon')]
  0041  GETTABLE  R8 = R1[K18('badge')]
  0042  GETTABLE  R9 = R1[K19('icon_frame')]
  0043  GETTABLE  R10 = R0[K1('m_userId')]
  0044  GETTABUP  R11 = _ENV[K20('GM')]
  0045  GETTABLE  R11 = R11[K21('UserModel')]
  0046  SELF      R12 = R11[K22('GetUserId')] (self)
  0047  CALL      R11 = call(R11, 1 args, 1 rets)
  0048  EQ        if R1 eq R11   -> -125891
  0049  JMP       (jump)   -> 51
  0050  LOADBOOL  R10 = false
  0051  LOADBOOL  R10 = true
  0052  CALL      R4 = call(R4, 0 args, 6 rets)
  0053  GETTABUP  R4 = _ENV[K20('GM')]
  0054  GETTABLE  R4 = R4[K23('ActivityManager')]
  0055  SELF      R5 = R4[K24('GetModel')] (self)
  0056  GETTABUP  R6 = _ENV[K25('ActivityType')]
  0057  GETTABLE  R6 = R6[K26('BakeOut')]
  0058  CALL      R4 = call(R4, 1 args, 2 rets)
  0059  GETTABLE  R5 = R0[K27('m_nameText')]
  0060  GETTABUP  R6 = _ENV[K28('StringUtil')]
  0061  GETTABLE  R6 = R6[K29('GetPlayerNameWithLimit')]
  0062  GETTABLE  R7 = R1[K30('name')]
  0063  GETTABLE  R8 = R0[K1('m_userId')]
  0064  LOADK     R9 = K31 8
  0065  CALL      R6 = call(R6, 1 args, 3 rets)
  0066  SETTABLE  R5[K6('text')] = R6
  0067  GETTABLE  R5 = R0[K32('m_tokenText')]
  0068  GETTABLE  R6 = R1[K33('score')]
  0069  SETTABLE  R5[K6('text')] = R6
  0070  TEST      if not R4 then   -> -131000
  0071  JMP       (jump)   -> 86
  0072  SELF      R6 = R4[K34('GetRankReward')] (self)
  0073  GETTABLE  R7 = R1[K3('rank')]
  0074  CALL      R5 = call(R5, 1 args, 2 rets)
  0075  GETTABLE  R6 = R0[K35('m_rewardNode')]
  0076  SELF      R7 = R6[K36('UpdateContent')] (self)
  0077  TEST      if not R5 then   -> -130993
  0078  JMP       (jump)   -> 82
  0079  GETTABLE  R8 = R5[K37('rewards')]
  0080  TEST      if not R8 then   -> -130989
  0081  JMP       (jump)   -> 83
  0082  LOADNIL   R8..R8 = nil
  0083  GETTABLE  R9 = R1[K3('rank')]
  0084  MOVE      R10 = R0
  0085  CALL      R6 = call(R6, 0 args, 4 rets)
  0086  RETURN    return R0..R-1
; ---------- proto4 [UpdateRank] ----------
  ; fn ?  line 57-64 np=2 va=0 ms=4 code=12 consts=6 upvals=1 protos=0
  ;   K[0]=nil
  ;   K[1]='math'
  ;   K[2]='ceil'
  ;   K[3]='m_rankText'
  ;   K[4]='text'
  ;   K[5]='m_curRank'
  ;   upvals: _ENV
  ;   locals: self(0-12), rank(0-12)
  0000  EQ        if R0 eq K0(nil)   -> -130302
  0001  JMP       (jump)   -> 3
  0002  RETURN    return R0..R-1
  0003  GETTABUP  R2 = _ENV[K1('math')]
  0004  GETTABLE  R2 = R2[K2('ceil')]
  0005  MOVE      R3 = R0
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  MOVE      R1 = R0
  0008  GETTABLE  R2 = R0[K3('m_rankText')]
  0009  SETTABLE  R2[K4('text')] = R1
  0010  SETTABLE  R0[K5('m_curRank')] = R1
  0011  RETURN    return R0..R-1
; ---------- proto5 [GetRank] ----------
  ; fn ?  line 66-68 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_curRank'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_curRank')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto6 [GetPadding] ----------
  ; fn ?  line 71-73 np=1 va=0 ms=3 code=11 consts=5 upvals=0 protos=0
  ;   K[0]='gameObject'
  ;   K[1]='transform'
  ;   K[2]='sizeDelta'
  ;   K[3]='y'
  ;   K[4]='m_boardRectTrans'
  ;   locals: self(0-11)
  0000  GETTABLE  R1 = R0[K0('gameObject')]
  0001  GETTABLE  R1 = R1[K1('transform')]
  0002  GETTABLE  R1 = R1[K2('sizeDelta')]
  0003  GETTABLE  R1 = R1[K3('y')]
  0004  GETTABLE  R2 = R0[K4('m_boardRectTrans')]
  0005  GETTABLE  R2 = R2[K1('transform')]
  0006  GETTABLE  R2 = R2[K2('sizeDelta')]
  0007  GETTABLE  R2 = R2[K3('y')]
  0008  SUB       R1 = R2 sub R1
  0009  RETURN    return R1..R0
  0010  RETURN    return R0..R-1
