{"type": "func", "start": 4299802952, "end": 4299803296, "name": "-[EAGLView setupSurfaceWithSharegroup:]", "pseudocode": "// \n// -[EAGLView setupSurfaceWithSharegroup:] from 0x10049c948 to 0x10049caa0 (344 bytes)\n// \n// 2 xrefs:\n// > -[EAGLView initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:] @ 0x10049c6ac\n// > <???> @ 0x1009d3860\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:05:59 +0000\n// \n\nbool __cdecl -[EAGLView setupSurfaceWithSharegroup:](EAGLView *self, SEL a2, id a3)\n{\n  void *v5; // x21\n  CCES2Renderer *v6; // x0\n  CCES2Renderer *v7; // x20\n  GLenum Error; // w0\n\n  v5 = -[EAGLView layer](self, \"layer\");\n  objc_msgSend(v5, \"setOpaque:\", 1);\n  objc_msgSend(\n    v5,\n    \"setDrawableProperties:\",\n    +[NSDictionary dictionaryWithObjectsAndKeys:](\n      &OBJC_CLASS___NSDictionary,\n      \"dictionaryWithObjectsAndKeys:\",\n      +[NSNumber numberWithBool:](&OBJC_CLASS___NSNumber, \"numberWithBool:\", self->preserveBackbuffer_),\n      kEAGLDrawablePropertyRetainedBacking,\n      self->pixelformat_,\n      kEAGLDrawablePropertyColorFormat,\n      0));\n  v6 = -[CCES2Renderer initWithDepthFormat:withPixelFormat:withSharegroup:withMultiSampling:withNumberOfSamples:](\n         objc_alloc(&OBJC_CLASS___CCES2Renderer),\n         \"initWithDepthFormat:withPixelFormat:withSharegroup:withMultiSampling:withNumberOfSamples:\",\n         self->depthFormat_,\n         -[EAGLView convertPixelFormat:](self, \"convertPixelFormat:\", self->pixelformat_),\n         a3,\n         self->multiSampling_,\n         self->requestedSamples_);\n  v7 = v6;\n  self->renderer_ = (CCESRenderer *)v6;\n  if ( v6 )\n  {\n    self->context_ = -[CCES2Renderer context](v6, \"context\");\n    Error = glGetError();\n    if ( Error )\n      printf(\"OpenGL error 0x%04X in %s %d\\n\", Error, \"-[EAGLView setupSurfaceWithSharegroup:]\", 246);\n  }\n  return v7 != nullptr;\n}", "assembly": "; \n; -[EAGLView setupSurfaceWithSharegroup:] from 0x10049c948 to 0x10049caa0 (344 bytes)\n; \n; 2 xrefs:\n; > -[EAGLView initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:] @ 0x10049c6ac\n; > <???> @ 0x1009d3860\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:05:59 +0000\n; \nSUB             SP, SP, #0x60                                          ; +0x0, 0x10049c948\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x10049c94c\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x10049c950\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x10049c954\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x10049c958\nADD             X29, SP, #0x50                                         ; +0x14, 0x10049c95c\nMOV             X20, X2                                                ; +0x18, 0x10049c960\nMOV             X19, X0                                                ; +0x1c, 0x10049c964\nBL              _objc_msgSend$layer; -[EAGLView layer] ...             ; +0x20, 0x10049c968\nMOV             X21, X0                                                ; +0x24, 0x10049c96c\nMOV             W2, #1                                                 ; +0x28, 0x10049c970\nBL              _objc_msgSend$setOpaque_                               ; +0x2c, 0x10049c974\nADRP            X8, #classRef_NSDictionary@PAGE                        ; +0x30, 0x10049c978\nLDR             X22, [X8,#classRef_NSDictionary@PAGEOFF]; _OBJC_CLASS_$_NSDictionary ; +0x34, 0x10049c97c\nADRP            X8, #classRef_NSNumber@PAGE                            ; +0x38, 0x10049c980\nLDR             X0, [X8,#classRef_NSNumber@PAGEOFF]; _OBJC_CLASS_$_NSNumber ; +0x3c, 0x10049c984\nADRP            X8, #_OBJC_IVAR_$_EAGLView.preserveBackbuffer_@PAGE; bool preserveBackbuffer_; ; +0x40, 0x10049c988\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.preserveBackbuffer_@PAGEOFF]; bool preserveBackbuffer_; ; +0x44, 0x10049c98c\nLDRB            W2, [X19,X8]                                           ; +0x48, 0x10049c990\nBL              _objc_msgSend$numberWithBool_; +[NSNumber numberWithBool:] ... ; +0x4c, 0x10049c994\nMOV             X2, X0                                                 ; +0x50, 0x10049c998\nADRP            X8, #_kEAGLDrawablePropertyRetainedBacking_ptr@PAGE    ; +0x54, 0x10049c99c\nLDR             X8, [X8,#_kEAGLDrawablePropertyRetainedBacking_ptr@PAGEOFF]; _kEAGLDrawablePropertyRetainedBacking ; +0x58, 0x10049c9a0\nLDR             X8, [X8]                                               ; +0x5c, 0x10049c9a4\nADRP            X9, #_OBJC_IVAR_$_EAGLView.pixelformat_@PAGE; NSString *pixelformat_; ; +0x60, 0x10049c9a8\nLDRSW           X23, [X9,#_OBJC_IVAR_$_EAGLView.pixelformat_@PAGEOFF]; NSString *pixelformat_; ; +0x64, 0x10049c9ac\nLDR             X9, [X19,X23]                                          ; +0x68, 0x10049c9b0\nADRP            X10, #_kEAGLDrawablePropertyColorFormat_ptr@PAGE       ; +0x6c, 0x10049c9b4\nLDR             X10, [X10,#_kEAGLDrawablePropertyColorFormat_ptr@PAGEOFF]; _kEAGLDrawablePropertyColorFormat ; +0x70, 0x10049c9b8\nLDR             X10, [X10]                                             ; +0x74, 0x10049c9bc\nSTP             X10, XZR, [SP,#0x50+var_40]                            ; +0x78, 0x10049c9c0\nSTP             X8, X9, [SP,#0x50+var_50]                              ; +0x7c, 0x10049c9c4\nMOV             X0, X22                                                ; +0x80, 0x10049c9c8\nBL              _objc_msgSend$dictionaryWithObjectsAndKeys_; +[NSDictionary dictionaryWithObjectsAndKeys:] ... ; +0x84, 0x10049c9cc\nMOV             X2, X0                                                 ; +0x88, 0x10049c9d0\nMOV             X0, X21                                                ; +0x8c, 0x10049c9d4\nBL              _objc_msgSend$setDrawableProperties_                   ; +0x90, 0x10049c9d8\nADRP            X8, #classRef_CCES2Renderer@PAGE                       ; +0x94, 0x10049c9dc\nLDR             X0, [X8,#classRef_CCES2Renderer@PAGEOFF]; _OBJC_CLASS_$_CCES2Renderer ; Class ; +0x98, 0x10049c9e0\nBL              _objc_alloc                                            ; +0x9c, 0x10049c9e4\nMOV             X21, X0                                                ; +0xa0, 0x10049c9e8\nADRP            X8, #_OBJC_IVAR_$_EAGLView.depthFormat_@PAGE; unsigned int depthFormat_; ; +0xa4, 0x10049c9ec\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.depthFormat_@PAGEOFF]; unsigned int depthFormat_; ; +0xa8, 0x10049c9f0\nLDR             W22, [X19,X8]                                          ; +0xac, 0x10049c9f4\nLDR             X2, [X19,X23]                                          ; +0xb0, 0x10049c9f8\nMOV             X0, X19                                                ; +0xb4, 0x10049c9fc\nBL              _objc_msgSend$convertPixelFormat_; -[EAGLView convertPixelFormat:] ... ; +0xb8, 0x10049ca00\nMOV             X3, X0                                                 ; +0xbc, 0x10049ca04\nADRP            X8, #_OBJC_IVAR_$_EAGLView.multiSampling_@PAGE; bool multiSampling_; ; +0xc0, 0x10049ca08\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.multiSampling_@PAGEOFF]; bool multiSampling_; ; +0xc4, 0x10049ca0c\nLDRB            W5, [X19,X8]                                           ; +0xc8, 0x10049ca10\nADRP            X8, #_OBJC_IVAR_$_EAGLView.requestedSamples_@PAGE; unsigned int requestedSamples_; ; +0xcc, 0x10049ca14\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.requestedSamples_@PAGEOFF]; unsigned int requestedSamples_; ; +0xd0, 0x10049ca18\nLDR             W6, [X19,X8]                                           ; +0xd4, 0x10049ca1c\nMOV             X0, X21                                                ; +0xd8, 0x10049ca20\nMOV             X2, X22                                                ; +0xdc, 0x10049ca24\nMOV             X4, X20                                                ; +0xe0, 0x10049ca28\nBL              _objc_msgSend$initWithDepthFormat_withPixelFormat_withSharegroup_withMultiSampling_withNumberOfSamples_; -[CCES2Renderer initWithDepthFormat:withPixelFormat:withSharegroup:withMultiSampling:withNumberOfSamples:] ... ; +0xe4, 0x10049ca2c\nMOV             X20, X0                                                ; +0xe8, 0x10049ca30\nADRP            X8, #_OBJC_IVAR_$_EAGLView.renderer_@PAGE; CCESRenderer *renderer_; ; +0xec, 0x10049ca34\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.renderer_@PAGEOFF]; CCESRenderer *renderer_; ; +0xf0, 0x10049ca38\nSTR             X0, [X19,X8]                                           ; +0xf4, 0x10049ca3c\nCBZ             X0, loc_10049CA80                                      ; +0xf8, 0x10049ca40\nMOV             X0, X20                                                ; +0xfc, 0x10049ca44\nBL              _objc_msgSend$context; -[CCES2Renderer context] ...    ; +0x100, 0x10049ca48\nADRP            X8, #_OBJC_IVAR_$_EAGLView.context_@PAGE; EAGLContext *context_; ; +0x104, 0x10049ca4c\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.context_@PAGEOFF]; EAGLContext *context_; ; +0x108, 0x10049ca50\nSTR             X0, [X19,X8]                                           ; +0x10c, 0x10049ca54\nBL              _glGetError                                            ; +0x110, 0x10049ca58\nCBZ             W0, loc_10049CA80                                      ; +0x114, 0x10049ca5c\nMOV             W8, #0xF6                                              ; +0x118, 0x10049ca60\nADRL            X9, aEaglviewSetups; \"-[EAGLView setupSurfaceWithSharegroup:]\" ; +0x11c, 0x10049ca64\nSTP             X9, X8, [SP,#0x50+var_48]                              ; +0x124, 0x10049ca6c\nSTR             X0, [SP,#0x50+var_50]                                  ; +0x128, 0x10049ca70\nADRL            X0, aOpenglError0x0; \"OpenGL error 0x%04X in %s %d\\n\"  ; +0x12c, 0x10049ca74\nBL              _printf                                                ; +0x134, 0x10049ca7c\nCMP             X20, #0                                                ; +0x138, 0x10049ca80\nCSET            W0, NE                                                 ; +0x13c, 0x10049ca84\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x140, 0x10049ca88\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x144, 0x10049ca8c\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x148, 0x10049ca90\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0x14c, 0x10049ca94\nADD             SP, SP, #0x60 ; '`'                                    ; +0x150, 0x10049ca98\nRET                                                                    ; +0x154, 0x10049ca9c", "xrefs": ["-[EAGLView initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:] @ 0x10049c6ac", "<???> @ 0x1009d3860"], "is_objc": true, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}