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

```asm
<FlashNVR_WriteData_Byte>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%r12
  mov    $0x1,%edx
  cmp    $0x2,%dil
  ja     L33
  mov    %edi,%ebp
  lea    -0x1(%rcx),%r13d
  cmp    $0xff,%r13w
  ja     L33
  movzbl %sil,%ebx
  movzwl %cx,%ecx
  lea    (%rcx,%rbx,1),%eax
  cmp    $0x100,%eax
  jle    L15
L33:
  mov    %edx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L15:
  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    $0xe07030,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x73,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07034,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x43,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0x1,%edi
  call   <WPBCtrl@plt>
  mov    $0x0,%eax
  call   <ReadWPB@plt>
  mov    $0x5,%edx
  cmp    $0x1,%eax
  jne    L33
  mov    $0xe0700c,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x0,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe0701c,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  movzbl %bpl,%r14d
  mov    $0x1,%esi
  mov    %ebp,%ecx
  shl    %cl,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07008,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  lea    0x10000(%rbx),%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  shl    $0x3,%r14d
  mov    %r12,%rbx
  movzwl %r13w,%r13d
  lea    0x1(%r12,%r13,1),%r12
L14:
  mov    $0xe07004,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  movzbl (%rbx),%esi
  mov    %r14d,%ecx
  shl    %cl,%rsi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0xe07010,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x2,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  add    $0x1,%rbx
  cmp    %r12,%rbx
  jne    L14
  mov    $0xe07014,%esi
  mov    $0xc000,%edi
  call   <RamWrite32A@plt>
  mov    $0x0,%esi
  mov    $0xd000,%edi
  call   <RamWrite32A@plt>
  mov    $0x0,%edi
  call   <WPBCtrl@plt>
  mov    $0x0,%eax
  call   <FlashReset@plt>
  mov    $0x0,%edx
  jmp    L33
```

assistant: ```c
short FlashNVR_WriteData_Byte(unsigned char Sel, unsigned char SetAddress, unsigned char *WritePtr, unsigned short Num) {
  unsigned short UsNum;
  if (Sel >= 3)
    return (1);
  if (Num == 0 || Num > 256)
    return (1);
  if (SetAddress + Num > 256)
    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 + 0x30));
  RamWrite32A(0xD000, 0x73);
  RamWrite32A(0xC000, (0xE07000 + 0x34));
  RamWrite32A(0xD000, 0x43);
  WPBCtrl(0x01);
  if (ReadWPB() != 1)
    return (5);
  RamWrite32A(0xC000, (0xE07000 + 0x0C));
  RamWrite32A(0xD000, 0);
  RamWrite32A(0xC000, (0xE07000 + 0x1C));
  RamWrite32A(0xD000, (1 << Sel));
  RamWrite32A(0xC000, (0xE07000 + 0x08));
  RamWrite32A(0xD000, 0x00010000 + SetAddress);
  for (UsNum = 0; UsNum < Num; UsNum++) {
    RamWrite32A(0xC000, (0xE07000 + 0x04));
    RamWrite32A(0xD000, ((unsigned long)(WritePtr[UsNum]) << (Sel * 8)));
    RamWrite32A(0xC000, (0xE07000 + 0x10));
    RamWrite32A(0xD000, 2);
  }
  RamWrite32A(0xC000, (0xE07000 + 0x14));
  RamWrite32A(0xD000, 0);
  WPBCtrl(0x00);
  FlashReset();
  return (0);
}
```