The annotation for the return value arg in the select_arg function is misleading. While arg can theoretically represent any of the following types: Immediate(int), Reg(reg), or Deref(reg, int), the implementation of this function does not handle Deref(reg, int). This type is managed in the assign_homes pass.
This discrepancy caused confusion while I was developing the function, leading to misunderstandings about the possible return values and their handling within the code.