{"type": "func", "start": 4296998148, "end": 4296998256, "name": "GJBaseGameLayer::maxZOrderForShaderZ", "pseudocode": "// \n// GJBaseGameLayer::maxZOrderForShaderZ from 0x1001efd04 to 0x1001efd70 (108 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::triggerGradientCommand @ 0x1001efa88\n// > GJBaseGameLayer::updateShaderLayer @ 0x1001f17f8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall GJBaseGameLayer::maxZOrderForShaderZ(GJBaseGameLayer *a1, int a2)\n{\n  if ( (unsigned int)a2 <= 0xF )\n  {\n    if ( ((1 << a2) & 0x7EF8) != 0 )\n      return GJBaseGameLayer::minZOrderForShaderZ(a1, a2 + 1) - 1;\n    if ( a2 == 8 )\n      return 61;\n    if ( a2 == 15 )\n      return 1400;\n  }\n  if ( (unsigned int)(a2 - 1) >= 2 )\n    return 0;\n  else\n    return -1600;\n}", "assembly": "; \n; GJBaseGameLayer::maxZOrderForShaderZ from 0x1001efd04 to 0x1001efd70 (108 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::triggerGradientCommand @ 0x1001efa88\n; > GJBaseGameLayer::updateShaderLayer @ 0x1001f17f8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nCMP             W1, #0xF                                               ; +0x0, 0x1001efd04\nB.HI            loc_1001EFD54                                          ; +0x4, 0x1001efd08\nMOV             W8, #1                                                 ; +0x8, 0x1001efd0c\nLSL             W8, W8, W1                                             ; +0xc, 0x1001efd10\nMOV             W9, #0x7EF8                                            ; +0x10, 0x1001efd14\nTST             W8, W9                                                 ; +0x14, 0x1001efd18\nB.EQ            loc_1001EFD3C                                          ; +0x18, 0x1001efd1c\nSTP             X29, X30, [SP,#var_10]!                                ; +0x1c, 0x1001efd20\nMOV             X29, SP                                                ; +0x20, 0x1001efd24\nADD             W1, W1, #1                                             ; +0x24, 0x1001efd28\nBL              GJBaseGameLayer__minZOrderForShaderZ                   ; +0x28, 0x1001efd2c\nSUB             W0, W0, #1                                             ; +0x2c, 0x1001efd30\nLDP             X29, X30, [SP+0x10+var_10],#0x10                       ; +0x30, 0x1001efd34\nRET                                                                    ; +0x34, 0x1001efd38\nCMP             W1, #8                                                 ; +0x38, 0x1001efd3c\nB.EQ            loc_1001EFD68                                          ; +0x3c, 0x1001efd40\nCMP             W1, #0xF                                               ; +0x40, 0x1001efd44\nB.NE            loc_1001EFD54                                          ; +0x44, 0x1001efd48\nMOV             W0, #0x578                                             ; +0x48, 0x1001efd4c\nRET                                                                    ; +0x4c, 0x1001efd50\nMOV             W8, #0xFFFFF9C0                                        ; +0x50, 0x1001efd54\nSUB             W9, W1, #1                                             ; +0x54, 0x1001efd58\nCMP             W9, #2                                                 ; +0x58, 0x1001efd5c\nCSEL            W0, W8, WZR, CC                                        ; +0x5c, 0x1001efd60\nRET                                                                    ; +0x60, 0x1001efd64\nMOV             W0, #0x3D ; '='                                        ; +0x64, 0x1001efd68\nRET                                                                    ; +0x68, 0x1001efd6c", "xrefs": ["GJBaseGameLayer::triggerGradientCommand @ 0x1001efa88", "GJBaseGameLayer::updateShaderLayer @ 0x1001f17f8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}