user: 请将以下的汇编代码转换成C语言代码:

```asm
<demod_frame>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %rcx,-0x30(%rbp)
  jmp    L14
L61:
  movl   $0x0,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L75
  orl    $0x80,-0x4(%rbp)
L75:
  mov    -0x18(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L19
  orl    $0x40,-0x4(%rbp)
L19:
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L38
  orl    $0x20,-0x4(%rbp)
L38:
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L40
  orl    $0x10,-0x4(%rbp)
L40:
  mov    -0x18(%rbp),%rax
  add    $0x24,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L84
  orl    $0x8,-0x4(%rbp)
L84:
  mov    -0x18(%rbp),%rax
  add    $0x2c,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L92
  orl    $0x4,-0x4(%rbp)
L92:
  mov    -0x18(%rbp),%rax
  add    $0x34,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L24
  orl    $0x2,-0x4(%rbp)
L24:
  mov    -0x18(%rbp),%rax
  add    $0x3c,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x38,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <phi_difference@plt>
  cmp    %rax,-0x30(%rbp)
  jge    L99
  orl    $0x1,-0x4(%rbp)
L99:
  mov    -0x20(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  mov    -0x4(%rbp),%edx
  mov    %edx,(%rax)
  addq   $0x40,-0x18(%rbp)
L14:
  subl   $0x1,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jns    L61
  nop
  nop
  leave
  ret
```

assistant: ```c
void demod_frame(uint16_t *phi, uint8_t *frame, int bytes, int16_t center_dphi) {
  while (--bytes >= 0) {
    uint8_t b = 0;
    if (phi_difference(phi[0], phi[1]) > center_dphi)
      b |= 0x80;
    if (phi_difference(phi[2], phi[3]) > center_dphi)
      b |= 0x40;
    if (phi_difference(phi[4], phi[5]) > center_dphi)
      b |= 0x20;
    if (phi_difference(phi[6], phi[7]) > center_dphi)
      b |= 0x10;
    if (phi_difference(phi[8], phi[9]) > center_dphi)
      b |= 0x08;
    if (phi_difference(phi[10], phi[11]) > center_dphi)
      b |= 0x04;
    if (phi_difference(phi[12], phi[13]) > center_dphi)
      b |= 0x02;
    if (phi_difference(phi[14], phi[15]) > center_dphi)
      b |= 0x01;
    *frame++ = b;
    phi += 16;
  }
}
```