├── .gitmodules ├── .gitignore ├── README.md ├── DynamOC ├── boot.lua ├── DynamUpvalue.m ├── LuaContext+Private.m ├── WeakObject.h ├── DynamMethod.h ├── DynamMethod.m ├── NSObject+DynamOC.h ├── LuaContext.h ├── boot32.h ├── boot64.h ├── WeakObject.m ├── DynamUpvalue.h ├── DynamBlock.h ├── Info.plist ├── LuaContext+Private.h ├── NSObject+DynamOC.m ├── dispatch.lua ├── cocoa.lua ├── dispatch32.h ├── dispatch64.h ├── DynamBlock.m ├── cocoa32.h ├── cocoa64.h ├── LuaContext.m ├── runtime.lua └── runtime32.h ├── DynamOC.podspec └── LICENSE /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Podfile.lock 2 | Pods 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DynamOC 2 | 3 | 一个使用Lua语言的iOS热更新框架 4 | 5 | wiki: https://github.com/onesmash/DynamOC/wiki 6 | 7 | demo: https://github.com/onesmash/DynamOCTest 8 | -------------------------------------------------------------------------------- /DynamOC/boot.lua: -------------------------------------------------------------------------------- 1 | package.path = package.path .. ';' .. __scriptDirectory .. '/?.lua' 2 | local ffi = require("ffi") 3 | runtime = require('runtime') 4 | dispatch = require('dispatch') 5 | cocoa = require('cocoa') 6 | -------------------------------------------------------------------------------- /DynamOC/DynamUpvalue.m: -------------------------------------------------------------------------------- 1 | // 2 | // DynamUpvalue.m 3 | // Pods 4 | // 5 | // Created by Xuhui on 07/03/2017. 6 | // 7 | // 8 | 9 | #import "DynamUpvalue.h" 10 | 11 | @implementation DynamUpvalue 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DynamOC/LuaContext+Private.m: -------------------------------------------------------------------------------- 1 | // 2 | // LuaContext+Private.m 3 | // Pods 4 | // 5 | // Created by Xuhui on 10/04/2017. 6 | // 7 | // 8 | 9 | #import "LuaContext+Private.h" 10 | 11 | @implementation LuaContext (Private) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DynamOC/WeakObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // WeakObject.h 3 | // Pods 4 | // 5 | // Created by Xuhui on 01/03/2017. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface WeakObject : NSProxy 12 | 13 | @property (nonatomic, weak) id object; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DynamOC/DynamMethod.h: -------------------------------------------------------------------------------- 1 | // 2 | // DynamMethod.h 3 | // Pods 4 | // 5 | // Created by Xuhui on 07/03/2017. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @class DynamUpvalue; 12 | 13 | @interface DynamMethod : NSObject 14 | 15 | @property (nonatomic, strong) NSData *codeDump; 16 | @property (nonatomic, strong) NSArray *upvalueDump; 17 | 18 | - (instancetype)initWithCode:(NSData *)code upvalues:(NSArray *)upvalues; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /DynamOC/DynamMethod.m: -------------------------------------------------------------------------------- 1 | // 2 | // DynamMethod.m 3 | // Pods 4 | // 5 | // Created by Xuhui on 07/03/2017. 6 | // 7 | // 8 | 9 | #import "DynamMethod.h" 10 | 11 | @interface DynamMethod () 12 | 13 | @end 14 | 15 | @implementation DynamMethod 16 | 17 | - (instancetype)initWithCode:(NSData *)code upvalues:(NSArray *)upvalues 18 | { 19 | self = [self init]; 20 | if(self) { 21 | _codeDump = code; 22 | _upvalueDump = upvalues; 23 | } 24 | return self; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /DynamOC/NSObject+DynamOC.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+DynamOC.h 3 | // DynamOC 4 | // 5 | // Created by 徐晖 on 2017/1/11. 6 | // Copyright © 2017年 徐晖. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class DynamMethod; 12 | 13 | @interface NSObject (DynamOC) 14 | 15 | + (void)__setLuaLambda:(DynamMethod *)lambda forKey:(NSString *)selector; 16 | + (NSCache *)__classMethodDescCache; 17 | + (NSCache *)__instanceMethodDescCache; 18 | + (DynamMethod *)__findDynamMethod:(SEL)sel; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /DynamOC/LuaContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // LuaContext.h 3 | // DynamOC 4 | // 5 | // Created by 徐晖 on 2017/1/12. 6 | // Copyright © 2017年 徐晖. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define kDynamOCErrorDomain @"me.onesmash.dynamoc" 12 | 13 | typedef enum : NSUInteger { 14 | DynamOCErrorCodeLuaCompileError = 1, 15 | DynamOCErrorCodeLuaRunError, 16 | } DynamOCErrorCode; 17 | 18 | @interface LuaContext : NSObject 19 | 20 | + (LuaContext *)currentContext; 21 | - (BOOL)evaluateScript:(NSString *)code error:(NSError **)error; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /DynamOC/boot32.h: -------------------------------------------------------------------------------- 1 | #define luaJIT_BC_boot32_SIZE 186 2 | static const char luaJIT_BC_boot32[] = { 3 | 27,76,74,2,2,178,1,2,0,5,0,10,0,24,54,0,0,0,54,1,0,0,57,1,1,1,39,2,2,0,54,3,3, 4 | 0,39,4,4,0,38,1,4,1,61,1,1,0,54,0,5,0,39,1,6,0,66,0,2,2,54,1,5,0,39,2,7,0,66, 5 | 1,2,2,55,1,7,0,54,1,5,0,39,2,8,0,66,1,2,2,55,1,8,0,54,1,5,0,39,2,9,0,66,1,2,2, 6 | 55,1,9,0,75,0,1,0,10,99,111,99,111,97,13,100,105,115,112,97,116,99,104,12,114, 7 | 117,110,116,105,109,101,8,102,102,105,12,114,101,113,117,105,114,101,11,47,63, 8 | 46,108,117,97,22,95,95,115,99,114,105,112,116,68,105,114,101,99,116,111,114, 9 | 121,6,59,9,112,97,116,104,12,112,97,99,107,97,103,101,0 10 | }; 11 | -------------------------------------------------------------------------------- /DynamOC/boot64.h: -------------------------------------------------------------------------------- 1 | #define luaJIT_BC_boot64_SIZE 186 2 | static const char luaJIT_BC_boot64[] = { 3 | 27,76,74,2,10,178,1,2,0,5,0,10,0,24,54,0,0,0,54,1,0,0,57,1,1,1,39,2,2,0,54,3, 4 | 3,0,39,4,4,0,38,1,4,1,61,1,1,0,54,0,5,0,39,2,6,0,66,0,2,2,54,1,5,0,39,3,7,0, 5 | 66,1,2,2,55,1,7,0,54,1,5,0,39,3,8,0,66,1,2,2,55,1,8,0,54,1,5,0,39,3,9,0,66,1, 6 | 2,2,55,1,9,0,75,0,1,0,10,99,111,99,111,97,13,100,105,115,112,97,116,99,104,12, 7 | 114,117,110,116,105,109,101,8,102,102,105,12,114,101,113,117,105,114,101,11, 8 | 47,63,46,108,117,97,22,95,95,115,99,114,105,112,116,68,105,114,101,99,116,111, 9 | 114,121,6,59,9,112,97,116,104,12,112,97,99,107,97,103,101,0 10 | }; 11 | -------------------------------------------------------------------------------- /DynamOC/WeakObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // WeakObject.m 3 | // Pods 4 | // 5 | // Created by Xuhui on 01/03/2017. 6 | // 7 | // 8 | 9 | #import "WeakObject.h" 10 | 11 | @interface WeakObject () 12 | 13 | @end 14 | 15 | @implementation WeakObject 16 | 17 | - (instancetype)initWithObject:(id)object 18 | { 19 | self.object = object; 20 | return self; 21 | } 22 | 23 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector 24 | { 25 | return [self.object methodSignatureForSelector:aSelector]; 26 | } 27 | 28 | - (void)forwardInvocation:(NSInvocation *)anInvocation 29 | { 30 | [anInvocation invokeWithTarget:self.object]; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /DynamOC/DynamUpvalue.h: -------------------------------------------------------------------------------- 1 | // 2 | // DynamUpvalue.h 3 | // Pods 4 | // 5 | // Created by Xuhui on 07/03/2017. 6 | // 7 | // 8 | 9 | #import 10 | 11 | typedef enum { 12 | kDynamUpvalueTypeDouble, 13 | kDynamUpvalueTypeInteger, 14 | kDynamUpvalueTypeUInteger, 15 | kDynamUpvalueTypeBoolean, 16 | kDynamUpvalueTypeString, 17 | kDynamUpvalueTypeBytes, 18 | kDynamUpvalueTypeObject, 19 | } DynamUpvalueType; 20 | 21 | @interface DynamUpvalue : NSObject 22 | 23 | @property (nonatomic, assign) NSInteger index; 24 | @property (nonatomic, copy) NSString *name; 25 | @property (nonatomic, strong) id value; 26 | @property (nonatomic, copy) NSString *cType; 27 | @property (nonatomic, assign) DynamUpvalueType type; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /DynamOC/DynamBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // DynamBlock.h 3 | // Pods 4 | // 5 | // Created by Xuhui on 23/02/2017. 6 | // 7 | // 8 | 9 | #import 10 | 11 | struct BlockDescriptor { 12 | uintptr_t reserved; // NULL 13 | uintptr_t size; // sizeof(struct Block_literal_1) 14 | }; 15 | 16 | @interface DynamBlock : NSObject { 17 | int flags; 18 | int reserved; 19 | void (*invoke)(void *, ...); 20 | struct BlockDescriptor *descriptor; 21 | } 22 | 23 | @property (nonatomic, assign) NSInteger blockID; 24 | @property (nonatomic, copy) NSString *signature; 25 | @property (nonatomic, assign) BOOL syncDispatch; 26 | @property (nonatomic, assign) BOOL dynamDispatch; 27 | 28 | - (instancetype)initWithBlockID:(NSInteger)callId signature:(NSString *)sig; 29 | @end 30 | -------------------------------------------------------------------------------- /DynamOC/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /DynamOC.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "DynamOC" 3 | s.version = "1.2.1" 4 | s.summary = "iOS hotfix using lua" 5 | s.homepage = "https://github.com/onesmash/DynamOC" 6 | s.license = { :type => 'MIT', :file => 'LICENSE' } 7 | s.author = { "xuhui" => "good122000@qq.com" } 8 | s.ios.deployment_target = "8.0" 9 | s.source = { :git => "https://github.com/onesmash/DynamOC.git", :tag => "#{s.version}", :submodules => true } 10 | s.source_files = "DynamOC", "DynamOC/**/*.{h,m}" 11 | s.exclude_files = "DynamOC/boot32.h", "DynamOC/boot64.h", "DynamOC/runtime32.h", "DynamOC/runtime64.h", "DynamOC/cocoa32.h", "DynamOC/cocoa64.h", "DynamOC/dispatch32.h", "DynamOC/dispatch64.h" 12 | s.public_header_files = "DynamOC/LuaContext.h" 13 | s.resource_bundles = { 14 | 'DynamOC' => ['DynamOC/runtime.lua', 'DynamOC/boot.lua', 'DynamOC/dispatch.lua', 'DynamOC/cocoa.lua'] 15 | } 16 | s.libraries = "luajit", "c++" 17 | s.dependency "LuaJIT-DynamOC", "~> 1.0.0" 18 | 19 | end 20 | -------------------------------------------------------------------------------- /DynamOC/LuaContext+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // LuaContext+Private.h 3 | // Pods 4 | // 5 | // Created by Xuhui on 10/04/2017. 6 | // 7 | // 8 | 9 | #import "LuaContext.h" 10 | 11 | @interface LuaContext (Private) 12 | 13 | + (NSBundle *)dynamOCBundle; 14 | + (LuaContext *)currentContext; 15 | + (LuaContext *)contextForThread:(NSThread *)thread; 16 | + (void)pushContext:(LuaContext *)context; 17 | + (void)popContext; 18 | 19 | @end 20 | 21 | @class DynamBlock; 22 | @class DynamUpvalue; 23 | 24 | void forward_invocation(id target, SEL selector, id invocation); 25 | void forward_block_id_invocation(NSInteger blockID, id invocation); 26 | void forward_block_code_invocation(NSData *code, NSArray *upvalues, id invocation); 27 | LuaContext *get_luacontext(NSThread *thread); 28 | LuaContext *get_current_luacontext(); 29 | void push_luacontext(LuaContext *context); 30 | void pop_luacontext(); 31 | void free_method(NSInteger methodID); 32 | void free_block(NSInteger blockID); 33 | NSData *dump_block_code(NSInteger blockID); 34 | NSArray *dump_block_upvalue(NSInteger blockID); 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 Xu Hui 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | The above copyright notice and this permission notice shall be included in all 10 | copies or substantial portions of the Software. 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 13 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 15 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 16 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | -------------------------------------------------------------------------------- /DynamOC/NSObject+DynamOC.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+DynamOC.m 3 | // DynamOC 4 | // 5 | // Created by 徐晖 on 2017/1/11. 6 | // Copyright © 2017年 徐晖. All rights reserved. 7 | // 8 | 9 | #import "NSObject+DynamOC.h" 10 | #import 11 | 12 | static char kLuaLambdasKey; 13 | static char KClassMethodDescCacheKey; 14 | static char KInstanceMethodDescCacheKey; 15 | 16 | @implementation NSObject (DynamOC) 17 | 18 | + (DynamMethod *)__findDynamMethod:(SEL)sel 19 | { 20 | DynamMethod *method = [[self __luaLambdas] objectForKey:[NSString stringWithUTF8String:sel_getName(sel)]]; 21 | if(!method) { 22 | method = [class_getSuperclass(self) __findDynamMethod:sel]; 23 | if(method) { 24 | [self __setLuaLambda:method forKey:[NSString stringWithUTF8String:sel_getName(sel)]]; 25 | } 26 | } 27 | return method; 28 | } 29 | 30 | + (NSMutableDictionary *)__luaLambdas 31 | { 32 | NSMutableDictionary *lambdas = objc_getAssociatedObject(self, &kLuaLambdasKey); 33 | if(lambdas) { 34 | return lambdas; 35 | } 36 | lambdas = [NSMutableDictionary dictionary]; 37 | objc_setAssociatedObject(self, &kLuaLambdasKey, lambdas, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 38 | return lambdas; 39 | } 40 | 41 | + (void)__setLuaLambda:(DynamMethod *)lambda forKey:(NSString *)selector 42 | { 43 | NSAssert([NSThread isMainThread], @"Add lua method must in main thread!"); 44 | NSMutableDictionary *lambdas = self.__luaLambdas; 45 | [lambdas setObject:lambda forKey:selector]; 46 | } 47 | 48 | + (NSCache *)__classMethodDescCache 49 | { 50 | static NSCache *cache; 51 | static dispatch_once_t onceToken; 52 | dispatch_once(&onceToken, ^{ 53 | cache = [[NSCache alloc] init]; 54 | }); 55 | return cache; 56 | } 57 | 58 | + (NSCache *)__instanceMethodDescCache 59 | { 60 | static NSCache *cache; 61 | static dispatch_once_t onceToken; 62 | dispatch_once(&onceToken, ^{ 63 | cache = [[NSCache alloc] init]; 64 | }); 65 | return cache; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /DynamOC/dispatch.lua: -------------------------------------------------------------------------------- 1 | local ffi = runtime.ffi 2 | local dispatch = {} 3 | 4 | ffi.cdef[[ 5 | // base.h 6 | typedef union { 7 | struct dispatch_object_s *_do; 8 | struct dispatch_continuation_s *_dc; 9 | struct dispatch_queue_s *_dq; 10 | struct dispatch_queue_attr_s *_dqa; 11 | struct dispatch_group_s *_dg; 12 | struct dispatch_source_s *_ds; 13 | struct dispatch_source_attr_s *_dsa; 14 | struct dispatch_semaphore_s *_dsema; 15 | struct dispatch_data_s *_ddata; 16 | struct dispatch_io_s *_dchannel; 17 | struct dispatch_operation_s *_doperation; 18 | struct dispatch_disk_s *_ddisk; 19 | } dispatch_object_t __attribute__((transparent_union)); 20 | 21 | // queue.h 22 | typedef struct dispatch_queue_s *dispatch_queue_t; 23 | typedef long dispatch_queue_priority_t; 24 | 25 | struct dispatch_queue_s _dispatch_main_q; 26 | 27 | dispatch_queue_t dispatch_get_global_queue(long identifier, unsigned long flags); 28 | dispatch_queue_t dispatch_get_main_queue(void); 29 | 30 | void dispatch_async(dispatch_queue_t queue, id block); 31 | void dispatch_sync(dispatch_queue_t queue, id block); 32 | ]] 33 | 34 | local lib = ffi.C --load("dispatch") 35 | 36 | 37 | -- Types 38 | dispatch.queue_priority_t = ffi.typeof("dispatch_queue_priority_t") 39 | 40 | 41 | -- Contants 42 | dispatch.highPriority = ffi.cast(dispatch.queue_priority_t, 2) 43 | dispatch.defaultPriority = ffi.cast(dispatch.queue_priority_t, 0) 44 | dispatch.lowPriority = ffi.cast(dispatch.queue_priority_t, -2) 45 | dispatch.backgroundPriority = ffi.cast(dispatch.queue_priority_t, -32768) -- INT16_MIN 46 | 47 | dispatch.mainQueue = lib._dispatch_main_q 48 | dispatch.get_global_queue = lib.dispatch_get_global_queue 49 | 50 | -- Functions 51 | function dispatch.async(queue, lambda) 52 | local block = runtime.createBlock(lambda, "@") 53 | block:setSyncDispatch_(false) 54 | block:setDynamDispatch_(true) 55 | block:retain() 56 | lib.dispatch_async(queue, block) 57 | end 58 | 59 | function dispatch.sync(queue, lambda) 60 | local block = runtime.createBlock(lambda, "@") 61 | block:setSyncDispatch_(true) 62 | lib.dispatch_sync(queue, block) 63 | end 64 | 65 | return dispatch 66 | -------------------------------------------------------------------------------- /DynamOC/cocoa.lua: -------------------------------------------------------------------------------- 1 | local ffi = runtime.ffi 2 | 3 | ffi.cdef[[ 4 | 5 | struct CGSize { 6 | CGFloat width; 7 | CGFloat height; 8 | }; 9 | typedef struct CGSize CGSize; 10 | 11 | struct CGPoint { 12 | CGFloat x; 13 | CGFloat y; 14 | }; 15 | 16 | typedef struct CGPoint CGPoint; 17 | struct CGRect { 18 | CGPoint origin; 19 | CGSize size; 20 | }; 21 | typedef struct CGRect CGRect; 22 | 23 | enum UITableViewCellStyle { 24 | UITableViewCellStyleDefault, // Simple cell with text label and optional image view (behavior of UITableViewCell in iPhoneOS 2.x) 25 | UITableViewCellStyleValue1, // Left aligned label on left and right aligned label on right with blue text (Used in Settings) 26 | UITableViewCellStyleValue2, // Right aligned label on left with blue text and left aligned label on right (Used in Phone/Contacts) 27 | UITableViewCellStyleSubtitle // Left aligned label on top and left aligned label on bottom with gray text (Used in iPod). 28 | }; 29 | 30 | void NSLog(id format, ...); 31 | 32 | const CGPoint CGPointZero; 33 | const CGSize CGSizeZero; 34 | const CGRect CGRectZero; 35 | CGFloat CGRectGetMinX(CGRect rect); 36 | CGFloat CGRectGetMidX(CGRect rect); 37 | CGFloat CGRectGetMaxX(CGRect rect); 38 | CGFloat CGRectGetMinY(CGRect rect); 39 | CGFloat CGRectGetMidY(CGRect rect); 40 | CGFloat CGRectGetMaxY(CGRect rect); 41 | CGFloat CGRectGetWidth(CGRect rect); 42 | CGFloat CGRectGetHeight(CGRect rect); 43 | 44 | ]] 45 | 46 | local lib = ffi.C 47 | 48 | local cocoa = {} 49 | 50 | cocoa.CGPoint = ffi.typeof("struct CGPoint") 51 | cocoa.CGSize = ffi.typeof("struct CGSize") 52 | cocoa.CGRect = ffi.typeof("struct CGRect") 53 | 54 | cocoa.UITableViewCellStyle = ffi.typeof("enum UITableViewCellStyle") 55 | cocoa.UITableViewCellStyleDefault = ffi.cast(cocoa.UITableViewCellStyle, 0) 56 | cocoa.UITableViewCellStyleValue1 = ffi.cast(cocoa.UITableViewCellStyle, 1) 57 | cocoa.UITableViewCellStyleValue2 = ffi.cast(cocoa.UITableViewCellStyle, 2) 58 | cocoa.UITableViewCellStyleSubtitle = ffi.cast(cocoa.UITableViewCellStyle, 3) 59 | 60 | cocoa.NSLog = lib.NSLog 61 | cocoa.CGPointZero = lib.CGPointZero 62 | cocoa.CGSizeZero = lib.CGSizeZero 63 | cocoa.CGRectZero = lib.CGRectZero 64 | function cocoa.CGRectGetMinX(rect) 65 | return tonumber(lib.CGRectGetMinX(rect)) 66 | end 67 | function cocoa.CGRectGetMidX(rect) 68 | return tonumber(lib.CGRectGetMidX(rect)) 69 | end 70 | function cocoa.CGRectGetMaxX(rect) 71 | return tonumber(lib.CGRectGetMaxX(rect)) 72 | end 73 | function cocoa.CGRectGetMinY(rect) 74 | return tonumber(lib.CGRectGetMinY(rect)) 75 | end 76 | function cocoa.CGRectGetMidY(rect) 77 | return tonumber(lib.CGRectGetMidY(rect)) 78 | end 79 | function cocoa.CGRectGetMaxY(rect) 80 | return tonumber(lib.CGRectGetMaxY(rect)) 81 | end 82 | function cocoa.CGRectGetWidth(rect) 83 | return tonumber(lib.CGRectGetWidth(rect)) 84 | end 85 | function cocoa.CGRectGetHeight(rect) 86 | return tonumber(lib.CGRectGetHeight(rect)) 87 | end 88 | 89 | return cocoa 90 | -------------------------------------------------------------------------------- /DynamOC/dispatch32.h: -------------------------------------------------------------------------------- 1 | #define luaJIT_BC_dispatch32_SIZE 1588 2 | static const char luaJIT_BC_dispatch32[] = { 3 | 27,76,74,2,2,141,1,0,2,6,1,6,0,18,54,2,0,0,57,2,1,2,18,3,1,0,39,4,2,0,66,2,3, 4 | 2,18,4,2,0,57,3,3,2,43,5,1,0,66,3,3,1,18,4,2,0,57,3,4,2,66,3,2,1,45,3,0,0,57, 5 | 3,5,3,18,4,0,0,18,5,2,0,66,3,3,1,75,0,1,0,2,192,19,100,105,115,112,97,116,99, 6 | 104,95,97,115,121,110,99,11,114,101,116,97,105,110,20,115,101,116,83,121,110, 7 | 99,68,105,115,112,97,116,99,104,6,64,16,99,114,101,97,116,101,66,108,111,99, 8 | 107,12,114,117,110,116,105,109,101,121,0,2,6,1,5,0,15,54,2,0,0,57,2,1,2,18,3, 9 | 1,0,39,4,2,0,66,2,3,2,18,4,2,0,57,3,3,2,43,5,2,0,66,3,3,1,45,3,0,0,57,3,4,3, 10 | 18,4,0,0,18,5,2,0,66,3,3,1,75,0,1,0,2,192,18,100,105,115,112,97,116,99,104,95, 11 | 115,121,110,99,20,115,101,116,83,121,110,99,68,105,115,112,97,116,99,104,6,64, 12 | 16,99,114,101,97,116,101,66,108,111,99,107,12,114,117,110,116,105,109,101,163, 13 | 10,3,0,6,0,21,0,41,54,0,0,0,57,0,1,0,52,1,0,0,57,2,2,0,39,3,3,0,66,2,2,1,57,2, 14 | 4,0,57,3,6,0,39,4,7,0,66,3,2,2,61,3,5,1,57,3,9,0,57,4,5,1,41,5,2,0,66,3,3,2, 15 | 61,3,8,1,57,3,9,0,57,4,5,1,41,5,0,0,66,3,3,2,61,3,10,1,57,3,9,0,57,4,5,1,41,5, 16 | 254,255,66,3,3,2,61,3,11,1,57,3,9,0,57,4,5,1,41,5,0,128,66,3,3,2,61,3,12,1,57, 17 | 3,14,2,61,3,13,1,57,3,16,2,61,3,15,1,51,3,18,0,61,3,17,1,51,3,20,0,61,3,19,1, 18 | 50,0,0,128,76,1,2,0,0,9,115,121,110,99,0,10,97,115,121,110,99,30,100,105,115, 19 | 112,97,116,99,104,95,103,101,116,95,103,108,111,98,97,108,95,113,117,101,117, 20 | 101,21,103,101,116,95,103,108,111,98,97,108,95,113,117,101,117,101,21,95,100, 21 | 105,115,112,97,116,99,104,95,109,97,105,110,95,113,14,109,97,105,110,81,117, 22 | 101,117,101,23,98,97,99,107,103,114,111,117,110,100,80,114,105,111,114,105, 23 | 116,121,16,108,111,119,80,114,105,111,114,105,116,121,20,100,101,102,97,117, 24 | 108,116,80,114,105,111,114,105,116,121,9,99,97,115,116,17,104,105,103,104,80, 25 | 114,105,111,114,105,116,121,30,100,105,115,112,97,116,99,104,95,113,117,101, 26 | 117,101,95,112,114,105,111,114,105,116,121,95,116,11,116,121,112,101,111,102, 27 | 21,113,117,101,117,101,95,112,114,105,111,114,105,116,121,95,116,6,67,162,7, 28 | 47,47,32,98,97,115,101,46,104,10,116,121,112,101,100,101,102,32,117,110,105, 29 | 111,110,32,123,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97, 30 | 116,99,104,95,111,98,106,101,99,116,95,115,32,42,95,100,111,59,10,32,32,32,32, 31 | 115,116,114,117,99,116,32,100,105,115,112,97,116,99,104,95,99,111,110,116,105, 32 | 110,117,97,116,105,111,110,95,115,32,42,95,100,99,59,10,32,32,32,32,115,116, 33 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,115, 34 | 32,42,95,100,113,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112, 35 | 97,116,99,104,95,113,117,101,117,101,95,97,116,116,114,95,115,32,42,95,100, 36 | 113,97,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97,116,99, 37 | 104,95,103,114,111,117,112,95,115,32,42,95,100,103,59,10,32,32,32,32,115,116, 38 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,115,111,117,114,99,101,95, 39 | 115,32,42,95,100,115,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115, 40 | 112,97,116,99,104,95,115,111,117,114,99,101,95,97,116,116,114,95,115,32,42,95, 41 | 100,115,97,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97,116, 42 | 99,104,95,115,101,109,97,112,104,111,114,101,95,115,32,42,95,100,115,101,109, 43 | 97,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97,116,99,104, 44 | 95,100,97,116,97,95,115,32,42,95,100,100,97,116,97,59,10,32,32,32,32,115,116, 45 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,105,111,95,115,32,42,95, 46 | 100,99,104,97,110,110,101,108,59,10,32,32,32,32,115,116,114,117,99,116,32,100, 47 | 105,115,112,97,116,99,104,95,111,112,101,114,97,116,105,111,110,95,115,32,42, 48 | 95,100,111,112,101,114,97,116,105,111,110,59,10,32,32,32,32,115,116,114,117, 49 | 99,116,32,100,105,115,112,97,116,99,104,95,100,105,115,107,95,115,32,42,95, 50 | 100,100,105,115,107,59,10,125,32,100,105,115,112,97,116,99,104,95,111,98,106, 51 | 101,99,116,95,116,32,95,95,97,116,116,114,105,98,117,116,101,95,95,40,40,116, 52 | 114,97,110,115,112,97,114,101,110,116,95,117,110,105,111,110,41,41,59,10,10, 53 | 47,47,32,113,117,101,117,101,46,104,10,116,121,112,101,100,101,102,32,115,116, 54 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,115, 55 | 32,42,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,116,59,10,116, 56 | 121,112,101,100,101,102,32,108,111,110,103,32,100,105,115,112,97,116,99,104, 57 | 95,113,117,101,117,101,95,112,114,105,111,114,105,116,121,95,116,59,10,10,115, 58 | 116,114,117,99,116,32,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95, 59 | 115,32,95,100,105,115,112,97,116,99,104,95,109,97,105,110,95,113,59,10,10,100, 60 | 105,115,112,97,116,99,104,95,113,117,101,117,101,95,116,32,100,105,115,112,97, 61 | 116,99,104,95,103,101,116,95,103,108,111,98,97,108,95,113,117,101,117,101,40, 62 | 108,111,110,103,32,105,100,101,110,116,105,102,105,101,114,44,32,117,110,115, 63 | 105,103,110,101,100,32,108,111,110,103,32,102,108,97,103,115,41,59,10,100,105, 64 | 115,112,97,116,99,104,95,113,117,101,117,101,95,116,32,100,105,115,112,97,116, 65 | 99,104,95,103,101,116,95,109,97,105,110,95,113,117,101,117,101,40,118,111,105, 66 | 100,41,59,10,10,118,111,105,100,32,100,105,115,112,97,116,99,104,95,97,115, 67 | 121,110,99,40,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,116,32, 68 | 113,117,101,117,101,44,32,105,100,32,98,108,111,99,107,41,59,10,118,111,105, 69 | 100,32,100,105,115,112,97,116,99,104,95,115,121,110,99,40,100,105,115,112,97, 70 | 116,99,104,95,113,117,101,117,101,95,116,32,113,117,101,117,101,44,32,105,100, 71 | 32,98,108,111,99,107,41,59,10,9,99,100,101,102,8,102,102,105,12,114,117,110, 72 | 116,105,109,101,0 73 | }; 74 | -------------------------------------------------------------------------------- /DynamOC/dispatch64.h: -------------------------------------------------------------------------------- 1 | #define luaJIT_BC_dispatch64_SIZE 1588 2 | static const char luaJIT_BC_dispatch64[] = { 3 | 27,76,74,2,10,141,1,0,2,7,1,6,0,18,54,2,0,0,57,2,1,2,18,4,1,0,39,5,2,0,66,2,3, 4 | 2,18,5,2,0,57,3,3,2,43,6,1,0,66,3,3,1,18,5,2,0,57,3,4,2,66,3,2,1,45,3,0,0,57, 5 | 3,5,3,18,5,0,0,18,6,2,0,66,3,3,1,75,0,1,0,2,192,19,100,105,115,112,97,116,99, 6 | 104,95,97,115,121,110,99,11,114,101,116,97,105,110,20,115,101,116,83,121,110, 7 | 99,68,105,115,112,97,116,99,104,6,64,16,99,114,101,97,116,101,66,108,111,99, 8 | 107,12,114,117,110,116,105,109,101,121,0,2,7,1,5,0,15,54,2,0,0,57,2,1,2,18,4, 9 | 1,0,39,5,2,0,66,2,3,2,18,5,2,0,57,3,3,2,43,6,2,0,66,3,3,1,45,3,0,0,57,3,4,3, 10 | 18,5,0,0,18,6,2,0,66,3,3,1,75,0,1,0,2,192,18,100,105,115,112,97,116,99,104,95, 11 | 115,121,110,99,20,115,101,116,83,121,110,99,68,105,115,112,97,116,99,104,6,64, 12 | 16,99,114,101,97,116,101,66,108,111,99,107,12,114,117,110,116,105,109,101,163, 13 | 10,3,0,7,0,21,0,41,54,0,0,0,57,0,1,0,52,1,0,0,57,2,2,0,39,4,3,0,66,2,2,1,57,2, 14 | 4,0,57,3,6,0,39,5,7,0,66,3,2,2,61,3,5,1,57,3,9,0,57,5,5,1,41,6,2,0,66,3,3,2, 15 | 61,3,8,1,57,3,9,0,57,5,5,1,41,6,0,0,66,3,3,2,61,3,10,1,57,3,9,0,57,5,5,1,41,6, 16 | 254,255,66,3,3,2,61,3,11,1,57,3,9,0,57,5,5,1,41,6,0,128,66,3,3,2,61,3,12,1,57, 17 | 3,14,2,61,3,13,1,57,3,16,2,61,3,15,1,51,3,18,0,61,3,17,1,51,3,20,0,61,3,19,1, 18 | 50,0,0,128,76,1,2,0,0,9,115,121,110,99,0,10,97,115,121,110,99,30,100,105,115, 19 | 112,97,116,99,104,95,103,101,116,95,103,108,111,98,97,108,95,113,117,101,117, 20 | 101,21,103,101,116,95,103,108,111,98,97,108,95,113,117,101,117,101,21,95,100, 21 | 105,115,112,97,116,99,104,95,109,97,105,110,95,113,14,109,97,105,110,81,117, 22 | 101,117,101,23,98,97,99,107,103,114,111,117,110,100,80,114,105,111,114,105, 23 | 116,121,16,108,111,119,80,114,105,111,114,105,116,121,20,100,101,102,97,117, 24 | 108,116,80,114,105,111,114,105,116,121,9,99,97,115,116,17,104,105,103,104,80, 25 | 114,105,111,114,105,116,121,30,100,105,115,112,97,116,99,104,95,113,117,101, 26 | 117,101,95,112,114,105,111,114,105,116,121,95,116,11,116,121,112,101,111,102, 27 | 21,113,117,101,117,101,95,112,114,105,111,114,105,116,121,95,116,6,67,162,7, 28 | 47,47,32,98,97,115,101,46,104,10,116,121,112,101,100,101,102,32,117,110,105, 29 | 111,110,32,123,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97, 30 | 116,99,104,95,111,98,106,101,99,116,95,115,32,42,95,100,111,59,10,32,32,32,32, 31 | 115,116,114,117,99,116,32,100,105,115,112,97,116,99,104,95,99,111,110,116,105, 32 | 110,117,97,116,105,111,110,95,115,32,42,95,100,99,59,10,32,32,32,32,115,116, 33 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,115, 34 | 32,42,95,100,113,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112, 35 | 97,116,99,104,95,113,117,101,117,101,95,97,116,116,114,95,115,32,42,95,100, 36 | 113,97,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97,116,99, 37 | 104,95,103,114,111,117,112,95,115,32,42,95,100,103,59,10,32,32,32,32,115,116, 38 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,115,111,117,114,99,101,95, 39 | 115,32,42,95,100,115,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115, 40 | 112,97,116,99,104,95,115,111,117,114,99,101,95,97,116,116,114,95,115,32,42,95, 41 | 100,115,97,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97,116, 42 | 99,104,95,115,101,109,97,112,104,111,114,101,95,115,32,42,95,100,115,101,109, 43 | 97,59,10,32,32,32,32,115,116,114,117,99,116,32,100,105,115,112,97,116,99,104, 44 | 95,100,97,116,97,95,115,32,42,95,100,100,97,116,97,59,10,32,32,32,32,115,116, 45 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,105,111,95,115,32,42,95, 46 | 100,99,104,97,110,110,101,108,59,10,32,32,32,32,115,116,114,117,99,116,32,100, 47 | 105,115,112,97,116,99,104,95,111,112,101,114,97,116,105,111,110,95,115,32,42, 48 | 95,100,111,112,101,114,97,116,105,111,110,59,10,32,32,32,32,115,116,114,117, 49 | 99,116,32,100,105,115,112,97,116,99,104,95,100,105,115,107,95,115,32,42,95, 50 | 100,100,105,115,107,59,10,125,32,100,105,115,112,97,116,99,104,95,111,98,106, 51 | 101,99,116,95,116,32,95,95,97,116,116,114,105,98,117,116,101,95,95,40,40,116, 52 | 114,97,110,115,112,97,114,101,110,116,95,117,110,105,111,110,41,41,59,10,10, 53 | 47,47,32,113,117,101,117,101,46,104,10,116,121,112,101,100,101,102,32,115,116, 54 | 114,117,99,116,32,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,115, 55 | 32,42,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,116,59,10,116, 56 | 121,112,101,100,101,102,32,108,111,110,103,32,100,105,115,112,97,116,99,104, 57 | 95,113,117,101,117,101,95,112,114,105,111,114,105,116,121,95,116,59,10,10,115, 58 | 116,114,117,99,116,32,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95, 59 | 115,32,95,100,105,115,112,97,116,99,104,95,109,97,105,110,95,113,59,10,10,100, 60 | 105,115,112,97,116,99,104,95,113,117,101,117,101,95,116,32,100,105,115,112,97, 61 | 116,99,104,95,103,101,116,95,103,108,111,98,97,108,95,113,117,101,117,101,40, 62 | 108,111,110,103,32,105,100,101,110,116,105,102,105,101,114,44,32,117,110,115, 63 | 105,103,110,101,100,32,108,111,110,103,32,102,108,97,103,115,41,59,10,100,105, 64 | 115,112,97,116,99,104,95,113,117,101,117,101,95,116,32,100,105,115,112,97,116, 65 | 99,104,95,103,101,116,95,109,97,105,110,95,113,117,101,117,101,40,118,111,105, 66 | 100,41,59,10,10,118,111,105,100,32,100,105,115,112,97,116,99,104,95,97,115, 67 | 121,110,99,40,100,105,115,112,97,116,99,104,95,113,117,101,117,101,95,116,32, 68 | 113,117,101,117,101,44,32,105,100,32,98,108,111,99,107,41,59,10,118,111,105, 69 | 100,32,100,105,115,112,97,116,99,104,95,115,121,110,99,40,100,105,115,112,97, 70 | 116,99,104,95,113,117,101,117,101,95,116,32,113,117,101,117,101,44,32,105,100, 71 | 32,98,108,111,99,107,41,59,10,9,99,100,101,102,8,102,102,105,12,114,117,110, 72 | 116,105,109,101,0 73 | }; 74 | -------------------------------------------------------------------------------- /DynamOC/DynamBlock.m: -------------------------------------------------------------------------------- 1 | // 2 | // DynamBlock.m 3 | // Pods 4 | // 5 | // Created by Xuhui on 23/02/2017. 6 | // 7 | // 8 | 9 | #import "DynamBlock.h" 10 | #import "LuaContext+Private.h" 11 | #import 12 | 13 | enum { 14 | BLOCK_DEALLOCATING = (0x0001), // runtime 15 | BLOCK_REFCOUNT_MASK = (0xfffe), // runtime 16 | BLOCK_NEEDS_FREE = (1 << 24), // runtime 17 | BLOCK_HAS_COPY_DISPOSE = (1 << 25), // compiler 18 | BLOCK_HAS_CTOR = (1 << 26), // compiler: helpers have C++ code 19 | BLOCK_IS_GC = (1 << 27), // runtime 20 | BLOCK_IS_GLOBAL = (1 << 28), // compiler 21 | BLOCK_USE_STRET = (1 << 29), // compiler: undefined if !BLOCK_HAS_SIGNATURE 22 | BLOCK_HAS_SIGNATURE = (1 << 30), // compiler 23 | BLOCK_HAS_EXTENDED_LAYOUT=(1 << 31) // compiler 24 | }; 25 | 26 | struct Block { 27 | void *isa; 28 | int flags; 29 | int reserved; 30 | void (*invoke)(void *, ...); 31 | struct BlockDescriptor *descriptor; 32 | }; 33 | 34 | static void copy_block(DynamBlock *dst, const DynamBlock *src); 35 | static void dispose_block(const void *block); 36 | 37 | @interface DynamBlock () { 38 | id block_; 39 | } 40 | 41 | @property (nonatomic, weak) NSThread *createThread; 42 | @property (nonatomic, assign) BOOL copyed; 43 | @property (nonatomic, strong) NSData *codeDump; 44 | @property (nonatomic, strong) NSArray *upvalueDump; 45 | 46 | @end 47 | 48 | @implementation DynamBlock 49 | 50 | - (instancetype)initWithSignature:(NSString *)sig 51 | { 52 | self = [self init]; 53 | if(self) { 54 | self.createThread = [NSThread currentThread]; 55 | self.copyed = NO; 56 | self.signature = sig; 57 | flags = BLOCK_IS_GLOBAL; 58 | IMP msgForwardIMP = _objc_msgForward; 59 | #if !defined(__arm64__) 60 | if([sig hasPrefix:@"{"]) { 61 | NSMethodSignature *methodSignature = [NSMethodSignature signatureWithObjCTypes:sig.UTF8String]; 62 | if ([methodSignature.debugDescription rangeOfString:@"is special struct return? YES"].location != NSNotFound) { 63 | msgForwardIMP = (IMP)_objc_msgForward_stret; 64 | flags |= BLOCK_USE_STRET; 65 | } 66 | } 67 | #endif 68 | invoke = msgForwardIMP; 69 | descriptor = malloc(sizeof(struct BlockDescriptor)); 70 | descriptor->size = class_getInstanceSize([self class]); 71 | } 72 | return self; 73 | } 74 | 75 | - (instancetype)initWithBlockID:(NSInteger)blockID signature:(NSString *)sig 76 | { 77 | self = [self initWithSignature:sig]; 78 | if(self) { 79 | self.blockID = blockID; 80 | } 81 | return self; 82 | } 83 | 84 | - (void)dealloc 85 | { 86 | if(!self.copyed) { 87 | [self performSelector:@selector(cleanup:) onThread:self.createThread withObject:@(self.blockID) waitUntilDone:YES]; 88 | } else { 89 | 90 | } 91 | } 92 | 93 | - (void)cleanup:(NSInteger)blockID 94 | { 95 | free_block(blockID); 96 | } 97 | 98 | - (NSMethodSignature *)methodSignatureForSelector: (SEL)sel 99 | { 100 | NSMethodSignature *sig = [super methodSignatureForSelector:sel]; 101 | if(!sig) { 102 | const char *types = self.signature.UTF8String; 103 | sig = [NSMethodSignature signatureWithObjCTypes: types]; 104 | while([sig numberOfArguments] < 2) 105 | { 106 | types = [[NSString stringWithFormat: @"%s%s", types, @encode(void *)] UTF8String]; 107 | sig = [NSMethodSignature signatureWithObjCTypes: types]; 108 | } 109 | } 110 | return sig; 111 | } 112 | 113 | - (void)forwardInvocation:(NSInvocation *)invocation 114 | { 115 | if(self.copyed) { 116 | forward_block_code_invocation(self.codeDump, self.upvalueDump, invocation); 117 | } else { 118 | if([[NSThread currentThread] isEqual:self.createThread]) { 119 | forward_block_id_invocation(self.blockID, invocation); 120 | } else { 121 | if(!self.syncDispatch) { 122 | if(!self.dynamDispatch) { 123 | CFRetain((__bridge CFTypeRef)(self)); 124 | } 125 | [self performSelector:@selector(dumpBlockTo:) onThread:self.createThread withObject:self waitUntilDone:YES]; 126 | forward_block_code_invocation(self.codeDump, self.upvalueDump, invocation); 127 | if(self.dynamDispatch) { 128 | CFRelease((__bridge CFTypeRef)(self)); 129 | } 130 | } else { 131 | push_luacontext(get_luacontext(self.createThread)); 132 | forward_block_id_invocation(self.blockID, invocation); 133 | pop_luacontext(); 134 | } 135 | } 136 | } 137 | } 138 | 139 | - (id)copyWithZone:(NSZone *)zone 140 | { 141 | DynamBlock *block = [[DynamBlock allocWithZone:zone] initWithSignature:self.signature]; 142 | if(!self.copyed) { 143 | [self performSelector:@selector(dumpBlockTo:) onThread:self.createThread withObject:self waitUntilDone:YES]; 144 | } 145 | block.createThread = [NSThread currentThread]; 146 | block.codeDump = self.codeDump; 147 | block.upvalueDump = self.upvalueDump; 148 | block.copyed = YES; 149 | return block; 150 | } 151 | 152 | - (void)dumpBlockTo:(DynamBlock *)block 153 | { 154 | block.codeDump = [self dumpCode]; 155 | block.upvalueDump = [self dumpUpvalue]; 156 | } 157 | 158 | - (NSData *)dumpCode 159 | { 160 | return dump_block_code(self.blockID); 161 | } 162 | 163 | - (NSArray *)dumpUpvalue 164 | { 165 | return dump_block_upvalue(self.blockID); 166 | } 167 | 168 | @end 169 | -------------------------------------------------------------------------------- /DynamOC/cocoa32.h: -------------------------------------------------------------------------------- 1 | #define luaJIT_BC_cocoa32_SIZE 2385 2 | static const char luaJIT_BC_cocoa32[] = { 3 | 27,76,74,2,2,56,0,1,4,1,2,0,6,54,1,0,0,45,2,0,0,57,2,1,2,18,3,0,0,66,2,2,0,67, 4 | 1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,110,88,13,116,111,110, 5 | 117,109,98,101,114,56,0,1,4,1,2,0,6,54,1,0,0,45,2,0,0,57,2,1,2,18,3,0,0,66,2, 6 | 2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,100,88,13,116,111, 7 | 110,117,109,98,101,114,56,0,1,4,1,2,0,6,54,1,0,0,45,2,0,0,57,2,1,2,18,3,0,0, 8 | 66,2,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,97,120,88,13,116, 9 | 111,110,117,109,98,101,114,56,0,1,4,1,2,0,6,54,1,0,0,45,2,0,0,57,2,1,2,18,3,0, 10 | 0,66,2,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,110,89,13, 11 | 116,111,110,117,109,98,101,114,56,0,1,4,1,2,0,6,54,1,0,0,45,2,0,0,57,2,1,2,18, 12 | 3,0,0,66,2,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,100,89, 13 | 13,116,111,110,117,109,98,101,114,56,0,1,4,1,2,0,6,54,1,0,0,45,2,0,0,57,2,1,2, 14 | 18,3,0,0,66,2,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,97,120, 15 | 89,13,116,111,110,117,109,98,101,114,57,0,1,4,1,2,0,6,54,1,0,0,45,2,0,0,57,2, 16 | 1,2,18,3,0,0,66,2,2,0,67,1,0,0,1,192,19,67,71,82,101,99,116,71,101,116,87,105, 17 | 100,116,104,13,116,111,110,117,109,98,101,114,58,0,1,4,1,2,0,6,54,1,0,0,45,2, 18 | 0,0,57,2,1,2,18,3,0,0,66,2,2,0,67,1,0,0,1,192,20,67,71,82,101,99,116,71,101, 19 | 116,72,101,105,103,104,116,13,116,111,110,117,109,98,101,114,254,14,3,0,6,0, 20 | 39,0,69,54,0,0,0,57,0,1,0,57,1,2,0,39,2,3,0,66,1,2,1,57,1,4,0,52,2,0,0,57,3,6, 21 | 0,39,4,7,0,66,3,2,2,61,3,5,2,57,3,6,0,39,4,9,0,66,3,2,2,61,3,8,2,57,3,6,0,39, 22 | 4,11,0,66,3,2,2,61,3,10,2,57,3,6,0,39,4,13,0,66,3,2,2,61,3,12,2,57,3,15,0,57, 23 | 4,12,2,41,5,0,0,66,3,3,2,61,3,14,2,57,3,15,0,57,4,12,2,41,5,1,0,66,3,3,2,61,3, 24 | 16,2,57,3,15,0,57,4,12,2,41,5,2,0,66,3,3,2,61,3,17,2,57,3,15,0,57,4,12,2,41,5, 25 | 3,0,66,3,3,2,61,3,18,2,57,3,19,1,61,3,19,2,57,3,20,1,61,3,20,2,57,3,21,1,61,3, 26 | 21,2,57,3,22,1,61,3,22,2,51,3,24,0,61,3,23,2,51,3,26,0,61,3,25,2,51,3,28,0,61, 27 | 3,27,2,51,3,30,0,61,3,29,2,51,3,32,0,61,3,31,2,51,3,34,0,61,3,33,2,51,3,36,0, 28 | 61,3,35,2,51,3,38,0,61,3,37,2,50,0,0,128,76,2,2,0,0,20,67,71,82,101,99,116,71, 29 | 101,116,72,101,105,103,104,116,0,19,67,71,82,101,99,116,71,101,116,87,105,100, 30 | 116,104,0,18,67,71,82,101,99,116,71,101,116,77,97,120,89,0,18,67,71,82,101,99, 31 | 116,71,101,116,77,105,100,89,0,18,67,71,82,101,99,116,71,101,116,77,105,110, 32 | 89,0,18,67,71,82,101,99,116,71,101,116,77,97,120,88,0,18,67,71,82,101,99,116, 33 | 71,101,116,77,105,100,88,0,18,67,71,82,101,99,116,71,101,116,77,105,110,88,15, 34 | 67,71,82,101,99,116,90,101,114,111,15,67,71,83,105,122,101,90,101,114,111,16, 35 | 67,71,80,111,105,110,116,90,101,114,111,10,78,83,76,111,103,33,85,73,84,97,98, 36 | 108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,83,117,98,116,105, 37 | 116,108,101,31,85,73,84,97,98,108,101,86,105,101,119,67,101,108,108,83,116, 38 | 121,108,101,86,97,108,117,101,50,31,85,73,84,97,98,108,101,86,105,101,119,67, 39 | 101,108,108,83,116,121,108,101,86,97,108,117,101,49,9,99,97,115,116,32,85,73, 40 | 84,97,98,108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,68,101,102, 41 | 97,117,108,116,30,101,110,117,109,32,85,73,84,97,98,108,101,86,105,101,119,67, 42 | 101,108,108,83,116,121,108,101,25,85,73,84,97,98,108,101,86,105,101,119,67, 43 | 101,108,108,83,116,121,108,101,18,115,116,114,117,99,116,32,67,71,82,101,99, 44 | 116,11,67,71,82,101,99,116,18,115,116,114,117,99,116,32,67,71,83,105,122,101, 45 | 11,67,71,83,105,122,101,19,115,116,114,117,99,116,32,67,71,80,111,105,110,116, 46 | 11,116,121,112,101,111,102,12,67,71,80,111,105,110,116,6,67,197,9,10,115,116, 47 | 114,117,99,116,32,67,71,83,105,122,101,32,123,10,32,32,32,32,67,71,70,108,111, 48 | 97,116,32,119,105,100,116,104,59,10,32,32,32,32,67,71,70,108,111,97,116,32, 49 | 104,101,105,103,104,116,59,10,125,59,10,116,121,112,101,100,101,102,32,115, 50 | 116,114,117,99,116,32,67,71,83,105,122,101,32,67,71,83,105,122,101,59,10,10, 51 | 115,116,114,117,99,116,32,67,71,80,111,105,110,116,32,123,10,32,32,32,32,67, 52 | 71,70,108,111,97,116,32,120,59,10,32,32,32,32,67,71,70,108,111,97,116,32,121, 53 | 59,10,125,59,10,10,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32, 54 | 67,71,80,111,105,110,116,32,67,71,80,111,105,110,116,59,10,115,116,114,117,99, 55 | 116,32,67,71,82,101,99,116,32,123,10,32,32,32,32,67,71,80,111,105,110,116,32, 56 | 111,114,105,103,105,110,59,10,32,32,32,32,67,71,83,105,122,101,32,115,105,122, 57 | 101,59,10,125,59,10,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32, 58 | 67,71,82,101,99,116,32,67,71,82,101,99,116,59,10,10,101,110,117,109,32,85,73, 59 | 84,97,98,108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,32,123,10, 60 | 32,32,32,32,85,73,84,97,98,108,101,86,105,101,119,67,101,108,108,83,116,121, 61 | 108,101,68,101,102,97,117,108,116,44,9,47,47,32,83,105,109,112,108,101,32,99, 62 | 101,108,108,32,119,105,116,104,32,116,101,120,116,32,108,97,98,101,108,32,97, 63 | 110,100,32,111,112,116,105,111,110,97,108,32,105,109,97,103,101,32,118,105, 64 | 101,119,32,40,98,101,104,97,118,105,111,114,32,111,102,32,85,73,84,97,98,108, 65 | 101,86,105,101,119,67,101,108,108,32,105,110,32,105,80,104,111,110,101,79,83, 66 | 32,50,46,120,41,10,32,32,32,32,85,73,84,97,98,108,101,86,105,101,119,67,101, 67 | 108,108,83,116,121,108,101,86,97,108,117,101,49,44,9,9,47,47,32,76,101,102, 68 | 116,32,97,108,105,103,110,101,100,32,108,97,98,101,108,32,111,110,32,108,101, 69 | 102,116,32,97,110,100,32,114,105,103,104,116,32,97,108,105,103,110,101,100,32, 70 | 108,97,98,101,108,32,111,110,32,114,105,103,104,116,32,119,105,116,104,32,98, 71 | 108,117,101,32,116,101,120,116,32,40,85,115,101,100,32,105,110,32,83,101,116, 72 | 116,105,110,103,115,41,10,32,32,32,32,85,73,84,97,98,108,101,86,105,101,119, 73 | 67,101,108,108,83,116,121,108,101,86,97,108,117,101,50,44,9,9,47,47,32,82,105, 74 | 103,104,116,32,97,108,105,103,110,101,100,32,108,97,98,101,108,32,111,110,32, 75 | 108,101,102,116,32,119,105,116,104,32,98,108,117,101,32,116,101,120,116,32,97, 76 | 110,100,32,108,101,102,116,32,97,108,105,103,110,101,100,32,108,97,98,101,108, 77 | 32,111,110,32,114,105,103,104,116,32,40,85,115,101,100,32,105,110,32,80,104, 78 | 111,110,101,47,67,111,110,116,97,99,116,115,41,10,32,32,32,32,85,73,84,97,98, 79 | 108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,83,117,98,116,105, 80 | 116,108,101,9,47,47,32,76,101,102,116,32,97,108,105,103,110,101,100,32,108,97, 81 | 98,101,108,32,111,110,32,116,111,112,32,97,110,100,32,108,101,102,116,32,97, 82 | 108,105,103,110,101,100,32,108,97,98,101,108,32,111,110,32,98,111,116,116,111, 83 | 109,32,119,105,116,104,32,103,114,97,121,32,116,101,120,116,32,40,85,115,101, 84 | 100,32,105,110,32,105,80,111,100,41,46,10,125,59,10,10,118,111,105,100,32,78, 85 | 83,76,111,103,40,105,100,32,102,111,114,109,97,116,44,32,46,46,46,41,59,10,10, 86 | 99,111,110,115,116,32,67,71,80,111,105,110,116,32,67,71,80,111,105,110,116,90, 87 | 101,114,111,59,10,99,111,110,115,116,32,67,71,83,105,122,101,32,67,71,83,105, 88 | 122,101,90,101,114,111,59,10,99,111,110,115,116,32,67,71,82,101,99,116,32,67, 89 | 71,82,101,99,116,90,101,114,111,59,10,67,71,70,108,111,97,116,32,67,71,82,101, 90 | 99,116,71,101,116,77,105,110,88,40,67,71,82,101,99,116,32,114,101,99,116,41, 91 | 59,10,67,71,70,108,111,97,116,32,67,71,82,101,99,116,71,101,116,77,105,100,88, 92 | 40,67,71,82,101,99,116,32,114,101,99,116,41,59,10,67,71,70,108,111,97,116,32, 93 | 67,71,82,101,99,116,71,101,116,77,97,120,88,40,67,71,82,101,99,116,32,114,101, 94 | 99,116,41,59,10,67,71,70,108,111,97,116,32,67,71,82,101,99,116,71,101,116,77, 95 | 105,110,89,40,67,71,82,101,99,116,32,114,101,99,116,41,59,10,67,71,70,108,111, 96 | 97,116,32,67,71,82,101,99,116,71,101,116,77,105,100,89,40,67,71,82,101,99,116, 97 | 32,114,101,99,116,41,59,10,67,71,70,108,111,97,116,32,67,71,82,101,99,116,71, 98 | 101,116,77,97,120,89,40,67,71,82,101,99,116,32,114,101,99,116,41,59,10,67,71, 99 | 70,108,111,97,116,32,67,71,82,101,99,116,71,101,116,87,105,100,116,104,40,67, 100 | 71,82,101,99,116,32,114,101,99,116,41,59,10,67,71,70,108,111,97,116,32,67,71, 101 | 82,101,99,116,71,101,116,72,101,105,103,104,116,40,67,71,82,101,99,116,32,114, 102 | 101,99,116,41,59,10,10,9,99,100,101,102,8,102,102,105,12,114,117,110,116,105, 103 | 109,101,0 104 | }; 105 | -------------------------------------------------------------------------------- /DynamOC/cocoa64.h: -------------------------------------------------------------------------------- 1 | #define luaJIT_BC_cocoa64_SIZE 2385 2 | static const char luaJIT_BC_cocoa64[] = { 3 | 27,76,74,2,10,56,0,1,6,1,2,0,6,54,1,0,0,45,3,0,0,57,3,1,3,18,5,0,0,66,3,2,0, 4 | 67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,110,88,13,116,111,110, 5 | 117,109,98,101,114,56,0,1,6,1,2,0,6,54,1,0,0,45,3,0,0,57,3,1,3,18,5,0,0,66,3, 6 | 2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,100,88,13,116,111, 7 | 110,117,109,98,101,114,56,0,1,6,1,2,0,6,54,1,0,0,45,3,0,0,57,3,1,3,18,5,0,0, 8 | 66,3,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,97,120,88,13,116, 9 | 111,110,117,109,98,101,114,56,0,1,6,1,2,0,6,54,1,0,0,45,3,0,0,57,3,1,3,18,5,0, 10 | 0,66,3,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,110,89,13, 11 | 116,111,110,117,109,98,101,114,56,0,1,6,1,2,0,6,54,1,0,0,45,3,0,0,57,3,1,3,18, 12 | 5,0,0,66,3,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,105,100,89, 13 | 13,116,111,110,117,109,98,101,114,56,0,1,6,1,2,0,6,54,1,0,0,45,3,0,0,57,3,1,3, 14 | 18,5,0,0,66,3,2,0,67,1,0,0,1,192,18,67,71,82,101,99,116,71,101,116,77,97,120, 15 | 89,13,116,111,110,117,109,98,101,114,57,0,1,6,1,2,0,6,54,1,0,0,45,3,0,0,57,3, 16 | 1,3,18,5,0,0,66,3,2,0,67,1,0,0,1,192,19,67,71,82,101,99,116,71,101,116,87,105, 17 | 100,116,104,13,116,111,110,117,109,98,101,114,58,0,1,6,1,2,0,6,54,1,0,0,45,3, 18 | 0,0,57,3,1,3,18,5,0,0,66,3,2,0,67,1,0,0,1,192,20,67,71,82,101,99,116,71,101, 19 | 116,72,101,105,103,104,116,13,116,111,110,117,109,98,101,114,254,14,3,0,7,0, 20 | 39,0,69,54,0,0,0,57,0,1,0,57,1,2,0,39,3,3,0,66,1,2,1,57,1,4,0,52,2,0,0,57,3,6, 21 | 0,39,5,7,0,66,3,2,2,61,3,5,2,57,3,6,0,39,5,9,0,66,3,2,2,61,3,8,2,57,3,6,0,39, 22 | 5,11,0,66,3,2,2,61,3,10,2,57,3,6,0,39,5,13,0,66,3,2,2,61,3,12,2,57,3,15,0,57, 23 | 5,12,2,41,6,0,0,66,3,3,2,61,3,14,2,57,3,15,0,57,5,12,2,41,6,1,0,66,3,3,2,61,3, 24 | 16,2,57,3,15,0,57,5,12,2,41,6,2,0,66,3,3,2,61,3,17,2,57,3,15,0,57,5,12,2,41,6, 25 | 3,0,66,3,3,2,61,3,18,2,57,3,19,1,61,3,19,2,57,3,20,1,61,3,20,2,57,3,21,1,61,3, 26 | 21,2,57,3,22,1,61,3,22,2,51,3,24,0,61,3,23,2,51,3,26,0,61,3,25,2,51,3,28,0,61, 27 | 3,27,2,51,3,30,0,61,3,29,2,51,3,32,0,61,3,31,2,51,3,34,0,61,3,33,2,51,3,36,0, 28 | 61,3,35,2,51,3,38,0,61,3,37,2,50,0,0,128,76,2,2,0,0,20,67,71,82,101,99,116,71, 29 | 101,116,72,101,105,103,104,116,0,19,67,71,82,101,99,116,71,101,116,87,105,100, 30 | 116,104,0,18,67,71,82,101,99,116,71,101,116,77,97,120,89,0,18,67,71,82,101,99, 31 | 116,71,101,116,77,105,100,89,0,18,67,71,82,101,99,116,71,101,116,77,105,110, 32 | 89,0,18,67,71,82,101,99,116,71,101,116,77,97,120,88,0,18,67,71,82,101,99,116, 33 | 71,101,116,77,105,100,88,0,18,67,71,82,101,99,116,71,101,116,77,105,110,88,15, 34 | 67,71,82,101,99,116,90,101,114,111,15,67,71,83,105,122,101,90,101,114,111,16, 35 | 67,71,80,111,105,110,116,90,101,114,111,10,78,83,76,111,103,33,85,73,84,97,98, 36 | 108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,83,117,98,116,105, 37 | 116,108,101,31,85,73,84,97,98,108,101,86,105,101,119,67,101,108,108,83,116, 38 | 121,108,101,86,97,108,117,101,50,31,85,73,84,97,98,108,101,86,105,101,119,67, 39 | 101,108,108,83,116,121,108,101,86,97,108,117,101,49,9,99,97,115,116,32,85,73, 40 | 84,97,98,108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,68,101,102, 41 | 97,117,108,116,30,101,110,117,109,32,85,73,84,97,98,108,101,86,105,101,119,67, 42 | 101,108,108,83,116,121,108,101,25,85,73,84,97,98,108,101,86,105,101,119,67, 43 | 101,108,108,83,116,121,108,101,18,115,116,114,117,99,116,32,67,71,82,101,99, 44 | 116,11,67,71,82,101,99,116,18,115,116,114,117,99,116,32,67,71,83,105,122,101, 45 | 11,67,71,83,105,122,101,19,115,116,114,117,99,116,32,67,71,80,111,105,110,116, 46 | 11,116,121,112,101,111,102,12,67,71,80,111,105,110,116,6,67,197,9,10,115,116, 47 | 114,117,99,116,32,67,71,83,105,122,101,32,123,10,32,32,32,32,67,71,70,108,111, 48 | 97,116,32,119,105,100,116,104,59,10,32,32,32,32,67,71,70,108,111,97,116,32, 49 | 104,101,105,103,104,116,59,10,125,59,10,116,121,112,101,100,101,102,32,115, 50 | 116,114,117,99,116,32,67,71,83,105,122,101,32,67,71,83,105,122,101,59,10,10, 51 | 115,116,114,117,99,116,32,67,71,80,111,105,110,116,32,123,10,32,32,32,32,67, 52 | 71,70,108,111,97,116,32,120,59,10,32,32,32,32,67,71,70,108,111,97,116,32,121, 53 | 59,10,125,59,10,10,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32, 54 | 67,71,80,111,105,110,116,32,67,71,80,111,105,110,116,59,10,115,116,114,117,99, 55 | 116,32,67,71,82,101,99,116,32,123,10,32,32,32,32,67,71,80,111,105,110,116,32, 56 | 111,114,105,103,105,110,59,10,32,32,32,32,67,71,83,105,122,101,32,115,105,122, 57 | 101,59,10,125,59,10,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32, 58 | 67,71,82,101,99,116,32,67,71,82,101,99,116,59,10,10,101,110,117,109,32,85,73, 59 | 84,97,98,108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,32,123,10, 60 | 32,32,32,32,85,73,84,97,98,108,101,86,105,101,119,67,101,108,108,83,116,121, 61 | 108,101,68,101,102,97,117,108,116,44,9,47,47,32,83,105,109,112,108,101,32,99, 62 | 101,108,108,32,119,105,116,104,32,116,101,120,116,32,108,97,98,101,108,32,97, 63 | 110,100,32,111,112,116,105,111,110,97,108,32,105,109,97,103,101,32,118,105, 64 | 101,119,32,40,98,101,104,97,118,105,111,114,32,111,102,32,85,73,84,97,98,108, 65 | 101,86,105,101,119,67,101,108,108,32,105,110,32,105,80,104,111,110,101,79,83, 66 | 32,50,46,120,41,10,32,32,32,32,85,73,84,97,98,108,101,86,105,101,119,67,101, 67 | 108,108,83,116,121,108,101,86,97,108,117,101,49,44,9,9,47,47,32,76,101,102, 68 | 116,32,97,108,105,103,110,101,100,32,108,97,98,101,108,32,111,110,32,108,101, 69 | 102,116,32,97,110,100,32,114,105,103,104,116,32,97,108,105,103,110,101,100,32, 70 | 108,97,98,101,108,32,111,110,32,114,105,103,104,116,32,119,105,116,104,32,98, 71 | 108,117,101,32,116,101,120,116,32,40,85,115,101,100,32,105,110,32,83,101,116, 72 | 116,105,110,103,115,41,10,32,32,32,32,85,73,84,97,98,108,101,86,105,101,119, 73 | 67,101,108,108,83,116,121,108,101,86,97,108,117,101,50,44,9,9,47,47,32,82,105, 74 | 103,104,116,32,97,108,105,103,110,101,100,32,108,97,98,101,108,32,111,110,32, 75 | 108,101,102,116,32,119,105,116,104,32,98,108,117,101,32,116,101,120,116,32,97, 76 | 110,100,32,108,101,102,116,32,97,108,105,103,110,101,100,32,108,97,98,101,108, 77 | 32,111,110,32,114,105,103,104,116,32,40,85,115,101,100,32,105,110,32,80,104, 78 | 111,110,101,47,67,111,110,116,97,99,116,115,41,10,32,32,32,32,85,73,84,97,98, 79 | 108,101,86,105,101,119,67,101,108,108,83,116,121,108,101,83,117,98,116,105, 80 | 116,108,101,9,47,47,32,76,101,102,116,32,97,108,105,103,110,101,100,32,108,97, 81 | 98,101,108,32,111,110,32,116,111,112,32,97,110,100,32,108,101,102,116,32,97, 82 | 108,105,103,110,101,100,32,108,97,98,101,108,32,111,110,32,98,111,116,116,111, 83 | 109,32,119,105,116,104,32,103,114,97,121,32,116,101,120,116,32,40,85,115,101, 84 | 100,32,105,110,32,105,80,111,100,41,46,10,125,59,10,10,118,111,105,100,32,78, 85 | 83,76,111,103,40,105,100,32,102,111,114,109,97,116,44,32,46,46,46,41,59,10,10, 86 | 99,111,110,115,116,32,67,71,80,111,105,110,116,32,67,71,80,111,105,110,116,90, 87 | 101,114,111,59,10,99,111,110,115,116,32,67,71,83,105,122,101,32,67,71,83,105, 88 | 122,101,90,101,114,111,59,10,99,111,110,115,116,32,67,71,82,101,99,116,32,67, 89 | 71,82,101,99,116,90,101,114,111,59,10,67,71,70,108,111,97,116,32,67,71,82,101, 90 | 99,116,71,101,116,77,105,110,88,40,67,71,82,101,99,116,32,114,101,99,116,41, 91 | 59,10,67,71,70,108,111,97,116,32,67,71,82,101,99,116,71,101,116,77,105,100,88, 92 | 40,67,71,82,101,99,116,32,114,101,99,116,41,59,10,67,71,70,108,111,97,116,32, 93 | 67,71,82,101,99,116,71,101,116,77,97,120,88,40,67,71,82,101,99,116,32,114,101, 94 | 99,116,41,59,10,67,71,70,108,111,97,116,32,67,71,82,101,99,116,71,101,116,77, 95 | 105,110,89,40,67,71,82,101,99,116,32,114,101,99,116,41,59,10,67,71,70,108,111, 96 | 97,116,32,67,71,82,101,99,116,71,101,116,77,105,100,89,40,67,71,82,101,99,116, 97 | 32,114,101,99,116,41,59,10,67,71,70,108,111,97,116,32,67,71,82,101,99,116,71, 98 | 101,116,77,97,120,89,40,67,71,82,101,99,116,32,114,101,99,116,41,59,10,67,71, 99 | 70,108,111,97,116,32,67,71,82,101,99,116,71,101,116,87,105,100,116,104,40,67, 100 | 71,82,101,99,116,32,114,101,99,116,41,59,10,67,71,70,108,111,97,116,32,67,71, 101 | 82,101,99,116,71,101,116,72,101,105,103,104,116,40,67,71,82,101,99,116,32,114, 102 | 101,99,116,41,59,10,10,9,99,100,101,102,8,102,102,105,12,114,117,110,116,105, 103 | 109,101,0 104 | }; 105 | -------------------------------------------------------------------------------- /DynamOC/LuaContext.m: -------------------------------------------------------------------------------- 1 | // 2 | // LuaContext.m 3 | // DynamOC 4 | // 5 | // Created by 徐晖 on 2017/1/12. 6 | // Copyright © 2017年 徐晖. All rights reserved. 7 | // 8 | 9 | #import "LuaContext.h" 10 | #import "LuaContext+Private.h" 11 | #import "NSObject+DynamOC.h" 12 | #import "DynamBlock.h" 13 | #import "DynamMethod.h" 14 | #include "lua.h" 15 | #include "lualib.h" 16 | #include "lauxlib.h" 17 | #include "dynamoc.h" 18 | #import 19 | #import 20 | 21 | #define kThreadLocalLuaContextKey @"kThreadLocalLuaContextKey" 22 | 23 | #define register_sym(sym) do { \ 24 | dyoc_register_sym(#sym, (void *)&sym); \ 25 | } while(false) 26 | 27 | @class DynamBlock; 28 | @class DynamUpvalue; 29 | @class DynamMethodDesc; 30 | 31 | void forward_invocation(id target, SEL selector, id invocation); 32 | void forward_block_id_invocation(NSInteger blockID, id invocation); 33 | void forward_block_code_invocation(NSData *code, NSArray *upvalues, id invocation); 34 | LuaContext *get_luacontext(NSThread *thread); 35 | LuaContext *get_current_luacontext(); 36 | void push_luacontext(LuaContext *context); 37 | void pop_luacontext(); 38 | void free_method(NSInteger methodID); 39 | void free_block(NSInteger blockID); 40 | NSData *dump_block_code(NSInteger blockID); 41 | NSArray *dump_block_upvalue(NSInteger blockID); 42 | DynamMethodDesc *dynamMethodDescFromMethodNameWithUnderscores(id object, const char *name, BOOL isClass); 43 | const char* methodTypeFromDynamMethodDesc(DynamMethodDesc *desc); 44 | BOOL isSpecialStructReturnFromDynamMethodDesc(id desc); 45 | SEL selFromDynamMethodDesc(id desc); 46 | 47 | NSInteger kInvalidMethodID = -1; 48 | 49 | static int buf_writer( lua_State *L, const void* b, size_t n, void *B ) { 50 | luaL_addlstring((luaL_Buffer *)B, (const char *)b, n); 51 | return 0; 52 | } 53 | 54 | static int register_lambda(lua_State *L) 55 | { 56 | lua_pushvalue(L, -1); 57 | int closureId = luaL_ref(L, LUA_REGISTRYINDEX); 58 | lua_pushinteger(L, closureId); 59 | return 1; 60 | } 61 | 62 | @interface DynamMethodDesc : NSObject 63 | 64 | @property (nonatomic, copy) NSString *methodTypeEncoding; 65 | @property (nonatomic, assign) SEL sel; 66 | @property (nonatomic, assign) BOOL isSpecialStructReturn; 67 | 68 | @end 69 | 70 | @implementation DynamMethodDesc 71 | @end 72 | 73 | @interface DynamMethodCache : NSObject { 74 | } 75 | 76 | @property (nonatomic, weak) NSThread *thread; 77 | @property (nonatomic, assign) NSInteger methodID; 78 | 79 | @end 80 | 81 | @implementation DynamMethodCache 82 | 83 | - (void)dealloc 84 | { 85 | [self performSelector:@selector(cleanup) onThread:self.thread withObject:nil waitUntilDone:YES]; 86 | } 87 | 88 | - (void)cleanup 89 | { 90 | free_method(_methodID); 91 | } 92 | 93 | @end 94 | 95 | @interface LuaContext () { 96 | lua_State *_L; 97 | } 98 | 99 | @property (nonatomic, strong) id argumentRegister; 100 | @property (nonatomic, strong) id returnRegister; 101 | @property (nonatomic, weak) NSThread *thread; 102 | @property (nonatomic, strong) NSCache *methodCache; 103 | 104 | @end 105 | 106 | @implementation LuaContext 107 | 108 | + (void)initialize 109 | { 110 | // register_sym(objc_msgSend); 111 | //#if !defined(__arm64__) 112 | // register_sym(objc_msgSend_stret); 113 | //#endif 114 | // register_sym(objc_allocateClassPair); 115 | // register_sym(objc_registerClassPair); 116 | // register_sym(_objc_msgForward); 117 | //#if !defined(__arm64__) 118 | // register_sym(_objc_msgForward_stret); 119 | //#endif 120 | // register_sym(objc_getClass); 121 | // register_sym(class_getName); 122 | // register_sym(class_getMethodImplementation); 123 | // register_sym(class_getInstanceMethod); 124 | // register_sym(class_getClassMethod); 125 | // register_sym(class_respondsToSelector); 126 | // register_sym(class_getSuperclass); 127 | // register_sym(class_replaceMethod); 128 | // register_sym(class_addMethod); 129 | // register_sym(class_addIvar); 130 | // register_sym(class_addProperty); 131 | // //register_sym(objc_getProperty); 132 | // //register_sym(objc_setProperty); 133 | // //register_sym(objc_copyStruct); 134 | // register_sym(object_getClass); 135 | // register_sym(object_getClassName); 136 | // //register_sym(object_getInstanceVariable); 137 | // register_sym(method_getName); 138 | // register_sym(method_getNumberOfArguments); 139 | // register_sym(method_getReturnType); 140 | // register_sym(method_getArgumentType); 141 | // register_sym(method_getImplementation); 142 | // register_sym(method_getTypeEncoding); 143 | // register_sym(method_exchangeImplementations); 144 | // register_sym(ivar_getTypeEncoding); 145 | // register_sym(ivar_getOffset); 146 | // register_sym(sel_registerName); 147 | // register_sym(sel_getName); 148 | // register_sym(CFRetain); 149 | // register_sym(CFRelease); 150 | // register_sym(free); 151 | // register_sym(access); 152 | register_sym(forward_invocation); 153 | register_sym(get_current_luacontext); 154 | register_sym(dynamMethodDescFromMethodNameWithUnderscores); 155 | register_sym(methodTypeFromDynamMethodDesc); 156 | register_sym(isSpecialStructReturnFromDynamMethodDesc); 157 | register_sym(selFromDynamMethodDesc); 158 | register_sym(kInvalidMethodID); 159 | } 160 | 161 | + (NSBundle *)dynamOCBundle 162 | { 163 | NSBundle *superBundle = [NSBundle bundleForClass:[LuaContext class]]; 164 | NSURL *bundleURL = [superBundle URLForResource:@"DynamOC" withExtension:@"bundle"]; 165 | return bundleURL ? [NSBundle bundleWithURL:bundleURL] : nil; 166 | } 167 | 168 | + (NSRecursiveLock *)contextLock 169 | { 170 | static NSRecursiveLock *lock; 171 | static dispatch_once_t onceToken; 172 | dispatch_once(&onceToken, ^{ 173 | lock = [[NSRecursiveLock alloc] init]; 174 | }); 175 | return lock; 176 | } 177 | 178 | + (LuaContext *)currentContext 179 | { 180 | return [self contextForThread:[NSThread currentThread]]; 181 | } 182 | 183 | + (LuaContext *)contextForThread:(NSThread *)thread 184 | { 185 | [[self contextLock] lock]; 186 | NSMutableArray *contexts = [thread.threadDictionary objectForKey:kThreadLocalLuaContextKey]; 187 | if(!contexts || contexts.count <= 0) { 188 | contexts = [NSMutableArray array]; 189 | LuaContext *context = [[LuaContext alloc] init]; 190 | [contexts addObject:context]; 191 | [thread.threadDictionary setObject:contexts forKey:kThreadLocalLuaContextKey]; 192 | } 193 | LuaContext *context = contexts.lastObject; 194 | [[self contextLock] unlock]; 195 | return context; 196 | } 197 | 198 | + (void)pushContext:(LuaContext *)context 199 | { 200 | [[self contextLock] lock]; 201 | NSMutableArray *contexts = [[NSThread currentThread].threadDictionary objectForKey:kThreadLocalLuaContextKey]; 202 | if(!contexts) { 203 | contexts = [NSMutableArray array]; 204 | [[NSThread currentThread].threadDictionary setObject:contexts forKey:kThreadLocalLuaContextKey]; 205 | } 206 | [contexts addObject:context]; 207 | [[self contextLock] unlock]; 208 | } 209 | 210 | + (void)popContext 211 | { 212 | [[self contextLock] lock]; 213 | NSMutableArray *contexts = [[NSThread currentThread].threadDictionary objectForKey:kThreadLocalLuaContextKey]; 214 | [contexts removeLastObject]; 215 | [[self contextLock] unlock]; 216 | } 217 | 218 | - (instancetype)init 219 | { 220 | self = [super init]; 221 | if(self) { 222 | self.thread = [NSThread currentThread]; 223 | _methodCache = [[NSCache alloc] init]; 224 | _L = luaL_newstate(); 225 | if(_L) { 226 | luaL_openlibs(_L ); 227 | NSString *scriptDirectory = [[NSBundle mainBundle] resourcePath]; 228 | if([LuaContext dynamOCBundle]) { 229 | scriptDirectory = [[LuaContext dynamOCBundle] resourcePath]; 230 | } 231 | lua_pushstring(_L, scriptDirectory.UTF8String); 232 | lua_setglobal(_L, "__scriptDirectory"); 233 | NSString *bootFilePath = [[LuaContext dynamOCBundle] pathForResource:@"boot" ofType:@"lua"]; 234 | const char *bootBuffer = [NSString stringWithContentsOfFile:bootFilePath encoding:NSUTF8StringEncoding error:0].UTF8String; 235 | size_t size = strlen(bootBuffer); 236 | lua_getglobal(_L, "debug"); 237 | lua_getfield(_L, -1, "traceback"); 238 | lua_replace(_L, -2); 239 | do { 240 | if (luaL_loadbuffer(_L, bootBuffer, size, NULL) == 0) { 241 | if(lua_pcall(_L, 0, 0, -2)) { 242 | NSLog(@"Uncaught Error: %@", [NSString stringWithUTF8String:lua_tostring(_L, -1)]); 243 | lua_pop(_L, 2); 244 | break; 245 | } 246 | lua_pop(_L, 1); 247 | lua_getglobal(_L, "runtime"); 248 | lua_pushcfunction(_L, register_lambda); 249 | lua_setfield(_L, -2, "registerLambda"); 250 | lua_pop(_L, 1); 251 | break; 252 | } 253 | lua_pop(_L, 2); 254 | } while (false); 255 | } 256 | } 257 | return self; 258 | } 259 | 260 | - (BOOL)evaluateScript:(NSString *)code error:(NSError **)error 261 | { 262 | lua_getglobal(_L, "debug"); 263 | lua_getfield(_L, -1, "traceback"); 264 | lua_replace(_L, -2); 265 | if(luaL_loadstring(_L, code.UTF8String) == 0) { 266 | if(lua_pcall(_L, 0, 0, -2)) { 267 | NSString *errorInfo = [NSString stringWithUTF8String:lua_tostring(_L, -1)]; 268 | NSLog(@"Uncaught Error: %@", errorInfo); 269 | lua_pop(_L, 2); 270 | if(error) { 271 | *error = [NSError errorWithDomain:kDynamOCErrorDomain code:DynamOCErrorCodeLuaRunError userInfo:@{NSLocalizedDescriptionKey : errorInfo}]; 272 | } 273 | return NO; 274 | } 275 | lua_pop(_L, 1); 276 | return YES; 277 | } 278 | lua_pop(_L, 1); 279 | if(error) { 280 | *error = [NSError errorWithDomain:kDynamOCErrorDomain code:DynamOCErrorCodeLuaCompileError userInfo:@{NSLocalizedDescriptionKey : @"lua compile error"}]; 281 | } 282 | return NO; 283 | } 284 | 285 | - (BOOL)forwardMethodCodeInvocation:(DynamMethod *)method 286 | { 287 | lua_getglobal(_L, "debug"); 288 | lua_getfield(_L, -1, "traceback"); 289 | lua_replace(_L, -2); 290 | lua_getglobal(_L, "runtime"); 291 | lua_getfield(_L, -1, "evaluateMethodCode"); 292 | lua_replace(_L, -2); 293 | lua_pushlightuserdata(_L, (void *)method.codeDump.bytes); 294 | lua_pushnumber(_L, method.codeDump.length); 295 | if(lua_pcall(_L, 2, 1, -4)) { 296 | NSLog(@"Uncaught Error: %@", [NSString stringWithUTF8String:lua_tostring(_L, -1)]); 297 | lua_pop(_L, 2); 298 | return NO; 299 | } 300 | NSInteger methodID = lua_tointeger(_L, -1); 301 | lua_pop(_L, 2); 302 | if(methodID != kInvalidMethodID) { 303 | DynamMethodCache *methodCache = [[DynamMethodCache alloc] init]; 304 | methodCache.methodID = methodID; 305 | methodCache.thread = [NSThread currentThread]; 306 | [self.methodCache setObject:methodCache forKey:method]; 307 | } 308 | return YES; 309 | } 310 | 311 | - (BOOL)forwardMethodIDInvocation:(NSInteger)methodID 312 | { 313 | lua_getglobal(_L, "debug"); 314 | lua_getfield(_L, -1, "traceback"); 315 | lua_replace(_L, -2); 316 | lua_getglobal(_L, "runtime"); 317 | lua_getfield(_L, -1, "evaluateMethod"); 318 | lua_replace(_L, -2); 319 | lua_rawgeti(_L, LUA_REGISTRYINDEX, methodID); 320 | if(lua_pcall(_L, 1, 0, -3)) { 321 | NSLog(@"Uncaught Error: %@", [NSString stringWithUTF8String:lua_tostring(_L, -1)]); 322 | lua_pop(_L, 2); 323 | return NO; 324 | } 325 | lua_pop(_L, 1); 326 | return YES; 327 | } 328 | 329 | - (BOOL)forwardBlockIDInvocation:(NSInteger)blockID 330 | { 331 | lua_getglobal(_L, "debug"); 332 | lua_getfield(_L, -1, "traceback"); 333 | lua_replace(_L, -2); 334 | lua_getglobal(_L, "runtime"); 335 | lua_getfield(_L, -1, "evaluateBlock"); 336 | lua_replace(_L, -2); 337 | lua_rawgeti(_L, LUA_REGISTRYINDEX, blockID); 338 | if(lua_pcall(_L, 1, 0, -3)) { 339 | NSLog(@"Uncaught Error: %@", [NSString stringWithUTF8String:lua_tostring(_L, -1)]); 340 | lua_pop(_L, 2); 341 | return NO; 342 | } 343 | lua_pop(_L, 1); 344 | return YES; 345 | } 346 | 347 | - (BOOL)forwardBlockCodeInvocation:(NSData *)code 348 | { 349 | lua_getglobal(_L, "debug"); 350 | lua_getfield(_L, -1, "traceback"); 351 | lua_replace(_L, -2); 352 | lua_getglobal(_L, "runtime"); 353 | lua_getfield(_L, -1, "evaluateBlockCode"); 354 | lua_replace(_L, -2); 355 | lua_pushlightuserdata(_L, code.bytes); 356 | lua_pushnumber(_L, code.length); 357 | if(lua_pcall(_L, 2, 0, -4)) { 358 | NSLog(@"Uncaught Error: %@", [NSString stringWithUTF8String:lua_tostring(_L, -1)]); 359 | lua_pop(_L, 2); 360 | return NO; 361 | } 362 | lua_pop(_L, 1); 363 | return YES; 364 | } 365 | 366 | - (void)forceGC 367 | { 368 | lua_getglobal(_L, "debug"); 369 | lua_getfield(_L, -1, "traceback"); 370 | lua_replace(_L, -2); 371 | lua_getglobal(_L, "runtime"); 372 | lua_getfield(_L, -1, "forceGC"); 373 | lua_replace(_L, -2); 374 | if(lua_pcall(_L, 0, 0, -2)) { 375 | NSLog(@"Uncaught Error: %@", [NSString stringWithUTF8String:lua_tostring(_L, -1)]); 376 | lua_pop(_L, 2); 377 | return; 378 | } 379 | lua_pop(_L, 1); 380 | } 381 | 382 | - (void)freeLuaMethod:(NSInteger)methodID 383 | { 384 | luaL_unref(_L, LUA_REGISTRYINDEX, methodID); 385 | } 386 | 387 | - (void)freeLuaBlock:(NSInteger)blockID 388 | { 389 | luaL_unref(_L, LUA_REGISTRYINDEX, blockID); 390 | } 391 | 392 | - (NSData *)dumpLuaBlockCode:(NSInteger)blockID 393 | { 394 | lua_rawgeti(_L, LUA_REGISTRYINDEX, blockID); 395 | luaL_Buffer b; 396 | luaL_buffinit(_L, &b); 397 | lua_dump(_L, buf_writer, &b); 398 | luaL_pushresult(&b); 399 | size_t size; 400 | const char *code = lua_tolstring(_L, -1, &size); 401 | NSData *data = [NSData dataWithBytes:code length:size]; 402 | lua_pop(_L, 2); 403 | return data; 404 | } 405 | 406 | - (NSArray *)dumpLuaBlockUpvalue:(NSInteger)blockID 407 | { 408 | lua_getglobal(_L, "debug"); 409 | lua_getfield(_L, -1, "traceback"); 410 | lua_replace(_L, -2); 411 | lua_getglobal(_L, "runtime"); 412 | lua_getfield(_L, -1, "dumpBlockUpvalues"); 413 | lua_replace(_L, -2); 414 | lua_rawgeti(_L, LUA_REGISTRYINDEX, blockID); 415 | if(lua_pcall(_L, 1, 0, -3)) { 416 | NSLog(@"Uncaught Error: %@", [NSString stringWithUTF8String:lua_tostring(_L, -1)]); 417 | lua_pop(_L, 2); 418 | return nil; 419 | } 420 | lua_pop(_L, 1); 421 | return self.returnRegister; 422 | } 423 | 424 | @end 425 | 426 | void forward_invocation(NSObject *target, SEL selector, NSInvocation *invocation) 427 | { 428 | @autoreleasepool { 429 | DynamMethod *method = [target.class __findDynamMethod:invocation.selector]; 430 | SEL sel = NSSelectorFromString(@"__forwardInvocation:"); 431 | if(method) { 432 | LuaContext *context = get_current_luacontext(); 433 | DynamMethodCache *methodCache = [context.methodCache objectForKey:method]; 434 | if(methodCache) { 435 | context.argumentRegister = @[invocation]; 436 | [context forwardMethodIDInvocation:methodCache.methodID]; 437 | } else { 438 | context.argumentRegister = @[method.upvalueDump, invocation]; 439 | [context forwardMethodCodeInvocation:method]; 440 | } 441 | [context forceGC]; 442 | } else if([target respondsToSelector:sel]) { 443 | [target performSelector:sel withObject:invocation]; 444 | } 445 | } 446 | } 447 | 448 | void forward_block_id_invocation(NSInteger callId, id invocation) 449 | { 450 | @autoreleasepool { 451 | LuaContext *context = get_current_luacontext(); 452 | context.argumentRegister = invocation; 453 | [context forwardBlockIDInvocation:callId]; 454 | [context forceGC]; 455 | } 456 | } 457 | 458 | void forward_block_code_invocation(NSData *code, NSArray *upvalues, id invocation) 459 | { 460 | @autoreleasepool { 461 | LuaContext *context = get_current_luacontext(); 462 | context.argumentRegister = @[upvalues, invocation]; 463 | [context forwardBlockCodeInvocation:code]; 464 | [context forceGC]; 465 | } 466 | } 467 | 468 | LuaContext *get_luacontext(NSThread *thread) 469 | { 470 | @autoreleasepool { 471 | return [LuaContext contextForThread:thread]; 472 | } 473 | } 474 | 475 | LuaContext *get_current_luacontext() 476 | { 477 | @autoreleasepool { 478 | return [LuaContext contextForThread:[NSThread currentThread]]; 479 | } 480 | } 481 | 482 | void push_luacontext(LuaContext *context) 483 | { 484 | @autoreleasepool { 485 | [LuaContext pushContext:context]; 486 | } 487 | } 488 | 489 | void pop_luacontext() 490 | { 491 | @autoreleasepool { 492 | [LuaContext popContext]; 493 | } 494 | } 495 | 496 | DynamBlock *create_block(NSInteger blockID, const char* signature) 497 | { 498 | @autoreleasepool { 499 | DynamBlock *block = [[DynamBlock alloc] initWithBlockID:blockID signature:[NSString stringWithUTF8String:signature]]; 500 | return block; 501 | } 502 | } 503 | 504 | void free_method(NSInteger methodID) 505 | { 506 | @autoreleasepool { 507 | LuaContext *context = get_current_luacontext(); 508 | [context freeLuaMethod:methodID]; 509 | } 510 | } 511 | 512 | void free_block(NSInteger blockID) 513 | { 514 | @autoreleasepool { 515 | LuaContext *context = get_current_luacontext(); 516 | [context freeLuaBlock:blockID]; 517 | } 518 | } 519 | 520 | NSData *dump_block_code(NSInteger blockID) 521 | { 522 | @autoreleasepool { 523 | LuaContext *context = get_current_luacontext(); 524 | return [context dumpLuaBlockCode:blockID]; 525 | } 526 | } 527 | 528 | NSArray *dump_block_upvalue(NSInteger blockID) 529 | { 530 | @autoreleasepool { 531 | LuaContext *context = get_current_luacontext(); 532 | context.returnRegister = [NSMutableArray array]; 533 | return [context dumpLuaBlockUpvalue:blockID]; 534 | } 535 | } 536 | 537 | NSString *selectorStringFromMethodNameWithUnderscores(const char *name) 538 | { 539 | @autoreleasepool { 540 | NSInteger len = strlen(name); 541 | char selName[len + 1]; 542 | selName[len] = '\0'; 543 | NSInteger colonIndex = len; 544 | bool needReplaceDoubleUnderscore = false; 545 | for (NSInteger i = len - 1; i >= 0 ; i--) { 546 | char c = name[i]; 547 | selName[i] = c; 548 | if(c == '_') { 549 | if(name[i + 1] != '_') { 550 | colonIndex = i; 551 | continue; 552 | } else { 553 | colonIndex = len; 554 | needReplaceDoubleUnderscore = true; 555 | } 556 | } 557 | if(colonIndex < len) { 558 | selName[colonIndex] = ':'; 559 | } 560 | } 561 | NSString *sel = [NSString stringWithUTF8String:selName]; 562 | return !needReplaceDoubleUnderscore ? sel : [sel stringByReplacingOccurrencesOfString:@"__" withString:@"_"]; 563 | } 564 | } 565 | 566 | DynamMethodDesc *dynamMethodDescFromMethodNameWithUnderscores(id object, const char *name, BOOL isClass) 567 | { 568 | @autoreleasepool { 569 | NSCache *cache = isClass ? [object __classMethodDescCache] : [[object class] __instanceMethodDescCache]; 570 | NSString *key = [NSString stringWithUTF8String:name]; 571 | DynamMethodDesc *desc = [cache objectForKey:key]; 572 | if(!desc) { 573 | NSString *selStr = selectorStringFromMethodNameWithUnderscores(name); 574 | SEL sel = NSSelectorFromString(selStr); 575 | NSMethodSignature *sig = [object methodSignatureForSelector:sel]; 576 | NSMutableString *typeEncoding = [NSMutableString string]; 577 | [typeEncoding appendString:[NSString stringWithUTF8String:sig.methodReturnType]]; 578 | for (NSInteger i = 0; i < sig.numberOfArguments; i++) { 579 | [typeEncoding appendString:[NSString stringWithUTF8String:[sig getArgumentTypeAtIndex:i]]]; 580 | } 581 | BOOL isSpecialStructReturn = NO; 582 | #if !defined(__arm64__) 583 | if ([typeEncoding hasPrefix:@"{"]) { 584 | //In some cases that returns struct, we should use the '_stret' API: 585 | //http://sealiesoftware.com/blog/archive/2008/10/30/objc_explain_objc_msgSend_stret.html 586 | //NSMethodSignature knows the detail but has no API to return, we can only get the info from debugDescription. 587 | if ([sig.debugDescription rangeOfString:@"is special struct return? YES"].location != NSNotFound) { 588 | isSpecialStructReturn = YES; 589 | } 590 | } 591 | #endif 592 | desc = [[DynamMethodDesc alloc] init]; 593 | desc.methodTypeEncoding = typeEncoding; 594 | desc.isSpecialStructReturn = isSpecialStructReturn; 595 | desc.sel = sel; 596 | [cache setObject:desc forKey:key]; 597 | } 598 | return desc; 599 | } 600 | } 601 | 602 | const char* methodTypeFromDynamMethodDesc(DynamMethodDesc *desc) 603 | { 604 | @autoreleasepool { 605 | return desc.methodTypeEncoding.UTF8String; 606 | } 607 | } 608 | 609 | BOOL isSpecialStructReturnFromDynamMethodDesc(DynamMethodDesc *desc) 610 | { 611 | @autoreleasepool { 612 | return desc.isSpecialStructReturn; 613 | } 614 | } 615 | 616 | SEL selFromDynamMethodDesc(DynamMethodDesc *desc) 617 | { 618 | @autoreleasepool { 619 | return desc.sel; 620 | } 621 | } 622 | -------------------------------------------------------------------------------- /DynamOC/runtime.lua: -------------------------------------------------------------------------------- 1 | local ffi = require("ffi") 2 | local bit = require("bit") 3 | local jit = require("jit") 4 | 5 | local objc = { 6 | debug = false, 7 | fallbackOnMsgSend = true, 8 | frameworkSearchPaths = { 9 | "/System/Library/Frameworks/%s.framework", 10 | "/Library/Frameworks/%s.framework", 11 | "~/Library/Frameworks/%s.framework" 12 | } 13 | } 14 | 15 | objc.ffi = ffi 16 | 17 | local function _log(...) 18 | if objc.debug == true then 19 | local args = {...} 20 | for i=1, #args do 21 | args[i] = tostring(args[i]) 22 | end 23 | io.stderr:write("[objc] "..table.concat(args, " ").."\n") 24 | end 25 | end 26 | 27 | if ffi.abi("64bit") then 28 | ffi.cdef([[ 29 | typedef double CGFloat; 30 | typedef long NSInteger; 31 | typedef unsigned long NSUInteger; 32 | ]]) 33 | else 34 | ffi.cdef([[ 35 | typedef float CGFloat; 36 | typedef int NSInteger; 37 | typedef unsigned int NSUInteger; 38 | ]]) 39 | end 40 | 41 | ffi.cdef[[ 42 | typedef struct _NSRange { 43 | NSUInteger location; 44 | NSUInteger length; 45 | } NSRange; 46 | typedef struct objc_class *Class; 47 | struct objc_class { Class isa; }; 48 | struct objc_object { Class isa; }; 49 | typedef struct objc_object *id; 50 | 51 | typedef struct objc_selector *SEL; 52 | typedef id (*IMP)(id, SEL, ...); 53 | typedef bool BOOL; 54 | typedef struct objc_method *Method; 55 | struct objc_method_description { SEL name; char *types; }; 56 | typedef struct objc_ivar *Ivar; 57 | 58 | typedef struct { 59 | const char *name; 60 | const char *value; 61 | } objc_property_attribute_t; 62 | 63 | id objc_msgSend(id theReceiver, SEL theSelector, ...); 64 | void objc_msgSend_stret(id self, SEL op, ...); 65 | Class objc_allocateClassPair(Class superclass, const char *name, size_t extraBytes); 66 | void objc_registerClassPair(Class cls); 67 | id _objc_msgForward(id receiver, SEL sel, ...); 68 | void _objc_msgForward_stret(id receiver, SEL sel, ...); 69 | 70 | Class objc_getClass(const char *name); 71 | const char *class_getName(Class cls); 72 | IMP class_getMethodImplementation(Class cls, SEL name); 73 | Method class_getInstanceMethod(Class aClass, SEL aSelector); 74 | Method class_getClassMethod(Class aClass, SEL aSelector); 75 | BOOL class_respondsToSelector(Class cls, SEL sel); 76 | Class class_getSuperclass(Class cls); 77 | IMP class_replaceMethod(Class cls, SEL name, IMP imp, const char *types); 78 | BOOL class_addMethod(Class cls, SEL name, IMP imp, const char *types); 79 | BOOL class_addIvar(Class cls, const char *name, size_t size, uint8_t alignment, const char *types); 80 | BOOL class_addProperty(Class cls, const char *name, const objc_property_attribute_t *attributes, unsigned int attributeCount); 81 | id objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, BOOL atomic); 82 | void objc_setProperty(id self, SEL _cmd, ptrdiff_t offset, id newValue, BOOL atomic, signed char shouldCopy); 83 | void objc_copyStruct(void *dest, const void *src, ptrdiff_t size, BOOL atomic, BOOL hasStrong); 84 | 85 | Class object_getClass(id object); 86 | const char *object_getClassName(id obj); 87 | Ivar object_getInstanceVariable(id obj, const char *name, void **outValue); 88 | 89 | SEL method_getName(Method method); 90 | unsigned method_getNumberOfArguments(Method method); 91 | void method_getReturnType(Method method, char *dst, size_t dst_len); 92 | void method_getArgumentType(Method method, unsigned int index, char *dst, size_t dst_len); 93 | IMP method_getImplementation(Method method); 94 | const char *method_getTypeEncoding(Method method); 95 | void method_exchangeImplementations(Method m1, Method m2); 96 | 97 | const char * ivar_getTypeEncoding(Ivar ivar); 98 | ptrdiff_t ivar_getOffset(Ivar ivar); 99 | 100 | SEL sel_registerName(const char *str); 101 | const char* sel_getName(SEL aSelector); 102 | 103 | id CFRetain(id cf); 104 | void CFRelease(id cf); 105 | 106 | void free(void *ptr); 107 | 108 | // Used to check if a file exists 109 | int access(const char *path, int amode); 110 | 111 | void forward_invocation(id target, SEL selector, id invocation); 112 | id get_current_luacontext(); 113 | id dynamMethodDescFromMethodNameWithUnderscores(id object, const char *name, BOOL isClass); 114 | const char* methodTypeFromDynamMethodDesc(id desc); 115 | BOOL isSpecialStructReturnFromDynamMethodDesc(id desc); 116 | SEL selFromDynamMethodDesc(id desc); 117 | enum DynamUpvalueType { 118 | kDynamUpvalueTypeDouble, 119 | kDynamUpvalueTypeInteger, 120 | kDynamUpvalueTypeUInteger, 121 | kDynamUpvalueTypeBoolean, 122 | kDynamUpvalueTypeString, 123 | kDynamUpvalueTypeBytes, 124 | kDynamUpvalueTypeObject 125 | }; 126 | 127 | NSInteger kInvalidMethodID; 128 | ]] 129 | 130 | local C = ffi.C 131 | objc.C = C 132 | 133 | function objc.loadFramework(name, absolute) 134 | if absolute then 135 | local path = name 136 | local a,b, name = path:find("([^./]+).framework$") 137 | path = path..name 138 | if ffi.load(path, true) then 139 | return 140 | end 141 | end 142 | 143 | for i,path in pairs(objc.frameworkSearchPaths) do 144 | path = path:format(name,name) 145 | if ffi.load(path, true) then 146 | return 147 | end 148 | end 149 | error("Error! Framework '"..name.."' not found.") 150 | end 151 | 152 | local function _release(obj) 153 | if objc.debug then 154 | _log("Releasing object of class", ffi.string(C.class_getName(obj:class())), ffi.cast("void*", obj), "Refcount: ", obj:retainCount()) 155 | end 156 | C.CFRelease(obj) 157 | end 158 | 159 | setmetatable(objc, { 160 | __index = function(t, key) 161 | local ret = C.objc_getClass(key) 162 | if ret == nil then 163 | return nil 164 | end 165 | t[key] = ret 166 | return ret 167 | end 168 | }) 169 | 170 | function objc.selToStr(sel) 171 | return ffi.string(ffi.C.sel_getName(sel)) 172 | end 173 | 174 | ffi.metatype("struct objc_selector", { __tostring = objc.selToStr }) 175 | 176 | local SEL=function(str) 177 | return ffi.C.sel_registerName(str) 178 | end 179 | objc.SEL = SEL 180 | 181 | local _classMethodCache = {}; objc.classMethodCache = _classMethodCache 182 | local _instanceMethodCache = {}; objc.instanceMethodCache = _instanceMethodCache 183 | 184 | local _classNameCache = setmetatable({}, { __mode = "k" }) 185 | local _impTypeCache = setmetatable({}, {__index=function(t,impSig) 186 | t[impSig] = ffi.typeof(impSig) 187 | return t[impSig] 188 | end}) 189 | local _idType = ffi.typeof("struct objc_object*") 190 | objc.idType = _idType 191 | local _UINT_MAX 192 | local _INT_MAX 193 | if ffi.abi("64bit") then 194 | _UINT_MAX = 18446744073709551615ULL 195 | _INT_MAX = 9223372036854775807LL 196 | else 197 | _UINT_MAX = 4294967295 198 | _INT_MAX = 2147483647 199 | end 200 | 201 | 202 | -- Parses an ObjC type encoding string into an array of type dictionaries 203 | function objc.parseTypeEncoding(str) 204 | local fieldIdx = 1 205 | local fields = { { name = "", type = "", indirection = 0, isConst = false} } 206 | local depth = 0 207 | local inQuotes = false 208 | local curField = fields[1] 209 | 210 | local temp, c 211 | for i=1, #str do 212 | c = str:sub(i,i) 213 | if c:find("^[{%(%[]") then depth = depth + 1 214 | elseif c:find("^[}%)%]]") then depth = depth - 1 215 | elseif c == '"' then inQuotes = not inQuotes; 216 | end 217 | 218 | if depth > 0 then 219 | curField.type = curField.type .. c 220 | elseif inQuotes == true and c ~= '"' then 221 | curField.name = curField.name .. c 222 | elseif c == "^" then curField.indirection = curField.indirection + 1 223 | elseif c == "r" then curField.isConst = true 224 | elseif c:find('^["nobNRVr%^%d]') == nil then -- Skip over type qualifiers and bitfields 225 | curField.type = curField.type .. c 226 | fieldIdx = fieldIdx + 1 227 | fields[fieldIdx] = { name = "", type = "", indirection = 0 } 228 | curField = fields[fieldIdx] 229 | end 230 | end 231 | -- If the last field was blank, remove it 232 | if #fields[fieldIdx].name == 0 then 233 | table.remove(fields, fieldIdx) 234 | end 235 | return fields 236 | end 237 | 238 | -- Parses an array encoding like [5i] 239 | local function _parseArrayEncoding(encoded) 240 | local unused, countEnd, count = encoded:find("%[([%d]+)") 241 | local unused, unused2, typeEnc = encoded:find("([^%d]+)%]") 242 | local type = objc.typeToCType(objc.parseTypeEncoding(typeEnc)[1]) 243 | if type == nil then 244 | return nil 245 | end 246 | return type, count 247 | end 248 | 249 | -- Parses a struct/union encoding like {CGPoint="x"d"y"d} 250 | local _definedStructs = setmetatable({}, { __mode = "kv" }) 251 | local function _parseStructOrUnionEncoding(encoded, isUnion) 252 | local pat = "{([^=}]+)[=}]" 253 | local keyword = "struct" 254 | if isUnion == true then 255 | pat = '%(([^=%)]+)[=%)]' 256 | keyword = "union" 257 | end 258 | 259 | local unused, nameEnd, name = encoded:find(pat) 260 | local typeEnc = encoded:sub(nameEnd+1, #encoded-1) 261 | local fields = objc.parseTypeEncoding(typeEnc, '"') 262 | 263 | if name == "?" then name = "" end -- ? means an anonymous struct/union 264 | 265 | if #fields <= 1 and name == "" then return keyword.."{} "..name 266 | elseif #fields <= 1 then return keyword.." "..name end 267 | 268 | local typeStr = _definedStructs[name] 269 | -- If the struct has been defined already, or does not have field name information, just return the name 270 | if typeStr ~= nil then 271 | return keyword.." "..name 272 | end 273 | 274 | typeStr = keyword.." "..name.." { " 275 | for i,f in pairs(fields) do 276 | local name = f.name 277 | if #name == 0 then name = "field"..tostring(i) end 278 | 279 | local type = objc.typeToCType(f, name) 280 | if type == nil then 281 | if objc.debug == true then _log("Unsupported type in ", keyword, name, ": ", f.type) end 282 | return nil 283 | end 284 | typeStr = typeStr .. type ..";" 285 | end 286 | typeStr = typeStr .." }" 287 | 288 | -- If the struct has a name we create a ctype and then just return the name for it. If it has none, we return the definition 289 | if #name > 0 then 290 | _definedStructs[name] = typeStr 291 | -- We need to wrap the def in a pcall so that we don't crash in case the struct is too big (As is the case with one in IOKit) 292 | local success, err = pcall(ffi.cdef, typeStr) 293 | if success == false then 294 | _log("Error loading struct ", name, ": ", err) 295 | end 296 | return keyword.." "..name 297 | else 298 | return typeStr 299 | end 300 | end 301 | 302 | local CGFloatEncode 303 | local NSIntegerEncode 304 | local NSUIntegerEncode 305 | if ffi.abi("64bit") then 306 | CGFloatEncode = "d" 307 | NSIntegerEncode = "q" 308 | NSUIntegerEncode = "Q" 309 | else 310 | CGFloatEncode = "f" 311 | NSIntegerEncode = "l" 312 | NSUIntegerEncode = "L" 313 | end 314 | local CGPointEncode = "{CGPoint="..CGFloatEncode..CGFloatEncode.."}" 315 | local CGSizeEncode = "{CGSize="..CGFloatEncode..CGFloatEncode.."}" 316 | local CGRectEncode = "{CGRect="..CGPointEncode..CGSizeEncode.."}" 317 | local UIEdgeInsetsEncode = "{UIEdgeInsets="..CGFloatEncode..CGFloatEncode..CGFloatEncode..CGFloatEncode.."}" 318 | 319 | objc.encode = {["CGFloat"] = CGFloatEncode, ["NSInteger"] = NSIntegerEncode, 320 | ["NSUInteger"] = NSUIntegerEncode, ["CGPoint"] = CGPointEncode, 321 | ["CGSize"] = CGSizeEncode, ["UIEdgeInsets"] = UIEdgeInsetsEncode, 322 | ["id"] = "@", ["void"] = "v", ["block"] = "@", 323 | ["SEL"] = ":", ["Class"] = "#", ["ptr"] = "^" } 324 | 325 | -- Takes a type table (contains type info for a single type, obtained using parseTypeEncoding), and converts it to a c signature 326 | -- The optional second argument specifies whether or not 327 | local _typeEncodings = { 328 | ["@"] = "id", ["#"] = "Class", ["c"] = "char", ["C"] = "unsigned char", 329 | ["s"] = "short", ["S"] = "unsigned short", ["i"] = "int", ["I"] = "unsigned int", 330 | ["l"] = "long", ["L"] = "unsigned long", ["q"] = "long long", ["Q"] = "unsigned long long", 331 | ["f"] = "float", ["d"] = "double", ["B"] = "BOOL", ["v"] = "void", ["^"] = "void *", ["?"] = "void *", 332 | ["*"] = "char *", [":"] = "SEL", ["?"] = "void", ["{"] = "struct", ["("] = "union", ["["] = "array" 333 | } 334 | function objc.typeToCType(type, varName) 335 | varName = varName or "" 336 | local ret = "" 337 | local encoding = type.type 338 | local ptrStr = ("*"):rep(type.indirection) 339 | 340 | -- Then type encodings 341 | local typeStr = _typeEncodings[encoding:sub(1,1)] 342 | 343 | if typeStr == nil then 344 | _log("Error! type encoding '", encoding, "' is not supported") 345 | return nil 346 | elseif typeStr == "union" then 347 | local unionType = _parseStructOrUnionEncoding(encoding, true) 348 | if unionType == nil then 349 | _log("Error! type encoding '", encoding, "' is not supported") 350 | return nil 351 | end 352 | ret = string.format("%s %s %s%s", ret, unionType, ptrStr, varName) 353 | elseif typeStr == "struct" then 354 | local structType = _parseStructOrUnionEncoding(encoding, false) 355 | if structType == nil then 356 | _log("Error! type encoding '", encoding, "' is not supported") 357 | return nil 358 | end 359 | ret = string.format("%s %s %s%s", ret, structType, ptrStr, varName) 360 | elseif typeStr == "array" then 361 | local arrType, arrCount = _parseArrayEncoding(encoding) 362 | if arrType == nil then 363 | _log("Error! type encoding '", encoding, "' is not supported") 364 | return nil 365 | end 366 | ret = string.format("%s %s%s[%d]", arrType, ptrStr, varName, arrCount) 367 | else 368 | ret = string.format("%s %s %s%s", ret, typeStr, ptrStr, varName) 369 | end 370 | 371 | return ret 372 | end 373 | -- Creates a C function signature string for the given types 374 | function objc.impSignatureForTypeEncoding(signature, name) 375 | name = name or "*" -- Default to an anonymous function pointer 376 | signature = signature or "v" 377 | 378 | local types = objc.parseTypeEncoding(signature) 379 | if types == nil or #types == 0 then 380 | return nil 381 | end 382 | local signature = objc.typeToCType(types[1]).." ("..name..")(" 383 | 384 | for i=2,#types do 385 | local type = objc.typeToCType(types[i], "p"..(i-1)) 386 | 387 | if type == nil then 388 | return nil 389 | end 390 | if i < #types then 391 | type = type.."," 392 | end 393 | signature = signature..type 394 | end 395 | 396 | return signature..")" 397 | end 398 | 399 | local _impTypeCache = {} 400 | function objc.impTypeForMethodTypeEncodeing(encoding) 401 | local impType = _impTypeCache[encoding] 402 | if impType == nil then 403 | local impSignature = objc.impSignatureForTypeEncoding(encoding) 404 | impType = ffi.typeof(impSignature) 405 | _impTypeCache[encoding] = impType 406 | end 407 | return impType 408 | end 409 | 410 | -- Convenience functions 411 | 412 | function objc.objToStr(aObj) -- Automatically called by tostring(object) 413 | if aObj == nil then 414 | return "nil" 415 | end 416 | return ffi.string(aObj:description():UTF8String()) 417 | end 418 | 419 | -- Converts a lua type to an objc object 420 | function objc.Obj(v) 421 | if type(v) == "number" then 422 | return objc.NSNum(v) 423 | elseif type(v) == "string" then 424 | return objc.NSStr(v) 425 | elseif type(v) == "table" then 426 | if #v == 0 then 427 | return objc.NSDic(v) 428 | else 429 | return objc.NSArr(v) 430 | end 431 | elseif type(v) == "cdata" then 432 | return ffi.cast(_idType, v) 433 | end 434 | return nil 435 | end 436 | function objc.NSStr(aStr) 437 | return objc.NSString:alloc():initWithUTF8String_(ffi.cast("char *", aStr)) 438 | end 439 | function objc.NSNum(aNum) 440 | return objc.NSNumber:numberWithDouble_(aNum) 441 | end 442 | function objc.NSArr(aTable) 443 | local ret = objc.NSMutableArray:array() 444 | for i,v in ipairs(aTable) do 445 | ret:addObject_(objc.Obj(v)) 446 | end 447 | return ret 448 | end 449 | function objc.NSDic(aTable) 450 | local ret = objc.NSMutableDictionary:dictionary() 451 | for k,v in pairs(aTable) do 452 | ret:setObject_forKey_(objc.Obj(v), objc.Obj(k)) 453 | end 454 | return ret 455 | end 456 | 457 | local _tonumber = tonumber 458 | local _doubleValSel = SEL("doubleValue") 459 | tonumber = function(val, ...) 460 | if type(val) == "cdata" and ffi.istype(_idType, val) and val:respondsToSelector(_doubleValSel) then 461 | return val:doubleValue() 462 | end 463 | return _tonumber(val, ...) 464 | end 465 | 466 | -- Method calls 467 | 468 | -- Takes a selector string (with colons replaced by underscores) and returns the number of arguments) 469 | function _argCountForSelArg(selArg) 470 | local counting = false 471 | local count = 0 472 | for i=1,#selArg do 473 | if counting == false then 474 | counting = (selArg:sub(i,i) ~= "_") 475 | elseif selArg:sub(i,i) == "_" then 476 | count = count + 1 477 | end 478 | end 479 | return count 480 | end 481 | 482 | -- Replaces all underscores except the ones at the beginning of the string by colons 483 | function _selectorFromSelArg(selArg) 484 | local replacing = false 485 | local count = 0 486 | for i=1,#selArg do 487 | if replacing == false then 488 | replacing = (selArg:sub(i,i) ~= "_") 489 | elseif selArg:sub(i,i) == "_" then 490 | selArg = table.concat{selArg:sub(1,i-1), ":", selArg:sub(i+1)} 491 | end 492 | end 493 | return selArg 494 | end 495 | 496 | -- Used as a __newindex metamethod 497 | local function _setter(self, key, value) 498 | -- TODO 所有的ivar都是用property实现 499 | local selector = "set"..key:sub(1,1):upper()..key:sub(2) 500 | if C.class_respondsToSelector(C.object_getClass(self), SEL(selector..":")) then 501 | return self[selector](self, value) 502 | elseif objc.fallbackOnMsgSend == true then 503 | return self:setValue_forKey_(Obj(value), NSStr(key)) 504 | else 505 | print("[objc] Key "..key.." not found") 506 | end 507 | end 508 | 509 | -- just an ugly getter to make it nicer to work with arrays in the repl. (Don't use this in your actual code please, 510 | -- I'll remove it when a better way presents itself) 511 | local function _getter(self, key) 512 | local idx = tonumber(key) 513 | if idx ~= nil then 514 | return self:objectAtIndex_(idx) 515 | else 516 | if C.class_respondsToSelector(C.object_getClass(self), SEL(key)) then 517 | return self[key](self) 518 | elseif objc.fallbackOnMsgSend == true then 519 | return self:valueForKey_(NSStr(key)) 520 | else 521 | print("[objc] Key "..key.." not found") 522 | end 523 | end 524 | end 525 | 526 | ffi.metatype("struct objc_class", { 527 | __call = function(self) 528 | error("[objc] Classes are not callable\n"..debug.traceback()) 529 | end, 530 | __tostring = objc.objToStr, 531 | __index = function(realSelf,selArg) 532 | return function(self, ...) 533 | if self ~= realSelf then 534 | error("[objc] Self not passed. You probably used dot instead of colon syntax\n"..debug.traceback()) 535 | return nil 536 | end 537 | 538 | local methodDesc = C.dynamMethodDescFromMethodNameWithUnderscores(ffi.cast(_idType, self), selArg, true) 539 | local impType = objc.impTypeForMethodTypeEncodeing(ffi.string(C.methodTypeFromDynamMethodDesc(methodDesc))) 540 | local imp = C.isSpecialStructReturnFromDynamMethodDesc(methodDesc) == false and ffi.cast(impType, C.objc_msgSend) or ffi.cast(impType, C.objc_msgSend_stret) 541 | local sel = C.selFromDynamMethodDesc(methodDesc) 542 | local success, ret = pcall(imp, ffi.cast(_idType, self), sel, ...) 543 | if success == false then 544 | error("Error calling '"..selArg.."': "..ret.."\n"..debug.traceback()) 545 | end 546 | 547 | if ffi.istype(_idType, ret) and ret ~= nil then 548 | if (selArg:sub(1,5) ~= "alloc" and selArg ~= "new") then 549 | if objc.debug then 550 | _log("Retaining object of class (sel:"..objc.selToStr(sel)..")", ffi.string(C.class_getName(C.object_getClass(ret))), ffi.cast("void*", ret)) 551 | end 552 | ret = C.CFRetain(ret) 553 | end 554 | if selArg:sub(1,5) ~= "alloc" then 555 | ret = ffi.gc(ret, _release) 556 | end 557 | end 558 | return ret 559 | end 560 | end, 561 | __newindex = _setter 562 | }) 563 | 564 | -- Returns a function that takes an object reference and the arguments to pass to the method. 565 | function objc.getInstanceMethodCaller(realSelf,selArg) 566 | return function(self, ...) 567 | if self ~= realSelf then 568 | error("[objc] Self not passed. You probably used dot instead of colon syntax") 569 | return nil 570 | end 571 | 572 | if self == nil then 573 | return nil 574 | end 575 | 576 | local methodDesc = C.dynamMethodDescFromMethodNameWithUnderscores(self, selArg, false) 577 | local impType = objc.impTypeForMethodTypeEncodeing(ffi.string(C.methodTypeFromDynamMethodDesc(methodDesc))) 578 | local imp = C.isSpecialStructReturnFromDynamMethodDesc(methodDesc) == false and ffi.cast(impType, C.objc_msgSend) or ffi.cast(impType, C.objc_msgSend_stret) 579 | local sel = C.selFromDynamMethodDesc(methodDesc) 580 | local success, ret = pcall(imp, self, sel, ...) 581 | if success == false then 582 | error("Error calling '"..selArg.."': "..ret.."\n"..debug.traceback()) 583 | end 584 | 585 | if ffi.istype(_idType, ret) and ret ~= nil and not (selArg == "retain" or selArg == "release") then 586 | if not (selArg:sub(1,4) == "init" or selArg:sub(1,4) == "copy" or selArg:sub(1,11) == "mutableCopy") then 587 | if objc.debug then 588 | _log("Retaining object of class (sel:"..objc.selToStr(sel)..")", ffi.string(C.class_getName(C.object_getClass(ret))), ffi.cast("void*", ret)) 589 | end 590 | ret = C.CFRetain(ret) 591 | end 592 | ret = ffi.gc(ret, _release) 593 | end 594 | return ret 595 | end 596 | end 597 | 598 | ffi.metatype("struct objc_object", { 599 | __call = _getter, -- Called using aObject[[key]], it's ugly, may be removed and should probably only be used when debugging in the repl 600 | __tostring = objc.objToStr, 601 | __index = objc.getInstanceMethodCaller, 602 | __newindex = _setter 603 | }) 604 | 605 | -- 606 | -- Introspection and class extension 607 | 608 | local function _getIvarInfo(instance, ivarName) 609 | local ivar = C.object_getInstanceVariable(instance, ivarName, nil) 610 | if ivar == nil then 611 | return nil 612 | end 613 | local typeEnc = ffi.string(C.ivar_getTypeEncoding(ivar)) 614 | local typeArr = objc.parseTypeEncoding(typeEnc) 615 | if typeArr == nil or #typeArr ~= 1 then 616 | return nil 617 | end 618 | local cType = objc.typeToCType(typeArr[1]) 619 | if cType == nil then 620 | return nil 621 | end 622 | local offset = C.ivar_getOffset(ivar) 623 | return ivar, offset, typeEnc, cType 624 | end 625 | 626 | objc.getIvarInfo = _getIvarInfo 627 | 628 | function addProperty(class, name, attributes) 629 | local count = 3 630 | for _ in pairs(attributes) do count = count + 1 end 631 | local cType = "objc_property_attribute_t[" .. count .. "]" 632 | local attrs = ffi.new(cType, {}) 633 | local index = 0; 634 | attrs[index].name = "T" 635 | attrs[index].value = attributes["typeEncoding"] 636 | index = index + 1 637 | if attributes["readOnly"] then 638 | attrs[index].name = "R" 639 | attrs[index].value = "" 640 | index = index + 1 641 | end 642 | if attributes["ownerShip"] then 643 | local ownerShip = attributes["ownerShip"] 644 | if ownerShip == "strong" then 645 | attrs[index].name = "&" 646 | attrs[index].value = "" 647 | index = index + 1 648 | elseif ownerShip == "weak" then 649 | attrs[index].name = "W" 650 | attrs[index].value = "" 651 | index = index + 1 652 | elseif ownerShip == "copy" then 653 | attrs[index].name = "C" 654 | attrs[index].value = "" 655 | index = index + 1 656 | end 657 | end 658 | if attributes["nonatomic"] then 659 | attrs[index].name = "N" 660 | attrs[index].value = "" 661 | index = index + 1 662 | end 663 | local setter = "set"..name:sub(1,1):upper()..name:sub(2)..":" 664 | if attributes["setterName"] then 665 | attrs[index].name = "S" 666 | attrs[index].value = attributes["setterName"] 667 | index = index + 1 668 | else 669 | attrs[index].name = "S" 670 | attrs[index].value = setter 671 | local ivarName = attributes["ivarName"] or "_"..name 672 | local shouldCopy = attributes["ownerShip"] == "copy" 673 | local nonatomic = attributes["nonatomic"] == true 674 | objc.addMethod(class, SEL(setter), function(self, cmd, value) 675 | if type(value) == "cdata" then 676 | local ivar, offset, typeEnc, cType = runtime.getIvarInfo(self, ivarName) 677 | if ivar then 678 | if runtime.ffi.istype(runtime.idType, value) then 679 | runtime.ffi.C.objc_setProperty(self, cmd, offset, value, not nonatomic, shouldCopy or value:isKindOfClass_(runtime.NSBlock)) 680 | else 681 | local src = runtime.ffi.cast(cType.."*", value) 682 | local dst = runtime.ffi.cast(cType.."*", self + offset) 683 | runtime.ffi.C.objc_copyStruct(dst, src, runtime.ffi.sizeof(value), not nonatomic, false) 684 | end 685 | end 686 | end 687 | end, "v@:"..attributes["typeEncoding"]) 688 | index = index + 1 689 | end 690 | if attributes["getterName"] then 691 | attrs[index].name = "G" 692 | attrs[index].value = attributes["getterName"] 693 | index = index + 1 694 | else 695 | attrs[index].name = "G" 696 | attrs[index].value = name 697 | local ivarName = attributes["ivarName"] or "_"..name 698 | local nonatomic = attributes["nonatomic"] == true 699 | objc.addMethod(class, SEL(name), function(self, cmd) 700 | local _, offset, typeEnc, cType = runtime.getIvarInfo(self, ivarName) 701 | if runtime.ffi.typeof(cType) == runtime.idType then 702 | return runtime.C.objc_getProperty(self, cmd, offset, not nonatomic) 703 | else 704 | local src = runtime.ffi.cast(cType.."*", self + offset) 705 | local dst = runtime.ffi.new(cType.."[1]") 706 | local ffiType = runtime.ffi.typeof(cType) 707 | runtime.ffi.C.objc_copyStruct(dst, src, runtime.ffi.sizeof(ffiType), not nonatomic, false) 708 | return dst[0] 709 | end 710 | end, attributes["typeEncoding"].."@:") 711 | index = index + 1 712 | end 713 | local ivarName = "_"..name 714 | if attributes["ivarName"] then 715 | attrs[index].name = "V" 716 | attrs[index].value = attributes["ivarName"] 717 | else 718 | local ivar, offset, typeEnc, cType = _getIvarInfo(self, ivarName) 719 | if ivar == nil then 720 | local typeArr = runtime.parseTypeEncoding(attributes["typeEncoding"]) 721 | if typeArr ~= nil and #typeArr == 1 then 722 | local cType = runtime.typeToCType(typeArr[1]) 723 | if cType ~= nil then 724 | local ffiType = ffi.typeof(cType) 725 | local size = ffi.sizeof(ffiType) 726 | local alignment = ffi.alignof(ffiType) 727 | C.class_addIvar(class, ivarName, size, alignment, attributes["typeEncoding"]) 728 | end 729 | end 730 | end 731 | end 732 | C.class_addProperty(class, name, attrs, count) 733 | end 734 | 735 | -- Creates and returns a new subclass of superclass (or if superclass is nil, a new root class) 736 | -- ivars argument is an optional table of ivars, keyed by name with values containing the type encoding for the var 737 | function objc.createClass(superclass, className, ivars, properties) 738 | ivars = ivars or {} 739 | local class = C.objc_allocateClassPair(superclass, className, 0) 740 | 741 | for name, typeEnc in pairs(ivars) do 742 | -- Parse the type and get the size 743 | local typeArr = objc.parseTypeEncoding(typeEnc) 744 | if typeArr ~= nil and #typeArr == 1 then 745 | local cType = objc.typeToCType(typeArr[1]) 746 | if cType ~= nil then 747 | local ffiType = ffi.typeof(cType) 748 | local size = ffi.sizeof(ffiType) 749 | local alignment = ffi.alignof(ffiType) 750 | C.class_addIvar(class, name, size, alignment, typeEnc) 751 | end 752 | end 753 | end 754 | 755 | for name, attributes in pairs(properties) do 756 | addProperty(class, name, attributes) 757 | end 758 | 759 | C.objc_registerClassPair(class) 760 | return class 761 | end 762 | 763 | -- Calls the superclass's implementation of a method 764 | function objc.callSuper(self, selector, ...) 765 | local superClass = C.class_getSuperclass(C.object_getClass(self)) 766 | local method = C.class_getInstanceMethod(superClass, selector) 767 | local impType = objc.impTypeForMethodTypeEncodeing(ffi.string(C.method_getTypeEncoding(method))) 768 | local imp = ffi.cast(impType, C.method_getImplementation(method)) 769 | local success, ret = pcall(imp, self, selector, ...) 770 | if success == false then 771 | error("Error calling super '".. objc.selToStr(selector).."': "..ret.."\n"..debug.traceback()) 772 | end 773 | return ret 774 | end 775 | 776 | -- Swaps two methods of a class (They must have the same type signature) 777 | function objc.swizzle(class, origSel, newSel) 778 | local origMethod = C.class_getInstanceMethod(class, origSel) 779 | local newMethod = C.class_getInstanceMethod(class, newSel) 780 | if C.class_addMethod(class, origSel, C.method_getImplementation(newMethod), C.method_getTypeEncoding(newMethod)) == true then 781 | C.class_replaceMethod(class, newSel, C.method_getImplementation(origMethod), C.method_getTypeEncoding(origMethod)); 782 | else 783 | C.method_exchangeImplementations(origMethod, newMethod) 784 | end 785 | end 786 | 787 | local upvalueType = ffi.typeof("enum DynamUpvalueType") 788 | local kDynamUpvalueTypeDouble = ffi.cast(upvalueType, "kDynamUpvalueTypeDouble") 789 | local kDynamUpvalueTypeInteger = ffi.cast(upvalueType, "kDynamUpvalueTypeInteger") 790 | local kDynamUpvalueTypeUInteger = ffi.cast(upvalueType, "kDynamUpvalueTypeUInteger") 791 | local kDynamUpvalueTypeBoolean = ffi.cast(upvalueType, "kDynamUpvalueTypeBoolean") 792 | local kDynamUpvalueTypeString = ffi.cast(upvalueType, "kDynamUpvalueTypeString") 793 | local kDynamUpvalueTypeBytes = ffi.cast(upvalueType, "kDynamUpvalueTypeBytes") 794 | local kDynamUpvalueTypeObject = ffi.cast(upvalueType, "kDynamUpvalueTypeObject") 795 | local NSInteger = ffi.typeof("NSInteger") 796 | local NSUInteger = ffi.typeof("NSUInteger") 797 | 798 | function ctype(value) 799 | return string.sub(tostring(objc.ffi.typeof(value)), 7, -2) 800 | end 801 | 802 | function dumpLambdaUpvalues(lambda, upvalues) 803 | local i = 1 804 | while true do 805 | local name, value = debug.getupvalue(lambda, i) 806 | if not name then 807 | break 808 | end 809 | local upvalue = objc.DynamUpvalue:alloc():init() 810 | upvalue:setIndex_(i) 811 | upvalue:setName_(objc.Obj(name)) 812 | if type(value) == "cdata" then 813 | if ffi.istype(_idType, value) then 814 | upvalue:setValue_(value) 815 | upvalue:setType_(kDynamUpvalueTypeObject) 816 | elseif ffi.istype(NSInteger, value) then 817 | upvalue:setValue_(objc.NSNumber:alloc():initWithInteger_(value)) 818 | upvalue:setType_(kDynamUpvalueTypeInteger) 819 | elseif ffi.istype(NSUInteger, value) then 820 | upvalue:setValue_(objc.NSNumber:alloc():initWithUnsignedInteger_(value)) 821 | upvalue:setType_(kDynamUpvalueTypeUInteger) 822 | else 823 | local data = objc.NSData:dataWithBytes_length_(value, ffi.sizeof(value)) 824 | upvalue:setValue_(data) 825 | upvalue:setCType_(objc.Obj(ctype(value))) 826 | upvalue:setType_(kDynamUpvalueTypeBytes) 827 | end 828 | elseif type(value) == "boolean" then 829 | upvalue:setValue_(objc.NSNumber:alloc():initWithBool_(value)) 830 | upvalue:setType_(kDynamUpvalueTypeBoolean) 831 | elseif type(value) == "number" then 832 | upvalue:setValue_(objc.Obj(value)) 833 | upvalue:setType_(kDynamUpvalueTypeDouble) 834 | elseif type(value) == "string" then 835 | upvalue:setValue_(objc.Obj(value)) 836 | upvalue:setType_(kDynamUpvalueTypeString) 837 | end 838 | upvalues:addObject_(upvalue) 839 | i = i + 1 840 | end 841 | end 842 | 843 | -- Adds a function as a method to the given class 844 | -- If the method already exists, it is renamed to __{selector} 845 | -- The function must have self (id), and selector (SEL) as it's first two arguments 846 | -- Defaults are to return void and to take an object and a selector 847 | function objc.addMethod(class, selector, lambda, typeEncoding) 848 | local msgForwardIMP = C._objc_msgForward 849 | 850 | local originalIMP 851 | if C.class_respondsToSelector(class, selector) then 852 | originalIMP = C.class_getMethodImplementation(class, selector) 853 | if typeEncoding == nil then 854 | local method = C.class_getInstanceMethod(class, selector) 855 | typeEncoding = ffi.string(C.method_getTypeEncoding(method)) 856 | end 857 | end 858 | 859 | if jit.arch ~= "arm64" then 860 | if string.sub(typeEncoding, 1, 1) == "{" then 861 | local signature = objc.NSMethodSignature:signatureWithObjCTypes_(ffi.cast("char *", typeEncoding)) 862 | local range = signature:debugDescription():rangeOfString_(objc.NSStr("is special struct return? YES")) 863 | if range.location ~= _INT_MAX then 864 | msgForwardIMP = C._objc_msgForward_stret 865 | end 866 | end 867 | end 868 | 869 | local forwardInvocationSel = objc.SEL("forwardInvocation:") 870 | local renamedForwardInvocationSel = objc.SEL("__forwardInvocation:") 871 | if C.class_getMethodImplementation(class, forwardInvocationSel) ~= ffi.cast("IMP", C.forward_invocation) then 872 | if C.class_addMethod(class, renamedForwardInvocationSel, ffi.cast("IMP", C.forward_invocation), "v@:@") then 873 | objc.swizzle(class, forwardInvocationSel, renamedForwardInvocationSel) 874 | else 875 | error("Couldn't replace forwardInvocation:") 876 | end 877 | end 878 | 879 | local renamedSel = objc.SEL("__"..objc.selToStr(selector)) 880 | if C.class_respondsToSelector(class, renamedSel) == false then 881 | C.class_addMethod(class, renamedSel, originalIMP, typeEncoding) 882 | end 883 | 884 | local code = string.dump(lambda) 885 | local codeData = objc.NSData:dataWithBytes_length_(ffi.cast("void *", code), string.len(code)) 886 | local upvalues = objc.NSMutableArray:array() 887 | dumpLambdaUpvalues(lambda, upvalues) 888 | local dynamMethod = objc.DynamMethod:alloc():initWithCode_upvalues_(codeData, upvalues) 889 | class:____setLuaLambda_forKey_(dynamMethod, objc.Obj(objc.selToStr(selector))) 890 | 891 | C.class_replaceMethod(class, selector, msgForwardIMP, typeEncoding) 892 | end 893 | 894 | -- Gets the value of an ivar 895 | function objc.getIvar(instance, ivarName) 896 | local ivar, offset, typeEnc, cType = _getIvarInfo(instance, ivarName) 897 | if ivar == nil then 898 | return nil 899 | end 900 | local ptr = ffi.cast(cType.."*", instance+offset) 901 | return ptr[0] 902 | end 903 | 904 | -- Sets the value of an ivar 905 | function objc.setIvar(instance, ivarName, value) 906 | local ivar, offset, typeEnc, cType = _getIvarInfo(instance, ivarName) 907 | if ivar == nil then 908 | return nil 909 | end 910 | local ptr = ffi.cast(cType.."*", instance+offset) 911 | ptr[0] = value 912 | end 913 | 914 | function objc.weak(obj) 915 | if type(obj) == "cdata" and ffi.istype(_idType, obj) then 916 | return objc.WeakObject:alloc():initWithObject_(obj) 917 | else 918 | return obj 919 | end 920 | end 921 | 922 | function objc.strong(obj) 923 | if type(obj) == "cdata" and ffi.istype(_idType, obj) then 924 | if obj:isKindOfClass_(objc.WeakObject) then 925 | return obj:object() 926 | end 927 | else 928 | return obj 929 | end 930 | end 931 | 932 | function objc.createBlock(lambda, typeEncoding) 933 | local id = objc.registerLambda(lambda) 934 | return objc.DynamBlock:alloc():initWithBlockID_signature_(id, objc.Obj(typeEncoding)) 935 | end 936 | 937 | function objc.dumpBlockUpvalues(lambda) 938 | local context = C.get_current_luacontext() 939 | local upvalues = context:returnRegister() 940 | dumpLambdaUpvalues(lambda, upvalues) 941 | end 942 | 943 | function setLambdaUpvalues(lambda, upvalues) 944 | for i = 0, tonumber(upvalues:count()) - 1 do 945 | local upvalue = upvalues:objectAtIndex_(i) 946 | if upvalue:type() == kDynamUpvalueTypeObject then 947 | local value = upvalue:value() 948 | C.CFRetain(value) 949 | ffi.gc(value, _release) 950 | debug.setupvalue(lambda, tonumber(upvalue:index()), value) 951 | elseif upvalue:type() == kDynamUpvalueTypeDouble then 952 | debug.setupvalue(lambda, tonumber(upvalue:index()), tonumber(upvalue:value():doubleValue())) 953 | elseif upvalue:type() == kDynamUpvalueTypeInteger then 954 | debug.setupvalue(lambda, tonumber(upvalue:index()), upvalue:value():integerValue()) 955 | elseif upvalue:type() == kDynamUpvalueTypeUInteger then 956 | debug.setupvalue(lambda, tonumber(upvalue:index()), upvalue:value():unsignedIntegerValue()) 957 | elseif upvalue:type() == kDynamUpvalueTypeBoolean then 958 | debug.setupvalue(lambda, tonumber(upvalue:index()), upvalue:value():boolValue()) 959 | elseif upvalue:type() == kDynamUpvalueTypeString then 960 | debug.setupvalue(lambda, tonumber(upvalue:index()), ffi.string(upvalue:value():UTF8String())) 961 | elseif upvalue:type() == kDynamUpvalueTypeBytes then 962 | local data = ffi.new(ffi.string(upvalue:cType():UTF8String())) 963 | ffi.copy(data, upvalue:value():bytes(), tonumber(upvalue:value():length())) 964 | debug.setupvalue(lambda, tonumber(upvalue:index()), data) 965 | end 966 | end 967 | end 968 | 969 | function objc.evaluateBlock(lambda) 970 | local context = C.get_current_luacontext() 971 | local invocation = context:argumentRegister() 972 | local methodSignature = invocation:methodSignature() 973 | local numberOfArguments = tonumber(methodSignature:numberOfArguments()) 974 | local arguments = {} 975 | for i = 1, numberOfArguments - 1 do 976 | local argumentType = ffi.string(methodSignature:getArgumentTypeAtIndex_(i)) 977 | local typeArr = objc.parseTypeEncoding(argumentType) 978 | if typeArr ~= nil then 979 | local cType = objc.typeToCType(typeArr[1]) 980 | if cType ~= nil then 981 | cType = cType .. "[1]"; 982 | local arg = ffi.new(cType) 983 | invocation:getArgument_atIndex_(arg, i) 984 | table.insert(arguments, arg[0]) 985 | end 986 | end 987 | end 988 | local returnType = ffi.string(methodSignature:methodReturnType()) 989 | local typeArr = objc.parseTypeEncoding(returnType) 990 | if typeArr ~= nil then 991 | local cType = objc.typeToCType(typeArr[1]) 992 | if cType ~= nil then 993 | local ret = lambda(unpack(arguments)) 994 | if returnType ~= "v" then 995 | cType = cType .. "[1]" 996 | local ret = ffi.new(cType, {ret}) 997 | invocation:setReturnValue_(ret) 998 | end 999 | end 1000 | end 1001 | end 1002 | 1003 | function objc.evaluateBlockCode(codeData, len) 1004 | local context = C.get_current_luacontext() 1005 | local upvalues = context:argumentRegister():objectAtIndex_(0) 1006 | local invocation = context:argumentRegister():objectAtIndex_(1) 1007 | local methodSignature = invocation:methodSignature() 1008 | local numberOfArguments = tonumber(methodSignature:numberOfArguments()) 1009 | local arguments = {} 1010 | for i = 1, numberOfArguments - 1 do 1011 | local argumentType = ffi.string(methodSignature:getArgumentTypeAtIndex_(i)) 1012 | local typeArr = objc.parseTypeEncoding(argumentType) 1013 | if typeArr ~= nil then 1014 | local cType = objc.typeToCType(typeArr[1]) 1015 | if cType ~= nil then 1016 | cType = cType .. "[1]"; 1017 | local arg = ffi.new(cType) 1018 | invocation:getArgument_atIndex_(arg, i) 1019 | table.insert(arguments, arg[0]) 1020 | end 1021 | end 1022 | end 1023 | local returnType = ffi.string(methodSignature:methodReturnType()) 1024 | local typeArr = objc.parseTypeEncoding(returnType) 1025 | if typeArr ~= nil then 1026 | local cType = objc.typeToCType(typeArr[1]) 1027 | if cType ~= nil then 1028 | local lambda = loadstring(ffi.string(codeData, len)) 1029 | setLambdaUpvalues(lambda, upvalues) 1030 | local ret = lambda(unpack(arguments)) 1031 | if returnType ~= "v" then 1032 | cType = cType .. "[1]" 1033 | local ret = ffi.new(cType, {ret}) 1034 | invocation:setReturnValue_(ret) 1035 | end 1036 | end 1037 | end 1038 | end 1039 | 1040 | function objc.evaluateMethodCode(codeData, len) 1041 | local context = C.get_current_luacontext() 1042 | local upvalues = context:argumentRegister():objectAtIndex_(0) 1043 | local invocation = context:argumentRegister():objectAtIndex_(1) 1044 | local methodSignature = invocation:methodSignature() 1045 | local numberOfArguments = tonumber(methodSignature:numberOfArguments()) 1046 | local arguments = {invocation:target(), invocation:selector()} 1047 | for i = 2, numberOfArguments - 1 do 1048 | local argumentType = ffi.string(methodSignature:getArgumentTypeAtIndex_(i)) 1049 | local typeArr = objc.parseTypeEncoding(argumentType) 1050 | if typeArr ~= nil then 1051 | local cType = objc.typeToCType(typeArr[1]) 1052 | if cType ~= nil then 1053 | cType = cType .. "[1]"; 1054 | local arg = ffi.new(cType) 1055 | invocation:getArgument_atIndex_(arg, i) 1056 | table.insert(arguments, arg[0]) 1057 | end 1058 | end 1059 | end 1060 | local returnType = ffi.string(methodSignature:methodReturnType()) 1061 | local typeArr = objc.parseTypeEncoding(returnType) 1062 | local methodID = C.kInvalidMethodID 1063 | if typeArr ~= nil then 1064 | local cType = objc.typeToCType(typeArr[1]) 1065 | if cType ~= nil then 1066 | local lambda = loadstring(ffi.string(codeData, len)) 1067 | setLambdaUpvalues(lambda, upvalues) 1068 | methodID = objc.registerLambda(lambda) 1069 | local ret = lambda(unpack(arguments)) 1070 | if returnType ~= "v" then 1071 | cType = cType .. "[1]" 1072 | local ret = ffi.new(cType, {ret}) 1073 | invocation:setReturnValue_(ret) 1074 | end 1075 | end 1076 | end 1077 | return methodID 1078 | end 1079 | 1080 | function objc.evaluateMethod(lambda) 1081 | local context = C.get_current_luacontext() 1082 | local invocation = context:argumentRegister():objectAtIndex_(0) 1083 | local methodSignature = invocation:methodSignature() 1084 | local numberOfArguments = tonumber(methodSignature:numberOfArguments()) 1085 | local arguments = {invocation:target(), invocation:selector()} 1086 | for i = 2, numberOfArguments - 1 do 1087 | local argumentType = ffi.string(methodSignature:getArgumentTypeAtIndex_(i)) 1088 | local typeArr = objc.parseTypeEncoding(argumentType) 1089 | if typeArr ~= nil then 1090 | local cType = objc.typeToCType(typeArr[1]) 1091 | if cType ~= nil then 1092 | cType = cType .. "[1]"; 1093 | local arg = ffi.new(cType) 1094 | invocation:getArgument_atIndex_(arg, i) 1095 | table.insert(arguments, arg[0]) 1096 | end 1097 | end 1098 | end 1099 | local returnType = ffi.string(methodSignature:methodReturnType()) 1100 | local typeArr = objc.parseTypeEncoding(returnType) 1101 | if typeArr ~= nil then 1102 | local cType = objc.typeToCType(typeArr[1]) 1103 | if cType ~= nil then 1104 | local ret = lambda(unpack(arguments)) 1105 | if returnType ~= "v" then 1106 | cType = cType .. "[1]" 1107 | local ret = ffi.new(cType, {ret}) 1108 | invocation:setReturnValue_(ret) 1109 | end 1110 | end 1111 | end 1112 | end 1113 | 1114 | function objc.forceGC() 1115 | collectgarbage() 1116 | end 1117 | 1118 | return objc; 1119 | -------------------------------------------------------------------------------- /DynamOC/runtime32.h: -------------------------------------------------------------------------------- 1 | #define luaJIT_BC_runtime32_SIZE 24995 2 | static const char luaJIT_BC_runtime32[] = { 3 | 27,76,74,2,6,191,1,2,0,7,1,10,1,30,45,0,0,0,57,0,0,0,11,0,2,0,88,0,25,128,52, 4 | 0,3,0,71,1,0,0,63,1,0,0,41,1,1,0,21,2,0,0,41,3,1,0,77,1,5,128,54,5,1,0,56,6,4, 5 | 0,66,5,2,2,60,5,4,0,79,1,251,127,54,1,2,0,57,1,3,1,18,2,1,0,57,1,4,1,39,3,5,0, 6 | 54,4,6,0,57,4,7,4,18,5,0,0,39,6,8,0,66,4,3,2,39,5,9,0,38,3,5,3,66,1,3,1,75,0, 7 | 1,0,3,192,6,10,6,32,11,99,111,110,99,97,116,10,116,97,98,108,101,12,91,111,98, 8 | 106,99,93,32,10,119,114,105,116,101,11,115,116,100,101,114,114,7,105,111,13, 9 | 116,111,115,116,114,105,110,103,10,100,101,98,117,103,3,128,128,192,153,4,243, 10 | 2,0,2,12,4,12,1,59,45,2,0,0,57,2,0,2,41,3,1,0,41,4,2,0,66,2,3,2,15,0,1,0,88,3, 11 | 20,128,18,3,0,0,18,5,3,0,57,4,1,3,39,6,2,0,66,4,3,4,18,7,3,0,18,8,6,0,38,3,8, 12 | 7,45,7,1,0,57,7,3,7,18,8,3,0,18,9,2,0,66,7,3,2,9,7,0,0,88,7,4,128,54,7,4,0,57, 13 | 7,5,7,18,8,3,0,66,7,2,1,75,0,1,0,54,3,6,0,45,4,2,0,57,4,7,4,66,3,2,4,72,6,18, 14 | 128,18,9,7,0,57,8,8,7,18,10,0,0,18,11,0,0,66,8,4,2,18,7,8,0,45,8,1,0,57,8,3,8, 15 | 18,9,7,0,18,10,2,0,66,8,3,2,9,8,0,0,88,8,5,128,45,8,3,0,57,8,5,8,18,9,7,0,43, 16 | 10,2,0,68,8,3,0,70,6,3,3,82,6,236,127,54,3,9,0,39,4,10,0,18,5,0,0,39,6,11,0, 17 | 38,4,6,4,66,3,2,1,75,0,1,0,1,192,5,192,3,192,0,192,17,39,32,110,111,116,32, 18 | 102,111,117,110,100,46,23,69,114,114,111,114,33,32,70,114,97,109,101,119,111, 19 | 114,107,32,39,10,101,114,114,111,114,11,102,111,114,109,97,116,25,102,114,97, 20 | 109,101,119,111,114,107,83,101,97,114,99,104,80,97,116,104,115,10,112,97,105, 21 | 114,115,9,108,111,97,100,7,98,115,11,97,99,99,101,115,115,24,40,91,94,46,47, 22 | 93,43,41,46,102,114,97,109,101,119,111,114,107,36,9,102,105,110,100,11,108, 23 | 115,104,105,102,116,0,238,1,0,1,8,4,10,0,30,45,1,0,0,57,1,0,1,15,0,1,0,88,2, 24 | 21,128,45,1,1,0,39,2,1,0,45,3,2,0,57,3,2,3,45,4,3,0,57,4,3,4,18,6,0,0,57,5,4, 25 | 0,66,5,2,0,65,4,0,0,65,3,0,2,45,4,2,0,57,4,5,4,39,5,6,0,18,6,0,0,66,4,3,2,39, 26 | 5,7,0,18,7,0,0,57,6,8,0,66,6,2,0,65,1,4,1,45,1,3,0,57,1,9,1,18,2,0,0,66,1,2,1, 27 | 75,0,1,0,3,192,4,192,0,192,5,192,14,67,70,82,101,108,101,97,115,101,16,114, 28 | 101,116,97,105,110,67,111,117,110,116,15,82,101,102,99,111,117,110,116,58,32, 29 | 10,118,111,105,100,42,9,99,97,115,116,10,99,108,97,115,115,18,99,108,97,115, 30 | 115,95,103,101,116,78,97,109,101,11,115,116,114,105,110,103,30,82,101,108,101, 31 | 97,115,105,110,103,32,111,98,106,101,99,116,32,111,102,32,99,108,97,115,115, 32 | 10,100,101,98,117,103,63,0,2,4,1,1,0,10,45,2,0,0,57,2,0,2,18,3,1,0,66,2,2,2, 33 | 11,2,0,0,88,3,2,128,43,3,0,0,76,3,2,0,60,2,1,0,76,2,2,0,5,192,18,111,98,106, 34 | 99,95,103,101,116,67,108,97,115,115,62,0,1,4,1,3,0,8,45,1,0,0,57,1,0,1,45,2,0, 35 | 0,57,2,1,2,57,2,2,2,18,3,0,0,66,2,2,0,67,1,0,0,0,192,16,115,101,108,95,103, 36 | 101,116,78,97,109,101,6,67,11,115,116,114,105,110,103,48,0,1,3,1,2,0,5,45,1,0, 37 | 0,57,1,0,1,57,1,1,1,18,2,0,0,68,1,2,0,0,192,21,115,101,108,95,114,101,103,105, 38 | 115,116,101,114,78,97,109,101,6,67,44,0,2,4,1,1,0,7,45,2,0,0,57,2,0,2,18,3,1, 39 | 0,66,2,2,2,60,2,1,0,56,2,1,0,76,2,2,0,0,192,11,116,121,112,101,111,102,148,4, 40 | 0,1,16,0,16,2,91,41,1,1,0,52,2,3,0,53,3,0,0,62,3,1,2,41,3,0,0,43,4,1,0,58,5,1, 41 | 2,44,6,7,0,41,8,1,0,21,9,0,0,41,10,1,0,77,8,68,128,18,13,0,0,57,12,1,0,18,14, 42 | 11,0,18,15,11,0,66,12,4,2,18,7,12,0,18,13,7,0,57,12,2,7,39,14,3,0,66,12,3,2, 43 | 15,0,12,0,88,13,2,128,22,3,0,3,88,12,11,128,18,13,7,0,57,12,2,7,39,14,4,0,66, 44 | 12,3,2,15,0,12,0,88,13,2,128,23,3,0,3,88,12,3,128,7,7,5,0,88,12,1,128,19,4,4, 45 | 0,41,12,0,0,1,12,3,0,88,12,5,128,57,12,6,5,18,13,7,0,38,12,13,12,61,12,6,5,88, 46 | 12,34,128,11,4,2,0,88,12,7,128,6,7,5,0,88,12,5,128,57,12,7,5,18,13,7,0,38,12, 47 | 13,12,61,12,7,5,88,12,25,128,7,7,8,0,88,12,4,128,57,12,9,5,22,12,0,12,61,12,9, 48 | 5,88,12,19,128,7,7,10,0,88,12,3,128,43,12,2,0,61,12,11,5,88,12,14,128,18,13,7, 49 | 0,57,12,2,7,39,14,12,0,66,12,3,2,11,12,0,0,88,12,8,128,57,12,6,5,18,13,7,0,38, 50 | 12,13,12,61,12,6,5,22,1,0,1,53,12,13,0,60,12,1,2,56,5,1,2,79,8,188,127,56,8,1, 51 | 2,57,8,7,8,21,8,8,0,9,8,1,0,88,8,5,128,54,8,14,0,57,8,15,8,18,9,2,0,18,10,1,0, 52 | 66,8,3,1,76,2,2,0,11,114,101,109,111,118,101,10,116,97,98,108,101,1,0,3,16, 53 | 105,110,100,105,114,101,99,116,105,111,110,3,0,9,110,97,109,101,5,9,116,121, 54 | 112,101,5,20,94,91,34,110,111,98,78,82,86,114,37,94,37,100,93,12,105,115,67, 55 | 111,110,115,116,6,114,16,105,110,100,105,114,101,99,116,105,111,110,6,94,9, 56 | 110,97,109,101,9,116,121,112,101,6,34,13,94,91,125,37,41,37,93,93,13,94,91, 57 | 123,37,40,37,91,93,9,102,105,110,100,8,115,117,98,1,0,4,16,105,110,100,105, 58 | 114,101,99,116,105,111,110,3,0,9,110,97,109,101,5,12,105,115,67,111,110,115, 59 | 116,1,9,116,121,112,101,5,2,0,157,1,0,1,10,1,5,0,23,18,2,0,0,57,1,0,0,39,3,1, 60 | 0,66,1,3,4,18,5,0,0,57,4,0,0,39,6,2,0,66,4,3,4,45,7,0,0,57,7,3,7,45,8,0,0,57, 61 | 8,4,8,18,9,6,0,66,8,2,2,58,8,1,8,66,7,2,2,11,7,0,0,88,8,2,128,43,8,0,0,76,8,2, 62 | 0,18,8,7,0,18,9,3,0,74,8,3,0,3,192,22,112,97,114,115,101,84,121,112,101,69, 63 | 110,99,111,100,105,110,103,16,116,121,112,101,84,111,67,84,121,112,101,15,40, 64 | 91,94,37,100,93,43,41,37,93,14,37,91,40,91,37,100,93,43,41,9,102,105,110,100, 65 | 215,5,0,2,23,4,27,2,128,1,39,2,0,0,39,3,1,0,11,1,2,0,88,4,2,128,39,2,2,0,39,3, 66 | 3,0,18,5,0,0,57,4,4,0,18,6,2,0,66,4,3,4,18,8,0,0,57,7,5,0,22,9,0,5,21,10,0,0, 67 | 23,10,0,10,66,7,4,2,45,8,0,0,57,8,6,8,18,9,7,0,39,10,7,0,66,8,3,2,7,6,8,0,88, 68 | 9,1,128,39,6,9,0,21,9,8,0,41,10,1,0,3,9,10,0,88,9,8,128,7,6,9,0,88,9,6,128,18, 69 | 9,3,0,39,10,10,0,18,11,6,0,38,9,11,9,76,9,2,0,88,9,9,128,21,9,8,0,41,10,1,0,3, 70 | 9,10,0,88,9,5,128,18,9,3,0,39,10,11,0,18,11,6,0,38,9,11,9,76,9,2,0,45,9,1,0, 71 | 56,9,6,9,10,9,0,0,88,10,5,128,18,10,3,0,39,11,11,0,18,12,6,0,38,10,12,10,76, 72 | 10,2,0,18,10,3,0,39,11,11,0,18,12,6,0,39,13,12,0,38,9,13,10,54,10,13,0,18,11, 73 | 8,0,66,10,2,4,72,13,33,128,57,15,14,14,21,16,15,0,9,16,1,0,88,16,5,128,39,16, 74 | 15,0,54,17,16,0,18,18,13,0,66,17,2,2,38,15,17,16,45,16,0,0,57,16,17,16,18,17, 75 | 14,0,18,18,15,0,66,16,3,2,11,16,0,0,88,17,13,128,45,17,0,0,57,17,18,17,11,17, 76 | 2,0,88,17,7,128,45,17,2,0,39,18,19,0,18,19,3,0,18,20,15,0,39,21,20,0,57,22,21, 77 | 14,66,17,6,1,43,17,0,0,76,17,2,0,18,17,9,0,18,18,16,0,39,19,22,0,38,9,19,17, 78 | 70,13,3,3,82,13,221,127,18,10,9,0,39,11,23,0,38,9,11,10,21,10,6,0,41,11,0,0,1, 79 | 11,10,0,88,10,21,128,45,10,1,0,60,9,6,10,54,10,24,0,45,11,3,0,57,11,25,11,18, 80 | 12,9,0,66,10,3,3,11,10,1,0,88,12,6,128,45,12,2,0,39,13,26,0,18,14,6,0,39,15, 81 | 20,0,18,16,11,0,66,12,5,1,18,12,3,0,39,13,11,0,18,14,6,0,38,12,14,12,76,12,2, 82 | 0,88,10,1,128,76,9,2,0,75,0,1,0,3,192,16,192,4,192,0,192,26,69,114,114,111, 83 | 114,32,108,111,97,100,105,110,103,32,115,116,114,117,99,116,32,9,99,100,101, 84 | 102,10,112,99,97,108,108,7,32,125,6,59,9,116,121,112,101,7,58,32,25,85,110, 85 | 115,117,112,112,111,114,116,101,100,32,116,121,112,101,32,105,110,32,10,100, 86 | 101,98,117,103,16,116,121,112,101,84,111,67,84,121,112,101,13,116,111,115,116, 87 | 114,105,110,103,10,102,105,101,108,100,9,110,97,109,101,10,112,97,105,114,115, 88 | 8,32,123,32,6,32,8,123,125,32,5,6,63,6,34,22,112,97,114,115,101,84,121,112, 89 | 101,69,110,99,111,100,105,110,103,8,115,117,98,9,102,105,110,100,10,117,110, 90 | 105,111,110,21,37,40,40,91,94,61,37,41,93,43,41,91,61,37,41,93,11,115,116,114, 91 | 117,99,116,18,123,40,91,94,61,125,93,43,41,91,61,125,93,2,0,201,4,0,2,14,4,15, 92 | 0,111,14,0,1,0,88,2,1,128,39,1,0,0,39,2,0,0,57,3,1,0,39,4,2,0,18,5,4,0,57,4,3, 93 | 4,57,6,4,0,66,4,3,2,45,5,0,0,18,7,3,0,57,6,5,3,41,8,1,0,41,9,1,0,66,6,4,2,56, 94 | 5,6,5,11,5,0,0,88,6,8,128,45,6,1,0,39,7,6,0,18,8,3,0,39,9,7,0,66,6,4,1,43,6,0, 95 | 0,76,6,2,0,88,6,83,128,7,5,8,0,88,6,23,128,45,6,2,0,18,7,3,0,43,8,2,0,66,6,3, 96 | 2,11,6,0,0,88,7,7,128,45,7,1,0,39,8,6,0,18,9,3,0,39,10,7,0,66,7,4,1,43,7,0,0, 97 | 76,7,2,0,54,7,9,0,57,7,10,7,39,8,11,0,18,9,2,0,18,10,6,0,18,11,4,0,18,12,1,0, 98 | 66,7,6,2,18,2,7,0,88,6,58,128,7,5,12,0,88,6,23,128,45,6,2,0,18,7,3,0,43,8,1,0, 99 | 66,6,3,2,11,6,0,0,88,7,7,128,45,7,1,0,39,8,6,0,18,9,3,0,39,10,7,0,66,7,4,1,43, 100 | 7,0,0,76,7,2,0,54,7,9,0,57,7,10,7,39,8,11,0,18,9,2,0,18,10,6,0,18,11,4,0,18, 101 | 12,1,0,66,7,6,2,18,2,7,0,88,6,33,128,7,5,13,0,88,6,22,128,45,6,3,0,18,7,3,0, 102 | 66,6,2,3,11,6,0,0,88,8,7,128,45,8,1,0,39,9,6,0,18,10,3,0,39,11,7,0,66,8,4,1, 103 | 43,8,0,0,76,8,2,0,54,8,9,0,57,8,10,8,39,9,14,0,18,10,6,0,18,11,4,0,18,12,1,0, 104 | 18,13,7,0,66,8,6,2,18,2,8,0,88,6,9,128,54,6,9,0,57,6,10,6,39,7,11,0,18,8,2,0, 105 | 18,9,5,0,18,10,4,0,18,11,1,0,66,6,6,2,18,2,6,0,76,2,2,0,25,192,4,192,17,192, 106 | 15,192,16,37,115,32,37,115,37,115,91,37,100,93,10,97,114,114,97,121,11,115, 107 | 116,114,117,99,116,15,37,115,32,37,115,32,37,115,37,115,11,102,111,114,109,97, 108 | 116,11,115,116,114,105,110,103,10,117,110,105,111,110,23,39,32,105,115,32,110, 109 | 111,116,32,115,117,112,112,111,114,116,101,100,27,69,114,114,111,114,33,32, 110 | 116,121,112,101,32,101,110,99,111,100,105,110,103,32,39,8,115,117,98,16,105, 111 | 110,100,105,114,101,99,116,105,111,110,8,114,101,112,6,42,9,116,121,112,101,5, 112 | 145,2,0,2,12,1,9,2,54,14,0,1,0,88,2,1,128,39,1,0,0,14,0,0,0,88,2,1,128,39,0,1, 113 | 0,45,2,0,0,57,2,2,2,18,3,0,0,66,2,2,2,10,2,0,0,88,3,3,128,21,3,2,0,9,3,0,0,88, 114 | 3,2,128,43,3,0,0,76,3,2,0,45,3,0,0,57,3,3,3,58,4,1,2,66,3,2,2,39,4,4,0,18,5,1, 115 | 0,39,6,5,0,38,3,6,3,41,4,2,0,21,5,2,0,41,6,1,0,77,4,21,128,45,8,0,0,57,8,3,8, 116 | 56,9,7,2,39,10,6,0,23,11,1,7,38,10,11,10,66,8,3,2,11,8,0,0,88,9,2,128,43,9,0, 117 | 0,76,9,2,0,21,9,2,0,1,7,9,0,88,9,3,128,18,9,8,0,39,10,7,0,38,8,10,9,18,9,3,0, 118 | 18,10,8,0,38,3,10,9,79,4,235,127,18,4,3,0,39,5,8,0,38,4,5,4,76,4,2,0,3,192,6, 119 | 41,6,44,6,112,7,41,40,7,32,40,16,116,121,112,101,84,111,67,84,121,112,101,22, 120 | 112,97,114,115,101,84,121,112,101,69,110,99,111,100,105,110,103,6,118,6,42,0, 121 | 2,112,0,1,5,3,2,0,16,45,1,0,0,56,1,0,1,11,1,0,0,88,2,11,128,45,2,1,0,57,2,0,2, 122 | 18,3,0,0,66,2,2,2,45,3,2,0,57,3,1,3,18,4,2,0,66,3,2,2,18,1,3,0,45,3,0,0,60,1, 123 | 0,3,76,1,2,0,26,192,3,192,0,192,11,116,121,112,101,111,102,32,105,109,112,83, 124 | 105,103,110,97,116,117,114,101,70,111,114,84,121,112,101,69,110,99,111,100, 125 | 105,110,103,95,0,1,4,1,4,0,13,11,0,0,0,88,1,2,128,39,1,0,0,76,1,2,0,45,1,0,0, 126 | 57,1,1,1,18,3,0,0,57,2,2,0,66,2,2,2,18,3,2,0,57,2,3,2,66,2,2,0,67,1,0,0,0,192, 127 | 15,85,84,70,56,83,116,114,105,110,103,16,100,101,115,99,114,105,112,116,105, 128 | 111,110,11,115,116,114,105,110,103,8,110,105,108,146,2,0,1,4,3,10,1,50,54,1,0, 129 | 0,18,2,0,0,66,1,2,2,7,1,1,0,88,1,5,128,45,1,0,0,57,1,2,1,18,2,0,0,68,1,2,0,88, 130 | 1,38,128,54,1,0,0,18,2,0,0,66,1,2,2,7,1,3,0,88,1,5,128,45,1,0,0,57,1,4,1,18,2, 131 | 0,0,68,1,2,0,88,1,28,128,54,1,0,0,18,2,0,0,66,1,2,2,7,1,5,0,88,1,13,128,21,1, 132 | 0,0,9,1,0,0,88,1,5,128,45,1,0,0,57,1,6,1,18,2,0,0,68,1,2,0,88,1,15,128,45,1,0, 133 | 0,57,1,7,1,18,2,0,0,68,1,2,0,88,1,10,128,54,1,0,0,18,2,0,0,66,1,2,2,7,1,8,0, 134 | 88,1,5,128,45,1,1,0,57,1,9,1,45,2,2,0,18,3,0,0,68,1,3,0,43,1,0,0,76,1,2,0,3, 135 | 192,0,192,12,192,9,99,97,115,116,10,99,100,97,116,97,10,78,83,65,114,114,10, 136 | 78,83,68,105,99,10,116,97,98,108,101,10,78,83,83,116,114,11,115,116,114,105, 137 | 110,103,10,78,83,78,117,109,11,110,117,109,98,101,114,9,116,121,112,101,0,110, 138 | 0,1,6,2,5,0,13,45,1,0,0,57,1,0,1,18,2,1,0,57,1,1,1,66,1,2,2,18,2,1,0,57,1,2,1, 139 | 45,3,1,0,57,3,3,3,39,4,4,0,18,5,0,0,66,3,3,0,67,1,1,0,3,192,0,192,11,99,104, 140 | 97,114,32,42,9,99,97,115,116,24,105,110,105,116,87,105,116,104,85,84,70,56,83, 141 | 116,114,105,110,103,95,10,97,108,108,111,99,13,78,83,83,116,114,105,110,103, 142 | 60,0,1,4,1,2,0,6,45,1,0,0,57,1,0,1,18,2,1,0,57,1,1,1,18,3,0,0,68,1,3,0,3,192, 143 | 22,110,117,109,98,101,114,87,105,116,104,68,111,117,98,108,101,95,13,78,83,78, 144 | 117,109,98,101,114,128,1,0,1,11,1,5,0,19,45,1,0,0,57,1,0,1,18,2,1,0,57,1,1,1, 145 | 66,1,2,2,54,2,2,0,18,3,0,0,66,2,2,4,88,5,7,128,18,8,1,0,57,7,3,1,45,9,0,0,57, 146 | 9,4,9,18,10,6,0,66,9,2,0,65,7,1,1,69,5,3,3,82,5,247,127,76,1,2,0,3,192,8,79, 147 | 98,106,15,97,100,100,79,98,106,101,99,116,95,11,105,112,97,105,114,115,10,97, 148 | 114,114,97,121,19,78,83,77,117,116,97,98,108,101,65,114,114,97,121,160,1,0,1, 149 | 12,1,5,0,23,45,1,0,0,57,1,0,1,18,2,1,0,57,1,1,1,66,1,2,2,54,2,2,0,18,3,0,0,66, 150 | 2,2,4,72,5,11,128,18,8,1,0,57,7,3,1,45,9,0,0,57,9,4,9,18,10,6,0,66,9,2,2,45, 151 | 10,0,0,57,10,4,10,18,11,5,0,66,10,2,0,65,7,2,1,70,5,3,3,82,5,243,127,76,1,2,0, 152 | 3,192,8,79,98,106,22,115,101,116,79,98,106,101,99,116,95,102,111,114,75,101, 153 | 121,95,10,112,97,105,114,115,15,100,105,99,116,105,111,110,97,114,121,24,78, 154 | 83,77,117,116,97,98,108,101,68,105,99,116,105,111,110,97,114,121,164,1,2,1,4, 155 | 4,5,0,25,54,1,0,0,18,2,0,0,66,1,2,2,7,1,1,0,88,1,16,128,45,1,0,0,57,1,2,1,45, 156 | 2,1,0,18,3,0,0,66,1,3,2,15,0,1,0,88,2,9,128,18,2,0,0,57,1,3,0,45,3,2,0,66,1,3, 157 | 2,15,0,1,0,88,2,3,128,18,2,0,0,57,1,4,0,68,1,2,0,45,1,3,0,18,2,0,0,71,3,1,0, 158 | 67,1,1,0,0,192,12,192,28,192,27,192,16,100,111,117,98,108,101,86,97,108,117, 159 | 101,23,114,101,115,112,111,110,100,115,84,111,83,101,108,101,99,116,111,114, 160 | 11,105,115,116,121,112,101,10,99,100,97,116,97,9,116,121,112,101,130,1,0,1,11, 161 | 0,2,1,29,43,1,1,0,41,2,0,0,41,3,1,0,21,4,0,0,41,5,1,0,77,3,22,128,11,1,1,0,88, 162 | 7,11,128,18,8,0,0,57,7,0,0,18,9,6,0,18,10,6,0,66,7,4,2,7,7,1,0,88,7,2,128,43, 163 | 1,1,0,88,7,1,128,43,1,2,0,88,7,8,128,18,8,0,0,57,7,0,0,18,9,6,0,18,10,6,0,66, 164 | 7,4,2,7,7,1,0,88,7,1,128,22,2,0,2,79,3,234,127,76,2,2,0,6,95,8,115,117,98,2, 165 | 216,1,0,1,13,0,5,2,44,43,1,1,0,41,2,0,0,41,3,1,0,21,4,0,0,41,5,1,0,77,3,37, 166 | 128,11,1,1,0,88,7,11,128,18,8,0,0,57,7,0,0,18,9,6,0,18,10,6,0,66,7,4,2,7,7,1, 167 | 0,88,7,2,128,43,1,1,0,88,7,1,128,43,1,2,0,88,7,23,128,18,8,0,0,57,7,0,0,18,9, 168 | 6,0,18,10,6,0,66,7,4,2,7,7,1,0,88,7,16,128,54,7,2,0,57,7,3,7,53,8,4,0,18,10,0, 169 | 0,57,9,0,0,41,11,1,0,23,12,0,6,66,9,4,2,62,9,1,8,18,10,0,0,57,9,0,0,22,11,0,6, 170 | 66,9,3,0,63,9,1,0,66,7,2,2,18,0,7,0,79,3,219,127,76,0,2,0,1,3,0,0,0,6,58,11, 171 | 99,111,110,99,97,116,10,116,97,98,108,101,6,95,8,115,117,98,2,7,128,128,192, 172 | 153,4,233,2,0,3,9,3,13,1,54,39,3,0,0,18,5,1,0,57,4,1,1,41,6,1,0,41,7,1,0,66,4, 173 | 4,2,18,5,4,0,57,4,2,4,66,4,2,2,18,6,1,0,57,5,1,1,41,7,2,0,66,5,3,2,38,3,5,3, 174 | 45,4,0,0,57,4,3,4,45,5,0,0,57,5,4,5,18,6,0,0,66,5,2,2,45,6,1,0,18,7,3,0,39,8, 175 | 5,0,38,7,8,7,66,6,2,0,65,4,1,2,9,4,0,0,88,4,5,128,56,4,3,0,18,5,0,0,18,6,2,0, 176 | 68,4,3,0,88,4,20,128,45,4,2,0,57,4,6,4,11,4,2,0,88,4,10,128,18,5,0,0,57,4,7,0, 177 | 54,6,8,0,18,7,2,0,66,6,2,2,54,7,9,0,18,8,1,0,66,7,2,0,67,4,2,0,88,4,6,128,54, 178 | 4,10,0,39,5,11,0,18,6,1,0,39,7,12,0,38,5,7,5,66,4,2,1,75,0,1,0,5,192,7,192,3, 179 | 192,15,32,110,111,116,32,102,111,117,110,100,16,91,111,98,106,99,93,32,75,101, 180 | 121,32,10,112,114,105,110,116,10,78,83,83,116,114,8,79,98,106,21,115,101,116, 181 | 86,97,108,117,101,95,102,111,114,75,101,121,95,22,102,97,108,108,98,97,99,107, 182 | 79,110,77,115,103,83,101,110,100,6,58,20,111,98,106,101,99,116,95,103,101,116, 183 | 67,108,97,115,115,29,99,108,97,115,115,95,114,101,115,112,111,110,100,115,84, 184 | 111,83,101,108,101,99,116,111,114,10,117,112,112,101,114,8,115,117,98,8,115, 185 | 101,116,2,193,2,0,2,7,3,10,1,44,54,2,0,0,18,3,1,0,66,2,2,2,10,2,0,0,88,3,5, 186 | 128,18,4,0,0,57,3,1,0,18,5,2,0,68,3,3,0,88,3,33,128,45,3,0,0,57,3,2,3,45,4,0, 187 | 0,57,4,3,4,18,5,0,0,66,4,2,2,45,5,1,0,18,6,1,0,66,5,2,0,65,3,1,2,9,3,0,0,88,3, 188 | 4,128,56,3,1,0,18,4,0,0,68,3,2,0,88,3,17,128,45,3,2,0,57,3,4,3,11,3,2,0,88,3, 189 | 7,128,18,4,0,0,57,3,5,0,54,5,6,0,18,6,1,0,66,5,2,0,67,3,1,0,88,3,6,128,54,3,7, 190 | 0,39,4,8,0,18,5,1,0,39,6,9,0,38,4,6,4,66,3,2,1,75,0,1,0,5,192,7,192,3,192,15, 191 | 32,110,111,116,32,102,111,117,110,100,16,91,111,98,106,99,93,32,75,101,121,32, 192 | 10,112,114,105,110,116,10,78,83,83,116,114,17,118,97,108,117,101,70,111,114, 193 | 75,101,121,95,22,102,97,108,108,98,97,99,107,79,110,77,115,103,83,101,110,100, 194 | 20,111,98,106,101,99,116,95,103,101,116,67,108,97,115,115,29,99,108,97,115, 195 | 115,95,114,101,115,112,111,110,100,115,84,111,83,101,108,101,99,116,111,114, 196 | 19,111,98,106,101,99,116,65,116,73,110,100,101,120,95,13,116,111,110,117,109, 197 | 98,101,114,2,94,0,1,4,0,4,0,8,54,1,0,0,39,2,1,0,54,3,2,0,57,3,3,3,66,3,1,2,38, 198 | 2,3,2,66,1,2,1,75,0,1,0,14,116,114,97,99,101,98,97,99,107,10,100,101,98,117, 199 | 103,37,91,111,98,106,99,93,32,67,108,97,115,115,101,115,32,97,114,101,32,110, 200 | 111,116,32,99,97,108,108,97,98,108,101,10,10,101,114,114,111,114,252,8,2,1,14, 201 | 8,34,1,162,1,45,1,0,0,4,0,1,0,88,1,9,128,54,1,0,0,39,2,1,0,54,3,2,0,57,3,3,3, 202 | 66,3,1,2,38,2,3,2,66,1,2,1,43,1,0,0,76,1,2,0,45,1,1,0,57,1,4,1,11,1,2,0,88,1, 203 | 15,128,45,1,2,0,39,2,5,0,18,3,2,0,57,2,6,2,54,4,7,0,39,5,8,0,71,6,1,0,65,4,1, 204 | 2,54,5,9,0,45,6,2,0,66,5,2,2,33,4,5,4,66,2,3,2,38,1,2,1,46,2,1,0,45,1,3,0,57, 205 | 1,10,1,45,2,4,0,57,2,11,2,45,3,5,0,18,4,0,0,66,2,3,2,45,3,2,0,43,4,2,0,66,1,4, 206 | 2,45,2,1,0,57,2,12,2,45,3,4,0,57,3,13,3,45,4,3,0,57,4,14,4,18,5,1,0,66,4,2,0, 207 | 65,3,0,0,65,2,0,2,45,3,3,0,57,3,15,3,18,4,1,0,66,3,2,2,9,3,0,0,88,3,8,128,45, 208 | 3,4,0,57,3,11,3,18,4,2,0,45,5,3,0,57,5,16,5,66,3,3,2,14,0,3,0,88,4,6,128,45,3, 209 | 4,0,57,3,11,3,18,4,2,0,45,5,3,0,57,5,17,5,66,3,3,2,45,4,3,0,57,4,18,4,18,5,1, 210 | 0,66,4,2,2,54,5,19,0,18,6,3,0,45,7,4,0,57,7,11,7,45,8,5,0,18,9,0,0,66,7,3,2, 211 | 18,8,4,0,71,9,1,0,65,5,3,3,11,5,1,0,88,7,11,128,54,7,0,0,39,8,20,0,45,9,2,0, 212 | 39,10,21,0,18,11,6,0,39,12,22,0,54,13,2,0,57,13,3,13,66,13,1,2,38,8,13,8,66,7, 213 | 2,1,45,7,4,0,57,7,23,7,45,8,5,0,18,9,6,0,66,7,3,2,15,0,7,0,88,8,56,128,10,6,0, 214 | 0,88,7,54,128,45,7,2,0,18,8,7,0,57,7,24,7,41,9,1,0,41,10,5,0,66,7,4,2,6,7,25, 215 | 0,88,7,32,128,45,7,2,0,6,7,26,0,88,7,29,128,45,7,1,0,57,7,2,7,15,0,7,0,88,8, 216 | 20,128,45,7,6,0,39,8,27,0,18,9,4,0,39,10,28,0,38,8,10,8,45,9,4,0,57,9,13,9,45, 217 | 10,3,0,57,10,29,10,18,12,6,0,57,11,30,6,66,11,2,0,65,10,0,0,65,9,0,2,45,10,4, 218 | 0,57,10,11,10,39,11,31,0,18,12,6,0,66,10,3,0,65,7,2,1,45,7,3,0,57,7,32,7,18,8, 219 | 6,0,66,7,2,2,18,6,7,0,45,7,2,0,18,8,7,0,57,7,24,7,41,9,1,0,41,10,5,0,66,7,4,2, 220 | 6,7,25,0,88,7,6,128,45,7,4,0,57,7,33,7,18,8,6,0,45,9,7,0,66,7,3,2,18,6,7,0,76, 221 | 6,2,0,0,192,0,0,1,128,1,0,2,0,3,0,4,0,5,0,7,103,99,13,67,70,82,101,116,97,105, 222 | 110,10,118,111,105,100,42,10,99,108,97,115,115,18,99,108,97,115,115,95,103, 223 | 101,116,78,97,109,101,6,41,36,82,101,116,97,105,110,105,110,103,32,111,98,106, 224 | 101,99,116,32,111,102,32,99,108,97,115,115,32,40,115,101,108,58,8,110,101,119, 225 | 10,97,108,108,111,99,8,115,117,98,11,105,115,116,121,112,101,6,10,8,39,58,32, 226 | 20,69,114,114,111,114,32,99,97,108,108,105,110,103,32,39,10,112,99,97,108,108, 227 | 27,115,101,108,70,114,111,109,68,121,110,97,109,77,101,116,104,111,100,68,101, 228 | 115,99,23,111,98,106,99,95,109,115,103,83,101,110,100,95,115,116,114,101,116, 229 | 17,111,98,106,99,95,109,115,103,83,101,110,100,45,105,115,83,112,101,99,105, 230 | 97,108,83,116,114,117,99,116,82,101,116,117,114,110,70,114,111,109,68,121,110, 231 | 97,109,77,101,116,104,111,100,68,101,115,99,34,109,101,116,104,111,100,84,121, 232 | 112,101,70,114,111,109,68,121,110,97,109,77,101,116,104,111,100,68,101,115,99, 233 | 11,115,116,114,105,110,103,34,105,109,112,84,121,112,101,70,111,114,77,101, 234 | 116,104,111,100,84,121,112,101,69,110,99,111,100,101,105,110,103,9,99,97,115, 235 | 116,49,100,121,110,97,109,77,101,116,104,111,100,68,101,115,99,70,114,111,109, 236 | 77,101,116,104,111,100,78,97,109,101,87,105,116,104,85,110,100,101,114,115,99, 237 | 111,114,101,115,23,95,97,114,103,67,111,117,110,116,70,111,114,83,101,108,65, 238 | 114,103,6,35,11,115,101,108,101,99,116,8,114,101,112,6,95,18,114,101,108,97, 239 | 120,101,100,83,121,110,116,97,120,14,116,114,97,99,101,98,97,99,107,10,100, 240 | 101,98,117,103,75,91,111,98,106,99,93,32,83,101,108,102,32,110,111,116,32,112, 241 | 97,115,115,101,100,46,32,89,111,117,32,112,114,111,98,97,98,108,121,32,117, 242 | 115,101,100,32,100,111,116,32,105,110,115,116,101,97,100,32,111,102,32,99,111, 243 | 108,111,110,32,115,121,110,116,97,120,10,10,101,114,114,111,114,0,32,1,2,3,6, 244 | 1,0,3,51,2,0,0,50,0,0,128,76,2,2,0,3,192,5,192,0,192,12,192,4,192,6,192,0,146, 245 | 9,2,1,14,8,37,1,161,1,45,1,0,0,4,0,1,0,88,1,5,128,54,1,0,0,39,2,1,0,66,1,2,1, 246 | 43,1,0,0,76,1,2,0,45,1,1,0,57,1,2,1,11,1,2,0,88,1,15,128,45,1,2,0,39,2,3,0,18, 247 | 3,2,0,57,2,4,2,54,4,5,0,39,5,6,0,71,6,1,0,65,4,1,2,54,5,7,0,45,6,2,0,66,5,2,2, 248 | 33,4,5,4,66,2,3,2,38,1,2,1,46,2,1,0,45,1,3,0,57,1,8,1,18,2,0,0,45,3,2,0,43,4, 249 | 1,0,66,1,4,2,45,2,1,0,57,2,9,2,45,3,4,0,57,3,10,3,45,4,3,0,57,4,11,4,18,5,1,0, 250 | 66,4,2,0,65,3,0,0,65,2,0,2,45,3,3,0,57,3,12,3,18,4,1,0,66,3,2,2,9,3,0,0,88,3, 251 | 8,128,45,3,4,0,57,3,13,3,18,4,2,0,45,5,3,0,57,5,14,5,66,3,3,2,14,0,3,0,88,4,6, 252 | 128,45,3,4,0,57,3,13,3,18,4,2,0,45,5,3,0,57,5,15,5,66,3,3,2,45,4,3,0,57,4,16, 253 | 4,18,5,1,0,66,4,2,2,54,5,17,0,18,6,3,0,18,7,0,0,18,8,4,0,71,9,1,0,65,5,3,3,11, 254 | 5,1,0,88,7,11,128,54,7,0,0,39,8,18,0,45,9,2,0,39,10,19,0,18,11,6,0,39,12,20,0, 255 | 54,13,21,0,57,13,22,13,66,13,1,2,38,8,13,8,66,7,2,1,45,7,4,0,57,7,23,7,45,8,5, 256 | 0,18,9,6,0,66,7,3,2,15,0,7,0,88,8,67,128,10,6,0,0,88,7,65,128,45,7,2,0,6,7,24, 257 | 0,88,7,62,128,45,7,2,0,6,7,25,0,88,7,59,128,45,7,2,0,18,8,7,0,57,7,26,7,41,9, 258 | 1,0,41,10,4,0,66,7,4,2,6,7,27,0,88,7,45,128,45,7,2,0,18,8,7,0,57,7,26,7,41,9, 259 | 1,0,41,10,4,0,66,7,4,2,6,7,28,0,88,7,37,128,45,7,2,0,18,8,7,0,57,7,26,7,41,9, 260 | 1,0,41,10,11,0,66,7,4,2,6,7,29,0,88,7,29,128,45,7,1,0,57,7,21,7,15,0,7,0,88,8, 261 | 20,128,45,7,6,0,39,8,30,0,18,9,4,0,39,10,31,0,38,8,10,8,45,9,4,0,57,9,10,9,45, 262 | 10,3,0,57,10,32,10,18,12,6,0,57,11,33,6,66,11,2,0,65,10,0,0,65,9,0,2,45,10,4, 263 | 0,57,10,13,10,39,11,34,0,18,12,6,0,66,10,3,0,65,7,2,1,45,7,3,0,57,7,35,7,18,8, 264 | 6,0,66,7,2,2,18,6,7,0,45,7,4,0,57,7,36,7,18,8,6,0,45,9,7,0,66,7,3,2,18,6,7,0, 265 | 76,6,2,0,0,192,0,0,1,128,1,0,2,0,3,0,4,0,5,0,7,103,99,13,67,70,82,101,116,97, 266 | 105,110,10,118,111,105,100,42,10,99,108,97,115,115,18,99,108,97,115,115,95, 267 | 103,101,116,78,97,109,101,6,41,36,82,101,116,97,105,110,105,110,103,32,111,98, 268 | 106,101,99,116,32,111,102,32,99,108,97,115,115,32,40,115,101,108,58,16,109, 269 | 117,116,97,98,108,101,67,111,112,121,9,99,111,112,121,9,105,110,105,116,8,115, 270 | 117,98,12,114,101,108,101,97,115,101,11,114,101,116,97,105,110,11,105,115,116, 271 | 121,112,101,14,116,114,97,99,101,98,97,99,107,10,100,101,98,117,103,6,10,8,39, 272 | 58,32,20,69,114,114,111,114,32,99,97,108,108,105,110,103,32,39,10,112,99,97, 273 | 108,108,27,115,101,108,70,114,111,109,68,121,110,97,109,77,101,116,104,111, 274 | 100,68,101,115,99,23,111,98,106,99,95,109,115,103,83,101,110,100,95,115,116, 275 | 114,101,116,17,111,98,106,99,95,109,115,103,83,101,110,100,9,99,97,115,116,45, 276 | 105,115,83,112,101,99,105,97,108,83,116,114,117,99,116,82,101,116,117,114,110, 277 | 70,114,111,109,68,121,110,97,109,77,101,116,104,111,100,68,101,115,99,34,109, 278 | 101,116,104,111,100,84,121,112,101,70,114,111,109,68,121,110,97,109,77,101, 279 | 116,104,111,100,68,101,115,99,11,115,116,114,105,110,103,34,105,109,112,84, 280 | 121,112,101,70,111,114,77,101,116,104,111,100,84,121,112,101,69,110,99,111, 281 | 100,101,105,110,103,49,100,121,110,97,109,77,101,116,104,111,100,68,101,115, 282 | 99,70,114,111,109,77,101,116,104,111,100,78,97,109,101,87,105,116,104,85,110, 283 | 100,101,114,115,99,111,114,101,115,23,95,97,114,103,67,111,117,110,116,70,111, 284 | 114,83,101,108,65,114,103,6,35,11,115,101,108,101,99,116,8,114,101,112,6,95, 285 | 18,114,101,108,97,120,101,100,83,121,110,116,97,120,74,91,111,98,106,99,93,32, 286 | 83,101,108,102,32,110,111,116,32,112,97,115,115,101,100,46,32,89,111,117,32, 287 | 112,114,111,98,97,98,108,121,32,117,115,101,100,32,100,111,116,32,105,110,115, 288 | 116,101,97,100,32,111,102,32,99,111,108,111,110,32,115,121,110,116,97,120,10, 289 | 101,114,114,111,114,0,32,1,2,3,6,1,0,3,51,2,0,0,50,0,0,128,76,2,2,0,3,192,5, 290 | 192,0,192,12,192,4,192,6,192,0,166,2,0,2,11,3,6,1,45,45,2,0,0,57,2,0,2,18,3,0, 291 | 0,18,4,1,0,43,5,0,0,66,2,4,2,11,2,0,0,88,3,2,128,43,3,0,0,76,3,2,0,45,3,1,0, 292 | 57,3,1,3,45,4,0,0,57,4,2,4,18,5,2,0,66,4,2,0,65,3,0,2,45,4,2,0,57,4,3,4,18,5, 293 | 3,0,66,4,2,2,10,4,0,0,88,5,3,128,21,5,4,0,8,5,0,0,88,5,2,128,43,5,0,0,76,5,2, 294 | 0,45,5,2,0,57,5,4,5,58,6,1,4,66,5,2,2,11,5,0,0,88,6,2,128,43,6,0,0,76,6,2,0, 295 | 45,6,0,0,57,6,5,6,18,7,2,0,66,6,2,2,18,7,2,0,18,8,6,0,18,9,3,0,18,10,5,0,74,7, 296 | 5,0,5,192,0,192,3,192,19,105,118,97,114,95,103,101,116,79,102,102,115,101,116, 297 | 16,116,121,112,101,84,111,67,84,121,112,101,22,112,97,114,115,101,84,121,112, 298 | 101,69,110,99,111,100,105,110,103,25,105,118,97,114,95,103,101,116,84,121,112, 299 | 101,69,110,99,111,100,105,110,103,11,115,116,114,105,110,103,31,111,98,106, 300 | 101,99,116,95,103,101,116,73,110,115,116,97,110,99,101,86,97,114,105,97,98, 301 | 108,101,2,169,3,0,3,16,3,15,0,73,54,3,0,0,18,4,2,0,66,3,2,2,7,3,1,0,88,3,67, 302 | 128,54,3,2,0,57,3,3,3,18,4,0,0,45,5,0,0,66,3,3,5,15,0,3,0,88,7,60,128,54,7,2, 303 | 0,57,7,4,7,57,7,5,7,54,8,2,0,57,8,6,8,18,9,2,0,66,7,3,2,15,0,7,0,88,8,20,128, 304 | 54,7,2,0,57,7,4,7,57,7,7,7,57,7,8,7,18,8,0,0,18,9,1,0,18,10,4,0,18,11,2,0,45, 305 | 12,1,0,19,12,12,0,45,13,2,0,14,0,13,0,88,14,5,128,18,14,2,0,57,13,9,2,54,15,2, 306 | 0,57,15,10,15,66,13,3,2,66,7,7,1,88,7,31,128,54,7,2,0,57,7,4,7,57,7,11,7,18,8, 307 | 6,0,39,9,12,0,38,8,9,8,18,9,2,0,66,7,3,2,54,8,2,0,57,8,4,8,57,8,11,8,18,9,6,0, 308 | 39,10,12,0,38,9,10,9,32,10,4,0,66,8,3,2,54,9,2,0,57,9,4,9,57,9,7,9,57,9,13,9, 309 | 18,10,8,0,18,11,7,0,54,12,2,0,57,12,4,12,57,12,14,12,18,13,2,0,66,12,2,2,45, 310 | 13,1,0,19,13,13,0,43,14,1,0,66,9,6,1,75,0,1,0,8,192,10,192,9,192,11,115,105, 311 | 122,101,111,102,20,111,98,106,99,95,99,111,112,121,83,116,114,117,99,116,6,42, 312 | 9,99,97,115,116,12,78,83,66,108,111,99,107,18,105,115,75,105,110,100,79,102, 313 | 67,108,97,115,115,21,111,98,106,99,95,115,101,116,80,114,111,112,101,114,116, 314 | 121,6,67,11,105,100,84,121,112,101,11,105,115,116,121,112,101,8,102,102,105, 315 | 16,103,101,116,73,118,97,114,73,110,102,111,12,114,117,110,116,105,109,101,10, 316 | 99,100,97,116,97,9,116,121,112,101,226,2,0,2,15,2,13,0,62,54,2,0,0,57,2,1,2, 317 | 18,3,0,0,45,4,0,0,66,2,3,5,54,6,0,0,57,6,2,6,57,6,3,6,18,7,5,0,66,6,2,2,54,7, 318 | 0,0,57,7,4,7,5,6,7,0,88,6,10,128,54,6,0,0,57,6,5,6,57,6,6,6,18,7,0,0,18,8,1,0, 319 | 18,9,3,0,45,10,1,0,19,10,10,0,68,6,5,0,88,6,37,128,54,6,0,0,57,6,2,6,57,6,7,6, 320 | 18,7,5,0,39,8,8,0,38,7,8,7,32,8,3,0,66,6,3,2,54,7,0,0,57,7,2,7,57,7,9,7,18,8, 321 | 5,0,39,9,10,0,38,8,9,8,66,7,2,2,54,8,0,0,57,8,2,8,57,8,3,8,18,9,5,0,66,8,2,2, 322 | 54,9,0,0,57,9,2,9,57,9,5,9,57,9,11,9,18,10,7,0,18,11,6,0,54,12,0,0,57,12,2,12, 323 | 57,12,12,12,18,13,8,0,66,12,2,2,45,13,1,0,19,13,13,0,43,14,1,0,66,9,6,1,58,9, 324 | 0,7,76,9,2,0,75,0,1,0,8,192,9,192,11,115,105,122,101,111,102,20,111,98,106,99, 325 | 95,99,111,112,121,83,116,114,117,99,116,8,91,49,93,8,110,101,119,6,42,9,99,97, 326 | 115,116,21,111,98,106,99,95,103,101,116,80,114,111,112,101,114,116,121,6,67, 327 | 11,105,100,84,121,112,101,11,116,121,112,101,111,102,8,102,102,105,16,103,101, 328 | 116,73,118,97,114,73,110,102,111,12,114,117,110,116,105,109,101,132,10,1,3,24, 329 | 5,45,1,243,1,41,3,3,0,54,4,0,0,18,5,2,0,66,4,2,4,72,7,1,128,22,3,0,3,70,7,3,2, 330 | 82,7,253,127,39,4,1,0,18,5,3,0,39,6,2,0,38,4,6,4,45,5,0,0,57,5,3,5,18,6,4,0, 331 | 52,7,0,0,66,5,3,2,41,6,0,0,56,7,6,5,39,8,5,0,61,8,4,7,56,7,6,5,57,8,7,2,61,8, 332 | 6,7,22,6,0,6,57,7,8,2,15,0,7,0,88,8,7,128,56,7,6,5,39,8,9,0,61,8,4,7,56,7,6,5, 333 | 39,8,10,0,61,8,6,7,22,6,0,6,57,7,11,2,15,0,7,0,88,8,30,128,57,7,11,2,7,7,12,0, 334 | 88,8,8,128,56,8,6,5,39,9,13,0,61,9,4,8,56,8,6,5,39,9,10,0,61,9,6,8,22,6,0,6, 335 | 88,8,19,128,7,7,14,0,88,8,8,128,56,8,6,5,39,9,15,0,61,9,4,8,56,8,6,5,39,9,10, 336 | 0,61,9,6,8,22,6,0,6,88,8,9,128,7,7,16,0,88,8,7,128,56,8,6,5,39,9,17,0,61,9,4, 337 | 8,56,8,6,5,39,9,10,0,61,9,6,8,22,6,0,6,57,7,18,2,15,0,7,0,88,8,7,128,56,7,6,5, 338 | 39,8,19,0,61,8,4,7,56,7,6,5,39,8,10,0,61,8,6,7,22,6,0,6,39,7,20,0,18,9,1,0,57, 339 | 8,21,1,41,10,1,0,41,11,1,0,66,8,4,2,18,9,8,0,57,8,22,8,66,8,2,2,18,10,1,0,57, 340 | 9,21,1,41,11,2,0,66,9,3,2,39,10,23,0,38,7,10,7,57,8,24,2,15,0,8,0,88,9,8,128, 341 | 56,8,6,5,39,9,25,0,61,9,4,8,56,8,6,5,57,9,24,2,61,9,6,8,22,6,0,6,88,8,36,128, 342 | 56,8,6,5,39,9,25,0,61,9,4,8,56,8,6,5,61,7,6,8,57,8,26,2,14,0,8,0,88,9,3,128, 343 | 39,8,27,0,18,9,1,0,38,8,9,8,57,9,11,2,6,9,16,0,88,9,2,128,43,9,1,0,88,10,1, 344 | 128,43,9,2,0,57,10,18,2,10,10,2,0,88,10,2,128,43,10,1,0,88,11,1,128,43,10,2,0, 345 | 45,11,1,0,57,11,28,11,18,12,0,0,45,13,2,0,18,14,7,0,66,13,2,2,51,14,29,0,39, 346 | 15,30,0,57,16,7,2,38,15,16,15,66,11,5,1,22,6,0,6,50,8,0,128,57,8,31,2,15,0,8, 347 | 0,88,9,8,128,56,8,6,5,39,9,32,0,61,9,4,8,56,8,6,5,57,9,31,2,61,9,6,8,22,6,0,6, 348 | 88,8,30,128,56,8,6,5,39,9,32,0,61,9,4,8,56,8,6,5,61,1,6,8,57,8,26,2,14,0,8,0, 349 | 88,9,3,128,39,8,27,0,18,9,1,0,38,8,9,8,57,9,18,2,10,9,2,0,88,9,2,128,43,9,1,0, 350 | 88,10,1,128,43,9,2,0,45,10,1,0,57,10,28,10,18,11,0,0,45,12,2,0,18,13,1,0,66, 351 | 12,2,2,51,13,33,0,57,14,7,2,39,15,34,0,38,14,15,14,66,10,5,1,22,6,0,6,50,8,0, 352 | 128,39,8,27,0,18,9,1,0,38,8,9,8,57,9,26,2,15,0,9,0,88,10,7,128,56,9,6,5,39,10, 353 | 35,0,61,10,4,9,56,9,6,5,57,10,26,2,61,10,6,9,88,9,41,128,45,9,3,0,54,10,36,0, 354 | 18,11,8,0,66,9,3,5,11,9,0,0,88,13,35,128,54,13,37,0,57,13,38,13,57,14,7,2,66, 355 | 13,2,2,10,13,0,0,88,14,29,128,21,14,13,0,9,14,0,0,88,14,26,128,54,14,37,0,57, 356 | 14,39,14,58,15,1,13,66,14,2,2,10,14,0,0,88,15,20,128,45,15,0,0,57,15,40,15,18, 357 | 16,14,0,66,15,2,2,45,16,0,0,57,16,41,16,18,17,15,0,66,16,2,2,45,17,0,0,57,17, 358 | 42,17,18,18,15,0,66,17,2,2,45,18,4,0,57,18,43,18,18,19,0,0,18,20,8,0,18,21,16, 359 | 0,18,22,17,0,57,23,7,2,66,18,6,1,45,9,4,0,57,9,44,9,18,10,0,0,18,11,1,0,18,12, 360 | 5,0,18,13,3,0,66,9,5,1,75,0,1,0,0,192,3,192,7,192,32,192,5,192,22,99,108,97, 361 | 115,115,95,97,100,100,80,114,111,112,101,114,116,121,18,99,108,97,115,115,95, 362 | 97,100,100,73,118,97,114,12,97,108,105,103,110,111,102,11,115,105,122,101,111, 363 | 102,11,116,121,112,101,111,102,16,116,121,112,101,84,111,67,84,121,112,101,22, 364 | 112,97,114,115,101,84,121,112,101,69,110,99,111,100,105,110,103,12,114,117, 365 | 110,116,105,109,101,9,115,101,108,102,6,86,7,64,58,0,6,71,15,103,101,116,116, 366 | 101,114,78,97,109,101,8,118,64,58,0,14,97,100,100,77,101,116,104,111,100,6,95, 367 | 13,105,118,97,114,78,97,109,101,6,83,15,115,101,116,116,101,114,78,97,109,101, 368 | 6,58,10,117,112,112,101,114,8,115,117,98,8,115,101,116,6,78,14,110,111,110,97, 369 | 116,111,109,105,99,6,67,9,99,111,112,121,6,87,9,119,101,97,107,6,38,11,115, 370 | 116,114,111,110,103,14,111,119,110,101,114,83,104,105,112,5,6,82,13,114,101, 371 | 97,100,79,110,108,121,17,116,121,112,101,69,110,99,111,100,105,110,103,10,118, 372 | 97,108,117,101,6,84,9,110,97,109,101,8,110,101,119,6,93,31,111,98,106,99,95, 373 | 112,114,111,112,101,114,116,121,95,97,116,116,114,105,98,117,116,101,95,116, 374 | 91,10,112,97,105,114,115,2,152,3,0,4,21,3,10,1,66,14,0,2,0,88,4,1,128,52,2,0, 375 | 0,45,4,0,0,57,4,0,4,18,5,0,0,18,6,1,0,41,7,0,0,66,4,4,2,54,5,1,0,18,6,2,0,66, 376 | 5,2,4,72,8,35,128,45,10,1,0,57,10,2,10,18,11,9,0,66,10,2,2,10,10,0,0,88,11,29, 377 | 128,21,11,10,0,9,11,0,0,88,11,26,128,45,11,1,0,57,11,3,11,58,12,1,10,66,11,2, 378 | 2,10,11,0,0,88,12,20,128,45,12,2,0,57,12,4,12,18,13,11,0,66,12,2,2,45,13,2,0, 379 | 57,13,5,13,18,14,12,0,66,13,2,2,45,14,2,0,57,14,6,14,18,15,12,0,66,14,2,2,45, 380 | 15,0,0,57,15,7,15,18,16,4,0,18,17,8,0,18,18,13,0,18,19,14,0,18,20,9,0,66,15,6, 381 | 1,70,8,3,3,82,8,219,127,54,5,1,0,18,6,3,0,66,5,2,4,72,8,5,128,54,10,8,0,18,11, 382 | 4,0,18,12,8,0,18,13,9,0,66,10,4,1,70,8,3,3,82,8,249,127,45,5,0,0,57,5,9,5,18, 383 | 6,4,0,66,5,2,1,76,4,2,0,5,192,3,192,0,192,27,111,98,106,99,95,114,101,103,105, 384 | 115,116,101,114,67,108,97,115,115,80,97,105,114,16,97,100,100,80,114,111,112, 385 | 101,114,116,121,18,99,108,97,115,115,95,97,100,100,73,118,97,114,12,97,108, 386 | 105,103,110,111,102,11,115,105,122,101,111,102,11,116,121,112,101,111,102,16, 387 | 116,121,112,101,84,111,67,84,121,112,101,22,112,97,114,115,101,84,121,112,101, 388 | 69,110,99,111,100,105,110,103,10,112,97,105,114,115,27,111,98,106,99,95,97, 389 | 108,108,111,99,97,116,101,67,108,97,115,115,80,97,105,114,2,184,3,2,2,15,3,16, 390 | 0,53,45,2,0,0,57,2,0,2,45,3,0,0,57,3,1,3,18,4,0,0,66,3,2,0,65,2,0,2,45,3,0,0, 391 | 57,3,2,3,18,4,2,0,18,5,1,0,66,3,3,2,45,4,1,0,57,4,3,4,45,5,2,0,57,5,4,5,45,6, 392 | 0,0,57,6,5,6,18,7,3,0,66,6,2,0,65,5,0,0,65,4,0,2,45,5,2,0,57,5,6,5,18,6,4,0, 393 | 45,7,0,0,57,7,7,7,18,8,3,0,66,7,2,0,65,5,1,2,54,6,8,0,18,7,5,0,18,8,0,0,18,9, 394 | 1,0,71,10,2,0,65,6,3,3,11,6,1,0,88,8,14,128,54,8,9,0,39,9,10,0,45,10,1,0,57, 395 | 10,11,10,18,11,1,0,66,10,2,2,39,11,12,0,18,12,7,0,39,13,13,0,54,14,14,0,57,14, 396 | 15,14,66,14,1,2,38,9,14,9,66,8,2,1,76,7,2,0,5,192,3,192,0,192,14,116,114,97, 397 | 99,101,98,97,99,107,10,100,101,98,117,103,6,10,8,39,58,32,13,115,101,108,84, 398 | 111,83,116,114,26,69,114,114,111,114,32,99,97,108,108,105,110,103,32,115,117, 399 | 112,101,114,32,39,10,101,114,114,111,114,10,112,99,97,108,108,29,109,101,116, 400 | 104,111,100,95,103,101,116,73,109,112,108,101,109,101,110,116,97,116,105,111, 401 | 110,9,99,97,115,116,27,109,101,116,104,111,100,95,103,101,116,84,121,112,101, 402 | 69,110,99,111,100,105,110,103,11,115,116,114,105,110,103,34,105,109,112,84, 403 | 121,112,101,70,111,114,77,101,116,104,111,100,84,121,112,101,69,110,99,111, 404 | 100,101,105,110,103,28,99,108,97,115,115,95,103,101,116,73,110,115,116,97,110, 405 | 99,101,77,101,116,104,111,100,20,111,98,106,101,99,116,95,103,101,116,67,108, 406 | 97,115,115,24,99,108,97,115,115,95,103,101,116,83,117,112,101,114,99,108,97, 407 | 115,115,200,2,0,3,11,1,6,0,45,45,3,0,0,57,3,0,3,18,4,0,0,18,5,1,0,66,3,3,2,45, 408 | 4,0,0,57,4,0,4,18,5,0,0,18,6,2,0,66,4,3,2,45,5,0,0,57,5,1,5,18,6,0,0,18,7,1,0, 409 | 45,8,0,0,57,8,2,8,18,9,4,0,66,8,2,2,45,9,0,0,57,9,3,9,18,10,4,0,66,9,2,0,65,5, 410 | 3,2,11,5,2,0,88,5,14,128,45,5,0,0,57,5,4,5,18,6,0,0,18,7,2,0,45,8,0,0,57,8,2, 411 | 8,18,9,3,0,66,8,2,2,45,9,0,0,57,9,3,9,18,10,3,0,66,9,2,0,65,5,3,1,88,5,5,128, 412 | 45,5,0,0,57,5,5,5,18,6,3,0,18,7,4,0,66,5,3,1,75,0,1,0,5,192,35,109,101,116, 413 | 104,111,100,95,101,120,99,104,97,110,103,101,73,109,112,108,101,109,101,110, 414 | 116,97,116,105,111,110,115,24,99,108,97,115,115,95,114,101,112,108,97,99,101, 415 | 77,101,116,104,111,100,27,109,101,116,104,111,100,95,103,101,116,84,121,112, 416 | 101,69,110,99,111,100,105,110,103,29,109,101,116,104,111,100,95,103,101,116, 417 | 73,109,112,108,101,109,101,110,116,97,116,105,111,110,20,99,108,97,115,115,95, 418 | 97,100,100,77,101,116,104,111,100,28,99,108,97,115,115,95,103,101,116,73,110, 419 | 115,116,97,110,99,101,77,101,116,104,111,100,88,0,1,5,1,5,0,12,54,1,0,0,57,1, 420 | 1,1,54,2,2,0,45,3,0,0,57,3,3,3,57,3,4,3,18,4,0,0,66,3,2,0,65,2,0,2,41,3,7,0, 421 | 41,4,254,255,68,1,4,0,3,192,11,116,121,112,101,111,102,8,102,102,105,13,116, 422 | 111,115,116,114,105,110,103,8,115,117,98,11,115,116,114,105,110,103,140,8,0,2, 423 | 12,12,26,1,188,1,41,2,1,0,85,3,185,128,54,3,0,0,57,3,1,3,18,4,0,0,18,5,2,0,66, 424 | 3,3,3,14,0,3,0,88,5,1,128,88,3,177,128,45,5,0,0,57,5,2,5,18,6,5,0,57,5,3,5,66, 425 | 5,2,2,18,6,5,0,57,5,4,5,66,5,2,2,18,7,5,0,57,6,5,5,18,8,2,0,66,6,3,1,18,7,5,0, 426 | 57,6,6,5,45,8,0,0,57,8,7,8,18,9,3,0,66,8,2,0,65,6,1,1,54,6,8,0,18,7,4,0,66,6, 427 | 2,2,7,6,9,0,88,6,92,128,45,6,1,0,57,6,10,6,45,7,2,0,18,8,4,0,66,6,3,2,15,0,6, 428 | 0,88,7,9,128,18,7,5,0,57,6,11,5,18,8,4,0,66,6,3,1,18,7,5,0,57,6,12,5,45,8,3,0, 429 | 66,6,3,1,88,6,131,128,45,6,1,0,57,6,10,6,45,7,4,0,18,8,4,0,66,6,3,2,15,0,6,0, 430 | 88,7,17,128,18,7,5,0,57,6,11,5,45,8,0,0,57,8,13,8,18,9,8,0,57,8,3,8,66,8,2,2, 431 | 18,9,8,0,57,8,14,8,18,10,4,0,66,8,3,0,65,6,1,1,18,7,5,0,57,6,12,5,45,8,5,0,66, 432 | 6,3,1,88,6,107,128,45,6,1,0,57,6,10,6,45,7,6,0,18,8,4,0,66,6,3,2,15,0,6,0,88, 433 | 7,17,128,18,7,5,0,57,6,11,5,45,8,0,0,57,8,13,8,18,9,8,0,57,8,3,8,66,8,2,2,18, 434 | 9,8,0,57,8,15,8,18,10,4,0,66,8,3,0,65,6,1,1,18,7,5,0,57,6,12,5,45,8,7,0,66,6, 435 | 3,1,88,6,83,128,45,6,0,0,57,6,16,6,18,7,6,0,57,6,17,6,18,8,4,0,45,9,1,0,57,9, 436 | 18,9,18,10,4,0,66,9,2,0,65,6,2,2,18,8,5,0,57,7,11,5,18,9,6,0,66,7,3,1,18,8,5, 437 | 0,57,7,19,5,45,9,0,0,57,9,7,9,54,10,20,0,18,11,4,0,66,10,2,0,65,9,0,0,65,7,1, 438 | 1,18,8,5,0,57,7,12,5,45,9,8,0,66,7,3,1,88,6,55,128,54,6,8,0,18,7,4,0,66,6,2,2, 439 | 7,6,21,0,88,6,17,128,18,7,5,0,57,6,11,5,45,8,0,0,57,8,13,8,18,9,8,0,57,8,3,8, 440 | 66,8,2,2,18,9,8,0,57,8,22,8,18,10,4,0,66,8,3,0,65,6,1,1,18,7,5,0,57,6,12,5,45, 441 | 8,9,0,66,6,3,1,88,6,33,128,54,6,8,0,18,7,4,0,66,6,2,2,7,6,23,0,88,6,12,128,18, 442 | 7,5,0,57,6,11,5,45,8,0,0,57,8,7,8,18,9,4,0,66,8,2,0,65,6,1,1,18,7,5,0,57,6,12, 443 | 5,45,8,10,0,66,6,3,1,88,6,16,128,54,6,8,0,18,7,4,0,66,6,2,2,7,6,24,0,88,6,11, 444 | 128,18,7,5,0,57,6,11,5,45,8,0,0,57,8,7,8,18,9,4,0,66,8,2,0,65,6,1,1,18,7,5,0, 445 | 57,6,12,5,45,8,11,0,66,6,3,1,18,7,1,0,57,6,25,1,18,8,5,0,66,6,3,1,22,2,0,2,88, 446 | 3,70,127,75,0,1,0,3,192,0,192,12,192,40,192,41,192,35,192,42,192,36,192,39, 447 | 192,37,192,34,192,38,192,15,97,100,100,79,98,106,101,99,116,95,11,115,116,114, 448 | 105,110,103,11,110,117,109,98,101,114,18,105,110,105,116,87,105,116,104,66, 449 | 111,111,108,95,12,98,111,111,108,101,97,110,10,99,116,121,112,101,14,115,101, 450 | 116,67,84,121,112,101,95,11,115,105,122,101,111,102,26,100,97,116,97,87,105, 451 | 116,104,66,121,116,101,115,95,108,101,110,103,116,104,95,11,78,83,68,97,116, 452 | 97,29,105,110,105,116,87,105,116,104,85,110,115,105,103,110,101,100,73,110, 453 | 116,101,103,101,114,95,21,105,110,105,116,87,105,116,104,73,110,116,101,103, 454 | 101,114,95,13,78,83,78,117,109,98,101,114,13,115,101,116,84,121,112,101,95,14, 455 | 115,101,116,86,97,108,117,101,95,11,105,115,116,121,112,101,10,99,100,97,116, 456 | 97,9,116,121,112,101,8,79,98,106,13,115,101,116,78,97,109,101,95,14,115,101, 457 | 116,73,110,100,101,120,95,9,105,110,105,116,10,97,108,108,111,99,17,68,121, 458 | 110,97,109,85,112,118,97,108,117,101,15,103,101,116,117,112,118,97,108,117, 459 | 101,10,100,101,98,117,103,2,154,10,0,4,19,5,44,1,178,1,45,4,0,0,57,4,0,4,45,5, 460 | 1,0,57,5,1,5,6,5,2,0,88,5,34,128,54,5,3,0,57,5,4,5,18,6,3,0,41,7,1,0,41,8,1,0, 461 | 66,5,4,2,7,5,5,0,88,5,26,128,45,5,2,0,57,5,6,5,18,6,5,0,57,5,7,5,45,7,3,0,57, 462 | 7,8,7,39,8,9,0,18,9,3,0,66,7,3,0,65,5,1,2,18,7,5,0,57,6,10,5,66,6,2,2,18,7,6, 463 | 0,57,6,11,6,45,8,2,0,57,8,12,8,39,9,13,0,66,8,2,0,65,6,1,2,57,7,14,6,45,8,4,0, 464 | 4,7,8,0,88,7,2,128,45,7,0,0,57,4,15,7,45,5,2,0,57,5,16,5,39,6,17,0,66,5,2,2, 465 | 45,6,2,0,57,6,16,6,39,7,18,0,66,6,2,2,45,7,0,0,57,7,19,7,18,8,0,0,18,9,5,0,66, 466 | 7,3,2,45,8,3,0,57,8,8,8,39,9,20,0,45,10,0,0,57,10,21,10,66,8,3,2,4,7,8,0,88,7, 467 | 24,128,45,7,0,0,57,7,22,7,18,8,0,0,18,9,6,0,45,10,3,0,57,10,8,10,39,11,20,0, 468 | 45,12,0,0,57,12,21,12,66,10,3,2,39,11,23,0,66,7,5,2,9,7,0,0,88,7,7,128,45,7,2, 469 | 0,57,7,24,7,18,8,0,0,18,9,5,0,18,10,6,0,66,7,4,1,88,7,3,128,54,7,25,0,39,8,26, 470 | 0,66,7,2,1,43,7,0,0,45,8,0,0,57,8,27,8,18,9,0,0,18,10,1,0,66,8,3,2,15,0,8,0, 471 | 88,9,6,128,45,8,0,0,57,8,19,8,18,9,0,0,18,10,1,0,66,8,3,2,18,7,8,0,45,8,2,0, 472 | 57,8,16,8,39,9,28,0,45,10,2,0,57,10,29,10,18,11,1,0,66,10,2,2,38,9,10,9,66,8, 473 | 2,2,45,9,0,0,57,9,27,9,18,10,0,0,18,11,8,0,66,9,3,2,11,9,1,0,88,9,7,128,45,9, 474 | 0,0,57,9,22,9,18,10,0,0,18,11,8,0,18,12,7,0,18,13,3,0,66,9,5,1,54,9,3,0,57,9, 475 | 30,9,18,10,2,0,66,9,2,2,45,10,2,0,57,10,31,10,18,11,10,0,57,10,32,10,45,12,3, 476 | 0,57,12,8,12,39,13,33,0,18,14,9,0,66,12,3,2,54,13,3,0,57,13,34,13,18,14,9,0, 477 | 66,13,2,0,65,10,2,2,45,11,2,0,57,11,35,11,18,12,11,0,57,11,36,11,66,11,2,2,54, 478 | 12,37,0,18,13,2,0,18,14,11,0,66,12,3,1,45,12,2,0,57,12,38,12,18,13,12,0,57,12, 479 | 39,12,66,12,2,2,18,13,12,0,57,12,40,12,18,14,10,0,18,15,11,0,66,12,4,2,18,14, 480 | 0,0,57,13,41,0,18,15,12,0,45,16,2,0,57,16,42,16,45,17,2,0,57,17,29,17,18,18,1, 481 | 0,66,17,2,0,65,16,0,0,65,13,2,1,45,13,0,0,57,13,43,13,18,14,0,0,18,15,1,0,18, 482 | 16,4,0,18,17,3,0,66,13,5,1,75,0,1,0,5,192,2,192,3,192,0,192,14,128,24,99,108, 483 | 97,115,115,95,114,101,112,108,97,99,101,77,101,116,104,111,100,8,79,98,106,29, 484 | 95,95,95,95,115,101,116,76,117,97,76,97,109,98,100,97,95,102,111,114,75,101, 485 | 121,95,27,105,110,105,116,87,105,116,104,67,111,100,101,95,117,112,118,97,108, 486 | 117,101,115,95,10,97,108,108,111,99,16,68,121,110,97,109,77,101,116,104,111, 487 | 100,23,100,117,109,112,76,97,109,98,100,97,85,112,118,97,108,117,101,115,10, 488 | 97,114,114,97,121,19,78,83,77,117,116,97,98,108,101,65,114,114,97,121,8,108, 489 | 101,110,11,118,111,105,100,32,42,26,100,97,116,97,87,105,116,104,66,121,116, 490 | 101,115,95,108,101,110,103,116,104,95,11,78,83,68,97,116,97,9,100,117,109,112, 491 | 13,115,101,108,84,111,83,116,114,7,95,95,29,99,108,97,115,115,95,114,101,115, 492 | 112,111,110,100,115,84,111,83,101,108,101,99,116,111,114,40,67,111,117,108, 493 | 100,110,39,116,32,114,101,112,108,97,99,101,32,102,111,114,119,97,114,100,73, 494 | 110,118,111,99,97,116,105,111,110,58,10,101,114,114,111,114,12,115,119,105, 495 | 122,122,108,101,9,118,64,58,64,20,99,108,97,115,115,95,97,100,100,77,101,116, 496 | 104,111,100,23,102,111,114,119,97,114,100,95,105,110,118,111,99,97,116,105, 497 | 111,110,8,73,77,80,34,99,108,97,115,115,95,103,101,116,77,101,116,104,111,100, 498 | 73,109,112,108,101,109,101,110,116,97,116,105,111,110,25,95,95,102,111,114, 499 | 119,97,114,100,73,110,118,111,99,97,116,105,111,110,58,23,102,111,114,119,97, 500 | 114,100,73,110,118,111,99,97,116,105,111,110,58,8,83,69,76,27,95,111,98,106, 501 | 99,95,109,115,103,70,111,114,119,97,114,100,95,115,116,114,101,116,13,108,111, 502 | 99,97,116,105,111,110,34,105,115,32,115,112,101,99,105,97,108,32,115,116,114, 503 | 117,99,116,32,114,101,116,117,114,110,63,32,89,69,83,10,78,83,83,116,114,19, 504 | 114,97,110,103,101,79,102,83,116,114,105,110,103,95,21,100,101,98,117,103,68, 505 | 101,115,99,114,105,112,116,105,111,110,11,99,104,97,114,32,42,9,99,97,115,116, 506 | 28,115,105,103,110,97,116,117,114,101,87,105,116,104,79,98,106,67,84,121,112, 507 | 101,115,95,22,78,83,77,101,116,104,111,100,83,105,103,110,97,116,117,114,101, 508 | 6,123,8,115,117,98,11,115,116,114,105,110,103,10,97,114,109,54,52,9,97,114,99, 509 | 104,21,95,111,98,106,99,95,109,115,103,70,111,114,119,97,114,100,2,86,0,2,9,2, 510 | 2,0,17,45,2,0,0,18,3,0,0,18,4,1,0,66,2,3,5,11,2,0,0,88,6,2,128,43,6,0,0,76,6, 511 | 2,0,45,6,1,0,57,6,0,6,18,7,5,0,39,8,1,0,38,7,8,7,32,8,3,0,66,6,3,2,58,7,0,6, 512 | 76,7,2,0,32,192,0,192,6,42,9,99,97,115,116,86,0,3,10,2,2,0,17,45,3,0,0,18,4,0, 513 | 0,18,5,1,0,66,3,3,5,11,3,0,0,88,7,2,128,43,7,0,0,76,7,2,0,45,7,1,0,57,7,0,7, 514 | 18,8,6,0,39,9,1,0,38,8,9,8,32,9,4,0,66,7,3,2,62,2,0,7,75,0,1,0,32,192,0,192,6, 515 | 42,9,99,97,115,116,160,1,0,1,4,3,6,0,24,54,1,0,0,18,2,0,0,66,1,2,2,7,1,1,0,88, 516 | 1,17,128,45,1,0,0,57,1,2,1,45,2,1,0,18,3,0,0,66,1,3,2,15,0,1,0,88,2,10,128,45, 517 | 1,2,0,57,1,3,1,18,2,1,0,57,1,4,1,66,1,2,2,18,2,1,0,57,1,5,1,18,3,0,0,68,1,3,0, 518 | 88,1,1,128,76,0,2,0,75,0,1,0,0,192,12,192,3,192,20,105,110,105,116,87,105,116, 519 | 104,79,98,106,101,99,116,95,10,97,108,108,111,99,15,87,101,97,107,79,98,106, 520 | 101,99,116,11,105,115,116,121,112,101,10,99,100,97,116,97,9,116,121,112,101, 521 | 164,1,0,1,4,3,6,0,25,54,1,0,0,18,2,0,0,66,1,2,2,7,1,1,0,88,1,18,128,45,1,0,0, 522 | 57,1,2,1,45,2,1,0,18,3,0,0,66,1,3,2,15,0,1,0,88,2,11,128,18,2,0,0,57,1,3,0,45, 523 | 3,2,0,57,3,4,3,66,1,3,2,15,0,1,0,88,2,5,128,18,2,0,0,57,1,5,0,68,1,2,0,88,1,1, 524 | 128,76,0,2,0,75,0,1,0,0,192,12,192,3,192,11,111,98,106,101,99,116,15,87,101, 525 | 97,107,79,98,106,101,99,116,19,105,115,75,105,110,100,79,102,67,108,97,115, 526 | 115,95,11,105,115,116,121,112,101,10,99,100,97,116,97,9,116,121,112,101,140,1, 527 | 0,2,8,1,5,0,17,45,2,0,0,57,2,0,2,18,3,0,0,66,2,2,2,45,3,0,0,57,3,1,3,18,4,3,0, 528 | 57,3,2,3,66,3,2,2,18,4,3,0,57,3,3,3,18,5,2,0,45,6,0,0,57,6,4,6,18,7,1,0,66,6, 529 | 2,0,67,3,2,0,3,192,8,79,98,106,31,105,110,105,116,87,105,116,104,66,108,111, 530 | 99,107,73,68,95,115,105,103,110,97,116,117,114,101,95,10,97,108,108,111,99,15, 531 | 68,121,110,97,109,66,108,111,99,107,19,114,101,103,105,115,116,101,114,76,97, 532 | 109,98,100,97,110,0,1,6,1,3,0,11,45,1,0,0,57,1,0,1,66,1,1,2,18,3,1,0,57,2,1,1, 533 | 66,2,2,2,54,3,2,0,18,4,0,0,18,5,2,0,66,3,3,1,75,0,1,0,5,192,23,100,117,109, 534 | 112,76,97,109,98,100,97,85,112,118,97,108,117,101,115,19,114,101,116,117,114, 535 | 110,82,101,103,105,115,116,101,114,27,103,101,116,95,99,117,114,114,101,110, 536 | 116,95,108,117,97,99,111,110,116,101,120,116,131,8,0,2,14,10,21,1,205,1,41,2, 537 | 0,0,54,3,0,0,18,5,1,0,57,4,1,1,66,4,2,0,65,3,0,2,23,3,0,3,41,4,1,0,77,2,195, 538 | 128,18,7,1,0,57,6,2,1,18,8,5,0,66,6,3,2,18,8,6,0,57,7,3,6,66,7,2,2,45,8,0,0,5, 539 | 7,8,0,88,7,23,128,18,8,6,0,57,7,4,6,66,7,2,2,45,8,1,0,57,8,5,8,18,9,7,0,66,8, 540 | 2,1,45,8,2,0,57,8,6,8,18,9,7,0,45,10,3,0,66,8,3,1,54,8,7,0,57,8,8,8,18,9,0,0, 541 | 54,10,0,0,18,12,6,0,57,11,9,6,66,11,2,0,65,10,0,2,18,11,7,0,66,8,4,1,88,7,161, 542 | 128,18,8,6,0,57,7,3,6,66,7,2,2,45,8,4,0,5,7,8,0,88,7,18,128,54,7,7,0,57,7,8,7, 543 | 18,8,0,0,54,9,0,0,18,11,6,0,57,10,9,6,66,10,2,0,65,9,0,2,54,10,0,0,18,12,6,0, 544 | 57,11,4,6,66,11,2,2,18,12,11,0,57,11,10,11,66,11,2,0,65,10,0,0,65,7,2,1,88,7, 545 | 137,128,18,8,6,0,57,7,3,6,66,7,2,2,45,8,5,0,5,7,8,0,88,7,16,128,54,7,7,0,57,7, 546 | 8,7,18,8,0,0,54,9,0,0,18,11,6,0,57,10,9,6,66,10,2,0,65,9,0,2,18,11,6,0,57,10, 547 | 4,6,66,10,2,2,18,11,10,0,57,10,11,10,66,10,2,0,65,7,2,1,88,7,115,128,18,8,6,0, 548 | 57,7,3,6,66,7,2,2,45,8,6,0,5,7,8,0,88,7,16,128,54,7,7,0,57,7,8,7,18,8,0,0,54, 549 | 9,0,0,18,11,6,0,57,10,9,6,66,10,2,0,65,9,0,2,18,11,6,0,57,10,4,6,66,10,2,2,18, 550 | 11,10,0,57,10,12,10,66,10,2,0,65,7,2,1,88,7,93,128,18,8,6,0,57,7,3,6,66,7,2,2, 551 | 45,8,7,0,5,7,8,0,88,7,16,128,54,7,7,0,57,7,8,7,18,8,0,0,54,9,0,0,18,11,6,0,57, 552 | 10,9,6,66,10,2,0,65,9,0,2,18,11,6,0,57,10,4,6,66,10,2,2,18,11,10,0,57,10,13, 553 | 10,66,10,2,0,65,7,2,1,88,7,71,128,18,8,6,0,57,7,3,6,66,7,2,2,45,8,8,0,5,7,8,0, 554 | 88,7,19,128,54,7,7,0,57,7,8,7,18,8,0,0,54,9,0,0,18,11,6,0,57,10,9,6,66,10,2,0, 555 | 65,9,0,2,45,10,2,0,57,10,14,10,18,12,6,0,57,11,4,6,66,11,2,2,18,12,11,0,57,11, 556 | 15,11,66,11,2,0,65,10,0,0,65,7,2,1,88,7,46,128,18,8,6,0,57,7,3,6,66,7,2,2,45, 557 | 8,9,0,5,7,8,0,88,7,40,128,45,7,2,0,57,7,16,7,45,8,2,0,57,8,14,8,18,10,6,0,57, 558 | 9,17,6,66,9,2,2,18,10,9,0,57,9,15,9,66,9,2,0,65,8,0,0,65,7,0,2,45,8,2,0,57,8, 559 | 18,8,18,9,7,0,18,11,6,0,57,10,4,6,66,10,2,2,18,11,10,0,57,10,19,10,66,10,2,2, 560 | 54,11,0,0,18,13,6,0,57,12,4,6,66,12,2,2,18,13,12,0,57,12,20,12,66,12,2,0,65, 561 | 11,0,0,65,8,2,1,54,8,7,0,57,8,8,8,18,9,0,0,54,10,0,0,18,12,6,0,57,11,9,6,66, 562 | 11,2,0,65,10,0,2,18,11,7,0,66,8,4,1,79,2,61,127,75,0,1,0,40,192,5,192,0,192,6, 563 | 192,34,192,35,192,36,192,37,192,38,192,39,192,11,108,101,110,103,116,104,10, 564 | 98,121,116,101,115,9,99,111,112,121,10,99,84,121,112,101,8,110,101,119,15,85, 565 | 84,70,56,83,116,114,105,110,103,11,115,116,114,105,110,103,14,98,111,111,108, 566 | 86,97,108,117,101,25,117,110,115,105,103,110,101,100,73,110,116,101,103,101, 567 | 114,86,97,108,117,101,17,105,110,116,101,103,101,114,86,97,108,117,101,16,100, 568 | 111,117,98,108,101,86,97,108,117,101,10,105,110,100,101,120,15,115,101,116, 569 | 117,112,118,97,108,117,101,10,100,101,98,117,103,7,103,99,13,67,70,82,101,116, 570 | 97,105,110,10,118,97,108,117,101,9,116,121,112,101,19,111,98,106,101,99,116, 571 | 65,116,73,110,100,101,120,95,10,99,111,117,110,116,13,116,111,110,117,109,98, 572 | 101,114,2,134,5,0,1,18,3,18,1,101,45,1,0,0,57,1,0,1,66,1,1,2,18,3,1,0,57,2,1, 573 | 1,66,2,2,2,18,4,2,0,57,3,2,2,66,3,2,2,54,4,3,0,18,6,3,0,57,5,4,3,66,5,2,0,65, 574 | 4,0,2,52,5,0,0,41,6,1,0,23,7,0,4,41,8,1,0,77,6,40,128,45,10,1,0,57,10,5,10,18, 575 | 12,3,0,57,11,6,3,18,13,9,0,66,11,3,0,65,10,0,2,45,11,2,0,57,11,7,11,18,12,10, 576 | 0,66,11,2,2,10,11,0,0,88,12,26,128,21,12,11,0,9,12,0,0,88,12,23,128,45,12,2,0, 577 | 57,12,8,12,58,13,1,11,66,12,2,2,10,12,0,0,88,13,17,128,18,13,12,0,39,14,9,0, 578 | 38,12,14,13,45,13,1,0,57,13,10,13,18,14,12,0,66,13,2,2,18,15,2,0,57,14,11,2, 579 | 18,16,13,0,18,17,9,0,66,14,4,1,54,14,12,0,57,14,13,14,18,15,5,0,58,16,0,13,66, 580 | 14,3,1,79,6,216,127,45,6,1,0,57,6,5,6,18,8,3,0,57,7,14,3,66,7,2,0,65,6,0,2,45, 581 | 7,2,0,57,7,7,7,18,8,6,0,66,7,2,2,10,7,0,0,88,8,29,128,21,8,7,0,9,8,0,0,88,8, 582 | 26,128,45,8,2,0,57,8,8,8,58,9,1,7,66,8,2,2,10,8,0,0,88,9,20,128,18,9,0,0,54, 583 | 10,15,0,18,11,5,0,66,10,2,0,65,9,0,2,6,6,16,0,88,10,13,128,18,10,8,0,39,11,9, 584 | 0,38,8,11,10,45,10,1,0,57,10,10,10,18,11,8,0,52,12,3,0,62,9,1,12,66,10,3,2,18, 585 | 12,2,0,57,11,17,2,18,13,10,0,66,11,3,1,75,0,1,0,5,192,0,192,3,192,20,115,101, 586 | 116,82,101,116,117,114,110,86,97,108,117,101,95,6,118,11,117,110,112,97,99, 587 | 107,21,109,101,116,104,111,100,82,101,116,117,114,110,84,121,112,101,11,105, 588 | 110,115,101,114,116,10,116,97,98,108,101,25,103,101,116,65,114,103,117,109, 589 | 101,110,116,95,97,116,73,110,100,101,120,95,8,110,101,119,8,91,49,93,16,116, 590 | 121,112,101,84,111,67,84,121,112,101,22,112,97,114,115,101,84,121,112,101,69, 591 | 110,99,111,100,105,110,103,28,103,101,116,65,114,103,117,109,101,110,116,84, 592 | 121,112,101,65,116,73,110,100,101,120,95,11,115,116,114,105,110,103,22,110, 593 | 117,109,98,101,114,79,102,65,114,103,117,109,101,110,116,115,13,116,111,110, 594 | 117,109,98,101,114,20,109,101,116,104,111,100,83,105,103,110,97,116,117,114, 595 | 101,21,97,114,103,117,109,101,110,116,82,101,103,105,115,116,101,114,27,103, 596 | 101,116,95,99,117,114,114,101,110,116,95,108,117,97,99,111,110,116,101,120, 597 | 116,2,138,6,0,2,20,3,21,1,123,45,2,0,0,57,2,0,2,66,2,1,2,18,4,2,0,57,3,1,2,66, 598 | 3,2,2,18,4,3,0,57,3,2,3,41,5,0,0,66,3,3,2,18,5,2,0,57,4,1,2,66,4,2,2,18,5,4,0, 599 | 57,4,2,4,41,6,1,0,66,4,3,2,18,6,4,0,57,5,3,4,66,5,2,2,54,6,4,0,18,8,5,0,57,7, 600 | 5,5,66,7,2,0,65,6,0,2,52,7,0,0,41,8,1,0,23,9,0,6,41,10,1,0,77,8,40,128,45,12, 601 | 1,0,57,12,6,12,18,14,5,0,57,13,7,5,18,15,11,0,66,13,3,0,65,12,0,2,45,13,2,0, 602 | 57,13,8,13,18,14,12,0,66,13,2,2,10,13,0,0,88,14,26,128,21,14,13,0,9,14,0,0,88, 603 | 14,23,128,45,14,2,0,57,14,9,14,58,15,1,13,66,14,2,2,10,14,0,0,88,15,17,128,18, 604 | 15,14,0,39,16,10,0,38,14,16,15,45,15,1,0,57,15,11,15,18,16,14,0,66,15,2,2,18, 605 | 17,4,0,57,16,12,4,18,18,15,0,18,19,11,0,66,16,4,1,54,16,13,0,57,16,14,16,18, 606 | 17,7,0,58,18,0,15,66,16,3,1,79,8,216,127,45,8,1,0,57,8,6,8,18,10,5,0,57,9,15, 607 | 5,66,9,2,0,65,8,0,2,45,9,2,0,57,9,8,9,18,10,8,0,66,9,2,2,10,9,0,0,88,10,40, 608 | 128,21,10,9,0,9,10,0,0,88,10,37,128,45,10,2,0,57,10,9,10,58,11,1,9,66,10,2,2, 609 | 10,10,0,0,88,11,31,128,54,11,16,0,45,12,1,0,57,12,6,12,18,13,0,0,18,14,1,0,66, 610 | 12,3,0,65,11,0,2,54,12,17,0,18,13,11,0,18,14,3,0,66,12,3,1,18,12,11,0,54,13, 611 | 18,0,18,14,7,0,66,13,2,0,65,12,0,2,6,8,19,0,88,13,13,128,18,13,10,0,39,14,10, 612 | 0,38,10,14,13,45,13,1,0,57,13,11,13,18,14,10,0,52,15,3,0,62,12,1,15,66,13,3,2, 613 | 18,15,4,0,57,14,20,4,18,16,13,0,66,14,3,1,75,0,1,0,5,192,0,192,3,192,20,115, 614 | 101,116,82,101,116,117,114,110,86,97,108,117,101,95,6,118,11,117,110,112,97, 615 | 99,107,22,115,101,116,76,97,109,98,100,97,85,112,118,97,108,117,101,115,15, 616 | 108,111,97,100,115,116,114,105,110,103,21,109,101,116,104,111,100,82,101,116, 617 | 117,114,110,84,121,112,101,11,105,110,115,101,114,116,10,116,97,98,108,101,25, 618 | 103,101,116,65,114,103,117,109,101,110,116,95,97,116,73,110,100,101,120,95,8, 619 | 110,101,119,8,91,49,93,16,116,121,112,101,84,111,67,84,121,112,101,22,112,97, 620 | 114,115,101,84,121,112,101,69,110,99,111,100,105,110,103,28,103,101,116,65, 621 | 114,103,117,109,101,110,116,84,121,112,101,65,116,73,110,100,101,120,95,11, 622 | 115,116,114,105,110,103,22,110,117,109,98,101,114,79,102,65,114,103,117,109, 623 | 101,110,116,115,13,116,111,110,117,109,98,101,114,20,109,101,116,104,111,100, 624 | 83,105,103,110,97,116,117,114,101,19,111,98,106,101,99,116,65,116,73,110,100, 625 | 101,120,95,21,97,114,103,117,109,101,110,116,82,101,103,105,115,116,101,114, 626 | 27,103,101,116,95,99,117,114,114,101,110,116,95,108,117,97,99,111,110,116,101, 627 | 120,116,2,253,6,0,2,20,3,25,2,138,1,45,2,0,0,57,2,0,2,66,2,1,2,18,4,2,0,57,3, 628 | 1,2,66,3,2,2,18,4,3,0,57,3,2,3,41,5,0,0,66,3,3,2,18,5,2,0,57,4,1,2,66,4,2,2, 629 | 18,5,4,0,57,4,2,4,41,6,1,0,66,4,3,2,18,6,4,0,57,5,3,4,66,5,2,2,54,6,4,0,18,8, 630 | 5,0,57,7,5,5,66,7,2,0,65,6,0,2,52,7,3,0,18,9,4,0,57,8,6,4,66,8,2,2,62,8,1,7, 631 | 18,9,4,0,57,8,7,4,66,8,2,0,63,8,0,0,41,8,2,0,23,9,1,6,41,10,1,0,77,8,40,128, 632 | 45,12,1,0,57,12,8,12,18,14,5,0,57,13,9,5,18,15,11,0,66,13,3,0,65,12,0,2,45,13, 633 | 2,0,57,13,10,13,18,14,12,0,66,13,2,2,10,13,0,0,88,14,26,128,21,14,13,0,9,14,1, 634 | 0,88,14,23,128,45,14,2,0,57,14,11,14,58,15,1,13,66,14,2,2,10,14,0,0,88,15,17, 635 | 128,18,15,14,0,39,16,12,0,38,14,16,15,45,15,1,0,57,15,13,15,18,16,14,0,66,15, 636 | 2,2,18,17,4,0,57,16,14,4,18,18,15,0,18,19,11,0,66,16,4,1,54,16,15,0,57,16,16, 637 | 16,18,17,7,0,58,18,0,15,66,16,3,1,79,8,216,127,45,8,1,0,57,8,8,8,18,10,5,0,57, 638 | 9,17,5,66,9,2,0,65,8,0,2,45,9,2,0,57,9,10,9,18,10,8,0,66,9,2,2,45,10,0,0,57, 639 | 10,18,10,10,9,0,0,88,11,45,128,21,11,9,0,9,11,1,0,88,11,42,128,45,11,2,0,57, 640 | 11,11,11,58,12,1,9,66,11,2,2,10,11,0,0,88,12,36,128,54,12,19,0,45,13,1,0,57, 641 | 13,8,13,18,14,0,0,18,15,1,0,66,13,3,0,65,12,0,2,54,13,20,0,18,14,12,0,18,15,3, 642 | 0,66,13,3,1,45,13,2,0,57,13,21,13,18,14,12,0,66,13,2,2,18,10,13,0,18,13,12,0, 643 | 54,14,22,0,18,15,7,0,66,14,2,0,65,13,0,2,6,8,23,0,88,14,13,128,18,14,11,0,39, 644 | 15,12,0,38,11,15,14,45,14,1,0,57,14,13,14,18,15,11,0,52,16,3,0,62,13,1,16,66, 645 | 14,3,2,18,16,4,0,57,15,24,4,18,17,14,0,66,15,3,1,76,10,2,0,5,192,0,192,3,192, 646 | 20,115,101,116,82,101,116,117,114,110,86,97,108,117,101,95,6,118,11,117,110, 647 | 112,97,99,107,19,114,101,103,105,115,116,101,114,76,97,109,98,100,97,22,115, 648 | 101,116,76,97,109,98,100,97,85,112,118,97,108,117,101,115,15,108,111,97,100, 649 | 115,116,114,105,110,103,21,107,73,110,118,97,108,105,100,77,101,116,104,111, 650 | 100,73,68,21,109,101,116,104,111,100,82,101,116,117,114,110,84,121,112,101,11, 651 | 105,110,115,101,114,116,10,116,97,98,108,101,25,103,101,116,65,114,103,117, 652 | 109,101,110,116,95,97,116,73,110,100,101,120,95,8,110,101,119,8,91,49,93,16, 653 | 116,121,112,101,84,111,67,84,121,112,101,22,112,97,114,115,101,84,121,112,101, 654 | 69,110,99,111,100,105,110,103,28,103,101,116,65,114,103,117,109,101,110,116, 655 | 84,121,112,101,65,116,73,110,100,101,120,95,11,115,116,114,105,110,103,13,115, 656 | 101,108,101,99,116,111,114,11,116,97,114,103,101,116,22,110,117,109,98,101, 657 | 114,79,102,65,114,103,117,109,101,110,116,115,13,116,111,110,117,109,98,101, 658 | 114,20,109,101,116,104,111,100,83,105,103,110,97,116,117,114,101,19,111,98, 659 | 106,101,99,116,65,116,73,110,100,101,120,95,21,97,114,103,117,109,101,110,116, 660 | 82,101,103,105,115,116,101,114,27,103,101,116,95,99,117,114,114,101,110,116, 661 | 95,108,117,97,99,111,110,116,101,120,116,5,128,128,192,153,4,2,219,5,0,1,18,3, 662 | 21,2,113,45,1,0,0,57,1,0,1,66,1,1,2,18,3,1,0,57,2,1,1,66,2,2,2,18,3,2,0,57,2, 663 | 2,2,41,4,0,0,66,2,3,2,18,4,2,0,57,3,3,2,66,3,2,2,54,4,4,0,18,6,3,0,57,5,5,3, 664 | 66,5,2,0,65,4,0,2,52,5,3,0,18,7,2,0,57,6,6,2,66,6,2,2,62,6,1,5,18,7,2,0,57,6, 665 | 7,2,66,6,2,0,63,6,0,0,41,6,2,0,23,7,1,4,41,8,1,0,77,6,40,128,45,10,1,0,57,10, 666 | 8,10,18,12,3,0,57,11,9,3,18,13,9,0,66,11,3,0,65,10,0,2,45,11,2,0,57,11,10,11, 667 | 18,12,10,0,66,11,2,2,10,11,0,0,88,12,26,128,21,12,11,0,9,12,1,0,88,12,23,128, 668 | 45,12,2,0,57,12,11,12,58,13,1,11,66,12,2,2,10,12,0,0,88,13,17,128,18,13,12,0, 669 | 39,14,12,0,38,12,14,13,45,13,1,0,57,13,13,13,18,14,12,0,66,13,2,2,18,15,2,0, 670 | 57,14,14,2,18,16,13,0,18,17,9,0,66,14,4,1,54,14,15,0,57,14,16,14,18,15,5,0,58, 671 | 16,0,13,66,14,3,1,79,6,216,127,45,6,1,0,57,6,8,6,18,8,3,0,57,7,17,3,66,7,2,0, 672 | 65,6,0,2,45,7,2,0,57,7,10,7,18,8,6,0,66,7,2,2,10,7,0,0,88,8,29,128,21,8,7,0,9, 673 | 8,1,0,88,8,26,128,45,8,2,0,57,8,11,8,58,9,1,7,66,8,2,2,10,8,0,0,88,9,20,128, 674 | 18,9,0,0,54,10,18,0,18,11,5,0,66,10,2,0,65,9,0,2,6,6,19,0,88,10,13,128,18,10, 675 | 8,0,39,11,12,0,38,8,11,10,45,10,1,0,57,10,13,10,18,11,8,0,52,12,3,0,62,9,1,12, 676 | 66,10,3,2,18,12,2,0,57,11,20,2,18,13,10,0,66,11,3,1,75,0,1,0,5,192,0,192,3, 677 | 192,20,115,101,116,82,101,116,117,114,110,86,97,108,117,101,95,6,118,11,117, 678 | 110,112,97,99,107,21,109,101,116,104,111,100,82,101,116,117,114,110,84,121, 679 | 112,101,11,105,110,115,101,114,116,10,116,97,98,108,101,25,103,101,116,65,114, 680 | 103,117,109,101,110,116,95,97,116,73,110,100,101,120,95,8,110,101,119,8,91,49, 681 | 93,16,116,121,112,101,84,111,67,84,121,112,101,22,112,97,114,115,101,84,121, 682 | 112,101,69,110,99,111,100,105,110,103,28,103,101,116,65,114,103,117,109,101, 683 | 110,116,84,121,112,101,65,116,73,110,100,101,120,95,11,115,116,114,105,110, 684 | 103,13,115,101,108,101,99,116,111,114,11,116,97,114,103,101,116,22,110,117, 685 | 109,98,101,114,79,102,65,114,103,117,109,101,110,116,115,13,116,111,110,117, 686 | 109,98,101,114,20,109,101,116,104,111,100,83,105,103,110,97,116,117,114,101, 687 | 19,111,98,106,101,99,116,65,116,73,110,100,101,120,95,21,97,114,103,117,109, 688 | 101,110,116,82,101,103,105,115,116,101,114,27,103,101,116,95,99,117,114,114, 689 | 101,110,116,95,108,117,97,99,111,110,116,101,120,116,5,128,128,192,153,4,2, 690 | 204,48,7,0,44,0,149,1,2,135,2,54,0,0,0,39,1,1,0,66,0,2,2,54,1,0,0,39,2,2,0,66, 691 | 1,2,2,54,2,0,0,39,3,3,0,66,2,2,2,53,3,4,0,53,4,5,0,61,4,6,3,61,0,1,3,51,4,7,0, 692 | 57,5,8,0,39,6,9,0,66,5,2,2,15,0,5,0,88,6,4,128,57,5,10,0,39,6,11,0,66,5,2,1, 693 | 88,5,3,128,57,5,10,0,39,6,12,0,66,5,2,1,57,5,10,0,39,6,13,0,66,5,2,1,57,5,14, 694 | 0,61,5,14,3,51,6,16,0,61,6,15,3,51,6,17,0,54,7,18,0,18,8,3,0,53,9,20,0,51,10, 695 | 19,0,61,10,21,9,66,7,3,1,51,7,23,0,61,7,22,3,57,7,24,0,39,8,25,0,53,9,26,0,57, 696 | 10,22,3,61,10,27,9,66,7,3,1,51,7,28,0,61,7,29,3,52,8,0,0,61,8,30,3,52,9,0,0, 697 | 61,9,31,3,54,10,18,0,52,11,0,0,53,12,32,0,66,10,3,2,54,11,18,0,52,12,0,0,53, 698 | 13,34,0,51,14,33,0,61,14,21,13,66,11,3,2,57,12,35,0,39,13,36,0,66,12,2,2,61, 699 | 12,37,3,44,13,14,0,57,15,8,0,39,16,9,0,66,15,2,2,15,0,15,0,88,16,3,128,40,13, 700 | 38,0,40,14,39,0,88,15,2,128,42,13,0,0,42,14,1,0,51,15,41,0,61,15,40,3,51,15, 701 | 42,0,54,16,18,0,52,17,0,0,53,18,43,0,66,16,3,2,51,17,44,0,44,18,20,0,57,21,8, 702 | 0,39,22,9,0,66,21,2,2,15,0,21,0,88,22,4,128,39,18,45,0,39,19,46,0,39,20,47,0, 703 | 88,21,3,128,39,18,48,0,39,19,49,0,39,20,50,0,39,21,51,0,18,22,18,0,18,23,18,0, 704 | 39,24,52,0,38,21,24,21,39,22,53,0,18,23,18,0,18,24,18,0,39,25,52,0,38,22,25, 705 | 22,39,23,54,0,18,24,21,0,18,25,22,0,39,26,52,0,38,23,26,23,39,24,55,0,18,25, 706 | 18,0,18,26,18,0,18,27,18,0,18,28,18,0,39,29,52,0,38,24,29,24,53,25,57,0,61,18, 707 | 58,25,61,19,59,25,61,20,60,25,61,21,61,25,61,22,62,25,61,24,63,25,61,25,56,3, 708 | 53,25,64,0,51,26,66,0,61,26,65,3,51,26,68,0,61,26,67,3,52,26,0,0,51,27,70,0, 709 | 61,27,69,3,51,27,72,0,61,27,71,3,51,27,74,0,61,27,73,3,51,27,76,0,61,27,75,3, 710 | 51,27,78,0,61,27,77,3,51,27,80,0,61,27,79,3,51,27,82,0,61,27,81,3,54,27,83,0, 711 | 18,28,7,0,39,29,84,0,66,28,2,2,51,29,85,0,55,29,83,0,51,29,86,0,55,29,87,0,51, 712 | 29,88,0,55,29,89,0,51,29,90,0,51,30,91,0,52,31,0,0,57,32,24,0,39,33,92,0,53, 713 | 34,94,0,51,35,93,0,61,35,95,34,57,35,71,3,61,35,27,34,51,35,96,0,61,35,21,34, 714 | 61,29,97,34,66,32,3,1,51,32,99,0,61,32,98,3,57,32,24,0,39,33,100,0,53,34,101, 715 | 0,61,30,95,34,57,35,71,3,61,35,27,34,57,35,98,3,61,35,21,34,61,29,97,34,66,32, 716 | 3,1,51,32,102,0,61,32,103,3,51,33,104,0,55,33,105,0,51,33,107,0,61,33,106,3, 717 | 51,33,109,0,61,33,108,3,51,33,111,0,61,33,110,3,57,33,35,0,39,34,112,0,66,33, 718 | 2,2,57,34,113,0,18,35,33,0,39,36,114,0,66,34,3,2,57,35,113,0,18,36,33,0,39,37, 719 | 115,0,66,35,3,2,57,36,113,0,18,37,33,0,39,38,116,0,66,36,3,2,57,37,113,0,18, 720 | 38,33,0,39,39,117,0,66,37,3,2,57,38,113,0,18,39,33,0,39,40,118,0,66,38,3,2,57, 721 | 39,113,0,18,40,33,0,39,41,119,0,66,39,3,2,57,40,113,0,18,41,33,0,39,42,120,0, 722 | 66,40,3,2,57,41,35,0,39,42,59,0,66,41,2,2,57,42,35,0,39,43,60,0,66,42,2,2,51, 723 | 43,121,0,55,43,122,0,51,43,123,0,55,43,124,0,51,43,126,0,61,43,125,3,51,43, 724 | 128,0,61,43,127,3,51,43,130,0,61,43,129,3,51,43,132,0,61,43,131,3,51,43,134,0, 725 | 61,43,133,3,51,43,136,0,61,43,135,3,51,43,138,0,61,43,137,3,51,43,139,0,55,43, 726 | 140,0,51,43,142,0,61,43,141,3,51,43,144,0,61,43,143,3,51,43,146,0,61,43,145,3, 727 | 51,43,148,0,61,43,147,3,50,0,0,128,76,3,2,0,0,19,101,118,97,108,117,97,116, 728 | 101,77,101,116,104,111,100,0,23,101,118,97,108,117,97,116,101,77,101,116,104, 729 | 111,100,67,111,100,101,0,22,101,118,97,108,117,97,116,101,66,108,111,99,107, 730 | 67,111,100,101,0,18,101,118,97,108,117,97,116,101,66,108,111,99,107,22,115, 731 | 101,116,76,97,109,98,100,97,85,112,118,97,108,117,101,115,0,0,22,100,117,109, 732 | 112,66,108,111,99,107,85,112,118,97,108,117,101,115,0,16,99,114,101,97,116, 733 | 101,66,108,111,99,107,0,11,115,116,114,111,110,103,0,9,119,101,97,107,0,12, 734 | 115,101,116,73,118,97,114,0,12,103,101,116,73,118,97,114,0,14,97,100,100,77, 735 | 101,116,104,111,100,23,100,117,109,112,76,97,109,98,100,97,85,112,118,97,108, 736 | 117,101,115,0,10,99,116,121,112,101,0,28,107,68,121,110,97,109,85,112,118,97, 737 | 108,117,101,84,121,112,101,79,98,106,101,99,116,27,107,68,121,110,97,109,85, 738 | 112,118,97,108,117,101,84,121,112,101,66,121,116,101,115,28,107,68,121,110,97, 739 | 109,85,112,118,97,108,117,101,84,121,112,101,83,116,114,105,110,103,29,107,68, 740 | 121,110,97,109,85,112,118,97,108,117,101,84,121,112,101,66,111,111,108,101,97, 741 | 110,30,107,68,121,110,97,109,85,112,118,97,108,117,101,84,121,112,101,85,73, 742 | 110,116,101,103,101,114,29,107,68,121,110,97,109,85,112,118,97,108,117,101,84, 743 | 121,112,101,73,110,116,101,103,101,114,28,107,68,121,110,97,109,85,112,118,97, 744 | 108,117,101,84,121,112,101,68,111,117,98,108,101,9,99,97,115,116,26,101,110, 745 | 117,109,32,68,121,110,97,109,85,112,118,97,108,117,101,84,121,112,101,0,12, 746 | 115,119,105,122,122,108,101,0,14,99,97,108,108,83,117,112,101,114,0,16,99,114, 747 | 101,97,116,101,67,108,97,115,115,16,97,100,100,80,114,111,112,101,114,116,121, 748 | 0,16,103,101,116,73,118,97,114,73,110,102,111,0,1,0,0,23,115,116,114,117,99, 749 | 116,32,111,98,106,99,95,111,98,106,101,99,116,0,28,103,101,116,73,110,115,116, 750 | 97,110,99,101,77,101,116,104,111,100,67,97,108,108,101,114,15,95,95,110,101, 751 | 119,105,110,100,101,120,0,11,95,95,99,97,108,108,1,0,0,0,22,115,116,114,117, 752 | 99,116,32,111,98,106,99,95,99,108,97,115,115,0,0,24,95,115,101,108,101,99,116, 753 | 111,114,70,114,111,109,83,101,108,65,114,103,0,23,95,97,114,103,67,111,117, 754 | 110,116,70,111,114,83,101,108,65,114,103,0,0,16,100,111,117,98,108,101,86,97, 755 | 108,117,101,13,116,111,110,117,109,98,101,114,0,10,78,83,68,105,99,0,10,78,83, 756 | 65,114,114,0,10,78,83,78,117,109,0,10,78,83,83,116,114,0,8,79,98,106,0,13,111, 757 | 98,106,84,111,83,116,114,0,34,105,109,112,84,121,112,101,70,111,114,77,101, 758 | 116,104,111,100,84,121,112,101,69,110,99,111,100,101,105,110,103,0,32,105,109, 759 | 112,83,105,103,110,97,116,117,114,101,70,111,114,84,121,112,101,69,110,99,111, 760 | 100,105,110,103,0,16,116,121,112,101,84,111,67,84,121,112,101,1,0,23,6,66,9, 761 | 66,79,79,76,6,67,18,117,110,115,105,103,110,101,100,32,99,104,97,114,6,113,14, 762 | 108,111,110,103,32,108,111,110,103,6,99,9,99,104,97,114,6,42,11,99,104,97,114, 763 | 32,42,6,81,23,117,110,115,105,103,110,101,100,32,108,111,110,103,32,108,111, 764 | 110,103,6,58,8,83,69,76,6,73,17,117,110,115,105,103,110,101,100,32,105,110, 765 | 116,6,123,11,115,116,114,117,99,116,6,35,10,67,108,97,115,115,6,40,10,117,110, 766 | 105,111,110,6,64,7,105,100,6,94,11,118,111,105,100,32,42,6,108,9,108,111,110, 767 | 103,6,63,9,118,111,105,100,6,100,11,100,111,117,98,108,101,6,115,10,115,104, 768 | 111,114,116,6,76,18,117,110,115,105,103,110,101,100,32,108,111,110,103,6,118, 769 | 9,118,111,105,100,6,91,10,97,114,114,97,121,6,83,19,117,110,115,105,103,110, 770 | 101,100,32,115,104,111,114,116,6,102,10,102,108,111,97,116,6,105,8,105,110, 771 | 116,17,85,73,69,100,103,101,73,110,115,101,116,115,11,67,71,83,105,122,101,12, 772 | 67,71,80,111,105,110,116,15,78,83,85,73,110,116,101,103,101,114,14,78,83,73, 773 | 110,116,101,103,101,114,12,67,71,70,108,111,97,116,1,0,6,9,118,111,105,100,6, 774 | 118,10,98,108,111,99,107,6,64,8,83,69,76,6,58,10,67,108,97,115,115,6,35,8,112, 775 | 116,114,6,94,7,105,100,6,64,11,101,110,99,111,100,101,19,123,85,73,69,100,103, 776 | 101,73,110,115,101,116,115,61,13,123,67,71,82,101,99,116,61,13,123,67,71,83, 777 | 105,122,101,61,6,125,14,123,67,71,80,111,105,110,116,61,6,76,6,108,6,102,6,81, 778 | 6,113,6,100,0,1,0,1,11,95,95,109,111,100,101,7,107,118,0,0,22,112,97,114,115, 779 | 101,84,121,112,101,69,110,99,111,100,105,110,103,2,255,255,255,255,15,255,255, 780 | 255,255,7,3,255,255,255,255,15,255,255,255,255,15,11,105,100,84,121,112,101, 781 | 24,115,116,114,117,99,116,32,111,98,106,99,95,111,98,106,101,99,116,42,11,116, 782 | 121,112,101,111,102,1,0,0,0,1,0,1,11,95,95,109,111,100,101,6,107,24,105,110, 783 | 115,116,97,110,99,101,77,101,116,104,111,100,67,97,99,104,101,21,99,108,97, 784 | 115,115,77,101,116,104,111,100,67,97,99,104,101,8,83,69,76,0,15,95,95,116,111, 785 | 115,116,114,105,110,103,1,0,0,25,115,116,114,117,99,116,32,111,98,106,99,95, 786 | 115,101,108,101,99,116,111,114,13,109,101,116,97,116,121,112,101,0,13,115,101, 787 | 108,84,111,83,116,114,12,95,95,105,110,100,101,120,1,0,0,0,17,115,101,116,109, 788 | 101,116,97,116,97,98,108,101,0,0,18,108,111,97,100,70,114,97,109,101,119,111, 789 | 114,107,6,67,177,26,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32, 790 | 95,78,83,82,97,110,103,101,32,123,10,32,32,32,32,78,83,85,73,110,116,101,103, 791 | 101,114,32,108,111,99,97,116,105,111,110,59,10,32,32,32,32,78,83,85,73,110, 792 | 116,101,103,101,114,32,108,101,110,103,116,104,59,10,125,32,78,83,82,97,110, 793 | 103,101,59,10,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32,111,98, 794 | 106,99,95,99,108,97,115,115,32,42,67,108,97,115,115,59,10,115,116,114,117,99, 795 | 116,32,111,98,106,99,95,99,108,97,115,115,32,123,32,67,108,97,115,115,32,105, 796 | 115,97,59,32,125,59,10,115,116,114,117,99,116,32,111,98,106,99,95,111,98,106, 797 | 101,99,116,32,123,32,67,108,97,115,115,32,105,115,97,59,32,125,59,10,116,121, 798 | 112,101,100,101,102,32,115,116,114,117,99,116,32,111,98,106,99,95,111,98,106, 799 | 101,99,116,32,42,105,100,59,10,10,116,121,112,101,100,101,102,32,115,116,114, 800 | 117,99,116,32,111,98,106,99,95,115,101,108,101,99,116,111,114,32,42,83,69,76, 801 | 59,10,116,121,112,101,100,101,102,32,105,100,32,40,42,73,77,80,41,40,105,100, 802 | 44,32,83,69,76,44,32,46,46,46,41,59,10,116,121,112,101,100,101,102,32,115,105, 803 | 103,110,101,100,32,99,104,97,114,32,66,79,79,76,59,10,116,121,112,101,100,101, 804 | 102,32,115,116,114,117,99,116,32,111,98,106,99,95,109,101,116,104,111,100,32, 805 | 42,77,101,116,104,111,100,59,10,115,116,114,117,99,116,32,111,98,106,99,95, 806 | 109,101,116,104,111,100,95,100,101,115,99,114,105,112,116,105,111,110,32,123, 807 | 32,83,69,76,32,110,97,109,101,59,32,99,104,97,114,32,42,116,121,112,101,115, 808 | 59,32,125,59,10,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32,111, 809 | 98,106,99,95,105,118,97,114,32,42,73,118,97,114,59,10,10,116,121,112,101,100, 810 | 101,102,32,115,116,114,117,99,116,32,123,10,32,32,32,32,99,111,110,115,116,32, 811 | 99,104,97,114,32,42,110,97,109,101,59,32,10,32,32,32,32,99,111,110,115,116,32, 812 | 99,104,97,114,32,42,118,97,108,117,101,59,10,125,32,111,98,106,99,95,112,114, 813 | 111,112,101,114,116,121,95,97,116,116,114,105,98,117,116,101,95,116,59,10,10, 814 | 105,100,32,111,98,106,99,95,109,115,103,83,101,110,100,40,105,100,32,116,104, 815 | 101,82,101,99,101,105,118,101,114,44,32,83,69,76,32,116,104,101,83,101,108, 816 | 101,99,116,111,114,44,32,46,46,46,41,59,10,118,111,105,100,32,111,98,106,99, 817 | 95,109,115,103,83,101,110,100,95,115,116,114,101,116,40,105,100,32,115,101, 818 | 108,102,44,32,83,69,76,32,111,112,44,32,46,46,46,41,59,10,67,108,97,115,115, 819 | 32,111,98,106,99,95,97,108,108,111,99,97,116,101,67,108,97,115,115,80,97,105, 820 | 114,40,67,108,97,115,115,32,115,117,112,101,114,99,108,97,115,115,44,32,99, 821 | 111,110,115,116,32,99,104,97,114,32,42,110,97,109,101,44,32,115,105,122,101, 822 | 95,116,32,101,120,116,114,97,66,121,116,101,115,41,59,10,118,111,105,100,32, 823 | 111,98,106,99,95,114,101,103,105,115,116,101,114,67,108,97,115,115,80,97,105, 824 | 114,40,67,108,97,115,115,32,99,108,115,41,59,10,105,100,32,95,111,98,106,99, 825 | 95,109,115,103,70,111,114,119,97,114,100,40,105,100,32,114,101,99,101,105,118, 826 | 101,114,44,32,83,69,76,32,115,101,108,44,32,46,46,46,41,59,10,118,111,105,100, 827 | 32,95,111,98,106,99,95,109,115,103,70,111,114,119,97,114,100,95,115,116,114, 828 | 101,116,40,105,100,32,114,101,99,101,105,118,101,114,44,32,83,69,76,32,115, 829 | 101,108,44,32,46,46,46,41,59,10,10,67,108,97,115,115,32,111,98,106,99,95,103, 830 | 101,116,67,108,97,115,115,40,99,111,110,115,116,32,99,104,97,114,32,42,110,97, 831 | 109,101,41,59,10,99,111,110,115,116,32,99,104,97,114,32,42,99,108,97,115,115, 832 | 95,103,101,116,78,97,109,101,40,67,108,97,115,115,32,99,108,115,41,59,10,77, 833 | 101,116,104,111,100,32,99,108,97,115,115,95,103,101,116,67,108,97,115,115,77, 834 | 101,116,104,111,100,40,67,108,97,115,115,32,97,67,108,97,115,115,44,32,83,69, 835 | 76,32,97,83,101,108,101,99,116,111,114,41,59,10,73,77,80,32,99,108,97,115,115, 836 | 95,103,101,116,77,101,116,104,111,100,73,109,112,108,101,109,101,110,116,97, 837 | 116,105,111,110,40,67,108,97,115,115,32,99,108,115,44,32,83,69,76,32,110,97, 838 | 109,101,41,59,10,77,101,116,104,111,100,32,99,108,97,115,115,95,103,101,116, 839 | 73,110,115,116,97,110,99,101,77,101,116,104,111,100,40,67,108,97,115,115,32, 840 | 97,67,108,97,115,115,44,32,83,69,76,32,97,83,101,108,101,99,116,111,114,41,59, 841 | 10,77,101,116,104,111,100,32,99,108,97,115,115,95,103,101,116,67,108,97,115, 842 | 115,77,101,116,104,111,100,40,67,108,97,115,115,32,97,67,108,97,115,115,44,32, 843 | 83,69,76,32,97,83,101,108,101,99,116,111,114,41,59,10,66,79,79,76,32,99,108, 844 | 97,115,115,95,114,101,115,112,111,110,100,115,84,111,83,101,108,101,99,116, 845 | 111,114,40,67,108,97,115,115,32,99,108,115,44,32,83,69,76,32,115,101,108,41, 846 | 59,10,67,108,97,115,115,32,99,108,97,115,115,95,103,101,116,83,117,112,101, 847 | 114,99,108,97,115,115,40,67,108,97,115,115,32,99,108,115,41,59,10,73,77,80,32, 848 | 99,108,97,115,115,95,114,101,112,108,97,99,101,77,101,116,104,111,100,40,67, 849 | 108,97,115,115,32,99,108,115,44,32,83,69,76,32,110,97,109,101,44,32,73,77,80, 850 | 32,105,109,112,44,32,99,111,110,115,116,32,99,104,97,114,32,42,116,121,112, 851 | 101,115,41,59,10,66,79,79,76,32,99,108,97,115,115,95,97,100,100,77,101,116, 852 | 104,111,100,40,67,108,97,115,115,32,99,108,115,44,32,83,69,76,32,110,97,109, 853 | 101,44,32,73,77,80,32,105,109,112,44,32,99,111,110,115,116,32,99,104,97,114, 854 | 32,42,116,121,112,101,115,41,59,10,66,79,79,76,32,99,108,97,115,115,95,97,100, 855 | 100,73,118,97,114,40,67,108,97,115,115,32,99,108,115,44,32,99,111,110,115,116, 856 | 32,99,104,97,114,32,42,110,97,109,101,44,32,115,105,122,101,95,116,32,115,105, 857 | 122,101,44,32,117,105,110,116,56,95,116,32,97,108,105,103,110,109,101,110,116, 858 | 44,32,99,111,110,115,116,32,99,104,97,114,32,42,116,121,112,101,115,41,59,10, 859 | 66,79,79,76,32,99,108,97,115,115,95,97,100,100,80,114,111,112,101,114,116,121, 860 | 40,67,108,97,115,115,32,99,108,115,44,32,99,111,110,115,116,32,99,104,97,114, 861 | 32,42,110,97,109,101,44,32,99,111,110,115,116,32,111,98,106,99,95,112,114,111, 862 | 112,101,114,116,121,95,97,116,116,114,105,98,117,116,101,95,116,32,42,97,116, 863 | 116,114,105,98,117,116,101,115,44,32,117,110,115,105,103,110,101,100,32,105, 864 | 110,116,32,97,116,116,114,105,98,117,116,101,67,111,117,110,116,41,59,10,105, 865 | 100,32,111,98,106,99,95,103,101,116,80,114,111,112,101,114,116,121,40,105,100, 866 | 32,115,101,108,102,44,32,83,69,76,32,95,99,109,100,44,32,112,116,114,100,105, 867 | 102,102,95,116,32,111,102,102,115,101,116,44,32,66,79,79,76,32,97,116,111,109, 868 | 105,99,41,59,10,118,111,105,100,32,111,98,106,99,95,115,101,116,80,114,111, 869 | 112,101,114,116,121,40,105,100,32,115,101,108,102,44,32,83,69,76,32,95,99,109, 870 | 100,44,32,112,116,114,100,105,102,102,95,116,32,111,102,102,115,101,116,44,32, 871 | 105,100,32,110,101,119,86,97,108,117,101,44,32,66,79,79,76,32,97,116,111,109, 872 | 105,99,44,32,115,105,103,110,101,100,32,99,104,97,114,32,115,104,111,117,108, 873 | 100,67,111,112,121,41,59,10,118,111,105,100,32,111,98,106,99,95,99,111,112, 874 | 121,83,116,114,117,99,116,40,118,111,105,100,32,42,100,101,115,116,44,32,99, 875 | 111,110,115,116,32,118,111,105,100,32,42,115,114,99,44,32,112,116,114,100,105, 876 | 102,102,95,116,32,115,105,122,101,44,32,66,79,79,76,32,97,116,111,109,105,99, 877 | 44,32,66,79,79,76,32,104,97,115,83,116,114,111,110,103,41,59,10,10,67,108,97, 878 | 115,115,32,111,98,106,101,99,116,95,103,101,116,67,108,97,115,115,40,105,100, 879 | 32,111,98,106,101,99,116,41,59,10,99,111,110,115,116,32,99,104,97,114,32,42, 880 | 111,98,106,101,99,116,95,103,101,116,67,108,97,115,115,78,97,109,101,40,105, 881 | 100,32,111,98,106,41,59,10,73,118,97,114,32,111,98,106,101,99,116,95,103,101, 882 | 116,73,110,115,116,97,110,99,101,86,97,114,105,97,98,108,101,40,105,100,32, 883 | 111,98,106,44,32,99,111,110,115,116,32,99,104,97,114,32,42,110,97,109,101,44, 884 | 32,118,111,105,100,32,42,42,111,117,116,86,97,108,117,101,41,59,10,10,83,69, 885 | 76,32,109,101,116,104,111,100,95,103,101,116,78,97,109,101,40,77,101,116,104, 886 | 111,100,32,109,101,116,104,111,100,41,59,10,117,110,115,105,103,110,101,100, 887 | 32,109,101,116,104,111,100,95,103,101,116,78,117,109,98,101,114,79,102,65,114, 888 | 103,117,109,101,110,116,115,40,77,101,116,104,111,100,32,109,101,116,104,111, 889 | 100,41,59,10,118,111,105,100,32,109,101,116,104,111,100,95,103,101,116,82,101, 890 | 116,117,114,110,84,121,112,101,40,77,101,116,104,111,100,32,109,101,116,104, 891 | 111,100,44,32,99,104,97,114,32,42,100,115,116,44,32,115,105,122,101,95,116,32, 892 | 100,115,116,95,108,101,110,41,59,10,118,111,105,100,32,109,101,116,104,111, 893 | 100,95,103,101,116,65,114,103,117,109,101,110,116,84,121,112,101,40,77,101, 894 | 116,104,111,100,32,109,101,116,104,111,100,44,32,117,110,115,105,103,110,101, 895 | 100,32,105,110,116,32,105,110,100,101,120,44,32,99,104,97,114,32,42,100,115, 896 | 116,44,32,115,105,122,101,95,116,32,100,115,116,95,108,101,110,41,59,10,73,77, 897 | 80,32,109,101,116,104,111,100,95,103,101,116,73,109,112,108,101,109,101,110, 898 | 116,97,116,105,111,110,40,77,101,116,104,111,100,32,109,101,116,104,111,100, 899 | 41,59,10,99,111,110,115,116,32,99,104,97,114,32,42,109,101,116,104,111,100,95, 900 | 103,101,116,84,121,112,101,69,110,99,111,100,105,110,103,40,77,101,116,104, 901 | 111,100,32,109,101,116,104,111,100,41,59,10,118,111,105,100,32,109,101,116, 902 | 104,111,100,95,101,120,99,104,97,110,103,101,73,109,112,108,101,109,101,110, 903 | 116,97,116,105,111,110,115,40,77,101,116,104,111,100,32,109,49,44,32,77,101, 904 | 116,104,111,100,32,109,50,41,59,10,10,99,111,110,115,116,32,99,104,97,114,32, 905 | 42,32,105,118,97,114,95,103,101,116,84,121,112,101,69,110,99,111,100,105,110, 906 | 103,40,73,118,97,114,32,105,118,97,114,41,59,10,112,116,114,100,105,102,102, 907 | 95,116,32,105,118,97,114,95,103,101,116,79,102,102,115,101,116,40,73,118,97, 908 | 114,32,105,118,97,114,41,59,10,10,83,69,76,32,115,101,108,95,114,101,103,105, 909 | 115,116,101,114,78,97,109,101,40,99,111,110,115,116,32,99,104,97,114,32,42, 910 | 115,116,114,41,59,10,99,111,110,115,116,32,99,104,97,114,42,32,115,101,108,95, 911 | 103,101,116,78,97,109,101,40,83,69,76,32,97,83,101,108,101,99,116,111,114,41, 912 | 59,10,10,105,100,32,67,70,82,101,116,97,105,110,40,105,100,32,99,102,41,59,10, 913 | 118,111,105,100,32,67,70,82,101,108,101,97,115,101,40,105,100,32,99,102,41,59, 914 | 10,10,118,111,105,100,32,102,114,101,101,40,118,111,105,100,32,42,112,116,114, 915 | 41,59,10,10,47,47,32,85,115,101,100,32,116,111,32,99,104,101,99,107,32,105, 916 | 102,32,97,32,102,105,108,101,32,101,120,105,115,116,115,10,105,110,116,32,97, 917 | 99,99,101,115,115,40,99,111,110,115,116,32,99,104,97,114,32,42,112,97,116,104, 918 | 44,32,105,110,116,32,97,109,111,100,101,41,59,10,10,118,111,105,100,32,102, 919 | 111,114,119,97,114,100,95,105,110,118,111,99,97,116,105,111,110,40,105,100,32, 920 | 116,97,114,103,101,116,44,32,83,69,76,32,115,101,108,101,99,116,111,114,44,32, 921 | 105,100,32,105,110,118,111,99,97,116,105,111,110,41,59,10,105,100,32,103,101, 922 | 116,95,99,117,114,114,101,110,116,95,108,117,97,99,111,110,116,101,120,116,40, 923 | 41,59,10,105,100,32,100,121,110,97,109,77,101,116,104,111,100,68,101,115,99, 924 | 70,114,111,109,77,101,116,104,111,100,78,97,109,101,87,105,116,104,85,110,100, 925 | 101,114,115,99,111,114,101,115,40,105,100,32,111,98,106,101,99,116,44,32,99, 926 | 111,110,115,116,32,99,104,97,114,32,42,110,97,109,101,44,32,66,79,79,76,32, 927 | 105,115,67,108,97,115,115,41,59,10,99,111,110,115,116,32,99,104,97,114,42,32, 928 | 109,101,116,104,111,100,84,121,112,101,70,114,111,109,68,121,110,97,109,77, 929 | 101,116,104,111,100,68,101,115,99,40,105,100,32,100,101,115,99,41,59,10,66,79, 930 | 79,76,32,105,115,83,112,101,99,105,97,108,83,116,114,117,99,116,82,101,116, 931 | 117,114,110,70,114,111,109,68,121,110,97,109,77,101,116,104,111,100,68,101, 932 | 115,99,40,105,100,32,100,101,115,99,41,59,10,83,69,76,32,115,101,108,70,114, 933 | 111,109,68,121,110,97,109,77,101,116,104,111,100,68,101,115,99,40,105,100,32, 934 | 100,101,115,99,41,59,10,101,110,117,109,32,68,121,110,97,109,85,112,118,97, 935 | 108,117,101,84,121,112,101,32,123,10,32,32,32,32,107,68,121,110,97,109,85,112, 936 | 118,97,108,117,101,84,121,112,101,68,111,117,98,108,101,44,10,32,32,32,32,107, 937 | 68,121,110,97,109,85,112,118,97,108,117,101,84,121,112,101,73,110,116,101,103, 938 | 101,114,44,10,32,32,32,32,107,68,121,110,97,109,85,112,118,97,108,117,101,84, 939 | 121,112,101,85,73,110,116,101,103,101,114,44,10,32,32,32,32,107,68,121,110,97, 940 | 109,85,112,118,97,108,117,101,84,121,112,101,66,111,111,108,101,97,110,44,10, 941 | 32,32,32,32,107,68,121,110,97,109,85,112,118,97,108,117,101,84,121,112,101,83, 942 | 116,114,105,110,103,44,10,32,32,32,32,107,68,121,110,97,109,85,112,118,97,108, 943 | 117,101,84,121,112,101,66,121,116,101,115,44,10,32,32,32,32,107,68,121,110,97, 944 | 109,85,112,118,97,108,117,101,84,121,112,101,79,98,106,101,99,116,10,125,59, 945 | 10,10,78,83,73,110,116,101,103,101,114,32,107,73,110,118,97,108,105,100,77, 946 | 101,116,104,111,100,73,68,59,10,100,32,32,32,32,116,121,112,101,100,101,102, 947 | 32,102,108,111,97,116,32,67,71,70,108,111,97,116,59,10,32,32,32,32,116,121, 948 | 112,101,100,101,102,32,105,110,116,32,78,83,73,110,116,101,103,101,114,59,10, 949 | 32,32,32,32,116,121,112,101,100,101,102,32,117,110,115,105,103,110,101,100,32, 950 | 105,110,116,32,78,83,85,73,110,116,101,103,101,114,59,10,32,32,32,32,103,32, 951 | 32,32,32,116,121,112,101,100,101,102,32,100,111,117,98,108,101,32,67,71,70, 952 | 108,111,97,116,59,10,32,32,32,32,116,121,112,101,100,101,102,32,108,111,110, 953 | 103,32,78,83,73,110,116,101,103,101,114,59,10,32,32,32,32,116,121,112,101,100, 954 | 101,102,32,117,110,115,105,103,110,101,100,32,108,111,110,103,32,78,83,85,73, 955 | 110,116,101,103,101,114,59,10,32,32,32,32,9,99,100,101,102,10,54,52,98,105, 956 | 116,8,97,98,105,0,25,102,114,97,109,101,119,111,114,107,83,101,97,114,99,104, 957 | 80,97,116,104,115,1,4,0,0,47,47,83,121,115,116,101,109,47,76,105,98,114,97, 958 | 114,121,47,70,114,97,109,101,119,111,114,107,115,47,37,115,46,102,114,97,109, 959 | 101,119,111,114,107,47,37,115,40,47,76,105,98,114,97,114,121,47,70,114,97,109, 960 | 101,119,111,114,107,115,47,37,115,46,102,114,97,109,101,119,111,114,107,47,37, 961 | 115,41,126,47,76,105,98,114,97,114,121,47,70,114,97,109,101,119,111,114,107, 962 | 115,47,37,115,46,102,114,97,109,101,119,111,114,107,47,37,115,1,0,3,22,102,97, 963 | 108,108,98,97,99,107,79,110,77,115,103,83,101,110,100,2,18,114,101,108,97,120, 964 | 101,100,83,121,110,116,97,120,2,10,100,101,98,117,103,1,8,106,105,116,8,98, 965 | 105,116,8,102,102,105,12,114,101,113,117,105,114,101,129,128,128,254,31,255, 966 | 255,191,143,4,254,255,255,255,15,0 967 | }; 968 | --------------------------------------------------------------------------------