{"type": "func", "start": 4299803512, "end": 4299803884, "name": "-[EAGLView swapBuffers]", "pseudocode": "// \n// -[EAGLView swapBuffers] from 0x10049cb78 to 0x10049ccec (372 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x1009d38a8\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\nvoid __cdecl -[EAGLView swapBuffers](EAGLView *self, SEL a2)\n{\n  unsigned int depthFormat; // w8\n  __int64 v4; // x1\n  __int64 v5; // [xsp+0h] [xbp-30h] BYREF\n\n  if ( self->multiSampling_ )\n  {\n    glBindFramebuffer(0x8CA8u, (GLuint)-[CCESRenderer msaaFrameBuffer](self->renderer_, \"msaaFrameBuffer\"));\n    glBindFramebuffer(0x8CA9u, (GLuint)-[CCESRenderer defaultFrameBuffer](self->renderer_, \"defaultFrameBuffer\"));\n    glResolveMultisampleFramebufferAPPLE();\n  }\n  if ( self->discardFramebufferSupported_ )\n  {\n    depthFormat = self->depthFormat_;\n    if ( self->multiSampling_ )\n    {\n      if ( depthFormat )\n      {\n        v5 = 0x8D0000008CE0LL;\n        v4 = 2;\n      }\n      else\n      {\n        LODWORD(v5) = 36064;\n        v4 = 1;\n      }\n      glDiscardFramebufferEXT(36008, v4, &v5);\n      glBindRenderbuffer(0x8D41u, (GLuint)-[CCESRenderer colorRenderBuffer](self->renderer_, \"colorRenderBuffer\", v5));\n    }\n    else if ( depthFormat )\n    {\n      LODWORD(v5) = 36096;\n      glDiscardFramebufferEXT(36160, 1, &v5);\n    }\n  }\n  -[EAGLContext presentRenderbuffer:](self->context_, \"presentRenderbuffer:\", 36161);\n  if ( self->multiSampling_ )\n    glBindFramebuffer(0x8D40u, (GLuint)-[CCESRenderer msaaFrameBuffer](self->renderer_, \"msaaFrameBuffer\"));\n}", "assembly": "; \n; -[EAGLView swapBuffers] from 0x10049cb78 to 0x10049ccec (372 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x1009d38a8\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, #0x40                                          ; +0x0, 0x10049cb78\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x10049cb7c\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x10049cb80\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x10049cb84\nADD             X29, SP, #0x30                                         ; +0x10, 0x10049cb88\nMOV             X19, X0                                                ; +0x14, 0x10049cb8c\nADRP            X8, #___stack_chk_guard_ptr@PAGE                       ; +0x18, 0x10049cb90\nLDR             X8, [X8,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x1c, 0x10049cb94\nLDR             X8, [X8]                                               ; +0x20, 0x10049cb98\nSTR             X8, [SP,#0x30+var_28]                                  ; +0x24, 0x10049cb9c\nADRP            X8, #_OBJC_IVAR_$_EAGLView.multiSampling_@PAGE; bool multiSampling_; ; +0x28, 0x10049cba0\nLDRSW           X21, [X8,#_OBJC_IVAR_$_EAGLView.multiSampling_@PAGEOFF]; bool multiSampling_; ; +0x2c, 0x10049cba4\nLDRB            W8, [X0,X21]                                           ; +0x30, 0x10049cba8\nADRP            X20, #_OBJC_IVAR_$_EAGLView.renderer_@PAGE; CCESRenderer *renderer_; ; +0x34, 0x10049cbac\nCMP             W8, #1                                                 ; +0x38, 0x10049cbb0\nB.NE            loc_10049CBE8                                          ; +0x3c, 0x10049cbb4\nLDRSW           X22, [X20,#_OBJC_IVAR_$_EAGLView.renderer_@PAGEOFF]; CCESRenderer *renderer_; ; +0x40, 0x10049cbb8\nLDR             X0, [X19,X22]                                          ; +0x44, 0x10049cbbc\nBL              _objc_msgSend$msaaFrameBuffer; -[CCESRenderer msaaFrameBuffer] ... ; +0x48, 0x10049cbc0\nMOV             X1, X0; framebuffer                                    ; +0x4c, 0x10049cbc4\nMOV             W0, #0x8CA8; target                                    ; +0x50, 0x10049cbc8\nBL              _glBindFramebuffer                                     ; +0x54, 0x10049cbcc\nLDR             X0, [X19,X22]                                          ; +0x58, 0x10049cbd0\nBL              _objc_msgSend$defaultFrameBuffer; -[CCESRenderer defaultFrameBuffer] ... ; +0x5c, 0x10049cbd4\nMOV             X1, X0; framebuffer                                    ; +0x60, 0x10049cbd8\nMOV             W0, #0x8CA9; target                                    ; +0x64, 0x10049cbdc\nBL              _glBindFramebuffer                                     ; +0x68, 0x10049cbe0\nBL              _glResolveMultisampleFramebufferAPPLE                  ; +0x6c, 0x10049cbe4\nADRP            X8, #_OBJC_IVAR_$_EAGLView.discardFramebufferSupported_@PAGE; bool discardFramebufferSupported_; ; +0x70, 0x10049cbe8\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.discardFramebufferSupported_@PAGEOFF]; bool discardFramebufferSupported_; ; +0x74, 0x10049cbec\nLDRB            W8, [X19,X8]                                           ; +0x78, 0x10049cbf0\nCMP             W8, #1                                                 ; +0x7c, 0x10049cbf4\nB.NE            loc_10049CC84                                          ; +0x80, 0x10049cbf8\nLDRB            W9, [X19,X21]                                          ; +0x84, 0x10049cbfc\nADRP            X8, #_OBJC_IVAR_$_EAGLView.depthFormat_@PAGE; unsigned int depthFormat_; ; +0x88, 0x10049cc00\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.depthFormat_@PAGEOFF]; unsigned int depthFormat_; ; +0x8c, 0x10049cc04\nLDR             W8, [X19,X8]                                           ; +0x90, 0x10049cc08\nCMP             W9, #1                                                 ; +0x94, 0x10049cc0c\nB.NE            loc_10049CC34                                          ; +0x98, 0x10049cc10\nCBZ             W8, loc_10049CC54                                      ; +0x9c, 0x10049cc14\nMOV             X8, #0x8D0000008CE0                                    ; +0xa0, 0x10049cc18\nSTR             X8, [SP,#0x30+var_30]                                  ; +0xa8, 0x10049cc20\nMOV             X2, SP                                                 ; +0xac, 0x10049cc24\nMOV             W0, #0x8CA8                                            ; +0xb0, 0x10049cc28\nMOV             W1, #2                                                 ; +0xb4, 0x10049cc2c\nB               loc_10049CC68                                          ; +0xb8, 0x10049cc30\nCBZ             W8, loc_10049CC84                                      ; +0xbc, 0x10049cc34\nMOV             W8, #0x8D00                                            ; +0xc0, 0x10049cc38\nSTR             W8, [SP,#0x30+var_30]                                  ; +0xc4, 0x10049cc3c\nMOV             X2, SP                                                 ; +0xc8, 0x10049cc40\nMOV             W0, #0x8D40                                            ; +0xcc, 0x10049cc44\nMOV             W1, #1                                                 ; +0xd0, 0x10049cc48\nBL              _glDiscardFramebufferEXT                               ; +0xd4, 0x10049cc4c\nB               loc_10049CC84                                          ; +0xd8, 0x10049cc50\nMOV             W8, #0x8CE0                                            ; +0xdc, 0x10049cc54\nSTR             W8, [SP,#0x30+var_30]                                  ; +0xe0, 0x10049cc58\nMOV             X2, SP                                                 ; +0xe4, 0x10049cc5c\nMOV             W0, #0x8CA8                                            ; +0xe8, 0x10049cc60\nMOV             W1, #1                                                 ; +0xec, 0x10049cc64\nBL              _glDiscardFramebufferEXT                               ; +0xf0, 0x10049cc68\nLDRSW           X8, [X20,#_OBJC_IVAR_$_EAGLView.renderer_@PAGEOFF]; CCESRenderer *renderer_; ; +0xf4, 0x10049cc6c\nLDR             X0, [X19,X8]                                           ; +0xf8, 0x10049cc70\nBL              _objc_msgSend$colorRenderBuffer; -[CCESRenderer colorRenderBuffer] ... ; +0xfc, 0x10049cc74\nMOV             X1, X0; renderbuffer                                   ; +0x100, 0x10049cc78\nMOV             W0, #0x8D41; target                                    ; +0x104, 0x10049cc7c\nBL              _glBindRenderbuffer                                    ; +0x108, 0x10049cc80\nADRP            X8, #_OBJC_IVAR_$_EAGLView.context_@PAGE; EAGLContext *context_; ; +0x10c, 0x10049cc84\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.context_@PAGEOFF]; EAGLContext *context_; ; +0x110, 0x10049cc88\nLDR             X0, [X19,X8]                                           ; +0x114, 0x10049cc8c\nMOV             W2, #0x8D41                                            ; +0x118, 0x10049cc90\nBL              _objc_msgSend$presentRenderbuffer_; -[EAGLContext presentRenderbuffer:] ... ; +0x11c, 0x10049cc94\nLDRB            W8, [X19,X21]                                          ; +0x120, 0x10049cc98\nCMP             W8, #1                                                 ; +0x124, 0x10049cc9c\nB.NE            loc_10049CCBC                                          ; +0x128, 0x10049cca0\nLDRSW           X8, [X20,#_OBJC_IVAR_$_EAGLView.renderer_@PAGEOFF]; CCESRenderer *renderer_; ; +0x12c, 0x10049cca4\nLDR             X0, [X19,X8]                                           ; +0x130, 0x10049cca8\nBL              _objc_msgSend$msaaFrameBuffer; -[CCESRenderer msaaFrameBuffer] ... ; +0x134, 0x10049ccac\nMOV             X1, X0; framebuffer                                    ; +0x138, 0x10049ccb0\nMOV             W0, #0x8D40; target                                    ; +0x13c, 0x10049ccb4\nBL              _glBindFramebuffer                                     ; +0x140, 0x10049ccb8\nLDR             X8, [SP,#0x30+var_28]                                  ; +0x144, 0x10049ccbc\nADRP            X9, #___stack_chk_guard_ptr@PAGE                       ; +0x148, 0x10049ccc0\nLDR             X9, [X9,#___stack_chk_guard_ptr@PAGEOFF]; ___stack_chk_guard ; +0x14c, 0x10049ccc4\nLDR             X9, [X9]                                               ; +0x150, 0x10049ccc8\nCMP             X9, X8                                                 ; +0x154, 0x10049cccc\nB.NE            loc_10049CCE8                                          ; +0x158, 0x10049ccd0\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x15c, 0x10049ccd4\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x160, 0x10049ccd8\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x164, 0x10049ccdc\nADD             SP, SP, #0x40 ; '@'                                    ; +0x168, 0x10049cce0\nRET                                                                    ; +0x16c, 0x10049cce4\nBL              ___stack_chk_fail                                      ; +0x170, 0x10049cce8", "xrefs": ["<???> @ 0x1009d38a8"], "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"}