# This file is generated by objective.metadata
#
# Last update: Wed Feb 12 10:48:56 2020
#
# flake8: noqa

import sys

import objc

if sys.maxsize > 2 ** 32:

    def sel32or64(a, b):
        return b


else:

    def sel32or64(a, b):
        return a


misc = {}
misc.update(
    {
        "CGFunctionCallbacks": objc.createStructType(
            "CGFunctionCallbacks", b"{CGFunctionCallbacks=I^?^?}", []
        ),
        "CGDeviceByteColor": objc.createStructType(
            "CGDeviceByteColor", b"{CGDeviceByteColor=CCC}", ["red", "green", "blue"]
        ),
        "CGPoint": objc.createStructAlias(
            "CGPoint",
            sel32or64(b"{CGPoint=ff}", b"{CGPoint=dd}"),
            objc._resolve_name("Foundation.NSPoint"),
        ),
        "CGDataProviderCallbacks": objc.createStructType(
            "CGDataProviderCallbacks", b"{CGDataProviderCallbacks=^?^?^?^?}", []
        ),
        "CGDataProviderSequentialCallbacks": objc.createStructType(
            "CGDataProviderSequentialCallbacks",
            b"{CGDataProviderSequentialCallbacks=I^?^?^?^?}",
            [],
        ),
        "CGPatternCallbacks": objc.createStructType(
            "CGPatternCallbacks", b"{CGPatternCallbacks=I^?^?}", []
        ),
        "CGSize": objc.createStructAlias(
            "CGSize",
            sel32or64(b"{CGSize=ff}", b"{CGSize=dd}"),
            objc._resolve_name("Foundation.NSSize"),
        ),
        "CGDeviceColor": objc.createStructType(
            "CGDeviceColor", b"{CGDeviceColor=fff}", ["red", "green", "blue"]
        ),
        "CGDataProviderDirectAccessCallbacks": objc.createStructType(
            "CGDataProviderDirectAccessCallbacks",
            b"{CGDataProviderDirectAccessCallbacks=^?^?^?^?}",
            [],
        ),
        "CGAffineTransform": objc.createStructType(
            "CGAffineTransform",
            sel32or64(b"{CGAffineTransform=ffffff}", b"{CGAffineTransform=dddddd}"),
            ["a", "b", "c", "d", "tx", "ty"],
        ),
        "CGDataConsumerCallbacks": objc.createStructType(
            "CGDataConsumerCallbacks", b"{CGDataConsumerCallbacks=^?^?}", []
        ),
        "CGVector": objc.createStructType(
            "CGVector", sel32or64(b"{CGVector=ff}", b"{CGVector=dd}"), ["dx", "dy"]
        ),
        "CGPathElement": objc.createStructType(
            "CGPathElement",
            sel32or64(
                b"{CGPathElement=I^{CGPoint=ff}}", b"{CGPathElement=i^{CGPoint=dd}}"
            ),
            ["type", "points"],
        ),
        "CGScreenUpdateMoveDelta": objc.createStructType(
            "CGScreenUpdateMoveDelta", b"{CGScreenUpdateMoveDelta=ii}", ["dX", "dY"]
        ),
        "CGEventTapInformation": objc.createStructType(
            "CGEventTapInformation",
            b"{__CGEventTapInformation=IIIQiiBfff}",
            [
                "eventTapID",
                "tapPoint",
                "options",
                "eventsOfInterest",
                "tappingProcess",
                "processBeingTapped",
                "enabled",
                "minUsecLatency",
                "avgUsecLatency",
                "maxUsecLatency",
            ],
        ),
        "CGPSConverterCallbacks": objc.createStructType(
            "CGPSConverterCallbacks", b"{CGPSConverterCallbacks=I^?^?^?^?^?^?^?}", []
        ),
        "CGRect": objc.createStructAlias(
            "CGRect",
            sel32or64(
                b"{CGRect={CGPoint=ff}{CGSize=ff}}", b"{CGRect={CGPoint=dd}{CGSize=dd}}"
            ),
            objc._resolve_name("Foundation.NSRect"),
        ),
    }
)
constants = """$kCGColorBlack@^{__CFString=}$kCGColorClear@^{__CFString=}$kCGColorConversionBlackPointCompensation@^{__CFString=}$kCGColorConversionTRCSize@^{__CFString=}$kCGColorSpaceACESCGLinear@^{__CFString=}$kCGColorSpaceAdobeRGB1998@^{__CFString=}$kCGColorSpaceDCIP3@^{__CFString=}$kCGColorSpaceDisplayP3@^{__CFString=}$kCGColorSpaceDisplayP3_HLG@^{__CFString=}$kCGColorSpaceDisplayP3_PQ$kCGColorSpaceDisplayP3_PQ_EOTF@^{__CFString=}$kCGColorSpaceExtendedGray@^{__CFString=}$kCGColorSpaceExtendedLinearDisplayP3@^{__CFString=}$kCGColorSpaceExtendedLinearGray@^{__CFString=}$kCGColorSpaceExtendedLinearITUR_2020@^{__CFString=}$kCGColorSpaceExtendedLinearSRGB@^{__CFString=}$kCGColorSpaceExtendedSRGB@^{__CFString=}$kCGColorSpaceGenericCMYK@^{__CFString=}$kCGColorSpaceGenericGray@^{__CFString=}$kCGColorSpaceGenericGrayGamma2_2@^{__CFString=}$kCGColorSpaceGenericLab@^{__CFString=}$kCGColorSpaceGenericRGB@^{__CFString=}$kCGColorSpaceGenericRGBLinear@^{__CFString=}$kCGColorSpaceGenericXYZ@^{__CFString=}$kCGColorSpaceITUR_2020@^{__CFString=}$kCGColorSpaceITUR_2020_HLG@^{__CFString=}$kCGColorSpaceITUR_2020_PQ$kCGColorSpaceITUR_2020_PQ_EOTF@^{__CFString=}$kCGColorSpaceITUR_709@^{__CFString=}$kCGColorSpaceLinearGray@^{__CFString=}$kCGColorSpaceLinearSRGB@^{__CFString=}$kCGColorSpaceROMMRGB@^{__CFString=}$kCGColorSpaceSRGB@^{__CFString=}$kCGColorWhite@^{__CFString=}$kCGDisplayShowDuplicateLowResolutionModes@^{__CFString=}$kCGDisplayStreamColorSpace@^{__CFString=}$kCGDisplayStreamDestinationRect@^{__CFString=}$kCGDisplayStreamMinimumFrameTime@^{__CFString=}$kCGDisplayStreamPreserveAspectRatio@^{__CFString=}$kCGDisplayStreamQueueDepth@^{__CFString=}$kCGDisplayStreamShowCursor@^{__CFString=}$kCGDisplayStreamSourceRect@^{__CFString=}$kCGDisplayStreamYCbCrMatrix@^{__CFString=}$kCGDisplayStreamYCbCrMatrix_ITU_R_601_4@^{__CFString=}$kCGDisplayStreamYCbCrMatrix_ITU_R_709_2@^{__CFString=}$kCGDisplayStreamYCbCrMatrix_SMPTE_240M_1995@^{__CFString=}$kCGFontVariationAxisDefaultValue@^{__CFString=}$kCGFontVariationAxisMaxValue@^{__CFString=}$kCGFontVariationAxisMinValue@^{__CFString=}$kCGFontVariationAxisName@^{__CFString=}$kCGPDFContextAccessPermissions@^{__CFString=}$kCGPDFContextAllowsCopying@^{__CFString=}$kCGPDFContextAllowsPrinting@^{__CFString=}$kCGPDFContextArtBox@^{__CFString=}$kCGPDFContextAuthor@^{__CFString=}$kCGPDFContextBleedBox@^{__CFString=}$kCGPDFContextCreator@^{__CFString=}$kCGPDFContextCropBox@^{__CFString=}$kCGPDFContextEncryptionKeyLength@^{__CFString=}$kCGPDFContextKeywords@^{__CFString=}$kCGPDFContextMediaBox@^{__CFString=}$kCGPDFContextOutputIntent@^{__CFString=}$kCGPDFContextOutputIntents@^{__CFString=}$kCGPDFContextOwnerPassword@^{__CFString=}$kCGPDFContextSubject@^{__CFString=}$kCGPDFContextTitle@^{__CFString=}$kCGPDFContextTrimBox@^{__CFString=}$kCGPDFContextUserPassword@^{__CFString=}$kCGPDFOutlineChildren@^{__CFString=}$kCGPDFOutlineDestination@^{__CFString=}$kCGPDFOutlineDestinationRect@^{__CFString=}$kCGPDFOutlineTitle@^{__CFString=}$kCGPDFTagPropertyActualText@^{__CFString=}$kCGPDFTagPropertyAlternativeText@^{__CFString=}$kCGPDFTagPropertyLanguageText@^{__CFString=}$kCGPDFTagPropertyTitleText@^{__CFString=}$kCGPDFXDestinationOutputProfile@^{__CFString=}$kCGPDFXInfo@^{__CFString=}$kCGPDFXOutputCondition@^{__CFString=}$kCGPDFXOutputConditionIdentifier@^{__CFString=}$kCGPDFXOutputIntentSubtype@^{__CFString=}$kCGPDFXRegistryName@^{__CFString=}$kCGWindowAlpha@^{__CFString=}$kCGWindowBackingLocationVideoMemory@^{__CFString=}$kCGWindowBounds@^{__CFString=}$kCGWindowIsOnscreen@^{__CFString=}$kCGWindowLayer@^{__CFString=}$kCGWindowMemoryUsage@^{__CFString=}$kCGWindowName@^{__CFString=}$kCGWindowNumber@^{__CFString=}$kCGWindowOwnerName@^{__CFString=}$kCGWindowOwnerPID@^{__CFString=}$kCGWindowSharingState@^{__CFString=}$kCGWindowStoreType@^{__CFString=}$kCGWindowWorkspace@^{__CFString=}$"""
constants = constants + "$CGRectZero@%s$" % (
    sel32or64("{CGRect={CGPoint=ff}{CGSize=ff}}", "{CGRect={CGPoint=dd}{CGSize=dd}}"),
)
constants = constants + "$CGAffineTransformIdentity@%s$" % (
    sel32or64("{CGAffineTransform=ffffff}", "{CGAffineTransform=dddddd}"),
)
constants = constants + "$CGRectNull@%s$" % (
    sel32or64("{CGRect={CGPoint=ff}{CGSize=ff}}", "{CGRect={CGPoint=dd}{CGSize=dd}}"),
)
constants = constants + "$CGPointZero@%s$" % (
    sel32or64("{CGPoint=ff}", "{CGPoint=dd}"),
)
constants = constants + "$CGRectInfinite@%s$" % (
    sel32or64("{CGRect={CGPoint=ff}{CGSize=ff}}", "{CGRect={CGPoint=dd}{CGSize=dd}}"),
)
constants = constants + "$CGSizeZero@%s$" % (sel32or64("{CGSize=ff}", "{CGSize=dd}"),)
enums = """$CGFLOAT_DEFINED@1$CGGlyphMax@65534$CGGlyphMin@0$CGPDFDataFormatJPEG2000@2$CGPDFDataFormatJPEGEncoded@1$CGPDFDataFormatRaw@0$CGPDFTagTypeAnnotation@507$CGPDFTagTypeArt@102$CGPDFTagTypeBibliography@504$CGPDFTagTypeBlockQuote@105$CGPDFTagTypeCaption@106$CGPDFTagTypeCode@505$CGPDFTagTypeDiv@104$CGPDFTagTypeDocument@100$CGPDFTagTypeFigure@700$CGPDFTagTypeForm@702$CGPDFTagTypeFormula@701$CGPDFTagTypeHeader@201$CGPDFTagTypeHeader1@202$CGPDFTagTypeHeader2@203$CGPDFTagTypeHeader3@204$CGPDFTagTypeHeader4@205$CGPDFTagTypeHeader5@206$CGPDFTagTypeHeader6@207$CGPDFTagTypeIndex@109$CGPDFTagTypeLabel@302$CGPDFTagTypeLink@506$CGPDFTagTypeList@300$CGPDFTagTypeListBody@303$CGPDFTagTypeListItem@301$CGPDFTagTypeNonStructure@110$CGPDFTagTypeNote@502$CGPDFTagTypeParagraph@200$CGPDFTagTypePart@101$CGPDFTagTypePrivate@111$CGPDFTagTypeQuote@501$CGPDFTagTypeReference@503$CGPDFTagTypeRuby@600$CGPDFTagTypeRubyAnnotationText@602$CGPDFTagTypeRubyBaseText@601$CGPDFTagTypeRubyPunctuation@603$CGPDFTagTypeSection@103$CGPDFTagTypeSpan@500$CGPDFTagTypeTOC@107$CGPDFTagTypeTOCI@108$CGPDFTagTypeTable@400$CGPDFTagTypeTableBody@405$CGPDFTagTypeTableDataCell@403$CGPDFTagTypeTableFooter@406$CGPDFTagTypeTableHeader@404$CGPDFTagTypeTableHeaderCell@402$CGPDFTagTypeTableRow@401$CGPDFTagTypeWarichu@604$CGPDFTagTypeWarichuPunctiation@606$CGPDFTagTypeWarichuText@605$CGRectMaxXEdge@2$CGRectMaxYEdge@3$CGRectMinXEdge@0$CGRectMinYEdge@1$CGVECTOR_DEFINED@1$kCGAnnotatedSessionEventTap@2$kCGAssistiveTechHighWindowLevel@1500$kCGAssistiveTechHighWindowLevelKey@20$kCGBackingStoreBuffered@2$kCGBackingStoreNonretained@1$kCGBackingStoreRetained@0$kCGBackstopMenuLevel@-20$kCGBackstopMenuLevelKey@3$kCGBaseWindowLevelKey@0$kCGBitmapAlphaInfoMask@31$kCGBitmapByteOrder16Big@12288$kCGBitmapByteOrder16Little@4096$kCGBitmapByteOrder32Big@16384$kCGBitmapByteOrder32Little@8192$kCGBitmapByteOrderDefault@0$kCGBitmapByteOrderMask@28672$kCGBitmapFloatComponents@256$kCGBitmapFloatInfoMask@3840$kCGBlendModeClear@16$kCGBlendModeColor@14$kCGBlendModeColorBurn@7$kCGBlendModeColorDodge@6$kCGBlendModeCopy@17$kCGBlendModeDarken@4$kCGBlendModeDestinationAtop@24$kCGBlendModeDestinationIn@22$kCGBlendModeDestinationOut@23$kCGBlendModeDestinationOver@21$kCGBlendModeDifference@10$kCGBlendModeExclusion@11$kCGBlendModeHardLight@9$kCGBlendModeHue@12$kCGBlendModeLighten@5$kCGBlendModeLuminosity@15$kCGBlendModeMultiply@1$kCGBlendModeNormal@0$kCGBlendModeOverlay@3$kCGBlendModePlusDarker@26$kCGBlendModePlusLighter@27$kCGBlendModeSaturation@13$kCGBlendModeScreen@2$kCGBlendModeSoftLight@8$kCGBlendModeSourceAtop@20$kCGBlendModeSourceIn@18$kCGBlendModeSourceOut@19$kCGBlendModeXOR@25$kCGCaptureNoFill@1$kCGCaptureNoOptions@0$kCGColorConversionTransformApplySpace@2$kCGColorConversionTransformFromSpace@0$kCGColorConversionTransformToSpace@1$kCGColorConverterTransformApplySpace@2$kCGColorConverterTransformFromSpace@0$kCGColorConverterTransformToSpace@1$kCGColorSpaceModelCMYK@2$kCGColorSpaceModelDeviceN@4$kCGColorSpaceModelIndexed@5$kCGColorSpaceModelLab@3$kCGColorSpaceModelMonochrome@0$kCGColorSpaceModelPattern@6$kCGColorSpaceModelRGB@1$kCGColorSpaceModelUnknown@-1$kCGColorSpaceModelXYZ@7$kCGConfigureForAppOnly@0$kCGConfigureForSession@1$kCGConfigurePermanently@2$kCGCursorWindowLevelKey@19$kCGDesktopIconWindowLevelKey@18$kCGDesktopWindowLevelKey@2$kCGDisplayAddFlag@16$kCGDisplayBeginConfigurationFlag@1$kCGDisplayDesktopShapeChangedFlag@4096$kCGDisplayDisabledFlag@512$kCGDisplayEnabledFlag@256$kCGDisplayFadeReservationInvalidToken@0$kCGDisplayMirrorFlag@1024$kCGDisplayMovedFlag@2$kCGDisplayRemoveFlag@32$kCGDisplaySetMainFlag@4$kCGDisplaySetModeFlag@8$kCGDisplayStreamFrameStatusFrameBlank@2$kCGDisplayStreamFrameStatusFrameComplete@0$kCGDisplayStreamFrameStatusFrameIdle@1$kCGDisplayStreamFrameStatusStopped@3$kCGDisplayStreamUpdateDirtyRects@2$kCGDisplayStreamUpdateMovedRects@1$kCGDisplayStreamUpdateReducedDirtyRects@3$kCGDisplayStreamUpdateRefreshedRects@0$kCGDisplayUnMirrorFlag@2048$kCGDockWindowLevel@20$kCGDockWindowLevelKey@7$kCGDraggingWindowLevel@500$kCGDraggingWindowLevelKey@12$kCGEncodingFontSpecific@0$kCGEncodingMacRoman@1$kCGErrorApplicationAlreadyRunning@1025$kCGErrorApplicationCanOnlyBeRunInOneSessionAtATime@1026$kCGErrorApplicationIncorrectExecutableFormatFound@1023$kCGErrorApplicationIsLaunching@1024$kCGErrorApplicationNotPermittedToExecute@1016$kCGErrorApplicationRequiresNewerSystem@1015$kCGErrorCannotComplete@1004$kCGErrorClassicApplicationsMustBeLaunchedByClassic@1027$kCGErrorFailure@1000$kCGErrorFirst@1000$kCGErrorForkFailed@1028$kCGErrorIllegalArgument@1001$kCGErrorInvalidConnection@1002$kCGErrorInvalidContext@1003$kCGErrorInvalidOperation@1010$kCGErrorLast@1029$kCGErrorNameTooLong@1005$kCGErrorNoCurrentPoint@1009$kCGErrorNoneAvailable@1011$kCGErrorNotImplemented@1006$kCGErrorRangeCheck@1007$kCGErrorRetryRegistration@1029$kCGErrorSuccess@0$kCGErrorTypeCheck@1008$kCGEventFilterMaskPermitLocalKeyboardEvents@2$kCGEventFilterMaskPermitLocalMouseEvents@1$kCGEventFilterMaskPermitSystemDefinedEvents@4$kCGEventFlagMaskAlphaShift@65536$kCGEventFlagMaskAlternate@524288$kCGEventFlagMaskCommand@1048576$kCGEventFlagMaskControl@262144$kCGEventFlagMaskHelp@4194304$kCGEventFlagMaskNonCoalesced@256$kCGEventFlagMaskNumericPad@2097152$kCGEventFlagMaskSecondaryFn@8388608$kCGEventFlagMaskShift@131072$kCGEventFlagsChanged@12$kCGEventKeyDown@10$kCGEventKeyUp@11$kCGEventLeftMouseDown@1$kCGEventLeftMouseDragged@6$kCGEventLeftMouseUp@2$kCGEventMouseMoved@5$kCGEventMouseSubtypeDefault@0$kCGEventMouseSubtypeTabletPoint@1$kCGEventMouseSubtypeTabletProximity@2$kCGEventNull@0$kCGEventOtherMouseDown@25$kCGEventOtherMouseDragged@27$kCGEventOtherMouseUp@26$kCGEventRightMouseDown@3$kCGEventRightMouseDragged@7$kCGEventRightMouseUp@4$kCGEventScrollWheel@22$kCGEventSourceGroupID@44$kCGEventSourceStateCombinedSessionState@0$kCGEventSourceStateHIDSystemState@1$kCGEventSourceStateID@45$kCGEventSourceStatePrivate@-1$kCGEventSourceUnixProcessID@41$kCGEventSourceUserData@42$kCGEventSourceUserID@43$kCGEventSuppressionStateRemoteMouseDrag@1$kCGEventSuppressionStateSuppressionInterval@0$kCGEventTabletPointer@23$kCGEventTabletProximity@24$kCGEventTapDisabledByTimeout@4294967294$kCGEventTapDisabledByUserInput@4294967295$kCGEventTapOptionDefault@0$kCGEventTapOptionListenOnly@1$kCGEventTargetProcessSerialNumber@39$kCGEventTargetUnixProcessID@40$kCGEventUnacceleratedPointerMovementX@170$kCGEventUnacceleratedPointerMovementY@171$kCGFloatingWindowLevel@3$kCGFloatingWindowLevelKey@5$kCGFontIndexInvalid@65535$kCGFontIndexMax@65534$kCGFontPostScriptFormatType1@1$kCGFontPostScriptFormatType3@3$kCGFontPostScriptFormatType42@42$kCGGesturePhaseBegan@1$kCGGesturePhaseCancelled@8$kCGGesturePhaseChanged@2$kCGGesturePhaseEnded@4$kCGGesturePhaseMayBegin@128$kCGGesturePhaseNone@0$kCGGlyphMax@65534$kCGGradientDrawsAfterEndLocation@2$kCGGradientDrawsBeforeStartLocation@1$kCGHIDEventTap@0$kCGHeadInsertEventTap@0$kCGHelpWindowLevel@200$kCGHelpWindowLevelKey@16$kCGImageAlphaFirst@4$kCGImageAlphaLast@3$kCGImageAlphaNone@0$kCGImageAlphaNoneSkipFirst@6$kCGImageAlphaNoneSkipLast@5$kCGImageAlphaOnly@7$kCGImageAlphaPremultipliedFirst@2$kCGImageAlphaPremultipliedLast@1$kCGImageByteOrder16Big@12288$kCGImageByteOrder16Little@4096$kCGImageByteOrder32Big@16384$kCGImageByteOrder32Little@8192$kCGImageByteOrderDefault@0$kCGImageByteOrderMask@28672$kCGImagePixelFormatMask@983040$kCGImagePixelFormatPacked@0$kCGImagePixelFormatRGB101010@196608$kCGImagePixelFormatRGB555@65536$kCGImagePixelFormatRGB565@131072$kCGImagePixelFormatRGBCIF10@262144$kCGInterpolationDefault@0$kCGInterpolationHigh@3$kCGInterpolationLow@2$kCGInterpolationMedium@4$kCGInterpolationNone@1$kCGKeyboardEventAutorepeat@8$kCGKeyboardEventKeyboardType@10$kCGKeyboardEventKeycode@9$kCGLineCapButt@0$kCGLineCapRound@1$kCGLineCapSquare@2$kCGLineJoinBevel@2$kCGLineJoinMiter@0$kCGLineJoinRound@1$kCGMainMenuWindowLevel@24$kCGMainMenuWindowLevelKey@8$kCGMaximumWindowLevelKey@14$kCGMinimumWindowLevelKey@1$kCGModalPanelWindowLevel@8$kCGModalPanelWindowLevelKey@10$kCGMomentumScrollPhaseBegin@1$kCGMomentumScrollPhaseContinue@2$kCGMomentumScrollPhaseEnd@3$kCGMomentumScrollPhaseNone@0$kCGMouseButtonCenter@2$kCGMouseButtonLeft@0$kCGMouseButtonRight@1$kCGMouseEventButtonNumber@3$kCGMouseEventClickState@1$kCGMouseEventDeltaX@4$kCGMouseEventDeltaY@5$kCGMouseEventInstantMouser@6$kCGMouseEventNumber@0$kCGMouseEventPressure@2$kCGMouseEventSubtype@7$kCGMouseEventWindowUnderMousePointer@91$kCGMouseEventWindowUnderMousePointerThatCanHandleThisEvent@92$kCGNormalWindowLevel@0$kCGNormalWindowLevelKey@4$kCGNullDirectDisplay@0$kCGNullWindowID@0$kCGNumReservedBaseWindowLevels@5$kCGNumReservedWindowLevels@16$kCGNumberOfEventSuppressionStates@2$kCGNumberOfWindowLevelKeys@21$kCGOverlayWindowLevel@102$kCGOverlayWindowLevelKey@15$kCGPDFAllowsCommenting@64$kCGPDFAllowsContentAccessibility@32$kCGPDFAllowsContentCopying@16$kCGPDFAllowsDocumentAssembly@8$kCGPDFAllowsDocumentChanges@4$kCGPDFAllowsFormFieldEntry@128$kCGPDFAllowsHighQualityPrinting@2$kCGPDFAllowsLowQualityPrinting@1$kCGPDFArtBox@4$kCGPDFBleedBox@2$kCGPDFCropBox@1$kCGPDFMediaBox@0$kCGPDFObjectTypeArray@7$kCGPDFObjectTypeBoolean@2$kCGPDFObjectTypeDictionary@8$kCGPDFObjectTypeInteger@3$kCGPDFObjectTypeName@5$kCGPDFObjectTypeNull@1$kCGPDFObjectTypeReal@4$kCGPDFObjectTypeStream@9$kCGPDFObjectTypeString@6$kCGPDFTrimBox@3$kCGPathEOFill@1$kCGPathEOFillStroke@4$kCGPathElementAddCurveToPoint@3$kCGPathElementAddLineToPoint@1$kCGPathElementAddQuadCurveToPoint@2$kCGPathElementCloseSubpath@4$kCGPathElementMoveToPoint@0$kCGPathFill@0$kCGPathFillStroke@3$kCGPathStroke@2$kCGPatternTilingConstantSpacing@2$kCGPatternTilingConstantSpacingMinimalDistortion@1$kCGPatternTilingNoDistortion@0$kCGPopUpMenuWindowLevel@101$kCGPopUpMenuWindowLevelKey@11$kCGRenderingIntentAbsoluteColorimetric@1$kCGRenderingIntentDefault@0$kCGRenderingIntentPerceptual@3$kCGRenderingIntentRelativeColorimetric@2$kCGRenderingIntentSaturation@4$kCGScreenSaverWindowLevel@1000$kCGScreenSaverWindowLevelKey@13$kCGScreenUpdateOperationMove@1$kCGScreenUpdateOperationReducedDirtyRectangleCount@2147483648$kCGScreenUpdateOperationRefresh@0$kCGScrollEventUnitLine@1$kCGScrollEventUnitPixel@0$kCGScrollPhaseBegan@1$kCGScrollPhaseCancelled@8$kCGScrollPhaseChanged@2$kCGScrollPhaseEnded@4$kCGScrollPhaseMayBegin@128$kCGScrollWheelEventDeltaAxis1@11$kCGScrollWheelEventDeltaAxis2@12$kCGScrollWheelEventDeltaAxis3@13$kCGScrollWheelEventFixedPtDeltaAxis1@93$kCGScrollWheelEventFixedPtDeltaAxis2@94$kCGScrollWheelEventFixedPtDeltaAxis3@95$kCGScrollWheelEventInstantMouser@14$kCGScrollWheelEventIsContinuous@88$kCGScrollWheelEventMomentumPhase@123$kCGScrollWheelEventPointDeltaAxis1@96$kCGScrollWheelEventPointDeltaAxis2@97$kCGScrollWheelEventPointDeltaAxis3@98$kCGScrollWheelEventScrollCount@100$kCGScrollWheelEventScrollPhase@99$kCGSessionEventTap@1$kCGStatusWindowLevel@25$kCGStatusWindowLevelKey@9$kCGTabletEventDeviceID@24$kCGTabletEventPointButtons@18$kCGTabletEventPointPressure@19$kCGTabletEventPointX@15$kCGTabletEventPointY@16$kCGTabletEventPointZ@17$kCGTabletEventRotation@22$kCGTabletEventTangentialPressure@23$kCGTabletEventTiltX@20$kCGTabletEventTiltY@21$kCGTabletEventVendor1@25$kCGTabletEventVendor2@26$kCGTabletEventVendor3@27$kCGTabletProximityEventCapabilityMask@36$kCGTabletProximityEventDeviceID@31$kCGTabletProximityEventEnterProximity@38$kCGTabletProximityEventPointerID@30$kCGTabletProximityEventPointerType@37$kCGTabletProximityEventSystemTabletID@32$kCGTabletProximityEventTabletID@29$kCGTabletProximityEventVendorID@28$kCGTabletProximityEventVendorPointerSerialNumber@34$kCGTabletProximityEventVendorPointerType@33$kCGTabletProximityEventVendorUniqueID@35$kCGTailAppendEventTap@1$kCGTextClip@7$kCGTextFill@0$kCGTextFillClip@4$kCGTextFillStroke@2$kCGTextFillStrokeClip@6$kCGTextInvisible@3$kCGTextStroke@1$kCGTextStrokeClip@5$kCGTornOffMenuWindowLevel@3$kCGTornOffMenuWindowLevelKey@6$kCGUtilityWindowLevel@19$kCGUtilityWindowLevelKey@17$kCGWindowImageBestResolution@8$kCGWindowImageBoundsIgnoreFraming@1$kCGWindowImageDefault@0$kCGWindowImageNominalResolution@16$kCGWindowImageOnlyShadows@4$kCGWindowImageShouldBeOpaque@2$kCGWindowListExcludeDesktopElements@16$kCGWindowListOptionAll@0$kCGWindowListOptionIncludingWindow@8$kCGWindowListOptionOnScreenAboveWindow@2$kCGWindowListOptionOnScreenBelowWindow@4$kCGWindowListOptionOnScreenOnly@1$kCGWindowSharingNone@0$kCGWindowSharingReadOnly@1$kCGWindowSharingReadWrite@2$"""
misc.update(
    {
        "CGFLOAT_IS_DOUBLE": sel32or64(0, 1),
        "kCGEventMaskForAllEvents": sel32or64(4294967295, 18446744073709551615),
    }
)
misc.update(
    {
        "kCGDisplayModeIsTelevisionOutput": "kCGDisplayModeIsTelevisionOutput",
        "kCGSessionUserNameKey": "kCGSSessionUserNameKey",
        "kCGSessionOnConsoleKey": "kCGSSessionOnConsoleKey",
        "kCGDisplayIOFlags": "IOFlags",
        "kCGDisplayModeIsStretched": "kCGDisplayModeIsStretched",
        "kCGNotifyGUIConsoleSessionChanged": b"com.apple.coregraphics.GUIConsoleSessionChanged",
        "kCGSessionUserIDKey": "kCGSSessionUserIDKey",
        "kCGDisplayModeIsInterlaced": "kCGDisplayModeIsInterlaced",
        "kCGDisplayBlendSolidColor": 1.0,
        "kCGDisplayHeight": "Height",
        "kCGDisplayBitsPerSample": "BitsPerSample",
        "kCGDisplayBlendNormal": 0.0,
        "kCGMouseDownEventMaskingDeadSwitchTimeout": 60.0,
        "kCGMaxDisplayReservationInterval": 15.0,
        "kCGDisplayWidth": "Width",
        "kCGDisplaySamplesPerPixel": "SamplesPerPixel",
        "kCGNotifyEventTapRemoved": b"com.apple.coregraphics.eventTapRemoved",
        "kCGSessionConsoleSetKey": "kCGSSessionConsoleSetKey",
        "kCGDisplayRefreshRate": "RefreshRate",
        "kCGDisplayBytesPerRow": "kCGDisplayBytesPerRow",
        "kCGDisplayBitsPerPixel": "BitsPerPixel",
        "kCGDisplayModeUsableForDesktopGUI": "UsableForDesktopGUI",
        "kCGSessionLoginDoneKey": "kCGSessionLoginDoneKey",
        "kCGIODisplayModeID": "IODisplayModeID",
        "kCGDisplayMode": "Mode",
        "kCGNotifyEventTapAdded": b"com.apple.coregraphics.eventTapAdded",
        "kCGDisplayModeIsSafeForHardware": "kCGDisplayModeIsSafeForHardware",
        "kCGNotifyGUISessionUserChanged": b"com.apple.coregraphics.GUISessionUserChanged",
    }
)
functions = {
    "CGPDFDocumentGetVersion": (
        b"v^{CGPDFDocument=}^i^i",
        "",
        {"arguments": {1: {"type_modifier": "o"}, 2: {"type_modifier": "o"}}},
    ),
    "CGContextAddArcToPoint": (
        sel32or64(b"v^{CGContext=}fffff", b"v^{CGContext=}ddddd"),
    ),
    "CGRectIntersection": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGDataConsumerRetain": (b"^{CGDataConsumer=}^{CGDataConsumer=}",),
    "CGColorSpaceCreateDeviceCMYK": (
        b"^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGGradientGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGColorConversionInfoCreate": (
        b"^{CGColorConversionInfo=}^{CGColorSpace=}^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFPageGetDrawingTransform": (
        sel32or64(
            b"{CGAffineTransform=ffffff}^{CGPDFPage=}I{CGRect={CGPoint=ff}{CGSize=ff}}iB",
            b"{CGAffineTransform=dddddd}^{CGPDFPage=}i{CGRect={CGPoint=dd}{CGSize=dd}}iB",
        ),
    ),
    "CGFontCanCreatePostScriptSubset": (
        sel32or64(b"B^{CGFont=}I", b"B^{CGFont=}i"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetStrokeColorSpace": (b"v^{CGContext=}^{CGColorSpace=}",),
    "CGContextPathContainsPoint": (
        sel32or64(b"B^{CGContext=}{CGPoint=ff}I", b"B^{CGContext=}{CGPoint=dd}i"),
    ),
    "CGAffineTransformRotate": (
        sel32or64(
            b"{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}f",
            b"{CGAffineTransform=dddddd}{CGAffineTransform=dddddd}d",
        ),
    ),
    "CGContextRelease": (b"v^{CGContext=}",),
    "CGPDFArrayGetStream": (
        sel32or64(
            b"B^{CGPDFArray=}L^^{CGPDFStream=}", b"B^{CGPDFArray=}Q^^{CGPDFStream=}"
        ),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGEventKeyboardSetUnicodeString": (
        sel32or64(b"v^{__CGEvent=}L^T", b"v^{__CGEvent=}Q^T"),
        "",
        {"arguments": {2: {"c_array_length_in_arg": 1, "type_modifier": "n"}}},
    ),
    "CGDisplayModeGetRefreshRate": (b"d^{CGDisplayMode=}",),
    "CGShieldingWindowID": (b"II",),
    "CGAffineTransformMake": (
        sel32or64(
            b"{CGAffineTransform=ffffff}ffffff", b"{CGAffineTransform=dddddd}dddddd"
        ),
    ),
    "CGWindowListCreateDescriptionFromArray": (
        b"^{__CFArray=}^{__CFArray=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextAddLines": (
        sel32or64(b"v^{CGContext=}^{CGPoint=ff}L", b"v^{CGContext=}^{CGPoint=dd}Q"),
        "",
        {"arguments": {1: {"c_array_length_in_arg": 2, "type_modifier": "n"}}},
    ),
    "CGContextSetTextPosition": (sel32or64(b"v^{CGContext=}ff", b"v^{CGContext=}dd"),),
    "CGColorCreateSRGB": (
        b"^{CGColor=}dddd",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextGetTextPosition": (
        sel32or64(b"{CGPoint=ff}^{CGContext=}", b"{CGPoint=dd}^{CGContext=}"),
    ),
    "CGPDFPageGetRotationAngle": (b"i^{CGPDFPage=}",),
    "CGContextGetPathBoundingBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGContext=}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGContext=}",
        ),
    ),
    "CGRectContainsPoint": (
        sel32or64(
            b"B{CGRect={CGPoint=ff}{CGSize=ff}}{CGPoint=ff}",
            b"B{CGRect={CGPoint=dd}{CGSize=dd}}{CGPoint=dd}",
        ),
    ),
    "CGPDFDictionaryGetCount": (
        sel32or64(b"L^{CGPDFDictionary=}", b"Q^{CGPDFDictionary=}"),
    ),
    "CGRectMake": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}ffff",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}dddd",
        ),
    ),
    "CGColorSpaceRetain": (b"^{CGColorSpace=}^{CGColorSpace=}",),
    "CGPathCreateCopyByStrokingPath": (
        sel32or64(
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=ffffff}fIIf",
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=dddddd}diid",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "n"}},
        },
    ),
    "CGContextAddEllipseInRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGContextEndTransparencyLayer": (b"v^{CGContext=}",),
    "CGContextSelectFont": (
        sel32or64(b"v^{CGContext=}^cfI", b"v^{CGContext=}^cdi"),
        "",
        {"arguments": {1: {"c_array_delimited_by_null": True, "type_modifier": "n"}}},
    ),
    "CGLayerGetSize": (
        sel32or64(b"{CGSize=ff}^{CGLayer=}", b"{CGSize=dd}^{CGLayer=}"),
    ),
    "CGWindowListCreate": (
        b"^{__CFArray=}II",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGSizeEqualToSize": (
        sel32or64(b"B{CGSize=ff}{CGSize=ff}", b"B{CGSize=dd}{CGSize=dd}"),
    ),
    "CGColorConverterCreateSimple": (
        b"^{CGColorConversionInfo=}^{CGColorSpace=}^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFStringCopyTextString": (
        b"^{__CFString=}^{CGPDFString=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGColorSpaceGetBaseColorSpace": (b"^{CGColorSpace=}^{CGColorSpace=}",),
    "CGPathCreateMutable": (
        b"^{CGPath=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPatternCreate": (
        sel32or64(
            b"^{CGPattern=}^v{CGRect={CGPoint=ff}{CGSize=ff}}{CGAffineTransform=ffffff}ffIB^{CGPatternCallbacks=I^?^?}",
            b"^{CGPattern=}^v{CGRect={CGPoint=dd}{CGSize=dd}}{CGAffineTransform=dddddd}ddiB^{CGPatternCallbacks=I^?^?}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGBitmapContextGetHeight": (sel32or64(b"L^{CGContext=}", b"Q^{CGContext=}"),),
    "CGPDFPageGetBoxRect": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPDFPage=}I",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPDFPage=}i",
        ),
    ),
    "CGPDFStringCopyDate": (
        b"^{__CFDate=}^{CGPDFString=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayStreamUpdateGetDropCount": (
        sel32or64(b"L^{CGDisplayStreamUpdate=}", b"Q^{CGDisplayStreamUpdate=}"),
    ),
    "CGDisplayBestModeForParametersAndRefreshRate": (
        sel32or64(b"^{__CFDictionary=}ILLLd^i", b"^{__CFDictionary=}IQQQd^I"),
        "",
        {"arguments": {5: {"type_modifier": "o"}}},
    ),
    "CGPDFScannerPopString": (
        b"B^{CGPDFScanner=}^^{CGPDFString=}",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGPDFPageGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGContextAddRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGDataProviderCreateWithURL": (
        b"^{CGDataProvider=}^{__CFURL=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFScannerCreate": (
        b"^{CGPDFScanner=}^{CGPDFContentStream=}^{CGPDFOperatorTable=}^v",
        "",
        {"retval": {"already_cfretained": False}},
    ),
    "CGConfigureDisplayFadeEffect": (b"i^{_CGDisplayConfigRef=}fffff",),
    "CGDisplayFade": (sel32or64(b"iIffffffi", b"iIffffffI"),),
    "CGPDFArrayGetObject": (
        sel32or64(
            b"B^{CGPDFArray=}L^{CGPDFObject=}", b"B^{CGPDFArray=}Q^{CGPDFObject=}"
        ),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGEventSetType": (b"v^{__CGEvent=}I",),
    "CGDataProviderCreateWithFilename": (
        b"^{CGDataProvider=}^c",
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {0: {"c_array_delimited_by_null": True, "type_modifier": "n"}},
        },
    ),
    "CGColorGetComponents": (
        sel32or64(b"^f^{CGColor=}", b"^d^{CGColor=}"),
        "",
        {"retval": {"c_array_of_variable_length": True}},
    ),
    "CGPDFContextSetOutline": (b"v^{CGContext=}^{__CFDictionary=}",),
    "CGAffineTransformMakeTranslation": (
        sel32or64(b"{CGAffineTransform=ffffff}ff", b"{CGAffineTransform=dddddd}dd"),
    ),
    "CGSizeMake": (sel32or64(b"{CGSize=ff}ff", b"{CGSize=dd}dd"),),
    "CGDisplayVendorNumber": (b"II",),
    "CGPDFContextBeginTag": (b"v^{CGContext=}i^{__CFDictionary=}",),
    "CGPDFDocumentGetID": (b"^{CGPDFArray=}^{CGPDFDocument=}",),
    "CGDataProviderCreateWithData": (
        sel32or64(b"^{CGDataProvider=}^v^vL^?", b"^{CGDataProvider=}^v^vQ^?"),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"^v"},
                            2: {"type": b"Q"},
                        },
                    }
                }
            },
        },
    ),
    "CGColorSpaceCreatePattern": (
        b"^{CGColorSpace=}^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSynchronize": (b"v^{CGContext=}",),
    "CGDisplayModeGetIODisplayModeID": (b"i^{CGDisplayMode=}",),
    "CGFontGetGlyphBBoxes": (
        sel32or64(
            b"B^{CGFont=}^SL^{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"B^{CGFont=}^SQ^{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {
            "arguments": {
                1: {"c_array_length_in_arg": 2, "type_modifier": "n"},
                3: {"c_array_length_in_arg": 2, "type_modifier": "o"},
            }
        },
    ),
    "CGPaletteCreateWithByteSamples": (
        b"^{_CGDirectPaletteRef=}^{CGDeviceByteColor=CCC}I",
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {0: {"c_array_length_in_arg": 1, "type_modifier": "n"}},
        },
    ),
    "CGPDFContentStreamGetResource": (
        b"^{CGPDFObject=}^{CGPDFContentStream=}^c^c",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"c_array_delimited_by_null": True, "type_modifier": "n"},
            }
        },
    ),
    "CGAffineTransformMakeRotation": (
        sel32or64(b"{CGAffineTransform=ffffff}f", b"{CGAffineTransform=dddddd}d"),
    ),
    "CGGradientRetain": (b"^{CGGradient=}^{CGGradient=}",),
    "CGPaletteCreateWithDisplay": (
        b"^{_CGDirectPaletteRef=}I",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayCreateImageForRect": (
        sel32or64(
            b"^{CGImage=}I{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"^{CGImage=}I{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGImageGetWidth": (sel32or64(b"L^{CGImage=}", b"Q^{CGImage=}"),),
    "CGPDFDocumentIsUnlocked": (b"B^{CGPDFDocument=}",),
    "CGPathCreateWithRect": (
        sel32or64(
            b"^{CGPath=}{CGRect={CGPoint=ff}{CGSize=ff}}^{CGAffineTransform=ffffff}",
            b"^{CGPath=}{CGRect={CGPoint=dd}{CGSize=dd}}^{CGAffineTransform=dddddd}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "n"}},
        },
    ),
    "CGImageGetBitmapInfo": (b"I^{CGImage=}",),
    "CGEventSourceSetKeyboardType": (b"v^{__CGEventSource=}I",),
    "CGDataProviderGetInfo": (b"^v^{CGDataProvider=}",),
    "CGContextSetAllowsFontSmoothing": (b"v^{CGContext=}B",),
    "CGDisplayUsesOpenGLAcceleration": (sel32or64(b"iI", b"II"),),
    "CGPointMakeWithDictionaryRepresentation": (
        sel32or64(
            b"B^{__CFDictionary=}^{CGPoint=ff}", b"B^{__CFDictionary=}^{CGPoint=dd}"
        ),
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGContextResetClip": (b"v^{CGContext=}",),
    "CGPDFDictionaryApplyFunction": (
        b"v^{CGPDFDictionary=}^?^v",
        "",
        {
            "arguments": {
                1: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {
                                "type": b"^t",
                                "c_array_delimeted_by_null": True,
                                "type_modifier": "n",
                            },
                            1: {"type": b"^{CGPDFObject=}"},
                            2: {"type": b"^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGWindowServerCreateServerPort": (
        b"^{__CFMachPort=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPathAddEllipseInRect": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGColorSpaceGetColorTableCount": (
        sel32or64(b"L^{CGColorSpace=}", b"Q^{CGColorSpace=}"),
    ),
    "CGWindowListCreateImage": (
        sel32or64(
            b"^{CGImage=}{CGRect={CGPoint=ff}{CGSize=ff}}III",
            b"^{CGImage=}{CGRect={CGPoint=dd}{CGSize=dd}}III",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextClearRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGPDFDocumentGetAccessPermissions": (b"I^{CGPDFDocument=}",),
    "CGBitmapContextGetBitmapInfo": (b"I^{CGContext=}",),
    "CGPathAddQuadCurveToPoint": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}ffff",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}dddd",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGColorSpaceCreateDeviceGray": (
        b"^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectIntersectsRect": (
        sel32or64(
            b"B{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"B{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGPDFPageGetDocument": (b"^{CGPDFDocument=}^{CGPDFPage=}",),
    "CGRestorePermanentDisplayConfiguration": (b"v",),
    "CGImageGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGFontCreatePostScriptEncoding": (
        b"^{__CFData=}^{CGFont=}[256S]",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGFontGetStemV": (sel32or64(b"f^{CGFont=}", b"d^{CGFont=}"),),
    "CGPointApplyAffineTransform": (
        sel32or64(
            b"{CGPoint=ff}{CGPoint=ff}{CGAffineTransform=ffffff}",
            b"{CGPoint=dd}{CGPoint=dd}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGEventSourceGetSourceStateID": (
        sel32or64(b"I^{__CGEventSource=}", b"i^{__CGEventSource=}"),
    ),
    "CGRectStandardize": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGPathAddLineToPoint": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}ff",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}dd",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGDataProviderCopyData": (
        b"^{__CFData=}^{CGDataProvider=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGColorCreateGenericGray": (
        sel32or64(b"^{CGColor=}ff", b"^{CGColor=}dd"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGColorSpaceIsWideGamutRGB": (b"B^{CGColorSpace=}",),
    "CGPSConverterGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGColorRetain": (b"^{CGColor=}^{CGColor=}",),
    "CGColorCreateGenericCMYK": (
        sel32or64(b"^{CGColor=}fffff", b"^{CGColor=}ddddd"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGGLContextCreate": (
        sel32or64(
            b"^{CGContext=}^v{CGSize=ff}^{CGColorSpace=}",
            b"^{CGContext=}^v{CGSize=dd}^{CGColorSpace=}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGBeginDisplayConfiguration": (
        b"i^^{_CGDisplayConfigRef=}",
        "",
        {"arguments": {0: {"type_modifier": "o"}}},
    ),
    "CGDisplayStreamGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGBitmapContextGetBitsPerPixel": (
        sel32or64(b"L^{CGContext=}", b"Q^{CGContext=}"),
    ),
    "CGPDFDictionaryGetArray": (
        b"B^{CGPDFDictionary=}^c^^{CGPDFArray=}",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGColorSpaceCreateWithPlatformColorSpace": (
        b"^{CGColorSpace=}^v",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetCMYKStrokeColor": (
        sel32or64(b"v^{CGContext=}fffff", b"v^{CGContext=}ddddd"),
    ),
    "CGDisplayStreamGetRunLoopSource": (b"^{__CFRunLoopSource=}^{CGDisplayStream=}",),
    "CGContextEndPage": (b"v^{CGContext=}",),
    "CGUnregisterScreenRefreshCallback": (
        b"v^?^v",
        "",
        {
            "arguments": {
                0: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"I"},
                            1: {"type": b"^{CGRect={CGPoint=dd}{CGSize=dd}}"},
                            2: {"type": b"^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGPathAddRect": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGPDFContentStreamRelease": (b"v^{CGPDFContentStream=}",),
    "CGPathApplyWithBlock": (
        b"v^{CGPath=}@?",
        "",
        {
            "arguments": {
                1: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"typestr": "^v"},
                            1: {"typestr": "^{CGPathElement=}"},
                        },
                    }
                }
            }
        },
    ),
    "CGContextGetCTM": (
        sel32or64(
            b"{CGAffineTransform=ffffff}^{CGContext=}",
            b"{CGAffineTransform=dddddd}^{CGContext=}",
        ),
    ),
    "CGDisplayStreamUpdateGetRects": (
        sel32or64(
            b"^{CGRect={CGPoint=ff}{CGSize=ff}}^{CGDisplayStreamUpdate=}i^L",
            b"^{CGRect={CGPoint=dd}{CGSize=dd}}^{CGDisplayStreamUpdate=}i^Q",
        ),
        "",
        {
            "retval": {"c_array_length_in_arg": 2},
            "arguments": {2: {"type_modifier": "o"}},
        },
    ),
    "CGPDFArrayGetName": (
        sel32or64(b"B^{CGPDFArray=}L^^c", b"B^{CGPDFArray=}Q^^c"),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGEventSourceGetPixelsPerLine": (b"d^{__CGEventSource=}",),
    "CGDisplayStreamUpdateGetMovedRectsDelta": (
        sel32or64(b"v^{CGDisplayStreamUpdate=}^f^f", b"v^{CGDisplayStreamUpdate=}^d^d"),
        "",
        {"arguments": {1: {"type_modifier": "o"}, 2: {"type_modifier": "o"}}},
    ),
    "CGRectGetHeight": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGEventSourceGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGPDFDictionaryGetStream": (
        b"B^{CGPDFDictionary=}^t^^{CGPDFStream=}",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGDataProviderCreateWithCFData": (
        b"^{CGDataProvider=}^{__CFData=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGShieldingWindowLevel": (b"i",),
    "CGDisplaySetPalette": (b"iI^{_CGDirectPaletteRef=}",),
    "CGDisplayIsOnline": (sel32or64(b"iI", b"II"),),
    "CGDisplayStreamCreate": (
        sel32or64(
            b"^{CGDisplayStream=}ILLi^{__CFDictionary=}@?",
            b"^{CGDisplayStream=}IQQi^{__CFDictionary=}@?",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                5: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": "^v"},
                            1: {"type": "I"},
                            2: {"type": "Q"},
                            3: {"type": "@"},
                            4: {"type": "@"},
                        },
                    }
                }
            },
        },
    ),
    "CGFontGetCapHeight": (b"i^{CGFont=}",),
    "CGContextShowGlyphsWithAdvances": (
        sel32or64(b"v^{CGContext=}^S^{CGSize=ff}L", b"v^{CGContext=}^S^{CGSize=dd}Q"),
        "",
        {
            "arguments": {
                1: {"c_array_length_in_arg": 3, "type_modifier": "n"},
                2: {"c_array_length_in_arg": 3, "type_modifier": "n"},
            }
        },
    ),
    "CGDataConsumerCreate": (
        b"^{CGDataConsumer=}^v^{CGDataConsumerCallbacks=^?^?}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFArrayGetInteger": (
        sel32or64(b"B^{CGPDFArray=}L^l", b"B^{CGPDFArray=}Q^q"),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGPostScrollWheelEvent": (
        b"iIi",
        "",
        {"c_array_length_in_arg": 0, "variadic": True},
    ),
    "CGColorCreateCopy": (
        b"^{CGColor=}^{CGColor=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGBitmapContextCreate": (
        sel32or64(
            b"^{CGContext=}^vLLLL^{CGColorSpace=}I",
            b"^{CGContext=}^vQQQQ^{CGColorSpace=}I",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFArrayApplyBlock": (
        b"v^{CGPDFArray=}@?^v",
        "",
        {
            "arguments": {
                1: {
                    "callable": {
                        "retval": {"type": b"B"},
                        "arguments": {
                            0: {"type": "^v"},
                            1: {"type": "l"},
                            2: {"type": "^{CGPDFObject=}"},
                            3: {"type": "^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGPathAddRelativeArc": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}fffff",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}ddddd",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGDisplaySetStereoOperation": (sel32or64(b"iIiiI", b"iIIII"),),
    "CGPaletteIsEqualToPalette": (b"B^{_CGDirectPaletteRef=}^{_CGDirectPaletteRef=}",),
    "CGContextSetShouldAntialias": (b"v^{CGContext=}B",),
    "CGDisplayModeGetHeight": (
        sel32or64(b"L^{CGDisplayMode=}", b"Q^{CGDisplayMode=}"),
    ),
    "CGContextSetFillColor": (
        sel32or64(b"v^{CGContext=}^f", b"v^{CGContext=}^d"),
        "",
        {"arguments": {1: {"c_array_of_variable_length": True, "type_modifier": "n"}}},
    ),
    "CGImageRelease": (b"v^{CGImage=}",),
    "CGInhibitLocalEvents": (sel32or64(b"ii", b"iI"),),
    "CGContextSetGrayFillColor": (sel32or64(b"v^{CGContext=}ff", b"v^{CGContext=}dd"),),
    "CGColorSpaceIsHDR": (b"B^{CGColorSpace=}",),
    "CGImageGetUTType": (b"^{__CFString=}^{CGImage=}",),
    "CGPSConverterCreate": (
        b"^{CGPSConverter=}^v^{CGPSConverterCallbacks=I^?^?^?^?^?^?^?}^{__CFDictionary=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDirectDisplayCopyCurrentMetalDevice": (
        b"@I",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextClipToMask": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}^{CGImage=}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}^{CGImage=}",
        ),
    ),
    "CGDisplayCopyColorSpace": (
        b"^{CGColorSpace=}I",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextAddLineToPoint": (sel32or64(b"v^{CGContext=}ff", b"v^{CGContext=}dd"),),
    "CGEventSourceGetLocalEventsSuppressionInterval": (b"d^{__CGEventSource=}",),
    "CGColorSpaceGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGPathAddPath": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}^{CGPath=}",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}^{CGPath=}",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGDataProviderRetain": (b"^{CGDataProvider=}^{CGDataProvider=}",),
    "CGEventCreateFromData": (
        b"^{__CGEvent=}^{__CFAllocator=}^{__CFData=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayPixelsHigh": (sel32or64(b"LI", b"QI"),),
    "CGConfigureDisplayStereoOperation": (
        sel32or64(b"i^{_CGDisplayConfigRef=}Iii", b"i^{_CGDisplayConfigRef=}III"),
    ),
    "CGFontGetNumberOfGlyphs": (sel32or64(b"L^{CGFont=}", b"Q^{CGFont=}"),),
    "CGPDFOperatorTableCreate": (
        b"^{CGPDFOperatorTable=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFContextAddDestinationAtPoint": (
        sel32or64(
            b"v^{CGContext=}^{__CFString=}{CGPoint=ff}",
            b"v^{CGContext=}^{__CFString=}{CGPoint=dd}",
        ),
    ),
    "CGPDFScannerGetContentStream": (b"^{CGPDFContentStream=}^{CGPDFScanner=}",),
    "CGContextSetShouldSubpixelQuantizeFonts": (b"v^{CGContext=}B",),
    "CGColorCreateWithPattern": (
        sel32or64(
            b"^{CGColor=}^{CGColorSpace=}^{CGPattern=}^f",
            b"^{CGColor=}^{CGColorSpace=}^{CGPattern=}^d",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                2: {"c_array_of_variable_length": True, "type_modifier": "n"}
            },
        },
    ),
    "CGPathContainsPoint": (
        sel32or64(
            b"B^{CGPath=}^{CGAffineTransform=ffffff}{CGPoint=ff}B",
            b"B^{CGPath=}^{CGAffineTransform=dddddd}{CGPoint=dd}B",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGSizeApplyAffineTransform": (
        sel32or64(
            b"{CGSize=ff}{CGSize=ff}{CGAffineTransform=ffffff}",
            b"{CGSize=dd}{CGSize=dd}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGRectIntegral": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGDisplayPrimaryDisplay": (b"II",),
    "CGContextConcatCTM": (
        sel32or64(
            b"v^{CGContext=}{CGAffineTransform=ffffff}",
            b"v^{CGContext=}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGFunctionRelease": (b"v^{CGFunction=}",),
    "CGPDFDocumentGetOutline": (b"^{__CFDictionary=}^{CGPDFDocument=}",),
    "CGWindowListCreateImageFromArray": (
        sel32or64(
            b"^{CGImage=}{CGRect={CGPoint=ff}{CGSize=ff}}^{__CFArray=}I",
            b"^{CGImage=}{CGRect={CGPoint=dd}{CGSize=dd}}^{__CFArray=}I",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPatternRetain": (b"^{CGPattern=}^{CGPattern=}",),
    "CGPaletteCreateWithSamples": (
        b"^{_CGDirectPaletteRef=}^{CGDeviceColor=fff}I",
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {0: {"c_array_length_in_arg": 1, "type_modifier": "n"}},
        },
    ),
    "CGDataProviderGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGPaletteCreateWithCapacity": (
        b"^{_CGDirectPaletteRef=}I",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayBytesPerRow": (sel32or64(b"LI", b"QI"),),
    "CGSetLocalEventsSuppressionInterval": (b"id",),
    "CGPDFArrayGetCount": (sel32or64(b"L^{CGPDFArray=}", b"Q^{CGPDFArray=}"),),
    "CGPDFContextClose": (b"v^{CGContext=}",),
    "CGDisplayIsBuiltin": (sel32or64(b"iI", b"II"),),
    "CGContextIsPathEmpty": (b"B^{CGContext=}",),
    "CGContextSetShadow": (
        sel32or64(b"v^{CGContext=}{CGSize=ff}f", b"v^{CGContext=}{CGSize=dd}d"),
    ),
    "CGPathGetBoundingBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPath=}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPath=}",
        ),
    ),
    "CGColorGetNumberOfComponents": (sel32or64(b"L^{CGColor=}", b"Q^{CGColor=}"),),
    "CGColorSpaceRelease": (b"v^{CGColorSpace=}",),
    "CGGetDisplayTransferByTable": (
        b"iII^f^f^f^I",
        "",
        {
            "arguments": {
                2: {"c_array_length_in_arg": (1, 5), "type_modifier": "o"},
                3: {"c_array_length_in_arg": (1, 5), "type_modifier": "o"},
                4: {"c_array_length_in_arg": (1, 5), "type_modifier": "o"},
                5: {"type_modifier": "o"},
            }
        },
    ),
    "CGPDFDictionaryApplyBlock": (
        b"v^{CGPDFDictionary=}@?^v",
        "",
        {
            "arguments": {
                1: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": "^v"},
                            1: {"c_array_delimited_by_null": True, "type": "n^t"},
                            2: {"type": "^{CGPDFObject=}"},
                            3: {"type": "^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGContextShowGlyphsAtPoint": (
        sel32or64(b"v^{CGContext=}ff^SL", b"v^{CGContext=}dd^SQ"),
        "",
        {"arguments": {3: {"c_array_length_in_arg": 4, "type_modifier": "n"}}},
    ),
    "CGPathAddLines": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}^{CGPoint=ff}L",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}^{CGPoint=dd}Q",
        ),
        "",
        {
            "arguments": {
                1: {"type_modifier": "n"},
                2: {"c_array_length_in_arg": 3, "type_modifier": "n"},
            }
        },
    ),
    "CGColorCreateGenericRGB": (
        sel32or64(b"^{CGColor=}ffff", b"^{CGColor=}dddd"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextDrawPDFPage": (b"v^{CGContext=}^{CGPDFPage=}",),
    "CGDisplayModeRetain": (b"^{CGDisplayMode=}^{CGDisplayMode=}",),
    "CGDisplayGammaTableCapacity": (b"II",),
    "CGFontCreateWithFontName": (
        b"^{CGFont=}^{__CFString=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayCopyAllDisplayModes": (
        b"^{__CFArray=}I^{__CFDictionary=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextScaleCTM": (sel32or64(b"v^{CGContext=}ff", b"v^{CGContext=}dd"),),
    "CGRectDivide": (
        sel32or64(
            b"v{CGRect={CGPoint=ff}{CGSize=ff}}^{CGRect={CGPoint=ff}{CGSize=ff}}^{CGRect={CGPoint=ff}{CGSize=ff}}fI",
            b"v{CGRect={CGPoint=dd}{CGSize=dd}}^{CGRect={CGPoint=dd}{CGSize=dd}}^{CGRect={CGPoint=dd}{CGSize=dd}}dI",
        ),
        "",
        {"arguments": {1: {"type_modifier": "o"}, 2: {"type_modifier": "o"}}},
    ),
    "CGContextSetLineCap": (sel32or64(b"v^{CGContext=}I", b"v^{CGContext=}i"),),
    "CGImageMaskCreate": (
        sel32or64(
            b"^{CGImage=}LLLLL^{CGDataProvider=}^fB",
            b"^{CGImage=}QQQQQ^{CGDataProvider=}^dB",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextDrawRadialGradient": (
        sel32or64(
            b"v^{CGContext=}^{CGGradient=}{CGPoint=ff}f{CGPoint=ff}fI",
            b"v^{CGContext=}^{CGGradient=}{CGPoint=dd}d{CGPoint=dd}dI",
        ),
    ),
    "CGFontCopyVariations": (
        b"^{__CFDictionary=}^{CGFont=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGConfigureDisplayMirrorOfDisplay": (b"i^{_CGDisplayConfigRef=}II",),
    "CGEventSourceCreate": (
        sel32or64(b"^{__CGEventSource=}I", b"^{__CGEventSource=}i"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectGetMidY": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGContextFillEllipseInRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGContextSetAlpha": (sel32or64(b"v^{CGContext=}f", b"v^{CGContext=}d"),),
    "CGContextAddQuadCurveToPoint": (
        sel32or64(b"v^{CGContext=}ffff", b"v^{CGContext=}dddd"),
    ),
    "CGColorSpaceGetNumberOfComponents": (
        sel32or64(b"L^{CGColorSpace=}", b"Q^{CGColorSpace=}"),
    ),
    "CGEventCreateKeyboardEvent": (
        b"^{__CGEvent=}^{__CGEventSource=}SB",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFDocumentGetMediaBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPDFDocument=}i",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPDFDocument=}i",
        ),
    ),
    "CGEventSetSource": (b"v^{__CGEvent=}^{__CGEventSource=}",),
    "CGSetDisplayTransferByByteTable": (
        b"iII^z^z^z",
        "",
        {
            "arguments": {
                2: {"c_array_length_in_arg": 1, "type_modifier": "n"},
                3: {"c_array_length_in_arg": 1, "type_modifier": "n"},
                4: {"c_array_length_in_arg": 1, "type_modifier": "n"},
            }
        },
    ),
    "CGPDFDictionaryGetString": (
        b"B^{CGPDFDictionary=}^t^^{CGPDFString=}",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGRegisterScreenRefreshCallback": (
        b"i^?^v",
        "",
        {
            "arguments": {
                0: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"I"},
                            1: {"type": b"^{CGRect={CGPoint=dd}{CGSize=dd}}"},
                            2: {"type": b"^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGFontGetUnitsPerEm": (b"i^{CGFont=}",),
    "CGContextEOClip": (b"v^{CGContext=}",),
    "CGAcquireDisplayFadeReservation": (
        b"if^I",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGBitmapContextGetData": (
        b"^v^{CGContext=}",
        "",
        {"retval": {"c_array_of_variable_length": True}},
    ),
    "CGAffineTransformIsIdentity": (
        sel32or64(b"B{CGAffineTransform=ffffff}", b"B{CGAffineTransform=dddddd}"),
    ),
    "CGContextGetInterpolationQuality": (
        sel32or64(b"I^{CGContext=}", b"i^{CGContext=}"),
    ),
    "CGPathGetPathBoundingBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPath=}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPath=}",
        ),
    ),
    "CGContextRotateCTM": (sel32or64(b"v^{CGContext=}f", b"v^{CGContext=}d"),),
    "CGImageCreateCopy": (
        b"^{CGImage=}^{CGImage=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGImageGetShouldInterpolate": (b"B^{CGImage=}",),
    "CGContextStrokeRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGImageGetDecode": (
        sel32or64(b"^f^{CGImage=}", b"^d^{CGImage=}"),
        "",
        {"retval": {"c_array_of_variable_length": True}},
    ),
    "CGColorCreateCopyByMatchingToColorSpace": (
        b"^{CGColor=}^{CGColorSpace=}i^{CGColor=}^{__CFDictionary=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetAllowsAntialiasing": (b"v^{CGContext=}B",),
    "CGPDFScannerPopDictionary": (
        b"B^{CGPDFScanner=}^^{CGPDFDictionary=}",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGRectGetMidX": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGFontCopyTableForTag": (
        b"^{__CFData=}^{CGFont=}I",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGEventSourceGetLocalEventsFilterDuringSuppressionState": (
        b"I^{__CGEventSource=}I",
    ),
    "CGColorGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGSetDisplayTransferByFormula": (b"iIfffffffff",),
    "CGPDFStreamGetDictionary": (b"^{CGPDFDictionary=}^{CGPDFStream=}",),
    "CGEventSourceSetLocalEventsFilterDuringSuppressionState": (
        b"v^{__CGEventSource=}II",
    ),
    "CGRectContainsRect": (
        sel32or64(
            b"B{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"B{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGColorGetPattern": (b"^{CGPattern=}^{CGColor=}",),
    "CGPaletteCreateDefaultColorPalette": (
        b"^{_CGDirectPaletteRef=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGFontCreatePostScriptSubset": (
        sel32or64(
            b"^{__CFData=}^{CGFont=}^{__CFString=}I^SL[256S]",
            b"^{__CFData=}^{CGFont=}^{__CFString=}i^SQ[256S]",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                3: {"c_array_length_in_arg": 4, "type_modifier": "n"},
                5: {"type_modifier": "n"},
            },
        },
    ),
    "CGPDFDocumentGetCatalog": (b"^{CGPDFDictionary=}^{CGPDFDocument=}",),
    "CGColorSpaceGetModel": (b"i^{CGColorSpace=}",),
    "CGImageGetColorSpace": (b"^{CGColorSpace=}^{CGImage=}",),
    "CGPDFArrayGetString": (
        sel32or64(
            b"B^{CGPDFArray=}L^^{CGPDFString=}", b"B^{CGPDFArray=}Q^^{CGPDFString=}"
        ),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGPointMake": (sel32or64(b"{CGPoint=ff}ff", b"{CGPoint=dd}dd"),),
    "CGPaletteRelease": (b"v^{_CGDirectPaletteRef=}",),
    "CGPDFDictionaryGetObject": (
        b"B^{CGPDFDictionary=}^t^^{CGPDFObject=}",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGEventTapCreateForPSN": (
        b"^{__CFMachPort=}^vIIQ^?^v",
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                4: {
                    "callable": {
                        "retval": {"type": b"^{__CGEvent=}"},
                        "arguments": {
                            0: {"type": b"^{__CGEventTapProxy=}"},
                            1: {"type": b"I"},
                            2: {"type": b"^{__CGEvent=}"},
                            3: {"type": b"^v"},
                        },
                    }
                }
            },
        },
    ),
    "CGReleaseDisplayFadeReservation": (b"iI",),
    "CGDisplayRegisterReconfigurationCallback": (
        b"i^?^v",
        "",
        {
            "arguments": {
                0: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"I"},
                            1: {"type": b"I"},
                            2: {"type": b"^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGPDFPageRetain": (b"^{CGPDFPage=}^{CGPDFPage=}",),
    "CGLayerCreateWithContext": (
        sel32or64(
            b"^{CGLayer=}^{CGContext=}{CGSize=ff}^{__CFDictionary=}",
            b"^{CGLayer=}^{CGContext=}{CGSize=dd}^{__CFDictionary=}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextStrokeLineSegments": (
        sel32or64(b"v^{CGContext=}^{CGPoint=ff}L", b"v^{CGContext=}^{CGPoint=dd}Q"),
        "",
        {"arguments": {1: {"c_array_length_in_arg": 2, "type_modifier": "n"}}},
    ),
    "CGContextSetTextMatrix": (
        sel32or64(
            b"v^{CGContext=}{CGAffineTransform=ffffff}",
            b"v^{CGContext=}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGPDFObjectGetType": (sel32or64(b"I^{CGPDFObject=}", b"i^{CGPDFObject=}"),),
    "CGEventSourceGetUserData": (b"q^{__CGEventSource=}",),
    "CGContextSetStrokeColor": (
        sel32or64(b"v^{CGContext=}^f", b"v^{CGContext=}^d"),
        "",
        {"arguments": {1: {"c_array_of_variable_length": True, "type_modifier": "n"}}},
    ),
    "CGPDFContextEndTag": (b"v^{CGContext=}",),
    "CGPDFScannerPopBoolean": (
        b"B^{CGPDFScanner=}^C",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGGradientRelease": (b"v^{CGGradient=}",),
    "CGConfigureDisplayMode": (b"i^{_CGDisplayConfigRef=}I^{__CFDictionary=}",),
    "CGWarpMouseCursorPosition": (sel32or64(b"i{CGPoint=ff}", b"i{CGPoint=dd}"),),
    "CGPathCreateWithRoundedRect": (
        sel32or64(
            b"^{CGPath=}{CGRect={CGPoint=ff}{CGSize=ff}}ff^{CGAffineTransform=ffffff}",
            b"^{CGPath=}{CGRect={CGPoint=dd}{CGSize=dd}}dd^{CGAffineTransform=dddddd}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {3: {"type_modifier": "n"}},
        },
    ),
    "CGPDFDocumentGetInfo": (b"^{CGPDFDictionary=}^{CGPDFDocument=}",),
    "CGContextSetStrokePattern": (
        sel32or64(b"v^{CGContext=}^{CGPattern=}^f", b"v^{CGContext=}^{CGPattern=}^d"),
        "",
        {"arguments": {2: {"c_array_of_variable_length": True, "type_modifier": "n"}}},
    ),
    "CGDisplayCanSetPalette": (sel32or64(b"iI", b"II"),),
    "CGRectApplyAffineTransform": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}{CGAffineTransform=ffffff}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGEventSetDoubleValueField": (b"v^{__CGEvent=}Id",),
    "CGContextFlush": (b"v^{CGContext=}",),
    "CGWindowListCopyWindowInfo": (
        b"^{__CFArray=}II",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGFontGetXHeight": (b"i^{CGFont=}",),
    "CGPDFContextCreate": (
        sel32or64(
            b"^{CGContext=}^{CGDataConsumer=}^{CGRect={CGPoint=ff}{CGSize=ff}}^{__CFDictionary=}",
            b"^{CGContext=}^{CGDataConsumer=}^{CGRect={CGPoint=dd}{CGSize=dd}}^{__CFDictionary=}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "n"}},
        },
    ),
    "CGPaletteGetIndexForColor": (b"I^{_CGDirectPaletteRef=}{CGDeviceColor=fff}",),
    "CGImageCreateWithJPEGDataProvider": (
        sel32or64(
            b"^{CGImage=}^{CGDataProvider=}^fBI", b"^{CGImage=}^{CGDataProvider=}^dBi"
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFDocumentCreateWithURL": (
        b"^{CGPDFDocument=}^{__CFURL=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPathAddArcToPoint": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}fffff",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}ddddd",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGVectorMake": (sel32or64(b"{CGVector=ff}ff", b"{CGVector=dd}dd"),),
    "CGDisplayIsActive": (sel32or64(b"iI", b"II"),),
    "CGPDFScannerScan": (b"B^{CGPDFScanner=}",),
    "CGPathCreateMutableCopyByTransformingPath": (
        sel32or64(
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=ffffff}",
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=dddddd}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "n"}},
        },
    ),
    "CGSetDisplayTransferByTable": (
        b"iII^f^f^f",
        "",
        {
            "arguments": {
                2: {"c_array_length_in_arg": 1, "type_modifier": "n"},
                3: {"c_array_length_in_arg": 1, "type_modifier": "n"},
                4: {"c_array_length_in_arg": 1, "type_modifier": "n"},
            }
        },
    ),
    "CGFontGetDescent": (b"i^{CGFont=}",),
    "CGImageGetPixelFormatInfo": (b"I^{CGImage=}",),
    "CGImageGetRenderingIntent": (sel32or64(b"I^{CGImage=}", b"i^{CGImage=}"),),
    "CGGLContextUpdateViewportSize": (
        sel32or64(b"v^{CGContext=}{CGSize=ff}", b"v^{CGContext=}{CGSize=dd}"),
    ),
    "CGGetEventTapList": (
        b"iI^{__CGEventTapInformation=IIIQiiBfff}^I",
        "",
        {
            "arguments": {
                1: {"c_array_length_in_arg": (0, 2), "type_modifier": "o"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGEnableEventStateCombining": (sel32or64(b"ii", b"iI"),),
    "CGColorSpaceCreateDeviceRGB": (
        b"^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPathEqualToPath": (b"B^{CGPath=}^{CGPath=}",),
    "CGPDFScannerPopObject": (
        b"B^{CGPDFScanner=}^^{CGPDFObject=}",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGDisplayIsCaptured": (sel32or64(b"iI", b"II"),),
    "CGPDFPageRelease": (b"v^{CGPDFPage=}",),
    "CGDataProviderCreate": (
        b"^{CGDataProvider=}^v^{CGDataProviderCallbacks=^?^?^?^?}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectIsEmpty": (
        sel32or64(
            b"B{CGRect={CGPoint=ff}{CGSize=ff}}", b"B{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGDisplayMoveCursorToPoint": (sel32or64(b"iI{CGPoint=ff}", b"iI{CGPoint=dd}"),),
    "CGPDFScannerPopInteger": (
        sel32or64(b"B^{CGPDFScanner=}^l", b"B^{CGPDFScanner=}^q"),
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGPaletteGetNumberOfSamples": (b"I^{_CGDirectPaletteRef=}",),
    "CGContextStrokePath": (b"v^{CGContext=}",),
    "CGEventSetLocation": (
        sel32or64(b"v^{__CGEvent=}{CGPoint=ff}", b"v^{__CGEvent=}{CGPoint=dd}"),
    ),
    "CGEventPostToPSN": (
        b"v^{ProcessSerialNumber=II}^{__CGEvent=}",
        "",
        {"arguments": {0: {"type_modifier": "n"}}},
    ),
    "CGAffineTransformScale": (
        sel32or64(
            b"{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}ff",
            b"{CGAffineTransform=dddddd}{CGAffineTransform=dddddd}dd",
        ),
    ),
    "CGEventSourceSetUserData": (b"v^{__CGEventSource=}q",),
    "CGLayerRelease": (b"v^{CGLayer=}",),
    "CGPDFArrayGetArray": (
        sel32or64(
            b"B^{CGPDFArray=}L^^{CGPDFArray=}", b"B^{CGPDFArray=}Q^^{CGPDFArray=}"
        ),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGContextDrawLayerInRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}^{CGLayer=}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}^{CGLayer=}",
        ),
    ),
    "CGDataProviderRelease": (b"v^{CGDataProvider=}",),
    "CGEventPost": (b"vI^{__CGEvent=}",),
    "CGMainDisplayID": (b"I",),
    "CGFontGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGPathAddRoundedRect": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}{CGRect={CGPoint=ff}{CGSize=ff}}ff",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}{CGRect={CGPoint=dd}{CGSize=dd}}dd",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGRectEqualToRect": (
        sel32or64(
            b"B{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"B{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGColorConversionInfoCreateFromListWithArguments": (
        b"^{CGColorConversionInfo=}^{__CFDictionary=}^{CGColorSpace=}Ii[1{__va_list_tag=II^v^v}]",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectGetMaxY": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGBitmapContextGetWidth": (sel32or64(b"L^{CGContext=}", b"Q^{CGContext=}"),),
    "CGShadingCreateRadial": (
        sel32or64(
            b"^{CGShading=}^{CGColorSpace=}{CGPoint=ff}f{CGPoint=ff}f^{CGFunction=}BB",
            b"^{CGShading=}^{CGColorSpace=}{CGPoint=dd}d{CGPoint=dd}d^{CGFunction=}BB",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFScannerRetain": (b"^{CGPDFScanner=}^{CGPDFScanner=}",),
    "CGDisplayMirrorsDisplay": (b"II",),
    "CGContextAddRects": (
        sel32or64(
            b"v^{CGContext=}^{CGRect={CGPoint=ff}{CGSize=ff}}L",
            b"v^{CGContext=}^{CGRect={CGPoint=dd}{CGSize=dd}}Q",
        ),
        "",
        {"arguments": {1: {"c_array_length_in_arg": 2, "type_modifier": "n"}}},
    ),
    "CGDataConsumerCreateWithURL": (
        b"^{CGDataConsumer=}^{__CFURL=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextConvertRectToUserSpace": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGGradientCreateWithColors": (
        sel32or64(
            b"^{CGGradient=}^{CGColorSpace=}^{__CFArray=}^f",
            b"^{CGGradient=}^{CGColorSpace=}^{__CFArray=}^d",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {2: {"c_array_length_in_arg": 1, "type_modifier": "n"}},
        },
    ),
    "CGPathApply": (
        b"v^{CGPath=}^v^?",
        "",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"^{CGPathElement=i^{CGPoint=dd}}"},
                        },
                    }
                }
            }
        },
    ),
    "CGGetDisplaysWithOpenGLDisplayMask": (
        b"iII^I^I",
        "",
        {
            "arguments": {
                2: {"c_array_length_in_arg": (1, 3), "type_modifier": "o"},
                3: {"type_modifier": "o"},
            }
        },
    ),
    "CGImageRetain": (b"^{CGImage=}^{CGImage=}",),
    "CGContextAddArc": (sel32or64(b"v^{CGContext=}fffffi", b"v^{CGContext=}dddddi"),),
    "CGFontCreateWithPlatformFont": (
        b"^{CGFont=}^v",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFContextSetURLForRect": (
        sel32or64(
            b"v^{CGContext=}^{__CFURL=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}^{__CFURL=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGPDFContentStreamRetain": (b"^{CGPDFContentStream=}^{CGPDFContentStream=}",),
    "CGCompleteDisplayConfiguration": (b"i^{_CGDisplayConfigRef=}I",),
    "CGAffineTransformTranslate": (
        sel32or64(
            b"{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}ff",
            b"{CGAffineTransform=dddddd}{CGAffineTransform=dddddd}dd",
        ),
    ),
    "CGContextAddCurveToPoint": (
        sel32or64(b"v^{CGContext=}ffffff", b"v^{CGContext=}dddddd"),
    ),
    "CGPDFContentStreamCreateWithPage": (
        b"^{CGPDFContentStream=}^{CGPDFPage=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGEventSourceGetKeyboardType": (b"I^{__CGEventSource=}",),
    "CGEventKeyboardGetUnicodeString": (
        sel32or64(b"v^{__CGEvent=}L^L^T", b"v^{__CGEvent=}Q^Q^T"),
        "",
        {
            "arguments": {
                2: {"type_modifier": "o"},
                3: {"c_array_length_in_arg": (1, 2), "type_modifier": "o"},
            }
        },
    ),
    "CGDisplaySwitchToMode": (b"iI^{__CFDictionary=}",),
    "CGEventSetIntegerValueField": (b"v^{__CGEvent=}Iq",),
    "CGEventCreate": (
        b"^{__CGEvent=}^{__CGEventSource=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetFillColorSpace": (b"v^{CGContext=}^{CGColorSpace=}",),
    "CGFontGetGlyphWithGlyphName": (b"S^{CGFont=}^{__CFString=}",),
    "CGFunctionRetain": (b"^{CGFunction=}^{CGFunction=}",),
    "CGContextConvertPointToUserSpace": (
        sel32or64(
            b"{CGPoint=ff}^{CGContext=}{CGPoint=ff}",
            b"{CGPoint=dd}^{CGContext=}{CGPoint=dd}",
        ),
    ),
    "CGColorSpaceCopyName": (
        b"^{__CFString=}^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPatternRelease": (b"v^{CGPattern=}",),
    "CGPointEqualToPoint": (
        sel32or64(b"B{CGPoint=ff}{CGPoint=ff}", b"B{CGPoint=dd}{CGPoint=dd}"),
    ),
    "CGCursorIsDrawnInFramebuffer": (sel32or64(b"i", b"I"),),
    "CGEventSourceCounterForEventType": (sel32or64(b"III", b"IiI"),),
    "CGDisplayCaptureWithOptions": (b"iII",),
    "CGDisplayIsStereo": (sel32or64(b"iI", b"II"),),
    "CGPDFTagTypeGetName": (b"^ci",),
    "CGBitmapContextGetBytesPerRow": (sel32or64(b"L^{CGContext=}", b"Q^{CGContext=}"),),
    "CGContextBeginTransparencyLayer": (b"v^{CGContext=}^{__CFDictionary=}",),
    "CGFontRetain": (b"^{CGFont=}^{CGFont=}",),
    "CGContextSetLineDash": (
        sel32or64(b"v^{CGContext=}f^fL", b"v^{CGContext=}d^dQ"),
        "",
        {"arguments": {2: {"c_array_length_in_arg": 3, "type_modifier": "n"}}},
    ),
    "CGColorSpaceCreateICCBased": (
        sel32or64(
            b"^{CGColorSpace=}L^f^{CGDataProvider=}^{CGColorSpace=}",
            b"^{CGColorSpace=}Q^d^{CGDataProvider=}^{CGColorSpace=}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                1: {"c_array_of_variable_length": True, "type_modifier": "n"}
            },
        },
    ),
    "CGContextSetGrayStrokeColor": (
        sel32or64(b"v^{CGContext=}ff", b"v^{CGContext=}dd"),
    ),
    "CGPDFOperatorTableRelease": (b"v^{CGPDFOperatorTable=}",),
    "CGContextGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGRectOffset": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}ff",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}dd",
        ),
    ),
    "CGLayerGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGColorSpaceCreateCalibratedGray": (
        sel32or64(b"^{CGColorSpace=}[3f][3f]f", b"^{CGColorSpace=}[3d][3d]d"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGEventTapCreate": (
        b"^{__CFMachPort=}IIIQ^?^v",
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                4: {
                    "callable": {
                        "retval": {"type": b"^{__CGEvent=}"},
                        "arguments": {
                            0: {"type": b"^{__CGEventTapProxy=}"},
                            1: {"type": b"I"},
                            2: {"type": b"^{__CGEvent=}"},
                            3: {"type": b"^v"},
                        },
                    }
                }
            },
        },
    ),
    "CGContextSetRenderingIntent": (sel32or64(b"v^{CGContext=}I", b"v^{CGContext=}i"),),
    "CGDisplayCurrentMode": (b"^{__CFDictionary=}I",),
    "CGConfigureDisplayWithDisplayMode": (
        b"i^{_CGDisplayConfigRef=}I^{CGDisplayMode=}^{__CFDictionary=}",
    ),
    "CGCursorIsVisible": (sel32or64(b"i", b"I"),),
    "CGDisplayIsMain": (sel32or64(b"iI", b"II"),),
    "CGSetLocalEventsFilterDuringSuppressionState": (b"iII",),
    "CGPDFDictionaryGetNumber": (
        sel32or64(b"B^{CGPDFDictionary=}^t^f", b"B^{CGPDFDictionary=}^t^d"),
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGAssociateMouseAndMouseCursorPosition": (sel32or64(b"ii", b"iI"),),
    "CGEventGetDoubleValueField": (b"d^{__CGEvent=}I",),
    "CGPDFDocumentAllowsPrinting": (b"B^{CGPDFDocument=}",),
    "CGContextSetBlendMode": (sel32or64(b"v^{CGContext=}I", b"v^{CGContext=}i"),),
    "CGFontGetGlyphAdvances": (
        sel32or64(b"B^{CGFont=}^SL^i", b"B^{CGFont=}^SQ^i"),
        "",
        {
            "arguments": {
                1: {"c_array_length_in_arg": 2, "type_modifier": "n"},
                3: {"c_array_length_in_arg": 2, "type_modifier": "o"},
            }
        },
    ),
    "CGContextReplacePathWithStrokedPath": (b"v^{CGContext=}",),
    "CGGetDisplayTransferByFormula": (
        b"iI^f^f^f^f^f^f^f^f^f",
        "",
        {
            "arguments": {
                1: {"type_modifier": "o"},
                2: {"type_modifier": "o"},
                3: {"type_modifier": "o"},
                4: {"type_modifier": "o"},
                5: {"type_modifier": "o"},
                6: {"type_modifier": "o"},
                7: {"type_modifier": "o"},
                8: {"type_modifier": "o"},
                9: {"type_modifier": "o"},
            }
        },
    ),
    "CGDisplayIsInHWMirrorSet": (sel32or64(b"iI", b"II"),),
    "CGDisplayCapture": (b"iI",),
    "CGColorSpaceGetName": (b"^{__CFString=}^{CGColorSpace=}",),
    "CGImageGetAlphaInfo": (b"I^{CGImage=}",),
    "CGSizeCreateDictionaryRepresentation": (
        sel32or64(b"^{__CFDictionary=}{CGSize=ff}", b"^{__CFDictionary=}{CGSize=dd}"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFStringGetLength": (sel32or64(b"L^{CGPDFString=}", b"Q^{CGPDFString=}"),),
    "CGScreenRegisterMoveCallback": (
        b"i^?^v",
        "",
        {
            "arguments": {
                0: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"{CGScreenUpdateMoveDelta=ii}"},
                            1: {"type": b"Q"},
                            2: {"type": b"^{CGRect={CGPoint=dd}{CGSize=dd}}"},
                            3: {"type": b"^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGColorConversionInfoGetTypeID": (b"Q",),
    "CGPDFDocumentRetain": (b"^{CGPDFDocument=}^{CGPDFDocument=}",),
    "CGWaitForScreenUpdateRects": (
        sel32or64(
            b"iI^I^^{CGRect={CGPoint=ff}{CGSize=ff}}^L^{CGScreenUpdateMoveDelta=ii}",
            b"iI^I^^{CGRect={CGPoint=dd}{CGSize=dd}}^Q^{CGScreenUpdateMoveDelta=ii}",
        ),
    ),
    "CGDisplayBitsPerSample": (sel32or64(b"LI", b"QI"),),
    "CGDisplayModeGetPixelHeight": (
        sel32or64(b"L^{CGDisplayMode=}", b"Q^{CGDisplayMode=}"),
    ),
    "CGContextDrawTiledImage": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}^{CGImage=}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}^{CGImage=}",
        ),
    ),
    "CGBitmapContextGetBitsPerComponent": (
        sel32or64(b"L^{CGContext=}", b"Q^{CGContext=}"),
    ),
    "CGContextAddPath": (b"v^{CGContext=}^{CGPath=}",),
    "CGConfigureDisplayOrigin": (b"i^{_CGDisplayConfigRef=}Iii",),
    "CGContextSetCharacterSpacing": (
        sel32or64(b"v^{CGContext=}f", b"v^{CGContext=}d"),
    ),
    "CGDisplaySamplesPerPixel": (sel32or64(b"LI", b"QI"),),
    "CGOpenGLDisplayMaskToDisplayID": (b"II",),
    "CGPDFArrayGetNumber": (
        sel32or64(b"B^{CGPDFArray=}L^f", b"B^{CGPDFArray=}Q^d"),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGDisplaySetDisplayMode": (b"iI^{CGDisplayMode=}^{__CFDictionary=}",),
    "CGRectIsNull": (
        sel32or64(
            b"B{CGRect={CGPoint=ff}{CGSize=ff}}", b"B{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGDataConsumerRelease": (b"v^{CGDataConsumer=}",),
    "CGColorSpaceCreateWithICCProfile": (
        b"^{CGColorSpace=}^{__CFData=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayModeGetWidth": (sel32or64(b"L^{CGDisplayMode=}", b"Q^{CGDisplayMode=}"),),
    "CGCaptureAllDisplays": (b"i",),
    "CGPDFScannerPopArray": (
        b"B^{CGPDFScanner=}^^{CGPDFArray=}",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGContextClipToRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGDisplayStreamUpdateCreateMergedUpdate": (
        b"^{CGDisplayStreamUpdate=}^{CGDisplayStreamUpdate=}^{CGDisplayStreamUpdate=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayHideCursor": (b"iI",),
    "CGPDFDocumentGetPage": (
        sel32or64(
            b"^{CGPDFPage=}^{CGPDFDocument=}L", b"^{CGPDFPage=}^{CGPDFDocument=}Q"
        ),
    ),
    "CGSessionCopyCurrentDictionary": (
        b"^{__CFDictionary=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGFontGetFontBBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGFont=}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGFont=}",
        ),
    ),
    "CGImageGetBitsPerComponent": (sel32or64(b"L^{CGImage=}", b"Q^{CGImage=}"),),
    "CGFontCopyTableTags": (
        b"^{__CFArray=}^{CGFont=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGWaitForScreenRefreshRects": (
        sel32or64(
            b"i^^{CGRect={CGPoint=ff}{CGSize=ff}}^I",
            b"i^^{CGRect={CGPoint=dd}{CGSize=dd}}^I",
        ),
    ),
    "CGDataProviderCreateDirect": (
        b"^{CGDataProvider=}^vq^{CGDataProviderDirectCallbacks=I^?^?^?^?}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayStreamStop": (b"i^{CGDisplayStream=}",),
    "CGShadingRetain": (b"^{CGShading=}^{CGShading=}",),
    "CGBitmapContextGetColorSpace": (b"^{CGColorSpace=}^{CGContext=}",),
    "CGContextShowTextAtPoint": (
        sel32or64(b"v^{CGContext=}ff^cL", b"v^{CGContext=}dd^cQ"),
        "",
        {"arguments": {3: {"c_array_length_in_arg": 4, "type_modifier": "n"}}},
    ),
    "CGBitmapContextCreateImage": (
        b"^{CGImage=}^{CGContext=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextTranslateCTM": (sel32or64(b"v^{CGContext=}ff", b"v^{CGContext=}dd"),),
    "CGDisplayModelNumber": (b"II",),
    "CGPDFContextCreateWithURL": (
        sel32or64(
            b"^{CGContext=}^{__CFURL=}^{CGRect={CGPoint=ff}{CGSize=ff}}^{__CFDictionary=}",
            b"^{CGContext=}^{__CFURL=}^{CGRect={CGPoint=dd}{CGSize=dd}}^{__CFDictionary=}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "n"}},
        },
    ),
    "CGColorSpaceCopyICCProfile": (
        b"^{__CFData=}^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetRGBStrokeColor": (
        sel32or64(b"v^{CGContext=}ffff", b"v^{CGContext=}dddd"),
    ),
    "CGBitmapContextCreateWithData": (
        sel32or64(
            b"^{CGContext=}^vLLLL^{CGColorSpace=}I^?^v",
            b"^{CGContext=}^vQQQQ^{CGColorSpace=}I^?^v",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                7: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {0: {"type": b"^v"}, 1: {"type": b"^v"}},
                    }
                }
            },
        },
    ),
    "CGDisplayModeRelease": (b"v^{CGDisplayMode=}",),
    "CGAffineTransformConcat": (
        sel32or64(
            b"{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}",
            b"{CGAffineTransform=dddddd}{CGAffineTransform=dddddd}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGImageGetDataProvider": (b"^{CGDataProvider=}^{CGImage=}",),
    "CGContextConvertRectToDeviceSpace": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGImageCreateWithMaskingColors": (
        sel32or64(b"^{CGImage=}^{CGImage=}^f", b"^{CGImage=}^{CGImage=}^d"),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                1: {"c_array_of_variable_length": True, "type_modifier": "n"}
            },
        },
    ),
    "CGPDFDictionaryGetInteger": (
        sel32or64(b"B^{CGPDFDictionary=}^t^l", b"B^{CGPDFDictionary=}^t^q"),
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGColorGetAlpha": (sel32or64(b"f^{CGColor=}", b"d^{CGColor=}"),),
    "CGContextSetAllowsFontSubpixelPositioning": (b"v^{CGContext=}B",),
    "CGPDFDocumentIsEncrypted": (b"B^{CGPDFDocument=}",),
    "CGDisplayBestModeForParameters": (
        sel32or64(b"^{__CFDictionary=}ILLL^i", b"^{__CFDictionary=}IQQQ^I"),
        "",
        {"arguments": {4: {"type_modifier": "o"}}},
    ),
    "CGPDFArrayGetBoolean": (
        sel32or64(b"B^{CGPDFArray=}L^C", b"B^{CGPDFArray=}Q^C"),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGShadingCreateAxial": (
        sel32or64(
            b"^{CGShading=}^{CGColorSpace=}{CGPoint=ff}{CGPoint=ff}^{CGFunction=}BB",
            b"^{CGShading=}^{CGColorSpace=}{CGPoint=dd}{CGPoint=dd}^{CGFunction=}BB",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGEventCreateData": (
        b"^{__CFData=}^{__CFAllocator=}^{__CGEvent=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGColorConverterRetain": (b"^{CGColorConversionInfo=}^{CGColorConversionInfo=}",),
    "CGRectMakeWithDictionaryRepresentation": (
        sel32or64(
            b"B^{__CFDictionary=}^{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"B^{__CFDictionary=}^{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGFunctionCreate": (
        sel32or64(
            b"^{CGFunction=}^vL^fL^f^{CGFunctionCallbacks=I^?^?}",
            b"^{CGFunction=}^vQ^dQ^d^{CGFunctionCallbacks=I^?^?}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDataProviderCreateDirectAccess": (
        sel32or64(
            b"^{CGDataProvider=}^vL^{CGDataProviderDirectAccessCallbacks=^?^?^?^?}",
            b"^{CGDataProvider=}^vQ^{CGDataProviderDirectAccessCallbacks=^?^?^?^?}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPaletteCreateFromPaletteBlendedWithColor": (
        b"^{_CGDirectPaletteRef=}^{_CGDirectPaletteRef=}f{CGDeviceColor=fff}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextGetTextMatrix": (
        sel32or64(
            b"{CGAffineTransform=ffffff}^{CGContext=}",
            b"{CGAffineTransform=dddddd}^{CGContext=}",
        ),
    ),
    "CGDisplayModeGetIOFlags": (b"I^{CGDisplayMode=}",),
    "CGDisplayModeCopyPixelEncoding": (
        b"^{__CFString=}^{CGDisplayMode=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGGetDisplaysWithRect": (
        sel32or64(
            b"i{CGRect={CGPoint=ff}{CGSize=ff}}I^I^I",
            b"i{CGRect={CGPoint=dd}{CGSize=dd}}I^I^I",
        ),
        "",
        {
            "arguments": {
                2: {"c_array_length_in_arg": (1, 3), "type_modifier": "o"},
                3: {"type_modifier": "o"},
            }
        },
    ),
    "CGFontCopyFullName": (
        b"^{__CFString=}^{CGFont=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGGetDisplaysWithPoint": (
        sel32or64(b"i{CGPoint=ff}I^I^I", b"i{CGPoint=dd}I^I^I"),
        "",
        {
            "arguments": {
                2: {"c_array_length_in_arg": (1, 3), "type_modifier": "o"},
                3: {"type_modifier": "o"},
            }
        },
    ),
    "CGPDFStreamCopyData": (
        sel32or64(b"^{__CFData=}^{CGPDFStream=}^I", b"^{__CFData=}^{CGPDFStream=}^i"),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "o"}},
        },
    ),
    "CGImageGetHeight": (sel32or64(b"L^{CGImage=}", b"Q^{CGImage=}"),),
    "CGDisplayBitsPerPixel": (sel32or64(b"LI", b"QI"),),
    "CGPDFDocumentGetTrimBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPDFDocument=}i",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPDFDocument=}i",
        ),
    ),
    "CGGetActiveDisplayList": (
        b"iI^I^I",
        "",
        {
            "arguments": {
                1: {"c_array_length_in_arg": (0, 2), "type_modifier": "o"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGContextGetClipBoundingBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGContext=}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGContext=}",
        ),
    ),
    "CGContextRetain": (b"^{CGContext=}^{CGContext=}",),
    "CGDisplayRemoveReconfigurationCallback": (
        b"i^?^v",
        "",
        {
            "arguments": {
                0: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"I"},
                            1: {"type": b"I"},
                            2: {"type": b"^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGPDFDocumentGetRotationAngle": (b"i^{CGPDFDocument=}i",),
    "CGDisplayModeGetPixelWidth": (
        sel32or64(b"L^{CGDisplayMode=}", b"Q^{CGDisplayMode=}"),
    ),
    "CGContextClipToRects": (
        sel32or64(
            b"v^{CGContext=}^{CGRect={CGPoint=ff}{CGSize=ff}}L",
            b"v^{CGContext=}^{CGRect={CGPoint=dd}{CGSize=dd}}Q",
        ),
        "",
        {"arguments": {1: {"c_array_length_in_arg": 2, "type_modifier": "n"}}},
    ),
    "CGEventCreateCopy": (
        b"^{__CGEvent=}^{__CGEvent=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGEventSourceSetLocalEventsSuppressionInterval": (b"v^{__CGEventSource=}d",),
    "CGPDFDocumentGetBleedBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPDFDocument=}i",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPDFDocument=}i",
        ),
    ),
    "CGPathGetCurrentPoint": (
        sel32or64(b"{CGPoint=ff}^{CGPath=}", b"{CGPoint=dd}^{CGPath=}"),
    ),
    "CGContextShowGlyphsAtPositions": (
        sel32or64(b"v^{CGContext=}^S^{CGPoint=ff}L", b"v^{CGContext=}^S^{CGPoint=dd}Q"),
        "",
        {
            "arguments": {
                1: {"c_array_length_in_arg": 3, "type_modifier": "n"},
                2: {"c_array_length_in_arg": 3, "type_modifier": "n"},
            }
        },
    ),
    "CGEventCreateMouseEvent": (
        sel32or64(
            b"^{__CGEvent=}^{__CGEventSource=}I{CGPoint=ff}I",
            b"^{__CGEvent=}^{__CGEventSource=}I{CGPoint=dd}I",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetStrokeColorWithColor": (b"v^{CGContext=}^{CGColor=}",),
    "CGPaletteSetColorAtIndex": (b"v^{_CGDirectPaletteRef=}{CGDeviceColor=fff}I",),
    "CGContextSetCMYKFillColor": (
        sel32or64(b"v^{CGContext=}fffff", b"v^{CGContext=}ddddd"),
    ),
    "CGImageCreateWithImageInRect": (
        sel32or64(
            b"^{CGImage=}^{CGImage=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"^{CGImage=}^{CGImage=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextBeginPage": (
        sel32or64(
            b"v^{CGContext=}^{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}^{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGImageCreateCopyWithColorSpace": (
        b"^{CGImage=}^{CGImage=}^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextDrawPDFDocument": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPDFDocument=}i",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPDFDocument=}i",
        ),
    ),
    "CGEventGetUnflippedLocation": (
        sel32or64(b"{CGPoint=ff}^{__CGEvent=}", b"{CGPoint=dd}^{__CGEvent=}"),
    ),
    "CGFunctionGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGCaptureAllDisplaysWithOptions": (b"iI",),
    "CGContextSetShadowWithColor": (
        sel32or64(
            b"v^{CGContext=}{CGSize=ff}f^{CGColor=}",
            b"v^{CGContext=}{CGSize=dd}d^{CGColor=}",
        ),
    ),
    "CGContextSetInterpolationQuality": (
        sel32or64(b"v^{CGContext=}I", b"v^{CGContext=}i"),
    ),
    "CGPDFPageGetDictionary": (b"^{CGPDFDictionary=}^{CGPDFPage=}",),
    "CGContextMoveToPoint": (sel32or64(b"v^{CGContext=}ff", b"v^{CGContext=}dd"),),
    "CGContextDrawLayerAtPoint": (
        sel32or64(
            b"v^{CGContext=}{CGPoint=ff}^{CGLayer=}",
            b"v^{CGContext=}{CGPoint=dd}^{CGLayer=}",
        ),
    ),
    "CGDisplayRestoreColorSyncSettings": (b"v",),
    "CGPathCreateWithEllipseInRect": (
        sel32or64(
            b"^{CGPath=}{CGRect={CGPoint=ff}{CGSize=ff}}^{CGAffineTransform=ffffff}",
            b"^{CGPath=}{CGRect={CGPoint=dd}{CGSize=dd}}^{CGAffineTransform=dddddd}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "n"}},
        },
    ),
    "CGPDFPageGetPageNumber": (sel32or64(b"L^{CGPDFPage=}", b"Q^{CGPDFPage=}"),),
    "CGColorRelease": (b"v^{CGColor=}",),
    "CGColorSpaceGetColorTable": (
        b"v^{CGColorSpace=}^C",
        "",
        {"arguments": {1: {"c_array_of_variable_length": True, "type_modifier": "o"}}},
    ),
    "CGColorSpaceCopyICCData": (
        b"^{__CFData=}^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayIsAlwaysInMirrorSet": (sel32or64(b"iI", b"II"),),
    "CGFontCopyPostScriptName": (
        b"^{__CFString=}^{CGFont=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGFontCreateWithDataProvider": (
        b"^{CGFont=}^{CGDataProvider=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectCreateDictionaryRepresentation": (
        sel32or64(
            b"^{__CFDictionary=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"^{__CFDictionary=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectInset": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}ff",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}dd",
        ),
    ),
    "CGRectGetWidth": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGContextStrokeRectWithWidth": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}f",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}d",
        ),
    ),
    "CGEventGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGFontGetItalicAngle": (sel32or64(b"f^{CGFont=}", b"d^{CGFont=}"),),
    "CGColorSpaceCopyPropertyList": (
        b"@^{CGColorSpace=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectUnion": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGPathAddRects": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}^{CGRect={CGPoint=ff}{CGSize=ff}}L",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}^{CGRect={CGPoint=dd}{CGSize=dd}}Q",
        ),
        "",
        {
            "arguments": {
                1: {"type_modifier": "n"},
                2: {"c_array_length_in_arg": 3, "type_modifier": "n"},
            }
        },
    ),
    "CGColorSpaceSupportsOutput": (b"B^{CGColorSpace=}",),
    "CGPDFContextSetDestinationForRect": (
        sel32or64(
            b"v^{CGContext=}^{__CFString=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}^{__CFString=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGEventTapCreateForPid": (
        b"^{__CFMachPort=}iIIQ^?^v",
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                4: {
                    "callable": {
                        "retval": {"type": b"^{__CGEvent=}"},
                        "arguments": {
                            0: {"type": b"^{__CGEventTapProxy=}"},
                            1: {"type": b"I"},
                            2: {"type": b"^{__CGEvent=}"},
                            3: {"type": b"^v"},
                        },
                    }
                }
            },
        },
    ),
    "CGPDFOperatorTableRetain": (b"^{CGPDFOperatorTable=}^{CGPDFOperatorTable=}",),
    "CGPDFScannerPopName": (
        b"B^{CGPDFScanner=}^^c",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGLayerGetContext": (b"^{CGContext=}^{CGLayer=}",),
    "CGImageGetBitsPerPixel": (sel32or64(b"L^{CGImage=}", b"Q^{CGImage=}"),),
    "CGPathAddArc": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}fffffB",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}dddddB",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGContextDrawLinearGradient": (
        sel32or64(
            b"v^{CGContext=}^{CGGradient=}{CGPoint=ff}{CGPoint=ff}I",
            b"v^{CGContext=}^{CGGradient=}{CGPoint=dd}{CGPoint=dd}I",
        ),
    ),
    "CGDataConsumerGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGDisplayModeIsUsableForDesktopGUI": (b"B^{CGDisplayMode=}",),
    "CGRectIsInfinite": (
        sel32or64(
            b"B{CGRect={CGPoint=ff}{CGSize=ff}}", b"B{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGEventSetTimestamp": (b"v^{__CGEvent=}Q",),
    "CGPDFContextAddDocumentMetadata": (b"v^{CGContext=}^{__CFData=}",),
    "CGDisplayWaitForBeamPositionOutsideLines": (b"iIII",),
    "CGColorSpaceCreateWithICCData": (
        b"^{CGColorSpace=}@",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFContextBeginPage": (b"v^{CGContext=}^{__CFDictionary=}",),
    "CGPSConverterIsConverting": (b"B^{CGPSConverter=}",),
    "CGEventPostToPid": (b"vi^{__CGEvent=}",),
    "CGPathIsEmpty": (b"B^{CGPath=}",),
    "CGDisplayScreenSize": (sel32or64(b"{CGSize=ff}I", b"{CGSize=dd}I"),),
    "CGDisplayIsInMirrorSet": (sel32or64(b"iI", b"II"),),
    "CGFontCopyGlyphNameForGlyph": (
        b"^{__CFString=}^{CGFont=}S",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGBitmapContextGetAlphaInfo": (b"I^{CGContext=}",),
    "CGFontCreateCopyWithVariations": (
        b"^{CGFont=}^{CGFont=}^{__CFDictionary=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFScannerRelease": (b"v^{CGPDFScanner=}",),
    "CGContextCopyPath": (
        b"^{CGPath=}^{CGContext=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGShadingRelease": (b"v^{CGShading=}",),
    "CGDisplayFadeOperationInProgress": (sel32or64(b"i", b"I"),),
    "CGPostMouseEvent": (
        sel32or64(b"i{CGPoint=ff}iIi", b"i{CGPoint=dd}III"),
        "",
        {"c_array_length_in_arg": 2, "variadic": True},
    ),
    "CGPDFContentStreamGetStreams": (b"^{__CFArray=}^{CGPDFContentStream=}",),
    "CGContextSetMiterLimit": (sel32or64(b"v^{CGContext=}f", b"v^{CGContext=}d"),),
    "CGPDFOperatorTableSetCallback": (
        b"v^{CGPDFOperatorTable=}^t^?",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^{CGPDFScanner=}"},
                            1: {"type": b"^v"},
                        },
                    }
                },
            }
        },
    ),
    "CGEventTapIsEnabled": (b"B^{__CFMachPort=}",),
    "CGContextDrawPath": (sel32or64(b"v^{CGContext=}I", b"v^{CGContext=}i"),),
    "CGWindowServerCFMachPort": (b"^{__CFMachPort=}",),
    "CGColorEqualToColor": (b"B^{CGColor=}^{CGColor=}",),
    "CGContextSetFontSize": (sel32or64(b"v^{CGContext=}f", b"v^{CGContext=}d"),),
    "CGEventGetIntegerValueField": (b"q^{__CGEvent=}I",),
    "CGContextShowText": (
        sel32or64(b"v^{CGContext=}^cL", b"v^{CGContext=}^cQ"),
        "",
        {"arguments": {1: {"c_array_length_in_arg": 2, "type_modifier": "n"}}},
    ),
    "CGColorSpaceCreateWithName": (
        b"^{CGColorSpace=}^{__CFString=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGRectGetMaxX": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGImageCreateWithMask": (
        b"^{CGImage=}^{CGImage=}^{CGImage=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGImageCreateWithPNGDataProvider": (
        sel32or64(
            b"^{CGImage=}^{CGDataProvider=}^fBI", b"^{CGImage=}^{CGDataProvider=}^dBi"
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetTextDrawingMode": (sel32or64(b"v^{CGContext=}I", b"v^{CGContext=}i"),),
    "CGContextGetUserSpaceToDeviceSpaceTransform": (
        sel32or64(
            b"{CGAffineTransform=ffffff}^{CGContext=}",
            b"{CGAffineTransform=dddddd}^{CGContext=}",
        ),
    ),
    "CGDataConsumerCreateWithCFData": (
        b"^{CGDataConsumer=}^{__CFData=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGColorSpaceCreateCalibratedRGB": (
        sel32or64(
            b"^{CGColorSpace=}[3f][3f][3f][9f]", b"^{CGColorSpace=}[3d][3d][3d][9d]"
        ),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextSetLineJoin": (sel32or64(b"v^{CGContext=}I", b"v^{CGContext=}i"),),
    "CGDataProviderCreateSequential": (
        b"^{CGDataProvider=}^v^{CGDataProviderSequentialCallbacks=I^?^?^?^?}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFArrayGetNull": (sel32or64(b"B^{CGPDFArray=}L", b"B^{CGPDFArray=}Q"),),
    "CGEventSourceSecondsSinceLastEventType": (sel32or64(b"dII", b"diI"),),
    "CGContextSetRGBFillColor": (
        sel32or64(b"v^{CGContext=}ffff", b"v^{CGContext=}dddd"),
    ),
    "CGPaletteCreateCopy": (
        b"^{_CGDirectPaletteRef=}^{_CGDirectPaletteRef=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGGetLastMouseDelta": (
        b"v^i^i",
        "",
        {"arguments": {0: {"type_modifier": "o"}, 1: {"type_modifier": "o"}}},
    ),
    "CGPDFArrayGetDictionary": (
        sel32or64(
            b"B^{CGPDFArray=}L^^{CGPDFDictionary=}",
            b"B^{CGPDFArray=}Q^^{CGPDFDictionary=}",
        ),
        "",
        {"arguments": {2: {"type_modifier": "o"}}},
    ),
    "CGPathCloseSubpath": (b"v^{CGPath=}",),
    "CGPDFContentStreamCreateWithStream": (
        b"^{CGPDFContentStream=}^{CGPDFStream=}^{CGPDFDictionary=}^{CGPDFContentStream=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplaySerialNumber": (b"II",),
    "CGGetOnlineDisplayList": (
        b"iI^I^I",
        "",
        {
            "arguments": {
                1: {"c_array_length_in_arg": (0, 2), "type_modifier": "o"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGCancelDisplayConfiguration": (b"i^{_CGDisplayConfigRef=}",),
    "CGEventSourceSetPixelsPerLine": (b"v^{__CGEventSource=}d",),
    "CGEventGetTimestamp": (b"Q^{__CGEvent=}",),
    "CGContextSetShouldSubpixelPositionFonts": (b"v^{CGContext=}B",),
    "CGContextSaveGState": (b"v^{CGContext=}",),
    "CGReleaseAllDisplays": (b"i",),
    "CGDisplayRelease": (b"iI",),
    "CGContextConvertSizeToUserSpace": (
        sel32or64(
            b"{CGSize=ff}^{CGContext=}{CGSize=ff}",
            b"{CGSize=dd}^{CGContext=}{CGSize=dd}",
        ),
    ),
    "CGColorCreateCopyWithAlpha": (
        sel32or64(b"^{CGColor=}^{CGColor=}f", b"^{CGColor=}^{CGColor=}d"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFScannerPopNumber": (
        sel32or64(b"B^{CGPDFScanner=}^f", b"B^{CGPDFScanner=}^d"),
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGContextEOFillPath": (b"v^{CGContext=}",),
    "CGPathCreateCopy": (
        b"^{CGPath=}^{CGPath=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPSConverterAbort": (b"B^{CGPSConverter=}",),
    "CGContextFillPath": (b"v^{CGContext=}",),
    "CGDisplayBaseAddress": (
        b"^vI",
        "",
        {"retval": {"c_array_of_variable_length": True}},
    ),
    "CGContextFillRects": (
        sel32or64(
            b"v^{CGContext=}^{CGRect={CGPoint=ff}{CGSize=ff}}L",
            b"v^{CGContext=}^{CGRect={CGPoint=dd}{CGSize=dd}}Q",
        ),
        "",
        {"arguments": {1: {"c_array_length_in_arg": 2, "type_modifier": "n"}}},
    ),
    "CGContextStrokeEllipseInRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGEventGetFlags": (b"Q^{__CGEvent=}",),
    "CGPDFContextEndPage": (b"v^{CGContext=}",),
    "CGEventSourceButtonState": (sel32or64(b"BII", b"BiI"),),
    "CGContextConvertSizeToDeviceSpace": (
        sel32or64(
            b"{CGSize=ff}^{CGContext=}{CGSize=ff}",
            b"{CGSize=dd}^{CGContext=}{CGSize=dd}",
        ),
    ),
    "CGReleaseScreenRefreshRects": (
        sel32or64(
            b"v^{CGRect={CGPoint=ff}{CGSize=ff}}", b"v^{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGContextSetFlatness": (sel32or64(b"v^{CGContext=}f", b"v^{CGContext=}d"),),
    "CGContextDrawShading": (b"v^{CGContext=}^{CGShading=}",),
    "CGWindowLevelForKey": (b"ii",),
    "CGFontCopyVariationAxes": (
        b"^{__CFArray=}^{CGFont=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextDrawImage": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}^{CGImage=}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}^{CGImage=}",
        ),
    ),
    "CGPDFDocumentCreateWithProvider": (
        b"^{CGPDFDocument=}^{CGDataProvider=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFDocumentGetArtBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPDFDocument=}i",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPDFDocument=}i",
        ),
    ),
    "CGContextBeginPath": (b"v^{CGContext=}",),
    "CGEventCreateScrollWheelEvent2": (
        b"^{__CGEvent=}^{__CGEventSource=}IIiii",
        "",
        {
            "retval": {"already_cfretained": True},
            "c_array_length_in_arg": 2,
            "variadic": True,
        },
    ),
    "CGColorConversionInfoCreateWithOptions": (
        b"^{CGColorConversionInfo=}^{CGColorSpace=}^{CGColorSpace=}^{__CFDictionary=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPathIsRect": (
        sel32or64(
            b"B^{CGPath=}^{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"B^{CGPath=}^{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGPathCreateCopyByDashingPath": (
        sel32or64(
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=ffffff}f^fL",
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=dddddd}d^dQ",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                1: {"type_modifier": "n"},
                3: {"c_array_length_in_arg": 4, "type_modifier": "n"},
            },
        },
    ),
    "CGDisplayIsAsleep": (sel32or64(b"iI", b"II"),),
    "CGPSConverterConvert": (
        b"B^{CGPSConverter=}^{CGDataProvider=}^{CGDataConsumer=}^{__CFDictionary=}",
    ),
    "CGDisplayAddressForPosition": (
        b"^vIii",
        "",
        {"retval": {"c_array_of_variable_length": True}},
    ),
    "CGContextConvertPointToDeviceSpace": (
        sel32or64(
            b"{CGPoint=ff}^{CGContext=}{CGPoint=ff}",
            b"{CGPoint=dd}^{CGContext=}{CGPoint=dd}",
        ),
    ),
    "CGDisplayBounds": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}I", b"{CGRect={CGPoint=dd}{CGSize=dd}}I"
        ),
    ),
    "CGEventTapEnable": (b"v^{__CFMachPort=}B",),
    "CGColorGetConstantColor": (b"^{CGColor=}^{__CFString=}",),
    "CGDisplayUnitNumber": (b"II",),
    "CGContextClosePath": (b"v^{CGContext=}",),
    "CGImageIsMask": (b"B^{CGImage=}",),
    "CGDisplayCopyDisplayMode": (
        b"^{CGDisplayMode=}I",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPDFDocumentAllowsCopying": (
        b"B^{CGPDFDocument=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayCreateImage": (
        b"^{CGImage=}I",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayRotation": (b"dI",),
    "CGDisplayBestModeForParametersAndRefreshRateWithProperty": (
        sel32or64(
            b"^{__CFDictionary=}ILLLd^{__CFString=}^i",
            b"^{__CFDictionary=}IQQQd^{__CFString=}^I",
        ),
        "",
        {"arguments": {6: {"type_modifier": "o"}}},
    ),
    "CGDisplayIDToOpenGLDisplayMask": (b"II",),
    "CGColorCreate": (
        sel32or64(b"^{CGColor=}^{CGColorSpace=}^f", b"^{CGColor=}^{CGColorSpace=}^d"),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                1: {"c_array_of_variable_length": True, "type_modifier": "n"}
            },
        },
    ),
    "CGEventTapPostEvent": (b"v^{__CGEventTapProxy=}^{__CGEvent=}",),
    "CGImageGetByteOrderInfo": (b"I^{CGImage=}",),
    "CGDisplayBeamPosition": (b"II",),
    "CGPDFDocumentGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGShadingGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGEventSourceKeyState": (sel32or64(b"BIS", b"BiS"),),
    "CGContextBeginTransparencyLayerWithRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}^{__CFDictionary=}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}^{__CFDictionary=}",
        ),
    ),
    "CGPointCreateDictionaryRepresentation": (
        sel32or64(b"^{__CFDictionary=}{CGPoint=ff}", b"^{__CFDictionary=}{CGPoint=dd}"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGAffineTransformEqualToTransform": (
        sel32or64(
            b"B{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}",
            b"B{CGAffineTransform=dddddd}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGDisplayPixelsWide": (sel32or64(b"LI", b"QI"),),
    "CGEventSourceFlagsState": (sel32or64(b"QI", b"Qi"),),
    "CGLayerRetain": (b"^{CGLayer=}^{CGLayer=}",),
    "CGContextFillRect": (
        sel32or64(
            b"v^{CGContext=}{CGRect={CGPoint=ff}{CGSize=ff}}",
            b"v^{CGContext=}{CGRect={CGPoint=dd}{CGSize=dd}}",
        ),
    ),
    "CGAffineTransformInvert": (
        sel32or64(
            b"{CGAffineTransform=ffffff}{CGAffineTransform=ffffff}",
            b"{CGAffineTransform=dddddd}{CGAffineTransform=dddddd}",
        ),
    ),
    "CGPaletteGetColorAtIndex": (b"{CGDeviceColor=fff}^{_CGDirectPaletteRef=}I",),
    "CGEventSetFlags": (b"v^{__CGEvent=}Q",),
    "CGPDFDocumentGetCropBox": (
        sel32or64(
            b"{CGRect={CGPoint=ff}{CGSize=ff}}^{CGPDFDocument=}i",
            b"{CGRect={CGPoint=dd}{CGSize=dd}}^{CGPDFDocument=}i",
        ),
    ),
    "CGEventCreateScrollWheelEvent": (
        b"^{__CGEvent=}^{__CGEventSource=}IIi",
        "",
        {
            "retval": {"already_cfretained": True},
            "c_array_length_in_arg": 2,
            "variadic": True,
        },
    ),
    "CGPatternGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGImageGetBytesPerRow": (sel32or64(b"L^{CGImage=}", b"Q^{CGImage=}"),),
    "CGPathRelease": (b"v^{CGPath=}",),
    "CGDisplayModeGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGEventGetType": (b"I^{__CGEvent=}",),
    "CGContextSetAllowsFontSubpixelQuantization": (b"v^{CGContext=}B",),
    "CGPathMoveToPoint": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}ff",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}dd",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGFontRelease": (b"v^{CGFont=}",),
    "CGPathCreateCopyByTransformingPath": (
        sel32or64(
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=ffffff}",
            b"^{CGPath=}^{CGPath=}^{CGAffineTransform=dddddd}",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {1: {"type_modifier": "n"}},
        },
    ),
    "CGPDFDocumentRelease": (b"v^{CGPDFDocument=}",),
    "CGContextSetLineWidth": (sel32or64(b"v^{CGContext=}f", b"v^{CGContext=}d"),),
    "CGDisplayStreamCreateWithDispatchQueue": (
        sel32or64(
            b"^{CGDisplayStream=}ILLi^{__CFDictionary=}^{dispatch_queue_s=}@?",
            b"^{CGDisplayStream=}IQQi^{__CFDictionary=}@@?",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                6: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": "^v"},
                            1: {"type": "I"},
                            2: {"type": "Q"},
                            3: {"type": "@"},
                            4: {"type": "@"},
                        },
                    }
                }
            },
        },
    ),
    "CGColorSpaceCreateWithPropertyList": (
        b"^{CGColorSpace=}@",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGContextGetPathCurrentPoint": (
        sel32or64(b"{CGPoint=ff}^{CGContext=}", b"{CGPoint=dd}^{CGContext=}"),
    ),
    "CGContextSetPatternPhase": (
        sel32or64(b"v^{CGContext=}{CGSize=ff}", b"v^{CGContext=}{CGSize=dd}"),
    ),
    "CGFontGetAscent": (b"i^{CGFont=}",),
    "CGPDFDictionaryGetDictionary": (
        b"B^{CGPDFDictionary=}^t^^{CGPDFDictionary=}",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGContextShowGlyphs": (
        sel32or64(b"v^{CGContext=}^SL", b"v^{CGContext=}^SQ"),
        "",
        {"arguments": {1: {"c_array_length_in_arg": 2, "type_modifier": "n"}}},
    ),
    "CGFontGetLeading": (b"i^{CGFont=}",),
    "CGGradientCreateWithColorComponents": (
        sel32or64(
            b"^{CGGradient=}^{CGColorSpace=}^f^fL",
            b"^{CGGradient=}^{CGColorSpace=}^d^dQ",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                1: {"c_array_length_in_arg": 3, "type_modifier": "n"},
                2: {"c_array_length_in_arg": 3, "type_modifier": "n"},
            },
        },
    ),
    "CGDisplayGetDrawingContext": (b"^{CGContext=}I",),
    "CGEventGetLocation": (
        sel32or64(b"{CGPoint=ff}^{__CGEvent=}", b"{CGPoint=dd}^{__CGEvent=}"),
    ),
    "CGDisplayStreamUpdateGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGRectGetMinY": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGRectGetMinX": (
        sel32or64(
            b"f{CGRect={CGPoint=ff}{CGSize=ff}}", b"d{CGRect={CGPoint=dd}{CGSize=dd}}"
        ),
    ),
    "CGContextSetFont": (b"v^{CGContext=}^{CGFont=}",),
    "CGDisplayShowCursor": (b"iI",),
    "CGContextRestoreGState": (b"v^{CGContext=}",),
    "CGPathRetain": (b"^{CGPath=}^{CGPath=}",),
    "CGPDFDocumentGetNumberOfPages": (
        sel32or64(b"L^{CGPDFDocument=}", b"Q^{CGPDFDocument=}"),
    ),
    "CGAffineTransformMakeScale": (
        sel32or64(b"{CGAffineTransform=ffffff}ff", b"{CGAffineTransform=dddddd}dd"),
    ),
    "CGPathAddCurveToPoint": (
        sel32or64(
            b"v^{CGPath=}^{CGAffineTransform=ffffff}ffffff",
            b"v^{CGPath=}^{CGAffineTransform=dddddd}dddddd",
        ),
        "",
        {"arguments": {1: {"type_modifier": "n"}}},
    ),
    "CGImageCreate": (
        sel32or64(
            b"^{CGImage=}LLLLL^{CGColorSpace=}I^{CGDataProvider=}^fBI",
            b"^{CGImage=}QQQQQ^{CGColorSpace=}I^{CGDataProvider=}^dBi",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                8: {"c_array_of_variable_length": True, "type_modifier": "n"}
            },
        },
    ),
    "CGContextSetShouldSmoothFonts": (b"v^{CGContext=}B",),
    "CGPDFDictionaryGetBoolean": (
        b"B^{CGPDFDictionary=}^c^C",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
    "CGPDFStringGetBytePtr": (
        b"^C^{CGPDFString=}",
        "",
        {"retval": {"c_array_of_variable_length": True}},
    ),
    "CGScreenUnregisterMoveCallback": (
        b"v^?^v",
        "",
        {
            "arguments": {
                0: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"{CGScreenUpdateMoveDelta=ii}"},
                            1: {"type": b"Q"},
                            2: {"type": b"^{CGRect={CGPoint=dd}{CGSize=dd}}"},
                            3: {"type": b"^v"},
                        },
                    }
                }
            }
        },
    ),
    "CGColorGetColorSpace": (b"^{CGColorSpace=}^{CGColor=}",),
    "CGColorConverterRelease": (b"v^{CGColorConversionInfo=}",),
    "CGDisplayStreamStart": (b"i^{CGDisplayStream=}",),
    "CGDisplayAvailableModes": (b"^{__CFArray=}I",),
    "CGColorCreateGenericGrayGamma2_2": (
        b"^{CGColor=}dd",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGEventCreateSourceFromEvent": (
        b"^{__CGEventSource=}^{__CGEvent=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPostKeyboardEvent": (sel32or64(b"iSSi", b"iSSI"),),
    "CGPDFScannerPopStream": (
        b"B^{CGPDFScanner=}^^{CGPDFStream=}",
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGPathCreateMutableCopy": (
        b"^{CGPath=}^{CGPath=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGPathGetTypeID": (sel32or64(b"L", b"Q"),),
    "CGColorSpaceCreateIndexed": (
        sel32or64(
            b"^{CGColorSpace=}^{CGColorSpace=}L^C",
            b"^{CGColorSpace=}^{CGColorSpace=}Q^C",
        ),
        "",
        {
            "retval": {"already_cfretained": True},
            "arguments": {
                2: {"c_array_of_variable_length": True, "type_modifier": "n"}
            },
        },
    ),
    "CGColorSpaceCreateLab": (
        sel32or64(b"^{CGColorSpace=}[3f][3f][4f]", b"^{CGColorSpace=}[3d][3d][4d]"),
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "CGDisplayIOServicePort": (b"II",),
    "CGContextSetFillPattern": (
        sel32or64(b"v^{CGContext=}^{CGPattern=}^f", b"v^{CGContext=}^{CGPattern=}^d"),
        "",
        {"arguments": {2: {"c_array_of_variable_length": True, "type_modifier": "n"}}},
    ),
    "CGSizeMakeWithDictionaryRepresentation": (
        sel32or64(
            b"B^{__CFDictionary=}^{CGSize=ff}", b"B^{__CFDictionary=}^{CGSize=dd}"
        ),
        "",
        {"arguments": {1: {"type_modifier": "o"}}},
    ),
    "CGPDFDocumentUnlockWithPassword": (b"B^{CGPDFDocument=}^c",),
    "CGContextClip": (b"v^{CGContext=}",),
    "CGContextSetFillColorWithColor": (b"v^{CGContext=}^{CGColor=}",),
    "CGPDFDictionaryGetName": (
        b"B^{CGPDFDictionary=}^t^^c",
        "",
        {
            "arguments": {
                1: {"c_array_delimited_by_null": True, "type_modifier": "n"},
                2: {"type_modifier": "o"},
            }
        },
    ),
}
aliases = {
    "CGSizeApplyAffineTransform": "__CGSizeApplyAffineTransform",
    "CG_NULLABLE_ARRAY": "__nullable",
    "CGSizeEqualToSize": "__CGSizeEqualToSize",
    "CGFLOAT_TYPE": "double",
    "CGPointApplyAffineTransform": "__CGPointApplyAffineTransform",
    "CG_LOCAL_32": "CG_LOCAL",
    "CGColorConverterRef": "CGColorConversionInfoRef",
    "kCGBitmapByteOrder16Host": "kCGBitmapByteOrder16Little",
    "CGPointEqualToPoint": "__CGPointEqualToPoint",
    "kCGEventSupressionStateSupressionInterval": "kCGEventSuppressionStateSuppressionInterval",
    "CG_SKYLIGHT_EXTERN_64": "CG_EXTERN",
    "CGEventSupressionState": "CGEventSuppressionState",
    "kCGBitmapByteOrder32Big": "kCGImageByteOrder32Big",
    "CG_PRIVATE_EXTERN": "CG_LOCAL",
    "CG_AVAILABLE_STARTING": "__OSX_AVAILABLE_STARTING",
    "CG_LOCAL": "__private_extern__",
    "cg_nullable": "__nullable",
    "kCGGlyphMax": "kCGFontIndexMax",
    "CG_EXTERN_64": sel32or64("CG_LOCAL", "CG_EXTERN"),
    "CG_NONNULL_ARRAY": "__nonnull",
    "kCGWindowBackingCFNumberType": "kCFNumberSInt32Type",
    "CGFLOAT_MIN": sel32or64("FLT_MIN", "DBL_MIN"),
    "kCGWindowIDCFNumberType": "kCFNumberSInt32Type",
    "CG_LOCAL_64": "CG_LOCAL",
    "kCGBitmapByteOrderMask": "kCGImageByteOrderMask",
    "CGEventNoErr": "kCGErrorSuccess",
    "CGAffineTransformMake": "__CGAffineTransformMake",
    "kCGBitmapByteOrder16Little": "kCGImageByteOrder16Little",
    "CGFLOAT_MAX": sel32or64("FLT_MAX", "DBL_MAX"),
    "kCGBitmapByteOrderDefault": "kCGImageByteOrderDefault",
    "kCGEventSupressionStateRemoteMouseDrag": "kCGEventSuppressionStateRemoteMouseDrag",
    "kCGWindowSharingCFNumberType": "kCFNumberSInt32Type",
    "kCGBitmapByteOrder16Big": "kCGImageByteOrder16Big",
    "CGDisplayNoErr": "kCGErrorSuccess",
    "CG_OBSOLETE": "__CG_DEPRECATED",
    "kCGNumberOfEventSupressionStates": "kCGNumberOfEventSuppressionStates",
    "CG_AVAILABLE_BUT_DEPRECATED": "__OSX_AVAILABLE_BUT_DEPRECATED",
    "CG_EXTERN_32": "CG_EXTERN",
    "kCGBitmapByteOrder32Little": "kCGImageByteOrder32Little",
    "kCGBitmapByteOrder32Host": "kCGBitmapByteOrder32Little",
}
cftypes = [
    ("CGEventRef", b"^{__CGEvent=}", "CGEventGetTypeID", None),
    ("CGEventSourceRef", b"^{__CGEventSource=}", "CGEventSourceGetTypeID", None),
    ("IOSurfaceRef", b"^{__IOSurface=}", None, None),
    ("CGColorRef", b"^{CGColor=}", "CGColorGetTypeID", None),
    ("CGFontRef", b"^{CGFont=}", "CGFontGetTypeID", None),
    (
        "CGColorConversionInfoRef",
        b"^{CGColorConversionInfo=}",
        "CGColorConversionInfoGetTypeID",
        None,
    ),
    ("CGDataConsumerRef", b"^{CGDataConsumer=}", "CGDataConsumerGetTypeID", None),
    ("CGPathRef", b"^{CGPath=}", "CGPathGetTypeID", None),
    ("CGDisplayModeRef", b"^{CGDisplayMode}", "CGDisplayModeGetTypeID", None),
    ("CGGradientRef", b"^{CGGradient=}", "CGGradientGetTypeID", None),
    ("CGDirectDisplay", b"^{CGDirectDisplay=}", "CGDirectDisplayGetTypeID", None),
    ("CGColorSpaceRef", b"^{CGColorSpace=}", "CGColorSpaceGetTypeID", None),
    ("CGPDFDocumentRef", b"^{CGPDFDocument=}", "CGPDFDocumentGetTypeID", None),
    ("CGFunctionRef", b"^{CGFunction=}", "CGFunctionGetTypeID", None),
    ("CGImageRef", b"^{CGImage=}", "CGImageGetTypeID", None),
    ("CGDisplayStreamRef", b"^{CGDisplayStream=}", "CGDisplayStreamGetTypeID", None),
    ("CGPDFPageRef", b"^{CGPDFPage=}", "CGPDFPageGetTypeID", None),
    ("CGLayerRef", b"^{CGLayer=}", "CGLayerGetTypeID", None),
    ("CGPatternRef", b"^{CGPattern=}", "CGPatternGetTypeID", None),
    ("CGPSConverterRef", b"^{CGPSConverter=}", "CGPSConverterGetTypeID", None),
    ("CGContextRef", b"^{CGContext=}", "CGContextGetTypeID", None),
    ("CGShadingRef", b"^{CGShading=}", "CGShadingGetTypeID", None),
    ("CGDataProviderRef", b"^{CGDataProvider=}", "CGDataProviderGetTypeID", None),
    (
        "CGDisplayStreamUpdateRef",
        b"^{CGDisplayStreamUpdate=}",
        "CGDisplayStreamUpdateGetTypeID",
        None,
    ),
]
misc.update(
    {
        "CGPDFContentStreamRef": objc.createOpaquePointerType(
            "CGPDFContentStreamRef", b"^{CGPDFContentStream=}"
        ),
        "CGPDFScannerRef": objc.createOpaquePointerType(
            "CGPDFScannerRef", b"^{CGPDFScanner=}"
        ),
        "CGDirectPaletteRef": objc.createOpaquePointerType(
            "CGDirectPaletteRef", b"^{_CGDirectPaletteRef=}"
        ),
        "CGPDFStringRef": objc.createOpaquePointerType(
            "CGPDFStringRef", b"^{CGPDFString=}"
        ),
        "CGPDFObject": objc.createOpaquePointerType("CGPDFObject", b"^{CGPDFObject=}"),
        "CGPDFOperatorTableRef": objc.createOpaquePointerType(
            "CGPDFOperatorTableRef", b"^{CGPDFOperatorTable}"
        ),
        "CGDisplayConfigRef": objc.createOpaquePointerType(
            "CGDisplayConfigRef", b"^{_CGDisplayConfigRef=}"
        ),
        "CGPDFDictionaryRef": objc.createOpaquePointerType(
            "CGPDFDictionaryRef", b"^{CGPDFDictionary=}"
        ),
        "CGPDFStreamRef": objc.createOpaquePointerType(
            "CGPDFStreamRef", b"^{CGPDFStream=}"
        ),
        "CGEventTapProxy": objc.createOpaquePointerType(
            "CGEventTapProxy", b"^{__CGEventTapProxy=}"
        ),
        "CGPDFArrayRef": objc.createOpaquePointerType(
            "CGPDFArrayRef", b"^{CGPDFArray=}"
        ),
    }
)
expressions = {
    "kCGOverlayWindowLevel": "CGWindowLevelForKey(kCGOverlayWindowLevelKey)",
    "kCGMainMenuWindowLevel": "CGWindowLevelForKey(kCGMainMenuWindowLevelKey)",
    "kCGBaseWindowLevel": "CGWindowLevelForKey(kCGBaseWindowLevelKey)",
    "kCGStatusWindowLevel": "CGWindowLevelForKey(kCGStatusWindowLevelKey)",
    "kCGHelpWindowLevel": "CGWindowLevelForKey(kCGHelpWindowLevelKey)",
    "kCGNormalWindowLevel": "CGWindowLevelForKey(kCGNormalWindowLevelKey)",
    "kCGScreenSaverWindowLevel": "CGWindowLevelForKey(kCGScreenSaverWindowLevelKey)",
    "kCGMaximumWindowLevel": "CGWindowLevelForKey(kCGMaximumWindowLevelKey)",
    "kCGUtilityWindowLevel": "CGWindowLevelForKey(kCGUtilityWindowLevelKey)",
    "kCGCursorWindowLevel": "CGWindowLevelForKey(kCGCursorWindowLevelKey)",
    "kCGAssistiveTechHighWindowLevel": "CGWindowLevelForKey(kCGAssistiveTechHighWindowLevelKey)",
    "kCGModalPanelWindowLevel": "CGWindowLevelForKey(kCGModalPanelWindowLevelKey)",
    "kCGEventFilterMaskPermitAllEvents": "(kCGEventFilterMaskPermitLocalMouseEvents | kCGEventFilterMaskPermitLocalKeyboardEvents | kCGEventFilterMaskPermitSystemDefinedEvents)",
    "kCGMinimumWindowLevel": "CGWindowLevelForKey(kCGMinimumWindowLevelKey)",
    "kCGPopUpMenuWindowLevel": "CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey)",
    "kCGDesktopWindowLevel": "CGWindowLevelForKey(kCGDesktopWindowLevelKey)",
    "kCGFloatingWindowLevel": "CGWindowLevelForKey(kCGFloatingWindowLevelKey)",
    "kCGDraggingWindowLevel": "CGWindowLevelForKey(kCGDraggingWindowLevelKey)",
    "kCGDockWindowLevel": "CGWindowLevelForKey(kCGDockWindowLevelKey)",
    "kCGDesktopIconWindowLevel": "CGWindowLevelForKey(kCGDesktopIconWindowLevelKey)",
    "kCGBackstopMenuLevel": "CGWindowLevelForKey(kCGBackstopMenuLevelKey)",
    "kCGTornOffMenuWindowLevel": "CGWindowLevelForKey(kCGTornOffMenuWindowLevelKey)",
}

# END OF FILE
