user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<EEPROMProgram>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %edx,-0x20(%rbp)
L104:
  mov    $0x400af018,%eax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L104
  mov    $0x400af004,%edx
  mov    -0x1c(%rbp),%eax
  sar    $0x6,%eax
  mov    %eax,(%rdx)
  mov    -0x1c(%rbp),%eax
  sar    $0x2,%eax
  mov    $0x400af008,%edx
  and    $0xf,%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L114
L58:
  mov    $0x400fe000,%eax
  mov    (%rax),%eax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%eax
  jne    L113
  mov    $0x400fe000,%eax
  mov    (%rax),%eax
  movzwl %ax,%eax
  test   %eax,%eax
  jne    L113
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <_EEPROMSectorMaskSet@plt>
L113:
  mov    $0x400af014,%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    $0xa,%edi
  call   <SysCtlDelay@plt>
L133:
  mov    $0x400af018,%eax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  jne    L133
  mov    -0x4(%rbp),%eax
  and    $0x10,%eax
  test   %eax,%eax
  je     L40
  mov    $0x400fe000,%eax
  mov    (%rax),%eax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%eax
  jne    L14
  mov    $0x400fe000,%eax
  mov    (%rax),%eax
  movzwl %ax,%eax
  test   %eax,%eax
  jne    L14
  mov    $0x0,%eax
  call   <_EEPROMSectorMaskClear@plt>
L14:
  mov    -0x4(%rbp),%eax
  jmp    L15
L40:
  addq   $0x4,-0x18(%rbp)
  subl   $0x1,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L114
  mov    $0x400af008,%eax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L114
  mov    $0x400af004,%eax
  mov    (%rax),%eax
  mov    $0x400af004,%edx
  add    $0x1,%eax
  mov    %eax,(%rdx)
L114:
  cmpl   $0x0,-0x20(%rbp)
  jne    L58
  mov    $0x400fe000,%eax
  mov    (%rax),%eax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%eax
  jne    L71
  mov    $0x400fe000,%eax
  mov    (%rax),%eax
  movzwl %ax,%eax
  test   %eax,%eax
  jne    L71
  mov    $0x0,%eax
  call   <_EEPROMSectorMaskClear@plt>
L71:
  mov    $0x400af018,%eax
  mov    (%rax),%eax
L15:
  leave
  ret
```

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))));
}
```