This is pretty bad. Let's start with the very first instruction:<p><pre><code> mov rax, 1
</code></pre>
An actual "mov rax, 1" would assemble to 48 B8 01 00 00 00 00 00 00 00, a whopping TEN bytes.<p>nasm will optimize this to the equivalent "mov eax, 1", that's 6 bytes, but still:<p><pre><code> xor eax, eax ; 2 bytes
inc eax ; 2 bytes
</code></pre>
would be much smaller. Second line:<p><pre><code> mov rdi, 1
</code></pre>
You already have the value 1 in eax, so a "mov edi, eax" (two bytes) would suffice. Etc. etc.