Manually hand-encoding these instructions is exactly the process an assembler like NASM or GNU as performs internally, and it's also what malware analysts do by hand when decoding shellcode with no assembler available. The REX prefix and ModR/M byte you decode here are why x86-64 disassembly is dramatically harder to implement correctly than RISC-V's or ARM's fixed 4-byte format.