# BigDayRaceActivity_View_BigDayRaceBaseWindow_1335.luac
; fn @BigDayRaceBaseWindow.lua  line 0-0 np=0 va=1 ms=3 code=18 consts=7 upvals=1 protos=3
;   K[0]='BigDayRaceBaseWindow'
;   K[1]='setmetatable'
;   K[2]='BaseWindow'
;   K[3]='__index'
;   K[4]='Init'
;   K[5]='TryClose'
;   K[6]='OnDestroy'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('BaseWindow')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('BigDayRaceBaseWindow')] = R0
0005  GETTABUP  R0 = _ENV[K0('BigDayRaceBaseWindow')]
0006  GETTABUP  R1 = _ENV[K0('BigDayRaceBaseWindow')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('BigDayRaceBaseWindow')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Init')] = R1
0011  GETTABUP  R0 = _ENV[K0('BigDayRaceBaseWindow')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('TryClose')] = R1
0014  GETTABUP  R0 = _ENV[K0('BigDayRaceBaseWindow')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('OnDestroy')] = R1
0017  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 9-22 np=3 va=0 ms=8 code=44 consts=24 upvals=1 protos=0
  ;   K[0]='m_activityType'
  ;   K[1]='m_model'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='m_activityDefinition'
  ;   K[6]='GetActivityDefinition'
  ;   K[7]='m_id'
  ;   K[8]='GetId'
  ;   K[9]='SetWindowOpened'
  ;   K[10]='AddHandlerAndRecordMap'
  ;   K[11]='event'
  ;   K[12]='RaceEventType'
  ;   K[13]='StateChanged'
  ;   K[14]='obj'
  ;   K[15]='method'
  ;   K[16]='TryClose'
  ;   K[17]='LogWindowAction'
  ;   K[18]='EBIType'
  ;   K[19]='UIActionType'
  ;   K[20]='Open'
  ;   K[21]='EBIReferType'
  ;   K[22]='AutoPopup'
  ;   K[23]='UserClick'
  ;   upvals: _ENV
  ;   locals: self(0-44), activityType(0-44), bAutoOpen(0-44)
  0000  SETTABLE  R0[K0('m_activityType')] = R1
  0001  GETTABUP  R3 = _ENV[K2('GM')]
  0002  GETTABLE  R3 = R3[K3('ActivityManager')]
  0003  SELF      R4 = R3[K4('GetModel')] (self)
  0004  MOVE      R5 = R0
  0005  CALL      R3 = call(R3, 1 args, 2 rets)
  0006  SETTABLE  R0[K1('m_model')] = R3
  0007  GETTABLE  R3 = R0[K1('m_model')]
  0008  SELF      R4 = R3[K6('GetActivityDefinition')] (self)
  0009  CALL      R3 = call(R3, 1 args, 1 rets)
  0010  SETTABLE  R0[K5('m_activityDefinition')] = R3
  0011  GETTABLE  R3 = R0[K1('m_model')]
  0012  SELF      R4 = R3[K8('GetId')] (self)
  0013  CALL      R3 = call(R3, 1 args, 1 rets)
  0014  SETTABLE  R0[K7('m_id')] = R3
  0015  GETTABLE  R3 = R0[K1('m_model')]
  0016  SELF      R4 = R3[K9('SetWindowOpened')] (self)
  0017  CALL      R3 = call(R3, 0 args, 1 rets)
  0018  GETTABUP  R3 = _ENV[K10('AddHandlerAndRecordMap')]
  0019  GETTABLE  R4 = R0[K1('m_model')]
  0020  GETTABLE  R4 = R4[K11('event')]
  0021  GETTABUP  R5 = _ENV[K12('RaceEventType')]
  0022  GETTABLE  R5 = R5[K13('StateChanged')]
  0023  NEWTABLE  R6 = {} (0 items)
  0024  SETTABLE  R6[K14('obj')] = R0
  0025  GETTABLE  R7 = R0[K16('TryClose')]
  0026  SETTABLE  R6[K15('method')] = R7
  0027  CALL      R3 = call(R3, 0 args, 3 rets)
  0028  SELF      R4 = R0[K17('LogWindowAction')] (self)
  0029  GETTABUP  R5 = _ENV[K18('EBIType')]
  0030  GETTABLE  R5 = R5[K19('UIActionType')]
  0031  GETTABLE  R5 = R5[K20('Open')]
  0032  NEWTABLE  R6 = {} (1 items)
  0033  TEST      if not R2 then   -> -131037
  0034  JMP       (jump)   -> 39
  0035  GETTABUP  R7 = _ENV[K21('EBIReferType')]
  0036  GETTABLE  R7 = R7[K22('AutoPopup')]
  0037  TEST      if not R7 then   -> -131032
  0038  JMP       (jump)   -> 41
  0039  GETTABUP  R7 = _ENV[K21('EBIReferType')]
  0040  GETTABLE  R7 = R7[K23('UserClick')]
  0041  SETLIST   setlist R6[B=1,C=1]
  0042  CALL      R3 = call(R3, 0 args, 3 rets)
  0043  RETURN    return R0..R-1
; ---------- proto1 [TryClose] ----------
  ; fn ?  line 25-27 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='Close'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('Close')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto2 [OnDestroy] ----------
  ; fn ?  line 29-34 np=1 va=0 ms=4 code=13 consts=6 upvals=1 protos=0
  ;   K[0]='BaseWindow'
  ;   K[1]='OnDestroy'
  ;   K[2]='m_model'
  ;   K[3]=nil
  ;   K[4]='RemoveAllHandlers'
  ;   K[5]='event'
  ;   upvals: _ENV
  ;   locals: self(0-13)
  0000  GETTABUP  R1 = _ENV[K0('BaseWindow')]
  0001  GETTABLE  R1 = R1[K1('OnDestroy')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABLE  R1 = R0[K2('m_model')]
  0005  EQ        if R1 eq K3(nil)   -> -130294
  0006  JMP       (jump)   -> 12
  0007  GETTABUP  R1 = _ENV[K4('RemoveAllHandlers')]
  0008  GETTABLE  R2 = R0[K2('m_model')]
  0009  GETTABLE  R2 = R2[K5('event')]
  0010  MOVE      R3 = R0
  0011  CALL      R1 = call(R1, 0 args, 2 rets)
  0012  RETURN    return R0..R-1
