; assembly | /* r2dec pseudo code output */ | /* balb_controlmanager.t/assume @ 0x40d320 */ | #include | ; (fcn) method.BloombergLP::bdlb::String.rtrim_char_const__int_ () | int64_t method_BloombergLP::bdlb::String_rtrim_char_const_int_ (int64_t arg2, int64_t arg1) { | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlb::String::rtrim(char const*, int*) */ 0x0040d320 mov eax, dword [rsi] | eax = *(rsi); 0x0040d322 test rax, rax | | if (rax == 0) { 0x0040d325 je 0x40d34b | goto label_0; | } 0x0040d327 mov rcx, qword [rip + 0x29ce2] | rcx = BloombergLP::bdlb::CharType::s_spaceArray_p; 0x0040d32e nop | | do { 0x0040d330 test rax, rax | | if (rax <= 0) { 0x0040d333 jle 0x40d347 | goto label_1; | } 0x0040d335 movzx edx, byte [rdi + rax - 1] | edx = *((rdi + rax - 1)); 0x0040d33a dec rax | rax--; 0x0040d33d cmp byte [rcx + rdx], 0 | 0x0040d341 jne 0x40d330 | | } while (*((rcx + rdx)) != 0); 0x0040d343 inc eax | eax++; 0x0040d345 jmp 0x40d349 | goto label_2; | label_1: 0x0040d347 xor eax, eax | eax = 0; | label_2: 0x0040d349 mov dword [rsi], eax | *(rsi) = eax; | label_0: 0x0040d34b ret | return rax; | }