user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<fc8080_get_rssi>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %rsi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x17(%rsp)
  lea    0x17(%rsp),%rdx
  mov    $0xab,%esi
  call   <fc8080_read@plt>
  movzbl 0x17(%rsp),%r12d
  mov    %r12d,%r15d
  and    $0xf,%r15d
  shr    $0x7,%r12b
  lea    0x12(%rsp),%rdx
  mov    $0xac,%esi
  mov    %rbx,%rdi
  call   <fc8080_read@plt>
  andb   $0x1f,0x12(%rsp)
  lea    0x13(%rsp),%rdx
  mov    $0x14d,%esi
  mov    %rbx,%rdi
  call   <fc8080_bb_read@plt>
  andb   $0x1f,0x13(%rsp)
  lea    0x14(%rsp),%rdx
  mov    $0x14e,%esi
  mov    %rbx,%rdi
  call   <fc8080_bb_read@plt>
  movzbl 0x14(%rsp),%edx
  movzbl %dl,%eax
  sub    $0x101,%eax
  movzbl %dl,%r14d
  test   %dl,%dl
  cmovs  %eax,%r14d
  lea    0x15(%rsp),%rdx
  mov    $0xaf,%esi
  mov    %rbx,%rdi
  call   <fc8080_read@plt>
  lea    0x17(%rsp),%rdx
  mov    $0xae,%esi
  mov    %rbx,%rdi
  call   <fc8080_read@plt>
  movzbl 0x17(%rsp),%ebp
  mov    %ebp,%r13d
  and    $0xf,%r13d
  shr    $0x4,%bpl
  lea    0x16(%rsp),%rdx
  mov    $0xad,%esi
  mov    %rbx,%rdi
  call   <fc8080_read@plt>
  mov    %eax,%edx
  movzbl 0x13(%rsp),%edi
  cmp    $0x6,%dil
  jbe    L2
  cmp    $0x7,%dil
  sete   %cl
  setne  %sil
L22:
  movzbl 0x12(%rsp),%eax
  shr    %al
  movzbl %al,%eax
  movzbl %r15b,%r15d
  lea    (%r15,%r15,4),%r8d
  add    %r8d,%eax
  movzbl %dil,%edi
  lea    (%rdi,%rdi,2),%edi
  lea    (%rax,%rdi,2),%eax
  lea    0x3(%r14),%edi
  test   %r14d,%r14d
  cmovns %r14d,%edi
  sar    $0x2,%edi
  sub    %edi,%eax
  movzbl 0x15(%rsp),%edi
  movzbl %r12b,%r12d
  imul   %edi,%r12d
  add    %eax,%r12d
  movzbl %r13b,%r13d
  movzbl %sil,%esi
  imul   %esi,%r13d
  add    %r12d,%r13d
  movzbl %bpl,%ebp
  movzbl %cl,%ecx
  imul   %ecx,%ebp
  add    %r13d,%ebp
  movzbl 0x16(%rsp),%eax
  sub    %eax,%ebp
  mov    0x8(%rsp),%rax
  mov    %ebp,(%rax)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L9
  mov    %edx,%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L2:
  mov    $0x0,%ecx
  mov    $0x0,%esi
  jmp    L22
L9:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int fc8080_get_rssi(void *handle, int *rssi) {
  int res = 0;
  int pga = 0;
  unsigned char lna, rfvga, filter, preamp_pga, a1, ext_lna, a2, a3, k, crntmode1, crntmode0;
  unsigned char temp = 0;
  res = fc8080_read(handle, 0xab, &temp);
  lna = temp & 0x0f;
  ext_lna = temp >> 7;
  res = fc8080_read(handle, 0xac, &rfvga);
  rfvga = rfvga & 0x1f;
  res = fc8080_bb_read(handle, 0x014d, &filter);
  filter = filter & 0x1f;
  res = fc8080_bb_read(handle, 0x014e, &preamp_pga);
  if (127 < preamp_pga)
    pga = -1 * ((256 - preamp_pga) + 1);
  else if (preamp_pga <= 127)
    pga = preamp_pga;
  res = fc8080_read(handle, 0xaf, &a1);
  res = fc8080_read(handle, 0xae, &temp);
  a2 = temp & 0x0f;
  a3 = temp >> 4;
  res = fc8080_read(handle, 0xad, &k);
  if (filter < 7) {
    crntmode1 = 0;
    crntmode0 = 0;
  } else if (filter == 7) {
    crntmode1 = 0;
    crntmode0 = 1;
  } else {
    crntmode1 = 1;
    crntmode0 = 0;
  }
  *rssi = (5 * lna + (rfvga / 2) + (6 * filter) - (pga / 4) + (a1 * ext_lna) + (a2 * crntmode1) + (a3 * crntmode0) - k);
  return res;
}
```