{"type": "func", "start": 7764124, "end": 7764584, "name": "DtLabelPlacer::place", "pseudocode": "// \n// DtLabelPlacer::place from 0x76789c to 0x767a68 (460 bytes)\n// \n// 2 xrefs:\n// > DeathHistogram::setData @ 0x767d6a\n// > DeathHistogram::setSurvival @ 0x7682c8\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:59:08 +0000\n// \n\nint __fastcall DtLabelPlacer::place(DtLabelPlacer *this, cocos2d::CCNode *a2, const char *a3, float a4, float a5)\n{\n  cocos2d::CCString *v8; // r0\n  char *CString; // r0\n  const char *v10; // r2\n  cocos2d::CCLabelBMFont *v11; // r0\n  int v12; // r0\n  int v13; // r0\n  int v14; // r5\n  float v15; // s16\n  unsigned int v16; // r3\n  void (__fastcall *v17)(int, int *); // r11\n  float *v18; // r4\n  float *v19; // r2\n  int i; // r3\n  float v21; // r1\n  float v22; // r2\n  float v23; // r3\n  int v25; // [sp+Ch] [bp+0h] BYREF\n  unsigned int v26; // [sp+10h] [bp+4h]\n  cocos2d::CCLabelBMFont *v27; // [sp+14h] [bp+8h]\n  float v28[2]; // [sp+18h] [bp+Ch] BYREF\n  float v29; // [sp+20h] [bp+14h]\n  float v30; // [sp+24h] [bp+18h]\n  int v31; // [sp+28h] [bp+1Ch] BYREF\n  float v32; // [sp+2Ch] [bp+20h]\n  float v33; // [sp+30h] [bp+24h]\n  float v34; // [sp+34h] [bp+28h]\n  float v35; // [sp+38h] [bp+2Ch]\n\n  v25 = 0;\n  v26 = 0;\n  v27 = nullptr;\n  if ( (int)a3 <= 9999 )\n  {\n    if ( (int)a3 < 1000 )\n    {\n      v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", a3);\n    }\n    else\n    {\n      v12 = (int)(a3 + 50) / 100;\n      if ( v12 == 100 )\n        v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%ik\", &byte_9[1]);\n      else\n        v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                    (cocos2d::CCString *)\"%i.%ik\",\n                                    (const char *)(v12 / 10),\n                                    (int)(a3 + 50) / 100 % 10);\n    }\n  }\n  else\n  {\n    v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"%ik\",\n                                (const char *)((int)(a3 + 500) / 1000));\n  }\n  CString = (char *)cocos2d::CCString::getCString(v8);\n  std::string::assign(&v25, CString);\n  if ( (v25 & 1) != 0 )\n    v11 = v27;\n  else\n    v11 = (cocos2d::CCLabelBMFont *)((char *)&v25 + 1);\n  v13 = cocos2d::CCLabelBMFont::create(v11, \"bigFont.fnt\", v10);\n  v14 = v13;\n  v15 = 0.26;\n  if ( (v25 & 1) != 0 )\n    v16 = v26;\n  else\n    v16 = (int)(unsigned __int8)v25 >> 1;\n  if ( v16 < 3 )\n    v15 = 0.32;\n  (*(void (__fastcall **)(int, float, int))(*(_DWORD *)v13 + 80))(\n    v13,\n    COERCE_FLOAT(LODWORD(v15)),\n    (unsigned __int8)v25 << 31);\n  v17 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v14 + 92);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v31, a4, a5);\n  v17(v14, &v31);\n  (*(void (__fastcall **)(cocos2d::CCNode *, int, int))(*(_DWORD *)a2 + 232))(a2, v14, 1);\n  DtLabelPlacer::boxFor(v28, v14, a4, a5, v15);\n  v18 = *((float **)this + 1);\n  v19 = v18;\n  for ( i = -858993459 * (((int)v18 - *(_DWORD *)this) >> 2) - 1; i >= 0 && *(v19 - 3) > v28[0]; --i )\n  {\n    if ( *(v19 - 2) < v30 && v29 < *(v19 - 1) )\n    {\n      (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v14 + 172))(v14, 0);\n      return std::string::~string((int)&v25);\n    }\n    v19 -= 5;\n  }\n  v31 = v14;\n  v32 = v28[0];\n  v33 = v28[1];\n  v34 = v29;\n  v35 = v30;\n  if ( v18 == *((float **)this + 2) )\n  {\n    std::vector<DtLabelPlacer::Entry>::__push_back_slow_path<DtLabelPlacer::Entry const&>((void **)this, &v31);\n  }\n  else\n  {\n    if ( v18 )\n    {\n      v21 = v32;\n      v22 = v33;\n      v23 = v34;\n      *(_DWORD *)v18 = v31;\n      v18[1] = v21;\n      v18[2] = v22;\n      v18[3] = v23;\n      v18[4] = v35;\n    }\n    *((_DWORD *)this + 1) += 20;\n  }\n  return std::string::~string((int)&v25);\n}", "assembly": "; \n; DtLabelPlacer::place from 0x76789c to 0x767a68 (460 bytes)\n; \n; 2 xrefs:\n; > DeathHistogram::setData @ 0x767d6a\n; > DeathHistogram::setSurvival @ 0x7682c8\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:59:08 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x76789c\nMOV             R4, R3                                                 ; +0x4, 0x7678a0\nVPUSH           {D8}                                                   ; +0x6, 0x7678a2\nMOV             R9, R0                                                 ; +0xa, 0x7678a6\nLDR.W           R8, =(__stack_chk_guard_ptr - 0x7678B2)                ; +0xc, 0x7678a8\nMOV             R10, R1                                                ; +0x10, 0x7678ac\nADD             R8, PC; __stack_chk_guard_ptr                          ; +0x12, 0x7678ae\nLDR.W           R8, [R8]; __stack_chk_guard                            ; +0x14, 0x7678b0\nSUB             SP, SP, #0x44; float                                   ; +0x18, 0x7678b4\nLDR.W           R3, [R8]                                               ; +0x1a, 0x7678b6\nADD             R7, SP, #0xC                                           ; +0x1e, 0x7678ba\nSTR             R3, [SP,#0x44+var_8]                                   ; +0x20, 0x7678bc\nMOVS            R3, #0                                                 ; +0x22, 0x7678be\nSTR             R3, [SP,#0x44+var_38]                                  ; +0x24, 0x7678c0\nSTR             R3, [SP,#0x44+var_34]                                  ; +0x26, 0x7678c2\nSTR             R3, [SP,#0x44+var_30]                                  ; +0x28, 0x7678c4\nMOVW            R3, #0x270F                                            ; +0x2a, 0x7678c6\nCMP             R2, R3                                                 ; +0x2e, 0x7678ca\nBLE             loc_7678FE                                             ; +0x30, 0x7678cc\nMOV.W           R1, #0x3E8                                             ; +0x32, 0x7678ce\nADD.W           R0, R2, #0x1F4                                         ; +0x36, 0x7678d2\nBLX             __aeabi_idiv                                           ; +0x3a, 0x7678d6\nMOV             R1, R0; char *                                         ; +0x3e, 0x7678da\nLDR             R0, =(aIk - 0x7678E2); \"%ik\"                           ; +0x40, 0x7678dc\nADD             R0, PC; \"%ik\"                                          ; +0x42, 0x7678de\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x44, 0x7678e0\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x48, 0x7678e4\nMOV             R1, R0; char *                                         ; +0x4c, 0x7678e8\nMOV             R0, R7; int                                            ; +0x4e, 0x7678ea\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x50, 0x7678ec\nLDRB.W          R3, [SP,#0x44+var_38]                                  ; +0x54, 0x7678f0\nLSLS            R1, R3, #0x1F                                          ; +0x58, 0x7678f4\nBMI             loc_767942                                             ; +0x5a, 0x7678f6\nADD.W           R0, SP, #0x44+var_38+1                                 ; +0x5c, 0x7678f8\nB               loc_767944                                             ; +0x60, 0x7678fc\nCMP.W           R2, #0x3E8                                             ; +0x62, 0x7678fe\nBLT             loc_76793A                                             ; +0x66, 0x767902\nADD.W           R0, R2, #0x32 ; '2'                                    ; +0x68, 0x767904\nMOVS            R1, #0x64 ; 'd'                                        ; +0x6c, 0x767908\nBLX             __aeabi_idiv                                           ; +0x6e, 0x76790a\nCMP             R0, #0x64 ; 'd'                                        ; +0x72, 0x76790e\nMOV             R5, R0                                                 ; +0x74, 0x767910\nBNE             loc_76791C                                             ; +0x76, 0x767912\nLDR             R0, =(aIk - 0x76791C); \"%ik\"                           ; +0x78, 0x767914\nMOVS            R1, #0xA                                               ; +0x7a, 0x767916\nADD             R0, PC; \"%ik\"                                          ; +0x7c, 0x767918\nB               loc_7678E0                                             ; +0x7e, 0x76791a\nMOVS            R1, #0xA                                               ; +0x80, 0x76791c\nBLX             __aeabi_idiv                                           ; +0x82, 0x76791e\nMOVS            R1, #0xA                                               ; +0x86, 0x767922\nMOV             R6, R0                                                 ; +0x88, 0x767924\nMOV             R0, R5                                                 ; +0x8a, 0x767926\nBLX             __aeabi_idivmod                                        ; +0x8c, 0x767928\nLDR             R0, =(aIIk - 0x767932); \"%i.%ik\"                       ; +0x90, 0x76792c\nADD             R0, PC; \"%i.%ik\"                                       ; +0x92, 0x76792e\nMOV             R2, R1                                                 ; +0x94, 0x767930\nMOV             R1, R6; char *                                         ; +0x96, 0x767932\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x98, 0x767934\nB               loc_7678E4                                             ; +0x9c, 0x767938\nLDR             R0, =(aI - 0x767942); \"%i\"                             ; +0x9e, 0x76793a\nMOV             R1, R2                                                 ; +0xa0, 0x76793c\nADD             R0, PC; \"%i\"                                           ; +0xa2, 0x76793e\nB               loc_7678E0                                             ; +0xa4, 0x767940\nLDR             R0, [SP,#0x44+var_30]; this                            ; +0xa6, 0x767942\nLDR             R1, =(aBigfontFnt - 0x76794A); \"bigFont.fnt\"           ; +0xa8, 0x767944\nADD             R1, PC; \"bigFont.fnt\"                                  ; +0xaa, 0x767946\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0xac, 0x767948\nLDRB.W          R3, [SP,#0x44+var_38]                                  ; +0xb0, 0x76794c\nMOV             R5, R0                                                 ; +0xb4, 0x767950\nVLDR            S16, =0.26                                             ; +0xb6, 0x767952\nLSLS            R2, R3, #0x1F                                          ; +0xba, 0x767956\nITE PL                                                                 ; +0xbc, 0x767958\nASRPL           R3, R3, #1                                             ; +0xbe, 0x76795a\nLDRMI           R3, [SP,#0x44+var_34]                                  ; +0xc0, 0x76795c\nVLDR            S15, =0.32                                             ; +0xc2, 0x76795e\nCMP             R3, #3                                                 ; +0xc6, 0x767962\nLDR             R3, [R0]                                               ; +0xc8, 0x767964\nIT CC                                                                  ; +0xca, 0x767966\nVMOVCC.F32      S16, S15                                               ; +0xcc, 0x767968\nLDR             R3, [R3,#0x50]                                         ; +0xd0, 0x76796c\nVMOV            R1, S16                                                ; +0xd2, 0x76796e\nBLX             R3                                                     ; +0xd6, 0x767972\nLDR             R3, [R5]                                               ; +0xd8, 0x767974\nADD             R6, SP, #0x44+var_1C                                   ; +0xda, 0x767976\nMOV             R1, R4; float                                          ; +0xdc, 0x767978\nLDR             R2, [SP,#0x44+arg_0]; float                            ; +0xde, 0x76797a\nMOV             R0, R6; this                                           ; +0xe0, 0x76797c\nLDR.W           R11, [R3,#0x5C]                                        ; +0xe2, 0x76797e\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xe6, 0x767982\nMOV             R0, R5                                                 ; +0xea, 0x767986\nMOV             R1, R6                                                 ; +0xec, 0x767988\nBLX             R11                                                    ; +0xee, 0x76798a\nLDR.W           R3, [R10]                                              ; +0xf0, 0x76798c\nMOV             R0, R10                                                ; +0xf4, 0x767990\nMOV             R1, R5                                                 ; +0xf6, 0x767992\nMOVS            R2, #1                                                 ; +0xf8, 0x767994\nLDR.W           R3, [R3,#0xE8]                                         ; +0xfa, 0x767996\nBLX             R3                                                     ; +0xfe, 0x76799a\nADD.W           R10, SP, #0x44+var_2C                                  ; +0x100, 0x76799c\nVSTR            S16, [SP,#0x44+var_44]                                 ; +0x104, 0x7679a0\nMOV             R1, R5; int                                            ; +0x108, 0x7679a4\nMOV             R2, R4; int                                            ; +0x10a, 0x7679a6\nMOV             R0, R10; int                                           ; +0x10c, 0x7679a8\nLDR             R3, [SP,#0x44+arg_0]; int                              ; +0x10e, 0x7679aa\nBL              _ZN13DtLabelPlacer6boxForEPN7cocos2d13CCLabelBMFontEfff; DtLabelPlacer::boxFor(cocos2d::CCLabelBMFont *,float,float,float) ; +0x110, 0x7679ac\nLDM.W           R9, {R2,R4}                                            ; +0x114, 0x7679b0\nLDR             R3, =0xCCCCCCCD                                        ; +0x118, 0x7679b4\nSUBS            R2, R4, R2                                             ; +0x11a, 0x7679b6\nVLDR            S15, [SP,#0x44+var_2C]                                 ; +0x11c, 0x7679b8\nASRS            R2, R2, #2                                             ; +0x120, 0x7679bc\nVLDR            S14, [SP,#0x44+var_20]                                 ; +0x122, 0x7679be\nMULS            R3, R2                                                 ; +0x126, 0x7679c2\nMOV             R2, R4                                                 ; +0x128, 0x7679c4\nVLDR            S13, [SP,#0x44+var_24]                                 ; +0x12a, 0x7679c6\nSUBS            R3, #1                                                 ; +0x12e, 0x7679ca\nCMP             R3, #0                                                 ; +0x130, 0x7679cc\nBLT             loc_767A00                                             ; +0x132, 0x7679ce\nVLDR            S12, [R2,#-0xC]                                        ; +0x134, 0x7679d0\nVCMPE.F32       S12, S15                                               ; +0x138, 0x7679d4\nVMRS            APSR_nzcv, FPSCR                                       ; +0x13c, 0x7679d8\nBLS             loc_767A00                                             ; +0x140, 0x7679dc\nVLDR            S12, [R2,#-8]                                          ; +0x142, 0x7679de\nVCMPE.F32       S12, S14                                               ; +0x146, 0x7679e2\nVMRS            APSR_nzcv, FPSCR                                       ; +0x14a, 0x7679e6\nBPL             loc_7679FA                                             ; +0x14e, 0x7679ea\nVLDR            S12, [R2,#-4]                                          ; +0x150, 0x7679ec\nVCMPE.F32       S13, S12                                               ; +0x154, 0x7679f0\nVMRS            APSR_nzcv, FPSCR                                       ; +0x158, 0x7679f4\nBMI             loc_767A50                                             ; +0x15c, 0x7679f8\nSUBS            R3, #1                                                 ; +0x15e, 0x7679fa\nSUBS            R2, #0x14                                              ; +0x160, 0x7679fc\nB               loc_7679CC                                             ; +0x162, 0x7679fe\nLDM.W           R10, {R0-R3}                                           ; +0x164, 0x767a00\nSTR             R5, [SP,#0x44+var_1C]                                  ; +0x168, 0x767a04\nADD             R5, SP, #0x44+var_18                                   ; +0x16a, 0x767a06\nSTM.W           R5, {R0-R3}                                            ; +0x16c, 0x767a08\nLDR.W           R3, [R9,#8]                                            ; +0x170, 0x767a0c\nCMP             R4, R3                                                 ; +0x174, 0x767a10\nBEQ             loc_767A2A                                             ; +0x176, 0x767a12\nCBZ             R4, loc_767A1E                                         ; +0x178, 0x767a14\nLDM             R6!, {R0-R3}                                           ; +0x17a, 0x767a16\nSTM             R4!, {R0-R3}                                           ; +0x17c, 0x767a18\nLDR             R3, [R6]                                               ; +0x17e, 0x767a1a\nSTR             R3, [R4]                                               ; +0x180, 0x767a1c\nLDR.W           R3, [R9,#4]                                            ; +0x182, 0x767a1e\nADDS            R3, #0x14                                              ; +0x186, 0x767a22\nSTR.W           R3, [R9,#4]                                            ; +0x188, 0x767a24\nB               loc_767A32                                             ; +0x18c, 0x767a28\nMOV             R0, R9                                                 ; +0x18e, 0x767a2a\nMOV             R1, R6                                                 ; +0x190, 0x767a2c\nBL              _ZNSt6__ndk16vectorIN13DtLabelPlacer5EntryENS_9allocatorIS2_EEE21__push_back_slow_pathIRKS2_EEvOT_; std::vector<DtLabelPlacer::Entry>::__push_back_slow_path<DtLabelPlacer::Entry const&>(DtLabelPlacer::Entry const&) ; +0x192, 0x767a2e\nMOV             R0, R7                                                 ; +0x196, 0x767a32\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x198, 0x767a34\nLDR             R2, [SP,#0x44+var_8]                                   ; +0x19c, 0x767a38\nLDR.W           R3, [R8]                                               ; +0x19e, 0x767a3a\nCMP             R2, R3                                                 ; +0x1a2, 0x767a3e\nBEQ             loc_767A5E                                             ; +0x1a4, 0x767a40\nBLX             __stack_chk_fail                                       ; +0x1a6, 0x767a42\nMOV             R0, R7                                                 ; +0x1aa, 0x767a46\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x1ac, 0x767a48\nBL              __cxa_end_cleanup                                      ; +0x1b0, 0x767a4c\nLDR             R3, [R5]                                               ; +0x1b4, 0x767a50\nMOV             R0, R5                                                 ; +0x1b6, 0x767a52\nMOVS            R1, #0                                                 ; +0x1b8, 0x767a54\nLDR.W           R3, [R3,#0xAC]                                         ; +0x1ba, 0x767a56\nBLX             R3                                                     ; +0x1be, 0x767a5a\nB               loc_767A32                                             ; +0x1c0, 0x767a5c\nADD             SP, SP, #0x44 ; 'D'                                    ; +0x1c2, 0x767a5e\nVPOP            {D8}                                                   ; +0x1c4, 0x767a60\nPOP.W           {R4-R11,PC}                                            ; +0x1c8, 0x767a64", "xrefs": ["DeathHistogram::setData @ 0x767d6a", "DeathHistogram::setSurvival @ 0x7682c8"], "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"}