{"type": "func", "start": 4296365712, "end": 4296365824, "name": "BoomScrollLayer::getPage", "pseudocode": "// \n// BoomScrollLayer::getPage from 0x100155690 to 0x100155700 (112 bytes)\n// \n// 12 xrefs:\n// > BoomScrollLayer::repositionPagesLooped @ 0x100154f88\n// > BoomScrollLayer::repositionPagesLooped @ 0x100154fec\n// > BoomScrollLayer::repositionPagesLooped @ 0x100155048\n// > BoomScrollLayer::repositionPagesLooped @ 0x1001550ec\n// > BoomScrollLayer::repositionPagesLooped @ 0x100155100\n// > BoomScrollLayer::repositionPagesLooped @ 0x100155114\n// > BoomScrollLayer::repositionPagesLooped @ 0x100155194\n// > BoomScrollLayer::repositionPagesLooped @ 0x1001551a4\n// > BoomScrollLayer::repositionPagesLooped @ 0x1001551b4\n// > sub_100482C7C @ 0x100482c8c\n// > sub_100482C98 @ 0x100482ca8\n// > LevelSelectLayer::onPlay @ 0x1004842cc\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 10:59:41 +0000\n// \n\n__int64 __fastcall BoomScrollLayer::getPage(__int64 a1, __int64 a2)\n{\n  int v2; // w19\n  int v4; // w8\n  __int64 v5; // x0\n  unsigned int v6; // w0\n  int v7; // w9\n  unsigned int v8; // w9\n  unsigned int v9; // w10\n  int v10; // w9\n  unsigned int v11; // w9\n\n  v2 = a2;\n  v4 = *(unsigned __int8 *)(a1 + 456);\n  v5 = *(_QWORD *)(a1 + 480);\n  if ( v4 == 1 )\n  {\n    v6 = sub_1002E757C(v5);\n    if ( v2 )\n      v7 = -1;\n    else\n      v7 = 0;\n    v8 = v7 - v2;\n    if ( v6 <= 1 )\n      v9 = 1;\n    else\n      v9 = v6;\n    v10 = v8 / v9;\n    if ( v2 )\n      ++v10;\n    v11 = v2 + v6 * v10;\n    if ( v2 <= 0 )\n      a2 = v11;\n    else\n      a2 = (unsigned int)(v2 % (int)v6);\n    v5 = *(_QWORD *)(a1 + 480);\n  }\n  return sub_1002E75A0(v5, a2);\n}", "assembly": "; \n; BoomScrollLayer::getPage from 0x100155690 to 0x100155700 (112 bytes)\n; \n; 12 xrefs:\n; > BoomScrollLayer::repositionPagesLooped @ 0x100154f88\n; > BoomScrollLayer::repositionPagesLooped @ 0x100154fec\n; > BoomScrollLayer::repositionPagesLooped @ 0x100155048\n; > BoomScrollLayer::repositionPagesLooped @ 0x1001550ec\n; > BoomScrollLayer::repositionPagesLooped @ 0x100155100\n; > BoomScrollLayer::repositionPagesLooped @ 0x100155114\n; > BoomScrollLayer::repositionPagesLooped @ 0x100155194\n; > BoomScrollLayer::repositionPagesLooped @ 0x1001551a4\n; > BoomScrollLayer::repositionPagesLooped @ 0x1001551b4\n; > sub_100482C7C @ 0x100482c8c\n; > sub_100482C98 @ 0x100482ca8\n; > LevelSelectLayer::onPlay @ 0x1004842cc\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 10:59:41 +0000\n; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x100155690\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100155694\nADD             X29, SP, #0x10                                         ; +0x8, 0x100155698\nMOV             X19, X1                                                ; +0xc, 0x10015569c\nMOV             X20, X0                                                ; +0x10, 0x1001556a0\nLDRB            W8, [X0,#0x1C8]                                        ; +0x14, 0x1001556a4\nLDR             X0, [X0,#0x1E0]                                        ; +0x18, 0x1001556a8\nCMP             W8, #1                                                 ; +0x1c, 0x1001556ac\nB.NE            loc_1001556F0                                          ; +0x20, 0x1001556b0\nBL              sub_1002E757C                                          ; +0x24, 0x1001556b4\nSDIV            W8, W19, W0                                            ; +0x28, 0x1001556b8\nMSUB            W8, W8, W0, W19                                        ; +0x2c, 0x1001556bc\nCMP             W19, #0                                                ; +0x30, 0x1001556c0\nCSETM           W9, NE                                                 ; +0x34, 0x1001556c4\nSUB             W9, W9, W19                                            ; +0x38, 0x1001556c8\nCMP             W0, #1                                                 ; +0x3c, 0x1001556cc\nCSINC           W10, W0, WZR, HI                                       ; +0x40, 0x1001556d0\nCMP             W19, #0                                                ; +0x44, 0x1001556d4\nUDIV            W9, W9, W10                                            ; +0x48, 0x1001556d8\nCINC            W9, W9, NE                                             ; +0x4c, 0x1001556dc\nMADD            W9, W0, W9, W19                                        ; +0x50, 0x1001556e0\nCSEL            W1, W8, W9, GT                                         ; +0x54, 0x1001556e4\nLDR             X0, [X20,#0x1E0]                                       ; +0x58, 0x1001556e8\nB               loc_1001556F4                                          ; +0x5c, 0x1001556ec\nMOV             X1, X19                                                ; +0x60, 0x1001556f0\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x64, 0x1001556f4\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x68, 0x1001556f8\nB               sub_1002E75A0                                          ; +0x6c, 0x1001556fc", "xrefs": ["BoomScrollLayer::repositionPagesLooped @ 0x100154f88", "BoomScrollLayer::repositionPagesLooped @ 0x100154fec", "BoomScrollLayer::repositionPagesLooped @ 0x100155048", "BoomScrollLayer::repositionPagesLooped @ 0x1001550ec", "BoomScrollLayer::repositionPagesLooped @ 0x100155100", "BoomScrollLayer::repositionPagesLooped @ 0x100155114", "BoomScrollLayer::repositionPagesLooped @ 0x100155194", "BoomScrollLayer::repositionPagesLooped @ 0x1001551a4", "BoomScrollLayer::repositionPagesLooped @ 0x1001551b4", "sub_100482C7C @ 0x100482c8c", "sub_100482C98 @ 0x100482ca8", "LevelSelectLayer::onPlay @ 0x1004842cc"], "is_objc": false, "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"}