# Model_UserData_ModelHelper_71.luac
; fn @ModelHelper.lua  line 0-0 np=0 va=1 ms=2 code=32 consts=14 upvals=1 protos=9
;   K[0]='ModelHelper'
;   K[1]='privatePrefix'
;   K[2]='_'
;   K[3]='DefineProperties'
;   K[4]='ModelHelper'
;   K[5]='DefinePrivateProperties'
;   K[6]='ModelHelper'
;   K[7]='_DefineProperty'
;   K[8]='GetterName'
;   K[9]='InNumberGetterName'
;   K[10]='SetterName'
;   K[11]='DefineDispatchEvent'
;   K[12]='DefineBoolEvent'
;   K[13]='DefineSyncData'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABUP  _ENV[K0('ModelHelper')] = R0
0002  GETTABUP  R0 = _ENV[K0('ModelHelper')]
0003  SETTABLE  R0[K1('privatePrefix')] = K2('_')
0004  GETTABUP  R0 = _ENV[K0('ModelHelper')]
0005  CLOSURE   R1 = closure proto0
0006  SETTABLE  R0[K3('DefineProperties')] = R1
0007  GETTABUP  R0 = _ENV[K4('ModelHelper')]
0008  CLOSURE   R1 = closure proto1
0009  SETTABLE  R0[K5('DefinePrivateProperties')] = R1
0010  GETTABUP  R0 = _ENV[K6('ModelHelper')]
0011  CLOSURE   R1 = closure proto2
0012  SETTABLE  R0[K7('_DefineProperty')] = R1
0013  GETTABUP  R0 = _ENV[K6('ModelHelper')]
0014  CLOSURE   R1 = closure proto3
0015  SETTABLE  R0[K8('GetterName')] = R1
0016  GETTABUP  R0 = _ENV[K6('ModelHelper')]
0017  CLOSURE   R1 = closure proto4
0018  SETTABLE  R0[K9('InNumberGetterName')] = R1
0019  GETTABUP  R0 = _ENV[K6('ModelHelper')]
0020  CLOSURE   R1 = closure proto5
0021  SETTABLE  R0[K10('SetterName')] = R1
0022  GETTABUP  R0 = _ENV[K6('ModelHelper')]
0023  CLOSURE   R1 = closure proto6
0024  SETTABLE  R0[K11('DefineDispatchEvent')] = R1
0025  GETTABUP  R0 = _ENV[K6('ModelHelper')]
0026  CLOSURE   R1 = closure proto7
0027  SETTABLE  R0[K12('DefineBoolEvent')] = R1
0028  GETTABUP  R0 = _ENV[K6('ModelHelper')]
0029  CLOSURE   R1 = closure proto8
0030  SETTABLE  R0[K13('DefineSyncData')] = R1
0031  RETURN    return R0..R-1
; ---------- proto0 [DefineProperties] ----------
  ; fn ?  line 6-10 np=2 va=0 ms=11 code=13 consts=3 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='ModelHelper'
  ;   K[2]='_DefineProperty'
  ;   upvals: _ENV
  ;   locals: model(0-13), propertyKeys(0-13), (for generator)(3-12), (for state)(3-12), (for control)(3-12), k(4-10), v(4-10)
  0000  GETTABUP  R2 = _ENV[K0('pairs')]
  0001  MOVE      R3 = R0
  0002  CALL      R2 = call(R2, 3 args, 1 rets)
  0003  JMP       (jump)   -> 10
  0004  GETTABUP  R7 = _ENV[K1('ModelHelper')]
  0005  GETTABLE  R7 = R7[K2('_DefineProperty')]
  0006  MOVE      R8 = R0
  0007  MOVE      R9 = R0
  0008  MOVE      R10 = R0
  0009  CALL      R7 = call(R7, 0 args, 3 rets)
  0010  TFORCALL  tforcall R2
  0011  TFORLOOP  tforloop R4(sBx=-8)   -> 4
  0012  RETURN    return R0..R-1
; ---------- proto1 [DefinePrivateProperties] ----------
  ; fn ?  line 12-16 np=2 va=0 ms=12 code=15 consts=4 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='ModelHelper'
  ;   K[2]='_DefineProperty'
  ;   K[3]='privatePrefix'
  ;   upvals: _ENV
  ;   locals: model(0-15), propertyKeys(0-15), (for generator)(3-14), (for state)(3-14), (for control)(3-14), k(4-12), v(4-12)
  0000  GETTABUP  R2 = _ENV[K0('pairs')]
  0001  MOVE      R3 = R0
  0002  CALL      R2 = call(R2, 3 args, 1 rets)
  0003  JMP       (jump)   -> 12
  0004  GETTABUP  R7 = _ENV[K1('ModelHelper')]
  0005  GETTABLE  R7 = R7[K2('_DefineProperty')]
  0006  MOVE      R8 = R0
  0007  MOVE      R9 = R0
  0008  MOVE      R10 = R0
  0009  GETTABUP  R11 = _ENV[K1('ModelHelper')]
  0010  GETTABLE  R11 = R11[K3('privatePrefix')]
  0011  CALL      R7 = call(R7, 0 args, 4 rets)
  0012  TFORCALL  tforcall R2
  0013  TFORLOOP  tforloop R4(sBx=-10)   -> 4
  0014  RETURN    return R0..R-1
; ---------- proto2 [_DefineProperty] ----------
  ; fn ?  line 22-43 np=4 va=0 ms=7 code=62 consts=10 upvals=1 protos=3
  ;   K[0]='type'
  ;   K[1]='string'
  ;   K[2]='Log'
  ;   K[3]='Error'
  ;   K[4]='should define string property key for '
  ;   K[5]=''
  ;   K[6]='ModelHelper'
  ;   K[7]='GetterName'
  ;   K[8]='InNumberGetterName'
  ;   K[9]='SetterName'
  ;   upvals: _ENV
  ;   locals: model(0-62), propertyName(0-62), propertyKey(0-62), namePrefix(0-62)
  0000  TEST      if not R2 then   -> -131070
  0001  JMP       (jump)   -> 7
  0002  GETTABUP  R4 = _ENV[K0('type')]
  0003  MOVE      R5 = R0
  0004  CALL      R4 = call(R4, 1 args, 1 rets)
  0005  EQ        if R1 eq K1('string')   -> -128760
  0006  JMP       (jump)   -> 13
  0007  GETTABUP  R4 = _ENV[K2('Log')]
  0008  GETTABLE  R4 = R4[K3('Error')]
  0009  LOADK     R5 = K4 'should define string property key for '
  0010  MOVE      R6 = R0
  0011  CONCAT    R5 = concat(R5..R5)
  0012  CALL      R4 = call(R4, 0 args, 1 rets)
  0013  TEST      if not R3 then   -> -131056
  0014  JMP       (jump)   -> 16
  0015  LOADK     R3 = K5 ''
  0016  GETTABUP  R4 = _ENV[K6('ModelHelper')]
  0017  GETTABLE  R4 = R4[K7('GetterName')]
  0018  MOVE      R5 = R0
  0019  MOVE      R6 = R0
  0020  CALL      R4 = call(R4, 1 args, 2 rets)
  0021  GETTABLE  R4 = R0[R4]
  0022  TEST      if not R4 then   -> -131047
  0023  JMP       (jump)   -> 31
  0024  GETTABUP  R4 = _ENV[K6('ModelHelper')]
  0025  GETTABLE  R4 = R4[K7('GetterName')]
  0026  MOVE      R5 = R0
  0027  MOVE      R6 = R0
  0028  CALL      R4 = call(R4, 1 args, 2 rets)
  0029  CLOSURE   R5 = closure proto0
  0030  SETTABLE  R0[R4] = R5
  0031  GETTABUP  R4 = _ENV[K6('ModelHelper')]
  0032  GETTABLE  R4 = R4[K8('InNumberGetterName')]
  0033  MOVE      R5 = R0
  0034  MOVE      R6 = R0
  0035  CALL      R4 = call(R4, 1 args, 2 rets)
  0036  GETTABLE  R4 = R0[R4]
  0037  TEST      if not R4 then   -> -131032
  0038  JMP       (jump)   -> 46
  0039  GETTABUP  R4 = _ENV[K6('ModelHelper')]
  0040  GETTABLE  R4 = R4[K8('InNumberGetterName')]
  0041  MOVE      R5 = R0
  0042  MOVE      R6 = R0
  0043  CALL      R4 = call(R4, 1 args, 2 rets)
  0044  CLOSURE   R5 = closure proto1
  0045  SETTABLE  R0[R4] = R5
  0046  GETTABUP  R4 = _ENV[K6('ModelHelper')]
  0047  GETTABLE  R4 = R4[K9('SetterName')]
  0048  MOVE      R5 = R0
  0049  MOVE      R6 = R0
  0050  CALL      R4 = call(R4, 1 args, 2 rets)
  0051  GETTABLE  R4 = R0[R4]
  0052  TEST      if not R4 then   -> -131017
  0053  JMP       (jump)   -> 61
  0054  GETTABUP  R4 = _ENV[K6('ModelHelper')]
  0055  GETTABLE  R4 = R4[K9('SetterName')]
  0056  MOVE      R5 = R0
  0057  MOVE      R6 = R0
  0058  CALL      R4 = call(R4, 1 args, 2 rets)
  0059  CLOSURE   R5 = closure proto2
  0060  SETTABLE  R0[R4] = R5
  0061  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 28-30 np=1 va=0 ms=5 code=8 consts=3 upvals=1 protos=0
    ;   K[0]='GetData'
    ;   K[1]='GetValue'
    ;   K[2]='value'
    ;   upvals: propertyKey
    ;   locals: self(0-8)
    0000  SELF      R2 = R0[K0('GetData')] (self)
    0001  CALL      R1 = call(R1, 1 args, 1 rets)
    0002  SELF      R2 = R1[K1('GetValue')] (self)
    0003  GETUPVAL  R3 = propertyKey
    0004  LOADK     R4 = K2 'value'
    0005  TAILCALL  tailcall(R1, 0)
    0006  RETURN    return R1..R0
    0007  RETURN    return R0..R-1
  ; ---------- proto1 [] ----------
    ; fn ?  line 33-35 np=1 va=0 ms=6 code=13 consts=5 upvals=2 protos=0
    ;   K[0]='tonumber'
    ;   K[1]='GetData'
    ;   K[2]='GetValue'
    ;   K[3]='value'
    ;   K[4]=0
    ;   upvals: _ENV, propertyKey
    ;   locals: self(0-13)
    0000  GETTABUP  R1 = _ENV[K0('tonumber')]
    0001  SELF      R3 = R0[K1('GetData')] (self)
    0002  CALL      R2 = call(R2, 1 args, 1 rets)
    0003  SELF      R3 = R2[K2('GetValue')] (self)
    0004  GETUPVAL  R4 = _ENV
    0005  LOADK     R5 = K3 'value'
    0006  CALL      R2 = call(R2, -1 args, 3 rets)
    0007  CALL      R1 = call(R1, 1 args, -1 rets)
    0008  TEST      if not R1 then   -> -131061
    0009  JMP       (jump)   -> 11
    0010  LOADK     R1 = K4 0
    0011  RETURN    return R1..R0
    0012  RETURN    return R0..R-1
  ; ---------- proto2 [] ----------
    ; fn ?  line 38-41 np=3 va=0 ms=8 code=12 consts=4 upvals=2 protos=0
    ;   K[0]='tostring'
    ;   K[1]='GetData'
    ;   K[2]='Set'
    ;   K[3]='value'
    ;   upvals: _ENV, propertyKey
    ;   locals: self(0-12), value(0-12), save(0-12)
    0000  GETTABUP  R3 = _ENV[K0('tostring')]
    0001  MOVE      R4 = R0
    0002  CALL      R3 = call(R3, 1 args, 1 rets)
    0003  MOVE      R1 = R0
    0004  SELF      R4 = R0[K1('GetData')] (self)
    0005  CALL      R3 = call(R3, 1 args, 1 rets)
    0006  SELF      R4 = R3[K2('Set')] (self)
    0007  GETUPVAL  R5 = _ENV
    0008  LOADK     R6 = K3 'value'
    0009  MOVE      R7 = R0
    0010  CALL      R3 = call(R3, 0 args, 4 rets)
    0011  RETURN    return R0..R-1
; ---------- proto3 [GetterName] ----------
  ; fn ?  line 45-47 np=2 va=0 ms=5 code=6 consts=1 upvals=0 protos=0
  ;   K[0]='Get'
  ;   locals: prefix(0-6), name(0-6)
  0000  MOVE      R2 = R0
  0001  LOADK     R3 = K0 'Get'
  0002  MOVE      R4 = R0
  0003  CONCAT    R2 = concat(R2..R2)
  0004  RETURN    return R2..R1
  0005  RETURN    return R0..R-1
; ---------- proto4 [InNumberGetterName] ----------
  ; fn ?  line 49-51 np=2 va=0 ms=6 code=7 consts=2 upvals=0 protos=0
  ;   K[0]='Get'
  ;   K[1]='InNumber'
  ;   locals: prefix(0-7), name(0-7)
  0000  MOVE      R2 = R0
  0001  LOADK     R3 = K0 'Get'
  0002  MOVE      R4 = R0
  0003  LOADK     R5 = K1 'InNumber'
  0004  CONCAT    R2 = concat(R2..R2)
  0005  RETURN    return R2..R1
  0006  RETURN    return R0..R-1
; ---------- proto5 [SetterName] ----------
  ; fn ?  line 53-55 np=2 va=0 ms=5 code=6 consts=1 upvals=0 protos=0
  ;   K[0]='Set'
  ;   locals: prefix(0-6), name(0-6)
  0000  MOVE      R2 = R0
  0001  LOADK     R3 = K0 'Set'
  0002  MOVE      R4 = R0
  0003  CONCAT    R2 = concat(R2..R2)
  0004  RETURN    return R2..R1
  0005  RETURN    return R0..R-1
; ---------- proto6 [DefineDispatchEvent] ----------
  ; fn ?  line 61-69 np=2 va=0 ms=3 code=3 consts=0 upvals=1 protos=1
  ;   upvals: _ENV
  ;   locals: manager(0-3), functionName(0-3)
  0000  CLOSURE   R2 = closure proto0
  0001  SETTABLE  R0[R1] = R2
  0002  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 62-68 np=2 va=0 ms=10 code=15 consts=3 upvals=2 protos=0
    ;   K[0]='m_models'
    ;   K[1]=nil
    ;   K[2]='pairs'
    ;   upvals: _ENV, functionName
    ;   locals: manager(0-15), params(0-15), (for generator)(6-14), (for state)(6-14), (for control)(6-14), _(7-12), model(7-12)
    0000  GETTABLE  R2 = R0[K0('m_models')]
    0001  EQ        if R1 eq K1(nil)   -> -129788
    0002  JMP       (jump)   -> 14
    0003  GETTABUP  R2 = _ENV[K2('pairs')]
    0004  GETTABLE  R3 = R0[K0('m_models')]
    0005  CALL      R2 = call(R2, 3 args, 1 rets)
    0006  JMP       (jump)   -> 12
    0007  GETUPVAL  R7 = _ENV
    0008  GETTABLE  R7 = R6[R7]
    0009  MOVE      R8 = R0
    0010  MOVE      R9 = R0
    0011  CALL      R7 = call(R7, 0 args, 2 rets)
    0012  TFORCALL  tforcall R2
    0013  TFORLOOP  tforloop R4(sBx=-7)   -> 7
    0014  RETURN    return R0..R-1
; ---------- proto7 [DefineBoolEvent] ----------
  ; fn ?  line 72-84 np=2 va=0 ms=3 code=3 consts=0 upvals=1 protos=1
  ;   upvals: _ENV
  ;   locals: manager(0-3), functionName(0-3)
  0000  CLOSURE   R2 = closure proto0
  0001  SETTABLE  R0[R1] = R2
  0002  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 73-83 np=1 va=0 ms=8 code=20 consts=3 upvals=2 protos=0
    ;   K[0]='m_models'
    ;   K[1]=nil
    ;   K[2]='pairs'
    ;   upvals: _ENV, functionName
    ;   locals: manager(0-20), (for generator)(6-17), (for state)(6-17), (for control)(6-17), _(7-15), model(7-15)
    0000  GETTABLE  R1 = R0[K0('m_models')]
    0001  EQ        if R1 eq K1(nil)   -> -130300
    0002  JMP       (jump)   -> 19
    0003  GETTABUP  R1 = _ENV[K2('pairs')]
    0004  GETTABLE  R2 = R0[K0('m_models')]
    0005  CALL      R1 = call(R1, 3 args, 1 rets)
    0006  JMP       (jump)   -> 15
    0007  GETUPVAL  R6 = _ENV
    0008  GETTABLE  R6 = R5[R6]
    0009  MOVE      R7 = R0
    0010  CALL      R6 = call(R6, 1 args, 1 rets)
    0011  TEST      if not R6 then   -> -131059
    0012  JMP       (jump)   -> 15
    0013  LOADBOOL  R6 = true
    0014  RETURN    return R6..R5
    0015  TFORCALL  tforcall R1
    0016  TFORLOOP  tforloop R3(sBx=-10)   -> 7
    0017  LOADBOOL  R1 = false
    0018  RETURN    return R1..R0
    0019  RETURN    return R0..R-1
; ---------- proto8 [DefineSyncData] ----------
  ; fn ?  line 86-91 np=3 va=0 ms=9 code=28 consts=8 upvals=1 protos=2
  ;   K[0]='m_'
  ;   K[1]='string'
  ;   K[2]='lower'
  ;   K[3]='sub'
  ;   K[4]=1
  ;   K[5]=2
  ;   K[6]='Get'
  ;   K[7]='Sync'
  ;   upvals: _ENV
  ;   locals: model(0-28), name(0-28), value(0-28), variableName(16-28)
  0000  LOADK     R3 = K0 'm_'
  0001  GETTABUP  R4 = _ENV[K1('string')]
  0002  GETTABLE  R4 = R4[K2('lower')]
  0003  GETTABUP  R5 = _ENV[K1('string')]
  0004  GETTABLE  R5 = R5[K3('sub')]
  0005  MOVE      R6 = R0
  0006  LOADK     R7 = K4 1
  0007  LOADK     R8 = K4 1
  0008  CALL      R5 = call(R5, -1 args, 3 rets)
  0009  CALL      R4 = call(R4, 1 args, -1 rets)
  0010  GETTABUP  R5 = _ENV[K1('string')]
  0011  GETTABLE  R5 = R5[K3('sub')]
  0012  MOVE      R6 = R0
  0013  LOADK     R7 = K5 2
  0014  CALL      R5 = call(R5, 1 args, 2 rets)
  0015  CONCAT    R3 = concat(R3..R3)
  0016  SETTABLE  R0[R3] = R2
  0017  LOADK     R4 = K6 'Get'
  0018  MOVE      R5 = R0
  0019  CONCAT    R4 = concat(R4..R4)
  0020  CLOSURE   R5 = closure proto0
  0021  SETTABLE  R0[R4] = R5
  0022  LOADK     R4 = K7 'Sync'
  0023  MOVE      R5 = R0
  0024  CONCAT    R4 = concat(R4..R4)
  0025  CLOSURE   R5 = closure proto1
  0026  SETTABLE  R0[R4] = R5
  0027  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 89-89 np=1 va=0 ms=2 code=4 consts=0 upvals=1 protos=0
    ;   upvals: variableName
    ;   locals: model(0-4)
    0000  GETUPVAL  R1 = variableName
    0001  GETTABLE  R1 = R0[R1]
    0002  RETURN    return R1..R0
    0003  RETURN    return R0..R-1
  ; ---------- proto1 [] ----------
    ; fn ?  line 90-90 np=2 va=0 ms=5 code=6 consts=1 upvals=1 protos=0
    ;   K[0]='FromArr'
    ;   upvals: variableName
    ;   locals: model(0-6), dataArray(0-6)
    0000  GETUPVAL  R2 = variableName
    0001  GETTABLE  R2 = R0[R2]
    0002  SELF      R3 = R2[K0('FromArr')] (self)
    0003  MOVE      R4 = R0
    0004  CALL      R2 = call(R2, 0 args, 2 rets)
    0005  RETURN    return R0..R-1
