; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/none @ 0x467790 */ | #include | ; (fcn) method.BloombergLP::bdlt::Iso8601Util.generateRaw_char__BloombergLP::bdlt::DateTz_const__BloombergLP::bdlt::Iso8601UtilConfiguration_const_ () | int64_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&) */ 0x00467790 push rbp | 0x00467791 push r15 | 0x00467793 push r14 | 0x00467795 push rbx | 0x00467796 push rax | 0x00467797 mov r14, rdx | r14 = rdx; 0x0046779a mov r15, rsi | r15 = rsi; 0x0046779d mov rbx, rdi | rbx = rdi; 0x004677a0 mov ebp, dword [rsi] | ebp = *(rsi); 0x004677a2 mov edi, ebp | 0x004677a4 call 0x46a6a0 | eax = BloombergLP::bdlt::PosixDateImpUtil::serialToYear(int) (*(rsi), rsi); 0x004677a9 movsxd rcx, eax | rcx = (int64_t) eax; 0x004677ac imul rax, rcx, 0x66666667 | rax = rcx * 0x66666667; 0x004677b3 mov rdx, rax | rdx = rax; 0x004677b6 shr rdx, 0x3f | rdx >>= 0x3f; 0x004677ba sar rax, 0x22 | rax >>= 0x22; 0x004677be add eax, edx | eax += edx; 0x004677c0 lea edx, [rax + rax] | edx = rax + rax; 0x004677c3 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x004677c6 imul rsi, rcx, 0x51eb851f | rsi = rcx * 0x51eb851f; 0x004677cd imul rdi, rcx, 0x10624dd3 | rdi = rcx * 0x10624dd3; 0x004677d4 sub ecx, edx | ecx -= edx; 0x004677d6 add cl, 0x30 | cl += 0x30; 0x004677d9 mov byte [rbx + 3], cl | *((rbx + 3)) = cl; 0x004677dc cdqe | rax = (int64_t) eax; 0x004677de imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004677e5 mov rdx, rcx | rdx = rcx; 0x004677e8 shr rdx, 0x3f | rdx >>= 0x3f; 0x004677ec sar rcx, 0x22 | rcx >>= 0x22; 0x004677f0 add ecx, edx | ecx += edx; 0x004677f2 add ecx, ecx | ecx += ecx; 0x004677f4 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x004677f7 sub eax, ecx | eax -= ecx; 0x004677f9 add al, 0x30 | al += 0x30; 0x004677fb mov byte [rbx + 2], al | *((rbx + 2)) = al; 0x004677fe mov rax, rsi | rax = rsi; 0x00467801 shr rax, 0x3f | rax >>= 0x3f; 0x00467805 sar rsi, 0x25 | rsi >>= 0x25; 0x00467809 add esi, eax | esi += eax; 0x0046780b movsxd rax, esi | rax = (int64_t) esi; 0x0046780e imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x00467815 mov rdx, rcx | rdx = rcx; 0x00467818 shr rdx, 0x3f | rdx >>= 0x3f; 0x0046781c sar rcx, 0x22 | rcx >>= 0x22; 0x00467820 add ecx, edx | ecx += edx; 0x00467822 add ecx, ecx | ecx += ecx; 0x00467824 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x00467827 sub eax, ecx | eax -= ecx; 0x00467829 add al, 0x30 | al += 0x30; 0x0046782b mov byte [rbx + 1], al | *((rbx + 1)) = al; 0x0046782e mov rax, rdi | rax = rdi; 0x00467831 shr rax, 0x3f | rax >>= 0x3f; 0x00467835 sar rdi, 0x26 | rdi >>= 0x26; 0x00467839 add edi, eax | edi += eax; 0x0046783b movsxd rax, edi | rax = (int64_t) edi; 0x0046783e imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x00467845 mov rdx, rcx | rdx = rcx; 0x00467848 shr rdx, 0x3f | rdx >>= 0x3f; 0x0046784c sar rcx, 0x22 | rcx >>= 0x22; 0x00467850 add ecx, edx | ecx += edx; 0x00467852 add ecx, ecx | ecx += ecx; 0x00467854 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x00467857 sub eax, ecx | eax -= ecx; 0x00467859 add al, 0x30 | al += 0x30; 0x0046785b mov byte [rbx], al | *(rbx) = al; 0x0046785d mov byte [rbx + 4], 0x2d | *((rbx + 4)) = 0x2d; 0x00467861 mov edi, ebp | 0x00467863 call 0x46a660 | rax = BloombergLP::bdlt::PosixDateImpUtil::serialToMonth(int) (ebp, rsi); 0x00467868 cdqe | rax = (int64_t) eax; 0x0046786a imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x00467871 mov rdx, rcx | rdx = rcx; 0x00467874 shr rdx, 0x3f | rdx >>= 0x3f; 0x00467878 sar rcx, 0x22 | rcx >>= 0x22; 0x0046787c add ecx, edx | ecx += edx; 0x0046787e lea edx, [rcx + rcx] | edx = rcx + rcx; 0x00467881 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x00467884 sub eax, edx | eax -= edx; 0x00467886 add al, 0x30 | al += 0x30; 0x00467888 mov byte [rbx + 6], al | *((rbx + 6)) = al; 0x0046788b movsxd rax, ecx | rax = (int64_t) ecx; 0x0046788e imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x00467895 mov rdx, rcx | rdx = rcx; 0x00467898 shr rdx, 0x3f | rdx >>= 0x3f; 0x0046789c sar rcx, 0x22 | rcx >>= 0x22; 0x004678a0 add ecx, edx | ecx += edx; 0x004678a2 add ecx, ecx | ecx += ecx; 0x004678a4 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x004678a7 sub eax, ecx | eax -= ecx; 0x004678a9 add al, 0x30 | al += 0x30; 0x004678ab mov byte [rbx + 5], al | *((rbx + 5)) = al; 0x004678ae mov byte [rbx + 7], 0x2d | *((rbx + 7)) = 0x2d; 0x004678b2 mov edi, ebp | 0x004678b4 call 0x46a620 | rax = BloombergLP::bdlt::PosixDateImpUtil::serialToDay(int) (ebp, rsi); 0x004678b9 cdqe | rax = (int64_t) eax; 0x004678bb imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004678c2 mov rdx, rcx | rdx = rcx; 0x004678c5 shr rdx, 0x3f | rdx >>= 0x3f; 0x004678c9 sar rcx, 0x22 | rcx >>= 0x22; 0x004678cd add ecx, edx | ecx += edx; 0x004678cf lea edx, [rcx + rcx] | edx = rcx + rcx; 0x004678d2 lea edx, [rdx + rdx*4] | edx = rdx * 5; 0x004678d5 sub eax, edx | eax -= edx; 0x004678d7 add al, 0x30 | al += 0x30; 0x004678d9 mov byte [rbx + 9], al | *((rbx + 9)) = al; 0x004678dc movsxd rax, ecx | rax = (int64_t) ecx; 0x004678df imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004678e6 mov rdx, rcx | rdx = rcx; 0x004678e9 shr rdx, 0x3f | rdx >>= 0x3f; 0x004678ed sar rcx, 0x22 | rcx >>= 0x22; 0x004678f1 add ecx, edx | ecx += edx; 0x004678f3 add ecx, ecx | ecx += ecx; 0x004678f5 lea ecx, [rcx + rcx*4] | ecx = rcx * 5; 0x004678f8 sub eax, ecx | eax -= ecx; 0x004678fa add al, 0x30 | al += 0x30; 0x004678fc mov byte [rbx + 8], al | *((rbx + 8)) = al; 0x004678ff lea r8, [rbx + 0xa] | r8 = rbx + 0xa; 0x00467903 mov edx, dword [r15 + 4] | edx = *((r15 + 4)); 0x00467907 test edx, edx | | if (edx == 0) { 0x00467909 jne 0x467915 | 0x0046790b test byte [r14], 0x20 | | if ((*(r14) & 0x20) != 0) { 0x0046790f jne 0x4679ce | goto label_0; | } | } 0x00467915 mov ecx, edx | ecx = edx; 0x00467917 neg ecx | ecx = -ecx; | if ((*(r14) & 0x20) < 0) { 0x00467919 cmovl ecx, edx | ecx = edx; | } 0x0046791c shr edx, 0x1f | edx >>= 0x1f; 0x0046791f add dl, dl | dl += dl; 0x00467921 add dl, 0x2b | dl += 0x2b; 0x00467924 mov byte [rbx + 0xa], dl | *((rbx + 0xa)) = dl; 0x00467927 mov ebp, 0x88888889 | 0x0046792c imul rbp, rcx | rbp *= rcx; 0x00467930 shr rbp, 0x25 | rbp >>= 0x25; 0x00467934 imul edx, ebp, 0x3c | edx = ebp * 0x3c; 0x00467937 mov edi, 0xcccccccd | edi = 0xcccccccd; 0x0046793c mov rsi, rbp | rsi = rbp; 0x0046793f imul rsi, rdi | rsi *= rdi; 0x00467943 shr rsi, 0x23 | rsi >>= 0x23; 0x00467947 add esi, esi | esi += esi; 0x00467949 lea esi, [rsi + rsi*4] | esi = rsi * 5; 0x0046794c sub ebp, esi | ebp -= esi; 0x0046794e or bpl, 0x30 | bpl |= 0x30; 0x00467952 imul rax, rcx, 0x1b4e81b5 | rax = rcx * 0x1b4e81b5; 0x00467959 shr rax, 0x26 | rax >>= 0x26; 0x0046795d mov rsi, rax | rsi = rax; 0x00467960 imul rsi, rdi | rsi *= rdi; 0x00467964 shr rsi, 0x23 | rsi >>= 0x23; 0x00467968 add esi, esi | esi += esi; 0x0046796a lea esi, [rsi + rsi*4] | esi = rsi * 5; 0x0046796d sub eax, esi | eax -= esi; 0x0046796f or al, 0x30 | al |= 0x30; 0x00467971 test byte [r14], 8 | 0x00467975 lea rdi, [rbx + 0xb] | rdi = rbx + 0xb; 0x00467979 mov byte [rbx + 0xc], bpl | *((rbx + 0xc)) = bpl; 0x0046797d mov byte [rbx + 0xb], al | *((rbx + 0xb)) = al; 0x00467980 mov esi, 2 | esi = 2; | if ((*(r14) & 8) == 0) { 0x00467985 jne 0x467990 | 0x00467987 mov byte [rbx + 0xd], 0x3a | *((rbx + 0xd)) = 0x3a; 0x0046798b mov esi, 3 | esi = 3; | } 0x00467990 sub ecx, edx | ecx -= edx; 0x00467992 lea rdx, [rdi + rsi] | rdx = rdi + rsi; 0x00467996 lea rbx, [rdi + rsi + 2] | rbx = rdi + rsi + 2; 0x0046799b mov rsi, rbx | rsi = rbx; 0x0046799e nop | | do { 0x004679a0 movsxd rax, ecx | rax = (int64_t) ecx; 0x004679a3 imul rcx, rax, 0x66666667 | rcx = rax * 0x66666667; 0x004679aa mov rdi, rcx | rdi = rcx; 0x004679ad shr rdi, 0x3f | rdi >>= 0x3f; 0x004679b1 sar rcx, 0x22 | rcx >>= 0x22; 0x004679b5 add ecx, edi | ecx += edi; 0x004679b7 lea edi, [rcx + rcx] | edi = rcx + rcx; 0x004679ba lea edi, [rdi + rdi*4] | edi = rdi * 5; 0x004679bd sub eax, edi | eax -= edi; 0x004679bf add al, 0x30 | al += 0x30; 0x004679c1 mov byte [rsi - 1], al | *((rsi - 1)) = al; 0x004679c4 dec rsi | rsi--; 0x004679c7 cmp rsi, rdx | 0x004679ca ja 0x4679a0 | | } while (rsi > rdx); 0x004679cc jmp 0x4679d6 | goto label_1; | label_0: 0x004679ce mov byte [rbx + 0xa], 0x5a | *((rbx + 0xa)) = 0x5a; 0x004679d2 add rbx, 0xb | rbx += 0xb; | label_1: 0x004679d6 sub ebx, r8d | ebx -= r8d; 0x004679d9 add ebx, 0xa | ebx += 0xa; 0x004679dc mov eax, ebx | eax = ebx; 0x004679de add rsp, 8 | 0x004679e2 pop rbx | 0x004679e3 pop r14 | 0x004679e5 pop r15 | 0x004679e7 pop rbp | 0x004679e8 ret | return rax; | }