user: 这段汇编代码用C语言表示是什么样的：

```asm
<apic_clear>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <apic_get_maxlvt@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0xe00,%rax
  movl   $0x0,(%rax)
  cmpl   $0x2,-0x8(%rbp)
  jle    L28
  mov    -0x18(%rbp),%rax
  add    $0xdc0,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0xdc0,%rax
  or     $0x10000,%edx
  mov    %edx,(%rax)
L28:
  mov    -0x18(%rbp),%rax
  add    $0xc80,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0xc80,%rax
  or     $0x10000,%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0xd40,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0xd40,%rax
  or     $0x10000,%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0xd80,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0xd80,%rax
  or     $0x10000,%edx
  mov    %edx,(%rax)
  cmpl   $0x3,-0x8(%rbp)
  jle    L14
  mov    -0x18(%rbp),%rax
  add    $0xd00,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0xd00,%rax
  or     $0x10000,%edx
  mov    %edx,(%rax)
L14:
  cmpl   $0x5,-0x8(%rbp)
  jle    L70
  mov    -0x18(%rbp),%rax
  add    $0xbc0,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0xbc0,%rax
  or     $0x10000,%edx
  mov    %edx,(%rax)
L70:
  mov    -0x18(%rbp),%rax
  add    $0xc80,%rax
  movl   $0x10000,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0xd40,%rax
  movl   $0x10000,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0xd80,%rax
  movl   $0x10000,(%rax)
  cmpl   $0x2,-0x8(%rbp)
  jle    L30
  mov    -0x18(%rbp),%rax
  add    $0xdc0,%rax
  movl   $0x10000,(%rax)
L30:
  cmpl   $0x3,-0x8(%rbp)
  jle    L41
  mov    -0x18(%rbp),%rax
  add    $0xd00,%rax
  movl   $0x10000,(%rax)
L41:
  cmpl   $0x5,-0x8(%rbp)
  jle    L36
  mov    -0x18(%rbp),%rax
  add    $0xbc0,%rax
  movl   $0x10000,(%rax)
L36:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <apic_is_integrated@plt>
  test   %rax,%rax
  je     L61
  cmpl   $0x3,-0x8(%rbp)
  jle    L74
  mov    -0x18(%rbp),%rax
  add    $0xa00,%rax
  movl   $0x0,(%rax)
L74:
  mov    -0x18(%rbp),%rax
  mov    0xa00(%rax),%eax
  mov    %eax,-0x4(%rbp)
L61:
  nop
  leave
  ret
```

assistant: ```c
void apic_clear(uint8_t *baseapic) {
  uint32_t maxlvt = apic_get_maxlvt(baseapic);
  *((uint32_t *)&baseapic[0x380]) = 0;
  if (maxlvt >= 3) {
    *((uint32_t *)&baseapic[0x370]) |= (1 << 16);
  }
  *((uint32_t *)&baseapic[0x320]) |= (1 << 16);
  *((uint32_t *)&baseapic[0x350]) |= (1 << 16);
  *((uint32_t *)&baseapic[0x360]) |= (1 << 16);
  if (maxlvt >= 4) {
    *((uint32_t *)&baseapic[0x340]) |= (1 << 16);
  }
  if (maxlvt >= 6) {
    *((uint32_t *)&baseapic[0x2f0]) |= (1 << 16);
  }
  *((uint32_t *)&baseapic[0x320]) = (1 << 16);
  *((uint32_t *)&baseapic[0x350]) = (1 << 16);
  *((uint32_t *)&baseapic[0x360]) = (1 << 16);
  if (maxlvt >= 3) {
    *((uint32_t *)&baseapic[0x370]) = (1 << 16);
  }
  if (maxlvt >= 4) {
    *((uint32_t *)&baseapic[0x340]) = (1 << 16);
  }
  if (maxlvt >= 6) {
    *((uint32_t *)&baseapic[0x2f0]) = (1 << 16);
  }
  if (apic_is_integrated(baseapic)) {
    uint32_t fake __attribute__((unused));
    if (maxlvt > 3) {
      *((uint32_t *)&baseapic[0x280]) = 0;
    }
    fake = *((uint32_t *)&baseapic[0x280]);
  }
}
```