user: Translate the below assembly code into C programming language:

```asm
<FlashNVRSectorErase_Byte>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,%eax
  mov    %al,-0x24(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpb   $0x2,-0x24(%rbp)
  jbe    L55
  mov    $0x1,%eax
  jmp    L32
L55:
  mov    $0x0,%eax
  call   <FlashResetRelease@plt>
  mov    $0xe07014,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x1,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe0701c,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x7,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07008,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x10100,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe0700c,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x7,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07010,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x7,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07048,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x5a,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07008,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x10000,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe0701c,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  movzbl -0x24(%rbp),%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    %eax,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0x1,%edi
  call   <WPBCtrl@plt>
  mov    $0x0,%eax
  call   <ReadWPB@plt>
  cmp    $0x1,%eax
  je     L62
  mov    $0x5,%eax
  jmp    L32
L62:
  mov    $0xe07010,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x4,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07018,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  movb   $0x0,-0x11(%rbp)
L63:
  lea    -0x10(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xd000,%edi
  call   <RamRead32A@plt>
  mov    $0x5,%edi
  call   <WitTim@plt>
  addb   $0x1,-0x11(%rbp)
  cmpb   $0x1,-0x11(%rbp)
  jbe    L46
  mov    $0x0,%edi
  call   <WPBCtrl@plt>
  mov    $0x0,%eax
  call   <FlashReset@plt>
  mov    $0x2,%eax
  jmp    L32
L46:
  mov    -0x10(%rbp),%rax
  cmp    $0x80,%rax
  je     L63
  mov    $0x0,%edi
  call   <WPBCtrl@plt>
  mov    $0x0,%eax
  call   <FlashReset@plt>
  mov    $0x0,%eax
L32:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L7
  call   <__stack_chk_fail@plt>
L7:
  leave
  ret
```

assistant: ```c
short FlashNVRSectorErase_Byte(unsigned char Sel) {
  unsigned char UcCnt;
  unsigned long UlReadVal;
  if (Sel >= 3)
    return (1);
  FlashResetRelease();
  RamWrite32A(0xC000, (0xE07000 + 0x14));
  RamWrite32A(0xD000, 1);
  RamWrite32A(0xC000, (0xE07000 + 0x1C));
  RamWrite32A(0xD000, 7);
  RamWrite32A(0xC000, (0xE07000 + 0x08));
  RamWrite32A(0xD000, 0x00010100);
  RamWrite32A(0xC000, (0xE07000 + 0x0C));
  RamWrite32A(0xD000, 7);
  RamWrite32A(0xC000, (0xE07000 + 0x10));
  RamWrite32A(0xD000, 7);
  RamWrite32A(0xC000, (0xE07000 + 0x48));
  RamWrite32A(0xD000, 0x5A);
  RamWrite32A(0xC000, (0xE07000 + 0x08));
  RamWrite32A(0xD000, 0x00010000);
  RamWrite32A(0xC000, (0xE07000 + 0x1C));
  RamWrite32A(0xD000, (1 << Sel));
  WPBCtrl(0x01);
  if (ReadWPB() != 1)
    return (5);
  RamWrite32A(0xC000, (0xE07000 + 0x10));
  RamWrite32A(0xD000, 4);
  RamWrite32A(0xC000, (0xE07000 + 0x18));
  UcCnt = 0;
  do {
    RamRead32A(0xD000, &UlReadVal);
    WitTim(5);
    if (++UcCnt >= 2) {
      WPBCtrl(0x00);
      FlashReset();
      return (2);
    }
  } while (UlReadVal == 0x80);
  WPBCtrl(0x00);
  FlashReset();
  return (0);
}
```