; assembly | /* r2dec pseudo code output */ | /* balber_berdecoder.t/assume @ 0x46a6f0 */ | #include | ; (fcn) method.BloombergLP::bdlt::ProlepticDateImpUtil.numLeapYears_int__int_ () | uint32_t method_BloombergLP::bdlt::ProlepticDateImpUtil_numLeapYears_int_int_ (int64_t arg5, int64_t arg2, int64_t arg1) { | r8 = arg5; | rsi = arg2; | rdi = arg1; | /* BloombergLP::bdlt::ProlepticDateImpUtil::numLeapYears(int, int) */ 0x0046a6f0 movzx eax, si | eax = (int32_t) si; 0x0046a6f3 shr esi, 2 | esi >>= 2; 0x0046a6f6 mov ecx, eax | ecx = eax; 0x0046a6f8 shr ecx, 2 | ecx >>= 2; 0x0046a6fb imul r8d, ecx, 0x147b | r8d = ecx * 0x147b; 0x0046a702 shr r8d, 0x11 | r8d >>= 0x11; 0x0046a706 shr eax, 4 | eax >>= 4; 0x0046a709 imul eax, eax, 0xa3e | eax *= 0xa3e; 0x0046a70f shr eax, 0x10 | eax >>= 0x10; 0x0046a712 lea edx, [rdi - 1] | edx = rdi - 1; 0x0046a715 add edi, 2 | edi += 2; 0x0046a718 test dx, dx | 0x0046a71b cmovns edi, edx | __asm ("cmovns edi, edx"); 0x0046a71e movsx r9d, di | r9d = (int32_t) di; 0x0046a722 sar r9d, 2 | r9d >>= 2; 0x0046a726 movsx edx, dx | edx = (int32_t) dx; 0x0046a729 imul ecx, edx, 0xffffeb85 | ecx = edx * 0xffffeb85; 0x0046a72f mov edx, ecx | edx = ecx; 0x0046a731 sar edx, 0x13 | edx >>= 0x13; 0x0046a734 mov edi, ecx | edi = ecx; 0x0046a736 shr edi, 0x1f | edi >>= 0x1f; 0x0046a739 add edx, edi | edx += edi; 0x0046a73b add edx, r9d | edx += r9d; 0x0046a73e movsx edx, dx | edx = (int32_t) dx; 0x0046a741 sar ecx, 0x15 | ecx >>= 0x15; 0x0046a744 add ecx, edi | ecx += edi; 0x0046a746 add eax, esi | eax += esi; 0x0046a748 add eax, ecx | eax += ecx; 0x0046a74a sub eax, r8d | eax -= r8d; 0x0046a74d sub eax, edx | eax -= edx; 0x0046a74f ret | return eax; | }