This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LBB226_3: | |
movq 1072(%rdi), %r11 load state_idx | |
movq 1088(%rdi), %rbx load ptr to ANS nodes | |
movl %eax, %ecx (copy bits_past_byte to do arithmetic later) | |
shrl $3, %ecx bytes_to_advance = bits_past_byte / 8 | |
addq %rcx, %r8 byte_idx += bytes_to_advance | |
andl $7, %eax bit_idx = bit_idx % 8 | |
movq (%r9,%r8), %r14 word = bytes[byte_idx] | |
movl %eax, %ecx (copy bit_idx to do arithmetic later) | |
shrq %cl, %r14 word >>= bit_idx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requirements: python 3.7+ | |
from dataclasses import dataclass, field | |
from typing import List, Dict | |
# Over the course of the entire lifecycle, this algorithm uses | |
# O(cashflows + shareholders) runtime. | |
@dataclass | |
class WaterfallPool: |