# UI_Layer_LoadingLayerResourcesChecker_396.luac
; fn @LoadingLayerResourcesChecker.lua  line 0-0 np=0 va=1 ms=2 code=18 consts=7 upvals=1 protos=4
;   K[0]='LoadingLayerResourcesChecker'
;   K[1]='__index'
;   K[2]='Create'
;   K[3]='LoadingLayerResourcesChecker'
;   K[4]='_Init'
;   K[5]='CheckResources'
;   K[6]='_DownloadResources'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('LoadingLayerResourcesChecker')] = R0
0002  GETTABUP  R0 = _ENV[K0('LoadingLayerResourcesChecker')]
0003  GETTABUP  R1 = _ENV[K0('LoadingLayerResourcesChecker')]
0004  SETTABLE  R0[K1('__index')] = R1
0005  GETTABUP  R0 = _ENV[K0('LoadingLayerResourcesChecker')]
0006  CLOSURE   R1 = closure proto0
0007  SETTABLE  R0[K2('Create')] = R1
0008  GETTABUP  R0 = _ENV[K3('LoadingLayerResourcesChecker')]
0009  CLOSURE   R1 = closure proto1
0010  SETTABLE  R0[K4('_Init')] = R1
0011  GETTABUP  R0 = _ENV[K3('LoadingLayerResourcesChecker')]
0012  CLOSURE   R1 = closure proto2
0013  SETTABLE  R0[K5('CheckResources')] = R1
0014  GETTABUP  R0 = _ENV[K3('LoadingLayerResourcesChecker')]
0015  CLOSURE   R1 = closure proto3
0016  SETTABLE  R0[K6('_DownloadResources')] = R1
0017  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 6-10 np=1 va=0 ms=5 code=9 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='LoadingLayerResourcesChecker'
  ;   K[2]='_Init'
  ;   upvals: _ENV
  ;   locals: loadingLayer(0-9), instance(4-9)
  0000  GETTABUP  R1 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R2 = {} (0 items)
  0002  GETTABUP  R3 = _ENV[K1('LoadingLayerResourcesChecker')]
  0003  CALL      R1 = call(R1, 1 args, 2 rets)
  0004  SELF      R3 = R1[K2('_Init')] (self)
  0005  MOVE      R4 = R0
  0006  CALL      R2 = call(R2, 0 args, 2 rets)
  0007  RETURN    return R1..R0
  0008  RETURN    return R0..R-1
; ---------- proto1 [_Init] ----------
  ; fn ?  line 12-15 np=2 va=0 ms=3 code=5 consts=2 upvals=0 protos=0
  ;   K[0]='_loadingLayer'
  ;   K[1]='uiDisplayer'
  ;   locals: self(0-5), loadingLayer(0-5)
  0000  SETTABLE  R0[K0('_loadingLayer')] = R1
  0001  GETTABLE  R2 = R0[K0('_loadingLayer')]
  0002  GETTABLE  R2 = R2[K1('uiDisplayer')]
  0003  SETTABLE  R0[K1('uiDisplayer')] = R2
  0004  RETURN    return R0..R-1
; ---------- proto2 [CheckResources] ----------
  ; fn ?  line 17-47 np=1 va=0 ms=7 code=25 consts=13 upvals=1 protos=1
  ;   K[0]='uiDisplayer'
  ;   K[1]='SetDownloadText'
  ;   K[2]='GM'
  ;   K[3]='GameTextModel'
  ;   K[4]='GetText'
  ;   K[5]='resource_download_check_desc'
  ;   K[6]='DownloadManager'
  ;   K[7]='GetForceDownloadLabels'
  ;   K[8]='SceneManager'
  ;   K[9]='SetDownloadSize'
  ;   K[10]='GM'
  ;   K[11]='DownloadManager'
  ;   K[12]='GetDownloadSizeAsync'
  ;   upvals: _ENV
  ;   locals: self(0-25), labels(12-25), callback(18-25)
  0000  GETTABLE  R1 = R0[K0('uiDisplayer')]
  0001  SELF      R2 = R1[K1('SetDownloadText')] (self)
  0002  GETTABUP  R3 = _ENV[K2('GM')]
  0003  GETTABLE  R3 = R3[K3('GameTextModel')]
  0004  SELF      R4 = R3[K4('GetText')] (self)
  0005  LOADK     R5 = K5 'resource_download_check_desc'
  0006  CALL      R3 = call(R3, -1 args, 2 rets)
  0007  CALL      R1 = call(R1, 0 args, -1 rets)
  0008  GETTABUP  R1 = _ENV[K2('GM')]
  0009  GETTABLE  R1 = R1[K6('DownloadManager')]
  0010  SELF      R2 = R1[K7('GetForceDownloadLabels')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  GETTABUP  R2 = _ENV[K2('GM')]
  0013  GETTABLE  R2 = R2[K8('SceneManager')]
  0014  SELF      R3 = R2[K9('SetDownloadSize')] (self)
  0015  LOADNIL   R4..R4 = nil
  0016  CALL      R2 = call(R2, 0 args, 2 rets)
  0017  CLOSURE   R2 = closure proto0
  0018  GETTABUP  R3 = _ENV[K10('GM')]
  0019  GETTABLE  R3 = R3[K11('DownloadManager')]
  0020  SELF      R4 = R3[K12('GetDownloadSizeAsync')] (self)
  0021  MOVE      R5 = R0
  0022  MOVE      R6 = R0
  0023  CALL      R3 = call(R3, 0 args, 3 rets)
  0024  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 22-45 np=1 va=0 ms=10 code=51 consts=24 upvals=3 protos=2
    ;   K[0]='uiDisplayer'
    ;   K[1]='SetDownloadText'
    ;   K[2]=''
    ;   K[3]=0
    ;   K[4]='GM'
    ;   K[5]='GameModel'
    ;   K[6]='ResetSilentLoginInfo'
    ;   K[7]='SceneManager'
    ;   K[8]='SetDownloadSize'
    ;   K[9]='DownloadManager'
    ;   K[10]='IsSkipConfirmWindow'
    ;   K[11]='Application'
    ;   K[12]='internetReachability'
    ;   K[13]='NetworkReachability'
    ;   K[14]='ReachableViaCarrierDataNetwork'
    ;   K[15]='GM'
    ;   K[16]='UIManager'
    ;   K[17]='OpenView'
    ;   K[18]='UIPrefabConfigName'
    ;   K[19]='DownloadConfirmWindow'
    ;   K[20]='resource_download_confirm_quit'
    ;   K[21]='_DownloadResources'
    ;   K[22]='_loadingLayer'
    ;   K[23]='StepExecuteCallback'
    ;   upvals: self, _ENV, labels
    ;   locals: size(0-51), exitCallback(28-39), downloadCallback(29-39)
    0000  GETTABUP  R1 = self[K0('uiDisplayer')]
    0001  SELF      R2 = R1[K1('SetDownloadText')] (self)
    0002  LOADK     R3 = K2 ''
    0003  CALL      R1 = call(R1, 0 args, 2 rets)
    0004  LT        if R0 lt R0   -> 1542
    0005  JMP       (jump)   -> 46
    0006  GETTABUP  R1 = _ENV[K4('GM')]
    0007  GETTABLE  R1 = R1[K5('GameModel')]
    0008  SELF      R2 = R1[K6('ResetSilentLoginInfo')] (self)
    0009  CALL      R1 = call(R1, 0 args, 1 rets)
    0010  GETTABUP  R1 = _ENV[K4('GM')]
    0011  GETTABLE  R1 = R1[K7('SceneManager')]
    0012  SELF      R2 = R1[K8('SetDownloadSize')] (self)
    0013  MOVE      R3 = R0
    0014  CALL      R1 = call(R1, 0 args, 2 rets)
    0015  GETTABUP  R1 = _ENV[K4('GM')]
    0016  GETTABLE  R1 = R1[K9('DownloadManager')]
    0017  SELF      R2 = R1[K10('IsSkipConfirmWindow')] (self)
    0018  CALL      R1 = call(R1, 1 args, 1 rets)
    0019  TEST      if not R1 then   -> -131050
    0020  JMP       (jump)   -> 40
    0021  GETTABUP  R1 = _ENV[K11('Application')]
    0022  GETTABLE  R1 = R1[K12('internetReachability')]
    0023  GETTABUP  R2 = _ENV[K13('NetworkReachability')]
    0024  GETTABLE  R2 = R2[K14('ReachableViaCarrierDataNetwork')]
    0025  EQ        if R0 eq R2   -> -130531
    0026  JMP       (jump)   -> 40
    0027  CLOSURE   R1 = closure proto0
    0028  CLOSURE   R2 = closure proto1
    0029  GETTABUP  R3 = _ENV[K15('GM')]
    0030  GETTABLE  R3 = R3[K16('UIManager')]
    0031  SELF      R4 = R3[K17('OpenView')] (self)
    0032  GETTABUP  R5 = _ENV[K18('UIPrefabConfigName')]
    0033  GETTABLE  R5 = R5[K19('DownloadConfirmWindow')]
    0034  MOVE      R6 = R0
    0035  LOADK     R7 = K20 'resource_download_confirm_quit'
    0036  MOVE      R8 = R0
    0037  MOVE      R9 = R0
    0038  CALL      R3 = call(R3, 0 args, 6 rets)
    0039  JMP       (jump)   -> 50
    0040  GETUPVAL  R1 = self
    0041  SELF      R2 = R1[K21('_DownloadResources')] (self)
    0042  MOVE      R3 = R0
    0043  GETUPVAL  R4 = self
    0044  CALL      R1 = call(R1, 0 args, 3 rets)
    0045  JMP       (jump)   -> 50
    0046  GETTABUP  R1 = self[K22('_loadingLayer')]
    0047  GETTABLE  R1 = R1[K23('StepExecuteCallback')]
    0048  LOADBOOL  R2 = true
    0049  CALL      R1 = call(R1, 0 args, 1 rets)
    0050  RETURN    return R0..R-1
    ; ---------- proto0 [] ----------
      ; fn ?  line 32-32 np=0 va=0 ms=2 code=4 consts=2 upvals=1 protos=0
      ;   K[0]='PlatformInterface'
      ;   K[1]='ExitGame'
      ;   upvals: _ENV
      0000  GETTABUP  R0 = _ENV[K0('PlatformInterface')]
      0001  GETTABLE  R0 = R0[K1('ExitGame')]
      0002  CALL      R0 = call(R0, 0 args, 0 rets)
      0003  RETURN    return R0..R-1
    ; ---------- proto1 [] ----------
      ; fn ?  line 33-36 np=0 va=0 ms=4 code=10 consts=4 upvals=4 protos=0
      ;   K[0]='GM'
      ;   K[1]='DownloadManager'
      ;   K[2]='SetSkipConfirmWindow'
      ;   K[3]='_DownloadResources'
      ;   upvals: _ENV, self, size, labels
      0000  GETTABUP  R0 = _ENV[K0('GM')]
      0001  GETTABLE  R0 = R0[K1('DownloadManager')]
      0002  SELF      R1 = R0[K2('SetSkipConfirmWindow')] (self)
      0003  CALL      R0 = call(R0, 0 args, 1 rets)
      0004  GETUPVAL  R0 = _ENV
      0005  SELF      R1 = R0[K3('_DownloadResources')] (self)
      0006  GETUPVAL  R2 = _ENV
      0007  GETUPVAL  R3 = _ENV
      0008  CALL      R0 = call(R0, 0 args, 3 rets)
      0009  RETURN    return R0..R-1
; ---------- proto3 [_DownloadResources] ----------
  ; fn ?  line 49-73 np=3 va=0 ms=10 code=21 consts=9 upvals=1 protos=2
  ;   K[0]='uiDisplayer'
  ;   K[1]='ShowDownloadSlider'
  ;   K[2]='SetDownloadText'
  ;   K[3]='GM'
  ;   K[4]='GameTextModel'
  ;   K[5]='GetText'
  ;   K[6]='resource_download_start_desc'
  ;   K[7]='DownloadManager'
  ;   K[8]='TryDownload'
  ;   upvals: _ENV
  ;   locals: self(0-21), totalSize(0-21), labels(0-21), progressCallback(1-21), resultCallback(2-21)
  0000  CLOSURE   R3 = closure proto0
  0001  CLOSURE   R4 = closure proto1
  0002  GETTABLE  R5 = R0[K0('uiDisplayer')]
  0003  SELF      R6 = R5[K1('ShowDownloadSlider')] (self)
  0004  CALL      R5 = call(R5, 0 args, 1 rets)
  0005  GETTABLE  R5 = R0[K0('uiDisplayer')]
  0006  SELF      R6 = R5[K2('SetDownloadText')] (self)
  0007  GETTABUP  R7 = _ENV[K3('GM')]
  0008  GETTABLE  R7 = R7[K4('GameTextModel')]
  0009  SELF      R8 = R7[K5('GetText')] (self)
  0010  LOADK     R9 = K6 'resource_download_start_desc'
  0011  CALL      R7 = call(R7, -1 args, 2 rets)
  0012  CALL      R5 = call(R5, 0 args, -1 rets)
  0013  GETTABUP  R5 = _ENV[K3('GM')]
  0014  GETTABLE  R5 = R5[K7('DownloadManager')]
  0015  SELF      R6 = R5[K8('TryDownload')] (self)
  0016  MOVE      R7 = R0
  0017  MOVE      R8 = R0
  0018  MOVE      R9 = R0
  0019  CALL      R5 = call(R5, 0 args, 4 rets)
  0020  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 50-55 np=1 va=0 ms=10 code=22 consts=9 upvals=3 protos=0
    ;   K[0]='uiDisplayer'
    ;   K[1]='SetDownloadSliderValue'
    ;   K[2]='GM'
    ;   K[3]='DownloadManager'
    ;   K[4]='GetFormattedSize'
    ;   K[5]='SetDownloadText'
    ;   K[6]='string'
    ;   K[7]='format'
    ;   K[8]='%.1f/%.1f'
    ;   upvals: self, _ENV, totalSize
    ;   locals: progress(0-22), totalFormated(9-22), unit(9-22), current(10-22)
    0000  GETTABUP  R1 = self[K0('uiDisplayer')]
    0001  SELF      R2 = R1[K1('SetDownloadSliderValue')] (self)
    0002  MOVE      R3 = R0
    0003  CALL      R1 = call(R1, 0 args, 2 rets)
    0004  GETTABUP  R1 = _ENV[K2('GM')]
    0005  GETTABLE  R1 = R1[K3('DownloadManager')]
    0006  SELF      R2 = R1[K4('GetFormattedSize')] (self)
    0007  GETUPVAL  R3 = self
    0008  CALL      R1 = call(R1, 2 args, 2 rets)
    0009  MUL       R3 = R0 mul R1
    0010  GETTABUP  R4 = self[K0('uiDisplayer')]
    0011  SELF      R5 = R4[K5('SetDownloadText')] (self)
    0012  GETTABUP  R6 = _ENV[K6('string')]
    0013  GETTABLE  R6 = R6[K7('format')]
    0014  LOADK     R7 = K8 '%.1f/%.1f'
    0015  MOVE      R8 = R0
    0016  MOVE      R9 = R0
    0017  CALL      R6 = call(R6, 1 args, 3 rets)
    0018  MOVE      R7 = R0
    0019  CONCAT    R6 = concat(R6..R6)
    0020  CALL      R4 = call(R4, 0 args, 2 rets)
    0021  RETURN    return R0..R-1
  ; ---------- proto1 [] ----------
    ; fn ?  line 57-68 np=1 va=0 ms=5 code=11 consts=2 upvals=1 protos=1
    ;   K[0]='uiDisplayer'
    ;   K[1]='SetDownloadSliderConsistencyCallback'
    ;   upvals: self
    ;   locals: result(0-11), funcCallbackWrap(1-11)
    0000  CLOSURE   R1 = closure proto0
    0001  TEST      if not R0 then   -> -131069
    0002  JMP       (jump)   -> 8
    0003  GETTABUP  R2 = self[K0('uiDisplayer')]
    0004  SELF      R3 = R2[K1('SetDownloadSliderConsistencyCallback')] (self)
    0005  MOVE      R4 = R0
    0006  CALL      R2 = call(R2, 0 args, 2 rets)
    0007  JMP       (jump)   -> 10
    0008  MOVE      R2 = R0
    0009  CALL      R2 = call(R2, 0 args, 0 rets)
    0010  RETURN    return R0..R-1
    ; ---------- proto0 [] ----------
      ; fn ?  line 58-61 np=0 va=0 ms=2 code=8 consts=4 upvals=2 protos=0
      ;   K[0]='uiDisplayer'
      ;   K[1]='ShowProgressSlider'
      ;   K[2]='_loadingLayer'
      ;   K[3]='StepExecuteCallback'
      ;   upvals: self, result
      0000  GETTABUP  R0 = self[K0('uiDisplayer')]
      0001  SELF      R1 = R0[K1('ShowProgressSlider')] (self)
      0002  CALL      R0 = call(R0, 0 args, 1 rets)
      0003  GETTABUP  R0 = self[K2('_loadingLayer')]
      0004  GETTABLE  R0 = R0[K3('StepExecuteCallback')]
      0005  GETUPVAL  R1 = self
      0006  CALL      R0 = call(R0, 0 args, 1 rets)
      0007  RETURN    return R0..R-1
