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

```asm
<FlashProgram>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x8(%rbp)
  mov    %rsi,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    -0x10(%rbp),%rax
  and    $0x3,%eax
  test   %rax,%rax
  je     L116
  mov    $0xc8,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <AssertFailure@plt>
L116:
  mov    -0x18(%rbp),%rax
  and    $0x3,%eax
  test   %rax,%rax
  je     L27
  mov    $0xc9,%esi
  lea    D7(%rip),%rax
  mov    %rax,%rdi
  call   <AssertFailure@plt>
L27:
  mov    $0x400fd014,%eax
  movq   $0x1,(%rax)
  mov    $0x400fe1a0,%eax
  mov    (%rax),%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L127
  jmp    L12
L145:
  mov    $0x400fd000,%edx
  mov    -0x10(%rbp),%rax
  and    $0xffffffffffffff80,%rax
  mov    %rax,(%rdx)
  jmp    L111
L46:
  mov    -0x8(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x10(%rbp),%rdx
  and    $0x7c,%edx
  add    $0x400fd100,%rdx
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  addq   $0x4,-0x10(%rbp)
  subq   $0x4,-0x18(%rbp)
L111:
  mov    -0x10(%rbp),%rax
  and    $0x7c,%eax
  test   %rax,%rax
  jne    L31
  mov    $0x400fd030,%eax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L149
L31:
  cmpq   $0x0,-0x18(%rbp)
  jne    L46
L149:
  mov    $0x400fd020,%eax
  mov    $0xa4420001,%ecx
  mov    %rcx,(%rax)
  nop
L20:
  mov    $0x400fd020,%eax
  mov    (%rax),%rax
  and    $0x1,%eax
  test   %rax,%rax
  jne    L20
L12:
  cmpq   $0x0,-0x18(%rbp)
  jne    L145
  jmp    L117
L98:
  mov    $0x400fd000,%edx
  mov    -0x10(%rbp),%rax
  mov    %rax,(%rdx)
  mov    $0x400fd004,%edx
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    $0x400fd008,%eax
  mov    $0xa4420001,%ecx
  mov    %rcx,(%rax)
  nop
L18:
  mov    $0x400fd008,%eax
  mov    (%rax),%rax
  and    $0x1,%eax
  test   %rax,%rax
  jne    L18
  addq   $0x8,-0x8(%rbp)
  addq   $0x4,-0x10(%rbp)
  subq   $0x4,-0x18(%rbp)
L127:
  cmpq   $0x0,-0x18(%rbp)
  jne    L98
L117:
  mov    $0x400fd00c,%eax
  mov    (%rax),%rax
  and    $0x1,%eax
  test   %rax,%rax
  je     L87
  mov    $0xffffffffffffffff,%rax
  jmp    L56
L87:
  mov    $0x0,%eax
L56:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D7
data_type: string

tool: D7: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/flashlib.c

assistant: ```c
long FlashProgram(unsigned long *pulData, unsigned long ulAddress, unsigned long ulCount) {
  {
    if (!(!(ulAddress & 3))) {
      AssertFailure("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/flashlib.c", 200);
    }
  };
  {
    if (!(!(ulCount & 3))) {
      AssertFailure("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S8962_Crossworks/Boot/lib/driverlib/flashlib.c", 201);
    }
  };
  (*((volatile unsigned long *)(0x400FD014))) = 0x00000001;
  if ((*((volatile unsigned long *)(0x400FE1A0))) & 0x00000001) {
    while (ulCount) {
      (*((volatile unsigned long *)(0x400FD000))) = ulAddress & ~(0x7f);
      while (((ulAddress & 0x7c) || ((*((volatile unsigned long *)(0x400FD030))) == 0)) && (ulCount != 0)) {
        (*((volatile unsigned long *)(0x400FD100 + (ulAddress & 0x7c)))) = *pulData++;
        ulAddress += 4;
        ulCount -= 4;
      }
      (*((volatile unsigned long *)(0x400FD020))) = 0xA4420000 | 0x00000001;
      while ((*((volatile unsigned long *)(0x400FD020))) & 0x00000001) {
      }
    }
  } else {
    while (ulCount) {
      (*((volatile unsigned long *)(0x400FD000))) = ulAddress;
      (*((volatile unsigned long *)(0x400FD004))) = *pulData;
      (*((volatile unsigned long *)(0x400FD008))) = 0xA4420000 | 0x00000001;
      while ((*((volatile unsigned long *)(0x400FD008))) & 0x00000001) {
      }
      pulData++;
      ulAddress += 4;
      ulCount -= 4;
    }
  }
  if ((*((volatile unsigned long *)(0x400FD00C))) & 0x00000001) {
    return (-1);
  }
  return (0);
}
```