; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/assume @ 0x4675a0 */ | #include | ; (fcn) method.BloombergLP::bdlt::Iso8601Util.generateRaw_char__BloombergLP::bdlt::DateTz_const__BloombergLP::bdlt::Iso8601UtilConfiguration_const_ () | uint64_t method_BloombergLP::bdlt::Iso8601Util_generateRaw_char_BloombergLP::bdlt::DateTz_const_BloombergLP::bdlt::Iso8601UtilConfiguration_const_ (int64_t arg3, int64_t arg2, int64_t arg1) { | rdx = arg3; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlt::Iso8601Util::generateRaw(char*, BloombergLP::bdlt::DateTz const&, BloombergLP::bdlt::Iso8601UtilConfiguration const&) */ 0x004675a0 push rbp | 0x004675a1 push r15 | 0x004675a3 push r14 | 0x004675a5 push r12 | 0x004675a7 push rbx | 0x004675a8 mov r14, rdx | r14 = rdx; 0x004675ab mov r15, rsi | r15 = rsi; 0x004675ae mov rbx, rdi | rbx = rdi; 0x004675b1 mov r12d, dword [rsi] | r12d = *(rsi); 0x004675b4 mov edi, r12d | 0x004675b7 call 0x46a320 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToYear(int) (*(rsi), rsi); 0x004675bc mov ecx, eax | ecx = eax; 0x004675be mov ebp, 0xcccccccd | 0x004675c3 imul rdx, rcx, 0x51eb851f | rdx = rcx * 0x51eb851f; 0x004675ca imul rsi, rcx, 0x10624dd3 | rsi = rcx * 0x10624dd3; 0x004675d1 imul rcx, rbp | rcx *= rbp; 0x004675d5 shr rcx, 0x23 | rcx >>= 0x23; 0x004675d9 lea edi, [rcx + rcx] | edi = rcx + rcx; 0x004675dc lea edi, [rdi + rdi*4] | edi = rdi * 5; 0x004675df sub eax, edi | eax -= edi; 0x004675e1 or al, 0x30 | al |= 0x30; 0x004675e3 mov byte [rbx + 3], al | *((rbx + 3)) = al; 0x004675e6 mov rax, rcx | rax = rcx; 0x004675e9 imul rax, rbp | rax *= rbp; 0x004675ed shr rax, 0x23 | rax >>= 0x23; 0x004675f1 add eax, eax | eax += eax; 0x004675f3 lea eax, [rax + rax*4] | eax = rax * 5; 0x004675f6 sub ecx, eax | ecx -= eax; 0x004675f8 or cl, 0x30 | cl |= 0x30; 0x004675fb mov byte [rbx + 2], cl | *((rbx + 2)) = cl; 0x004675fe shr rdx, 0x25 | rdx >>= 0x25; 0x00467602 mov rax, rdx | rax = rdx; 0x00467605 imul rax, rbp | rax *= rbp; 0x00467609 shr rax, 0x23 | rax >>= 0x23; 0x0046760d add eax, eax | eax += eax; 0x0046760f lea eax, [rax + rax*4] | eax = rax * 5; 0x00467612 sub edx, eax | edx -= eax; 0x00467614 or dl, 0x30 | dl |= 0x30; 0x00467617 mov byte [rbx + 1], dl | *((rbx + 1)) = dl; 0x0046761a shr rsi, 0x26 | rsi >>= 0x26; 0x0046761e mov rax, rsi | rax = rsi; 0x00467621 imul rax, rbp | rax *= rbp; 0x00467625 shr rax, 0x23 | rax >>= 0x23; 0x00467629 add eax, eax | eax += eax; 0x0046762b lea eax, [rax + rax*4] | eax = rax * 5; 0x0046762e sub esi, eax | esi -= eax; 0x00467630 or sil, 0x30 | sil |= 0x30; 0x00467634 mov byte [rbx], sil | *(rbx) = sil; 0x00467637 mov byte [rbx + 4], 0x2d | *((rbx + 4)) = 0x2d; 0x0046763b mov edi, r12d | 0x0046763e call 0x46a2e0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToMonth(int) (r12d, rsi); 0x00467643 mov ecx, eax | ecx = eax; 0x00467645 imul rcx, rbp | rcx *= rbp; 0x00467649 shr rcx, 0x23 | rcx >>= 0x23; 0x0046764d lea edx, [rcx + rcx] | edx = rcx + rcx; 0x00467650 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x00467653 sub eax, edx | eax -= edx; 0x00467655 or al, 0x30 | al |= 0x30; 0x00467657 mov byte [rbx + 6], al | *((rbx + 6)) = al; 0x0046765a mov rax, rcx | rax = rcx; 0x0046765d imul rax, rbp | rax *= rbp; 0x00467661 shr rax, 0x23 | rax >>= 0x23; 0x00467665 add eax, eax | eax += eax; 0x00467667 lea eax, [rax + rax*4] | eax = rax * 5; 0x0046766a sub ecx, eax | ecx -= eax; 0x0046766c or cl, 0x30 | cl |= 0x30; 0x0046766f mov byte [rbx + 5], cl | *((rbx + 5)) = cl; 0x00467672 mov byte [rbx + 7], 0x2d | *((rbx + 7)) = 0x2d; 0x00467676 mov edi, r12d | 0x00467679 call 0x46a2a0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToDay(int) (r12d, rsi); 0x0046767e mov ecx, eax | ecx = eax; 0x00467680 imul rcx, rbp | rcx *= rbp; 0x00467684 shr rcx, 0x23 | rcx >>= 0x23; 0x00467688 lea edx, [rcx + rcx] | edx = rcx + rcx; 0x0046768b lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x0046768e sub eax, edx | eax -= edx; 0x00467690 or al, 0x30 | al |= 0x30; 0x00467692 mov byte [rbx + 9], al | *((rbx + 9)) = al; 0x00467695 mov rax, rcx | rax = rcx; 0x00467698 imul rax, rbp | rax *= rbp; 0x0046769c shr rax, 0x23 | rax >>= 0x23; 0x004676a0 add eax, eax | eax += eax; 0x004676a2 lea eax, [rax + rax*4] | eax = rax * 5; 0x004676a5 sub ecx, eax | ecx -= eax; 0x004676a7 or cl, 0x30 | cl |= 0x30; 0x004676aa mov byte [rbx + 8], cl | *((rbx + 8)) = cl; 0x004676ad lea rax, [rbx + 0xa] | rax = rbx + 0xa; 0x004676b1 mov edx, dword [r15 + 4] | edx = *((r15 + 4)); 0x004676b5 test edx, edx | | if (edx == 0) { 0x004676b7 jne 0x4676c3 | 0x004676b9 test byte [r14], 0x20 | | if ((*(r14) & 0x20) != 0) { 0x004676bd jne 0x467782 | goto label_0; | } | } 0x004676c3 mov ecx, edx | ecx = edx; 0x004676c5 neg ecx | ecx = -ecx; | if ((*(r14) & 0x20) < 0) { 0x004676c7 cmovl ecx, edx | ecx = edx; | } 0x004676ca shr edx, 0x1f | edx >>= 0x1f; 0x004676cd add dl, dl | dl += dl; 0x004676cf add dl, 0x2b | dl += 0x2b; 0x004676d2 mov byte [rbx + 0xa], dl | *((rbx + 0xa)) = dl; 0x004676d5 movzx esi, cx | esi = (int32_t) cx; 0x004676d8 imul edx, esi, 0x8889 | edx = esi * 0x8889; 0x004676de shr edx, 0x15 | edx >>= 0x15; 0x004676e1 imul edi, edx, 0x3c | edi = edx * 0x3c; 0x004676e4 sub ecx, edi | ecx -= edi; 0x004676e6 movzx edx, dl | edx = (int32_t) dl; 0x004676e9 imul edi, edx, 0xcd | edi = edx * 0xcd; 0x004676ef shr edi, 0xa | edi >>= 0xa; 0x004676f2 and edi, 0xfffffffe | edi &= 0xfffffffe; 0x004676f5 lea edi, [rdi + rdi*4] | edi = rdi * 5; 0x004676f8 sub dl, dil | dl -= dil; 0x004676fb or dl, 0x30 | dl |= 0x30; 0x004676fe shr esi, 3 | esi >>= 3; 0x00467701 imul edi, esi, 0x1b4f | edi = esi * 0x1b4f; 0x00467707 shr edi, 0x13 | edi >>= 0x13; 0x0046770a imul esi, edi, 0xcd | esi = edi * 0xcd; 0x00467710 shr esi, 0xa | esi >>= 0xa; 0x00467713 and esi, 0xfffffffe | esi &= 0xfffffffe; 0x00467716 lea esi, [rsi + rsi*4] | esi = rsi * 5; 0x00467719 sub dil, sil | dil -= sil; 0x0046771c or dil, 0x30 | dil |= 0x30; 0x00467720 test byte [r14], 8 | 0x00467724 lea rsi, [rbx + 0xb] | rsi = rbx + 0xb; 0x00467728 mov byte [rbx + 0xc], dl | *((rbx + 0xc)) = dl; 0x0046772b mov byte [rbx + 0xb], dil | *((rbx + 0xb)) = dil; 0x0046772f mov edi, 2 | edi = 2; | if ((*(r14) & 8) == 0) { 0x00467734 jne 0x46773f | 0x00467736 mov byte [rbx + 0xd], 0x3a | *((rbx + 0xd)) = 0x3a; 0x0046773a mov edi, 3 | edi = 3; | } 0x0046773f lea rdx, [rsi + rdi] | rdx = rsi + rdi; 0x00467743 movzx ecx, cx | ecx = (int32_t) cx; 0x00467746 lea rbx, [rsi + rdi + 2] | rbx = rsi + rdi + 2; 0x0046774b mov rsi, rbx | rsi = rbx; 0x0046774e nop | | do { 0x00467750 movsxd rdi, ecx | rdi = (int64_t) ecx; 0x00467753 imul rcx, rdi, 0x66666667 | rcx = rdi * 0x66666667; 0x0046775a mov rbp, rcx | 0x0046775d shr rbp, 0x3f | rbp >>= 0x3f; 0x00467761 sar rcx, 0x22 | rcx >>= 0x22; 0x00467765 add ecx, ebp | ecx += ebp; 0x00467767 lea ebp, [rcx + rcx] | ebp = rcx + rcx; 0x0046776a lea ebp, [rbp + rbp*4] | ebp = rbp + rbp*4; 0x0046776e sub edi, ebp | edi -= ebp; 0x00467770 add dil, 0x30 | dil += 0x30; 0x00467774 mov byte [rsi - 1], dil | *((rsi - 1)) = dil; 0x00467778 dec rsi | rsi--; 0x0046777b cmp rsi, rdx | 0x0046777e ja 0x467750 | | } while (rsi > rdx); 0x00467780 jmp 0x46778a | goto label_1; | label_0: 0x00467782 mov byte [rbx + 0xa], 0x5a | *((rbx + 0xa)) = 0x5a; 0x00467786 add rbx, 0xb | rbx += 0xb; | label_1: 0x0046778a sub ebx, eax | ebx -= eax; 0x0046778c add ebx, 0xa | ebx += 0xa; 0x0046778f mov eax, ebx | eax = ebx; 0x00467791 pop rbx | 0x00467792 pop r12 | 0x00467794 pop r14 | 0x00467796 pop r15 | 0x00467798 pop rbp | 0x00467799 ret | return rax; | }