lea eax, [rdi+1]
This command loads the address of the address rdi + 1 into eax . it loads in eax just rdi+1 .
It looks strange, and in order to understand why lea is needed, and why it is better to simply call a mov or manually calculate an address, you need to understand how commands are written to memory and executed by the processor.
For example, you have a read value command:
mov eax, [rdi+1]; взять значение по адресу "rdi + 1"
It compiles into something like
[опкод mov][флаг что складываем в eax][флаг что берем по адресу rdi][+1]

Those. in 66 67 8B 47 01
Suppose you need to get the rdi+1 address rdi+1 in eax
You can do one of two things:
Calculate it with your hands:
mov eax, rdi + 1; не работает, move не умеет плюс!
and you have to write:
mov eax, rdi inc eax; 66 05 01 00 00 00
those. execute two instructions. Perhaps a good option, but only for simple +1. And for addresses like [bp+si+4] ?
mov eax, bp add eax, si add eax, 4; да, некрасиво!
or execute lea :
lea eax, [rdi+1]

Compare to mov :

Bytecode: 66 67 8D 47 01
Only opcode differs, 8B -> 8D.
The processor has a ready, very efficient mechanism for basic operations with addresses. And it is already implemented for the mov operation - because mov can get the value to the address !.
When using lea processor does everything it does when mov , but skips the last step - retrieving the value from the address. Instead, it adds the address itself to eax . It is much more convenient and faster than counting things like rdi + 1 separate commands.
What does this have to do with your example?
In your example, the parameter is in rdi , and you must return the result in eax . To be honest, the compiler should have written
mov eax, rdi; 66 A1 add eax, 1; 66 05 01 00 00 00
Well, ok, for 1 you can use inc :
mov eax, rdi; 66 A1 inc eax; 66 40
But these are still two teams. The processor will execute them in turn.
The compiler is smart. It knows that the processor is able to add register values with small constants when processing the lea command. And he inserts one command that will produce the same result.
lea eax, [rdi + 1]
It doesn’t matter that no address is actually loaded anywhere - the main thing is that it will work the same way and a little faster - because the processor calculates memory addresses faster than adding numbers :)