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

```asm
<coalesce>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    $0xfffffffffffffffc,%rdx
  sub    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    -0x28(%rbp),%rdx
  sub    $0x8,%rdx
  mov    (%rdx),%edx
  mov    %edx,%edx
  and    $0xfffffff8,%edx
  sub    %rdx,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0x1,%eax
  mov    %rax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0x1,%eax
  mov    %rax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L61
  cmpq   $0x0,-0x10(%rbp)
  je     L61
  mov    -0x28(%rbp),%rax
  jmp    L20
L61:
  cmpq   $0x0,-0x18(%rbp)
  je     L41
  cmpq   $0x0,-0x10(%rbp)
  jne    L41
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  add    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  jmp    L1
L41:
  cmpq   $0x0,-0x18(%rbp)
  jne    L68
  cmpq   $0x0,-0x10(%rbp)
  je     L68
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    $0xfffffffffffffffc,%rdx
  sub    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  add    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    $0xfffffffffffffffc,%rdx
  sub    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  neg    %rax
  add    %rax,-0x28(%rbp)
  jmp    L1
L68:
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    $0xfffffffffffffffc,%rdx
  sub    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0xfffffff8,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  lea    -0x4(%rax),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  add    %rdx,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0xfffffff8,%eax
  add    %ecx,%eax
  mov    %eax,%eax
  add    %rax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    $0xfffffffffffffffc,%rdx
  sub    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  sub    $0x4,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  lea    -0x4(%rax),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  add    %rdx,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%rdx
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  and    $0xfffffff8,%eax
  neg    %rax
  add    %rax,-0x28(%rbp)
L1:
  mov    -0x28(%rbp),%rax
L20:
  pop    %rbp
  ret
```

assistant: ```c
void *coalesce(void *bp) {
  size_t prev_alloc = ((*(unsigned int *)(((char *)(((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7))) + ((*(unsigned int *)(((char *)(((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7))) - 4))) & ~0x7) - 8))) & 0x1);
  size_t next_alloc = ((*(unsigned int *)(((char *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7))) - 4))) & 0x1);
  size_t size = ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7);
  if (prev_alloc && next_alloc)
    return bp;
  else if (prev_alloc && !next_alloc) {
    size += ((*(unsigned int *)(((char *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7))) - 4))) & ~0x7);
    (*(unsigned int *)(((char *)(bp)-4)) = (((size) | (0))));
    (*(unsigned int *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7) - 8)) = (((size) | (0))));
  } else if (!prev_alloc && next_alloc) {
    size += ((*(unsigned int *)(((char *)(((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7))) - 4))) & ~0x7);
    (*(unsigned int *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7) - 8)) = (((size) | (0))));
    (*(unsigned int *)(((char *)(((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7))) - 4)) = (((size) | (0))));
    bp = ((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7));
  } else {
    size += ((*(unsigned int *)(((char *)(((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7))) - 4))) & ~0x7) + ((*(unsigned int *)(((char *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7))) + ((*(unsigned int *)(((char *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7))) - 4))) & ~0x7) - 8))) & ~0x7);
    (*(unsigned int *)(((char *)(((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7))) - 4)) = (((size) | (0))));
    (*(unsigned int *)(((char *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7))) + ((*(unsigned int *)(((char *)(((char *)(bp) + ((*(unsigned int *)(((char *)(bp)-4))) & ~0x7))) - 4))) & ~0x7) - 8)) = (((size) | (0))));
    bp = ((char *)(bp) - ((*(unsigned int *)(((char *)(bp)-8))) & ~0x7));
  }
  return bp;
}
```