{"type": "func", "start": 3937666, "end": 3937802, "name": "BoomScrollLayer::pageNumberForPosition", "pseudocode": "// \n// BoomScrollLayer::pageNumberForPosition from 0x3c1582 to 0x3c160a (136 bytes)\n// \n// 4 xrefs:\n// > BoomScrollLayer::updateDots @ 0x3c16b6\n// > BoomScrollLayer::moveToPageEnded @ 0x3c17f0\n// > BoomScrollLayer::ccTouchEnded @ 0x3c1e4e\n// > BoomScrollLayer::ccTouchMoved @ 0x3c21fa\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:46:31 +0000\n// \n\nint __fastcall BoomScrollLayer::pageNumberForPosition(int a1)\n{\n  float v2; // s17\n  float v3; // s16\n  int v4; // r4\n\n  v2 = *(float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(a1 + 384) + 96))(*(_DWORD *)(a1 + 384));\n  v3 = (float)-v2 / (float)(*(float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 164))(a1) - *(float *)(a1 + 464));\n  v4 = (int)ceilf(v3);\n  if ( (float)((float)v4 - v3) >= 0.5 )\n    --v4;\n  if ( !*(_BYTE *)(a1 + 336) )\n  {\n    v4 &= ~(v4 >> 31);\n    if ( BoomScrollLayer::getTotalPages((cocos2d::CCArray **)a1) - 1 <= v4 )\n      return BoomScrollLayer::getTotalPages((cocos2d::CCArray **)a1) - 1;\n  }\n  return v4;\n}", "assembly": "; \n; BoomScrollLayer::pageNumberForPosition from 0x3c1582 to 0x3c160a (136 bytes)\n; \n; 4 xrefs:\n; > BoomScrollLayer::updateDots @ 0x3c16b6\n; > BoomScrollLayer::moveToPageEnded @ 0x3c17f0\n; > BoomScrollLayer::ccTouchEnded @ 0x3c1e4e\n; > BoomScrollLayer::ccTouchMoved @ 0x3c21fa\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:46:31 +0000\n; \nPUSH            {R3-R5,LR}                                             ; +0x0, 0x3c1582\nMOV             R5, R0                                                 ; +0x2, 0x3c1584\nVPUSH           {D8}                                                   ; +0x4, 0x3c1586\nLDR.W           R0, [R0,#0x180]                                        ; +0x8, 0x3c158a\nLDR             R3, [R0]                                               ; +0xc, 0x3c158e\nLDR             R3, [R3,#0x60]                                         ; +0xe, 0x3c1590\nBLX             R3                                                     ; +0x10, 0x3c1592\nLDR             R3, [R5]                                               ; +0x12, 0x3c1594\nLDR.W           R3, [R3,#0xA4]                                         ; +0x14, 0x3c1596\nVLDR            S17, [R0]                                              ; +0x18, 0x3c159a\nMOV             R0, R5                                                 ; +0x1c, 0x3c159e\nBLX             R3                                                     ; +0x1e, 0x3c15a0\nVLDR            S16, [R5,#0x1D0]                                       ; +0x20, 0x3c15a2\nVNEG.F32        S17, S17                                               ; +0x24, 0x3c15a6\nVLDR            S15, [R0]                                              ; +0x28, 0x3c15aa\nVSUB.F32        S16, S15, S16                                          ; +0x2c, 0x3c15ae\nVDIV.F32        S16, S17, S16                                          ; +0x30, 0x3c15b2\nVMOV            R0, S16; x                                             ; +0x34, 0x3c15b6\nBLX             ceilf                                                  ; +0x38, 0x3c15ba\nLDRB.W          R3, [R5,#0x150]                                        ; +0x3c, 0x3c15be\nVMOV            S15, R0                                                ; +0x40, 0x3c15c2\nVCVT.S32.F32    S15, S15                                               ; +0x44, 0x3c15c6\nVMOV            R4, S15                                                ; +0x48, 0x3c15ca\nVCVT.F32.S32    S15, S15                                               ; +0x4c, 0x3c15ce\nVSUB.F32        S16, S15, S16                                          ; +0x50, 0x3c15d2\nVMOV.F32        S15, #0.5                                              ; +0x54, 0x3c15d6\nVCMPE.F32       S16, S15                                               ; +0x58, 0x3c15da\nVMRS            APSR_nzcv, FPSCR                                       ; +0x5c, 0x3c15de\nIT GE                                                                  ; +0x60, 0x3c15e2\nADDGE.W         R4, R4, #0xFFFFFFFF                                    ; +0x62, 0x3c15e4\nCBNZ            R3, loc_3C1602                                         ; +0x66, 0x3c15e8\nMOV             R0, R5; this                                           ; +0x68, 0x3c15ea\nBIC.W           R4, R4, R4,ASR#31                                      ; +0x6a, 0x3c15ec\nBL              _ZN15BoomScrollLayer13getTotalPagesEv; BoomScrollLayer::getTotalPages(void) ; +0x6e, 0x3c15f0\nSUBS            R0, #1                                                 ; +0x72, 0x3c15f4\nCMP             R0, R4                                                 ; +0x74, 0x3c15f6\nBGT             loc_3C1602                                             ; +0x76, 0x3c15f8\nMOV             R0, R5; this                                           ; +0x78, 0x3c15fa\nBL              _ZN15BoomScrollLayer13getTotalPagesEv; BoomScrollLayer::getTotalPages(void) ; +0x7a, 0x3c15fc\nSUBS            R4, R0, #1                                             ; +0x7e, 0x3c1600\nVPOP            {D8}                                                   ; +0x80, 0x3c1602\nMOV             R0, R4                                                 ; +0x84, 0x3c1606\nPOP             {R3-R5,PC}                                             ; +0x86, 0x3c1608", "xrefs": ["BoomScrollLayer::updateDots @ 0x3c16b6", "BoomScrollLayer::moveToPageEnded @ 0x3c17f0", "BoomScrollLayer::ccTouchEnded @ 0x3c1e4e", "BoomScrollLayer::ccTouchMoved @ 0x3c21fa"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}