Could you omit the `REX` prefix here and save a byte (since I think you're the one setting `rax`)?
`0x85, 0xc0    /* test %eax, %eax */`