I asked ChatGPT to write a binary search in RISC-V assembly. It might work if you change the registers. x0 is always zero. Writes to it are ignored. (It does attempt to write to it) x1 is return address. `ret` is an alias for `jalr x0, x1(0)`. x2 is the stack pointer x3 is GP