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

```asm
<EEPROMProgram>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  nopl   0x0(%rax,%rax,1)
L142:
  mov    0x400af018,%eax
  test   $0x1,%al
  jne    L142
  mov    %ebp,%eax
  sar    $0x6,%eax
  mov    %eax,0x400af004
  mov    %ebp,%eax
  sar    $0x2,%eax
  and    $0xf,%eax
  test   %edx,%edx
  mov    %eax,0x400af008
  lea    0x3(%rdx),%eax
  cmovns %edx,%eax
  sar    $0x2,%eax
  je     L100
  sub    $0x1,%eax
  lea    (%rbx,%rax,4),%r13
  nopw   0x0(%rax,%rax,1)
L79:
  mov    0x400fe000,%eax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%eax
  je     L99
L143:
  mov    (%rbx),%eax
  mov    $0xa,%edi
  mov    %eax,0x400af014
  call   <SysCtlDelay@plt>
  nopw   0x0(%rax,%rax,1)
L51:
  mov    0x400af018,%r12d
  test   $0x1,%r12b
  jne    L51
  test   $0x10,%r12b
  jne    L60
  cmp    %r13,%rbx
  je     L100
  mov    0x400af008,%eax
  test   %eax,%eax
  jne    L133
  mov    0x400af004,%eax
  add    $0x1,%eax
  mov    %eax,0x400af004
L133:
  add    $0x4,%rbx
  jmp    L79
  nopl   0x0(%rax,%rax,1)
L100:
  mov    0x400fe000,%eax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%eax
  je     L129
L150:
  mov    0x400af018,%r12d
L155:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L99:
  mov    0x400fe000,%eax
  test   %ax,%ax
  jne    L143
  mov    %ebp,%edi
  call   <_EEPROMSectorMaskSet@plt>
  jmp    L143
L60:
  mov    0x400fe000,%eax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%eax
  jne    L155
  mov    0x400fe000,%eax
  test   %ax,%ax
  jne    L155
  call   <_EEPROMSectorMaskClear@plt>
  jmp    L155
  nopw   0x0(%rax,%rax,1)
L129:
  mov    0x400fe000,%eax
  test   %ax,%ax
  jne    L150
  call   <_EEPROMSectorMaskClear@plt>
  jmp    L150
```

assistant: ```c
uint32_t EEPROMProgram(uint32_t *pui32Data, uint32_t ui32Address, uint32_t ui32Count) {
  uint32_t ui32Status;
  ;
  ;

  ;
  ;
  ;
  do {
    ui32Status = (*((volatile uint32_t *)(0x400AF018)));
  } while (ui32Status & 0x00000001);
  (*((volatile uint32_t *)(0x400AF004))) = ((ui32Address) >> 6);
  (*((volatile uint32_t *)(0x400AF008))) = (((ui32Address) >> 2) & 0x0F);
  ui32Count /= 4;
  while (ui32Count) {
    if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00050000)) && (((*((volatile uint32_t *)(0x400FE000))) & (0x0000FF00 | 0x000000FF)) == (0x00000000 | 0x00000000))) {
      _EEPROMSectorMaskSet(ui32Address);
    }
    (*((volatile uint32_t *)(0x400AF014))) = *pui32Data;
    SysCtlDelay(10);
    do {
      ui32Status = (*((volatile uint32_t *)(0x400AF018)));
    } while (ui32Status & 0x00000001);
    if (ui32Status & 0x00000010) {
      if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00050000)) && (((*((volatile uint32_t *)(0x400FE000))) & (0x0000FF00 | 0x000000FF)) == (0x00000000 | 0x00000000))) {
        _EEPROMSectorMaskClear();
      }
      return (ui32Status);
    }
    pui32Data++;
    ui32Count--;
    if (ui32Count && ((*((volatile uint32_t *)(0x400AF008))) == 0)) {
      (*((volatile uint32_t *)(0x400AF004))) += 1;
    }
  }
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00050000)) && (((*((volatile uint32_t *)(0x400FE000))) & (0x0000FF00 | 0x000000FF)) == (0x00000000 | 0x00000000))) {
    _EEPROMSectorMaskClear();
  }
  return ((*((volatile uint32_t *)(0x400AF018))));
}
```