; assembly | /* r2dec pseudo code output */ | /* balm_collectorrepository.t/none @ 0x41cb80 */ | #include | ; (fcn) method.BloombergLP::balm::MetricRegistry.setUserData_char_const__int__void_const__bool_ () | int64_t method_BloombergLP::balm::MetricRegistry_setUserData_char_const_int_void_const_bool_ (uint32_t arg5, int64_t arg4, int64_t arg3, int64_t arg2, int64_t arg1) { | int64_t var_8h; | uint32_t var_14h; | int64_t var_18h; | uint32_t var_24h; | int64_t var_28h; | int64_t var_40h; | uint32_t var_48h; | int64_t var_50h; | r8 = arg5; | rcx = arg4; | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::balm::MetricRegistry::setUserData(char const*, int, void const*, bool) */ 0x0041cb80 push rbp | 0x0041cb81 push r15 | 0x0041cb83 push r14 | 0x0041cb85 push r13 | 0x0041cb87 push r12 | 0x0041cb89 push rbx | 0x0041cb8a sub rsp, 0x58 | 0x0041cb8e mov dword [rsp + 0x24], r8d | *((rsp + 0x24)) = r8d; 0x0041cb93 mov qword [rsp + 0x18], rcx | *((rsp + 0x18)) = rcx; 0x0041cb98 mov r12d, edx | r12d = edx; 0x0041cb9b mov rbp, rsi | 0x0041cb9e mov r13, rdi | r13 = rdi; 0x0041cba1 lea r15, [rdi + 0x150] | r15 = rdi + 0x150; 0x0041cba8 mov rdi, r15 | rdi = r15; 0x0041cbab call 0x4043f0 | pthread_rwlock_wrlock (); 0x0041cbb0 mov rax, qword [rip + 0x24e261] | rax = BloombergLP::bslma::Default::s_defaultAllocator; 0x0041cbb7 test rax, rax | | if (rax == 0) { 0x0041cbba jne 0x41cbc1 | 0x0041cbbc call 0x424600 | rax = BloombergLP::bslma::Default::determineAndReturnDefaultAllocator() (); | } 0x0041cbc1 mov qword [rsp + 0x28], 0 | *((rsp + 0x28)) = 0; 0x0041cbca mov qword [rsp + 0x48], 0x17 | *((rsp + 0x48)) = 0x17; 0x0041cbd3 mov qword [rsp + 0x50], rax | *((rsp + 0x50)) = rax; 0x0041cbd8 mov rdi, rbp | 0x0041cbdb call 0x403fc0 | rax = strlen (rbp); 0x0041cbe0 mov qword [rsp + 0x40], 0 | *((rsp + 0x40)) = 0; 0x0041cbe9 lea rdi, [rsp + 0x28] | 0x0041cbee mov ecx, 0x44d4e0 | 0x0041cbf3 mov rsi, rbp | 0x0041cbf6 mov rdx, rax | 0x0041cbf9 call 0x428760 | bsl::basic_string,bsl::allocator>::privateAppend(char const*,unsigned long,char const*) (rsp + 0x28, rbp, rax, "string<...>::assign(char*...): string too long"); 0x0041cbfe lea rbp, [r13 + 0x20] | rbp = r13 + 0x20; 0x0041cc02 lea rdi, [rsp + 0x14] | 0x0041cc07 lea rcx, [rsp + 0x28] | rcx = rsp + 0x28; 0x0041cc0c mov rsi, rbp | 0x0041cc0f mov rdx, r13 | 0x0041cc12 call 0x41db00 | rax = BloombergLP::bslalg::RbTreeNode*BloombergLP::bslalg::RbTreeUtil::findUniqueInsertLocation,bsl::allocator>,std::_1::less,bsl::allocator>>>,bsl::basic_string,bsl::allocator>>(int*,BloombergLP::bslalg::RbTreeAnchor*,BloombergLP::bslstl::SetComparator,bsl::allocator>,std::_1::less,bsl::allocator>>>&,bsl::basic_string,bsl::allocator>const&) (rsp + 0x14, rbp, r13); 0x0041cc17 mov r14, rax | r14 = rax; 0x0041cc1a cmp dword [rsp + 0x14], 0 | | if (*((rsp + 0x14)) != 0) { 0x0041cc1f je 0x41cc49 | 0x0041cc21 lea rsi, [rsp + 0x28] | 0x0041cc26 mov rdi, r13 | 0x0041cc29 call 0x41dc70 | rax = BloombergLP::bslalg::RbTreeNode*BloombergLP::bslstl::TreeNodePool,bsl::allocator>,bsl::allocator,bsl::allocator>>>::emplaceIntoNewNode,bsl::allocator>>(bsl::basic_string,bsl::allocator>&&) (r13, rsp + 0x28); 0x0041cc2e mov rbx, rax | rbx = rax; 0x0041cc31 mov edx, dword [rsp + 0x14] | 0x0041cc35 shr edx, 0x1f | edx >>= 0x1f; 0x0041cc38 mov rdi, rbp | 0x0041cc3b mov rsi, r14 | 0x0041cc3e mov rcx, rax | rcx = rax; 0x0041cc41 call 0x422ed0 | BloombergLP::bslalg::RbTreeUtil::insertAt(BloombergLP::bslalg::RbTreeAnchor*,BloombergLP::bslalg::RbTreeNode*,bool,BloombergLP::bslalg::RbTreeNode*) (rbp, r14, *((rsp + 0x14))); 0x0041cc46 mov r14, rbx | r14 = rbx; | } 0x0041cc49 lea rbx, [r14 + 0x18] | rbx = r14 + 0x18; 0x0041cc4d cmp qword [r14 + 0x38], 0x17 | | if (*((r14 + 0x38)) != 0x17) { 0x0041cc52 je 0x41cc57 | 0x0041cc54 mov rbx, qword [rbx] | rbx = *(rbx); | } 0x0041cc57 cmp qword [rsp + 0x48], 0x17 | | if (*((rsp + 0x48)) != 0x17) { 0x0041cc5d je 0x41cc6f | 0x0041cc5f mov rsi, qword [rsp + 0x28] | rsi = *((rsp + 0x28)); 0x0041cc64 mov rdi, qword [rsp + 0x50] | rdi = *((rsp + 0x50)); 0x0041cc69 mov rax, qword [rdi] | rax = *(rdi); 0x0041cc6c call qword [rax + 0x18] | uint64_t (*rax + 0x18)() (); | } 0x0041cc6f mov qword [rsp + 8], rbx | *((rsp + 8)) = rbx; 0x0041cc74 cmp byte [rsp + 0x24], 0 | | if (*((rsp + 0x24)) == 0) { 0x0041cc79 je 0x41cd9c | goto label_1; | } 0x0041cc7f lea rdi, [r13 + 0x108] | 0x0041cc86 lea rsi, [rsp + 8] | 0x0041cc8b mov qword [rsp], r15 | *(rsp) = r15; 0x0041cc8f call 0x41d5e0 | rax = bsl::map>,BloombergLP::bdlb::CStringLess,bsl::allocator>>>>::operator [] (char const*const&) (r13 + 0x108, rsp + 8); 0x0041cc94 mov rbp, rax | 0x0041cc97 mov rcx, qword [rax] | rcx = *(rax); 0x0041cc9a mov rax, qword [rax + 8] | rax = *((rax + 8)); 0x0041cc9e sub rax, rcx | rax -= rcx; 0x0041cca1 sar rax, 3 | rax >>= 3; 0x0041cca5 mov edx, r12d | edx = r12d; 0x0041cca8 cmp rax, rdx | | if (rax <= rdx) { 0x0041ccab ja 0x41cccf | 0x0041ccad lea eax, [r12 + 1] | eax = r12 + 1; 0x0041ccb2 movsxd rsi, eax | rsi = (int64_t) eax; 0x0041ccb5 mov qword [rsp + 0x28], 0 | *((rsp + 0x28)) = 0; 0x0041ccbe lea rdx, [rsp + 0x28] | 0x0041ccc3 mov rdi, rbp | 0x0041ccc6 call 0x43e090 | bsl::vector>::resize(unsigned long,unsigned longconst&) (rbp, rsi, rsp + 0x28); 0x0041cccb mov rcx, qword [rbp] | rcx = *(rbp); | } 0x0041cccf movsxd rax, r12d | rax = (int64_t) r12d; 0x0041ccd2 mov rdx, qword [rsp + 0x18] | rdx = *((rsp + 0x18)); 0x0041ccd7 mov qword [rcx + rax*8], rdx | *((rcx + rax*8)) = rdx; 0x0041ccdb lea r14, [r13 + 0x60] | r14 = r13 + 0x60; 0x0041ccdf mov r15, qword [r13 + 0x68] | r15 = *((r13 + 0x68)); 0x0041cce3 mov rbp, r14 | 0x0041cce6 test r15, r15 | | if (r15 == 0) { 0x0041cce9 je 0x41cd1f | goto label_2; | } 0x0041cceb mov rbx, qword [rsp + 8] | rbx = *((rsp + 8)); 0x0041ccf0 mov rbp, r14 | 0x0041ccf3 nop word cs:[rax + rax] | 0x0041ccfd nop dword [rax] | | do { 0x0041cd00 mov rdi, qword [r15 + 0x18] | 0x0041cd04 mov rsi, rbx | 0x0041cd07 call 0x4042b0 | eax = strcmp (*((r15 + 0x18)), rbx); 0x0041cd0c test eax, eax | 0x0041cd0e cmovns rbp, r15 | __asm ("cmovns rbp, r15"); 0x0041cd12 shr eax, 0x1f | eax >>= 0x1f; 0x0041cd15 mov r15, qword [r15 + rax*8 + 8] | r15 = *((r15 + rax*8 + 8)); 0x0041cd1a test r15, r15 | 0x0041cd1d jne 0x41cd00 | | } while (r15 != 0); | label_2: 0x0041cd1f mov r15, qword [rsp] | r15 = *(rsp); 0x0041cd23 nop word cs:[rax + rax] | 0x0041cd2d nop dword [rax] | | label_0: 0x0041cd30 cmp rbp, r14 | | if (rbp == r14) { 0x0041cd33 je 0x41ce04 | goto label_3; | } 0x0041cd39 mov rax, qword [rsp + 8] | rax = *((rsp + 8)); 0x0041cd3e mov rsi, qword [rbp + 0x18] | rsi = *((rbp + 0x18)); 0x0041cd42 mov dl, byte [rax] | dl = *(rax); 0x0041cd44 test dl, dl | 0x0041cd46 sete cl | cl = (dl == 0) ? 1 : 0; | if (dl == 0) { 0x0041cd49 je 0x41cd77 | goto label_4; | } 0x0041cd4b cmp dl, byte [rsi] | | if (dl != *(rsi)) { 0x0041cd4d jne 0x41cd77 | goto label_4; | } 0x0041cd4f mov edx, 1 | edx = 1; 0x0041cd54 nop word cs:[rax + rax] | 0x0041cd5e nop | | do { 0x0041cd60 movzx ebx, byte [rax + rdx] | ebx = *((rax + rdx)); 0x0041cd64 test bl, bl | 0x0041cd66 sete cl | cl = (bl == 0) ? 1 : 0; | if (bl == 0) { 0x0041cd69 je 0x41cd77 | goto label_4; | } 0x0041cd6b lea rdi, [rdx + 1] | rdi = rdx + 1; 0x0041cd6f cmp bl, byte [rsi + rdx] | 0x0041cd72 mov rdx, rdi | rdx = rdi; 0x0041cd75 je 0x41cd60 | | } while (bl == *((rsi + rdx))); | label_4: 0x0041cd77 test cl, cl | | if (cl != 0) { 0x0041cd79 je 0x41ce04 | 0x0041cd7f mov rdi, r13 | 0x0041cd82 mov edx, r12d | 0x0041cd85 mov rcx, qword [rsp + 0x18] | 0x0041cd8a call 0x41ba20 | BloombergLP::balm::MetricRegistry::setCurrentUserData(char const*,int,voidconst*) (r13, rsi, r12d, *((rsp + 0x18))); 0x0041cd8f mov rdi, rbp | 0x0041cd92 call 0x422e30 | rax = BloombergLP::bslalg::RbTreeUtil::next(BloombergLP::bslalg::RbTreeNodeconst*) (rbp); 0x0041cd97 mov rbp, rax | 0x0041cd9a jmp 0x41cd30 | goto label_0; | label_1: 0x0041cd9c lea rdi, [r13 + 0xc8] | 0x0041cda3 lea rsi, [rsp + 8] | 0x0041cda8 call 0x41d5e0 | rax = bsl::map>,BloombergLP::bdlb::CStringLess,bsl::allocator>>>>::operator [] (char const*const&) (r13 + 0xc8, rsp + 8); 0x0041cdad mov rbp, rax | 0x0041cdb0 mov rsi, qword [rax] | rsi = *(rax); 0x0041cdb3 mov rax, qword [rax + 8] | rax = *((rax + 8)); 0x0041cdb7 sub rax, rsi | rax -= rsi; 0x0041cdba sar rax, 3 | rax >>= 3; 0x0041cdbe mov edx, r12d | edx = r12d; 0x0041cdc1 cmp rax, rdx | | if (rax <= rdx) { 0x0041cdc4 ja 0x41cde8 | 0x0041cdc6 lea eax, [r12 + 1] | eax = r12 + 1; 0x0041cdcb movsxd rsi, eax | rsi = (int64_t) eax; 0x0041cdce mov qword [rsp + 0x28], 0 | *((rsp + 0x28)) = 0; 0x0041cdd7 lea rdx, [rsp + 0x28] | 0x0041cddc mov rdi, rbp | 0x0041cddf call 0x43e090 | bsl::vector>::resize(unsigned long,unsigned longconst&) (rbp, rsi, rsp + 0x28); 0x0041cde4 mov rsi, qword [rbp] | rsi = *(rbp); | } 0x0041cde8 movsxd rax, r12d | rax = (int64_t) r12d; 0x0041cdeb mov rcx, qword [rsp + 0x18] | 0x0041cdf0 mov qword [rsi + rax*8], rcx | *((rsi + rax*8)) = rcx; 0x0041cdf4 mov rsi, qword [rsp + 8] | 0x0041cdf9 mov rdi, r13 | 0x0041cdfc mov edx, r12d | 0x0041cdff call 0x41ba20 | BloombergLP::balm::MetricRegistry::setCurrentUserData(char const*,int,voidconst*) (r13, *((rsp + 8)), r12d, *((rsp + 0x18))); | } | label_3: 0x0041ce04 mov rdi, r15 | rdi = r15; 0x0041ce07 call 0x4044d0 | pthread_rwlock_unlock (); 0x0041ce0c add rsp, 0x58 | 0x0041ce10 pop rbx | 0x0041ce11 pop r12 | 0x0041ce13 pop r13 | 0x0041ce15 pop r14 | 0x0041ce17 pop r15 | 0x0041ce19 pop rbp | 0x0041ce1a ret | return rax; | }