I am very new to assembly, so I just want to make sure I am understanding whats happening in this code:
400610: 83 ff 1d cmp $0x1d,%edi
400613: 7f 0c jg 400621 <f1+0x11>
400615: 89 f8 mov %edi,%eax
400617: c1 e0 04 shl $0x4,%eax
40061a: 8d 04 f8 lea (%rax,%rdi,8),%eax
40061d: 8d 04 78 lea (%rax,%rdi,2),%eax
400620: c3 retq
400621: c1 ff 02 sar $0x2,%edi
400624: 8d 47 11 lea 0x11(%rdi),%eax
400627: c3 retq
From what I can see, there is a jump to 400621 but I am not sure what f1+0x11 signifies.
If it does not jump, it continues and shifts %eax to the left 4 (multiplies by 16), then performs eax = rax + rdi * 8, then eax = rax + rdi * 2? I am not sure what the purpose of doing that twice is.
If it does jump, it shifts %eax to the right 2 (divides by 4) and then I am not sure what (lea 0x11(%rdi),%eax) does.
Help would be appreciated, thank you!