overflow <- 0
do while in_pos <u 64
# walk the binary tree in `tree` from parent to the selected child
- # XXX should this be "in-_bits" not "bitstream"?
- decoded <- decoded * 2 + bitstream[63 - in_pos]
+ decoded <- decoded * 2 + in_bits[63 - in_pos]
in_pos <- in_pos + 1
if decoded >=u 64 then
overflow <- 1
output[56 - 8 * out_byte:63 - 8 * out_byte] <- decoded
decoded <- 1
out_byte <- out_byte + 1
- # XXX if one? if "imm"?
- if one | (out_byte >=u 8) then
+ if imm | (out_byte >=u 8) then
break
RT <- output
RS <- decoded_in_pos