user: Demonstrate the C code that generates the assembly output below:

```asm
<EEPROMProgram>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <DEBUG_ASSERT@plt>
  mov    $0x400af000,%eax
  mov    (%rax),%rax
  movzwl %ax,%eax
  shl    $0x2,%rax
  cmp    %rax,-0x20(%rbp)
  setb   %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <DEBUG_ASSERT@plt>
  mov    -0x20(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    $0x400af000,%eax
  mov    (%rax),%rax
  movzwl %ax,%eax
  shl    $0x2,%rax
  cmp    %rax,%rdx
  setbe  %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <DEBUG_ASSERT@plt>
  mov    -0x20(%rbp),%rax
  and    $0x3,%eax
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <DEBUG_ASSERT@plt>
  mov    -0x28(%rbp),%rax
  and    $0x3,%eax
  test   %rax,%rax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <DEBUG_ASSERT@plt>
L121:
  mov    $0x400af018,%eax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  jne    L121
  mov    $0x400af004,%edx
  mov    -0x20(%rbp),%rax
  shr    $0x6,%rax
  mov    %rax,(%rdx)
  mov    -0x20(%rbp),%rax
  shr    $0x2,%rax
  mov    $0x400af008,%edx
  and    $0xf,%eax
  mov    %rax,(%rdx)
  mov    -0x28(%rbp),%rax
  shr    $0x2,%rax
  mov    %rax,-0x28(%rbp)
  jmp    L46
L16:
  mov    $0x400fe000,%eax
  mov    (%rax),%rax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%rax
  jne    L109
  mov    $0x400fe000,%eax
  mov    (%rax),%rax
  movzwl %ax,%eax
  test   %rax,%rax
  jne    L109
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <EEPROMSetSectorMask@plt>
  addq   $0x4,-0x20(%rbp)
L109:
  mov    $0x400af014,%edx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,(%rdx)
L31:
  mov    $0x400af018,%eax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  and    $0x1,%eax
  test   %rax,%rax
  jne    L31
  mov    -0x8(%rbp),%rax
  and    $0x110,%eax
  test   %rax,%rax
  je     L116
  mov    $0x400fe000,%eax
  mov    (%rax),%rax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%rax
  jne    L74
  mov    $0x400fe000,%eax
  mov    (%rax),%rax
  movzwl %ax,%eax
  test   %rax,%rax
  jne    L74
  mov    $0x0,%eax
  call   <EEPROMClearSectorMask@plt>
L74:
  mov    -0x8(%rbp),%rax
  jmp    L17
L116:
  addq   $0x8,-0x18(%rbp)
  subq   $0x1,-0x28(%rbp)
  mov    $0x400af008,%eax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L46
  mov    $0x400af004,%eax
  mov    (%rax),%rax
  mov    $0x400af004,%edx
  add    $0x1,%rax
  mov    %rax,(%rdx)
L46:
  cmpq   $0x0,-0x28(%rbp)
  jne    L16
  mov    $0x400fe000,%eax
  mov    (%rax),%rax
  and    $0x70ff0000,%eax
  cmp    $0x10050000,%rax
  jne    L78
  mov    $0x400fe000,%eax
  mov    (%rax),%rax
  movzwl %ax,%eax
  test   %rax,%rax
  jne    L78
  mov    $0x0,%eax
  call   <EEPROMClearSectorMask@plt>
L78:
  mov    $0x400af018,%eax
  mov    (%rax),%rax
L17:
  leave
  ret
```

assistant: ```c
unsigned long EEPROMProgram(unsigned long *pulData, unsigned long ulAddress, unsigned long ulCount) {
  unsigned long ulStatus;
  DEBUG_ASSERT(pulData);
  DEBUG_ASSERT(ulAddress < (((((*((volatile unsigned long *)(0x400AF000)))) & 0x0000FFFF) >> 0) * 4));
  DEBUG_ASSERT((ulAddress + ulCount) <= (((((*((volatile unsigned long *)(0x400AF000)))) & 0x0000FFFF) >> 0) * 4));
  DEBUG_ASSERT((ulAddress & 3) == 0);
  DEBUG_ASSERT((ulCount & 3) == 0);
  do {
    ulStatus = (*((volatile unsigned long *)(0x400AF018)));
  } while (ulStatus & 0x00000001);
  (*((volatile unsigned long *)(0x400AF004))) = ((ulAddress) >> 6);
  (*((volatile unsigned long *)(0x400AF008))) = (((ulAddress) >> 2) & 0x0F);
  ulCount /= 4;
  while (ulCount) {
    if ((((*((volatile unsigned long *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00050000)) && (((*((volatile unsigned long *)(0x400FE000))) & (0x0000FF00 | 0x000000FF)) == (0x00000000 | 0x00000000))) {
      EEPROMSetSectorMask(ulAddress);
      ulAddress += 4;
    }
    (*((volatile unsigned long *)(0x400AF014))) = *pulData;
    do {
      ulStatus = (*((volatile unsigned long *)(0x400AF018)));
    } while (ulStatus & 0x00000001);
    if (ulStatus & (0x00000010 | 0x00000100)) {
      if ((((*((volatile unsigned long *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00050000)) && (((*((volatile unsigned long *)(0x400FE000))) & (0x0000FF00 | 0x000000FF)) == (0x00000000 | 0x00000000))) {
        EEPROMClearSectorMask();
      }
      return (ulStatus);
    }
    pulData++;
    ulCount--;
    if ((*((volatile unsigned long *)(0x400AF008))) == 0) {
      (*((volatile unsigned long *)(0x400AF004))) += 1;
    }
  }
  if ((((*((volatile unsigned long *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x00050000)) && (((*((volatile unsigned long *)(0x400FE000))) & (0x0000FF00 | 0x000000FF)) == (0x00000000 | 0x00000000))) {
    EEPROMClearSectorMask();
  }
  return ((*((volatile unsigned long *)(0x400AF018))));
}
```