{"type": "func", "start": 6854404, "end": 6854600, "name": "BoomScrollLayer::pageNumberForPosition", "pseudocode": "// \n// BoomScrollLayer::pageNumberForPosition from 0x689704 to 0x6897c8 (196 bytes)\n// \n// 5 xrefs:\n// > BoomScrollLayer::updateDots @ 0x6898e4\n// > BoomScrollLayer::moveToPageEnded @ 0x689ad8\n// > BoomScrollLayer::ccTouchEnded @ 0x68a3e8\n// > BoomScrollLayer::ccTouchMoved @ 0x68a9b4\n// > <???> @ 0xf1540\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 12:50:32 +0000\n// \n\n__int64 __fastcall BoomScrollLayer::pageNumberForPosition(cocos2d::CCArray **a1)\n{\n  float v2; // s8\n  float v3; // s0\n  int v4; // w19\n\n  v2 = *(float *)(*(__int64 (__fastcall **)(cocos2d::CCArray *))(*(_QWORD *)a1[63] + 192LL))(a1[63]);\n  v3 = (float)-v2\n     / (float)(*(float *)(*((__int64 (__fastcall **)(cocos2d::CCArray **))*a1 + 41))(a1) - *((float *)a1 + 148));\n  v4 = vcvtps_s32_f32(v3);\n  if ( (float)((float)v4 - v3) >= 0.5 )\n    --v4;\n  if ( *((_BYTE *)a1 + 436) )\n    return (unsigned int)v4;\n  if ( v4 < 0 )\n    v4 = 0;\n  if ( v4 < (int)(BoomScrollLayer::getTotalPages(a1) - 1) )\n    return (unsigned int)v4;\n  else\n    return (unsigned int)BoomScrollLayer::getTotalPages(a1) - 1;\n}", "assembly": "; \n; BoomScrollLayer::pageNumberForPosition from 0x689704 to 0x6897c8 (196 bytes)\n; \n; 5 xrefs:\n; > BoomScrollLayer::updateDots @ 0x6898e4\n; > BoomScrollLayer::moveToPageEnded @ 0x689ad8\n; > BoomScrollLayer::ccTouchEnded @ 0x68a3e8\n; > BoomScrollLayer::ccTouchMoved @ 0x68a9b4\n; > <???> @ 0xf1540\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 12:50:32 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x689704\nMOV             X29, SP                                                ; +0x4, 0x689708\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x68970c\nSTR             D8, [SP,#0x30+var_10]                                  ; +0xc, 0x689710\nMOV             X20, X0                                                ; +0x10, 0x689714\nLDR             X1, [X0,#0x1F8]                                        ; +0x14, 0x689718\nMOV             X0, X1                                                 ; +0x18, 0x68971c\nLDR             X1, [X1]                                               ; +0x1c, 0x689720\nLDR             X1, [X1,#0xC0]                                         ; +0x20, 0x689724\nBLR             X1                                                     ; +0x24, 0x689728\nLDR             X1, [X20]                                              ; +0x28, 0x68972c\nLDR             S8, [X0]                                               ; +0x2c, 0x689730\nMOV             X0, X20                                                ; +0x30, 0x689734\nFNEG            S8, S8                                                 ; +0x34, 0x689738\nLDR             X1, [X1,#0x148]                                        ; +0x38, 0x68973c\nBLR             X1                                                     ; +0x3c, 0x689740\nLDR             S1, [X20,#0x250]                                       ; +0x40, 0x689744\nLDRB            W1, [X20,#0x1B4]                                       ; +0x44, 0x689748\nLDR             S0, [X0]                                               ; +0x48, 0x68974c\nFSUB            S0, S0, S1                                             ; +0x4c, 0x689750\nFDIV            S0, S8, S0                                             ; +0x50, 0x689754\nFCVTPS          W19, S0                                                ; +0x54, 0x689758\nSCVTF           S1, W19                                                ; +0x58, 0x68975c\nSUB             W0, W19, #1                                            ; +0x5c, 0x689760\nFSUB            S0, S1, S0                                             ; +0x60, 0x689764\nFMOV            S1, #0.5                                               ; +0x64, 0x689768\nFCMP            S0, S1                                                 ; +0x68, 0x68976c\nCSEL            W19, W19, W0, LT                                       ; +0x6c, 0x689770\nCBZ             W1, loc_68978C                                         ; +0x70, 0x689774\nMOV             W0, W19                                                ; +0x74, 0x689778\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x78, 0x68977c\nLDR             D8, [SP,#0x30+var_10]                                  ; +0x7c, 0x689780\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x80, 0x689784\nRET                                                                    ; +0x84, 0x689788\nCMP             W19, WZR                                               ; +0x88, 0x68978c\nMOV             X0, X20; this                                          ; +0x8c, 0x689790\nCSEL            W19, W19, WZR, GE                                      ; +0x90, 0x689794\nBL              _ZN15BoomScrollLayer13getTotalPagesEv; BoomScrollLayer::getTotalPages(void) ; +0x94, 0x689798\nSUB             W0, W0, #1                                             ; +0x98, 0x68979c\nCMP             W19, W0                                                ; +0x9c, 0x6897a0\nB.LT            loc_689778                                             ; +0xa0, 0x6897a4\nMOV             X0, X20; this                                          ; +0xa4, 0x6897a8\nBL              _ZN15BoomScrollLayer13getTotalPagesEv; BoomScrollLayer::getTotalPages(void) ; +0xa8, 0x6897ac\nSUB             W19, W0, #1                                            ; +0xac, 0x6897b0\nMOV             W0, W19                                                ; +0xb0, 0x6897b4\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xb4, 0x6897b8\nLDR             D8, [SP,#0x30+var_10]                                  ; +0xb8, 0x6897bc\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xbc, 0x6897c0\nRET                                                                    ; +0xc0, 0x6897c4", "xrefs": ["BoomScrollLayer::updateDots @ 0x6898e4", "BoomScrollLayer::moveToPageEnded @ 0x689ad8", "BoomScrollLayer::ccTouchEnded @ 0x68a3e8", "BoomScrollLayer::ccTouchMoved @ 0x68a9b4", "<???> @ 0xf1540"], "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"}