Answer:
f(long long, long long):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov rax, QWORD PTR [rbp-48]
add rax, 2
mov QWORD PTR [rbp-24], rax
cmp QWORD PTR [rbp-40], 0
jne .L2
mov QWORD PTR [rbp-24], 8
jmp .L3
.L2:
mov rax, QWORD PTR [rbp-40]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-24]
lea rbx, [rdx+rax]
mov rax, QWORD PTR [rbp-48]
lea rdx, [rax+1]
mov rax, QWORD PTR [rbp-40]
sub rax, 1
mov rsi, rdx
mov rdi, rax
call f(long long, long long)
add rax, rbx
mov QWORD PTR [rbp-24], rax
.L3:
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-48]
add rax, rdx
add rsp, 40
pop rbx
pop rbp
ret
Explanation: