[ffigen] Fix handling of void methods (#308)

* Add an integration test for objective C

* Switch CI to use test/setup.dart

* Trying to fix CI

* Fix handling of void functions and property setters and getters
diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart
index 3425a07..2fdd283 100644
--- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart
+++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart
@@ -12,20 +12,22 @@
 // by default.
 const _excludedNSObjectClassMethods = {
   'allocWithZone:',
-  'copyWithZone:',
-  'mutableCopyWithZone:',
-  'instancesRespondToSelector:',
+  'class',
   'conformsToProtocol:',
+  'copyWithZone:',
+  'debugDescription',
+  'description',
+  'hash',
+  'initialize',
   'instanceMethodForSelector:',
   'instanceMethodSignatureForSelector:',
+  'instancesRespondToSelector:',
   'isSubclassOfClass:',
+  'load',
+  'mutableCopyWithZone:',
   'resolveClassMethod:',
   'resolveInstanceMethod:',
-  'hash',
   'superclass',
-  'class',
-  'description',
-  'debugDescription',
 };
 
 class _ObjCBuiltInFunctions {
@@ -168,6 +170,7 @@
       final methodName = m._getDartMethodName(uniqueNamer);
       final selName = uniqueNamer.makeUnique('_sel_$methodName');
       final isStatic = m.kind == ObjCMethodKind.classMethod;
+      final returnType = m.returnType!;
 
       // SEL object for the method.
       s.write('  static $selType? $selName;');
@@ -181,7 +184,7 @@
       if (m.kind == ObjCMethodKind.propertySetter) {
         s.write('set ');
       } else {
-        s.write('${_getConvertedType(m.returnType!, w, name)} ');
+        s.write('${_getConvertedType(returnType, w, name)} ');
       }
       if (m.kind == ObjCMethodKind.propertyGetter) s.write('get ');
       s.write(methodName);
@@ -211,7 +214,7 @@
       }
       s.write('    $selName ??= '
           '${_builtInFunctions.registerName}(_lib, "${m.originalName}");\n');
-      final convertReturn = _needsConverting(m.returnType!);
+      final convertReturn = _needsConverting(returnType);
       s.write('    ${convertReturn ? 'final _ret = ' : 'return '}');
       s.write('_lib.${m.msgSend!.name}(');
       s.write(isStatic ? '_class!' : '_id');
@@ -221,7 +224,7 @@
       }
       s.write(');\n');
       if (convertReturn) {
-        final result = _doReturnConversion(m.returnType!, '_ret', name, '_lib');
+        final result = _doReturnConversion(returnType, '_ret', name, '_lib');
         s.write('    return $result;');
       }
 
@@ -239,15 +242,11 @@
     if (dependencies.contains(this)) return;
     dependencies.add(this);
 
+    _filterPropertyMethods();
+
     if (superType != null) {
       superType!.addDependencies(dependencies);
-      // Copy class methods from the super type, because Dart classes don't
-      // inherit static methods.
-      for (final m in superType!.classMethods.values) {
-        if (!_excludedNSObjectClassMethods.contains(m.originalName)) {
-          addMethod(m);
-        }
-      }
+      _copyClassMethodsFromSuperType();
     }
 
     for (final m in methods) {
@@ -257,6 +256,27 @@
     _builtInFunctions.addDependencies(dependencies);
   }
 
+  void _filterPropertyMethods() {
+    // Properties setters and getters are duplicated in the AST. One copy is
+    // marked it with ObjCMethodKind.propertyGetter/Setter. The other copy is
+    // missing important information, and is a plain old instanceMethod. So we
+    // need to discard the second copy.
+    final properties = Set<String>.from(
+        methods.where((m) => m.isProperty).map((m) => m.originalName));
+    methods.removeWhere(
+        (m) => !m.isProperty && properties.contains(m.originalName));
+  }
+
+  void _copyClassMethodsFromSuperType() {
+    // Copy class methods from the super type, because Dart classes don't
+    // inherit static methods.
+    for (final m in superType!.classMethods.values) {
+      if (!_excludedNSObjectClassMethods.contains(m.originalName)) {
+        addMethod(m);
+      }
+    }
+  }
+
   void addMethod(ObjCMethod method) {
     methods.add(method);
     if (method.kind == ObjCMethodKind.classMethod) {
@@ -334,7 +354,12 @@
     required this.kind,
   });
 
+  bool get isProperty =>
+      kind == ObjCMethodKind.propertyGetter ||
+      kind == ObjCMethodKind.propertySetter;
+
   void addDependencies(Set<Binding> dependencies) {
+    returnType ??= NativeType(SupportedNativeType.Void);
     returnType!.addDependencies(dependencies);
     for (final p in params) {
       p.type.addDependencies(dependencies);
diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart
index 41aae40..cdd7914 100644
--- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart
+++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart
@@ -149,7 +149,7 @@
       Pointer.fromFunction(_parseMethodVisitor, exceptional_visitor_return),
       nullptr);
   _methodStack.pop();
-  if (parsed.hasError || method.returnType == null) {
+  if (parsed.hasError) {
     // Discard it.
     return;
   }
diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_objc_interface_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_objc_interface_bindings.dart
index 6342aad..b1c2391 100644
--- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_objc_interface_bindings.dart
+++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_objc_interface_bindings.dart
@@ -50,7 +50,7 @@
   late final __objc_getClass = __objc_getClassPtr.asFunction<
       ffi.Pointer<ObjCObject> Function(ffi.Pointer<pkg_ffi.Char>)>();
 
-  instancetype _objc_msgSend_0(
+  void _objc_msgSend_0(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
   ) {
@@ -62,49 +62,48 @@
 
   late final __objc_msgSend_0Ptr = _lookup<
       ffi.NativeFunction<
-          instancetype Function(
+          ffi.Void Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction<
-      instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
   instancetype _objc_msgSend_1(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<_NSZone> zone,
   ) {
     return __objc_msgSend_1(
       obj,
       sel,
+    );
+  }
+
+  late final __objc_msgSend_1Ptr = _lookup<
+      ffi.NativeFunction<
+          instancetype Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction<
+      instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  instancetype _objc_msgSend_2(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<_NSZone> zone,
+  ) {
+    return __objc_msgSend_2(
+      obj,
+      sel,
       zone,
     );
   }
 
-  late final __objc_msgSend_1Ptr = _lookup<
+  late final __objc_msgSend_2Ptr = _lookup<
       ffi.NativeFunction<
           instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
               ffi.Pointer<_NSZone>)>>('objc_msgSend');
-  late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction<
+  late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction<
       instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
           ffi.Pointer<_NSZone>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_2(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-  ) {
-    return __objc_msgSend_2(
-      obj,
-      sel,
-    );
-  }
-
-  late final __objc_msgSend_2Ptr = _lookup<
-      ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
-
   ffi.Pointer<ObjCObject> _objc_msgSend_3(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
@@ -126,22 +125,20 @@
   ffi.Pointer<ObjCObject> _objc_msgSend_4(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<_NSZone> zone,
   ) {
     return __objc_msgSend_4(
       obj,
       sel,
-      zone,
     );
   }
 
   late final __objc_msgSend_4Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-              ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>>('objc_msgSend');
+          ffi.Pointer<ObjCObject> Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-          ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>();
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
   ffi.Pointer<ObjCObject> _objc_msgSend_5(
     ffi.Pointer<ObjCObject> obj,
@@ -163,65 +160,65 @@
       ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
           ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>();
 
-  int _objc_msgSend_6(
+  ffi.Pointer<ObjCObject> _objc_msgSend_6(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCSel> aSelector,
+    ffi.Pointer<_NSZone> zone,
   ) {
     return __objc_msgSend_6(
       obj,
       sel,
-      aSelector,
+      zone,
     );
   }
 
   late final __objc_msgSend_6Ptr = _lookup<
       ffi.NativeFunction<
-          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+              ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>>('objc_msgSend');
   late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
+      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+          ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>();
 
   int _objc_msgSend_7(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCObject> protocol,
+    ffi.Pointer<ObjCSel> aSelector,
   ) {
     return __objc_msgSend_7(
       obj,
       sel,
-      protocol,
+      aSelector,
     );
   }
 
   late final __objc_msgSend_7Ptr = _lookup<
       ffi.NativeFunction<
           BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCObject>)>>('objc_msgSend');
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCObject>)>();
+          ffi.Pointer<ObjCSel>)>();
 
-  IMP _objc_msgSend_8(
+  int _objc_msgSend_8(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCSel> aSelector,
+    ffi.Pointer<ObjCObject> protocol,
   ) {
     return __objc_msgSend_8(
       obj,
       sel,
-      aSelector,
+      protocol,
     );
   }
 
   late final __objc_msgSend_8Ptr = _lookup<
       ffi.NativeFunction<
-          IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCObject>)>>('objc_msgSend');
   late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction<
-      IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCObject>)>();
 
   IMP _objc_msgSend_9(
     ffi.Pointer<ObjCObject> obj,
@@ -243,7 +240,7 @@
       IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
           ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_10(
+  IMP _objc_msgSend_10(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCSel> aSelector,
@@ -257,13 +254,13 @@
 
   late final __objc_msgSend_10Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+      IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_11(
+  void _objc_msgSend_11(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCSel> aSelector,
@@ -277,11 +274,11 @@
 
   late final __objc_msgSend_11Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          ffi.Void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+      void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
   ffi.Pointer<ObjCObject> _objc_msgSend_12(
     ffi.Pointer<ObjCObject> obj,
@@ -303,137 +300,144 @@
       ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
           ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
 
-  int _objc_msgSend_13(
+  void _objc_msgSend_13(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCObject> anInvocation,
   ) {
     return __objc_msgSend_13(
       obj,
       sel,
+      anInvocation,
     );
   }
 
   late final __objc_msgSend_13Ptr = _lookup<
       ffi.NativeFunction<
+          ffi.Void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCObject>)>>('objc_msgSend');
+  late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction<
+      void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCObject>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_14(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCSel> aSelector,
+  ) {
+    return __objc_msgSend_14(
+      obj,
+      sel,
+      aSelector,
+    );
+  }
+
+  late final __objc_msgSend_14Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_15(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCSel> aSelector,
+  ) {
+    return __objc_msgSend_15(
+      obj,
+      sel,
+      aSelector,
+    );
+  }
+
+  late final __objc_msgSend_15Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+
+  int _objc_msgSend_16(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_16(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_16Ptr = _lookup<
+      ffi.NativeFunction<
           BOOL Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction<
+  late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
-  int _objc_msgSend_14(
+  int _objc_msgSend_17(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCObject> aClass,
   ) {
-    return __objc_msgSend_14(
+    return __objc_msgSend_17(
       obj,
       sel,
       aClass,
     );
   }
 
-  late final __objc_msgSend_14Ptr = _lookup<
+  late final __objc_msgSend_17Ptr = _lookup<
       ffi.NativeFunction<
           BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
               ffi.Pointer<ObjCObject>)>>('objc_msgSend');
-  late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction<
+  late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
           ffi.Pointer<ObjCObject>)>();
 
-  int _objc_msgSend_15(
+  int _objc_msgSend_18(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCSel> sel1,
   ) {
-    return __objc_msgSend_15(
-      obj,
-      sel,
-      sel1,
-    );
-  }
-
-  late final __objc_msgSend_15Ptr = _lookup<
-      ffi.NativeFunction<
-          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
-
-  int _objc_msgSend_16(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCSel> sel1,
-  ) {
-    return __objc_msgSend_16(
-      obj,
-      sel,
-      sel1,
-    );
-  }
-
-  late final __objc_msgSend_16Ptr = _lookup<
-      ffi.NativeFunction<
-          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
-
-  int _objc_msgSend_17(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-  ) {
-    return __objc_msgSend_17(
-      obj,
-      sel,
-    );
-  }
-
-  late final __objc_msgSend_17Ptr = _lookup<
-      ffi.NativeFunction<
-          NSUInteger Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
-
-  ffi.Pointer<ObjCObject> _objc_msgSend_18(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-  ) {
     return __objc_msgSend_18(
       obj,
       sel,
+      sel1,
     );
   }
 
   late final __objc_msgSend_18Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_19(
+  int _objc_msgSend_19(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCSel> sel1,
   ) {
     return __objc_msgSend_19(
       obj,
       sel,
+      sel1,
     );
   }
 
   late final __objc_msgSend_19Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_20(
+  int _objc_msgSend_20(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
   ) {
@@ -445,13 +449,12 @@
 
   late final __objc_msgSend_20Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
+          NSUInteger Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
-  int _objc_msgSend_21(
+  ffi.Pointer<ObjCObject> _objc_msgSend_21(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
   ) {
@@ -463,57 +466,111 @@
 
   late final __objc_msgSend_21Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Int32 Function(
+          ffi.Pointer<ObjCObject> Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_22(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_22(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_22Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_23(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_23(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_23Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  int _objc_msgSend_24(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_24(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_24Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Int32 Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
-  void _objc_msgSend_22(
+  void _objc_msgSend_25(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     int value,
   ) {
-    return __objc_msgSend_22(
+    return __objc_msgSend_25(
       obj,
       sel,
       value,
     );
   }
 
-  late final __objc_msgSend_22Ptr = _lookup<
+  late final __objc_msgSend_25Ptr = _lookup<
       ffi.NativeFunction<
           ffi.Void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
               ffi.Int32)>>('objc_msgSend');
-  late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction<
+  late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction<
       void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>, int)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_23(
+  ffi.Pointer<ObjCObject> _objc_msgSend_26(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     double someArg,
   ) {
-    return __objc_msgSend_23(
+    return __objc_msgSend_26(
       obj,
       sel,
       someArg,
     );
   }
 
-  late final __objc_msgSend_23Ptr = _lookup<
+  late final __objc_msgSend_26Ptr = _lookup<
       ffi.NativeFunction<
           ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
               ffi.Pointer<ObjCSel>, ffi.Double)>>('objc_msgSend');
-  late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction<
+  late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction<
       ffi.Pointer<ObjCObject> Function(
           ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>, double)>();
 
-  int _objc_msgSend_24(
+  int _objc_msgSend_27(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCObject> someArg,
     ffi.Pointer<ObjCObject> otherArg,
   ) {
-    return __objc_msgSend_24(
+    return __objc_msgSend_27(
       obj,
       sel,
       someArg,
@@ -521,14 +578,14 @@
     );
   }
 
-  late final __objc_msgSend_24Ptr = _lookup<
+  late final __objc_msgSend_27Ptr = _lookup<
       ffi.NativeFunction<
           ffi.Int32 Function(
               ffi.Pointer<ObjCObject>,
               ffi.Pointer<ObjCSel>,
               ffi.Pointer<ObjCObject>,
               ffi.Pointer<ObjCObject>)>>('objc_msgSend');
-  late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction<
+  late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
           ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCObject>)>();
 }
@@ -565,20 +622,20 @@
   static ffi.Pointer<ObjCSel>? _sel_someProperty;
   int get someProperty {
     _sel_someProperty ??= _registerName(_lib, "someProperty");
-    return _lib._objc_msgSend_21(_id, _sel_someProperty!);
+    return _lib._objc_msgSend_24(_id, _sel_someProperty!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_someProperty1;
   set someProperty(int value) {
     _sel_someProperty1 ??= _registerName(_lib, "setSomeProperty:");
-    return _lib._objc_msgSend_22(_id, _sel_someProperty1!, value);
+    return _lib._objc_msgSend_25(_id, _sel_someProperty1!, value);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_aClassMethod;
   static Foo aClassMethod(NativeLibrary _lib, double someArg) {
     _class ??= _getClass(_lib, "Foo");
     _sel_aClassMethod ??= _registerName(_lib, "aClassMethod:");
-    final _ret = _lib._objc_msgSend_23(_class!, _sel_aClassMethod!, someArg);
+    final _ret = _lib._objc_msgSend_26(_class!, _sel_aClassMethod!, someArg);
     return Foo._(_ret, _lib);
   }
 
@@ -586,7 +643,7 @@
   int anInstanceMethod(NSObject someArg, NSObject otherArg) {
     _sel_anInstanceMethod ??=
         _registerName(_lib, "anInstanceMethod:withOtherArg:");
-    return _lib._objc_msgSend_24(
+    return _lib._objc_msgSend_27(
         _id, _sel_anInstanceMethod!, someArg._id, otherArg._id);
   }
 
@@ -594,7 +651,7 @@
   static Foo new1(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "Foo");
     _sel_new1 ??= _registerName(_lib, "new");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_new1!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_new1!);
     return Foo._(_ret, _lib);
   }
 
@@ -602,7 +659,7 @@
   static Foo alloc(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "Foo");
     _sel_alloc ??= _registerName(_lib, "alloc");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_alloc!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_alloc!);
     return Foo._(_ret, _lib);
   }
 }
@@ -616,10 +673,24 @@
     return NSObject._(other._id, other._lib);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_load;
+  static void load(NativeLibrary _lib) {
+    _class ??= _getClass(_lib, "NSObject");
+    _sel_load ??= _registerName(_lib, "load");
+    return _lib._objc_msgSend_0(_class!, _sel_load!);
+  }
+
+  static ffi.Pointer<ObjCSel>? _sel_initialize;
+  static void initialize(NativeLibrary _lib) {
+    _class ??= _getClass(_lib, "NSObject");
+    _sel_initialize ??= _registerName(_lib, "initialize");
+    return _lib._objc_msgSend_0(_class!, _sel_initialize!);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_init;
   NSObject init() {
     _sel_init ??= _registerName(_lib, "init");
-    final _ret = _lib._objc_msgSend_0(_id, _sel_init!);
+    final _ret = _lib._objc_msgSend_1(_id, _sel_init!);
     return NSObject._(_ret, _lib);
   }
 
@@ -627,7 +698,7 @@
   static NSObject new1(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_new1 ??= _registerName(_lib, "new");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_new1!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_new1!);
     return NSObject._(_ret, _lib);
   }
 
@@ -635,7 +706,7 @@
   static NSObject allocWithZone(NativeLibrary _lib, ffi.Pointer<_NSZone> zone) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_allocWithZone ??= _registerName(_lib, "allocWithZone:");
-    final _ret = _lib._objc_msgSend_1(_class!, _sel_allocWithZone!, zone);
+    final _ret = _lib._objc_msgSend_2(_class!, _sel_allocWithZone!, zone);
     return NSObject._(_ret, _lib);
   }
 
@@ -643,21 +714,33 @@
   static NSObject alloc(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_alloc ??= _registerName(_lib, "alloc");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_alloc!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_alloc!);
     return NSObject._(_ret, _lib);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_dealloc;
+  void dealloc() {
+    _sel_dealloc ??= _registerName(_lib, "dealloc");
+    return _lib._objc_msgSend_0(_id, _sel_dealloc!);
+  }
+
+  static ffi.Pointer<ObjCSel>? _sel_finalize;
+  void finalize() {
+    _sel_finalize ??= _registerName(_lib, "finalize");
+    return _lib._objc_msgSend_0(_id, _sel_finalize!);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_copy;
   NSObject copy() {
     _sel_copy ??= _registerName(_lib, "copy");
-    final _ret = _lib._objc_msgSend_2(_id, _sel_copy!);
+    final _ret = _lib._objc_msgSend_3(_id, _sel_copy!);
     return NSObject._(_ret, _lib);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_mutableCopy;
   NSObject mutableCopy() {
     _sel_mutableCopy ??= _registerName(_lib, "mutableCopy");
-    final _ret = _lib._objc_msgSend_3(_id, _sel_mutableCopy!);
+    final _ret = _lib._objc_msgSend_4(_id, _sel_mutableCopy!);
     return NSObject._(_ret, _lib);
   }
 
@@ -665,7 +748,7 @@
   static NSObject copyWithZone(NativeLibrary _lib, ffi.Pointer<_NSZone> zone) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_copyWithZone ??= _registerName(_lib, "copyWithZone:");
-    final _ret = _lib._objc_msgSend_4(_class!, _sel_copyWithZone!, zone);
+    final _ret = _lib._objc_msgSend_5(_class!, _sel_copyWithZone!, zone);
     return NSObject._(_ret, _lib);
   }
 
@@ -674,7 +757,7 @@
       NativeLibrary _lib, ffi.Pointer<_NSZone> zone) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_mutableCopyWithZone ??= _registerName(_lib, "mutableCopyWithZone:");
-    final _ret = _lib._objc_msgSend_5(_class!, _sel_mutableCopyWithZone!, zone);
+    final _ret = _lib._objc_msgSend_6(_class!, _sel_mutableCopyWithZone!, zone);
     return NSObject._(_ret, _lib);
   }
 
@@ -684,7 +767,7 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_instancesRespondToSelector ??=
         _registerName(_lib, "instancesRespondToSelector:");
-    return _lib._objc_msgSend_6(
+    return _lib._objc_msgSend_7(
         _class!, _sel_instancesRespondToSelector!, aSelector);
   }
 
@@ -692,14 +775,14 @@
   static int conformsToProtocol(NativeLibrary _lib, NSObject protocol) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_conformsToProtocol ??= _registerName(_lib, "conformsToProtocol:");
-    return _lib._objc_msgSend_7(
+    return _lib._objc_msgSend_8(
         _class!, _sel_conformsToProtocol!, protocol._id);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_methodForSelector;
   IMP methodForSelector(ffi.Pointer<ObjCSel> aSelector) {
     _sel_methodForSelector ??= _registerName(_lib, "methodForSelector:");
-    return _lib._objc_msgSend_8(_id, _sel_methodForSelector!, aSelector);
+    return _lib._objc_msgSend_9(_id, _sel_methodForSelector!, aSelector);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_instanceMethodForSelector;
@@ -708,25 +791,40 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_instanceMethodForSelector ??=
         _registerName(_lib, "instanceMethodForSelector:");
-    return _lib._objc_msgSend_9(
+    return _lib._objc_msgSend_10(
         _class!, _sel_instanceMethodForSelector!, aSelector);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_doesNotRecognizeSelector;
+  void doesNotRecognizeSelector(ffi.Pointer<ObjCSel> aSelector) {
+    _sel_doesNotRecognizeSelector ??=
+        _registerName(_lib, "doesNotRecognizeSelector:");
+    return _lib._objc_msgSend_11(
+        _id, _sel_doesNotRecognizeSelector!, aSelector);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_forwardingTargetForSelector;
   NSObject forwardingTargetForSelector(ffi.Pointer<ObjCSel> aSelector) {
     _sel_forwardingTargetForSelector ??=
         _registerName(_lib, "forwardingTargetForSelector:");
-    final _ret = _lib._objc_msgSend_10(
+    final _ret = _lib._objc_msgSend_12(
         _id, _sel_forwardingTargetForSelector!, aSelector);
     return NSObject._(_ret, _lib);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_forwardInvocation;
+  void forwardInvocation(NSObject anInvocation) {
+    _sel_forwardInvocation ??= _registerName(_lib, "forwardInvocation:");
+    return _lib._objc_msgSend_13(
+        _id, _sel_forwardInvocation!, anInvocation._id);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_methodSignatureForSelector;
   NSMethodSignature methodSignatureForSelector(ffi.Pointer<ObjCSel> aSelector) {
     _sel_methodSignatureForSelector ??=
         _registerName(_lib, "methodSignatureForSelector:");
     final _ret =
-        _lib._objc_msgSend_11(_id, _sel_methodSignatureForSelector!, aSelector);
+        _lib._objc_msgSend_14(_id, _sel_methodSignatureForSelector!, aSelector);
     return NSMethodSignature._(_ret, _lib);
   }
 
@@ -736,7 +834,7 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_instanceMethodSignatureForSelector ??=
         _registerName(_lib, "instanceMethodSignatureForSelector:");
-    final _ret = _lib._objc_msgSend_12(
+    final _ret = _lib._objc_msgSend_15(
         _class!, _sel_instanceMethodSignatureForSelector!, aSelector);
     return NSMethodSignature._(_ret, _lib);
   }
@@ -744,27 +842,27 @@
   static ffi.Pointer<ObjCSel>? _sel_allowsWeakReference;
   int allowsWeakReference() {
     _sel_allowsWeakReference ??= _registerName(_lib, "allowsWeakReference");
-    return _lib._objc_msgSend_13(_id, _sel_allowsWeakReference!);
+    return _lib._objc_msgSend_16(_id, _sel_allowsWeakReference!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_retainWeakReference;
   int retainWeakReference() {
     _sel_retainWeakReference ??= _registerName(_lib, "retainWeakReference");
-    return _lib._objc_msgSend_13(_id, _sel_retainWeakReference!);
+    return _lib._objc_msgSend_16(_id, _sel_retainWeakReference!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_isSubclassOfClass;
   static int isSubclassOfClass(NativeLibrary _lib, NSObject aClass) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_isSubclassOfClass ??= _registerName(_lib, "isSubclassOfClass:");
-    return _lib._objc_msgSend_14(_class!, _sel_isSubclassOfClass!, aClass._id);
+    return _lib._objc_msgSend_17(_class!, _sel_isSubclassOfClass!, aClass._id);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_resolveClassMethod;
   static int resolveClassMethod(NativeLibrary _lib, ffi.Pointer<ObjCSel> sel) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_resolveClassMethod ??= _registerName(_lib, "resolveClassMethod:");
-    return _lib._objc_msgSend_15(_class!, _sel_resolveClassMethod!, sel);
+    return _lib._objc_msgSend_18(_class!, _sel_resolveClassMethod!, sel);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_resolveInstanceMethod;
@@ -773,21 +871,21 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_resolveInstanceMethod ??=
         _registerName(_lib, "resolveInstanceMethod:");
-    return _lib._objc_msgSend_16(_class!, _sel_resolveInstanceMethod!, sel);
+    return _lib._objc_msgSend_19(_class!, _sel_resolveInstanceMethod!, sel);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_hash;
   static int hash(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_hash ??= _registerName(_lib, "hash");
-    return _lib._objc_msgSend_17(_class!, _sel_hash!);
+    return _lib._objc_msgSend_20(_class!, _sel_hash!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_superclass;
   static NSObject superclass(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_superclass ??= _registerName(_lib, "superclass");
-    final _ret = _lib._objc_msgSend_18(_class!, _sel_superclass!);
+    final _ret = _lib._objc_msgSend_21(_class!, _sel_superclass!);
     return NSObject._(_ret, _lib);
   }
 
@@ -795,7 +893,7 @@
   static NSObject class1(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_class1 ??= _registerName(_lib, "class");
-    final _ret = _lib._objc_msgSend_19(_class!, _sel_class1!);
+    final _ret = _lib._objc_msgSend_22(_class!, _sel_class1!);
     return NSObject._(_ret, _lib);
   }
 
@@ -803,7 +901,7 @@
   static NSString description(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_description ??= _registerName(_lib, "description");
-    final _ret = _lib._objc_msgSend_20(_class!, _sel_description!);
+    final _ret = _lib._objc_msgSend_23(_class!, _sel_description!);
     return NSString._(_ret, _lib);
   }
 
@@ -811,7 +909,7 @@
   static NSString debugDescription(NativeLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_debugDescription ??= _registerName(_lib, "debugDescription");
-    final _ret = _lib._objc_msgSend_20(_class!, _sel_debugDescription!);
+    final _ret = _lib._objc_msgSend_23(_class!, _sel_debugDescription!);
     return NSString._(_ret, _lib);
   }
 }
diff --git a/pkgs/ffigen/test/native_objc_test/native_objc_test.dart b/pkgs/ffigen/test/native_objc_test/native_objc_test.dart
index 9f2e219..5e2b160 100644
--- a/pkgs/ffigen/test/native_objc_test/native_objc_test.dart
+++ b/pkgs/ffigen/test/native_objc_test/native_objc_test.dart
@@ -50,13 +50,20 @@
     test('Interface basics, with Foo', () {
       final foo1 = Foo.makeFoo(lib, 3.14159);
       final foo2 = Foo.makeFoo(lib, 2.71828);
+
       expect(foo1.intVal, 3);
       expect(foo2.intVal, 2);
+
       expect(foo1.multiply(0, foo2), 8);
       expect(foo1.multiply(1, foo2), 6);
+
       foo1.intVal = 100;
       expect(foo1.multiply(0, foo2), 8);
       expect(foo1.multiply(1, foo2), 200);
+
+      foo2.setDoubleVal(1.61803);
+      expect(foo1.multiply(0, foo2), 5);
+      expect(foo1.multiply(1, foo2), 200);
     });
   });
 }
diff --git a/pkgs/ffigen/test/native_objc_test/native_objc_test.m b/pkgs/ffigen/test/native_objc_test/native_objc_test.m
index 98f9aca..41027c0 100644
--- a/pkgs/ffigen/test/native_objc_test/native_objc_test.m
+++ b/pkgs/ffigen/test/native_objc_test/native_objc_test.m
@@ -10,6 +10,8 @@
 
 - (int32_t)multiply:(BOOL)useIntVals withOtherFoo:(Foo*)other;
 
+- (void)setDoubleVal:(double)x;
+
 @end
 
 @implementation Foo
@@ -29,4 +31,8 @@
   }
 }
 
+- (void)setDoubleVal:(double)x {
+  self->doubleVal = x;
+}
+
 @end
diff --git a/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart
index 9c86588..2fac4fe 100644
--- a/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart
+++ b/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart
@@ -1017,7 +1017,7 @@
   late final __objc_getClass = __objc_getClassPtr.asFunction<
       ffi.Pointer<ObjCObject> Function(ffi.Pointer<pkg_ffi.Char>)>();
 
-  instancetype _objc_msgSend_0(
+  void _objc_msgSend_0(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
   ) {
@@ -1029,49 +1029,48 @@
 
   late final __objc_msgSend_0Ptr = _lookup<
       ffi.NativeFunction<
-          instancetype Function(
+          ffi.Void Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction<
-      instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
   instancetype _objc_msgSend_1(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<_NSZone> zone,
   ) {
     return __objc_msgSend_1(
       obj,
       sel,
+    );
+  }
+
+  late final __objc_msgSend_1Ptr = _lookup<
+      ffi.NativeFunction<
+          instancetype Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction<
+      instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  instancetype _objc_msgSend_2(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<_NSZone> zone,
+  ) {
+    return __objc_msgSend_2(
+      obj,
+      sel,
       zone,
     );
   }
 
-  late final __objc_msgSend_1Ptr = _lookup<
+  late final __objc_msgSend_2Ptr = _lookup<
       ffi.NativeFunction<
           instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
               ffi.Pointer<_NSZone>)>>('objc_msgSend');
-  late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction<
+  late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction<
       instancetype Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
           ffi.Pointer<_NSZone>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_2(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-  ) {
-    return __objc_msgSend_2(
-      obj,
-      sel,
-    );
-  }
-
-  late final __objc_msgSend_2Ptr = _lookup<
-      ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
-
   ffi.Pointer<ObjCObject> _objc_msgSend_3(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
@@ -1093,22 +1092,20 @@
   ffi.Pointer<ObjCObject> _objc_msgSend_4(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<_NSZone> zone,
   ) {
     return __objc_msgSend_4(
       obj,
       sel,
-      zone,
     );
   }
 
   late final __objc_msgSend_4Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-              ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>>('objc_msgSend');
+          ffi.Pointer<ObjCObject> Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-          ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>();
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
   ffi.Pointer<ObjCObject> _objc_msgSend_5(
     ffi.Pointer<ObjCObject> obj,
@@ -1130,65 +1127,65 @@
       ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
           ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>();
 
-  int _objc_msgSend_6(
+  ffi.Pointer<ObjCObject> _objc_msgSend_6(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCSel> aSelector,
+    ffi.Pointer<_NSZone> zone,
   ) {
     return __objc_msgSend_6(
       obj,
       sel,
-      aSelector,
+      zone,
     );
   }
 
   late final __objc_msgSend_6Ptr = _lookup<
       ffi.NativeFunction<
-          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+              ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>>('objc_msgSend');
   late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
+      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+          ffi.Pointer<ObjCSel>, ffi.Pointer<_NSZone>)>();
 
   int _objc_msgSend_7(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCObject> protocol,
+    ffi.Pointer<ObjCSel> aSelector,
   ) {
     return __objc_msgSend_7(
       obj,
       sel,
-      protocol,
+      aSelector,
     );
   }
 
   late final __objc_msgSend_7Ptr = _lookup<
       ffi.NativeFunction<
           BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCObject>)>>('objc_msgSend');
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCObject>)>();
+          ffi.Pointer<ObjCSel>)>();
 
-  IMP _objc_msgSend_8(
+  int _objc_msgSend_8(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCSel> aSelector,
+    ffi.Pointer<ObjCObject> protocol,
   ) {
     return __objc_msgSend_8(
       obj,
       sel,
-      aSelector,
+      protocol,
     );
   }
 
   late final __objc_msgSend_8Ptr = _lookup<
       ffi.NativeFunction<
-          IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCObject>)>>('objc_msgSend');
   late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction<
-      IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCObject>)>();
 
   IMP _objc_msgSend_9(
     ffi.Pointer<ObjCObject> obj,
@@ -1210,7 +1207,7 @@
       IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
           ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_10(
+  IMP _objc_msgSend_10(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCSel> aSelector,
@@ -1224,13 +1221,13 @@
 
   late final __objc_msgSend_10Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+      IMP Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_11(
+  void _objc_msgSend_11(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCSel> aSelector,
@@ -1244,11 +1241,11 @@
 
   late final __objc_msgSend_11Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          ffi.Void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
-          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+      void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
   ffi.Pointer<ObjCObject> _objc_msgSend_12(
     ffi.Pointer<ObjCObject> obj,
@@ -1270,137 +1267,144 @@
       ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
           ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
 
-  int _objc_msgSend_13(
+  void _objc_msgSend_13(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCObject> anInvocation,
   ) {
     return __objc_msgSend_13(
       obj,
       sel,
+      anInvocation,
     );
   }
 
   late final __objc_msgSend_13Ptr = _lookup<
       ffi.NativeFunction<
+          ffi.Void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCObject>)>>('objc_msgSend');
+  late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction<
+      void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCObject>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_14(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCSel> aSelector,
+  ) {
+    return __objc_msgSend_14(
+      obj,
+      sel,
+      aSelector,
+    );
+  }
+
+  late final __objc_msgSend_14Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_15(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCSel> aSelector,
+  ) {
+    return __objc_msgSend_15(
+      obj,
+      sel,
+      aSelector,
+    );
+  }
+
+  late final __objc_msgSend_15Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+              ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
+          ffi.Pointer<ObjCSel>, ffi.Pointer<ObjCSel>)>();
+
+  int _objc_msgSend_16(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_16(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_16Ptr = _lookup<
+      ffi.NativeFunction<
           BOOL Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction<
+  late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
-  int _objc_msgSend_14(
+  int _objc_msgSend_17(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCObject> aClass,
   ) {
-    return __objc_msgSend_14(
+    return __objc_msgSend_17(
       obj,
       sel,
       aClass,
     );
   }
 
-  late final __objc_msgSend_14Ptr = _lookup<
+  late final __objc_msgSend_17Ptr = _lookup<
       ffi.NativeFunction<
           BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
               ffi.Pointer<ObjCObject>)>>('objc_msgSend');
-  late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction<
+  late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
           ffi.Pointer<ObjCObject>)>();
 
-  int _objc_msgSend_15(
+  int _objc_msgSend_18(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     ffi.Pointer<ObjCSel> sel1,
   ) {
-    return __objc_msgSend_15(
-      obj,
-      sel,
-      sel1,
-    );
-  }
-
-  late final __objc_msgSend_15Ptr = _lookup<
-      ffi.NativeFunction<
-          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
-
-  int _objc_msgSend_16(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-    ffi.Pointer<ObjCSel> sel1,
-  ) {
-    return __objc_msgSend_16(
-      obj,
-      sel,
-      sel1,
-    );
-  }
-
-  late final __objc_msgSend_16Ptr = _lookup<
-      ffi.NativeFunction<
-          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
-          ffi.Pointer<ObjCSel>)>();
-
-  int _objc_msgSend_17(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-  ) {
-    return __objc_msgSend_17(
-      obj,
-      sel,
-    );
-  }
-
-  late final __objc_msgSend_17Ptr = _lookup<
-      ffi.NativeFunction<
-          NSUInteger Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
-  late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction<
-      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
-
-  ffi.Pointer<ObjCObject> _objc_msgSend_18(
-    ffi.Pointer<ObjCObject> obj,
-    ffi.Pointer<ObjCSel> sel,
-  ) {
     return __objc_msgSend_18(
       obj,
       sel,
+      sel1,
     );
   }
 
   late final __objc_msgSend_18Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_19(
+  int _objc_msgSend_19(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
+    ffi.Pointer<ObjCSel> sel1,
   ) {
     return __objc_msgSend_19(
       obj,
       sel,
+      sel1,
     );
   }
 
   late final __objc_msgSend_19Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
-              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+          BOOL Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+          ffi.Pointer<ObjCSel>)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_20(
+  int _objc_msgSend_20(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
   ) {
@@ -1412,13 +1416,12 @@
 
   late final __objc_msgSend_20Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Pointer<ObjCObject> Function(
+          NSUInteger Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction<
-      ffi.Pointer<ObjCObject> Function(
-          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+      int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
-  int _objc_msgSend_21(
+  ffi.Pointer<ObjCObject> _objc_msgSend_21(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
   ) {
@@ -1430,57 +1433,111 @@
 
   late final __objc_msgSend_21Ptr = _lookup<
       ffi.NativeFunction<
-          ffi.Int32 Function(
+          ffi.Pointer<ObjCObject> Function(
               ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
   late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_22(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_22(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_22Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  ffi.Pointer<ObjCObject> _objc_msgSend_23(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_23(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_23Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Pointer<ObjCObject> Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction<
+      ffi.Pointer<ObjCObject> Function(
+          ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
+
+  int _objc_msgSend_24(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+  ) {
+    return __objc_msgSend_24(
+      obj,
+      sel,
+    );
+  }
+
+  late final __objc_msgSend_24Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Int32 Function(
+              ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>>('objc_msgSend');
+  late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>)>();
 
-  void _objc_msgSend_22(
+  void _objc_msgSend_25(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     int value,
   ) {
-    return __objc_msgSend_22(
+    return __objc_msgSend_25(
       obj,
       sel,
       value,
     );
   }
 
-  late final __objc_msgSend_22Ptr = _lookup<
+  late final __objc_msgSend_25Ptr = _lookup<
       ffi.NativeFunction<
           ffi.Void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
               ffi.Int32)>>('objc_msgSend');
-  late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction<
+  late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction<
       void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>, int)>();
 
-  ffi.Pointer<ObjCObject> _objc_msgSend_23(
+  ffi.Pointer<ObjCObject> _objc_msgSend_26(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     double x,
   ) {
-    return __objc_msgSend_23(
+    return __objc_msgSend_26(
       obj,
       sel,
       x,
     );
   }
 
-  late final __objc_msgSend_23Ptr = _lookup<
+  late final __objc_msgSend_26Ptr = _lookup<
       ffi.NativeFunction<
           ffi.Pointer<ObjCObject> Function(ffi.Pointer<ObjCObject>,
               ffi.Pointer<ObjCSel>, ffi.Double)>>('objc_msgSend');
-  late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction<
+  late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction<
       ffi.Pointer<ObjCObject> Function(
           ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>, double)>();
 
-  int _objc_msgSend_24(
+  int _objc_msgSend_27(
     ffi.Pointer<ObjCObject> obj,
     ffi.Pointer<ObjCSel> sel,
     int useIntVals,
     ffi.Pointer<ObjCObject> other,
   ) {
-    return __objc_msgSend_24(
+    return __objc_msgSend_27(
       obj,
       sel,
       useIntVals,
@@ -1488,13 +1545,32 @@
     );
   }
 
-  late final __objc_msgSend_24Ptr = _lookup<
+  late final __objc_msgSend_27Ptr = _lookup<
       ffi.NativeFunction<
           ffi.Int32 Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
               BOOL, ffi.Pointer<ObjCObject>)>>('objc_msgSend');
-  late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction<
+  late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction<
       int Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>, int,
           ffi.Pointer<ObjCObject>)>();
+
+  void _objc_msgSend_28(
+    ffi.Pointer<ObjCObject> obj,
+    ffi.Pointer<ObjCSel> sel,
+    double x,
+  ) {
+    return __objc_msgSend_28(
+      obj,
+      sel,
+      x,
+    );
+  }
+
+  late final __objc_msgSend_28Ptr = _lookup<
+      ffi.NativeFunction<
+          ffi.Void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>,
+              ffi.Double)>>('objc_msgSend');
+  late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction<
+      void Function(ffi.Pointer<ObjCObject>, ffi.Pointer<ObjCSel>, double)>();
 }
 
 class ObjCObject extends ffi.Opaque {}
@@ -1652,34 +1728,40 @@
   static ffi.Pointer<ObjCSel>? _sel_intVal;
   int get intVal {
     _sel_intVal ??= _registerName(_lib, "intVal");
-    return _lib._objc_msgSend_21(_id, _sel_intVal!);
+    return _lib._objc_msgSend_24(_id, _sel_intVal!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_intVal1;
   set intVal(int value) {
     _sel_intVal1 ??= _registerName(_lib, "setIntVal:");
-    return _lib._objc_msgSend_22(_id, _sel_intVal1!, value);
+    return _lib._objc_msgSend_25(_id, _sel_intVal1!, value);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_makeFoo;
   static Foo makeFoo(NativeObjCLibrary _lib, double x) {
     _class ??= _getClass(_lib, "Foo");
     _sel_makeFoo ??= _registerName(_lib, "makeFoo:");
-    final _ret = _lib._objc_msgSend_23(_class!, _sel_makeFoo!, x);
+    final _ret = _lib._objc_msgSend_26(_class!, _sel_makeFoo!, x);
     return Foo._(_ret, _lib);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_multiply;
   int multiply(int useIntVals, NSObject other) {
     _sel_multiply ??= _registerName(_lib, "multiply:withOtherFoo:");
-    return _lib._objc_msgSend_24(_id, _sel_multiply!, useIntVals, other._id);
+    return _lib._objc_msgSend_27(_id, _sel_multiply!, useIntVals, other._id);
+  }
+
+  static ffi.Pointer<ObjCSel>? _sel_setDoubleVal;
+  void setDoubleVal(double x) {
+    _sel_setDoubleVal ??= _registerName(_lib, "setDoubleVal:");
+    return _lib._objc_msgSend_28(_id, _sel_setDoubleVal!, x);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_new1;
   static Foo new1(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "Foo");
     _sel_new1 ??= _registerName(_lib, "new");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_new1!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_new1!);
     return Foo._(_ret, _lib);
   }
 
@@ -1687,7 +1769,7 @@
   static Foo alloc(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "Foo");
     _sel_alloc ??= _registerName(_lib, "alloc");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_alloc!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_alloc!);
     return Foo._(_ret, _lib);
   }
 }
@@ -1702,10 +1784,24 @@
     return NSObject._(other._id, other._lib);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_load;
+  static void load(NativeObjCLibrary _lib) {
+    _class ??= _getClass(_lib, "NSObject");
+    _sel_load ??= _registerName(_lib, "load");
+    return _lib._objc_msgSend_0(_class!, _sel_load!);
+  }
+
+  static ffi.Pointer<ObjCSel>? _sel_initialize;
+  static void initialize(NativeObjCLibrary _lib) {
+    _class ??= _getClass(_lib, "NSObject");
+    _sel_initialize ??= _registerName(_lib, "initialize");
+    return _lib._objc_msgSend_0(_class!, _sel_initialize!);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_init;
   NSObject init() {
     _sel_init ??= _registerName(_lib, "init");
-    final _ret = _lib._objc_msgSend_0(_id, _sel_init!);
+    final _ret = _lib._objc_msgSend_1(_id, _sel_init!);
     return NSObject._(_ret, _lib);
   }
 
@@ -1713,7 +1809,7 @@
   static NSObject new1(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_new1 ??= _registerName(_lib, "new");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_new1!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_new1!);
     return NSObject._(_ret, _lib);
   }
 
@@ -1722,7 +1818,7 @@
       NativeObjCLibrary _lib, ffi.Pointer<_NSZone> zone) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_allocWithZone ??= _registerName(_lib, "allocWithZone:");
-    final _ret = _lib._objc_msgSend_1(_class!, _sel_allocWithZone!, zone);
+    final _ret = _lib._objc_msgSend_2(_class!, _sel_allocWithZone!, zone);
     return NSObject._(_ret, _lib);
   }
 
@@ -1730,21 +1826,33 @@
   static NSObject alloc(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_alloc ??= _registerName(_lib, "alloc");
-    final _ret = _lib._objc_msgSend_0(_class!, _sel_alloc!);
+    final _ret = _lib._objc_msgSend_1(_class!, _sel_alloc!);
     return NSObject._(_ret, _lib);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_dealloc;
+  void dealloc() {
+    _sel_dealloc ??= _registerName(_lib, "dealloc");
+    return _lib._objc_msgSend_0(_id, _sel_dealloc!);
+  }
+
+  static ffi.Pointer<ObjCSel>? _sel_finalize;
+  void finalize() {
+    _sel_finalize ??= _registerName(_lib, "finalize");
+    return _lib._objc_msgSend_0(_id, _sel_finalize!);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_copy;
   NSObject copy() {
     _sel_copy ??= _registerName(_lib, "copy");
-    final _ret = _lib._objc_msgSend_2(_id, _sel_copy!);
+    final _ret = _lib._objc_msgSend_3(_id, _sel_copy!);
     return NSObject._(_ret, _lib);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_mutableCopy;
   NSObject mutableCopy() {
     _sel_mutableCopy ??= _registerName(_lib, "mutableCopy");
-    final _ret = _lib._objc_msgSend_3(_id, _sel_mutableCopy!);
+    final _ret = _lib._objc_msgSend_4(_id, _sel_mutableCopy!);
     return NSObject._(_ret, _lib);
   }
 
@@ -1753,7 +1861,7 @@
       NativeObjCLibrary _lib, ffi.Pointer<_NSZone> zone) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_copyWithZone ??= _registerName(_lib, "copyWithZone:");
-    final _ret = _lib._objc_msgSend_4(_class!, _sel_copyWithZone!, zone);
+    final _ret = _lib._objc_msgSend_5(_class!, _sel_copyWithZone!, zone);
     return NSObject._(_ret, _lib);
   }
 
@@ -1762,7 +1870,7 @@
       NativeObjCLibrary _lib, ffi.Pointer<_NSZone> zone) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_mutableCopyWithZone ??= _registerName(_lib, "mutableCopyWithZone:");
-    final _ret = _lib._objc_msgSend_5(_class!, _sel_mutableCopyWithZone!, zone);
+    final _ret = _lib._objc_msgSend_6(_class!, _sel_mutableCopyWithZone!, zone);
     return NSObject._(_ret, _lib);
   }
 
@@ -1772,7 +1880,7 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_instancesRespondToSelector ??=
         _registerName(_lib, "instancesRespondToSelector:");
-    return _lib._objc_msgSend_6(
+    return _lib._objc_msgSend_7(
         _class!, _sel_instancesRespondToSelector!, aSelector);
   }
 
@@ -1780,14 +1888,14 @@
   static int conformsToProtocol(NativeObjCLibrary _lib, NSObject protocol) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_conformsToProtocol ??= _registerName(_lib, "conformsToProtocol:");
-    return _lib._objc_msgSend_7(
+    return _lib._objc_msgSend_8(
         _class!, _sel_conformsToProtocol!, protocol._id);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_methodForSelector;
   IMP methodForSelector(ffi.Pointer<ObjCSel> aSelector) {
     _sel_methodForSelector ??= _registerName(_lib, "methodForSelector:");
-    return _lib._objc_msgSend_8(_id, _sel_methodForSelector!, aSelector);
+    return _lib._objc_msgSend_9(_id, _sel_methodForSelector!, aSelector);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_instanceMethodForSelector;
@@ -1796,25 +1904,40 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_instanceMethodForSelector ??=
         _registerName(_lib, "instanceMethodForSelector:");
-    return _lib._objc_msgSend_9(
+    return _lib._objc_msgSend_10(
         _class!, _sel_instanceMethodForSelector!, aSelector);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_doesNotRecognizeSelector;
+  void doesNotRecognizeSelector(ffi.Pointer<ObjCSel> aSelector) {
+    _sel_doesNotRecognizeSelector ??=
+        _registerName(_lib, "doesNotRecognizeSelector:");
+    return _lib._objc_msgSend_11(
+        _id, _sel_doesNotRecognizeSelector!, aSelector);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_forwardingTargetForSelector;
   NSObject forwardingTargetForSelector(ffi.Pointer<ObjCSel> aSelector) {
     _sel_forwardingTargetForSelector ??=
         _registerName(_lib, "forwardingTargetForSelector:");
-    final _ret = _lib._objc_msgSend_10(
+    final _ret = _lib._objc_msgSend_12(
         _id, _sel_forwardingTargetForSelector!, aSelector);
     return NSObject._(_ret, _lib);
   }
 
+  static ffi.Pointer<ObjCSel>? _sel_forwardInvocation;
+  void forwardInvocation(NSObject anInvocation) {
+    _sel_forwardInvocation ??= _registerName(_lib, "forwardInvocation:");
+    return _lib._objc_msgSend_13(
+        _id, _sel_forwardInvocation!, anInvocation._id);
+  }
+
   static ffi.Pointer<ObjCSel>? _sel_methodSignatureForSelector;
   NSMethodSignature methodSignatureForSelector(ffi.Pointer<ObjCSel> aSelector) {
     _sel_methodSignatureForSelector ??=
         _registerName(_lib, "methodSignatureForSelector:");
     final _ret =
-        _lib._objc_msgSend_11(_id, _sel_methodSignatureForSelector!, aSelector);
+        _lib._objc_msgSend_14(_id, _sel_methodSignatureForSelector!, aSelector);
     return NSMethodSignature._(_ret, _lib);
   }
 
@@ -1824,7 +1947,7 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_instanceMethodSignatureForSelector ??=
         _registerName(_lib, "instanceMethodSignatureForSelector:");
-    final _ret = _lib._objc_msgSend_12(
+    final _ret = _lib._objc_msgSend_15(
         _class!, _sel_instanceMethodSignatureForSelector!, aSelector);
     return NSMethodSignature._(_ret, _lib);
   }
@@ -1832,20 +1955,20 @@
   static ffi.Pointer<ObjCSel>? _sel_allowsWeakReference;
   int allowsWeakReference() {
     _sel_allowsWeakReference ??= _registerName(_lib, "allowsWeakReference");
-    return _lib._objc_msgSend_13(_id, _sel_allowsWeakReference!);
+    return _lib._objc_msgSend_16(_id, _sel_allowsWeakReference!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_retainWeakReference;
   int retainWeakReference() {
     _sel_retainWeakReference ??= _registerName(_lib, "retainWeakReference");
-    return _lib._objc_msgSend_13(_id, _sel_retainWeakReference!);
+    return _lib._objc_msgSend_16(_id, _sel_retainWeakReference!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_isSubclassOfClass;
   static int isSubclassOfClass(NativeObjCLibrary _lib, NSObject aClass) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_isSubclassOfClass ??= _registerName(_lib, "isSubclassOfClass:");
-    return _lib._objc_msgSend_14(_class!, _sel_isSubclassOfClass!, aClass._id);
+    return _lib._objc_msgSend_17(_class!, _sel_isSubclassOfClass!, aClass._id);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_resolveClassMethod;
@@ -1853,7 +1976,7 @@
       NativeObjCLibrary _lib, ffi.Pointer<ObjCSel> sel) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_resolveClassMethod ??= _registerName(_lib, "resolveClassMethod:");
-    return _lib._objc_msgSend_15(_class!, _sel_resolveClassMethod!, sel);
+    return _lib._objc_msgSend_18(_class!, _sel_resolveClassMethod!, sel);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_resolveInstanceMethod;
@@ -1862,21 +1985,21 @@
     _class ??= _getClass(_lib, "NSObject");
     _sel_resolveInstanceMethod ??=
         _registerName(_lib, "resolveInstanceMethod:");
-    return _lib._objc_msgSend_16(_class!, _sel_resolveInstanceMethod!, sel);
+    return _lib._objc_msgSend_19(_class!, _sel_resolveInstanceMethod!, sel);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_hash;
   static int hash(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_hash ??= _registerName(_lib, "hash");
-    return _lib._objc_msgSend_17(_class!, _sel_hash!);
+    return _lib._objc_msgSend_20(_class!, _sel_hash!);
   }
 
   static ffi.Pointer<ObjCSel>? _sel_superclass;
   static NSObject superclass(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_superclass ??= _registerName(_lib, "superclass");
-    final _ret = _lib._objc_msgSend_18(_class!, _sel_superclass!);
+    final _ret = _lib._objc_msgSend_21(_class!, _sel_superclass!);
     return NSObject._(_ret, _lib);
   }
 
@@ -1884,7 +2007,7 @@
   static NSObject class1(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_class1 ??= _registerName(_lib, "class");
-    final _ret = _lib._objc_msgSend_19(_class!, _sel_class1!);
+    final _ret = _lib._objc_msgSend_22(_class!, _sel_class1!);
     return NSObject._(_ret, _lib);
   }
 
@@ -1892,7 +2015,7 @@
   static NSString description(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_description ??= _registerName(_lib, "description");
-    final _ret = _lib._objc_msgSend_20(_class!, _sel_description!);
+    final _ret = _lib._objc_msgSend_23(_class!, _sel_description!);
     return NSString._(_ret, _lib);
   }
 
@@ -1900,7 +2023,7 @@
   static NSString debugDescription(NativeObjCLibrary _lib) {
     _class ??= _getClass(_lib, "NSObject");
     _sel_debugDescription ??= _registerName(_lib, "debugDescription");
-    final _ret = _lib._objc_msgSend_20(_class!, _sel_debugDescription!);
+    final _ret = _lib._objc_msgSend_23(_class!, _sel_debugDescription!);
     return NSString._(_ret, _lib);
   }
 }