title: For temporary registers in the asm statement, should I use clobber or dummy output?
body: <p>As mentioned in the title of this question, when I modify some registers inside the asm statement, for a temporary reason, which option is better in between the clobber and dummy output?</p>
  
  <p>For example, I implemented two versions of the exchange function in the <a href="https://godbolt.org/z/fzbkpC" rel="nofollow noreferrer">link</a>, and found that two versions generate the same amount of output instructions.</p>
  
  <p>Which version should I use? Should I use the one with the dummy output to allow the compiler choose the register that may optimize entire function as much as possible?</p>
  
  <p>If the answer is yes, then when should I use the clobber list? Is it only okay to use the clobber list when one instruction requires you to load its operand to the specific registers? such as syscall instruction requires its parameter should be located in register rdi   rsi   rdx   r10   r8    r9??   </p>