已知递归函数refunc的C语言代码框架如下:
1 int refunc(unsigned x) {
2 if (【1】)
3 return 【2】 ;
4 unsigned nx =【3】 ;
5 int rv = refunc(nx)
6 return 【4】;
7 }
上述递归函数过程体对应的汇编代码如下:
1 movl 8(%ebp), %ebx
2 movl $0, %eax
3 testl %ebx, %ebx
4 je .L2
5 movl %ebx, %eax
6 shrl $1, %eax
7 movl %eax, (%esp)
8 call refunc
9 movl %ebx, %edx
10 andl $1, %edx
11 leal (%edx, %eax), %eax
12 .L2:
……
ret
根据对应的汇编代码填写C代码中缺失部分,并说明函数的功能。