user: Please show me the C implementation that matches the assembly code listed below:

```asm
<arm_calculate_vector_table_crc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L16
L10:
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  shl    $0x8,%rax
  or     %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  shl    $0x10,%rax
  or     %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  shl    $0x18,%rax
  or     %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  add    %rax,-0x18(%rbp)
  addl   $0x1,-0x1c(%rbp)
L16:
  cmpl   $0x6,-0x1c(%rbp)
  jle    L10
  negq   -0x18(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  shl    $0x8,%rax
  or     %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  shl    $0x10,%rax
  or     %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  mov    %eax,%edi
  call   <fmem_get_byte@plt>
  shl    $0x18,%rax
  or     %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <msg@plt>
  movq   $0x1c,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl %al,%edx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x10(%rbp)
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fmem_set_byte@plt>
  mov    -0x18(%rbp),%rax
  shr    $0x8,%rax
  movzbl %al,%edx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x10(%rbp)
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fmem_set_byte@plt>
  mov    -0x18(%rbp),%rax
  shr    $0x10,%rax
  movzbl %al,%edx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x10(%rbp)
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fmem_set_byte@plt>
  mov    -0x18(%rbp),%rax
  shr    $0x18,%rax
  movzbl %al,%edx
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x10(%rbp)
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <fmem_set_byte@plt>
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D3
type_guessed: string

tool: D3: LPC crc calculated = 0x%08lx, crc found = 0x%08lx

assistant: ```c
void arm_calculate_vector_table_crc(void) {
  int i;
  unsigned long crc;
  unsigned long vector;
  unsigned long adr;
  crc = 0UL;
  adr = 0UL;
  for (i = 0; i < 7; i++) {
    vector = (unsigned long)fmem_get_byte(adr++);
    vector |= ((unsigned long)fmem_get_byte(adr++)) << 8;
    vector |= ((unsigned long)fmem_get_byte(adr++)) << 16;
    vector |= ((unsigned long)fmem_get_byte(adr++)) << 24;
    crc += vector;
  }
  crc = 0 - crc;
  vector = (unsigned long)fmem_get_byte(adr++);
  vector |= ((unsigned long)fmem_get_byte(adr++)) << 8;
  vector |= ((unsigned long)fmem_get_byte(adr++)) << 16;
  vector |= ((unsigned long)fmem_get_byte(adr++)) << 24;
  msg("LPC crc calculated = 0x%08lx, crc found = 0x%08lx", crc, vector);
  adr = 7 * 4;
  fmem_set_byte(adr++, (crc >> 0) & 255);
  fmem_set_byte(adr++, (crc >> 8) & 255);
  fmem_set_byte(adr++, (crc >> 16) & 255);
  fmem_set_byte(adr++, (crc >> 24) & 255);
}
```